From 7dd3aaa11b60e80f3a15eac35b7d073121c349aa Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 9 Sep 2026 14:01:06 +0000 Subject: [PATCH] docs: reduce CLAUDE.md to a pointer at AGENTS.md (objectui#8840) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLAUDE.md restated worktree-first and the stash ban with their hook roster. Both rules live in AGENTS.md 9. Operational Rules (paragraph 多 agent 协作纪律) and in .claude/hooks/, so the restatement was a second instruction set that can lag the first. It now says one thing: AGENTS.md is the source of truth, read it before your first edit. No gate required prose here: the shell-escape-residue row is a file-existence floor (0 fences before and after), check-doc-links only resolves the links the file carries, check-bash32-floor never reaches it, check-upstream-port-parity pins three ported files and CLAUDE.md is not among them, and check-governed-queue-guard still lists it as governed. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01MoTv7pn338AZ71owsp19gQ --- CLAUDE.md | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 10e01f53b7..5961a39659 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,25 +1,3 @@ # CLAUDE.md -**[AGENTS.md](./AGENTS.md) is the source of truth for working in this repo — read it.** -Its rules are binding: each of the two rules that must never be missed is inlined below as -one sentence, its enforcing hook, and a pointer to the AGENTS.md heading. - -## ⛔ Worktree-first — before your FIRST file edit - -Never edit a shared primary checkout — this repo's or any sibling repo's (`framework`, -`cloud`); its HEAD and tree move under you, and a feature branch there is not enough. 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 → **9. Operational Rules**, its -paragraph **多 agent 协作纪律**. - -## ⛔ Never `git stash` — the stash stack is NOT covered by worktree isolation - -`refs/stash` lives in the common `.git` dir, so all worktrees share one LIFO stack: your -`pop` takes another agent's entry and reports **success** — use a patch or a wip commit. -Hook `guard-shared-stash.sh` enforces it (override `OS_ALLOW_STASH=1`; re-run its -`.selftest.sh` if you change it). Full rule: AGENTS.md → **9. Operational Rules**, its -paragraph **多 agent 协作纪律**. - -See **AGENTS.md** for the rest: the JSON protocol, coding standards, how to run the tests, -the governed surface, and the merge-queue PR flow. +**[AGENTS.md](./AGENTS.md) is the source of truth for working in this repo — read it before your first edit.**