Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .claude/skills/pm-dispatch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metadata:

你是 PM 座位。PM 永不写代码,代码全由 `os-dev` 开发 agent 完成,一单一 agent 一 worktree。
PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报告 → 下一批。
维护者只在两点进入循环:轮次报告,与 `needs-user-decision` 决策卡。
维护者只在三点进入循环:轮次报告,`needs-user-decision` 决策卡,`pm:awaiting-merge` PR。

## 红线

Expand Down Expand Up @@ -104,7 +104,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
| open + 队列标签 + 无 assignee | 可派发(同卡带 `pm:retriage` 的除外);`pm:queue` 卡恒无 assignee,有即半态 |
| assignee 已设 | 已认领/在飞,不是你的就永不碰;离手恒走释放 —— 三因 = 改路由(限未派发)、前提证伪、弃飞无接管,去向 = 新标签态或车道;在飞卡跟到 MERGED,⛔ 不静默摘 assignee |
| `pm:dispatched` | 已派发(派发评论记轮次),恒带 assignee;与摘 `pm:queue` 同一次标签写入成对落地 |
| `needs-user-decision` | 决定待做:永不派发、永不代答;维护者的收件箱,只由人工裁 |
| `needs-user-decision` | 决定待做:永不派发、永不代答;维护者的决策收件箱,只挂决策卡(issue)、⛔ 永不挂 PR,只由人工裁 |
| `pm:on-hold` | 决定已做且答案是暂不做:不派发不催;仅当带机器可读 `Restart-when:` 行才合法 |
| `pm:blocked` + 正文行 `Blocked-by: #N` | 等上游:选择期跳过,#N 关单(PR 则合并,关而未合并不放)时由解锁扫描或 `scheduled-full-run-card.yml` 放回;工已完而被门禁卡住的同用本态;双通道行首 `Blocked-by:` 指向无 `Ruled:` 的 open `needs-user-decision` 卡 ⇒ ⛔ 不派发,直至其 `Ruled:` |
| `pm:awaiting-maintainer` | 决定已做,只剩一次 GitHub 之外的人工动作:不派发不催;与其它 pm 状态标签互斥;入态恒带行首 `Maintainer-action:` 行(细则见 `references/state-machine.md`),无行即半态 |
Expand Down Expand Up @@ -186,12 +186,12 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
- 路径面命中 Tier H ⇒ ACCEPT 换终局四件套,混合 diff ⛔ 不按比例判;要拆让 dev 单独开 PR。
- 改动 >3000 行(含生成物)同换终局四件套含③请审,⛔ 无 Tier S 例外;读数=PR additions+deletions。
- ① 席位记录落 PR 先于 `pr_ready`/入队且钉 head:速读六行+席位意见,其下 `## 席位核对`。
- ② PR 悬着等人批,同笔挂 `needs-user-decision`;人工直合即审核记录,授权批准 ⇒ 席位落地。
- ② PR 悬着等人批,同笔挂 `pm:awaiting-merge`;人工直合即审核记录,授权批准 ⇒ 席位落地。
- 指针 `ACCEPT → PR #n comment <id>`;受管/spec 面欠完整复核 ①–④,席未达档起隔离达档复核。
- 核对六项:形态/前提实测/门禁 check-runs/接受的偏差/范围外去向+`Skills-docs:`/落地条款。
- 草稿归 dev:PR 正文带 `## 维护者速读` 六行(见 os-dev.md),中文、业务角度,不写席位意见。
- 终稿 = 席位对照自己读的 diff 校正六行、加席位意见行,置顶席位记录;维护者只读评论。
- PR 上的标签 = 待维护者审阅,不入六态;与请审同为等人批清单,随获批或撤回判决离开。
- `pm:awaiting-merge` 只挂 PR、不入六态,与请审同为等人批清单,随获批或撤回判决离开。
- 批准判定单源 = 队列守卫常量 `GOVERNED_APPROVERS`:授权账户 APPROVED 即算,⛔ 不卡 `commit_id`。
- 批准后再推亦不过期;席位落地 = 过落地前检、清标、ready、auto-merge,踢出/变基同法。
- ③ 请审 = 席位交棒:ACCEPT 与现 head 同形 PASS 俱在案,同轮中继 `pr_request_reviewers` 请审批人。
Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/pm-dispatch/references/lanes/director.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
- 改 skill、指令或治理文本归 skills 席;出裁决、清复审标、清点待人工清单归本席。
- 项目内卡线程报 `needs_decision` ⇒ 席位写四维分析加推荐,并入决裁批次呈维护者人工裁。
- 维护者令「必须人工决裁」撤销「有把握自己决定」;⛔ 无裁决线程、代裁、置信门。
- 本席任何形态都纯召唤制,⛔ 无任何 routine;分诊席默认同项目召唤,职责见 `triage.md`。
- 应用仓召唤本席复核卡的业务理由首触,三出口同分诊;没把握 ⇒ 报该应用的总监(人)裁。

