Skip to content

docs(create-blocks-app): point AGENTS.md at a docs index command - #1013

Draft
xyos wants to merge 2 commits into
aws-devtools-labs:mainfrom
xyos:docs/agents-docs-paths
Draft

xyos wants to merge 2 commits into
aws-devtools-labs:mainfrom
xyos:docs/agents-docs-paths

Conversation

@xyos

@xyos xyos commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The generated AGENTS.md tells agents to open <block>/README.md in the AWS Blocks docs folder. The per-block folders are named after their packages (bb-kv-store/, bb-distributed-table/, ...), so agents drop the bb- prefix and guess paths like distributed-table/ or kv-store/ that don't exist. The core APIs (ApiNamespace, ApiError, the typed client) live in core/README.md, which the bullet doesn't mention.

Changes

  • packages/create-blocks-app/resources/AGENTS.md: the docs bullet now gives one command that lists the docs folders and prints the block catalog from the docs README.md (the table between the block-catalog markers that scripts/sync-catalog.mjs maintains). Agents then read the real folder names (e.g. bb-distributed-table) instead of guessing them. The bullet points to core/README.md for ApiNamespace, ApiError and the typed client, and says to import them from @aws-blocks/blocks.
  • Changeset: @aws-blocks/create-blocks-app patch.

Why this wording

We compared 12 versions of this bullet, plus no bullet at all, using headless Claude Code sessions on 31 feature tasks in a freshly scaffolded bare app. Each task is graded by running the app (dev server, JSON-RPC calls, restarts), never by reading the code.

  • Claude Opus: passes almost every task with any wording, including none, so no bullet changes outcomes. With this bullet it makes fewer tool calls: −1.0 per task (95% CI −1.8 to −0.15), with no pass-rate regression (62/62).
  • Claude Haiku 4.5 (no skill installed): this wording cut tool calls by 3.0 per task (95% CI −4.8 to −1.2) across three rounds. Its pass-rate gain (+0.06, CI −0.01 to +0.14) is not established, and on held-out tasks it matched the current bullet.
  • The earlier version of this PR (folder-name examples plus core/README.md) was neutral on both models, and so was a variant that only added the import hint.

So this is an efficiency change (agents get oriented sooner), not a correctness fix.

Tradeoffs

  • The bullet uses the flat-install path node_modules/@aws-blocks/blocks/docs and drops the require.resolve command, so agents in a non-flat install (pnpm, workspaces) lose that route. Every evaluated scaffold used the default flat npm install. The package README still documents the require.resolve command.
  • The command depends on the <!-- BEGIN:block-catalog --> / <!-- END:block-catalog --> markers, which sync-catalog.mjs writes and sync-catalog.test.mjs covers.

Validation

  • From a checkout with built docs (node_modules/@aws-blocks/blocks/docs), the bullet's command lists 25 docs folders (24 blocks plus core) and prints the catalog table (25 rows, 29 lines with the markers). bb-distributed-table/README.md and core/README.md exist.
  • At 32676a14 with Node 24.16.0: npm run build, npm run lint:deps (416 files), npm test (6148 pass, 0 fail, 7 skipped) and npm run test:e2e:local (432 pass, 0 fail, 1 skipped) all exit 0.

Checklist

  • Changeset added
  • Docs-only change; no code or tests affected

The generated AGENTS.md pointed at <block>/README.md, but Building Block
docs folders are named after their packages (bb-kv-store/, ...) and core
APIs live in core/README.md, so agents guessed paths like kv-store/ and
missed.
@changeset-bot

changeset-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 32676a1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@aws-blocks/create-blocks-app Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions

Copy link
Copy Markdown
Contributor

Harbor agent check — advisory

