Repository navigation
Commit a4d8755
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments