Repository navigation
Commit fa5e782
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
- references
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
0 commit comments