Repository navigation
Commit e533651
docs(pm-dispatch): premise before code, batched thread requests, card threads edit their own PR body (#34630)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve**_
Fixes #34625
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:你 03:46 批准的三条流程改进写进 pm-dispatch 技能。① 先核前提再写码:区自领卡在认领前、卡线程在写码前对
main 逐条实测;不成立、偏宽或撞裁就停手报席位,由席位发 `Premise corrected` 收窄;PR 结论只写实测覆盖到的范围。②
开线程攒批:席位一条消息一线程一行(卡/PR、标题、汇报区、要读文件、续做分支),协调者一次开完、一次回全部 id;区与卡线程不直接找协调者。③
卡线程自己改自己 PR 的正文,区或席位只在线程已关时代改。
- 为什么改:这几个小时的返工多出在前提没先核;逐条开线程很费每小时约 60 条的消息额度;正文要区线程转一手。
- 风险与回滚:只改四份 `.claude/**` 规则文本(三份 pm-dispatch references 加
`.claude/agents/os-dev.md` 两行),不动代码。新增行全部在同文件里付账(删 4
行重复内容),四个文件行数上限不变。回滚即 revert。
- 先看:`references/dispatch-runbook.md`
的〈派发前置〉节与卡线程节末行、`references/coordinator.md`
第三节、`references/area-lease.md` 〈区内规则〉新增的指针行。
- 两分钟验证:`pnpm check:pm-skill-ratchet`,四个文件读 246/246、49/49、71/71、405/405。
- 需要你做的:无。Tier S(仅 `.claude/**`),L1 与达档契约复审同 head 通过后由区落地。
## What changes
Three process rules the maintainer approved at 2026-11-17T03:46:59Z (「第
2、3 、4条我现在就让席位改进命令文件,并且立卡更新 skills」) move from the seat's command files
into `.claude/skills/pm-dispatch/`. Each rule has one home; the other
files point to it.
| Rule | Home | Pointers |
|:---|:---|:---|
| A. Premise before code | `dispatch-runbook.md` 〈派发前置〉 |
`area-lease.md` 〈区内规则〉 new line; SKILL.md:326 `Premise:` claim line
(unchanged) |
| B. Batched thread requests | `coordinator.md` §三 | `area-lease.md`
〈区内规则〉 new line; `dispatch-runbook.md` 卡线程节 already points to
`coordinator.md` 三 |
| C. A card thread edits its own PR body | `dispatch-runbook.md` 卡线程节 |
`.claude/agents/os-dev.md` PR-body line and write-budget line (the card
thread reads `os-dev.md`, not the runbook) |
### Before and after, passage by passage
**`dispatch-runbook.md` 〈派发前置〉** (rule A)
| Before | After |
|:---|:---|
| 派发前前提核实由只读子代理做(下限档);卡线程卡在交候选给 coordinator 之前做。 |
先核前提后写码:派发前席派只读子代理(下限档;卡线程卡交候选前);区自领卡认领前测。 |
| — | 对 `origin/main` 逐条测:复现、根因句与 file:line、路线对
`check-prior-rulings.mjs`、适用面。 |
| — | 区与卡线程(写码前再核)测得不成立/偏宽/撞裁 ⇒ 停码报席;改卡则席发 `Premise corrected`。 |
| 改法明确 = 目标不变,只换落点或修法:评论记原前提、读数与改法,再改正文。 |
改法明确=目标不变,只换落点/修法或收至读数所证:评论记原前提、读数与改法再改正文。 |
| 其余砍范围、降级、关卡归人工地板 ⛔ 不借改卡裁;读数落认领 `Premise:` 行。 | 其余砍范围/降级/关卡归人工地板 ⛔
不借改卡裁;读数落认领 `Premise:` 行,PR 结论限实测。 |
Narrowing to what the reading proves (收至读数所证) is filed under 改法明确
(target unchanged), so it does not collide with the next-but-one line
that sends other scope cuts to the human floor. The card thread's own
premise duty already lives in `os-dev.md` rule 6; the new line adds only
the stop-and-report path and the seat's `Premise corrected` comment.
**`dispatch-runbook.md` 卡线程节** (rule C), new last line after 交回:
> PR 正文由线程自改(中继 `issue_patch`)再报要点,⛔ 不请席或区代发;线程已关才代改。
**`coordinator.md` §三** (rule B)
| Before | After |
|:---|:---|
| 席位随时交候选:卡号、优先级、派发令全文、建议 effort;⛔ 不等自己的槽位。 |
席位攒批交候选,一线程一行:卡/PR、标题、级别、effort、汇报区、要读文件、续做分支。 |
| — | 派发令全文随行;⛔ 不等自己的槽位;区与卡线程 ⛔ 不直找 coordinator,经席位。 |
| coordinator 排队开线程:p1 先于 p2,同级先到先开;满即排队,线程交回或 PR 合入即释放。 | coordinator
一批开完、一次回全部 id:p1 先于 p2,同级先到先开;满即排队,交回或合入即释放。 |
**`area-lease.md` 〈区内规则〉** (pointers for A and B), new line before the
os-dev line:
> 认领前照 `dispatch-runbook.md` 派发前置核前提;开线程请求交席位攒批(`coordinator.md` 三)。
**`.claude/agents/os-dev.md`** (rule C pointer; the card thread is bound
to this file)
| Before | After |
|:---|:---|
| 写预算三笔:`git push`、`pr_create`(draft,含 labels 与
assignees)、`os-dev-report` 评论。 | 写预算三笔:`git push`、`pr_create`(draft,含
labels/assignees)、`os-dev-report`;卡线程另改正文。 |
| PR 正文 dev 只在 `pr_create` 写,⛔ 不 `PATCH`;改法报告点名,席位经
`seat-post-protocol.md` 代写。 | PR 正文子代理只在 `pr_create` 写、⛔ 不 PATCH
由席代写;卡线程照 `dispatch-runbook.md` 自改。 |
Both lines change in place (405/405). The `seat-post-protocol.md`
pointer leaves this line: the seat's own body write is homed in SKILL.md
and `seat-post-protocol.md` itself, which the seat reads; the dev never
wrote through it.
### Line payers (every file at headroom 0; no ceiling raised, no
re-wrap)
| File | Added | Paid by | The paid line's surviving home |
|:---|---:|:---|:---|
| `dispatch-runbook.md` | +3 | old line 3 「见 SKILL.md
的对应各节;本文只放细则增量:参数、模板、步骤与原文。」 and the blank line after it | file-scope
intro with no rule of its own; SKILL.md:246 still sends readers here
(same shape as the intro payer #34203 used) |
| | | old line 9 「手工挂上的按误标处理,sweep 对着索引校正。」 | SKILL.md:120
(`pm:blocking` is a derived cache, ⛔ 不手工挂) and `triage-duties.md`:39–40
(daily reconcile adds or removes it against the index) |
| `coordinator.md` | +1 | old line 3 「项目会话里开席位线程与卡线程、跨车道调度的那一席读本文;项目席见
`seat-lifecycle.md`。」 | SKILL.md:64 `coordinator` row
(项目会话:开席位线程与卡线程、跨车道调度;接口见 `references/coordinator.md`);
`seat-lifecycle.md` stays named at line 8 |
| `area-lease.md` | +1 | old line 3 「任一车道席坐席、交接或换班时读本文;只写本模式特有的,余处已有者只点名
⛔ 不抄。」 | SKILL.md:97 index row (任一车道席坐席、交接、换班时) |
Every edited line is at or under the 120-byte budget (widest new line:
120 B). `os-dev.md` adds no line, so it needs no payer.
## Tests
No code changes. `pnpm check:pm-skill-ratchet` and `pnpm
check:pm-skill-id-lint` pass locally on this head.
## Acceptance notes
- Premise (claim 6937847756): at `origin/main` 97defd6, `git grep`
over `.claude/skills/pm-dispatch` finds no `Premise corrected` and no
batched thread request. Corrected by the contract review 6938327226
(M1): the claim's search missed `.claude/agents/os-dev.md`, whose
PR-body line said the dev never patches the body and the seat writes it.
That line now carries the card-thread exception, and the file surface
widens to it (card comment records it).
- Contract review 6938327226 on the first head: M1 (os-dev.md
contradicts rule C) fixed as above; S1 (`或其文件` let an order travel as a
file against runbook:136) fixed by dropping the clause; N1 (收至读数所证), N2
(`Premise corrected` only when the card changes) and N3 (the area-lease
pointer now says 认领前) taken; N4–N7 left as written (N6's signed tail is
enforced by the relay's own refusal).
- The text change was written in the area session itself (20 lines of
rules text), not by a dev thread; the claim says so.
- Contract review owed: governed rules text, at `CONTRACT_REVIEW_TIER`,
routed by the area to the review seat.
## Verification
`node scripts/pm/dispatch-gates.mjs --commands` derives 23 commands for
this diff (19 on the first head; `os-dev.md` adds four); the `CMD ::
exit N` ledger is posted as a PR comment on the final head.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind. (no names
added)
- [x] 3. No formatter ran.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (nothing
publishes: `.claude/**` only)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [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 维护者速读 block and
the quoted rule text excepted)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmSXPDB46NVRepWVrL3
<!-- signed: repo:objectstack#2 · os-steve ·
session_01ADHkmSXPDB46NVRepWVrL3 -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent e2d3514 commit e533651
4 files changed
Lines changed: 12 additions & 12 deletions
File tree
- .claude
- agents
- skills/pm-dispatch/references
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | | - | |
10 | 7 | | |
11 | 8 | | |
12 | 9 | | |
| |||
142 | 139 | | |
143 | 140 | | |
144 | 141 | | |
| 142 | + | |
145 | 143 | | |
146 | 144 | | |
147 | 145 | | |
148 | | - | |
| 146 | + | |
| 147 | + | |
149 | 148 | | |
150 | | - | |
| 149 | + | |
| 150 | + | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
0 commit comments