Audit agent guidance against the Opus 5 prompting guide - #1144
Merged
Conversation
book-pot passed a relative `-d po`, which mdBook 0.4 resolved against the book root but 0.5 resolves against the working directory. Under 0.5 the pot landed in ./po/ at the repository root and book-po-update then failed on a missing file. Make the destination absolute. Add a version guard alongside it. mdbook-i18n-helpers 0.3.x pairs only with mdBook 0.4.x; the mismatched pair that does not error -- helpers 0.4.x -- extracts fenced code blocks one entry per line instead of one per block, so the following msgmerge marks every code-block entry fuzzy and rewrites po/ja.po against msgids the pinned toolchain never produces. Pin both halves of the toolchain in the translations doc and describe both failure modes, including the symptom of the silent one.
Audit the instruction files, rules, and skills against the Opus 5 prompting guide. Add the three things it calls for that were absent: narration cadence during a task, a length rule for written deliverables, and a delegation policy. The delegation section caps concurrent worktree agents at six, which batch-fix, improve-crate, and cleanup-crate now encode -- batch-fix through a wave-size rule, since its waves were bounded only by distinct crate count and this workspace has twelve crate manifests. Remove the re-verification loops the guide warns compound with the model's own checking: two in batch-fix and one in doc-author. The domain checklist and the cross-context Phase 3 review stay; only the re-run over one's own fixes goes. Scale simplify-rust's fan-out to the diff rather than always spawning three agents. Bound complexity feedback to the edit that triggered it, in all three copies of the shipped guidance block plus the condensed opencode strings. Fix the book's sample hook, which used an unguarded CLAUDE_PROJECT_DIR under `set -u` where the shipped hook guards it.
Refresh the Japanese catalogue against the canonical toolchain (mdBook 0.4.40 + mdbook-i18n-helpers 0.3.6). The file read as fully translated only because msgmerge had not run since those English edits landed; the real drift was 42 entries across the unreadable- input rule, REST nesting limits, the nextest notes, the LoC whitespace carve-out, and this session's agent-feedback additions. Strings that ship into an agent's prompt or a hook's stderr stay in English, matching the existing convention for the heredoc body. The catalogue is now fully translated with no fuzzy, untranslated, or obsolete entries, and is idempotent under make book-po-update.
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audits the repository's agent-facing configuration against the
Opus 5 prompting guide,
and fixes two tooling bugs the audit uncovered along the way.
Agent guidance
Three things the guide calls for were absent entirely, and are now in
CLAUDE.md: narration cadence during a task, a length rule for writtendeliverables, and a delegation policy.
The delegation policy caps concurrent
isolation: "worktree"agents atsix.
improve-crateandcleanup-cratesaid "launch all areaagents in parallel";
batch-fixhad no cap at all, and its waves werebounded only by distinct crate count — this workspace has twelve crate
manifests, so a wave could start a dozen workspace clones. All three now
encode the same six.
The guide warns that explicit re-verification compounds with the model's
own checking rather than adding to it. Three such loops are removed (two
in
batch-fix, one indoc-author). What stays is everything thatlooks at the work from outside the context that produced it: the
domain checklist,
batch-fix's Phase 3 review, anddoc-author'sfresh-context reviewer.
simplify-rustnow scales its fan-out to thediff instead of always spawning three agents for a two-file change.
Complexity feedback is now explicitly scoped to the edit that triggered
it — the guide's task-scope point applied to this repo's own hook — in
all three copies of the shipped guidance block plus the condensed
opencode strings.
Left alone deliberately: the
reviewandaudit-*skills alreadydo find-then-filter without severity gating, which is exactly what the
guide recommends. The guidance block's "do not …" framing also stays: it
names specific gaming moves, and the guide's preference for positive
examples is about narration style, not prohibitions.
Bugs found
make book-pothas been broken under mdBook 0.5. It passed arelative
-d po, which 0.4 resolved against the book root and 0.5resolves against the cwd, so the pot landed in
./po/at the repositoryroot and
book-po-updatefailed on a missing file.The book's sample Claude Code hook would break for anyone who pasted
it — unguarded
${CLAUDE_PROJECT_DIR}underset -euo pipefail, wherethe repo's own shipped hook guards it. The sample had drifted.
Japanese
ja.poread as "3348 translated, 0 fuzzy" only because the brokenbook-potmeantmsgmergehad not run since those English editslanded. Against a correct pot the real drift was 42 entries, now all
translated: 3382 translated, 0 fuzzy, 0 untranslated, 0 obsolete.
A version guard was added because getting this wrong is quiet.
mdbook-i18n-helpers 0.3.x under mdBook 0.5.x aborts loudly, but helpers
0.4.x extracts fenced code blocks one entry per line instead of one per
block — extraction succeeds, and the next
msgmergeshredsja.poagainst msgids the pinned toolchain never produces. That happened during
this work and was caught by installing the pinned pair;
book-potnowrefuses to run outside mdBook 0.4.x, and
translations.mdpins bothhalves and describes both failure modes.
Validation
markdown-lint,makefile-check,shellcheck,toml-lint,actionlint,snapshot-anchors,check-versions,check-manpage-assets,grammar-marker-sync,self-scan, andmsgfmt --checkall pass.shellcheckandbash -npass on the sample hook extracted from itsfence. The Japanese book builds and renders the new content, and
make book-po-updateis idempotent.The cargo stages of
make pre-commitcould not be run:cargo fmt --allwalks into the vendored grammar crates, which are not workspacemembers, so manifest discovery escapes any worktree under
.claude/worktrees/and resolves to the main checkout. This predates thebranch — the diff touches no
.rsorCargo.tomlfile — but it meansmake pre-commitcannot complete in the worktree mode thatbatch-fix,improve-crate,cleanup-crate, andaudit-crateall document. Worthits own issue; CI will cover the cargo gates for this PR.