Skip to content

Commit 720fe14

Browse files
hotlongclaude
andauthored
docs(pm-dispatch): runbook — fast-forward local checkout before a subagent batch (#8157)
Subagent-mode dispatches run inside the PM's own container and load agent definitions and skill text from the local checkout, not origin/main. Add a short dedicated block to the dispatch runbook (reference file only; SKILL.md stays at its ratchet ceiling): before dispatching a subagent batch, run git -C <repo-root> pull --ff-only origin main (or verify HEAD equals origin/main), so a stale checkout cannot hand the whole batch outdated definitions; --ff-only makes a dirty or diverged checkout fail loudly. Claude-Session: https://claude.ai/code/session_01139NJ9Wg5pFeZi1Zh8WLg6 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9319586 commit 720fe14

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.claude/skills/pm-dispatch/references/dispatch-runbook.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ branch-early、draft-PR 时点报告、transcript 复活与 worktree 接手协
3838
roster —— `ListAgents` 列不到、`SendMessage` 直投 not-reachable 是设计而非故障(维
3939
护者 2026-08-11 裁定:事件驱动架构即长期方案),⛔ 不复测 roster 路径。
4040

41+
## subagent 批(`mode:subagent`)派发前置:先快进本地检出
42+
43+
subagent 在 PM 自己的容器内运行,agent 定义与技能文本读的是**本地检出**,不是
44+
`origin/main` —— 云卡逐卡 clone 换来的新鲜度,subagent 后端连同容器开销一起省掉
45+
了。派发 subagent 批之前,先快进本地检出:
46+
`git -C <repo-root> pull --ff-only origin main`(或核对 `HEAD` 等于
47+
`origin/main`)。检出过期,整批 subagent 拿到的都是过期的 agent 定义与技能文本
48+
(实测:os-dev 定义重写已合入 origin/main 的当天,容器检出仍停在重写前的提交,首
49+
批 subagent 加载了旧定义)。用 `--ff-only`,让脏或分叉的检出大声失败,而不是静默
50+
合并。
51+
4152
## 接手中断的 dev(worktree 接手协议)
4253

4354
先试 SendMessage 复活(从 transcript 带全部上下文恢复),resume 不可用才接手。⛔

0 commit comments

Comments
 (0)