Skip to content

Commit 3b2a3f6

Browse files
claude[bot]claude
andauthored
docs(agents): harden the three internal worktree recipes to the canonical form (#14003)
The three internal copies that PRESCRIBE a worktree recipe to an agent still taught the unhardened spelling. Each now reads as the form AGENTS.md Prime Directive 11 and CLAUDE.md teach: `git fetch origin main && git worktree add --no-track ... origin/main`. - `.claude/skills/checklist-author/SKILL.md` - gained `--no-track` and the fetched `origin/main` base (it was the only copy still basing on local `main`) - `.claude/agents/os-dev.md` - gained `--no-track` and the fetch - `.claude/skills/dogfood-verification/SKILL.md` - gained `--no-track` and the fetch Plain `-b` writes `branch.NAME.remote`/`branch.NAME.merge` into the `.git/config` that every worktree of the repo SHARES; `--no-track` is the adjudicated fix. Each edit is byte-budget and line-count neutral, because `check:pm-skill-ratchet` binds twice here: all three files sit at ZERO line-count headroom, and every line has a 120-byte budget. So the longer recipe is reflowed within the lines the sentence already occupied rather than wrapped onto a new one - neither ratchet moves, and neither needs a maintainer ruling. No other text in these files is touched. Claude-Session: https://claude.ai/code/session_01Msg17tAHJ3jVTYFgHydCm2 Co-authored-by: Claude <noreply@anthropic.com>
1 parent fc9ba76 commit 3b2a3f6

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎.claude/agents/os-dev.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ pin 要防的失效 —— 而不是回退到本行。 -->
2929

3030
## 六条基本规则
3131

32-
1. **Worktree-first。** 任何编辑之
33-
前:`git worktree add ../<repo>-issue-<n> -b claude/issue-<n>-<slug> origin/main`,然后 `cd` 进去
32+
1. **Worktree-first。** 任何编辑之前:`git fetch origin main && git worktree add --no-track
33+
../<repo>-issue-<n> -b claude/issue-<n>-<slug> origin/main`,然后 `cd` 进去
3434
`pnpm install`,并在动笔前记下基点 `BASE=$(git rev-parse HEAD)`(「标准条款」家族规则的锚)。永
3535
不编辑共享检出(PreToolUse 钩子会拦);修复横跨姊妹仓时 **一仓一 worktree**。**建好分支后的
3636
第一个动作:先把空分支推上去**(任何编辑之前 `git push -u origin <branch>`)——它既是认领评

‎.claude/skills/checklist-author/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ metadata:
3030

3131
## 编排契约
3232

33-
1. **Worktree 先行**(PD#11):`git worktree add ../objectstack-<task> -b <branch> main`。
34-
全部编辑都在那里做。派发任何 agent 之前先读清单现状。
33+
1. **Worktree 先行**(PD#11):`git fetch origin main && git worktree add --no-track ../objectstack-<task>
34+
-b <branch> origin/main`。全部编辑都在那里做。派发任何 agent 之前先读清单现状。
3535
2. **五个只读 gap hunter 并行** —— 每个 SWEEP.md 角度一个(console UI / spec 枚举 /
3636
路由与运行时 / 内置应用 / 文档声称)。每个拿到:当前 item-id 清单、已知的 waiver
3737
与 blocked 项(不重复上报),以及输出契约 `surface | evidence path | coverage

‎.claude/skills/dogfood-verification/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ dev 工作树、dev-server 端口、preview 浏览器全是**共享的**:并行
137137

138138
- [ ] 只捕获你自己的文件:`git diff -- <explicit paths…> > /tmp/fix.patch`
139139
(用**显式路径**,不用多行 shell 变量 —— 后者会静默产出空 patch)。
140-
- [ ] `git worktree add -b <branch> /tmp/pr origin/main` → `git -C /tmp/pr apply /tmp/fix.patch`
141-
→ 确认 `git -C /tmp/pr status` *只*列你的文件。
140+
- [ ] `git fetch origin main && git worktree add --no-track -b <branch> /tmp/pr origin/main`
141+
→ `git -C /tmp/pr apply /tmp/fix.patch` → 确认 `git -C /tmp/pr status` *只*列你的文件。
142142
- [ ] 加 **changeset**(`.changeset/<slug>.md`,`"@objectstack/<pkg>": patch`)——
143143
发布包的改动过不了 CI 的「Check Changeset」门。
144144
- [ ] 提交(信息末尾带 `Co-Authored-By:` trailer)、推送、`gh pr create`,然后

0 commit comments

Comments
 (0)