20 todo-app trajectories per arm. Pass rates carry Wilson 95% intervals; metric differences are candidate − baseline medians over passed phases with a seeded bootstrap 95% interval, shown only when both arms have at least 3 passes. The primary metric is cache-neutral cost; the storage section compares arms within one storage block. Local mock mode only; nothing is deployed.

  • Baseline: e34abf803f1636287d2f64fe98770ec8e6c621c7 (merge-base with the PR base).
  • Candidate: 0ec66e1afcc06d3e35f937e7c104678dd2525fd1 (PR head).
  • Harness: 50b8c94c125f78b1d5ec1afa99e117b891f779cf (trusted workflow revision, both arms).
  • Workflow and evidence
  • baseline: 19/20 counted trials passed every phase.
  • candidate: 20/20 counted trials passed every phase.

Packed packages differ between arms.

Trials
Trial Baseline Candidate
1 passed passed
2 passed passed
3 passed passed
4 passed passed
5 passed passed
6 passed passed
7 passed passed
8 passed passed
9 passed passed
10 passed passed
11 failed passed
12 passed passed
13 passed passed
14 passed passed
15 passed passed
16 passed passed
17 passed passed
18 passed passed
19 passed passed
20 passed passed

Failures

  • baseline trial 11 / due-dates: ui_exercise, assertion. Completion persists after page reload.

Pass rate

Phase Baseline Candidate Baseline skill Candidate skill
create 20/20 (100%; 84–100%) 20/20 (100%; 84–100%) skill_tool 20 skill_tool 20
due-dates 19/20 (95%; 76–99%) 20/20 (100%; 84–100%) none 20 none 20
labels 19/20 (95%; 76–99%) 20/20 (100%; 84–100%) none 19 none 20
total 19/20 (95%; 76–99%) 20/20 (100%; 84–100%) — —

Passed-phase medians (IQR)

Phase Arm Cache-neutral cost (primary) Input processed Output Turns Tools Seconds List-price cost New input† Cache read†
create baseline $0.5535 ($0.5149–$0.6207) 728,828 (709,836–946,838) 9,614 (8,314–10,215) 23 (22–27) 21 (20–25) 375 (329–439) $0.4851 ($0.4374–$0.5454) 28,454 (27,303–31,891) 701,083 (669,084–915,193)
create candidate $0.5708 ($0.5527–$0.5865) 809,786 (732,222–855,702) 9,460 (9,191–9,910) 24 (22–26) 22 (20–24) 387 (338–440) $0.4933 ($0.4744–$0.5089) 29,237 (28,140–31,598) 779,796 (703,906–825,127)
due-dates baseline $0.1905 ($0.1744–$0.2163) 321,529 (284,484–402,366) 4,596 (4,364–5,236) 6 (6–8) 5 (5–7) 92.6 (81.3–107) $0.1905 ($0.1744–$0.2163) 7,659 (6,030–9,194) 311,758 (278,474–394,640)
due-dates candidate $0.1877 ($0.1712–$0.2029) 322,300 (268,054–362,237) 4,490 (4,421–4,706) 6.5 (6–7) 5.5 (5–6) 95.8 (88.2–108) $0.1877 ($0.1712–$0.2030) 6,320 (5,994–7,823) 315,658 (261,882–356,342)
labels baseline $0.1656 ($0.1545–$0.1752) 228,897 (213,616–270,218) 4,374 (4,143–4,789) 4 (4–4.5) 3 (3–3.5) 84.2 (77.2–91.1) $0.1657 ($0.1545–$0.1753) 6,036 (5,737–7,095) 222,674 (207,485–264,000)
labels candidate $0.1602 ($0.1557–$0.1740) 233,941 (214,779–270,604) 4,336 (4,152–4,804) 4 (4–5) 3 (3–4) 84.5 (75.0–92.3) $0.1602 ($0.1557–$0.1741) 5,870 (5,240–6,352) 227,392 (209,365–265,335)
total baseline $0.9128 ($0.8529–$1.0090) 1,333,707 (1,177,160–1,592,730) 18,225 (17,544–20,097) 35 (32–38.5) 31 (28–34.5) 564 (507–650) $0.8353 ($0.7755–$0.9435) 43,386 (39,512–48,496) 1,289,956 (1,136,890–1,545,541)
total candidate $0.9221 ($0.8888–$0.9573) 1,351,600 (1,280,880–1,453,291) 18,338 (17,905–19,053) 35 (32.8–37) 31 (28.8–33) 576 (513–682) $0.8446 ($0.8114–$0.8798) 41,948 (39,530–45,141) 1,308,300 (1,239,239–1,408,017)

