Skip to content

Commit e533651

Browse files
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/os-dev.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ model: opus
6060
- 写工具自读所需变量;⛔ 永不打印环境变量的值,转录是 AGENTS.md 禁落令牌的日志行。
6161
- 拼法不限于 `env`、`printenv`、`set`、`export -p`、`echo $VAR`、`cat /proc/*/environ`。
6262
- 判存在只用不印值形式 `[ -n "${X+x}" ] && echo set`;已印出 ⇒ `deviations` 只点名变量名。
63-
- 写预算三笔:`git push`、`pr_create`(draft,含 labels 与 assignees)、`os-dev-report` 评论。
63+
- 写预算三笔:`git push`、`pr_create`(draft,含 labels/assignees)、`os-dev-report`;卡线程另改正文。
6464
- 卡与线程只走 payload 档(公开仓单卡网页内嵌 JSON,拼写住 platform-readings)或单卡 REST 读。
6565
- 三类发现进报告交席位代立,不 `POST /issues`、⛔ 不静默弃报;PM 去重读数当既有事实用。
66-
- PR 正文 dev 只在 `pr_create` 写,⛔ 不 `PATCH`;改法报告点名,席位经 `seat-post-protocol.md` 代写。
66+
- PR 正文子代理只在 `pr_create` 写、⛔ 不 PATCH 由席代写;卡线程照 `dispatch-runbook.md` 自改。
6767
- 报告记 `api_writes`(次数 + 端点清单)与 `mcp_calls`;越界真写了的照列注明缘由,⛔ 不漏记。
6868
- 归挂不散落:落在已排队 issue 范围内的发现,报告点名为它的 sub-issue(自动进派发池)。
6969
- 只是依赖它的,报告点名独立单带 `Blocked-by:` 行;立在修复落地的仓,带回链;席位代立。

‎.claude/skills/pm-dispatch/references/area-lease.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# 区域租约模式(area-lease)
22

3-
任一车道席坐席、交接或换班时读本文;只写本模式特有的,余处已有者只点名 ⛔ 不抄。
43
本模式 = 一席 + 按需分区 + L1 线程 + 区域 ACCEPT 后自落地;席留 W0、路由、受管面与台账。
54

65
## 分不分区,动态定
@@ -37,6 +36,7 @@
3736
- 重叠检查:认领前与每次推前跑 `scripts/pm/overlap-check.mjs`;exit 1 排所列 PR 后,3 补前提重跑。
3837
- 认领照 `execution-duties.md` 派发原子对,同笔加 `lease:<区>`;`Branch:` 照 AGENTS.md 命名。
3938
- 认领后回读标签(SKILL.md 标签写四步):缺 `lease:` 或 `pm:dispatched` 即重挂;首推即开 draft PR。
39+
- 认领前照 `dispatch-runbook.md` 派发前置核前提;开线程请求交席位攒批(`coordinator.md` 三)。
4040
- 写码与开发期读码全经 `os-dev` 等子代理(一卡或一组耦合卡,文件面不相交)。
4141
- 同系列卡可从前卡分支起步(AGENTS.md §2 主干形,⛔ 不叠 PR);新测试建按卡命名的新文件,
4242
AGENTS.md 共享 harness 规则适用时除外,由重叠检查定排队。

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# 协调者(Coordinator)
22

3-
项目会话里开席位线程与卡线程、跨车道调度的那一席读本文;项目席见 `seat-lifecycle.md`。
43
它不是 `domain:*` 席:不坐座位贴、不认领卡;席位线程照 SKILL.md 与 `execution-duties.md` 跑循环。
54

65
## 一、车道归属登记在座位贴(coordinator 开席位线程前读;席位线程坐席时读)
@@ -22,8 +21,9 @@
2221
## 三、全项目一个上限,p1 先(coordinator 调度读;席位交候选时读)
2322