## 基本原则
Expand Down Expand Up @@ -51,7 +50,8 @@
- 入批前评论卡,首行 `Brief-claimed-by: session_<id> · batch #<n> · <UTC>`;只认会话 id,⛔ 不认账号。
- 他会话该行未满 24h 即跳过,不呈不裁不改标;逾 24h 无 `Ruling:` 失效可再写;录裁/关卡即释。
- 判据:开场标记→首批 ≤ 读五张;录裁只录维护者回字,⛔ 不自录、不自转工作态。
- 决策收件箱 = 全部仓的 `needs-user-decision`,卡留立卡仓;⛔ 不复活已退役的汇总 issue。
- 决策收件箱 = 全部仓的 `needs-user-decision` 卡,留立卡仓;⛔ 不复活已退役的汇总 issue。
- 待您审合箱 = 全部仓 `pm:awaiting-merge` PR;呈批与摘要分写「决策卡 N」「待您审合 PR M」。
- 入箱勤务:校验/补全四棱块、速读与 `Prior rulings on this card:` 行;入箱同笔现读前提。
- 线程有 `Ruling:`/RULED 的卡再入箱,该行逐 id 各一句变化;缺行 ⇒ 拒入,`pm:retriage` 回立卡者。
- 一次只开一批:维护者对批 N 回字(一字即可)后,新到才合成批 N+1;续批至清零才收工。
Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/pm-dispatch/references/seat-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
- 与产品提交占比:已合提交不触 `.claude/` `AGENTS.md` `scripts/pm` 门禁脚本 `.github/workflows` 者。
- 产品提交占比连续多轮偏低 ⇒ 席位报维护者。
- 报告含 `UNRECOGNISED` 行:对本轮门禁日志 grep `UNRECOGNISED` 逐行照录,`NOT APPLICABLE` 行也在内。
- 健康指标五个:可派发库存(open `pm:queue` 未认领及趋势);决策箱(待维护者数)。
- 决策箱指标还要点名带开放下游依赖的决策卡,从 `Blocked-by:` 反向索引现算。
- 健康指标五个:可派发库存(open `pm:queue` 未认领及趋势);决策箱:决策卡 N·待您审合 PR M。
- 两数 ⛔ 不合计;决策卡还要点名带开放下游依赖者,从 `Blocked-by:` 反向索引现算。
- finding 数与中位年龄:裸标签数即未定级数,hold 已换标不在内。
- 裸卡数与中位年龄:sweep 析取①,未定级数另计析取④;老化 = 首触欠账。
- 发版阻塞 = 三仓 `target:<major>` 之和,归零 = 三张板都空;总 open 数刻意不在指标内。
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/pm-dispatch/references/state-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 跨状态通则

- 六态 = `pm:{queue,dispatched,blocked,on-hold,awaiting-maintainer}` 加 `needs-user-decision`。
- 六态 = `pm:{queue,dispatched,blocked,on-hold,awaiting-maintainer}` 加 `needs-user-decision`,皆 issue 态。
- 六态 ONE-OF 的成因恒是半写的转换;判定以 `check-half-states.mjs` 的 H29/H30 为权威。
- 生成物不分叉:`skills/**` 生成器产物跑 `check-governed-merges.mjs --test`,⛔ 不按路径手判。
- 交接即标签:只写交接评论而不同笔挂标 = 空交接,收件箱只认标签。
Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/pm-dispatch/references/triage-duties.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
- 每日一 fire 跑两仓全量对账并归集日频职责;选层按 fire 时刻 ⛔ 不用计数器,简报写明层。
- 每条枚举比对返回数与 `totalCount`,不等 ⇒ 报 `sweep INCOMPLETE` 点名缺口,⛔ 永不报干净。
- 轮次记录按车道计欠审逾一轮的 head 数并点名车道(`check-owed-reviews.mjs`),只报 ⛔ 不接审。
- 轮次记录分写「决策卡 N」与「待您审合 PR M」,不合计;后者 = open `pm:awaiting-merge` PR。
- 分诊旧记录过期:delta 复审归车道或复审席,照 contract-review.md;⛔ 分诊不再审。
- Backlog sweep 是常设职责,每 fire 扫任一析取命中的卡。
- 析取 ①:全裸(无 `pm:*`、无 `needs-user-decision`、无 `domain:*`)。
- 析取 ②:有 `pm:queue` 无 `domain:*`(仅多车道仓);析取 ③:有 `domain:*` 无 pm-state。
- 析取 ④:有 `pm:queue`+`domain:*` 无 `priority:*`;②③④ 只取 `updated_at` 早于 ~2 分钟。
Expand Down Expand Up @@ -40,7 +40,7 @@
- `tooling` 入 `pm:queue` 仅凭三门之一:首行带 `Unblocks: #N`(open 产品卡)或点名所护的已发布面;
- 或实测拖慢车队开发:正确源上假红/假绿、反复重跑、同因丢复核轮;卡须具名实例。
- `pm:queue` 也收恢复不变量的 finding、test-only pin,与实现未被裁错的说明书脱节(修文档)。
- `needs-user-decision` = 设计卡、feature/契约形状提案、需要 appetite 的多周程序。
- `needs-user-decision` = 设计卡、feature/契约形状提案、需要 appetite 的多周程序;只挂 issue。
- 先例已定新键/值/导出名非契约形状提案;分诊审计 ⛔ 不自加门,唯语义/形状真分歧呈人。
- 碰迁移形状或删已发布能力也进决策箱;说明书脱节不进:有裁定出处才是 (b),否则改文档。
- 决策卡速读居四棱块之上、同题,用业务语言先讲事情与选项,末句只问一字:A/B/C 或是否。
Expand Down
4 changes: 2 additions & 2 deletions scripts/pm/check-governed-merges.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
*
* Read as: a pull request whose changed line count exceeds 3,000 lands by the
* same terminal as a Tier H governed diff (ACCEPT on the card,
* `needs-user-decision` on the PR, a final 维护者速读, review requested from
* `pm:awaiting-merge` on the PR, a final 维护者速读, review requested from
* `GOVERNED_APPROVERS`), whatever paths it touches — on 2026-09-18 that meant
* the maintainer's own merge alone; since 2026-09-27 it means the two landings
* a Tier H path has (the "SIZE limb's LIFT" section below). 「比如」 made the
Expand Down Expand Up @@ -1943,7 +1943,7 @@ export function renderSizeLines(size) {
` as a Tier H governed diff: no seat flips it ready, enqueues it, or arms auto-merge until an account in\n` +
` GOVERNED_APPROVERS has APPROVED it, on ANY commit (${SIZE_LIFT_RULING}) — then the OWNING seat lands it\n` +
` through the queue; the maintainer's own merge is the other landing. ACCEPT on the card,\n` +
` \`needs-user-decision\` on the PR, the final 维护者速读, review requested from GOVERNED_APPROVERS.`
` \`pm:awaiting-merge\` on the PR, the final 维护者速读, review requested from GOVERNED_APPROVERS.`
);
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/pm/check-governed-queue-guard.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
* ⭐ AN AUTHORIZED APPROVAL LIFTS THIS LIMB (maintainer ruling 2026-09-27,
* #20153), exactly as it lifts a Tier H path. Until that day the landed
* predicate said a human MERGE and nothing else — 「人工审核」 landed as the same
* terminal a governed diff has (ACCEPT on the card, `needs-user-decision` on
* terminal a governed diff has (ACCEPT on the card, `pm:awaiting-merge` on
* the PR, a final 维护者速读, review requested from `GOVERNED_APPROVERS`) and
* the maintainer's own click (人工直合); the 2026-08-27 ruling had said
* "approval lifts" of PATHS, nothing had said it of the NUMBER, and this file
Expand Down Expand Up @@ -2324,7 +2324,7 @@ export function renderSizeVerdict(verdict) {
' remote that it is in neither the queue nor `origin/main` — the pull-back of AGENTS.md Prime',
' Directive #14. Out of the queue and in draft is the SAFE state.',
' 2. Then ONE of the landings — the same terminal a Tier H governed diff has: ACCEPT on the card,',
' `needs-user-decision` on the PR, a final 维护者速读, review requested from GOVERNED_APPROVERS',
' `pm:awaiting-merge` on the PR, a final 维护者速读, review requested from GOVERNED_APPROVERS',
` (${GOVERNED_APPROVERS.join(', ')}); and then EITHER`,
' (a) an APPROVED review by one of those accounts, on ANY commit (2026-09-27, objectstack#20153) —',
' the OWNING seat then lands it through the queue (席位落地): ready, auto-merge, this check',
Expand Down
Loading
Loading