Skip to content

Commit a4d8755

Browse files
docs(pm-dispatch): teach the seat the PR-body issue_patch door (#31049)
<!-- claude-projects-attribution: {"github_login":"huangyiirene"} --> _Requested by **Irene** · [project thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67xPCPg8gbSaRft4VRh8JPDxV)_ Fixes #29285 Clause-②: no Metadata-protocol: none `dispatch-gates --tier` reads `MANDATORY: claude-fable-5-1`, from clause ① (the pm-dispatch `SKILL.md` main file). This card ran on the project's default model: that mandate is waived by the maintainer's standing order in this project (2026-11-03), and the dispatching seat runs the contract review. ## 维护者速读 - 改了什么:席位改写 PR 正文的门写进技能:整篇经 `dispatch.mjs` 的 `issue_patch` 送,末个非空行署 `<!-- signed: … -->`,不送页脚。 - 为什么改:#29145 已给工具开了这扇门,技能却没提;席位不知道有门,或照首行署名去写,被工具拒。 - 风险与回滚:只改内部 agent 规程文字(`.claude/**`,不发包,无 changeset);回滚即 revert。 - 行账:两文件净增行 0(319 / 88 行不变);新行 120 字节,删一行重述付账;SKILL.md L313 在围栏内,+116 字节。 - 先看:`seat-post-protocol.md` L31,对照 `scripts/pm/fleet-write/dispatch.mjs` 头注〈A pull request's body〉。 - 需要你做的:无,席位落地。 ## What changes **`.claude/skills/pm-dispatch/references/seat-post-protocol.md`** owns the door: - New L31, directly under the first-line signature rule (L30, unchanged): `PR 正文末非空行署 <!-- signed: LANE#N · ACCOUNT · SESSION -->,整篇经 dispatch.mjs 的 issue_patch。` It is the PR-body exception to L30. It spells the trailer once and names the door: the whole body, sent as `issue_patch` through `scripts/pm/fleet-write/dispatch.mjs` (the only `dispatch.mjs` in the repo, named bare the way `rest-channel.md` L16 names it). Every seat rewrite of a PR body reaches this line, not only the `Skills-docs` one. The exit codes (an issue target exits 2, an unread target 3) stay in the header of the tool the line names, so they cannot be read as `post-stamped.mjs`'s. - Paid by deleting old L35 `收班默认交回(〈交接收尾清单〉第 2 步);留守只剩已 ACCEPT 待队列或待人批的 PR。`, a restatement. Its two facts still live elsewhere: the default hand-back is this file's 〈交接收尾清单〉 step 2 and `seat-lifecycle.md` L38 (收班 = … `Release:`+`Resume-from:` 回队); "staying behind only for ACCEPTed PRs waiting on the queue or a human" is `seat-lifecycle.md` L44, almost word for word. The next line lost its antecedent, so `这些` was deleted from it (deletion only): `留守写面 = 简报点名的 PR,…`. **`.claude/skills/pm-dispatch/SKILL.md` L313** (the claim template's `Metadata-protocol:` row): after "rewrites `owed — FILES` to `#N` before ACCEPT" it now points to that line, ", through the PR-body line of `references/seat-post-protocol.md`, with no footer (`references/platform-readings.md`)". It spells neither the door nor the trailer. Measured on `main` at `5cb7d7ec`: - `scripts/pm/fleet-write/dispatch.mjs` header, 〈A pull request's body, rewritten by the seat after round 1 — signed on its LAST line〉: an `issue_patch` body that opens with no signature passes when its LAST non-empty line is `<!-- signed: LANE#N · ACCOUNT · SESSION -->` (`PR_BODY_TRAILER_SHAPE`, L758). - `readPullRequestTargets` (L857): one `GET /repos/{repo}/issues/{n}`. A 200 answer with a `pull_request` key passes. A 200 without one is an issue, which exits 2. Any other answer is unread, which exits 3. The read runs before the dry-run exit (L3726–3750), so a dry run refuses what a send would. - `ops.mjs` `issue_patch` (L2092): `PATCH /repos/{repo}/issues/{n}` with the `body` key as given, so the whole body is sent and stored. - The header's own footer note ("an edit of a pull's body gets the bare footer block appended after the trailer … so send no footer of your own") points to `platform-readings.md` L336–341 (改侧不送页脚). The skill points there and does not restate it. ## Line budget (`scripts/pm/check-skill-line-ratchet.mjs`) | File | Lines (main → head) | Ceiling | Bytes (main → head) | |---|---|---|---| | `SKILL.md` | 319 → 319 | 319 | 32,113 → 32,229 | | `references/seat-post-protocol.md` | 88 → 88 | 88 | 7,151 → 7,156 | - `seat-post-protocol.md`: L30 118 B (unchanged); new L31 120 B; L36 119 → 113 B. Every line is ≤ 120 B. - `SKILL.md` L313: 634 → 750 B. The line is inside the claim template's ```` ```text ```` fence, the ratchet's `fence` exemption class, so it is not under the 120 B cap and adds no line. No gate prices those 116 bytes, so they are stated here rather than paid. ## Left for follow-up card #31050 These are outside this card's file surface, so this PR does not touch them. The seat filed them together as #31050: - `references/rest-channel.md` L16 says "直调 `dispatch.mjs` 仅落地", and SKILL.md L87 puts landing after ACCEPT. The `owed → #N` rewrite happens before ACCEPT, and `dispatch.mjs` is the only door that takes a trailer-signed body, so L16 needs a carve-out for the PR-body rewrite. This PR does not settle that conflict. - Two other seat rewrites of a PR body don't point to the door yet: `references/platform-readings.md` L290 (席位改正文记下 flake 理由) and `.claude/agents/os-dev.md` L66 (事后要改的报告点名改法,席位代写). - `scripts/pm/check-handover.mjs` L33 cites the sign-off hand-back rule as `seat-post-protocol.md` 收班. That was the line this PR deletes. The fact survives in `seat-lifecycle.md` L38/L44, so the citation should point there. `references/review-checklist.md` L18 (`follow-up owed` 立卡改 `#N`) needs nothing: the spelling of that rewrite lives in the claim template (`os-dev.md` L278, 拼法与分工住认领模板), which now points to the door. ## Verification <details><summary>Local gates on 3bf1c6a: 20 derived, 20 run with exit 0, 0 NOT MEASURED (`dispatch-gates --ran`)</summary> - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 20 commands for the 2 changed files. All ran after `pnpm install --frozen-lockfile` and `turbo run build` for `@objectstack/formula`, `@objectstack/lint` and `@objectstack/objectql` (exit 0). Each ran under a 900 s timeout with `NODE_OPTIONS=--max-old-space-size=8192`, and its exit code was captured before any pipe. - All 20 exited 0. They include `check:pm-skill-ratchet`, `check:pm-skill-id-lint`, `check:skill-frame-sync`, `check:pm-governed-prose`, `check:pm-governed-merges`, `check:doc-authoring`, `check-comment-mask-corpus.mjs`, and the self-tests of `check-governed-queue-guard.mjs`, `check-harness-current.mjs` and `check-closing-keyword-parity.mjs`. - Also run: `pnpm check:pm-settings-deny-roster`, exit 0. - `--ran` printed: `20 derived famil(ies) accounted for — 20 run, 0 NOT-MEASURED (a DERIVED zero — all 20 recorded an exit code and none of them is 3)`. - `node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD`: exit 0 before the push. </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema touched.) - [x] 2. Every name I added uses the casing for its kind. (No names added.) - [x] 3. No formatter ran. (Markdown only, so no lintable source was touched and `pnpm lint` was not run.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. Nothing publishes (`.claude/**` only), so the PR takes `skip-changeset`. Both declaration lines are filled in above. - [x] 6. `packages/spec` not touched; nothing to regenerate. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. (The 维护者速读 section is Chinese, per the lane template.) - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01J8VVAjKGU4frHVdMwKRkfn <!-- signed: domain:skills#3 · huangyiirene · session_01J8VVAj7CvjkGXvgXzd6RZ7 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e1dac19 commit a4d8755

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎.claude/skills/pm-dispatch/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ Seat: `domain:<x>#<n>` (the seat number this PM sits on; absent = seat 1)
310310
File surface: `<预期触碰的目录>` (stop on breach; explain in the report)
311311
Container & model: `<S 级机械卡 / M / L>`, `mode:subagent | mode:cloud | mode:thread`, `model: <档位词,引当次 --tier 输出;天花板拼 CONTRACT_REVIEW_TIER,同行引其 MANDATORY 路径行或 reason:(逐卡裁决,或常设档位令的 id 与时刻);⛔ 不抄模型 id>`, `effort: <medium | high | xhigh | max,按卡难度定>`
312312
Clause-②: yes | no
313-
Metadata-protocol: added | narrowed | semantic | none (the kind of change to what a metadata author can write; the level table is AGENTS.md's Post-Task Checklist step 3; the dev copies it beside `Clause-②:` into the PR body and every changeset body; a kind other than `none`, or a `(narrowing)` arm, owes the PR body a third line the dev writes from the diff: `Skills-docs: updated here | follow-up owed — FILES | follow-up #N | none — REASON`; `updated here` = this diff teaches it in `skills/**` or the docs and the package's evals exercise it; the seat files the owed card and rewrites `owed — FILES` to `#N` before ACCEPT)
313+
Metadata-protocol: added | narrowed | semantic | none (the kind of change to what a metadata author can write; the level table is AGENTS.md's Post-Task Checklist step 3; the dev copies it beside `Clause-②:` into the PR body and every changeset body; a kind other than `none`, or a `(narrowing)` arm, owes the PR body a third line the dev writes from the diff: `Skills-docs: updated here | follow-up owed — FILES | follow-up #N | none — REASON`; `updated here` = this diff teaches it in `skills/**` or the docs and the package's evals exercise it; the seat files the owed card and rewrites `owed — FILES` to `#N` before ACCEPT, through the PR-body line of `references/seat-post-protocol.md`, with no footer (`references/platform-readings.md`))
314314
Responsibility: `<whose code produces the risk, and the repo it lives in (objectstack ⇒ a platform card carries the fix, references/cross-repo-coordination.md rule 1) | the platform path that already covers it, or none | who reaches it, and whether anyone uses it today>` (defect cards and cards whose premise is a failing behaviour, else `n/a — not a defect card`; the dispatch prompt's ruling section repeats the three answers)
315315
Thread-read: <id of the newest comment on the card at the moment this claim is written, or none>
316316
Premise: holds | corrected <comment id> | inbox (the pre-dispatch premise reading, dispatch-runbook.md 派发前置)

‎.claude/skills/pm-dispatch/references/seat-post-protocol.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
- 可跑读法:本车道 `pm:dispatched` 卡按 `updated_at` 降序一搜,或读最近一条认领评论。
2929
- 写侧刷新三时刻:派发、收班、暂停或交接前;时间戳恒取自 `scripts/pm/post-stamped.mjs`。
3030
- 帖与卡正文首行恒为署名 `LANE#N · ACCOUNT · SESSION`;缺即写工具拒发(`post-stamped.mjs` 头注)。
31+
- PR 正文末非空行署 `<!-- signed: LANE#N · ACCOUNT · SESSION -->`,整篇经 `dispatch.mjs` 的 `issue_patch`。
3132
- 刷新前回执敲门;`--body` 拦截:评论晚于末次戳 ⇒ `--ack-through=ID`;空座欠账无卡号 ⇒ 拒写。
3233
- 耐久状态只住正文或以 App 写入;正文守中继上限 60,000 字节,超大贴由半状态巡查浮出。
3334
- 协议升级迁移状态、或巡检发现正文不符时,当场改正文 + 审计评论。
3435
- Routine 座位的收尾简报也落自己的座位贴,它是下一轮自退守卫的读数。
35-
- 收班默认交回(〈交接收尾清单〉第 2 步);留守只剩已 ACCEPT 待队列或待人批的 PR。
36-
- 留守写面 = 简报点名的这些 PR,残余定时器同界;留不了才热移交:收单注记 + 点名看护者。
36+
- 留守写面 = 简报点名的 PR,残余定时器同界;留不了才热移交:收单注记 + 点名看护者。
3737
- 收单注记写评审判据、落地步骤与当前状态;看护只守落地,⛔ 评审判断不可外包。
3838
- 看护者默认下任座位;在跑云会话经 poke 触发器投递,⛔ 非 `SendMessage` 直投。
3939
- 收班序列不看维护者措辞:`check-handover.mjs` 退出 0 → 刷正文与标题 → 简报最终一笔。

0 commit comments

Comments
 (0)