Skip to content

Commit fa5e782

Browse files
pm-dispatch(batch): a slot is a RUNNING subagent or card thread — waiting PRs occupy none; the round report counts running and un-landed separately; a soft ceiling of 5 accepted Tier H PRs awaiting a human (#27292)
Fixes #27117 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:把 pm-dispatch 的并发槽改成可数定义 —— 一槽 = 一个正在运行的子代理或卡线程,报告落地即释放;等人批、在合并队列、等 CI、等裁决的 PR 一律不占槽。轮报固定一行「在跑 N / batch · 待落地 PR M」。新增一条软顶:本席已验收、等人批的 Tier H PR 逾 5 就停派新的 Tier H 卡(S 级与非受管照常),轮报列积压,两周后复测。 - 为什么改:席位把「在飞」读成在飞的卡数,四个 PR 只是在等人就停止派发;旧文本留了这个读法。本 PR 把「在飞」从 batch 行拿掉,给出四个不占槽的等待态,并让两个数字并排出现在每轮报告里,混淆一眼可见。 - 风险与回滚:纯协议文本,四个文件行数不变(319 / 188 / 245 / 96),无脚本、无门禁、无标签;风险是席位把软顶当硬门或把两数写反;回滚 = revert 本 PR 一个 commit。 - 先看:`.claude/skills/pm-dispatch/SKILL.md` L60(batch 行,324 B,表行 pin 341);`references/execution-duties.md` L20–21(指向唯一定义 + 新软顶行,付账删掉的是旧 L12 sub-issue 候选行);`references/seat-lifecycle.md` L70(两数行,付账删掉的是旧 L15 坐席默认行)。 - 两分钟验证:`pnpm check:pm-skill-ratchet` —— 四个文件各印一行 `headroom 0`,SKILL.md 最宽表行仍印 341;`grep -c 在飞 .claude/skills/pm-dispatch/SKILL.md` 由 8 变 7(少的那一行就是 batch 行)。 - 需要你做的:无,席位落地(Tier S:达档契约复核 PASS 后由席位入队)。 ## What changes Four protocol files, every edit in place; no file gains or loses a line, no prose line exceeds 120 bytes, no re-wrap used as currency. Bytes are `wc -c` without the newline. Base `0d45c0e7`, head `90502cd4`. | File · line | Before (B) | After (B) | What | |:--|--:|--:|:--| | `SKILL.md` L60, the `batch` row | 202 | 324 (table-row pin 341; widest row unchanged at 341) | A countable definition: one slot = one subagent (`Agent`, `create_session`) or card thread running now; the report landing releases it; the four waiting states (等人批 · 在合并队列 · 等 CI · 等裁决) occupy none; `dev、复核、普查皆计,⛔ 只读不豁免` stays; the word 「在飞」 leaves the row; p0 is pointed at the `priority:p0` row (`p0 见 priority:p0 行`), not restated. | | `references/dispatch-runbook.md` L137 | 80 | 120 | 「卡线程交回即释放槽位,席位当即告知 coordinator;审核期开着不占槽,REWORK 补丁轮再占一槽。」 — the 「或其 PR 合入」 alternative is gone: hand-back releases the slot; the thread stays open through review occupying none; a REWORK patch round occupies one again. | | `references/execution-duties.md` L21 → L20 | 120 | 118 | 「`batch` 等待不填槽,四态见 SKILL.md 该行;同批独立按文件面不相交判,⛔ 不按包或 check 名。」 — waiting points at the one definition; the 「封顶全部子代理」 half now lives in the `batch` row (`dev、复核、普查皆计`); 「不按包、不按 check 名」 is spelled 「不按包或 check 名」 to fit. | | `references/execution-duties.md` L21 (new) | — | 120 | 「软顶:本席已验收等人批的 Tier H PR 逾 5 ⇒ 停派 Tier H,S/非受管照常,轮报列积压;两周复测。」 — the maintainer's item 4; a SOFT rule: no gate, no script, no label; its only reader is the round-report line below. | | `references/execution-duties.md` L12 (deleted, pays the line above) | 86 | — | 「已排队父单的 open sub-issue 自动是候选,`pm:epic` 父单的子树除外。」 — home: the same file L11 (sub-issue inherits the parent's first touch) and L41–42 (a derived sub-issue is dispatched directly, bypassing triage); `.claude/agents/os-dev.md` 基本规则 3 「归挂不散落 … sub-issue(自动进派发池)」; the epic exclusion lives in `seat-lifecycle.md` 〈Epic 子树车道〉 (`label:pm:epic` 即父子保留全集,域座位不取;其它 PM 候选获取跳过整棵子树). | | `references/seat-lifecycle.md` L70 (new) | — | 111 | 「报告恒带一行「在跑 N / batch · 待落地 PR M」:N 只计运行中的槽,M 计四态等待的 PR。」 — placed right after the existing report-content line (old L70, untouched). | | `references/seat-lifecycle.md` L15 (deleted, pays the line above) | 120 | — | 「坐席从 `batch` 默认 3 起步;前任口径(串行、N、「不开新卡」)维护者对本会话重述才生效。」 — home: the `batch` row's default column (默认 `3`) and the same file's 收班 line (now L40) 「派发口径失效,简报 ⛔ 不列作继承裁决」, which is the same rule from the outgoing side. | The p0 clause is untouched: the `priority:p0` row (SKILL.md L119) and execution-duties L24–26 as rewritten by PR #27266 stay byte-identical; the `batch` row only points at that row. ## Tests No package is touched (`.claude/**` only), so no build closure, no package test or typecheck, no changeset (`skip-changeset` declared at `pr_create`), and no ablation (protocol text, not tested behaviour). The gates are the test; see Verification. ## Acceptance notes - PM mechanism hypothesis 5 (the expected gate list) is partly falsified: `dispatch-gates --commands` derives 20 families for this diff, not 7 — `check:pm-half-states` and `check:pm-dispatch-gates` are NOT derived (they are CI's), while 15 further families that read `.claude/**` are (closing-keyword parity, comment-mask corpus, governed queue guard self-test, harness-current self-test, doc-formula-expressions, agent-test-spelling, cross-package-test-inputs, doc-authoring, driver-memory-census, gitlink-declared, nul-bytes, pm-expected-skips, pm-governed-merges, refd-timer-probe, watch-hint-literal). All 20 were run; `check:skill-frame-freshness` is local-only and was run beyond the derivation. - Hypothesis 3 (replace L70's weakest clause instead of adding a line) was measured and does not fit: the fixed two-number line alone is 41 B, and every spelling that keeps 熔断命中项 and the 48h follow-up count lands at 126–142 B against the 120 B cap; so the line is new and paid as described above. - Hypothesis 1 held: the row rewrite lands at 324 B under the 341 B pin with the four states as four short nouns. - Observation, not filed (agent-read protocol text, outside the three filing classes; carrier: none): `execution-duties.md` 并行纪律 ③ 「兄弟卡落地后再合一次」 sits beside AGENTS.md §10 「after the PR is open, merge main only on a GitHub-reported conflict, a main-caused CI red or a queue removal」 and runbook L223–225's four-sentence warning that says the same as AGENTS.md; the two readings differ on whether a sibling landing by itself triggers a merge. - Observation, not filed (same class, carrier: none): SKILL.md L74 「队列空 + 无在飞 + 无待复核 + 决策箱无新答复 ⇒ 自退」 and L75 「分诊席与车道席常驻」 plus seat-lifecycle 〈停止条件与待命〉 「常设座位队列清空不等于退场」 read against each other; this PR leaves all three alone. - `origin/main` moved twice during this run (0d45c0e → abba2c4 → e9c88f7); the derivation reports none of the moved paths as an input of this card, and none of the new commits touch the four edited files (checked before `pr_create`). ## Verification All exits captured by redirecting first (`cmd > log 2>&1; EXIT=$?`), never after a pipe. Head `90502cd4`. <details><summary>Derived gates (20/20 run, 0 NOT-MEASURED, 0 UNRUN) and the five named families</summary> ```text pnpm check:pm-skill-ratchet :: exit 0 pnpm check:pm-skill-id-lint :: exit 0 pnpm check:pm-governed-prose :: exit 0 pnpm check:skill-frame-sync :: exit 0 pnpm check:skill-frame-freshness :: exit 0 (local-only; beyond the derivation) node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0 node scripts/pm/check-harness-current.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 (first run exit 3 PREREQUISITE NOT MET; built formula+lint under the verify lock, re-ran) pnpm check:agent-test-spelling :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-expected-skips :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:watch-hint-literal :: exit 0 ✓ dispatch-gates --ran: 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). ``` </details> <details><summary>Ratchet verdict lines for the four files</summary> ```text ✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/SKILL.md: widest table row is 341 bytes (pin 341; headroom 0). ✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/SKILL.md is 319 lines (ceiling 319; headroom 0). ✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/dispatch-runbook.md is 245 lines (ceiling 245; headroom 0). ✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/seat-lifecycle.md is 96 lines (ceiling 96; headroom 0). ✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/execution-duties.md is 188 lines (ceiling 188; headroom 0). ✓ check-skill-id-lint: 104 file(s) clean (pattern /#[0-9]{3,}/g). ✓ check-governed-prose: 2 instruction surface(s) name all 13 registered governed surfaces that govern objectstack … and claim no others. ✓ check-skill-frame-sync: the one declared copy of the decision frame is internally coherent (.claude/skills/pm-dispatch/SKILL.md …) ✓ check-skill-frame-freshness: the decision frame in this tree is current with origin/main (fetched just now). ``` </details> <details><summary>Verify lock (the one build, for the refused gate's prerequisite)</summary> ```text os-verify-lock: VERDICT command-exit 0 · held the lock 83s (1m23s) · waited 0s (pnpm exec turbo run build --filter=@objectstack/formula --filter=@objectstack/lint --concurrency=2; Tasks: 4 successful, 4 total) ``` </details> Acceptance greps on head: `sed -n 60p SKILL.md | grep -c 在飞` → 0 (file-wide line count 8 → 7, the control); `sed -n 137p dispatch-runbook.md | grep -c 或` → 0; `check:nul-bytes` OK over 22042 files; no raw control bytes in the four files. --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYmhU5KEj1nukYhp1Tg)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent b445807 commit fa5e782

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
5757
| `coordinator` | 以协调者身份运行(项目会话:开席位线程与卡线程、跨车道调度;接口见 `references/coordinator.md`) | — |
5858
| `label:<name>` | backlog 过滤标签;`label:all` = 全部 open 未认领 | `pm:queue` |
5959
| `repo:<owner/name>` | 扫哪个仓的 backlog(单 issue 的落地仓看它自己的 `repo:*` 标签) | `objectstack-ai/objectstack` |
60-
| `batch:<n>` | 席位同时在飞的子代理总上限,按 `Agent` 调用、`create_session` 与卡线程计:dev、复核、普查皆计,⛔ 只读不豁免 | 默认 `3`;`n` 的维护者天花板 `5` |
60+
| `batch:<n>` | 运行中槽位的上限:一槽 = 一个正在运行的子代理(`Agent`、`create_session`)或卡线程,报告落地即释放;等人批、在合并队列、等 CI、等裁决四态不占槽;dev、复核、普查皆计,⛔ 只读不豁免;p0 见 `priority:p0` 行 | 默认 `3`;`n` 的维护者天花板 `5` |
6161
| `rounds:<n>` | 跑 N 轮后停 | 队列清空为止 |
6262
| `mode:subagent` \| `mode:cloud` \| `mode:thread` | 派发后端 | 按卡分流:S+M ⇒ `subagent`,`cloud` 只留 L/XL 等保留面;席位是项目线程时 M 及以上、p1、`security` 一律 `thread` |
6363
| `#12 #34 …` | 显式 issue 清单,整体覆盖标签查询 | — |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
- 项目的 coordinator 跨席位统一调度卡线程;每席一个线程跑 PM 循环,卡线程即 dev。
135135
- 席位随时把候选卡交 coordinator,附优先级、派发令全文与建议 effort,⛔ 不等自己的槽位。
136136
- coordinator 按优先级开线程,p1 先;全项目上限由维护者按项目定(`coordinator.md`),满即排队。
137-
- 卡线程交回或其 PR 合入,席位当即告知 coordinator 释放槽位。
137+
- 卡线程交回即释放槽位,席位当即告知 coordinator;审核期开着不占槽,REWORK 补丁轮再占一槽。
138138
- 档位与 effort 席位自推导 ⛔ 不等维护者原话:`--tier` 过路径,MANDATORY 即绑;effort 按难度。
139139
- 派发令写两者与推导(`--tier` 行或难度读数),协调者照令开线程;常设原话有则作 `reason:`。
140140
- 席位留认领文本/派发令/契约复核/ACCEPT/落地;线程实施、开 draft PR、驱动 CI 与可合并。

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
- 席改标:卡余项实测路径整落本席包树 ⇒ 本席改 `domain:*`,审计评论列路径与新旧标同笔。
1010
- 席改标限未派发卡;带 `needs-user-decision`、open `Blocked-by:` 或 `security` 的 ⛔ 不改,仍问分诊。
1111
- 无分诊审计评论即非候选;例外:sub-issue 承父卡首触,main-red 锚卡见 `landing-operations.md`。
12-
- 已排队父单的 open sub-issue 自动是候选,`pm:epic` 父单的子树除外。
1312
- 每张候选读全文 + 全部评论,写派发词前做决策复读:评论读到最后一页。
1413
- 维护者裁决逐字引入派发词裁决分区作约束,无则写明无裁决。
1514
- 派发前做前提过时检查,裁决同罪,三面都查:动作面、卡引用面、工作项面。
@@ -18,7 +17,8 @@
1817
- 卡引用面:裁决/卡片点名的每张 issue 逐个读当前 open/closed/assignee。
1918
- 引用读到的现状,⛔ 不引用裁决写作时的描述。
2019
- 工作项面:卡片与分诊评论列的每条工作项逐条对树核验是否仍未完成,⛔ 不对卡核验。
21-
- `batch` 封顶全部子代理,等待不填槽;同批独立按文件面不相交判,⛔ 不按包、不按 check 名。
20+
- `batch` 等待不填槽,四态见 SKILL.md 该行;同批独立按文件面不相交判,⛔ 不按包或 check 名。
21+
- 软顶:本席已验收等人批的 Tier H PR 逾 5 ⇒ 停派 Tier H,S/非受管照常,轮报列积压;两周复测。
2222
- single-writer 路径 = `SINGLE_CLAIM_PATHS` 所枚举;共享其它路径是普通并发,后落地方解冲突。
2323
- 第 N 单派发前读 `scripts/pm/os-verify-lock.sh --status`:到达深度 ≥ `LOCK_DEPTH_HOLD`(= 2)即等。
2424
- 到达深度 = `queue N:` 行数 + 1(待派 dev 的运行算作到达);`state:` holder 与 `parked` 行不计。

‎.claude/skills/pm-dispatch/references/seat-lifecycle.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
- 总监席多场并行、无在任者:读数一、二与自退对它不成立;`domain:*` 席互斥照旧。
1313
- 同 session 的 subagent dev 认领不触发自退,甄别靠分支。
1414
- 收班简报是前任不再写的显式声明,是释放标记不是锁:简报即最新事件 ⇒ 立即坐席。
15-
- 坐席从 `batch` 默认 3 起步;前任口径(串行、N、「不开新卡」)维护者对本会话重述才生效。
1615
- 维护者明示召唤是仲裁:有简报径直坐席;无简报才走保守确认,确认终止即坐席。
1716
- 互斥清 ⇒ fetch 后 SKILL.md、阶段 references、本席章程的最新触碰 sha 走 `git-history.mjs touch`。
1817
- 异于上一开轮标记即先重读;留开轮标记(session ID + fire 时刻 + 该触碰,注明重读)再跑轮。
@@ -68,6 +67,7 @@
6867
- 每轮向维护者打中文轮次报告(chat 通道):issue → 判决 → PR 链接 → 备注的表。
6968
- 项目席轮报 = 卡线程清单,⛔ 不逐轮发聊天表;五项健康指标进总监席的每日摘要。
7069
- 报告加升级项、呈裁清单、逐 PR 熔断命中项(无则 none),与已落 PR 48h 内开出的跟进 PR 数。
70+
- 报告恒带一行「在跑 N / batch · 待落地 PR M」:N 只计运行中的槽,M 计四态等待的 PR。
7171
- 与产品提交占比:已合提交不触 `.claude/` `AGENTS.md` `scripts/pm` 门禁脚本 `.github/workflows` 者。
7272
- 产品提交占比连续多轮偏低 ⇒ 席位报维护者。
7373
- 报告含 `UNRECOGNISED` 行:对本轮门禁日志 grep `UNRECOGNISED` 逐行照录,`NOT APPLICABLE` 行也在内。

0 commit comments

Comments
 (0)