Repository navigation
Commit 41b64bb
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
- references
- scripts/pm
- fleet-write
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
478 | 484 | | |
479 | 485 | | |
480 | 486 | | |
| |||
1259 | 1265 | | |
1260 | 1266 | | |
1261 | 1267 | | |
1262 | | - | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
1263 | 1274 | | |
1264 | 1275 | | |
1265 | 1276 | | |
| |||
1335 | 1346 | | |
1336 | 1347 | | |
1337 | 1348 | | |
1338 | | - | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1339 | 1355 | | |
1340 | 1356 | | |
1341 | 1357 | | |
| |||
1423 | 1439 | | |
1424 | 1440 | | |
1425 | 1441 | | |
1426 | | - | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
1427 | 1449 | | |
1428 | 1450 | | |
1429 | 1451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
973 | 976 | | |
974 | 977 | | |
975 | 978 | | |
| |||
1434 | 1437 | | |
1435 | 1438 | | |
1436 | 1439 | | |
1437 | | - | |
| 1440 | + | |
1438 | 1441 | | |
1439 | 1442 | | |
1440 | 1443 | | |
| |||
1937 | 1940 | | |
1938 | 1941 | | |
1939 | 1942 | | |
| 1943 | + | |
1940 | 1944 | | |
1941 | 1945 | | |
1942 | 1946 | | |
| |||
0 commit comments