Skip to content

Commit af997d9

Browse files
feat(pm): card-pick reader, os-verify-lock --depth and check-prior-rulings --paths replace three retyped procedures (#35482)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgXFRsfSS1tQB1kBxAZ86579)_ Part of #35237 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:产品用户看不到变化;车队席位从此一条命令就能拿到"下一张该取哪张卡"的排序清单,连同其余每张卡为什么不能取;派发前查排队深度、查旧裁决和前提是否过时,也各自变成一条命令。 - 为什么做:这几步过去每轮都由席位照着规则文字手工重做,容易漏读、取错卡;交给脚本后规则只算一遍,规则文字一改,脚本自检就会报红。 - 出错会怎样:三个脚本只读不写,出错最多是给席位一个错误的排序或读数,认领前的复读仍然把关;读不全时它们明说"不完整",不会给出看似干净的结果;旧裁决是否被引用由席位逐行读,脚本只列出要读的行。 - 要你做什么:无,席位按审核记录落地。 ## What changes This is slice 1 of the card: three readers replace three procedures that the dispatch rules spell as prose and that every executing seat retypes. Each prose passage shrinks to a pointer naming the command. - **`scripts/pm/card-pick.mjs` (new).** Read-only. It lists every open `pm:queue` issue (every page, the count checked against the platform's search total), reads each named epic's sub-issue order, and ranks the cards by `docs/NORTH-STAR.md` "Priority" rule 3: p0, then p1 from any area, then the `--order` items in turn (an epic by its child order whatever the grade; an area by its p2 cards, then its p3 cards under the leg `order k p3 close-out`), then the ungraded leg. An area's p3 ranks after every p2 of that item and before the next item, so an area holding only p3 cards yields its p3 as the next pick. At one grade it orders a non-fleet card first, then a Bug, then the oldest card. A card is not a pick when it has an assignee, `pm:dispatched`, `needs-user-decision`, `pm:retriage`, a second pm state, an epic or tracking parent, an open line-start `Blocked-by:` target in the body or a comment (a PR target holds until it merges), a newest `Claim:` with no `Release:` after it, or (a fleet card) no triage audit record. Every row prints the card's `domain:*` labels. `--why` prints every other queue card with its named blocking point. Threads are read lazily in rank order, all of them with `--why`. The footer always names the seven legs it cannot read: the maintainer's direct dispatch, the contract-surface leg, a `tooling` card's three-gate admission, the multi-seat alternation, batching a p3 onto a PR, lane ownership (a `domain:*` card outside the seat's lane, a cloud card or a security card is listed but may not be claimed) and an area item that holds a sub-epic (rule 3 ③ binds that sub-epic's child order; name it as `epic:#N` to get it). Flags: `--repo --order --seat --limit --why --json --fixture --now --self-test`; `--order` with no value is a usage error, `--order ""` is the p0/p1-only order; `--seat` parses by the seat signature's own grammar, so an epic seat's `epic:#N#1` is accepted. Exits: 0 complete, 2 usage, 3 queue unreadable, 4 incomplete. A thread, a `Blocked-by:` target or a sub-issue parent that cannot be read makes the run incomplete with the gap named, and every card such a read holds is printed even without `--why`. - Reused, not re-spelled: from `check-half-states.mjs` `blockerTargetsFor` (which wraps `blockedByTargets` and `commentBlockedByTargets`), `blockerResolutionFromRow`, `isFleetCard`, `readSignatureLine` and `SEAT_SIGNATURE_LINE`, `markerMatches` with the claim and release markers, `gradeRung` / `GRADE_LADDER`, `h67ReadOrder` (the same-grade age order; a stable sort adds the Bug tiebreak above age) and H74's triage-audit reader with its parent read. From `gh-pages.mjs`: `readAllPages`, `ghApi`. - **`scripts/pm/os-verify-lock.sh --depth`.** A read-only mode next to `--status`. It prints `depth D (queue Q + 1) · hold at 2 → go|wait`, without counting the holder, parked slots or dead tickets. It counts WITHOUT pruning: it judges each ticket with the same `ticket_state` and leaves a dead ticket in place, naming it, so the next `--status` still prints that ticket's liveness verdict (`queue_live` would delete it, and `--depth` runs before every dispatch). On a host with no usable `flock` it discloses DECLARED UNLOCKED MODE as `--status` does. It exits 0 for go, 1 for wait and 3 when the liveness probe is unlit or the host cannot operate the lock (never read as depth 1). `LOCK_DEPTH_HOLD=2` now lives in the script. - **`scripts/pm/check-prior-rulings.mjs --paths`.** The pre-dispatch premise readings over a declared file surface. - ① greps the four ruling words the rule names (`ruling`, `Ruling-ref`, `maintainer`, `⛔`), fixed-string, at the revision, and prints a per-word count with `file:line`. Whether a hit cites a ruling is a reading of the hit, so the reader does not classify it: per file it prints the reading owed, 「逐行读:引裁决 ⇒ id+原句入裁决区;不引 ⇒ 计数」, and never a count outcome. An id-shape match (`ADR-NNN` or a record id) is tagged on its line as a hint only, because a ruling is as often cited by name, date or card number (`ruling A′, 2026-09-13`, `ruling A+, #31491`). The one verdict it prints is 「零命中 → 无裁决」, and only when every declared path matched a file at the revision: a path that matched none is named and the clean verdict is withheld. When a word's hits pass the per-word cap, the rest are counted and the exact `git grep` that lists them is printed. - ② runs `git log -20` on the paths. When one of those commits is dated today (UTC), it prints `dispatch-runbook.md`'s same-day line verbatim. - ③ reads the `#N` and `owner/repo#N` refs the card body and its thread name, scoped to the swept repository: a ref in it is read for its state, merge, assignees and title; a ref in another repository of the same owner for open or closed and assignees only; a ref outside that owner is listed by number and not fetched; an `owner/repo` that is not two plain names (a dot-only segment, for one) is rejected and not fetched. It needs `--card`; without it the face says `not read`. - ④ names the faces it does not read under every run: the work-item face, GitHub URLs in the card or thread (listed by number) and cards named on ruling-hit lines (listed by number, not followed). - `--paths` alone skips the term search. - **`package.json`:** `check:pm-prior-rulings` now also runs `card-pick.mjs --self-test`. This adds no CI job: the existing "Prior-ruling reader self-test" step runs the chain. - **Prose, no ratchet ceiling touched:** - `execution-duties.md` (189 → 184): the ruling-area grep, the action face and the card-ref face become one pointer to `check-prior-rulings.mjs --paths`. The two depth lines become one pointer to `--depth`. The pick-order lines become one line that defines 标签序 as NORTH-STAR rule 3 with its last leg 无级, scoped to the lane's open cards, and points at `card-pick.mjs --order ORDER`. Kept as written: the candidate definition (「开放 = 未派发(无 `pm:dispatched`、无 assignee);在飞的 P0/P1 不挡任何候选,只余取卡全序。」), 取卡全序 with its three legs, the work-item face line, the cloud lane, the per-level reading, the same-grade line and the alternation line. - `seat-lifecycle.md` (99 → 98): the three queue-empty lines become two: the pointer to `card-pick.mjs --order ORDER --why` with 「无卡点即候选,⛔ 不得报空」, and the one blocking-point vocabulary, now with `outside --order`. - `coordinator.md` (51 → 51): the pick surface points at `card-pick.mjs --order ORDER`. The batch line keeps its rule sentence 「p0/p1 先,余照点名次序」 and names `card-pick.mjs` as its reading for queue cards; a PR row, a resumed card or a claimed card still takes the sentence. 「满即排队」 joins the free-slot line and 「交回或合入即释放槽位」 the slot-accounting line, so no line grows past 120 bytes. ## Live run Two runs against the board at head `1bdac164b5`. The first is the command as the pointer names it: `node scripts/pm/card-pick.mjs --order area:fleet --seat repo:objectstack#5 --why`, exit 0, 292 lines, trimmed: <details><summary>card-pick live output, --why (trimmed)</summary> ```text card-pick — objectstack-ai/objectstack · order area:fleet · seat repo:objectstack#5 · 2026-11-19T12:01Z read: 279 open pm:queue issue(s) over 3 page(s) · the platform counts 279 · threads 51 · Blocked-by targets 3 · parents 24 · epics 0 Picks (limit 5) — rank · #N · grade · area/epic · domain · type · leg · age · fleet: 1 · #35345 · p1 · area:ai · domain:skills · Task · p1 jump · 0d · non-fleet — skills: tell metadata-app projects what the platform already ships — a generated platform 2 · #34622 · p1 · area:cloud · domain:ui · Bug · p1 jump · 2d · fleet — Environment links to Cloud (storage upgrade, AI quota, marketplace) open the Cloud origin, 3 · #35446 · p1 · area:ux · domain:ui · Bug · p1 jump · 0d · fleet — 应用列表页在 AI 助手面板打开时:「操作」列压住金额列,后面的列看不到也没有提示(附效果图) 4 · #35449 · p1 · area:ux · domain:ui · Bug · p1 jump · 0d · fleet — AI approvals inbox (AiPendingActionsInbox) is unusable at phone width: the decision column 5 · #35455 · p1 · area:ux · domain:ui · Bug · p1 jump · 0d · fleet — Console first screen: about six serial API round trips (bundle before the first call, chai Not a pick (--why) — 274 card(s), each with its blocking point: · #25921 · p3 · area:fleet · domain:ui — Claim: by domain:ui#1 · #31112 · p3 · area:fleet · domain:skills — below --limit 5 (a candidate) · #31518 · p3 · area:fleet · domain:devx — below --limit 5 (a candidate) · #33768 · p3 · area:fleet · domain:skills — pm:retriage · #26688 · p3 · area:devpath,area:package · domain:devx — outside --order (p3 · area:devpath,area:package) · #31450 · p3 · area:ai · domain:skills — outside --order (p3 · area:ai) Not read by this reader — the seat reads these itself: · the maintainer's direct dispatch (取卡全序 leg 1, three provenance pieces) — not on the board as a label · the contract-surface leg (取卡全序 leg 2, `references/lanes/spec.md`) — a judgement over the diff, not a label · a `tooling` card's three-gate admission — triage's reading; flagged on the row, not judged · multi-seat odd/even alternation — the seat applies it to this list · batching a p3 onto a PR that touches the same files (rule ④'s "or batched") — a judgement over a diff; here every area p3 ranks as its close-out · lane ownership — a `domain:*` card outside this seat's lane, a cloud card or a security card is listed here but a seat may not claim it; read each row's `domain:*` against your lane · an area item that holds a sub-epic — ranked here p2 before p3, but rule 3 ③ binds that sub-epic's child order; name it as `epic:#N` in --order to get it card-pick COMPLETE — 5 pick(s) ``` </details> By first blocking point, the 274 non-picks are: 226 outside `--order`, 24 no triage audit, 21 candidates below `--limit 5`, 2 `pm:retriage`, 1 another seat's `Claim:`. The five picks are p1 cards, as rule 3 ② lets a p1 jump the named area whatever area it belongs to; each row now carries its `domain:*`, which is the seat's reading of lane ownership. The second run widens the limit to show the area's own order: `node scripts/pm/card-pick.mjs --order area:fleet --seat repo:objectstack#5 --limit 30`, exit 0, 26 picks: <details><summary>card-pick live output, --limit 30 (picks 8 to 26)</summary> ```text 8 · #35445 · p1 · area:ux · domain:ui · Feature · p1 jump · 0d · fleet — 应用里的 AI 助手面板:去掉「构建」字样与切换应用,标题栏收成一行;回答表格、「正在看」标签与输入区整理(附效果图) 9 · #35321 · p2 · area:fleet · domain:skills · Task · order 1 · 0d · non-fleet — governance: the guard scripts join the governed register, `.claude/**` lands by declared r [tooling: three-gate admission unread] 10 · #35322 · p2 · area:fleet · domain:devx · Task · order 1 · 0d · non-fleet — ci: a weekly merge-queue duration reading against a 22-minute median budget and a 32-minut [tooling: three-gate admission unread] 11 · #35470 · p2 · area:fleet · domain:skills · Bug · order 1 · 0d · fleet — Fleet patrol: stop asking pm:epic cards for a type, and stop asking run records for a grad [tooling: three-gate admission unread] … 26 · #34816 · p3 · area:fleet · domain:skills · Task · order 1 p3 close-out · 2d · fleet — pm-dispatch: execution-duties says a narrowing card is Clause-② no, AGENTS.md allows yes ( card-pick COMPLETE — 26 pick(s) ``` </details> Picks 1 to 8 are p1 jumps. The four area:fleet p2 cards come next, then its fourteen p3 cards as the close-out leg. ## Tests - `node scripts/pm/card-pick.mjs --self-test`: `✓ card-pick self-test: 62 cases pass across 8 batteries — offline, no network.` The batteries are pinned by name with a floor, plus the handshake. They pin: p0 above everything; an unnamed-area p1 beating a named-area p2; an area holding only p3 cards yielding p3 picks, a p2 always ranking ahead of a p3 in the same item, an item's p3 closing that item before the next item's p2, a p3 outside the order not picked, and an epic's children following child order whatever the grade; an open target blocking, a closed-unmerged PR target still blocking, a merged PR and a closed issue releasing, a comment-borne line holding, a cross-repo target read from its own repo; the same-grade tiebreaks; epic child order; the claim, release and triage-audit readings; paging, the count gap, `--limit` and `--why`; an unreadable thread, `Blocked-by:` target or sub-issue parent making the run incomplete with the gap named and the held card printed without `--why`; the CLI exits, `--order` with no value, `--seat` with an epic lane, the `domain:*` on the row and the seven-leg footer. The drift pin quotes NORTH-STAR rule 3's four clauses and asserts each present, alongside the execution-duties phrases, the state-machine phrases and the seat-lifecycle phrases (the pointer with `--order`, the vocabulary with `outside --order`). - `bash scripts/pm/os-verify-lock.sh --self-test`: `✓ os-verify-lock self-test: all cases pass.` Eight `--depth` cases: an empty queue reads depth 1 and goes; a host with no usable `flock` discloses DECLARED UNLOCKED MODE; the holder and a parked slot are not counted; a live waiter reaches depth 2 and exits 1; a dead ticket is not counted, is named, and is still on disk after the run; the next `--status` prints that ticket's liveness verdict; an unlit probe exits 3 and prints no depth; `LOCK_DEPTH_HOLD` equals the value the rule line names. - `node scripts/pm/check-prior-rulings.mjs --self-test`: `✓ check-prior-rulings self-test: 185 cases pass`. 30 of them are `--paths` cases (18 before this round). They pin: on a fixture shaped like the rule's worked example (`screen-input-contract.ts`, hits citing `ruling A′, 2026-09-13` and `ruling A+, #31491`), every hit is listed for reading under the reading owed and gets no count verdict and no 无裁决; an id shape is a hint, the same reading owed; a declared path that matched no file withholds the clean verdict and is named; past the per-word cap the rest are counted with the exact `git grep`; a ref outside the swept repository's owner is not fetched and is listed by number; a `../x#1` ref is rejected and not fetched; a same-owner ref prints open or closed and assignees, no title; same-day is the commit's UTC day, so a commit whose offset date is a different calendar day from its UTC date is judged by the UTC day; the log is `-20` at the revision on the declared glob pathspecs; the unread faces with their URL and ruling-hit refs; and the drift pins on execution-duties and on dispatch-runbook's same-day line. ## Acceptance notes - **Where the scoping note and `main` differ, `main` was encoded.** (a) The scoping note lists "no triage audit" as a blocking point. `seat-lifecycle.md`'s vocabulary on main says the same, so it excludes the card; it uses H74's reader, parent exemption included. (b) Main's label order ends with the ungraded leg, which the note did not list; it is encoded after every graded order item, and `execution-duties.md` names it (无级殿后). (c) Main says p3 is "left for the close-out or batched" and, in an area with no sub-epic, "p2 before p3". So an area's p3 cards are picks, ranked after every p2 of that item (leg `order k p3 close-out`). The reader cannot tell whether an area holds a sub-epic, so every area item ranks this way and the footer names that leg; a sub-epic named as an `epic:` item keeps its child order. Batching a p3 onto a PR is a judgement over a diff, so the footer names it as a leg the reader does not judge. (d) `tooling`'s three-gate admission is triage's reading; only one gate is a machine line. The row is flagged and the footer names the gap; nothing is excluded on it. - **Lane ownership is printed, not judged.** The reader lists the whole `pm:queue` board; a `domain:*` seat's candidate set is its lane, and a `repo:objectstack` seat does not claim a cloud card or a security card. The row's `domain:*` and the footer leg carry that to the seat; `execution-duties.md` scopes 标签序 to the lane's open cards. - **Not taken in this round:** 「裁决同罪」 (the old staleness line's "rulings too") has no successor line; the `--paths` pointer line has no room under 120 bytes, and the ruling-area step it names already covers rulings. The work-item face keeps its own line in `execution-duties.md` unchanged, and the reader now names it under every run as a face it does not read. - **The optional `lanes/director.md` rider was not taken.** That line re-runs the grep "逐仓" (per repo), and `check-prior-rulings.mjs` reads its tree corpora from this checkout only. A pointer would change the rule for cards in other repos, which this PR is not deciding. - **Remaining slices of the card** (separate PRs, `Part of`): landing reads (`landing-k`, `pr-state`, `sweep-closed-cards --pr`); the round health line (after #35373); in-flight status and round-open (after #35232 / #35235); the deferred `area-lease.md` and `dispatch-runbook.md` pointers; `l1-face`; the os-dev pointers (`git-history ancestor`, `dev-worktree`, after #35231). ## Verification <details><summary>Gates (local) and exits</summary> - At `8fee4048ce`: `node scripts/pm/dispatch-gates.mjs --commands` derived 82 families. Ran 82: 76 exit 0. 6 exit 3 PREREQUISITE NOT MET, read as NOT MEASURED because they need built `dist/` and this diff touches no workspace package: `check:doc-formula-expressions`, `check:dts-closure`, `check:dual-build-cjs-loads`, `check:i18n-coverage`, `check:lean-entry-closure` and `check:sourcemap-no-sources-content`. CI runs them on a built tree. `dispatch-gates --ran`: 82 derived, 82 run, 0 UNRUN. - Re-run after the `origin/main` merge, at `8fee4048ce`: - `node scripts/pm/check-skill-line-ratchet.mjs` → 0 - `pnpm check:pm-skill-ratchet` → 0 - `pnpm check:pm-skill-id-lint` → 0 - `pnpm check:pm-governed-prose` → 0 - `pnpm check:pm-prior-rulings` → 0 - `pnpm check:nul-bytes` → 0 - `node scripts/check-self-test-wired.mjs` → 0 - `node scripts/check-skills-token-ratchet.mjs` → 0 - the three self-tests → 0 - `node scripts/pm/overlap-check.mjs` → `VERDICT clean exit 0` (origin/main merges cleanly; 0 open PR heads share a file). - Re-run for the L1 fix round, at `6f40150dd0`: - `node scripts/pm/card-pick.mjs --self-test` → 0 (54 cases, 8 batteries) - `pnpm check:pm-prior-rulings` → 0 (check-prior-rulings 173 cases; card-pick 54 cases) - `node scripts/pm/check-skill-line-ratchet.mjs` → 0 (`execution-duties.md is 184 lines (ceiling 189; headroom 5)`) - `pnpm check:pm-skill-ratchet` → 0 - `pnpm check:pm-skill-id-lint` → 0 (`129 file(s) clean`) - `pnpm check:pm-governed-prose` → 0 - `pnpm check:nul-bytes` → 0 - `node scripts/check-self-test-wired.mjs` → 0 - `node scripts/check-skills-token-ratchet.mjs` → 0 - `node scripts/pm/overlap-check.mjs` → `VERDICT clean exit 0` (origin/main `6f36818f03` merges cleanly; the only PR head sharing a file is this PR's own) - Re-run for the L2 fix round, at `1bdac164b5`: - `node scripts/pm/dispatch-gates.mjs --commands` derived 82 families (it warns the tree is 7 commits behind `origin/main` with 1 derivation input changed across that range). Ran 82: 76 exit 0; 6 exit 3 PREREQUISITE NOT MET, read as NOT MEASURED because they need built `dist/` and this diff touches no workspace package: `check:doc-formula-expressions`, `check:dts-closure`, `check:dual-build-cjs-loads`, `check:i18n-coverage`, `check:lean-entry-closure`, `check:sourcemap-no-sources-content`. `dispatch-gates --ran` with each exit recorded: `82 derived famil(ies) accounted for — 76 run, 6 NOT-MEASURED (6 DERIVED from a recorded exit 3)`. - `node scripts/pm/card-pick.mjs --self-test` → 0 (62 cases, 8 batteries) - `node scripts/pm/check-prior-rulings.mjs --self-test` → 0 (184 cases) - `bash scripts/pm/os-verify-lock.sh --self-test` → 0 - `pnpm check:pm-prior-rulings` → 0 - `node scripts/pm/check-skill-line-ratchet.mjs` → 0 (`execution-duties.md is 184 lines (ceiling 189; headroom 5)`, `seat-lifecycle.md is 98 lines (ceiling 99; headroom 1)`, `coordinator.md is 51 lines (ceiling 51; headroom 0)`) - `pnpm check:pm-skill-id-lint` → 0 (`129 file(s) clean`) - `pnpm check:pm-governed-prose` → 0 - `node scripts/check-self-test-wired.mjs` → 0 - `node scripts/check-nul-bytes.mjs` → 0 - `node scripts/pm/overlap-check.mjs --branch=HEAD --exclude-pr=35482` → `VERDICT clean exit 0` (origin/main `f6902e9500` merges cleanly; 0 PR heads share a file) - Re-run for the S6 fix round, at `5255cb6b46`: - `node scripts/pm/check-prior-rulings.mjs --self-test` → 0 (185 cases) - `pnpm check:pm-prior-rulings` → 0 (check-prior-rulings 185 cases; card-pick 62 cases, 8 batteries) - `node scripts/check-self-test-wired.mjs` → 0 - `node scripts/pm/overlap-check.mjs --branch=HEAD --exclude-pr=35482` → `VERDICT clean exit 0` (origin/main `89ea9bf84b` merges cleanly; 0 PR heads share a file) </details> <details><summary>Ablations (scripts/ablation-replace.mjs: the mutation proven on disk, restored to the HEAD blob)</summary> - `card-pick.mjs`: `else if (res.unmerged)` → `else if (false)`. Self-test exit 1: `✗ ⭐ a closed-but-unmerged PR target still blocks — got "PICKED"`. Restored: blob == HEAD `1cc35e9b89bf`. - `card-pick.mjs`, the p3 close-out rule (at `6f40150dd0`): `rung === 3 && it.kind === 'area'` → `rung === 3 && it.kind === 'epic'`. Self-test exit 1, 3 of 54 red: `✗ …and the p3 rows name their leg — got "order 1|order 1|order 1"`, `✗ ⭐ an epic's children follow child order whatever the grade: a p3 first child ranks ahead of a p2 second child`, `✗ …under the epic child leg, never the close-out leg`. Restored: blob == HEAD `19f8a7fa2161`, `git diff HEAD` empty. - `os-verify-lock.sh`: `((depth >= LOCK_DEPTH_HOLD))` → `((depth > LOCK_DEPTH_HOLD))`. Self-test exit 1: `✗ --depth counts a live waiter: depth 2 reaches the hold and exits 1 (wait)`. Restored: blob == HEAD `b671fb071521`. - `check-prior-rulings.mjs`: deleted the zero-hit guard in `surfaceVerdict`. Self-test exit 1, 2 cases red, including `✗ --paths: ⭐ zero hits read 零命中 → 无裁决`. Restored: blob == HEAD `de1240b3da76`. - L2 fix round, at `1bdac164b5`: - `check-prior-rulings.mjs`, the id-regex classifier put back in `surfaceVerdict` (a hit set with no id shape answers `命中 N 行,无裁决 id → 写命中数 N`). Self-test exit 1, 2 of 184 red: `✗ --paths: ⭐ hits citing a ruling by name, date or card number get NO count verdict and no 无裁决` and `✗ --paths: ⭐ the render lists every hit line and prints the reading owed per file, never 写命中数`. Restored: blob == HEAD `a8440cae92dd`, `git diff HEAD` empty. A first attempt was a no-op (its replacement re-contained the anchor; the tool refused it, anchor 1 → 1) and was re-run with a distinct anchor. - `check-prior-rulings.mjs`, the withholding line for an unmatched path deleted. Self-test exit 1, 1 of 184 red: `✗ --paths: ⭐ a declared path that matched no file withholds 零命中 → 无裁决 and names the path`. Restored: blob == HEAD `a8440cae92dd`. - `card-pick.mjs`, the `incomplete` entry for an unreadable `Blocked-by:` target deleted. Self-test exit 1, 1 of 62 red: `✗ ⭐ an unreadable Blocked-by: target holds the card AND makes the run INCOMPLETE, the gap named`. Restored: blob == HEAD `22640fdf077c`. - `card-pick.mjs`, the `incomplete` entry for an unreadable sub-issue parent deleted. Self-test exit 1, 1 of 62 red: `✗ ⭐ an unreadable sub-issue parent makes the run INCOMPLETE, the gap named, the held card printed without --why`. Restored: blob == HEAD `22640fdf077c`. - S6 fix round, at `5255cb6b46`: - `check-prior-rulings.mjs`, the UTC conversion in `parseLog` broken (`new Date(ms).toISOString().slice(0, 10)` → `at.slice(0, 10)`, the offset date read as written). Self-test exit 1, 1 of 185 red: `✗ --paths: ⭐ same-day is the UTC day of the commit, an offset date converted (got ["abc1234","def5678"], want ["abc1234"])`. Restored: blob == HEAD `3d09c88f9437`. </details> `skip-changeset`: `scripts/pm/**`, `.claude/**` and the root `package.json` script line publish nothing. --- _Generated by [Claude Code](https://claude.ai/code/session_01Utp6CaAqjP52wVTzs99H5G)_ <!-- signed: repo:objectstack#5 · os-bill · session_01Utp6CaAqjP52wVTzs99H5G --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
1 parent cc6f30c commit af997d9

7 files changed

Lines changed: 1569 additions & 23 deletions

File tree

‎.claude/skills/pm-dispatch/references/coordinator.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
## 二、跨车道取卡(coordinator 每次唤醒读)
1616

17-
- 取卡面 = 各车道 open 卡:p0/p1 先,再点名 area 或子专题的下一张;判据照 `execution-duties.md`。
17+
- 取卡面 = 各车道 open 卡,次序现读 `card-pick.mjs --order <序>`;判据照 `execution-duties.md`。
1818
- 维护者只说改级 ⇒ 只落级,评论照 `filing-gate.md` 引原话;⛔ 不借此开线程,照取卡全序。
1919
- 每张卡交其车道的席位线程;车道无席位线程而座位贴空着 ⇒ 先开席位线程再交卡。
2020
- 维护者 ⛔ 不逐卡点名车道:车道读卡的 `domain:*`;S/M 分流见 `dispatch-runbook.md` 卡线程节。
@@ -24,10 +24,10 @@
2424
- 卡线程上限全项目一个数,由维护者按项目言明;未言明取各席 `batch` 之和。
2525
- 席位攒批交候选,一线程一行:卡/PR、标题、级别、effort、汇报区、要读文件、续做分支。
2626
- 派发令全文随行;⛔ 不等自己的槽位;区与卡线程 ⛔ 不直找 coordinator,经席位。
27-
- coordinator 一批开完、一次回全部 id:p0/p1 先,余照点名次序;满即排队,交回或合入即释放。
28-
- 有空槽即开;先后只认卡上 `Blocked-by:` 与席位串行队,⛔ 不自排、不逐张等。
27+
- coordinator 一批开完、一次回全部 id:p0/p1 先,余照点名次序(队列卡现读 `card-pick.mjs`)。
28+
- 满即排队;有空槽即开;先后只认卡上 `Blocked-by:` 与席位串行队,⛔ 不自排、不逐张等。
2929
- 槽位只算在建的线程:等人(授权批准、决策卡)或等席位 L1/L2 审核的卡线程不占槽。
30-
- S 卡的席内子代理只计该席 `batch`,不计本上限。
30+
- 交回或合入即释放槽位;S 卡的席内子代理只计该席 `batch`,不计本上限。
3131

3232
## 四、effort 与档位按难度(coordinator 开线程时读;席位请线程时读)
3333

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,14 @@
99
- 席改标:卡余项实测路径整落本席包树 ⇒ 本席改 `domain:*`,审计评论列路径与新旧标同笔。
1010
- 席改标限未派发卡;带 `needs-user-decision`、open `Blocked-by:` 或 `security` 的 ⛔ 不改,仍问分诊。
1111
- 每张候选读全文 + 全部评论,写派发词前做决策复读:评论读到最后一页。
12-
- 写裁决区前 grep 申报文件面(源码与测试)的 `ruling`、`Ruling-ref`、`maintainer`、`⛔`。
12+
- 裁决区与过时检查先跑 `check-prior-rulings.mjs --card <n> --paths <面>`;引现状 ⛔ 不引裁决旧述。
1313
- 本卡与命中所引裁决逐字入区(id+原句)作约束;零命中才写无裁决,命中无裁决写命中数。
14-
- 派发前做前提过时检查,裁决同罪,三面都查;动作面:`git log --oneline -20 -- <paths>`。
15-
- 卡引用面:裁决/卡片点名的每张 issue 逐个读现 open/closed/assignee,引现状 ⛔ 不引裁决旧述。
1614
- 工作项面:卡片、裁决与分诊评论列的工作项逐条对树核验是否仍未完成,⛔ 不对卡核验。
1715
- 软顶:本席已验收等人批的 Tier H PR 逾 5 ⇒ 停派 Tier H,S/非受管照常,轮报列积压;两周复测。
1816
- 每轮按现 head 核本席终局四件套 PR:席位记录/`pm:awaiting-merge`/请审/终版速读,缺件同轮补。
1917
- 四件读数器:本地 `node scripts/pm/check-half-states.mjs` H43/H48 只读受管 H;超行无受管 PR 自读。
2018
- single-writer 路径 = `SINGLE_CLAIM_PATHS` 所枚举;共享其它路径是普通并发,后落地方解冲突。
21-
- 第 N 单派发前读 `scripts/pm/os-verify-lock.sh --status`:到达深度 ≥ `LOCK_DEPTH_HOLD`(= 2)即等。
22-
- 到达深度 = `queue N:` 行数 + 1(待派 dev 的运行算作到达);`state:` holder 与 `parked` 行不计。
19+
- 第 N 单派发前跑 `scripts/pm/os-verify-lock.sh --depth`:≥ `LOCK_DEPTH_HOLD`(= 2)即等(exit 1)。
2320
- 同批独立按文件面不相交判,⛔ 不按包/check 名;有效上限随锁宽,⛔ 不是第二个 `batch`。
2421
- p0 无槽或低级在飞 PR 重叠挡住 ⇒ 暂停腾位的最低级 dev:停会话、PR 留 draft、认领不动。
2522
- 卡记 `Paused-for: #<p0>`,⛔ 不丢弃、不回退、不 force-push;p0 落地即复活该 dev,同认领同分支。
@@ -47,12 +44,10 @@
4744
- 分诊预见的后续工作是一张卡,触发条件落地时立卡;⛔ 分诊一句话永不授权无卡编辑。
4845
- 阻塞项无主 ⇒ 被挡席认领做掉,不限大小;在该卡走完整认领、尊重其热文件串行队。
4946
- 阻塞项在飞 ⇒ 等;卡 PR 叠未合 PR 或 `Blocked-by:` 未合的,合前 ⛔ 不开线程(维护者令除外)。
50-
- 取卡次序 = `docs/NORTH-STAR.md`「Priority」第 3 条:本车道队列开放 P0/P1 取卡时现读。
47+
- 标签序 = NORTH-STAR「Priority」第 3 条(无级殿后),本车道开放卡现读 `card-pick.mjs --order <序>`。
5148
- 开放 = 未派发(无 `pm:dispatched`、无 assignee);在飞的 P0/P1 不挡任何候选,只余取卡全序。
5249
- 取卡全序:维护者直派插队卡(出处三件)> 契约面卡(判据见 `references/lanes/spec.md`)> 标签序。
53-
- 标签序:`priority:p0` > p1(任何 area,含暂停)> 维护者点名的 area 或子专题里的下一张 > 无级。
5450
- 云车道同按专题派,⛔ 不按 `cloud/ROADMAP.md` 行序;细则照 `lanes/cloud.md` 所指的 cloud 仓文件。
55-
- 点名范围内:子专题照其子卡次序与 `Blocked-by:`;无子专题先 p2 后 p3;级只决定插队。
5651
- 全序每级现读/现算,零逐卡维护;无级/无 area/无 type 轮报记分诊缺口。
5752
- 同级先非车队卡(作者非 `Bot` 且首行非席位签名),再 `Bug`、卡龄;⛔ 不升级、不越 p0。
5853
- 一车道多席按全序交替取卡:席 1 奇位、席 2 偶位;只为破交替才发 `split`;认领戳仲裁。

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,8 @@
8686

8787
- 停:队列空或 `rounds` 用尽(仅一次性调用适用);一轮 ≥ 半数派发失败或升级;维护者打断。
8888
- 队列空是待命非退场(按需席除外):巡查跑到收班,只维护者令停;⛔ 不按 N 次无变化即停。
89-
- 队列空是逐卡表非结论:报无卡可派(维护者/协调者/轮报)即列队列过滤当刻返回的各卡。
90-
- 逐卡:卡号、同轮现读标签与 assignee(⛔ 不用缓存)、具名卡点;无卡点即候选,⛔ 不得报空。
91-
- 卡点一份词表:候选定义反面(`execution-duties.md`),open `Blocked-by:`、无分诊审计、他席 `Claim:`。
89+
- 队列空是逐卡表:报无卡可派即贴 `card-pick.mjs --order <序> --why`;无卡点即候选,⛔ 不得报空。
90+
- 卡点一份词表:候选定义反面,open `Blocked-by:`、`outside --order`、无分诊审计、他席 `Claim:`。
9291
- 单车道仓 `repo:*` 席:每轮首触 sweep 清空再认领,先于待命五项;cloud 细则见 `lanes/cloud.md`。
9392
- 巡查每轮探针后读信箱、认领满 `batch`,跑待命五项;间隔按 `execution-duties.md` 收集节②。
9493
- 待命五项各以其主节为准,⛔ 此处不另抄:findings 配合;`pm:blocked`/`pm:on-hold` 解锁扫描。

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"check:pm-half-states": "node scripts/pm/check-half-states.mjs --self-test",
8585
"check:issue-citations": "node scripts/check-issue-citations.mjs --self-test",
8686
"check:pm-record-recognisers": "node scripts/pm/record-recognisers.mjs --self-test && node scripts/pm/check-owed-reviews.mjs --self-test && node scripts/pm/mailbox-open.mjs --self-test && node scripts/pm/fleet-roster.mjs --self-test",
87-
"check:pm-prior-rulings": "node scripts/pm/check-prior-rulings.mjs --self-test",
87+
"check:pm-prior-rulings": "node scripts/pm/check-prior-rulings.mjs --self-test && node scripts/pm/card-pick.mjs --self-test",
8888
"check:pm-write-pace": "node scripts/pm/write-pace.mjs --self-test",
8989
"check:pm-fleet-token": "node scripts/pm/fleet-token.mjs --self-test",
9090
"check:pm-issue-create": "node scripts/pm/issue-create.mjs --self-test",

0 commit comments

Comments
 (0)