Conversation
The review skill spawns one rule-hunter per rule family with pre-filter hits — types (R1, R2, R11, R12), structure (R3, R4, R5), tests and dependencies (R6, R7, R8, R10), documentation (R9) — four at most, where it spawned one per rule, up to twelve. A hunter gets the absolute paths of its family's rule files that had hits, reads them all in its first turn (ceiling about 30k tokens, from 20k), runs every rule's detection commands in one labelled call, and returns one receipt per question per rule and one tally per rule, so the merged report still reconciles per rule. Two changes ride along: the hunter report is capped at findings, receipts, tallies and the not-reached line (about 3k tokens), and the review-only command no longer runs the tests or the linter; the analyze command still runs all three gates. Token budget stage S5; the S5 section of docs/token-budget.md records the family table, the cap and the gate decision. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cc1QSJWHXUUib2t1CyQGk8
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The unreadable-rule path can violate reconciliation and conceal incomplete family coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Reduces pre-commit review token usage by grouping rules into at most four family hunters while preserving per-rule reporting.
Changes:
- Adds family-based hunters, report caps, and per-rule receipts/tallies.
- Makes review commands skip tests and lint; analyze commands retain all gates.
- Regenerates all bindings and documents S5.
| File | Description |
|---|---|
core/agents/rule-hunter.md |
Defines family-hunter behavior and output. |
core/skills/pre-commit-review/SKILL.md |
Orchestrates hunters by rule family. |
core/skills/pre-commit-review/reference.md |
Documents family hunting and reconciliation. |
core/commands/{{.CmdPrefix}}-review.md |
Makes review design-only. |
core/commands/{{.CmdPrefix}}-analyze.md |
Updates family-hunter wording. |
docs/token-budget.md |
Records S5 design and results. |
lang/go/passthrough/README.md |
Updates Go source documentation. |
lang/go/passthrough/CHANGELOG.md |
Records Go binding changes. |
lang/python/passthrough/README.md |
Updates Python source documentation. |
lang/python/passthrough/CHANGELOG.md |
Records Python binding changes. |
lang/generic/passthrough/README.md |
Updates generic source documentation. |
lang/generic/passthrough/CHANGELOG.md |
Records generic binding changes. |
go-linter-driven-development/agents/rule-hunter.md |
Generated Go hunter instructions. |
go-linter-driven-development/skills/pre-commit-review/SKILL.md |
Generated Go orchestration. |
go-linter-driven-development/skills/pre-commit-review/reference.md |
Generated Go reference. |
go-linter-driven-development/commands/go-ldd-review.md |
Generated review-only command. |
go-linter-driven-development/commands/go-ldd-analyze.md |
Generated analyze command update. |
go-linter-driven-development/README.md |
Documents Go family hunters. |
go-linter-driven-development/CHANGELOG.md |
Records Go plugin changes. |
python-linter-driven-development/agents/rule-hunter.md |
Generated Python hunter instructions. |
python-linter-driven-development/skills/pre-commit-review/SKILL.md |
Generated Python orchestration. |
python-linter-driven-development/skills/pre-commit-review/reference.md |
Generated Python reference. |
python-linter-driven-development/commands/py-ldd-review.md |
Generated review-only command. |
python-linter-driven-development/commands/py-ldd-analyze.md |
Generated analyze command update. |
python-linter-driven-development/README.md |
Documents Python family hunters. |
python-linter-driven-development/CHANGELOG.md |
Records Python plugin changes. |
linter-driven-development/agents/rule-hunter.md |
Generated generic hunter instructions. |
linter-driven-development/skills/pre-commit-review/SKILL.md |
Generated generic orchestration. |
linter-driven-development/skills/pre-commit-review/reference.md |
Generated generic reference. |
linter-driven-development/commands/ldd-review.md |
Generated review-only command. |
linter-driven-development/commands/ldd-analyze.md |
Generated analyze command update. |
linter-driven-development/README.md |
Documents generic family hunters. |
linter-driven-development/CHANGELOG.md |
Records generic plugin changes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A rule file that does not read gets `R<N>: rule unreadable at <path>` in the place of that rule's tally; the report cap names the line as an allowed shape, and the parent renders it verbatim in the header in that rule's place — never as skipped, never as a clean tally, never dropped — with the Scope line reading PARTIAL coverage, as for a not-reached line. Addresses the Copilot review finding on #65. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cc1QSJWHXUUib2t1CyQGk8
The tool-call budget is the first turn plus four calls on a scoped review, six on a whole-repository one, plus one more call for each rule beyond the first the hunter was given — eight to ten for a four-rule hunter. The extra calls go to the rules' questions before any more reading: every question of every rule is run and judged before a spare call reads another directory. On the S5 proof run the structure hunter exhausted its fixed seven calls on --all and left R4 questions unrun. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cc1QSJWHXUUib2t1CyQGk8
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.

