Skip to content

Commit d18b760

Browse files
os-justinclaude
andauthored
docs: CLAUDE.md becomes a pointer to AGENTS.md — the inlined never-miss digest leaves (#17168)
CLAUDE.md restated four never-miss rules (claim-first, worktree-first, the stash / name-matched-kill ban, and the releases/ ban) with their hooks — a second instruction set to keep in sync with AGENTS.md, which already carries every one of them. Each of the four was verified to survive in AGENTS.md by its own sentence before deletion, and the hooks in .claude/hooks/ are untouched: they keep enforcing what they enforce. The line ratchet's CLAUDE.md ceiling is lowered 41 -> 5 in the same commit. The gate is green either way (slack only nudges past 120 lines), but 36 lines of headroom on a file that exists to inline must-never-miss rules is exactly the budget a future digest would re-accrete into — the growth that entry exists to price. Claude-Session: https://claude.ai/code/session_01MoTv7pn338AZ71owsp19gQ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7337179 commit d18b760

2 files changed

Lines changed: 12 additions & 40 deletions

File tree

CLAUDE.md

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,5 @@
11
# CLAUDE.md
22

3-
**[AGENTS.md](./AGENTS.md) is the source of truth for working in this repo — read it.**
4-
Its Prime Directives are binding: each of the rules that must never be missed is
5-
inlined below as one sentence, its enforcing hook, and a pointer to the AGENTS.md heading.
6-
7-
## ⛔ Claim the issue before you write any code
8-
9-
Every agent shares one GitHub identity: the assignee field is a presence bit, the `Claim:`
10-
comment (session ID + branch) is the identity. The session that owns a card performs both acts
11-
— a seat picking for itself takes only an unassigned card, assigns itself and posts the claim
12-
before any other action; a PM dispatch sets the assignee and posts the `Claim:` for its dev, who
13-
inherits both, checks the newest `Claim:` names its branch, posts no second claim, and ⛔ never
14-
writes the assignee or yields the card. The comments decide, not the field: a `Claim:` from
15-
another session or branch means taken — ⛔ never reassign; a bare assignee with no `Claim:` is
16-
a dispatch's first step, not a foreign claim. No hook enforces this one. Full rule: AGENTS.md →
17-
**Multi-agent working discipline**, its paragraph **Claim the issue BEFORE you write any code.**
18-
19-
## ⛔ Worktree-first — before your FIRST file edit (AGENTS.md Prime Directive #11)
20-
21-
Never edit a shared primary checkout — this repo's or any sibling repo's (`objectui`,
22-
`cloud`); its HEAD and tree move under you. One dedicated worktree per task, per repo.
23-
Hooks in `.claude/hooks/`: `guard-main-checkout.sh` (Edit/Write/NotebookEdit) and
24-
`guard-main-checkout-bash.sh` (the same writes as Bash); override `OS_ALLOW_MAIN_EDITS=1`.
25-
Full rule: AGENTS.md → **Prime Directives**, directive 11.
26-
27-
## ⛔ Never `git stash`, never kill by name — worktree isolation covers neither
28-
29-
`refs/stash` lives in the common `.git` dir and the process table is one per container, neither isolated: your `pop`
30-
takes another agent's entry, a name-matched kill takes their run, and both report **success**. Use a patch or a wip
31-
commit; kill only a PID you recorded. Hooks `guard-shared-stash.sh` / `guard-process-kill.sh` (`OS_ALLOW_STASH=1`,
32-
`OS_ALLOW_PROCESS_KILL=1`; re-run each `.selftest.sh`). Full rule: AGENTS.md → **Multi-agent working discipline**.
33-
34-
## ⛔ Never edit `content/docs/releases/` in a code PR
35-
36-
Release notes are written **centrally, at release time**, never accreted a row per PR; a
37-
factual error there is a dedicated docs-only PR or an issue, never a rider on code changes.
38-
No hook: your PR's input to them is its **changeset** (`.changeset/*.md`). Full rule:
39-
AGENTS.md → **Documentation Guardrails**, its `content/docs/releases/` row.
40-
41-
See **AGENTS.md** for the rest: branch hygiene, the dev stack, PR flow, the Prime Directives.
3+
**[AGENTS.md](./AGENTS.md) is the single source of truth for working in this repo — read it in
4+
full before your first edit.** One instruction set, maintained in one place: ⛔ no rule, hook
5+
roster or guardrail is restated here, and none is added here later.

scripts/pm/check-skill-line-ratchet.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,15 @@ export const CEILINGS = new Map([
10281028
// convention as the entries above).
10291029
// 86 → 41: the ownership excerpt rewritten by role in the same rules-only pass;
10301030
// re-pinned at the landed count, headroom 0.
1031-
['CLAUDE.md', 41],
1031+
// 41 → 5: the inlined never-miss digest left the file entirely — it is now a pure
1032+
// pointer at AGENTS.md, which carries every rule it used to restate. Maintainer
1033+
// ruling 2026-09-09, verbatim and untranslated: 「其次 claude.md 是不是直接让他阅读
1034+
// agents.md 即可,没必要维护两套。所有仓库都有类似的问题」 (program #17161, card
1035+
// #17162). A LOWERING, which needs no ruling of its own — quoted because the
1036+
// ruling is what emptied the file. Re-pinned at the landed count, headroom 0: the
1037+
// 36 lines of slack a shrink leaves behind are exactly the budget a future digest
1038+
// would re-accrete into, which is the growth this entry exists to price.
1039+
['CLAUDE.md', 5],
10321040
]);
10331041

10341042
/**

0 commit comments

Comments
 (0)