Uh oh!
There was an error while loading. Please reload this page.
docs(pm-dispatch): collapse CLAUDE.md's four excerpts to rule, hook and anchor - #14855
Merged
Conversation
…+ anchor Each of the four hand-copied excerpts becomes one rule sentence, the enforcing hook and its override switch, and a pointer to the AGENTS.md heading that carries the full rule. The charter sentence now says each rule is inlined as one sentence rather than that the rules are inlined. Both measured drifts go with the narratives they lived in: the "AGENTS.md §9" pointer (the shared-refs rule lives in the unnumbered preface of "Multi-agent working discipline", not in a numbered section) and the "~18 merges in a working day" figure the AGENTS.md anchor does not carry. Incident narratives, command blocks and statistics stay in AGENTS.md, which is where they are maintained. 86 -> 36 lines. The four headings are byte-identical so greps that name them keep working; the ratchet ceiling is not touched. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
os-zhuang
approved these changes
Sep 3, 2026
os-zhuang
marked this pull request as ready for review
September 3, 2026 08:54
os-zhuang
enabled auto-merge
September 3, 2026 08:54
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Part of #14685
Part of #13597
Item 3 of decision batch 3, ruled B. Verbatim from ruling comment 5520452691:
Governed surface (
CLAUDE.md): this PR stays draft, no reviewers requested, no ready flip, no enqueue. The dispatching seat runs contract review and then requests human review.Scope
One file: the repo-root
CLAUDE.md. Nothing else in the tree is touched.AGENTS.md, the hooks and objectui'sCLAUDE.mdare explicitly out of scope for this flight.Counts
Token convention is
ceil(utf8 bytes / 4)— the conventionscripts/check-skills-token-ratchet.mjsdeclares asTOKEN_CONVENTION(line 184), used here so the number is comparable with the published-skill ledger even though this file is not in that ledger.CLAUDE.mdWhole-PR total is the same row: one file changed. Line ratchet ceiling for
CLAUDE.mdstays 86 — not edited here (the re-lock is a separate pass after all four flights).Site by site
Line numbers on the left are
origin/mainatf3ae441fa2, where the file was 86 lines.:1-6:8-21ghinvocation, the "burn the same hours twice" narrative and the "implemented twice in one morning" incident; one clause now states there is no hook; pointer added:23-42git worktree addrecipe and the fail-open/precedence commentary; both hooks andOS_ALLOW_MAIN_EDITS=1kept on one line; pointer added:44-71refs/stashis in the common.gitdir, one shared LIFO stack,popreports success); dropped the fenced replacement recipes, the four-ref-namespace enumeration and the incident narrative; hook,OS_ALLOW_STASH=1and the self-test kept on one line; pointer added:73-83:85-86Four
##headings are byte-identical toorigin/main— verified withdiffovergrep '^## 'on both sides, so any grep or tooling that names a heading keeps working. Repo-wide grep for each heading text finds onlyCLAUDE.mditself, so no script or hook reads them today.The two ruled drift fixes
refs/remotesfact it pointed at lives in the unnumbered preface of## Multi-agent working discipline, not in any numbered section;§9resolved to nothing. The pointer is now spelled by heading text. Therefs/remotesfact itself stays inAGENTS.md, which is where it is maintained.mainin a working day". A statistic theAGENTS.mdanchor does not carry (the anchor row says "three PRs raced the same table inside one afternoon"). It left with the narrative it lived in; nothing inCLAUDE.mdnow states a merge-rate figure.Every pointer resolves
Measured at this PR's head with
grep -ninAGENTS.md. Headings are cited by text, never by line number; the lines below are evidence, not the pointer.CLAUDE.mdAGENTS.mdmatch at head380:## Multi-agent working disciplineand459:**Claim the issue BEFORE you write any code.** Assign it to yourself191:## Prime Directivesand241:11. **Worktree-first — never edit on the shared `main` checkout.**380:## Multi-agent working discipline; the rule is that section's opening paragraph,385:**⛔ `git stash` is the sharpest thing the worktree does NOT isolate — never run a barecontent/docs/releases/row721:## Documentation Guardrailsand ``726:Every hook named exists
ls .claude/hooks/at head:.claude/hooks/guard-main-checkout.sh— its header line 3 reads "Blocks Edit / Write / NotebookEdit unless the file being edited lives in a dedicated ...";OS_ALLOW_MAIN_EDITSat:23..claude/hooks/guard-main-checkout-bash.sh—OS_ALLOW_MAIN_EDITSat:95..claude/hooks/guard-shared-stash.sh—OS_ALLOW_STASHat:70..claude/hooks/guard-shared-stash.selftest.sh— referenced as "its.selftest.sh".Gates
Derived at the final head, quoting the derivation line:
All runs below are at head
94f328e8ff(aftergit merge origin/main, no rebase). Exit codes captured by redirect before any pipe.pnpm check:pm-skill-ratchet(line ratchet)✓ check-skill-line-ratchet: CLAUDE.md is 36 lines (ceiling 86; headroom 50).and✓ check-skill-line-ratchet: CLAUDE.md: widest table row is 0 bytes (pin 0; headroom 0).pnpm check:agent-test-spelling✓ check-agent-test-spelling: 0 violations — 430 file(s) · 5704 bare `--` token(s) · 1381 launcher-rooted run(s) · 9 separator(s) JUDGED · 5 vitest-backed script name(s) derived from 81 manifest(s)pnpm check:pm-governed-merges✓ check-governed-merges --self-test: 241 assertions (...)pnpm check:skill-frame-sync✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 filesnode scripts/check-skills-token-ratchet.mjs --self-testthen the scan)✓ check-skills-token-ratchet: 36 authored bundle file(s) within their ceilings; 11 generator-owned file(s) measured, not ratcheted.pnpm check:nul-bytescheck-nul-bytes: OK (scanned 8072 text file(s) -- 8072 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).pnpm check:role-wordcheck-role-word: OK, no new occurrences of the reserved word.pnpm check:corpus-claim-driftcheck-corpus-claim-drift: OK, no new claim sites beside a pinned spelling.Also run outside any gate, since the file was edited:
grep -naPfor raw ASCII control bytes overCLAUDE.md— no match (exit 1).NOT MEASURED, and why
CLAUDE.md. It reports36 authored bundle file(s), all underskills/**;grep -c CLAUDE.mdover its full output is0. Its green says nothing about this file. The token numbers in the counts table above are computed by hand under the same convention, not read from this gate.check:role-wordandcheck:corpus-claim-driftdo not readCLAUDE.mdeither. Both print their own population:Scanned: 224 .md/.mdx file(s) read across 2 root(s) — content/docs 190, skills 34. The repo root is not one of those roots. They are green and they are green about other files; they are listed because the flight brief named them, and they are reported here as not measuring this change.pnpm lintrun. ESLint's population is JS/TS; this PR changes one Markdown file and adds, removes or moves no code, so no ESLint judgement about any file can change. Reported as a narrowing, not as a pass.dispatch-gatesis CI's to run.Judgement calls
refs/remotessub-fact leftCLAUDE.mdwith the stash narrative. It was a parenthetical inside the C4 excerpt (the one carrying the§9drift), not one of the four rules. Under B it collapses out; it is unchanged inAGENTS.md.AGENTS.mdanchor row.⛔and the "(AGENTS.md Prime Directive Migrate documentation site to Fumadocs with monorepo structure and shared content #11)" suffix on the worktree heading, which is accurate at head.🤖 Generated with Claude Code
https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1
Generated by Claude Code