What
Token budget stage S5, the four-hunter arm only. The pre-commit-review skill spawns one rule-hunter per rule family with pre-filter hits, four at most, where it spawned one per rule (up to twelve).
A hunter gets the absolute paths of its family's rule files that had hits (never a rule with no hit, never two families), reads them all in its first turn (ceiling ~30k tokens, from ~20k), runs every rule's detection commands in one labelled Bash call, and returns one receipt per falsifying question per rule (
R<N> Q<n>: …) and one tally per rule. The merged report'sHunters:reconciliation therefore stays per rule and the report format does not change. On--all, a hunter's reading order sortsdirs.txtby the family's combined hits. A rule file that does not read getsR<N>: rule unreadable at <path>in its tally's place, rendered in the header asPARTIAL coverage(Copilot finding, fixed in a8de5c0).Budget (12955b1): the first turn plus four calls scoped or six on
--all, plus one call per rule beyond the first — eight to ten for a four-rule hunter — with the extra calls reserved for the rules' questions before any further reading.Two changes ride along because they touch the same files:
not reached:line, nothing else, about 3k tokens (was ~10k of narrative the parent drops)./<prefix>-reviewnow invokes the review alone;/<prefix>-analyzestill runs all three gates. Thereview-clean-treeeval runs had spent ~6M tokens per tier on tests and lint before a review that changes nothing.Files
core/skills/pre-commit-review/SKILL.md,reference.md— step 2 spawn rule and family table, hunt-focus table gets a Family column, hunter output shape and report cap, cluster-pass wording for family obsession, per-rule reconciliation, unreadable-rule rendering.core/agents/rule-hunter.md— family inputs, first turn reads all given rules, one detection loop over every rule, 30k first-turn ceiling, budget scaled by rule count, report cap, per-rule receipts and tallies, unreadable-rule line.core/commands/{{.CmdPrefix}}-review.md,-analyze.md— no tests/lint in review; analyze wording.docs/token-budget.mdS5 section rewritten (arm built, gate decision recorded, family table, cap, no-test change).Gates run
task generatefor all three bindings,task check(no drift),lint-core(no hard residue, README section unchanged), the threecheck-repo-brain_test.shsuites, generator unit tests,scripts/check-docs.sh: all pass on every commit. Renderedsed -nlines stay on one line.Proof: review tier, Sonnet 5
Two runs. S5 =
go-s5-158f75a(fixed 7-call hunter budget; 7 runs, 19.2M tokens, $18.86). S5b =go-s5b-12955b1(budget scales with rule count; review-full ×3 only, 13.1M tokens, $13.72). Baseline isgo-2.11.0-c78b55f(pre-S1); S1–S4 is the run recorded on #61–#63 (its result dirs were not available in this container, so its token figures are the −41% recorded there, ≈6.6M on the baseline's review-full mean).Gate 1 — graders
--allin run 2, never ran R4 Q1/Q6, and four R4/R5 plants went missing (98). S5b raised the floor to 101 and every S5b run found every structure plant; the mean did not move (104.0 vs 103.3) because run 3's types hunter (R1, R2, R11, R12 — 20 questions over 68 files) reportednot reachedon five directories and missed the three CASE-A plants and R1 Q1. The cluster graders (3–5 per run) are the steady miss in every run: the rule-id-on-title convention slips under a shorter report.Gate 2 — billed tokens
Options
8 vs 14 baseline), each hunter carries at most 10 questions, and the spend gate should still clear by a wide margin. One more review-full ×3 ($15) proves it.Traces:
go-s5-158f75a-traces.tar.zst(2.3 MB) andgo-s5b-12955b1-traces.tar.zst(1.6 MB), attached in the session.Not in S5
One-hunter arm, bounded refactor workers,
maxTurnson lint-fixer, quickfix case cap, S6 analyzer, Haiku for hunters.🤖 Generated with Claude Code
https://claude.ai/code/session_01Cc1QSJWHXUUib2t1CyQGk8