Skip to content

docs: point the app AGENTS.md, templates and block JSDoc at cdk-blocks docs - #1512

Merged
xyos merged 2 commits into
mainfrom
docs/cdk-blocks-docs-pointers
Nov 18, 2026
Merged

xyos merged 2 commits into
mainfrom
docs/cdk-blocks-docs-pointers

Conversation

@xyos

@xyos xyos commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

With cdk-blocks docs in place (#1511), the scaffolded app AGENTS.md, the templates, the guide and the block JSDoc still send readers to the docs path in node_modules.

Issue #, if available: none

Stack: 4 of 5 (base: #1511, the cdk-blocks docs command). It needs the command from #1511. #1521, on top, adds --output json.

Rebased on main after #1453 (KVStore consolidation) and #1498 (findable docs). Review fixes are in their own commit.

Changes

Pointers (@aws-blocks/create-blocks-app, patch; @aws-blocks/blocks):

  • The scaffolded AGENTS.md "AWS Blocks docs" bullet describes npx --no -- cdk-blocks docs as the docs command for the app's Building Blocks and AWS Blocks APIs, then says "It answers types, signatures and how a block behaves, so there's no need to open the packages' source unless necessary." With no arguments it lists the blocks, and one or more blocks or APIs print their docs (npx --no -- cdk-blocks docs KVStore Auth). A name can be a block, an export, a type, a function, an option or a method; the bullet also names --section, --api, --exports, --search and --help. The bullet is one line of 149 words (wc -w). Its other docs pointers (troubleshooting, a block's own docs) name the command too.
  • Every template's README says "Building Block docs: npx --no -- cdk-blocks docs lists the blocks, and npx --no -- cdk-blocks docs <Block>... prints their docs (--help for more).", and every template's code comments and the Swift demo say "Building Block docs: npx --no -- cdk-blocks docs lists the blocks; npx --no -- cdk-blocks docs ... prints their docs (--help for more)". Block-specific pointers name the block's class (cdk-blocks docs Auth, CronJob, Database).
  • The guide's "Building Block documentation" paragraph and the Full docs: JSDoc of the @aws-blocks/blocks re-exports name cdk-blocks docs <package> instead of the docs path.
  • Nothing in the AGENTS.md, the templates, the guide or the JSDoc tells an agent to read or search node_modules for docs or types any more. The remaining node_modules mentions in the templates are unrelated: .gitignore entries, cdk.json's watch excludes, the Next.js tsconfig.json exclude, and the backend aws-blocks/tsconfig.json's outDir (node_modules/.tmp, where tsc -b writes the declarations the frontend reads) with the comment that explains it.
  • The other file pointers name the command too: the scaffolded AGENTS.md's TS6307 fix (troubleshooting --section TS6307) and Amplify note (Auth --section amplify), the package README's per-block documentation bullet, the auth-oidc template (new on main), the api-only RawRoute comment, LegacyKVStore's JSDoc, the contributor AGENTS.md, CONTRIBUTING.md and the Kotlin example app's comments.
  • docs-pointers.test.ts checks each template with a README for a pointer in its README and its backend, and reads the Swift demo and the Kotlin example app's code too.
  • The cdk-blocks docs changeset gains the @aws-blocks/create-blocks-app patch and a paragraph on these pointers.

No breaking change: the bundled docs/ folder and its paths are unchanged.

Validation

Run locally at the stack top (f05527191, on main at 03778d9f6) with Node 22.23.1 (.nvmrc):

The full suites ran on the previous head (b8a78177a, on main at d01c34c96), Node 22.23.1, before this rebase onto nine more main commits; the rebase changed only bb-kv-store/README.md (a conflict with #1608) in this stack's own diff:

  • npm run test:e2e:local: exit 0; 580 tests, 574 pass, 0 fail, 6 skipped.
  • npm test: 13,802 tests, 13,767 pass, 21 fail, 10 skipped. Every failure is a dev-server, signal or file-watcher test in core, hosting or blocks' cli/context.test.js (none in cdk-blocks docs, bb-auth, bb-kv-store or create-blocks-app), and the log has 46 EMFILE errors from fs.watch: this machine's fs.inotify.max_user_instances (128) was used up by other processes. CI runs these suites.

No sandbox run: nothing here changes deployed behaviour or serialization.

Checklist

  • PR description included
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@changeset-bot

changeset-bot Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5ac61b7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 2 packages
Name Type
@aws-blocks/blocks Minor
@aws-blocks/create-blocks-app Minor

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@xyos xyos changed the title docs/cdk blocks docs pointers docs: point the app AGENTS.md, templates and block JSDoc at cdk-blocks docs Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor
📖 Glossary & notes — scoring, indicators, per-metric thresholds (click to expand)
  • N = 1 — one rep per cell, so a small delta may be model variance, not a real change; re-run for certainty.
  • Indicators (change vs baseline, per metric): ✨ noticeably improved · ✅ OK / no significant change (within noise band) · ⚠️ slight regression (beyond 1× threshold) · ❌ serious regression (beyond 2× threshold) · 🆕 new — no baseline value yet (current value shown, tagged (new)) · — nothing to show this run · 🗑️ cell gone since the baseline. Each cell shows <indicator> <value> (<Δ vs main>) inline.
  • Columns: Tests (pass/denom) · Judge (overall 0-10 score with signed delta; per-dimension breakdown lives in the judge artifact JSON) · Cost · Turns (agent cycles) · Score · Stop reason.
  • Threshold definitions (per metric, DELTA_THRESHOLDS in overview.mjs):
    • composite/score: ±5 points — a change ≤5 pts is ✅; >5 improving is ✨; >5 worsening is ⚠️; >10 worsening is ❌.
    • judge (overall): ±0.3 — a shift ≤0.3 is ✅; >0.3 improving is ✨; >0.3 worsening is ⚠️; >0.6 worsening is ❌.
    • tests: ±1 pass — a ≤1 pass change is ✅; >1 improving is ✨; >1 worsening is ⚠️; >2 worsening is ❌.
    • cost: ±10% of baseline (floor $0.02) — within 10% is ✅; >10% cheaper is ✨; >10% more expensive is ⚠️; >20% more expensive is ❌.
    • turns: ±3 cycles — a ≤3 turn change is ✅; >3 fewer is ✨; >3 more is ⚠️; >6 more is ❌.
  • Directions: higher is better for tests, judge, and score; lower is better for cost and turns.
  • Composite (0-100) = round(60·test_rate + 4·judge·min(1, 4·test_rate), 1) — 60% objective pass-rate + 40% judge, the judge term gated below a 25% pass-rate.
  • Cost = builder token spend at Bedrock Claude Opus 4.8 rates ($5 in / $25 out per 1M tokens; BUILDER_PRICING in scoring.mjs).
  • SCORE = composite ÷ cost — composite points per dollar (higher = better). Cost, not raw token volume, is the denominator, so tokens can't dominate; a broken (composite 0) cell scores 0 no matter how cheap. Flip SCORE_PER_DOLLAR in scoring.mjs for cost-per-point (lower = better).
  • Baseline = the most recent main-branch bench (bench/runs/latest-main.json), NOT the PR base commit — the PR always diffs against the current state of main.
  • Excluded from the mean: harness_error cells (infra failures) and gradeable cells that ran no tests. agent_fail (agent produced no app in budget) and dead_server (built app never served / crashed) are BOTH included, as composite 0.
  • Run artifacts — per-cell source + full agent traces · 🕒 Last run: 2026-11-18T10:31:46Z · run #44281122545

Results — PR vs main baseline

Each metric shows its current value colored by the change vs the latest main baseline a34c850. ✨ improved · ✅ within noise · ⚠️ slight regression · ❌ serious regression · 🆕 no baseline yet (value shown, tagged (new)).

  • Mean composite 71.3/100 across 10 scored cell(s) — no main baseline yet · judge mean 8.87/10.
  • Verdicts: 7 pass · 1 partial · 2 fail · 0 harness_error.
  • Totals: cost $95.53 · tokens 18.4M in / 148.9K out · 337 turns.
  • Config: baseline a34c850.
  • ✅ Composite band 🟡 across 10 scored cell(s). Threshold 65 — pass.
Task Template Tests Judge Cost Turns Score Stop reason
async-word-counter bare 🆕 13/13 (new) 🆕 9.4 (new) 🆕 $2.63 (new) 🆕 16 (new) 🆕 37.1 (new) endTurn
auth-notes demo 🆕 0/11 (new) 🆕 7 (new) 🆕 $11.75 (new) 🆕 39 (new) 🆕 0 (new) endTurn
cognito-profile auth 🆕 10/10 (new) 🆕 9.4 (new) 🆕 $28 (new) 🆕 73 (new) 🆕 3.5 (new) endTurn
collab-presence-board default 🆕 11/11 (new) 🆕 8.8 (new) 🆕 $2.4 (new) 🆕 19 (new) 🆕 39.7 (new) endTurn
email-digest demo 🆕 12/12 (new) 🆕 9.4 (new) 🆕 $5.45 (new) 🆕 25 (new) 🆕 17.9 (new) endTurn
file-gallery bare 🆕 12/12 (new) 🆕 9.6 (new) 🆕 $1.98 (new) 🆕 13 (new) 🆕 49.8 (new) endTurn
kb-chat-agent demo — — 🆕 $3.1 (new) 🆕 13 (new) 🆕 0 (new) error
observability-api backend 🆕 18/18 (new) 🆕 9 (new) 🆕 $6.47 (new) 🆕 33 (new) 🆕 14.8 (new) endTurn
oidc-dsql-notes react 🆕 2/11 (new) 🆕 8.2 (new) 🆕 $26.81 (new) 🆕 73 (new) 🆕 1.3 (new) endTurn
sql-kb-catalog nextjs 🆕 9/9 (new) 🆕 9 (new) 🆕 $6.94 (new) 🆕 33 (new) 🆕 13.8 (new) endTurn

Merge verdict

✅ This bench run does not block the PR.

  • ✅ Absolute floor — mean composite 71.3 >= floor 65.
  • ⚪ Regression vs main — BENCH_MAX_REGRESSION=10 set, but no main baseline to diff — regression gate skipped.

The Δ vs base ball above is a fixed ±5-pt display band; the regression gate uses BENCH_MAX_REGRESSION. The ball is cosmetic — the gate threshold is what blocks.

Comment thread packages/blocks/README.md Resolved
xyos added 2 commits November 18, 2026 10:59
…s docs

- The scaffolded AGENTS.md's "AWS Blocks docs" bullet describes `npx --no -- cdk-blocks docs` as
  the docs command for the app's Building Blocks and AWS Blocks APIs, which answers types,
  signatures and how a block behaves without opening the packages' source: no arguments
  lists the blocks, one or more blocks or APIs print their docs (`DistributedTable Auth`), and a name can
  be a block, an export, a type, a function, an option or a method. It names `--section`,
  `--api`, `--exports`, `--search` and `--help`. Its other docs pointers (troubleshooting, a
  block's own docs) name the command too.
- Every template's README and code comments and the Swift demo say `npx --no -- cdk-blocks docs`
  lists the blocks and `npx --no -- cdk-blocks docs <Block>...` prints their docs (`--help` for
  more); block-specific pointers name the block's class (`cdk-blocks docs Auth`, `Database`).
- The guide's "Building Block documentation" paragraph and the `Full docs:` JSDoc of the
  @aws-blocks/blocks re-exports name `cdk-blocks docs <package>` instead of the docs path in
  node_modules; docs-pointers.test.ts checks the JSDoc.
- create-blocks-app's docs-pointers.test.ts checks the AGENTS.md bullet, the wording of every
  template pointer, and that no template line sends an agent to node_modules for docs or types.
- The `cdk-blocks docs` changeset gains the `@aws-blocks/create-blocks-app` patch and a paragraph
  on these pointers.
…rs per template

- The scaffold AGENTS.md: TS6307's fix and the Amplify note name the command (troubleshooting
  --section TS6307, Auth --section amplify); the docs bullet's example is KVStore Auth.
- packages/blocks/README.md: the per-block documentation bullet and the Auth pointer use the command.
- The contributor AGENTS.md, CONTRIBUTING.md and the Kotlin example's comments point at the command.
- The auth-oidc template (new on main), the api-only RawRoute comment and LegacyKVStore's JSDoc too.
- docs-pointers.test.ts: every template with a README has a pointer in its README and backend; the
  Swift demo and the Kotlin example's code are read too, so a revert to node_modules wording fails.

This branch was previously deployed

2 inactive deployments
e2e — 5ac61b7a Deployed Nov 18, 2026 by xyos via E2E Teardown Verify #7056
agent-bench — 5ac61b7a Deployed Nov 18, 2026 by xyos via bench / summary #6131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants