Skip to content

Commit 081fb4a

Browse files
docs(pm-dispatch): let triage close duplicates and completed tracking parents (#30741)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DSw5aPMJMFmu7Ea4UzDAZtU)_ domain:skills#1 · os-elon-musk · session_016WV4czGYzFgExGjPWM86fG Fixes #30462 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:把您 11-05 在分诊会话里的裁决(「同意,需要的话立skills卡」)写进分诊席章程与职责:分诊可自己关两类卡,一是点名目标、本轮新读确认重叠的重复卡(`duplicate`),二是 `Part of #n` 子卡全关、自身无 open 工作的追踪父单(`completed`)。 - 为什么改:原章程写「只写标签与审计评论」,重复卡和已完父单只能等您动手,#30118、#26059 等等了 1–10 天。 - 边界:每次关卡前先贴签名评论,点名所据裁决与证据;按是非关(won't do / not a bug)、有活认领的卡、安全卡不在此权,仍归您。 - 风险与回滚:只改 `.claude/` 下两份规则文本,两文件行数持平(20 / 100),没抬任何天花板;回滚即 revert。 - 先看:`triage-duties.md` 第 70 行(重复卡并卡行)、第 73–74 行(两条新行),以及 `lanes/triage.md` 第 4 行。 - 需要你做的:无,Tier S,席位复核后落地。 ## What changes - `.claude/skills/pm-dispatch/references/lanes/triage.md` L4: triage's writes become "labels, audit comments and closes" (was "labels and audit comments"). The rest of the line is kept; the opening clause is compressed to fit the 120-byte line cap. - `.claude/skills/pm-dispatch/references/triage-duties.md`: - L70 (the same-file-same-mechanism merge line): drops "at first-touch grading only", so a duplicate a lane names later can also be closed; it names the relay op: `issue_patch` with `state_reason: duplicate` (was `duplicate_of`, which the relay's `state_reason` enum does not carry). - L73 (new): close a duplicate only when the target is named and the overlap is read fresh; close a tracking parent as `completed` when every `Part of #n` child is closed and the parent holds no open work. - L74 (new): each close is preceded by a signed comment naming the ruling and the evidence. ⛔ Closing on merits, a card under a live claim, and a security card are outside this power and stay with the maintainer. - The op exists already: `scripts/pm/fleet-write/ops.mjs` `issue_patch` takes `state` and `state_reason` (enum `completed`, `not_planned`, `duplicate`, `reopened`). No `scripts/pm/**` change. ## Paying the line ceilings Both files were at headroom 0 (`triage.md` 20, `triage-duties.md` 100). Nothing was raised: - `lanes/triage.md`: the edit stays inside L4. - `triage-duties.md` gains two lines and pays two: - the four disjunct lines ①–④ (old L13–15) are rewritten as two, with the same labels and the same `updated_at` ~2-minute cut; - the half-state backlog line (old L18: ②③④ oldest first, P0 suspects first, newest-first does not apply) is folded into the ordering line (old L20). ## Carried rulings and ⛔ constraints read in the two files `grep -n 'ruling|裁决|维护者|⛔'` on both files: 7 matching lines in `lanes/triage.md` and 33 in `triage-duties.md` on the base. Every one is kept. The ones this power touches: - `triage-duties.md` 「⛔ 带 `pm:dispatched`/assignee/open 或 merged PR 引用的卡不动」 now names the close lines among its exceptions (「例外:关卡行、下三行、锚卡首触。」, head `51d3c137`). Without that, a finished tracking parent that merged PRs reference could not be closed, which is the close the ruling grants. The close lines still exclude a live claim and a parent with open work. - The human floor's 「卡的命运(关 not planned、降级、撤回、砍半)」 and the first-touch `not_planned` closes (「无则关」, 「三类外首触关闭只清门前存量」) are untouched. The new ⛔ line is scoped to "this power" (此权) so it does not contradict those existing first-touch rules. - 「在飞(assignee/open PR)永不并」 on the merge line is kept, and matches the live-claim exclusion. ## Verification Gates derived by `node scripts/pm/dispatch-gates.mjs --commands` on head `1e3e11c7`: 19 of 19 run, all exit 0, reconciled with `--ran` (0 NOT-MEASURED). Also run: `pnpm lint` (exit 0), `pnpm check:pm-governed-prose` (exit 0). `check:pm-skill-ratchet` (line ceilings and the 120-byte line cap) and `check:pm-skill-id-lint` (no issue numbers in the skill text) are among the 19. `node scripts/pm/check-governed-merges.mjs --test` on the two paths answers GOVERNED, Tier S. ## Acceptance notes - Worked examples (not copied into the skill, which carries no issue numbers): triage's signed closes on #30118 (duplicate, comment 6658063257) and #29465 (completed tracking parent, comment 6670579539). - `scripts/pm/check-half-states.mjs` L17381 is a code comment that quotes the old ordering wording 「队列每轮清空时最新优先;清不空的那一刻起改最老优先」. The meaning is unchanged, but the quote is no longer verbatim. It is not asserted by any test, and `scripts/pm/**` is outside this card's surface. - The two new lines sit after the "执行席 ⛔ 不并卡" line and before the in-flight re-check rows, so the 「例外:下三行」 reference on the "不动" line still points at the same three lines. - No changeset: the diff is `.claude/**` only (`skip-changeset`), as the card states. ## 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. - [x] 3. No formatter ran; `pnpm lint` passes. - [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. (Publishes nothing: `skip-changeset`.) - [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 is the lane's maintainer summary). - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4czGYzFgExGjPWM86fG <!-- signed: domain:skills#1 · os-elon-musk · session_016WV4czGYzFgExGjPWM86fG --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent deabe3b commit 081fb4a

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎.claude/skills/pm-dispatch/references/lanes/triage.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 席位章程:分诊席(Triage)
22
见 triage-duties.md;本文是本席的岗位说明,现值状态恒在座位贴,⛔ 不迁入本文。
33

4-
- 由维护者一句召唤到任一项目,默认同总监席项目;只写标签与审计评论,⛔ 无 PR、无认领。
4+
- 维护者一句召入任一项目,默认总监席项目;只写标签、审计评论与关卡,⛔ 无 PR 无认领。
55
- 应用仓业务理由由该项目召唤的总监席复核;第三方应用的总监是其自身维护者。
66
- 每 fire 最旧优先;最旧未路由超 4h 的卡本轮先清。
77
- 补半状态前先确认无人在动,读后新现六态属他席即停手;⛔ 不加第二席、不改 fire 频率。

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010
- 轮次记录按车道计欠审逾一轮的 head 数并点名车道(`check-owed-reviews.mjs`),只报 ⛔ 不接审。
1111
- 轮次记录分写「决策卡 N」与「待您审合 PR M」,不合计;后者 = open `pm:awaiting-merge` PR。
1212
- 分诊旧记录过期:delta 复审归车道或复审席,照 contract-review.md;⛔ 分诊不再审。
13-
- 析取 ①:全裸(无 `pm:*`、无 `needs-user-decision`、无 `domain:*`)。
14-
- 析取 ②:有 `pm:queue` 无 `domain:*`(仅多车道仓);析取 ③:有 `domain:*` 无 pm-state。
15-
- 析取 ④:有 `pm:queue`+`domain:*` 无 `priority:*`;②③④ 只取 `updated_at` 早于 ~2 分钟。
13+
- 析取 ①全裸(无 `pm:*`/`needs-user-decision`/`domain:*`);② `pm:queue` 无 `domain:*`(仅多车道仓);
14+
- ③ `domain:*` 无 pm-state;④ `pm:queue`+`domain:*` 无 `priority:*`;②③④ 只取 `updated_at` 早于 ~2min。
1615
- 排除 `tracking`、`status:parked`、全部 `pm:seat` 贴、`qa-run` 记录。
1716
- 析取 ⑤:窗内新建且 `pm:queue`/`priority:*` 与建卡同分钟,照未分诊首触;⛔ 不凭 actor。
18-
- 半状态治愈积压 ②③④ 最老优先、P0 嫌疑先行,⛔ 优先最新不适用。
1917
- 首触定级与五析取 sweep 每 fire 跑到清空,先于旧卡重验:⛔ 无每轮预算、无逐卡豁免评论。
20-
- 排序:队列每轮清空时最新优先;清不空的那一刻起改最老优先。
18+
- 排序:每轮清空时最新优先,清不空起最老优先;半状态积压 ②③④ 恒最老、P0 嫌疑先行。
2119
- 裸卡数 >15 ⇒ 下一 fire 整轮改域分批集中模式,每批 ≤5 张同族卡,照样跑到清空。
2220
- 紧急卡直接分诊:维护者点名或 p0 嫌疑 ⇒ 立即起默认判断档分诊子代理,不等定时轮。
2321
- 每轮读上份轮次记录 fire 以来全部 main push、schedule 与队列结论,⛔ 不只读最新一跑。
@@ -69,14 +67,16 @@
6967
- 每张留一条英文审计评论(`Triage: lands in …; rationale: …`),可选带 `Size/model suggestion:` 行。
7068
- 改作者可写面(种类非 `none` 或带 `(narrowing)`)的卡,首触 done-when 写 skills + docs + eval 三项。
7169
- 查重/shadow 检查先按文件/机制查本仓与姊妹仓 open 卡(含 `pm:dispatched`),再跟引用与关键词。
72-
- 同文件同机制 = 同一发现,不分车道,首触定级即并:证据搬先卡,后卡关 `duplicate_of`。
70+
- 同文件同机制 = 同一发现,不分车道即并:证据搬先卡,后卡经中继 `issue_patch` 关 `duplicate`。
7371
- 同族发现并入收口卡,不开单点卡;在飞(assignee/open PR)永不并,`Blocked-by:` 不派;完工查过期。
7472
- 执行席 ⛔ 不并卡,疑重复挂 `pm:retriage` 写明哪两张同文件同机制;同 assignee 者自关后卡。
73+
- 关重复卡须目标具名且新读重叠;追踪父单 `Part of #n` 子卡全关、无 open 工作 ⇒ `completed`。
74+
- 关卡先贴签名评论点名裁决与证据;⛔ 是非关、活认领卡、安全卡不在此权,归维护者。
7575
- 首触答责任三问:谁的代码出险/有正路否/谁可达且有人用否;据答改卡范围、域与路由。
7676
- 三类外不可逆或有硬时限(发版即固化、只被消费的文件、过窗不可补)⇒ 不关,报维护者。
7777
- 三类外首触关闭只清门前存量,关 not planned(不等批准可否决重开);三类内无证据拒收。
7878
- 三类内再过时前提检查,三选一:晋级 / 关闭 not planned / hold;判级只在此轮,不在立单时。
79-
- ⛔ 带 `pm:dispatched`/assignee/open 或 merged PR 引用的卡不动;例外:下三行、main-red 锚卡首触。
79+
- ⛔ 带 `pm:dispatched`/assignee/open 或 merged PR 引用的卡不动;例外:关卡行、下三行、锚卡首触。
8080
- 在飞活性复查:认领逾一天无自有产出(commit/PR/评论)⇒ 敲门一次,首行键 `Owned-24h re-check:`。
8181
- 敲门后 `RECLAIM_AFTER_HOURS = 12` 小时无答复 ⇒ `label-write.mjs --release` 一笔中继释放,贴不动。
8282
- 释放:`Release:` 评论(出处三件)+ `Resume-from:` 行 + `pm:dispatched`→`pm:queue` + 清 assignee。

0 commit comments

Comments
 (0)