2423
- 卡线程上限全项目一个数,由维护者按项目言明;未言明取各席 `batch` 之和。
25-
- 席位随时交候选:卡号、优先级、派发令全文、建议 effort;⛔ 不等自己的槽位。
26-
- coordinator 排队开线程:p1 先于 p2,同级先到先开;满即排队,线程交回或 PR 合入即释放。
24+
- 席位攒批交候选,一线程一行:卡/PR、标题、级别、effort、汇报区、要读文件、续做分支。
25+
- 派发令全文随行;⛔ 不等自己的槽位;区与卡线程 ⛔ 不直找 coordinator,经席位。
26+
- coordinator 一批开完、一次回全部 id:p1 先于 p2,同级先到先开;满即排队,交回或合入即释放。
2727
- 槽位只算在建的线程:等人(授权批准、决策卡)或等席位 L1/L2 审核的卡线程不占槽。
2828
- S 卡的席内子代理只计该席 `batch`,不计本上限。
2929

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# 派发与收集运行细则
22

3-
见 SKILL.md 的对应各节;本文只放细则增量:参数、模板、步骤与原文。
4-
53
## 车道取卡全序与 `pm:blocking`
64

75
- 级别半边:p1–p3 是分诊已裁的显式排序;无级末位是分诊缺口,不是一个已裁的低优先级。
86
- `pm:blocking` 的写入与摘除都在分诊轮 sweep,依赖者全关即摘。
9-
- 手工挂上的按误标处理,sweep 对着索引校正。
107

118
## 紧急卡直接分诊
129

@@ -142,14 +139,17 @@
142139
- 分支约定仍是 `claude/issue-<n>-<slug>`;线程只能推指定分支是实测平台例外,认领如实写。
143140
- worktree 照建;线程读 `os-dev.md`、派发令、卡与全部评论,⛔ 不读 `SKILL.md`;references 按需读。
144141
- 交回:PR 与报告落地后给席位线程发一条消息(PR、head、报告要点);L1/L2 期线程不关,接 FAIL。
142+
- PR 正文由线程自改(中继 `issue_patch`)再报要点,⛔ 不请席或区代发;线程已关才代改。
145143

146144
## 派发前置:前提核实,再把本地检出钉到 main
147145

148-
- 派发前前提核实由只读子代理做(下限档);卡线程卡在交候选给 coordinator 之前做。
146+
- 先核前提后写码:派发前席派只读子代理(下限档;卡线程卡交候选前);区自领卡认领前测。
147+
- 对 `origin/main` 逐条测:复现、根因句与 file:line、路线对 `check-prior-rulings.mjs`、适用面。
149148
- 成立 ⇒ 派;不成立而改法明确 ⇒ 改卡再派;判不了 ⇒ 入决策箱,⛔ 不占卡线程槽。
150-
- 改法明确 = 目标不变,只换落点或修法:评论记原前提、读数与改法,再改正文。
149+
- 区与卡线程(写码前再核)测得不成立/偏宽/撞裁 ⇒ 停码报席;改卡则席发 `Premise corrected`。
150+
- 改法明确=目标不变,只换落点/修法或收至读数所证:评论记原前提、读数与改法再改正文。
151151
- 卡项与既裁冲突 ⇒ 席砍该项再派 ⛔ 不问分诊;行首 `Ruling-ref:` 引既裁出处,原话逐字。
152-
- 其余砍范围、降级、关卡归人工地板 ⛔ 不借改卡裁;读数落认领 `Premise:` 行。
152+
- 其余砍范围/降级/关卡归人工地板 ⛔ 不借改卡裁;读数落认领 `Premise:` 行,PR 结论限实测。
153153
- subagent 读 PM 容器本地检出的 agent 定义与技能文本,不读 `origin/main`:过期则整批过期。
154154
- 每批派发前:`git -C <repo-root> fetch origin main && git -C <repo-root> checkout --detach origin/main`。
155155
- 游离 HEAD 使停止钩子跳过分支块,⛔ 不快进会话分支;只拒与切换冲突的脏改动,不拒分叉。

0 commit comments

Comments
 (0)