Repository navigation
docs(workspace): return CLAUDE.md to the entry file, and split the reviewers' effort - #53
Merged
Merged
Conversation
CLAUDE.md was 96.8KB and preloaded into every request of every session — a third copy of what .claude/rules/ and docs/ already own, and in one place a contradiction of them: ## Commands told a session to run `make check` while rules/project.md says make is absent on Windows. The binary's own entry template says the methodology lives in rules/ and is never inlined, and TestScaffoldedEntryFileStaysShort holds every workspace scc scaffolds to 60 lines; this one broke the contract its own product enforces. The entry file is now that template as rendered for Claude Code, plus the two spliced usage blocks: 95 lines, 4.9KB. Each concern went to the one place that owns it. Extended, rather than restated: delivery-gate (the grouped check object, why flat put build on line 2 and its siblings on line 170, the distinct findings), integration-boundary (the Windows dev container and why it is the weaker boundary, one graph per scoped tree), managed-files (CarryOver, and the silent deletion it prevents), artifact-addressing (the reading surface, BM25 over regions rather than a search engine, the seal), spec-or-plan (the spec's delivery record, and why merged is not "is an ancestor of the base"). New: wiki pages note-log and release, docs/codewiki/packages.md with the package map and the two flag-parsing bugs the handlers must not each re-discover, and the first two ADRs — stdlib-only dependencies, and the narrowing from csdd with the dev container recorded as the one item since reversed. docs/stack.md and README.md pointed at CLAUDE.md for reasoning it no longer carries; both now point at the record that does. Verified: scc validate --checks — 11 validators, 0 findings, 1002 tests, 86.2% coverage. No Go code changed.
The reviewers ran at the maximum, and the budget is paid twice on every pull request by design: delivery.md dispatches both on every diff, not on the ones that look risky. A gate expensive enough to skip is a gate that gets skipped, and skipping one of these takes the other with it — so the point to sit at is where the chains-of-inference work still happens, not where the number is highest. One constant feeds all three harnesses: `effort:` on Claude Code, `model_reasoning_effort` on Codex, and nothing on opencode, which expresses no budget. assets.Version 35 -> 36, and the workspace's own two agent files re-scaffolded onto it.
The security reviewer reviewed the commit that lowered its own reasoning budget and asked, at medium severity, not to: effort is not verbosity there, it is the resource the job runs on — a traced path from attacker-controlled input to effect, with no checklist to fall back on. It also pointed out the change had nothing behind it, which was true. The cost argument that lowered both is about dispatching *both* on every PR at the maximum, and it does not divide equally between them. So the budget moves out of one shared constant and into each agent's own template: scc-code-review at medium, where the job is the closest thing here to checklist-shaped, and scc-security-review back at high. It is required rather than defaulted, for the reason a declined delivery gate is the word `skipped` rather than an absent key — a third reviewer added without one fails to render instead of inheriting a number nobody chose. TestReviewAgentsPinTheirEffort fails on a reviewer it has no entry for, so the table cannot silently fall behind ReviewAgents. assets.Version 36 -> 37. Also from the reviews: - docs/wiki/pages/managed-files.md gains the Headroom counter-case. The old CLAUDE.md named it and nothing else did: `rtk.ForeignBlock` detects a `headroom:rtk-instructions` block, reports it, and names `headroom unwrap <agent>` — reported and never touched, because the block belongs to Headroom. - .claude/skills/gauntlet-loop/SKILL.md told the agent twice to check four invariants in CLAUDE.md. This branch is what moved all four; the pointers now name where each one actually lives. - Four codewiki citations did not evidence the prose attached to them — `os.SameFile` is not in cli_test.go, `decode` sits outside the cited range, `command` outside the hooks range, and an ears.go range carried a claim about mdscan. scc validate only checks that a range resolves. - design/orchestration.md said both agents pin effort: high. - The plan's task 2.3 asked for six ADRs and two were written; it now says what was decided, which is that the other four already resolve to a wiki page and a second copy is the duplication this work removes. Verified: scc validate --checks — 11 validators, 0 findings, 1002 tests, 86.2% coverage; golangci-lint run 0 issues.
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 changed
CLAUDE.mdwas 96.8KB and preloaded into every request of every session. Almost all of it was a third copy of what.claude/rules/anddocs/already own, and in one place it contradicted them outright:## Commandstold a session to runmake check, while.claude/rules/project.mdsaysmakeis absent on Windows and givesgo build ./....The binary's own entry template says the methodology lives in
rules/and is never inlined, andTestScaffoldedEntryFileStaysShortholds every workspacesccscaffolds to 60 lines. This workspace was breaking the contract its own product enforces.CLAUDE.mdis now that template as rendered for Claude Code, plus the two spliced usage blocks — 95 lines, 4.9KB. The standing cost of entry file + unscoped rules goes from 131.3KB to 39.4KB per request, roughly 23k tokens.Each concern went to the one place that owns it:
.claude/rules/*— untouched, it already owned this.claude/rules/project.md— untouched, already filleddocs/wiki/pages/,docs/codewiki/,docs/adr/Extended rather than restated:
delivery-gate(the groupedcheckobject, and why flat putbuildon line 2 with its siblings on line 170),integration-boundary(the Windows dev container as the weaker boundary, one graph per scoped tree),managed-files(CarryOver, and the silent deletion it prevents),artifact-addressing(the reading surface, BM25 over regions rather than a search engine, the seal),spec-or-plan(the spec's delivery record, and why merged is not "is an ancestor of the base").New: wiki pages
note-logandrelease,docs/codewiki/packages.md, and the first two ADRs — stdlib-only dependencies, and the narrowing fromcsddwith the dev container recorded as the one item since reversed.The reviewers' effort, and why it ended up split
Asked for as "both at medium". It landed as one commit doing that, and then a second undoing half of it — the trail is deliberate, not churn.
scc-security-reviewreviewed the commit that lowered its own reasoning budget and returned changes-requested at medium severity: effort is not verbosity there, it is the resource the job runs on — a traced path from attacker-controlled input to effect, with no checklist to fall back on — and the change had no measurement behind it. That was correct.The cost argument is still real (both reviewers are dispatched on every PR, not on the risky-looking ones), but it is about running both at the maximum and does not divide equally between them. So the budget moved out of one shared constant into each agent's own template:
scc-code-reviewmedium,scc-security-reviewhigh. It is required rather than defaulted — a third reviewer added without one fails to render instead of inheriting a number nobody chose.assets.Version35 → 37.Verification
scc validate --checks— 11 validators, 0 findings, 1002 tests, 86.2% coverage (floor 86).golangci-lint run— 0 issues. No Go behavior changed beyond the effort rendering.Review verdicts
Both reviewers ran on both halves. Four reports, all recorded here:
scc-code-reviewscc-security-reviewWhat the code reviewer found on the fold, and what was done:
CLAUDE.mdnamed it and nothing else did.docs/wiki/pages/managed-files.mdnow carries it:rtk.ForeignBlockdetects aheadroom:rtk-instructionsblock, reports it, and namesheadroom unwrap <agent>— reported and never touched, because that block belongs to Headroom..claude/skills/gauntlet-loop/SKILL.mdtold the agent twice to check four invariants inCLAUDE.md. This branch is what moved all four; the pointers now name where each lives.os.SameFileis not incli_test.go,decodesat outside the cited range,commandoutside the hooks range, and anears.gorange carried a claim aboutmdscan.scc validateonly checks that a range resolves, which is exactly the gap. Fixed.The security reviewer confirmed on the fold that
~/.sshis not mounted into the dev container, that both spliced blocks are byte-identical, and that no safety instruction was lost — the attribution rule still lives in.claude/rules/delivery.md, untouched.Its one standing caveat, not fixed and recorded rather than silently dropped:
scc-code-reviewat medium has no measurement behind it either. The argument for it is that its job is checklist-shaped — a task list, a test run, a linter — against the security reviewer's, which is not. That is reasoning, not evidence. A before/after on past PRs with known findings is what would settle it.Plan
plans/claude-md-dedup.md, all ten tasks ticked.