diff --git a/CLAUDE.md b/CLAUDE.md index c12cabe183..1b3b6dfb2d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,41 +1,5 @@ # CLAUDE.md -**[AGENTS.md](./AGENTS.md) is the source of truth for working in this repo — read it.** -Its Prime Directives are binding: each of the rules that must never be missed is -inlined below as one sentence, its enforcing hook, and a pointer to the AGENTS.md heading. - -## ⛔ Claim the issue before you write any code - -Every agent shares one GitHub identity: the assignee field is a presence bit, the `Claim:` -comment (session ID + branch) is the identity. The session that owns a card performs both acts -— a seat picking for itself takes only an unassigned card, assigns itself and posts the claim -before any other action; a PM dispatch sets the assignee and posts the `Claim:` for its dev, who -inherits both, checks the newest `Claim:` names its branch, posts no second claim, and ⛔ never -writes the assignee or yields the card. The comments decide, not the field: a `Claim:` from -another session or branch means taken — ⛔ never reassign; a bare assignee with no `Claim:` is -a dispatch's first step, not a foreign claim. No hook enforces this one. Full rule: AGENTS.md → -**Multi-agent working discipline**, its paragraph **Claim the issue BEFORE you write any code.** - -## ⛔ Worktree-first — before your FIRST file edit (AGENTS.md Prime Directive #11) - -Never edit a shared primary checkout — this repo's or any sibling repo's (`objectui`, -`cloud`); its HEAD and tree move under you. One dedicated worktree per task, per repo. -Hooks in `.claude/hooks/`: `guard-main-checkout.sh` (Edit/Write/NotebookEdit) and -`guard-main-checkout-bash.sh` (the same writes as Bash); override `OS_ALLOW_MAIN_EDITS=1`. -Full rule: AGENTS.md → **Prime Directives**, directive 11. - -## ⛔ Never `git stash`, never kill by name — worktree isolation covers neither - -`refs/stash` lives in the common `.git` dir and the process table is one per container, neither isolated: your `pop` -takes another agent's entry, a name-matched kill takes their run, and both report **success**. Use a patch or a wip -commit; kill only a PID you recorded. Hooks `guard-shared-stash.sh` / `guard-process-kill.sh` (`OS_ALLOW_STASH=1`, -`OS_ALLOW_PROCESS_KILL=1`; re-run each `.selftest.sh`). Full rule: AGENTS.md → **Multi-agent working discipline**. - -## ⛔ Never edit `content/docs/releases/` in a code PR - -Release notes are written **centrally, at release time**, never accreted a row per PR; a -factual error there is a dedicated docs-only PR or an issue, never a rider on code changes. -No hook: your PR's input to them is its **changeset** (`.changeset/*.md`). Full rule: -AGENTS.md → **Documentation Guardrails**, its `content/docs/releases/` row. - -See **AGENTS.md** for the rest: branch hygiene, the dev stack, PR flow, the Prime Directives. +**[AGENTS.md](./AGENTS.md) is the single source of truth for working in this repo — read it in +full before your first edit.** One instruction set, maintained in one place: ⛔ no rule, hook +roster or guardrail is restated here, and none is added here later. diff --git a/scripts/pm/check-skill-line-ratchet.mjs b/scripts/pm/check-skill-line-ratchet.mjs index 5624a595fa..5d236a308a 100644 --- a/scripts/pm/check-skill-line-ratchet.mjs +++ b/scripts/pm/check-skill-line-ratchet.mjs @@ -1028,7 +1028,15 @@ export const CEILINGS = new Map([ // convention as the entries above). // 86 → 41: the ownership excerpt rewritten by role in the same rules-only pass; // re-pinned at the landed count, headroom 0. - ['CLAUDE.md', 41], + // 41 → 5: the inlined never-miss digest left the file entirely — it is now a pure + // pointer at AGENTS.md, which carries every rule it used to restate. Maintainer + // ruling 2026-09-09, verbatim and untranslated: 「其次 claude.md 是不是直接让他阅读 + // agents.md 即可,没必要维护两套。所有仓库都有类似的问题」 (program #17161, card + // #17162). A LOWERING, which needs no ruling of its own — quoted because the + // ruling is what emptied the file. Re-pinned at the landed count, headroom 0: the + // 36 lines of slack a shrink leaves behind are exactly the budget a future digest + // would re-accrete into, which is the growth this entry exists to price. + ['CLAUDE.md', 5], ]); /**