Repository navigation
docs: point the app AGENTS.md, templates and block JSDoc at cdk-blocks docs - #1512
Conversation
|
| 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
📖 Glossary & notes — scoring, indicators, per-metric thresholds (click to expand)
Results — PR vs
|
| 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.
…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.
Problem
With
cdk-blocks docsin place (#1511), the scaffolded appAGENTS.md, the templates, the guide and the block JSDoc still send readers to the docs path innode_modules.Issue #, if available: none
Stack: 4 of 5 (base: #1511, the
cdk-blocks docscommand). It needs the command from #1511. #1521, on top, adds--output json.Rebased on
mainafter #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):AGENTS.md"AWS Blocks docs" bullet describesnpx --no -- cdk-blocks docsas 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,--searchand--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.npx --no -- cdk-blocks docslists the blocks, andnpx --no -- cdk-blocks docs <Block>...prints their docs (--helpfor 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).Full docs:JSDoc of the@aws-blocks/blocksre-exports namecdk-blocks docs <package>instead of the docs path.AGENTS.md, the templates, the guide or the JSDoc tells an agent to read or searchnode_modulesfor docs or types any more. The remainingnode_modulesmentions in the templates are unrelated:.gitignoreentries,cdk.json's watch excludes, the Next.jstsconfig.jsonexclude, and the backendaws-blocks/tsconfig.json'soutDir(node_modules/.tmp, wheretsc -bwrites the declarations the frontend reads) with the comment that explains it.AGENTS.md's TS6307 fix (troubleshooting --section TS6307) and Amplify note (Auth --section amplify), the package README's per-block documentation bullet, theauth-oidctemplate (new onmain), the api-onlyRawRoutecomment,LegacyKVStore's JSDoc, the contributorAGENTS.md,CONTRIBUTING.mdand the Kotlin example app's comments.docs-pointers.test.tschecks 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.cdk-blocks docschangeset gains the@aws-blocks/create-blocks-apppatch 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, onmainat03778d9f6) with Node 22.23.1 (.nvmrc):npm run build,npm run lint(warnings only),npm run lint:deps: exit 0.node --test scripts/sink-guards/*.test.mjs): 35 pass, 0 fail (ci(kotlin): pass the emulator script path through env #1603 fixed the workflows site from ci(kotlin): retry the Android e2e leg when the device drops out #1600).cdk-blocks docstests (docs,bin,parse,help) with@aws-blocks/blocks'docs-pointers.test.js: 110 pass, 0 fail;@aws-blocks/create-blocks-app'sdocs-pointers.test.js: 5 pass;@aws-blocks/bb-auth'sreadme-recipes.test.js: 8 pass.The full suites ran on the previous head (
b8a78177a, onmainatd01c34c96), Node 22.23.1, before this rebase onto nine moremaincommits; the rebase changed onlybb-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 incore,hostingorblocks'cli/context.test.js(none incdk-blocks docs,bb-auth,bb-kv-storeorcreate-blocks-app), and the log has 46EMFILEerrors fromfs.watch: this machine'sfs.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
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.