† Descriptive, not comparable across arms: new input (uncached input + cache writes) and cache read depend on prompt-cache warm-up order, so no difference is reported for them.

Candidate − baseline

Phase Cache-neutral cost (primary) Δ Input processed Δ Output Δ Turns Δ Tools Δ Seconds Δ List-price cost Δ
create +$0.0173 (+3.1%) [-$0.0451, +$0.0573] +80,958 (+11.1%) [-108,224, +126,644] -154 (-1.6%) [-698, +1,224] +1 (+4.3%) [-2.5, +3.5] +1 (+4.8%) [-2.5, +3.5] +11.9 (+3.2%) [-69.7, +66.3] +$0.0082 (+1.7%) [-$0.0526, +$0.0574]
due-dates -$0.0028 (-1.5%) [-$0.0259, +$0.0155] +772 (+0.2%) [-76,787, +50,613] -106 (-2.3%) [-666, +233] +0.5 (+8.3%) [-1.5, +1] +0.5 (+10.0%) [-1.5, +1] +3.2 (+3.4%) [-7.5, +17.6] -$0.0028 (-1.5%) [-$0.0259, +$0.0155]
labels -$0.0055 (-3.3%) [-$0.0148, +$0.0109] +5,044 (+2.2%) [-24,527, +42,772] -38 (-0.9%) [-466, +340] +0 (+0.0%) [+0, +1] +0 (+0.0%) [+0, +1] +0.3 (+0.4%) [-10.8, +9.4] -$0.0055 (-3.3%) [-$0.0147, +$0.0109]
total +$0.0093 (+1.0%) [-$0.0964, +$0.0809] +17,892 (+1.3%) [-177,529, +199,141] +114 (+0.6%) [-1,288, +1,183] +0 (+0.0%) [-2.5, +4] +0 (+0.0%) [-2.5, +4] +12.1 (+2.1%) [-89.5, +110] +$0.0093 (+1.1%) [-$0.0982, +$0.0809]

Δ is the difference of medians (percent of the baseline median) [bootstrap 95% interval]. A phase passes when it and every earlier phase passed with complete accounting in one session. Trials without a result or with an infrastructure error are excluded from rates. Cache-neutral cost is the primary metric: each phase at the pinned model’s list prices as if its own session wrote every context token to the prompt cache once (context growth at the cache-write rate, the rest of the input processed at the cache-read rate, output at the output rate), so it does not depend on which concurrent session warmed the cache. Input processed = uncached input + cache writes + cache reads. List-price cost is Claude Code’s estimate, not AWS billing, and is secondary: it moves with cache hits from other sessions. Failed or incomplete work is excluded from metrics: less usage there is not an efficiency win. skill shows how the agent reached the installed aws-blocks skill.

Storage block

Storage Baseline trials Candidate trials Baseline cache-neutral cost Candidate cache-neutral cost Candidate − baseline
kv_store 6 8 $0.8494 (5 passed) $0.9055 (8 passed) +$0.0562 (+6.6%) [-$0.0385, +$0.1432]
distributed_table 14 12 $0.9967 (14 passed) $0.9356 (12 passed) -$0.0611 (-6.1%) [-$0.1217, +$0.0838]

The storage block the create phase constructed, read from its snapshot. It moves cost by itself, so a different storage mix between arms shifts the pooled medians above. Costs here are whole-run medians over trials that passed every phase; a difference is shown only when both arms have at least 3 such passes in that storage.

Replace the docs bullet with one command that lists the docs folders and
prints the block catalog, so agents read folder names instead of guessing
them, and say to import ApiNamespace/ApiError from @aws-blocks/blocks.
@xyos xyos changed the title docs(create-blocks-app): name the real docs folder paths in AGENTS.md docs(create-blocks-app): point AGENTS.md at a docs index command Oct 24, 2026

This branch has not been deployed

No deployments
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.

1 participant