This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
docs(claude-md): collapse the two AGENTS.md excerpts to rule + hook + pointer - #7600
Merged
Merged
Conversation
… pointer CLAUDE.md carried two hand-copied excerpts of the AGENTS.md multi-agent discipline paragraph (51 lines), plus a charter line reading "the one rule" while two rules were inlined. Each section now carries one rule sentence, its enforcing hook(s) with the override switch, and a pointer to AGENTS.md → 9. Operational Rules → 多 agent 协作纪律, which holds the full rule. The worktree rule now names both wired hooks: guard-main-checkout.sh (Edit/Write/NotebookEdit) and guard-main-checkout-bash.sh (the same writes as Bash). Incident narratives, command blocks and statistics stay in AGENTS.md, where they are maintained. Both heading lines are byte-identical to the previous file, so greps that name them keep working. Shrink-only: 51 → 25 lines. AGENTS.md is untouched: a 21-point diff of both excerpts against its 多 agent 协作纪律 paragraph found no narrative, command form or incident fact that exists only here. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
os-zhuang
approved these changes
Sep 4, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #7506
Executes the maintainer ruling of 2026-09-04 (decision batch #27, objectstack#14978 item 2 → A, verbatim 「同意」; director record comment 5535783628): ruling B on objectstack#14685 item 3 is extended to objectui's
CLAUDE.md. The landed precedent mirrored here is PR objectstack#14855 (5290fcbe91).CLAUDE.mdcarried two hand-copied excerpts of theAGENTS.mdmulti-agent discipline paragraph, plus a charter line reading "the one rule" while two rules were inlined. Each section now carries one rule sentence + the enforcing hook(s) with the override switch + a pointer to theAGENTS.mdheading that holds the full rule. Both## ⛔heading lines are byte-identical to the previous file, so greps that name them keep working.Governed surface —
CLAUDE.mdis one of the five governed items inAGENTS.md§ ⛔ 受管面. This PR stays a draft for human merge: not flipped ready, not enqueued, no auto-merge armed. The guard agrees, asked directly:Size — shrink-only
CLAUDE.mdlinesCLAUDE.mdbytesgit diff --statFile surface:
CLAUDE.mdonly.AGENTS.mdis untouched — see the measurement below.Before deleting: the uniqueness diff against
AGENTS.mdThe ruling requires that any measured narrative, command form or incident fact existing only in
CLAUDE.mdmove intoAGENTS.mdin this same PR before being deleted. The two excerpts were decomposed into 21 atomic facts and each was tested for a counterpart in theAGENTS.md§多 agent 协作纪律paragraph (anchored by heading text; it resolves toAGENTS.md:243-315at this head). 21 of 21 covered, 0 unique — so nothing moved andAGENTS.mdis not touched.CLAUDE.mdAGENTS.md§ 多 agent 协作纪律framework/cloudare in scopeguard-main-checkout.shblocks Edit/Write/NotebookEditOS_ALLOW_MAIN_EDITS=1refs/stashlives in the common.gitdirectorypoptakes the other agent's entrypopreports success; symptom;git add -Amerges their workguard-shared-stash.shblocks push/pop/drop/clear, allows list/show/create and sha-pinned apply/storeOS_ALLOW_STASH=1guard-shared-stash.selftest.shafter changing the hookDirection of the containment:
AGENTS.mdis a strict superset. It carries material the excerpts never had — that the wip-commit form is the preferred one, the unreachable-commit recovery of the objectui#3430 loss, and the objectstack#7800 lesson about overwrite-then-restore recipes. Nothing was lost by deleting the excerpts; the reverse would have been true had they been kept and drifted.Out of scope, per the card and the ruling:
AGENTS.md's own omission ofguard-main-checkout-bash.shis a separate finding on the skills seat's ledger and is not addressed here. The hooks themselves and.claude/are untouched.The collapsed file, in full
Both hooks are named on the worktree rule because both are wired in
.claude/settings.json—guard-main-checkout.shat:23on theEdit|Write|NotebookEditmatcher,guard-main-checkout-bash.shat:36on theBashmatcher. The enforcing sentences are quoted from the hooks' own docblocks, not from memory: the first "Blocks Edit / Write / NotebookEdit unless the file being edited lives in a dedicated git WORKTREE"; the second "the SAME worktree-first rule as guard-main-checkout.sh, applied to file writes that arrive through Bash".Heading bytes, proved rather than eyeballed — the two
## ⛔lines extracted before and after hash the same:Gates
All verdicts below were produced on head
eb09098, the branch's only and final commit; the tree was clean at the time of every run.pnpm exec turbo run lint --concurrency=2(=pnpm lint)Tasks: 47 successful, 47 total— 0 errors repo-wide (warnings only; the workflow deliberately sets no--max-warnings)pnpm check:control-bytes✅ check-control-bytes: OK (scanned 6225 tracked text file(s); skipped 85 binary).pnpm check:doc-fences✅ check:doc-fences — every TypeScript block in 227 document(s) is fenced ts/tsx/typescript, except 80 declared file(s) carrying 90 block(s) of objectui#5867's remaining population (⛔ SHRINK-ONLY). No unknown fence spelling hides one.node scripts/check-changeset-presence.mjs✅ No source or published contract of a released package changed in this range, so no changeset is owed.(it measured1 file(s) changedagainst merge-base4bb5e1086)node scripts/check-doc-links.mjsLinks are valid across 17 scan roots.node scripts/check-shell-escape-residue.mjs✅ check-shell-escape-residue: OK (5/5 root(s) resolved -- ... CLAUDE.md: 1 file(s), 0 fence(s); ...)node scripts/check-governed-queue-guard.mjs --self-testOK check-governed-queue-guard self-test: 132 cases passnpx vitest runon the 3 suites that read the realCLAUDE.mdTest Files 3 passed (3)/Tests 151 passed (151)Exit codes were captured by redirecting to a file before any pipe, so no pipeline could rewrite them, and each row quotes the line the gate printed itself rather than a bare status.
No changeset is owed and none was added — the gate decided that, quoted above, not a judgement call: a repo-root markdown file publishes nothing from any package. ⛔ No
skip-changesetlabel was applied; objectui has no such mechanism.Four gates beyond the dispatch list were derived from the actually-changed path and run:
check-doc-links(CLAUDE.mdis one of its scan roots and the file carries a relative link toAGENTS.md),check-shell-escape-residue(CLAUDE.mdis a declared root — it now reports 0 fences there, down from 2), the governed-surface guard, and the three vitest suites that read the realCLAUDE.mdrather than a fixture (check-doc-links.test.ts,check-shell-escape-residue.test.ts,check-governed-queue-guard.test.ts).check-links.ymlrunslycheeverse/lychee-actionfor external URLs and is left to CI; the collapsed file contains no external URL.Generated by the skills lane seat, session
session_019RfFHiRCSs3JXLK4cwcfox, as a governed-surface draft: review is requested at the contract tier fromos-zhuangandhotlong, and the merge is the maintainer's.Generated by Claude Code