fix: catch a dispatch template that reaches its subagent with no grammar - #80
Merged
Merged
Conversation
… merge This plan was authored before the slice-2 PR landed. That PR inserted loadSiteMirrorCheck into scripts/check-invariants.mjs and edited skills/ba-review/SKILL.md, shifting four of the line numbers it cites at the exact symbols it intends to modify. check-invariants.mjs :493 -> :499 (rubricMirrorCheck) check-invariants.mjs :532 -> :538 (per-file zero-occurrence branch) check-invariants.mjs :102 -> :102 (RUBRIC_MIRROR_FILES, unchanged) ba-review/SKILL.md :453 -> :463 (Dispatch instructions heading) ba-review/SKILL.md :453-518 -> :463-539 (Step 3 preamble + templates) Each verified to resolve to the named symbol on main @ 9694645. Symbols and intent are unchanged; only the addresses moved. A provenance note records the mapping and warns that nothing pins these, so they should be re-checked before use. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two corrections to the dispatch-drift plan before executing it. Unit anchors: #### U<n> -> ### U<n>, matching the grammar the U-ID convention specifies and derive-state scans for. The plan minted them one level deeper because the STANDARD template nests them under "### Changes Required"; the anchor level is the machine-readable part, so it wins over the visual nesting. Citations: the previous pass matched only the `file:NNN` form and missed the bare `:NNN` form, leaving six stale and one baseline wrong. ba-review/SKILL.md Task blocks :474/:492/:516 -> :484/:502/:526 ba-review/SKILL.md inline lit :476/:494/:518 -> :486/:504/:528 check-invariants zero-occ :532 -> :538 selfcheck baseline 47 -> 52 AC6 required the selfcheck total to exceed 47. Slice 2 already took it to 52, so that threshold was tautologically satisfied before this plan does anything. Re-anchored to 52 with the reason recorded inline. All ten skills/ba-review-plan/SKILL.md citations were re-verified and are unchanged: :302 and :321 (both general-purpose) still carry neither the legal-value literal nor the protected-artifacts guard while :294 does, and :289/:303/:322 still read "the section above". The defect this plan fixes is live exactly as described. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e the contract Deviation (U3): U3 enumerated only ba-review-plan edits, but AC5 forbids "described above" repo-wide and ba-review's three Task templates still aimed that phrase at subagents with no file to position against. Replaced with a citation of `## Code-Anchor & Confidence Grammar`. Approved in-run.
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.
Risk: medium — 218 lines across 7 files; two prompt surfaces plus the CI check that pins them
Two of
/ba-review-plan's three dispatch templates reached their subagent carrying neither the legal confidence-value set nor the protected-artifacts guard, and all three cited their instructions positionally — "the dispatch instructions in the section above", pointing at a document the subagent does not have. Both aregeneral-purposetemplates with no agent definition behind them, so the template text was their entire specification. Now eachTaskblock carries the contract inline, and every apply-phrase cites its section by title.rubric-mirrorwas green on that file throughout, which is the other half of the defect: it asserted the literal once per file, so a stripped template passed on the strength of a sibling's correct copy. The check now asserts perTaskblock. A mirror file with noTaskblock at all reads UNKNOWN rather than PASS, so deleting the templates cannot look like compliance.While removing the positional phrasing, the same defect turned up in
ba-review's three templates ("the standard format described above"), aimed at subagents with the same missing referent. Fixed there too — the file this change otherwise treats as the correct shape to copy.Testing limitations
The two runtime criteria could not be verified from the authoring session: a running session executes the skill body it loaded at start, so it would exercise the cached plugin rather than the working tree. They were closed afterwards in two separate
--plugin-dirsessions — one dispatching built-in agent reviewers, one dispatchinggeneral-purpose. Both confirmed the composed prompt carries the literal and the guard with no positional phrase surviving, across 30 raw confidence values with zero illegal.Not covered: the severity-ladder wording and per-anchor confidence meanings remain hand-mirrored across the seven reviewer agents and unchecked. A green
rubric-mirrorstill does not mean the agents agree.Proof: automated —
scripts/selfcheck-invariants.mjs(56 cases, up from 52)Alternatives considered
Replacing the file-level zero-occurrence branch outright, rather than layering the per-block assertion on top. Rejected: the reviewer agents carry no
Taskblocks, so removing the file-level check would silently drop their missing-literal coverage.