Skip to content

Commit 5188e7f

Browse files
docs(pm-dispatch): the Writes: line names the relay as the only GitHub write path and bans GitHub MCP writes by name; the card thread's opening message carries it verbatim; contract review notes a PR not authored by the fleet bot (#25474)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DArLC1mq7jXYPE9impmGwHb)_ Fixes #25457 Clause-②: no Metadata-protocol: none ## 维护者速读(草稿) - **改了什么**:把您 2026-10-23 14:43Z 的话「在每张卡的派发令里写明『PR 只经中继 `pr_create` 开,禁用 MCP』」写进 pm-dispatch 四个细则文件。① 派发令的 `Writes:` 行现在点名:PR 只经中继 `pr_create`,评论/标签/正文只经中继写工具;⛔ GitHub MCP 写工具逐个点名(`create_pull_request`、`update_pull_request`、`issue_write`、`add_issue_comment` 等);多仓项目线程不加载仓库 `settings.json` 的 deny,这一行就是唯一防线。② 卡线程开场消息里的派发令必须逐字带这条 `Writes:` 行。③ 契约复核记录多一笔:PR 作者不是 `objectstack-fleet[bot]` 时,③ 注点名该登录名(脱中继写),席位落地前先读到。④ 顺带把 `coordinator.md` 车道归属那两行改成和 #25427 写的无条件接管一致:座位贴 🟢 写着别的账号就是车道已有主,⛔ 不坐别席,但维护者改写项目指令行即按 `project-forms.md` 接管(含在飞卡)。 - **为什么改**:实测 #25427 由卡线程经 GitHub MCP `create_pull_request` 开出,作者变成个人登录名而不是车队 bot;原因是以多个检出为根的项目线程不加载 `objectstack/.claude/settings.json`,仓库里的 MCP 写禁令与 PreToolUse 守卫在那里失效,技能文本是唯一防线。原 `Writes:` 行只说「只走 REST 代理」,没点名 `pr_create`,也没按名禁 MCP 写工具。 - **风险与代价(含回滚)**:纯规则文本,不碰代码与门禁逻辑;`execution-duties.md` 188/188(+3 −2,两行合一行付账)、`contract-review.md` 54→55/60(+1)、`dispatch-runbook.md` 与 `coordinator.md` 就地改行、行数不变;无上限抬高;一次 revert 可回。要您知道的一处:`coordinator.md` L12–13 原文「另一项目在飞卡由其席跟完,其收班简报在即可坐」与 #25427 的「接管不等撞墙账号」相抵触,本 PR 按席位复核记录 6368204690 ③-1 的建议改写:默认仍由原席跟完在飞卡,只有您改写指令行时才无条件接管。 - **席位意见**:(席位复核后填) - **你要做的(一个动作)**:无。您 14:14Z 已在席位线程授权「后续按 pm-dispatch 规则审核通过的都可以落地」;本 PR 在 #25422 合入、合 main 后由席位复核 PASS、CI 全绿即落地。环境级设置(禁 MCP 写、放行中继命令)仍是您亲手改,不在本 PR。 ## What changed Four files under `.claude/skills/pm-dispatch/references/**`, rule text only, every edited line at or under 120 bytes, no ceiling row moved. | File | Before | After | |:--|:--|:--| | `execution-duties.md` 派发 (187 → 188, ceiling 188) | L130 「派发令恒带 `Writes:` 行:只走 REST 代理、写预算(端点清单)、`mcp_calls` 计数,dev 两数都报」 | Three lines in its place: the `Writes:` line names the relay's `pr_create` as the only PR path and the relay write tools as the only path for comments, labels and body edits, and still asks for both counts; a ⛔ line names the GitHub MCP write tools (`create_pull_request`, `update_pull_request`, `issue_write`, `add_issue_comment`, …); a third line says a multi-repo project thread does not load the repo's `settings.json` deny, so the `Writes:` line is the only guard, and defines the two counts (write budget, `mcp_calls`). Paid in the same file: the two 派发词 lines at L121–L122 merged into one (116 bytes) keeping increments only, ⛔ no whole-body paste, the dev reading the full card and every comment, the dev's own completeness check, and the runbook pointer | | `dispatch-runbook.md` 〈卡线程〉 (241, net 0) | 「派发令由 coordinator 写进卡线程开场消息,⛔ 不落共享目录;卡上派发评论留一行指针」 | 「…写进线程开场消息,`Writes:` 行逐字在内,⛔ 不落共享目录;卡上留指针」 (in place, 119 bytes) | | `contract-review.md` 复核归属与资格 (54 → 55 on the merged head, ceiling 60) | ①②③ items | +1 after ③: a PR whose `user.login` is not `objectstack-fleet[bot]` gets a ③ note naming that login (an off-relay write), read by the seat before landing. Placed in `contract-review.md` rather than `review-checklist.md` (77/77, no headroom) | | `coordinator.md` 一、车道归属 (49 lines, net 0; the file carries no CEILINGS row) | L12 「一条车道恒归一个项目:车道任一座位贴 🟢 标着另一项目 ⇒ 车道已有主,⛔ 不坐别席」; L13 「仲裁者是座位贴,⛔ 不是项目记忆;另一项目在飞卡由其席跟完,其收班简报在即可坐」 | L12 「一车道归一项目:座位贴 🟢 写他账号 ⇒ 车道已有主;仲裁者是座位贴,⛔ 不是项目记忆」; L13 「⛔ 不坐别席,另一项目在飞卡由其席跟完;维护者指令行改写 ⇒ 按 `project-forms.md` 接管」 (both in place; the seat's review record 6368204690 ③-1 on #25427 asked for this alignment, and the claim on the card names it) | Acceptance reads on this head: `git grep -n 'create_pull_request' -- .claude/skills/pm-dispatch` → one hit, `execution-duties.md` L130, the ⛔ line. `git grep -n 'os-bill\|hotlong\|os-elon-musk' -- .claude/skills/pm-dispatch/references/` → no hit. ## Line budget | File | Lines | Ceiling | Net | |:--|--:|--:|--:| | `references/execution-duties.md` | 188 | 188 | +1 (+3 −2) | | `references/dispatch-runbook.md` | 241 | 241 | 0 (1 edited in place) | | `references/contract-review.md` | 55 | 60 | +1 | | `references/coordinator.md` | 49 | (no ceiling row) | 0 (2 edited in place) | `SKILL.md` untouched (318/318). Widest edited line 119 bytes (`coordinator.md` L12, `dispatch-runbook.md` L140). `scripts/pm/check-skill-line-ratchet.mjs` untouched: no file shrinks and none passes its ceiling. ## Gates Head `684b081c` = content commit `5ea4c1c` + merges of `origin/main` after #25427 (`c246fb07`) and #25422 (`a7da5b92`) + the ③-1 line (`684b081c`). The head's check-runs are the record: on `a7da5b92` all 35 check-runs completed, 25 `success` and 10 `skipped`, none failed (`Lint & Repo Gates`, `TypeScript Type Check`, `Governed Surface Queue Guard` all `success`); the contract review record on that head is comment 6370282626 (PASS). Locally on `684b081c`, each exit code captured before any pipe: `pnpm check:pm-skill-ratchet` ✓ (`execution-duties.md` 188/188, `dispatch-runbook.md` 241/241, `contract-review.md` 55/60; no line over 120 bytes), `pnpm check:pm-skill-id-lint` ✓, `pnpm check:skill-frame-sync` ✓, `pnpm check:skill-frame-freshness` ✓, `pnpm check:pm-governed-prose` ✓, `node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD` ✓. On the content commit, `dispatch-gates.mjs --commands` derived 17 commands, 17 run, 17 × exit 0 after `pnpm install --frozen-lockfile` and a build of `@objectstack/formula` + `@objectstack/lint`, reconciled with `--ran`. No published package moves (`.claude/**` only), so `skip-changeset`. ## Ordering and open PRs - Lands after #25422 (card #25414), which edits `dispatch-runbook.md` 〈巡查常设项〉/〈分诊两级盘点〉 (L39–L50, L64–L71) and `contract-review.md` 独立性对/落地前检 (L35–L41). This PR's hunks are `dispatch-runbook.md` L140 and `contract-review.md` L29, outside those; `main` is merged in here once #25422 lands, before the seat's review. - #25427 (card #25412) was in the merge queue at this push; its `project-forms.md` is what `coordinator.md` L13 now points to, and `main` is merged in once it lands too. - Tier: `CONTRACT_REVIEW_TIER` (`dispatch-gates.mjs --tier` on `.claude/skills/pm-dispatch/**`: "MANDATORY", as the claim records; governed rule text under `contract-review.md` 档随面定). ## Acceptance notes - The body's first line is the HTML-comment attribution block the project session requires; `os-dev.md` 〈干净收尾〉 forbids HTML comments in GitHub text. Reported as a deviation, not hidden. - `execution-duties.md` L121's merge keeps every clause of the two old lines (the completeness check was restored at the reviewer's ③-1 spelling in `684b081c`). - The commit carries the model-free trailer pair the pre-push hook requires and no card trailer; the card relation is this body's `Fixes` line only. - Opened through the fleet-write relay `pr_create` (the rule this PR writes), so the author is `objectstack-fleet[bot]`; every later write to this PR goes through the relay too. - Governed surface `.claude/**` (Tier S): draft, awaiting the seat's `CONTRACT_REVIEW_TIER` review after the `main` merge; landing by the seat under the maintainer's 14:14Z standing word in the seat thread; ⛔ not to be flipped ready, queued or armed by this thread. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01REirBR5H4pfZ96C61mK6Uj --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent bf5855b commit 5188e7f

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎.claude/skills/pm-dispatch/references/contract-review.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
有行必校,缺行旧记录不改判。
2727
- ① derived judgments 逐项:diff 引出的接受集与公开面变化逐条点名判对错。
2828
- ② semver 定级与 changeset 声明一致;③ 边界旗:dev 挂旗与 `open_questions` 逐旗答复或升级。
29+
- 另记作者:PR `user.login` 非 `objectstack-fleet[bot]` ⇒ ③ 注点名该 login(脱中继写),落地前读。
2930
- 复核形状:只读 diff 与卡片,check 结论取 head 的 check-runs,⛔ 永不本地重跑派生门禁族。
3031
- 只喂卡片、既有裁决与 PR 本体,⛔ 不喂派发令与派发席自己的结论;简报写成对抗性。
3132
- 简报从 `node scripts/pm/record-recognisers.mjs --brief-template` 起稿:

‎.claude/skills/pm-dispatch/references/coordinator.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
- 项目管哪些车道只由项目指令声明;每条车道开一个席位线程,坐该车道空着的座位贴。
1111
- 席位线程在贴的说明段写「由 X 账户的项目负责」;贴协议与互斥照 `seat-lifecycle.md`。
12-
- 一条车道恒归一个项目:车道任一座位贴 🟢 标着另一项目 ⇒ 车道已有主,⛔ 不坐别席。
13-
- 仲裁者是座位贴,⛔ 不是项目记忆;另一项目在飞卡由其席跟完,其收班简报在即可坐。
12+
- 一车道归一项目:座位贴 🟢 写他账号 ⇒ 车道已有主;仲裁者是座位贴,⛔ 不是项目记忆。
13+
- ⛔ 不坐别席,另一项目在飞卡由其席跟完;维护者指令行改写 ⇒ 按 `project-forms.md` 接管。
1414

1515
## 二、跨车道取卡(coordinator 每次唤醒读)
1616

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
- 卡线程交回或其 PR 合入,席位当即告知 coordinator 释放槽位。
138138
- 请 coordinator 开线程附维护者原话消息:它只凭维护者明言设线程的 model 与 effort。
139139
- 席位留认领文本、派发令、契约复核、ACCEPT 与落地;线程实施、开 draft PR、驱动 CI。
140-
- 派发令由 coordinator 写进卡线程开场消息,⛔ 不落共享目录;卡上派发评论留一行指针。
140+
- 派发令由 coordinator 写进线程开场消息,`Writes:` 行逐字在内,⛔ 不落共享目录;卡上留指针。
141141
- coordinator 开线程即读线程分支交席位(读不到则线程自报);⛔ 线程不认领、不写 assignee。
142142
- 席位写 assignee+`pm:dispatched`+带该 `Branch:` 的认领;线程核对最新认领指向本分支方开工。
143143
- 分支约定仍是 `claude/issue-<n>-<slug>`;线程只能推指定分支是实测平台例外,认领如实写。

‎.claude/skills/pm-dispatch/references/execution-duties.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,17 @@
118118
- S 机械 `medium`;M `high`(默认);L/XL/`security`/p1/契约复核/四轴分析 `xhigh`;`max` 凭维护者点名。
119119
- 解析顺序、pin 语义与允许名单回退陷阱以 os-dev 定义 frontmatter 注释为权威。
120120
- 分诊 suggestion 行是输入不是决定,不采纳给理由。
121-
- 派发词 ⛔ 默认不整段粘贴 issue 正文:让 dev 自己读全文与全部评论并自查正文完整性。
122-
- 派发词只带增量,构造细则与条款原文见 `references/dispatch-runbook.md`。
121+
- 派发词只带增量,⛔ 不整段贴卡正文;dev 自读全文与评论、自查完整(`dispatch-runbook.md`)。
123122
- 派发词引卡片的精确断言(schema 臂、判据、原文)一律逐字,⛔ 不释义转述。
124123
- 三分区:裁决(不可重裁)/ PM 机制假设(须实测,鼓励证伪)/ PM 建议的路线(可选,实测优先)。
125124
- 凡我觉得可以这样的一律降到第三区;⛔ 不把假设写成裁决。
126125
- 标准非协商条款 ⛔ 不抄进派发词:hook 已机械强制段与 os-dev.md 已载通用段砍掉。
127126
- ⛔ 不砍卡类特有约束:ADR 类 draft-only、tier 推导引用、棘轮实况、释义纪律。
128127
- 无条件条款只住角色文件,冲突时它胜、错了修那里,⛔ 不靠派发词临时覆盖。
129128
- 终报要求随派发词带一句:只收机器可核字段(gates / line_budget / deviations / files_changed)。
130-
- 派发令恒带 `Writes:` 行:只走 REST 代理、写预算(端点清单)、`mcp_calls` 计数,dev 两数都报。
129+
- 派发令恒带 `Writes:` 行:PR 只经中继 `pr_create`;评论/标签/正文只经中继写工具;两数都报。
130+
- ⛔ GitHub MCP 写:`create_pull_request`、`update_pull_request`、`issue_write`、`add_issue_comment` 等。
131+
- 多仓项目线程不加载仓 `settings.json` deny,此行即唯一防线;两数 = 写预算与 `mcp_calls`。
131132
- 清单、路径、行号在派发那一刻从树上取,⛔ 不从卡片/上次派发/记忆抄。
132133
- 门禁清单取 `dispatch-gates --commands --repo 仓` 逐条跑,退出码先落盘,`--ran` 对账;被拒即手推。
133134
- 点名单是线索不是规格,dev 对实际改动重取补跑;行级断言转述前必须自己重验。

0 commit comments

Comments
 (0)