Skip to content

Commit 41b64bb

Browse files
feat(pm): no open card leaves a lane without a state; triage sweeps the five disjunctions exactly (#33510)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X46rM3rV3M1PPvPksR8k4mL)_ Fixes #33484 domain:skills#1 · os-project-manager · session_01FEkQ5kK93Ye36vSYWspFwu Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:写入门禁现在拦两种半写:开着的卡被摘掉最后一个 `pm:*` 状态却不补态(除非同笔补态、补 `needs-user-decision` 或关卡),以及停放态(queue/blocked/hold)的卡留着 assignee。三个写口共用一个判定:`label-write.mjs`、中继的 actions 文件入口 `fleet-write/dispatch.mjs`、`close-cards.mjs`。新增 `scripts/pm/first-touch-sweep.mjs`,按分诊职责原文跑五个析取、全量翻页、与平台 `total_count` 对数,不等即 `INCOMPLETE`。技能文字补四处:`Part of` 落地后剩余物落车道一态、留守卡落态、搁置同笔降 p3 并记 `Restart-grade:`、「待维护者」逐张列卡龄。 - 为什么改:27 张 p1 只有 5 张在队列,主因是摘 `pm:dispatched` 不补态的半写,加上分诊的兜底筛查是窄化的手敲版(① 当「无标签」、③ 漏跑、截 12 条)。 - 风险与回滚:只动 PM 工具与技能文字,不碰产品包;新拒收只在写会留下无态卡或带人停放卡时触发,`--release` 照常合法(自测钉住)。回滚即还原本 PR。 - 先看:`scripts/pm/label-write.mjs` 的 `refuseStatelessWrite`;`scripts/pm/fleet-write/dispatch.mjs` 的 `stateGuardRows`/`readStateGuard`;`scripts/pm/first-touch-sweep.mjs` 的 `classify`。 - 两分钟验证:`node scripts/pm/first-touch-sweep.mjs --self-test`,预期 `✓ first-touch-sweep self-test: 45 cases pass across 5 batteries`。 - 需要你做的:无,席位落地(受管面 Tier S,席内契约复审后入队)。 ## What changes **Item 1 — the stateless write, one predicate at every door that strips a state.** - `scripts/pm/label-write.mjs`: new `refuseStatelessWrite` (exported with `PARKED_STATE_LABELS`, `STATELESS_RULE`, `PARKED_RULE`), asked at step ② on step ①'s own read, before the transport, for the plain write, `--comment-file` and `--release` alike. Two halves: - the strip: a `pm:*` state the target drops on an OPEN issue while the target carries no state at all is refused (exit 2, zero writes). Legal exits: the same write adds another state, adds `needs-user-decision`, or closes the card; a card with two states losing one keeps one and passes (the ONE-OF repair). - the holder: a target parked in `pm:queue` / `pm:blocked` / `pm:on-hold` that keeps an assignee is refused when the write moved a state or an assignee. A write that moved neither (a regrade, a domain) did not make the pair and passes, so triage's hold regrade is never blocked by an old assignee. - A pull request carries no card state, so it is never judged (the kind rule's cleanup stays legal). Labels compare case-insensitively. No flag lets either half through. `--release` (`pm:dispatched` to `pm:queue`, every assignee cleared) is pinned legal. - `scripts/pm/fleet-write/dispatch.mjs` (the relay's actions-file door): `stateGuardRows` picks each card a stroke takes a `pm:*` state off, parks, or assigns someone to (only the read knows whether it already sits parked), without closing; `readStateGuard` reads it once (sharing the kind rule's read of the same card, so one GET per number); `judgeStateGuard` applies the stroke's steps in order and asks label-write's predicate. Refused is exit 2, unreadable exit 3, nothing sent for the whole file, dry run included. A stroke closing its card reads nothing. - `scripts/pm/close-cards.mjs`: `packCard` asks the same row picker of its pack and refuses one that strips without closing; the self-test pins that every pack closes what it strips. **Item 4 — `scripts/pm/first-touch-sweep.mjs` (new, report-only).** Walks every open issue over REST (`/issues?state=open`, every page, pull requests dropped), compares the count with `GET /search/issues` `total_count` (and `incomplete_results`), and runs ① to ⑤ as `triage-duties.md` writes them: ① no `pm:*`, no `needs-user-decision`, no `domain:*` (a `finding` card with no domain is bare); ② `pm:queue` without `domain:*` on the multi-lane board; ③ `domain:*` with no pm state; ④ `pm:queue` + `domain:*` without `priority:*`; ②③④ settle 2 minutes; exclusions `tracking`, `status:parked`, `pm:seat`, `qa-run`; ⑤ with `--since`, created in the window with `pm:queue` / `priority:*` labelled in the creation minute (read from label events, never by actor). Exits 0 complete with all five run, 2 usage, 3 prerequisite, 4 `sweep INCOMPLETE` or `sweep PARTIAL` (no `--since`, ⑤ not run). Its self-test pins every rule phrase it is built from as a substring of `triage-duties.md`. **Items 2, 3, 5 — pm-dispatch text.** - `references/state-machine.md`: 「开着的卡离手恒落一态」 in the cross-state rules; on-hold: entering hold lowers the card to `priority:p3` in the same stroke with ` · Restart-grade: pN` at the end of the `Restart-when:` line, a restart restores it, trackers and epics the same. - `SKILL.md` state table: the queue row keeps 「`pm:queue` 卡恒无 assignee,有即半态」 verbatim and adds `pm:blocked`/`pm:on-hold`; the `pm:on-hold` row names the p3 drop and `Restart-grade:`. - `references/landing-operations.md`: the `Part of` close-out says what to do: in the MERGED stroke the remainder takes a state for its lane (`pm:queue` + its lane's `domain:*`, re-domained if it belongs to another lane; `pm:blocked` + `Blocked-by:`; hold + `Restart-when:`), the assignee cleared, and a comment says what was delivered and who owns the rest. - `references/seat-lifecycle.md`: a stay-behind card takes its lane's state in the `seat-offline` stroke; one that does not, triage sets on reading that knock, in that round. - `references/triage-duties.md`: the 「待维护者」 list names every open `needs-user-decision` and `pm:awaiting-maintainer` card with its age; the five disjunctions run through the script, never narrowed by hand; the self-repair hold line takes the p3 drop. - `scripts/pm/check-skill-line-ratchet.mjs`: four ruled raises, see Verification. ## Why Measured by triage on `main` the filing evening and quoted on the card: of 27 open p1 cards, 5 were queued; #32087 and #32908 (p1) and #32984 and #33353 (p2) had `pm:dispatched` removed with no state added; the `finding` cards #33402 to #33404 waited about three hours because the hand sweep ran ① as `no:label`, skipped ③ and cut results at 12. Ruling: the maintainer in the triage seat's session, 「优化建议,可以skills立卡优化」 (quoted on the card). Live read of the new sweep on this branch, 2026-11-14 22:40Z: 326 open issues walked over 5 pages, platform count 326, complete; ① 4, ② 0, ③ 0, ④ 0, ⑤ 22. ## Acceptance notes - **The holder half and 「工已完而被门禁卡住的同用本态」.** The `pm:blocked` row lets a card whose work is done but held by a gate use `pm:blocked`, and in-flight cards keep their assignee until MERGED. The card names `pm:blocked` among the parked states, so such a card must now clear its assignee when it enters `pm:blocked`. On the board today 2 of 24 open `pm:blocked` cards carry an assignee; they are not refused for unrelated writes (a write that moves no state and no assignee passes). If the seat wants done-and-gated cards to keep their holder, that is a one-line carve-out and a ruling. - **⑤ matches cards filed with labels at creation** (seat-filed cards through `issue-create.mjs` carry `pm:queue` and `priority:*` from the first minute): 22 in the last 4.5 h, #33484 itself among them. That is the rule as written (「照未分诊首触;⛔ 不凭 actor」); the script does not read triage's audit comments, so a card already first-touched still lists until the window moves past it. - **The new self-test is not yet run by CI.** Wiring it needs a root `package.json` alias and a step in `.github/workflows/lint.yml` (Tier H), both outside this order's surface. `check-self-test-wired` does not flag it because no workflow runs the script. Carrier: the skills seat, as a follow-up. - **Triage's patrol prompt is not held in the repo**: the routine fires the skill, and `triage-duties.md` (read every fire) now names the script. - An `assign`-only stroke through `dispatch.mjs` reads its card and is refused onto a parked card, as `label-write.mjs` refuses it on its own read (review round 1, S1). - Without `--since` the sweep skips ⑤, so its verdict is `sweep PARTIAL` and its exit 4; `CLEAN` and exit 0 need a complete walk on which all five ran (review round 1, S2). - Not done here, per the order: the regrade of #27124, #27287 and #32481 (triage's, after this lands). No card was relabelled. ## Verification Size: 10 files, +874 / -29 (under the 3000-line line). - `node scripts/pm/dispatch-gates.mjs --commands` derived 51 gate families for this diff; all 51 ran green at head `d00151d4`, after the lint closure was built under the build lock. - `dispatch-gates --ran` reconciliation: `51 derived famil(ies) accounted for — 51 run, 0 NOT-MEASURED (a DERIVED zero — all 51 recorded an exit code and none of them is 3)`. - Also run, not derived: `node scripts/pm/first-touch-sweep.mjs --self-test` (45 cases, 5 batteries) and the fleet-write execute self-test. - Self-test counts: label-write 223, fleet-write dispatch 399, close-cards 228. <details><summary>Gate commands and exits (head d00151d)</summary> ```text 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/check-declaration-mirrors.mjs :: exit 0 node scripts/check-declaration-mirrors.mjs --self-test :: exit 0 node scripts/check-self-test-wired.mjs :: exit 0 node scripts/check-self-test-wired.mjs --self-test :: exit 0 node scripts/check-self-test-workflow-commands.mjs :: exit 0 node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0 node scripts/check-whole-set-label-write.mjs :: exit 0 node scripts/check-whole-set-label-write.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/pm/bare-root-worklist.mjs --self-test :: 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 pnpm check:agent-test-spelling :: exit 0 pnpm check:bash32-floor :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:cli-command-ids :: 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:entry-guard :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:parse-guard :: exit 0 pnpm check:pm-close-cards :: exit 0 pnpm check:pm-dispatch-gates :: exit 0 pnpm check:pm-expected-skips :: exit 0 pnpm check:pm-fleet-write-dispatch :: exit 0 pnpm check:pm-fleet-write-execute :: exit 0 pnpm check:pm-fleet-write-validate :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-governed-prose :: exit 0 pnpm check:pm-half-states :: exit 0 pnpm check:pm-issue-create :: exit 0 pnpm check:pm-issue-transfer :: exit 0 pnpm check:pm-label-write :: exit 0 pnpm check:pm-post-stamped :: exit 0 pnpm check:pm-record-recognisers :: exit 0 pnpm check:pm-skill-id-lint :: exit 0 pnpm check:pm-skill-ratchet :: exit 0 pnpm check:pm-write-pace :: exit 0 pnpm check:pnpm-filter-targets :: exit 0 pnpm check:pnpm-flag-spellings :: exit 0 pnpm check:ratchet-remedy-authority :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:scripts-symbol-anchors :: exit 0 pnpm check:skill-frame-sync :: exit 0 pnpm check:watch-hint-literal :: exit 0 node scripts/pm/first-touch-sweep.mjs --self-test :: exit 0 ``` </details> <details><summary>Tier and governed readings</summary> - `dispatch-gates --tier`: MANDATORY contract-review tier (clause ①: `.claude/skills/pm-dispatch/SKILL.md` is in the diff). This thread ran at the claim's model; the seat's in-seat contract review is the owed record. - `node scripts/pm/check-governed-merges.mjs --branch HEAD`: GOVERNED, Tier S (席内达档复核落地). 5 of 10 paths hit the register (`.claude/**`); the five `scripts/pm/**` files are not on it. </details> <details><summary>Line ratchet: four ruled raises, +6 lines</summary> Ruling of record: the maintainer in the triage seat's session, 2026-11-14, 「优化建议,可以skills立卡优化」, quoted in the body of #33484; claim comment 6885221965. Each raise is recorded in its `CEILINGS` comment. - `references/state-machine.md` 41 to 43 (+2): the stateless rule and the hold grade line. Every bullet already sits at its 120-byte minimum. - `references/landing-operations.md` 107 to 108 (+1): the `Part of` pair became three lines. - `references/seat-lifecycle.md` 98 to 99 (+1): the stay-behind state. - `references/triage-duties.md` 101 to 103 (+2): the awaiting list with age, the sweep script; the self-repair line took the p3 drop in place. - `SKILL.md`: 319 to 319 lines; two table rows edited in place, the widest row unchanged. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5kK93Ye36vSYWspFwu <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 498c967 commit 41b64bb

10 files changed

Lines changed: 874 additions & 29 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
101101

102102
| issue 上的信号 | 含义 |
103103
|---|---|
104-
| open + 队列标签 + 无 assignee | 可派发(同卡带 `pm:retriage` 的除外);`pm:queue` 卡恒无 assignee,有即半态 |
104+
| open + 队列标签 + 无 assignee | 可派发(同卡带 `pm:retriage` 的除外);`pm:queue` 卡恒无 assignee,有即半态;`pm:blocked`/`pm:on-hold` 同 |
105105
| assignee 已设 | 已认领/在飞,不是你的就永不碰;离手恒走释放 —— 三因 = 改路由(限未派发)、前提证伪、弃飞无接管,去向 = 新标签态或车道;在飞卡跟到 MERGED,⛔ 不静默摘 assignee |
106106
| `pm:dispatched` | 已派发(派发评论记轮次),恒带 assignee;与摘 `pm:queue` 同一次标签写入成对落地 |
107107
| `needs-user-decision` | 决定待做:永不派发、永不代答;维护者的决策收件箱,只挂决策卡(issue)、⛔ 永不挂 PR,只由人工裁 |
108-
| `pm:on-hold` | 决定已做且答案是暂不做:不派发不催;仅当带机器可读 `Restart-when:` 行才合法 |
108+
| `pm:on-hold` | 决定已做且答案是暂不做:不派发不催;仅当带机器可读 `Restart-when:` 行才合法;入态同笔降 `priority:p3`,原级记 `Restart-grade:` |
109109
| `pm:blocked` + 正文行 `Blocked-by: #N` | 等上游:选择期跳过,#N 关单(PR 则合并,关而未合并不放)时由解锁扫描或 `scheduled-full-run-card.yml` 放回;工已完而被门禁卡住的同用本态;双通道行首 `Blocked-by:` 指向无 `Ruled:` 的 open `needs-user-decision` 卡 ⇒ ⛔ 不派发,直至其 `Ruled:` |
110110
| `pm:awaiting-maintainer` | 决定已做,只剩一次 GitHub 之外的人工动作:不派发不催;与其它 pm 状态标签互斥;入态恒带行首 `Maintainer-action:` 行(细则见 `references/state-machine.md`),无行即半态 |
111111
| `pm:blocking` | 有 open 下游依赖者(自 `Blocked-by:` 索引推导的缓存,⛔ 不手工挂);进选择全序 |

‎.claude/skills/pm-dispatch/references/landing-operations.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@
6565
- 零 `enqueued` 事件按序查三条:① `mergeable_state` 是否 `dirty`。
6666
- ② enable-auto-merge 调用根本没落地,重发与效果验证序列见 `platform-readings.md`。
6767
- ③ PR 碰 `.github/workflows/**`:令牌常驻 `workflows: write`(裁决评论 6104822731),仍拒即授权漂移。
68-
- 确认 MERGED 同一动作里给 `Part of` 卡收口、`Fixes` 卡代关但标也须摘,⛔ 不拆到下轮巡检。
69-
- 摘标换回 `pm:queue` 或按剩余物定级,加一条写清交付了什么、剩下归谁的评论。
68+
- MERGED 同笔收口:`Fixes` 卡代关亦摘标;`Part of` 卡剩余物落其车道一态并清 assignee。
69+
- 一态 = `pm:queue`+其车道 `domain:*`(归他车道即改域)/`pm:blocked`+`Blocked-by:`/hold+`Restart-when:`。
70+
- 同笔评论写清交付了什么、剩下归谁;摘态不补态由写门拒收(`state-machine.md` 跨状态通则)。
7071
- 每次合并后重拉一次车道盘点与预期状态对账,⛔ 不留给下轮巡检。
7172
- 取 open 卡清单对照预期 diff:预期之外从 open 消失的,就是被闭合关键词静默误关的卡。
7273
- 落地后再核一次落地判据本身:队列的合并同样走 os-regen,A 的静默吞并一样能发生。

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
- 下班席(`seat-offline`,或两敲 `Request: progress` 无答走接管四件)的在飞归同车道在线兄弟席。
4242
- 兄弟席 `Resume-from:` 引简报或轮次记录认领;待裁先等字;无兄弟席「待席」;公告归安全席。
4343
- 离任留守只写点名的已 ACCEPT 待队列或待人批 PR,⛔ 不读队列、不新派发、不碰未点名卡。
44+
- 留守卡在 `seat-offline` 同笔落其车道一态并清 assignee;漏者分诊读到该敲门当轮代落。
4445
- 换班报告默认零建议,只收三类:原则错/缺、可机械化项、平台事实变化(事实表改一行)。
4546
- 原则错/缺 → 只进简报,维护者点名才立卡;可机械化项 → 门禁/脚本卡,⛔ 不是散文。
4647
- 后两类以 `finding` 入 skills 车道,首触归分诊席;三类之外默认关 not planned。

‎.claude/skills/pm-dispatch/references/state-machine.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
- 六态 ONE-OF 的成因恒是半写的转换;判定以 `check-half-states.mjs` 的 H29/H30 为权威。
88
- 生成物不分叉:`skills/**` 生成器产物跑 `check-governed-merges.mjs --test`,⛔ 不按路径手判。
99
- 交接即标签:只写交接评论而不同笔挂标 = 空交接,收件箱只认标签。
10+
- 开着的卡离手恒落一态:摘 `pm:*` 态同笔补下一态、`needs-user-decision` 或关卡;写门拒半写。
1011

1112
## `pm:on-hold`
1213

1314
- 合法性:正文或评论带 `Restart-when: closed <owner/repo>#N`,由 `Blocked-by:` 同遍解锁扫描点火。
1415
- 或带 `Restart-when: <一行可执行判据>`;两种拼写之外的 hold ⛔ 不合法。
1516
- hold 评论写明日期、理由与出处(维护者裁或座位定级),⛔ 不设第二个标签区分两者。
17+
- 入 hold 同笔降 `priority:p3`,`Restart-when:` 行尾记 ` · Restart-grade: pN`;重启复原,跟踪卡/专题同。
1618
- 冻结(freeze)裁决与 `pm:on-hold`+`Restart-when:` 同笔落地;只写评论不挂标 = 半状态。
1719
- 机会主义重启的触发文件走 `Restart-touch: <仓内相对路径>`,一行一路径,值须为 tracked 文件。
1820
- 该行大小写敏感、行锚定,与另两行同双通道,喂 H17 触发文件索引;存量 hold ⛔ 不迁移。

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
- 每条枚举比对返回数与 `totalCount`,不等 ⇒ 报 `sweep INCOMPLETE` 点名缺口,⛔ 永不报干净。
1313
- 轮次记录按车道计欠审逾一轮的 head 数并点名车道(`check-owed-reviews.mjs`),只报 ⛔ 不接审。
1414
- 每日看板与轮次记录列「待维护者」:当前里程碑已清的专题,注小结贴否;读数非门禁。
15+
- 「待维护者」另逐张列 open `needs-user-decision` 与 `pm:awaiting-maintainer` 卡,注入态以来卡龄。
1516
- 析取 ①全裸(无 `pm:*`/`needs-user-decision`/`domain:*`);② `pm:queue` 无 `domain:*`(仅多车道仓);
1617
- ③ `domain:*` 无 pm-state;④ `pm:queue`+`domain:*` 无 `priority:*`;②③④ 只取 `updated_at` 早于 ~2min。
1718
- 排除 `tracking`、`status:parked`、全部 `pm:seat` 贴、`qa-run` 记录。
1819
- 析取 ⑤:窗内新建且 `pm:queue`/`priority:*` 与建卡同分钟,照未分诊首触;⛔ 不凭 actor。
1920
- 首触定级与五析取 sweep 每 fire 跑到清空,先于旧卡重验:⛔ 无每轮预算、无逐卡豁免评论。
21+
- 五析取由 `node scripts/pm/first-touch-sweep.mjs --since=ISO` 照原文全量跑,⛔ 不手敲窄化或截断。
2022
- 排序:每轮清空时最新优先,清不空起最老优先;半状态积压 ②③④ 恒最老、P0 嫌疑先行。
2123
- 裸卡数 >15 ⇒ 下一 fire 整轮改域分批集中模式,每批 ≤5 张同族卡,照样跑到清空。
2224
- 紧急卡直接分诊:维护者点名或 p0 嫌疑 ⇒ 立即起默认判断档分诊子代理,不等定时轮。
@@ -40,7 +42,7 @@
4042
- 或实测拖慢车队开发:正确源上假红/假绿、反复重跑、同因丢复核轮;卡须具名实例。
4143
- `pm:queue` 也收恢复不变量的 finding、test-only pin,与实现未被裁错的说明书脱节(修文档)。
4244
- 入 `pm:queue` 前读最新转换评论(dispatch-runbook 状态提取):hold/冻结/裁决 ⇒ 分诊自补半状态。
43-
- 自补 = 同笔 `pm:on-hold`+引原文 `Restart-when:`;写不出可执行判据才挂 `pm:retriage` 问所属车道。
45+
- 自补 = 同笔 `pm:on-hold`+原文 `Restart-when:`+降 p3;写不出可执行判据才挂 `pm:retriage` 问车道。
4446
- `needs-user-decision` = 设计卡、feature/契约形状提案、需要 appetite 的多周程序;只挂 issue。
4547
- 先例已定新键/值/导出名非契约形状提案;分诊审计 ⛔ 不自加门,唯语义/形状真分歧呈人。
4648
- 碰迁移形状或删已发布能力也进决策箱;说明书脱节不进:有裁定出处才是 (b),否则改文档。

‎scripts/pm/check-skill-line-ratchet.mjs‎

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,13 @@ export const CEILINGS = new Map([
474474
// SKILL.md). Landed count, headroom 0, same convention (lowering is always
475475
// legitimate). Lowered 42 → 41 when the retired contract-review label's
476476
// card-side-first line left (ruling record 5770886272 on #19061).
477-
['.claude/skills/pm-dispatch/references/state-machine.md', 41],
477+
// Raised 41 → 43 by the no-stateless-card rules (an ORDINARY ruled raise; ruling of record:
478+
// the maintainer in the triage seat's session, 2026-11-14, verbatim: 「优化建议,可以skills立卡优化」
479+
// on triage's five proposals; quoted in the body of card #33484, claim comment 6885221965).
480+
// Two lines: 开着的卡离手恒落一态 in the cross-state rules, and the hold-lowers-the-grade line
481+
// (`Restart-grade:`). Every bullet here already sits at its 120-byte minimum, so payment in place
482+
// would have deleted a ruled clause. Measured delta +2; landed count, headroom 0.
483+
['.claude/skills/pm-dispatch/references/state-machine.md', 43],
478484
// Raised 48 → 51 by the clause-② CONTENT-limb applicability ruling (maintainer
479485
// 2026-08-31, 第 6 场总监席决裁批 #12, verbatim 「同意」, adopting A + C: published
480486
// `skills/**` changes making a falsifiable operator/contract semantic claim fall
@@ -1259,7 +1265,12 @@ export const CEILINGS = new Map([
12591265
// maintainer's word), maintainer verbatim and untranslated: 「已经把 #3686 插到队首了,插队做不到,你应该立卡改进skills」;
12601266
// letter 「A」 recorded as comment 6729640900. Measured delta +5 (102 → 107);
12611267
// landed count, headroom 0.
1262-
['.claude/skills/pm-dispatch/references/landing-operations.md', 107],
1268+
// Raised 107 → 108 by the no-stateless-card rules (an ORDINARY ruled raise; ruling of record:
1269+
// the maintainer in the triage seat's session, 2026-11-14, verbatim: 「优化建议,可以skills立卡优化」
1270+
// on triage's five proposals; quoted in the body of card #33484, claim comment 6885221965).
1271+
// The `Part of` close-out pair became three lines: the remainder's state for its lane, the three
1272+
// legal states, and the comment plus the write door's refusal. Measured delta +1; headroom 0.
1273+
['.claude/skills/pm-dispatch/references/landing-operations.md', 108],
12631274
// Release-aftercare duties — what a lane PM still owes AFTER a tagged release
12641275
// rolls to production, which the landing window (ends at MERGED) never
12651276
// covered: post-roll placement/latency reading with the waker-bias re-draw
@@ -1335,7 +1346,12 @@ export const CEILINGS = new Map([
13351346
// record: amendment 6595840476 on #29754 (maintainer 「同意:下班席位的卡交给
13361347
// 兄弟席」), which names this file, under #29775 letter A, record 6595514258
13371348
// (「同意29775 A」). Measured delta +2 (96 → 98 lines); landed count, headroom 0.
1338-
['.claude/skills/pm-dispatch/references/seat-lifecycle.md', 98],
1349+
// Raised 98 → 99 by the no-stateless-card rules (an ORDINARY ruled raise; ruling of record:
1350+
// the maintainer in the triage seat's session, 2026-11-14, verbatim: 「优化建议,可以skills立卡优化」
1351+
// on triage's five proposals; quoted in the body of card #33484, claim comment 6885221965).
1352+
// One line: a stay-behind card takes its lane's state in the `seat-offline` stroke, or triage
1353+
// sets it on reading that knock. Measured delta +1; landed count, headroom 0.
1354+
['.claude/skills/pm-dispatch/references/seat-lifecycle.md', 99],
13391355
// The project coordinator's interface with the seat threads (maintainer's
13401356
// word, 2026-10-22, verbatim and untranslated: 「刚才你让我转帖的项目指令规则,为
13411357
// 什么不定义在仓库中呢,我只要穿到具体的车道就行。」): lane ownership on the seat
@@ -1423,7 +1439,13 @@ export const CEILINGS = new Map([
14231439
// never restating the six; no line of this file restates text another file
14241440
// carries, so a deletion would have dropped a live rule. Measured delta +1
14251441
// (100 → 101); landed count, headroom 0.
1426-
['.claude/skills/pm-dispatch/references/triage-duties.md', 101],
1442+
// Raised 101 → 103 by the no-stateless-card rules (an ORDINARY ruled raise; ruling of record:
1443+
// the maintainer in the triage seat's session, 2026-11-14, verbatim: 「优化建议,可以skills立卡优化」
1444+
// on triage's five proposals; quoted in the body of card #33484, claim comment 6885221965).
1445+
// Two lines: the awaiting-maintainer list with each card's age, and the five disjunctions run by
1446+
// `scripts/pm/first-touch-sweep.mjs`; the self-repair line took `+降 p3` in place. Measured delta
1447+
// +2; landed count, headroom 0.
1448+
['.claude/skills/pm-dispatch/references/triage-duties.md', 103],
14271449
// execution-duties.md, raised 183 → 185 by the split-off-card ruling — an
14281450
// ORDINARY raise, ⛔ not a cross-file move (card #23579). The text is two rule
14291451
// lines beside the derived-sub-issue rules in 〈候选与批次〉: a queued card found

‎scripts/pm/close-cards.mjs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ import {
272272
proxyRoute,
273273
resolveSweepRepo,
274274
} from './check-half-states.mjs';
275-
import { EXIT_UNCONFIRMED as DISPATCH_EXIT_UNCONFIRMED, exitForResult, packRequest, resolveRoute, sendFleetWrite, unconfirmedText } from './fleet-write/dispatch.mjs';
275+
import { EXIT_UNCONFIRMED as DISPATCH_EXIT_UNCONFIRMED, exitForResult, packRequest, resolveRoute, sendFleetWrite, stateGuardRows, unconfirmedText } from './fleet-write/dispatch.mjs';
276276
import { CLIENT_PAYLOAD_MAX_BYTES, TRANSPORT_ENV } from './fleet-write/ops.mjs';
277277
import { refusalText as relayRefusalText } from './fleet-write/validate.mjs';
278278
import {
@@ -970,6 +970,9 @@ export function packCard({ repo, session, issue, body, labels, reason, commentOn
970970
if (expectState && !(labels?.removeCalls ?? []).includes(expectState)) {
971971
return refuse(`the label plan does not strip \`${expectState}\`, so the pm-state this run acts on is not on the card`);
972972
}
973+
// The stateless write (label-write's header): a strip that does not close its card is judged on a read; every pack
974+
// here closes the card it strips, so the relay door's own row picker must answer "nothing to judge".
975+
if (stateGuardRows(actions).length > 0) return refuse('the pack takes a pm-state off a card it does not close, which the stateless write refuses');
973976
const packed = packRequest({ repo, session, actions, requestId, now });
974977
return { ...packed, actions };
975978
}
@@ -1434,7 +1437,7 @@ const SELF_TEST_BATTERIES = Object.freeze({
14341437
'the unreadable card: a verdict taken from nothing is not taken': 7,
14351438
'the dry run: a plan that proves it wrote nothing': 7,
14361439
'the sibling tools: driven, never re-implemented': 10,
1437-
'the relay pack: ONE card, ONE dispatch — comment → labels_remove → issue_patch — ONE write on the throttle': 12,
1440+
'the relay pack: ONE card, ONE dispatch — comment → labels_remove → issue_patch — ONE write on the throttle': 13,
14381441
'the size ceiling: a payload over 64KB is refused before it is packed, zero writes': 6,
14391442
'the read-back: step ④ reads the BOARD — comment, labels and close — and must MATCH': 9,
14401443
'the relay miss: a refused, failed or unconfirmed run is read back, never retried, never fallen back from': 8,
@@ -1937,6 +1940,7 @@ export async function selfTest() {
19371940
t('…the comment is the card`s own text, stamped on the act`s clock', ok.sent[0].actions[0], { op: 'comment', issue: 61, body: 'Closed #61 2026-09-23T12:00Z — ruling for this card.' });
19381941
t('…the strip is the pm-state, the close carries the row`s reason', [ok.sent[0].actions[1], ok.sent[0].actions[2]], [{ op: 'labels_remove', issue: 61, labels: ['pm:queue'] }, { op: 'issue_patch', issue: 61, state: 'closed', state_reason: 'not_planned' }]);
19391942
t('…the envelope carries the session and the target', [ok.sent[0].session, ok.sent[0].repo], [SELF_TEST_SESSION, 'objectstack-ai/objectstack']);
1943+
t('the stateless write: the pack closes the card it strips, so the relay door judges nothing — and the same strip without its close would be judged', [stateGuardRows(ok.sent[0].actions).length, stateGuardRows(ok.sent[0].actions.filter((a) => a.op !== 'issue_patch')).length], [0, 1]);
19401944
t('⛔ no write verb left this process — the reads (card, timeline, thread), then the read-back reads', ok.api.calls.map((c) => c.kind), ['read', 'timeline', 'comments', 'read', 'comments']);
19411945
t('the summary counts one dispatch — one throttle write — per closed card', /1 closed \(not_planned 1\) · 1 dispatch\(es\) sent — 1 write\(s\) on the throttle/.test(ok.text));
19421946
const two = await driveOffline({ rows: [ROW(62), ROW(63, { reason: 'completed' })] }, { cards: { ...QUEUED(62), ...QUEUED(63) } }, { route: dispatchRoute(), relay: 'success' });

0 commit comments

Comments
 (0)