Repository navigation
Commit e43d326
feat(pm): count outside demand in the daily summary and put human-opened cards first within a priority (#29572)
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J
<!-- claude-projects-attribution: {"github_login":"huangyiirene"} -->
_Requested by **Irene** · [project
thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67xCXvQy52cxubnvrWgeRv8k1)_
Fixes #29467
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:总监每日摘要加一行「外部需求行」三个数;取卡全序同级内非车队卡排在车队卡之前(车队 = App 作者或正文首行是席位签名);H67
读序同步。
- 为什么改:维护者对「车队在给自己造活」的评估回了「同意」;目前没有任何读数说明一周的工作有多少回应车队之外的需求。
- 风险与回滚:只改规则文本与一个巡检的读序,不升级、不越 p0;回滚即 revert 本 PR。
- 先看:`lanes/director.md` 职责四新增三行;`execution-duties.md`
同级平手规则;`check-half-states.mjs` 的 `h67ReadOrder`。
- 两分钟验证:`node scripts/pm/check-half-states.mjs --self-test`,预期末行 H67 组
158/158 全过。
- 需要你做的:无,席位落地(Tier S)。
## What changes
- **Daily summary** (`lanes/director.md`, duty four): the summary lists
an outside-demand line, defined in three new lines. The three numbers
are read when the summary is written: (1) cards opened in the window by
non-fleet authors; (2) the share of the window's closed cards that
non-fleet authors opened; (3) the open non-fleet cards with no `pm:*`
state, each named with its age. The query is spelled out and posted with
the line. For 1 and 2 it takes the all-state `since` listing from the
window start, which is a superset, and counts a card only when its
`created_at` (for 1) or `closed_at` (for 2) falls in the window. For 3
it takes the open listing. Pull requests are excluded from all three.
- **Fleet card**, per the seat's ruling as amended in its contract
review: a card whose author is an App (`user.type` `Bot`, every `[bot]`
login, `github-actions[bot]` included), OR whose body's first non-empty
line is a seat signature. Seat-operated human accounts file cards too,
and the card's own measurement excluded seat posts. Every other card is
non-fleet.
- **Candidate order** (`execution-duties.md`): within one level of the
order, a non-fleet card sorts first, then `Bug`, then card age. The rule
never raises a card's level and never jumps `priority:p0`.
- **`h67ReadOrder`** (`scripts/pm/check-half-states.mjs`) is the only
`scripts/pm` reader that sorts candidates by priority. It now orders by
rank, then fleet status, then age. It reuses two readers from the same
file: `artefactAuthor`, and `readSignatureLine`, the signature reader
`record-recognisers.mjs` imports from this file. No new regex is added.
An unreadable author counts as the fleet's, so it is never promoted. No
new patrol row, battery or gate.
### Ratchet payment (both files stay at their ceilings, no ceiling row
moved)
| file | before / after / ceiling | added | paid by |
|:--|:--|:--|:--|
| `lanes/director.md` | 86 / 86 / 86 | 3 summary lines plus 1 moved line
(the fleet definition and the window test were later edited in place) |
removed the one-bullet section `## 与 skills 席的分界`: its heading, its
blank line and the blank line above it. Its bullet moved unchanged into
授权与形态 next to the scope line. |
| `execution-duties.md` | 188 / 188 / 188 | 1 tie-break line (the
seat-signature clause was later edited in place) | deleted the separate
ruling-implementation re-check of the action surface. Its content moved
into the work-item surface line, which now names the ruling's items next
to the card's and the triage comment's. |
Every line in both files is at most 120 bytes; the longest new line is
119.
## Tests
- `node scripts/pm/check-half-states.mjs --self-test` on cbc61eb: 5219
cases pass, and the battery `H67 queued merged-delivery reading` reads
158/158. The pin moved from 142 to the count, so none of the six new
cases can be removed without turning the battery red.
- New cases:
- A human-opened p2 card is reached before an older fleet-opened p2
card.
- Two fleet cards of one priority stay oldest-first.
- The fleet leg never lifts a card out of its priority or past p0.
- `github-actions[bot]` counts as fleet, and an unreadable author is not
promoted.
- A human-account card whose body opens with a seat signature stays
behind an older fleet card.
- The same human card with the signature moved off its first line is
reached first again.
- **Reverse verification**, two ablations, each on a committed head and
each restored from HEAD and green afterwards:
- On 1d7e6fb, with `fleet(a) - fleet(b)` replaced by `0`, the run
printed `1 of 5189 case(s) failed`: `⭐ H67 order: within ONE priority a
human-opened card is reached before an OLDER fleet-opened one (got
"21,22", want "22,21")`.
- On cbc61eb, with the signature test replaced by `false`, the run
printed `1 of 5219 case(s) failed`: `⭐ H67 order: a HUMAN account whose
body opens with a seat signature is the fleet's — it stays behind the
older fleet card (got "22,21", want "21,22")`.
## Acceptance notes
- The director's payment removes a section heading and two blank lines,
not prose; the bullet moved byte-identically. The seat's contract review
ruled this a real deletion.
- The seat's should-fixes S1 (seat-signed cards are the fleet's) and S2
(the summary query names its local window test) are in cbc61eb, paid in
place in both texts. The delta review's should-fix is in f64ec72: the
query line names the all-state listing again, because number 2 needs
closed cards and the default listing is open-only. It was edited in
place, and director.md stays at 86 lines.
- PR #29515 landed first and touched `lanes/director.md` and
`check-half-states.mjs`. `main` was merged in with no conflict, and both
files were re-measured on the merged tree.
## Verification
<details><summary>Local gates on cbc61eb: 54 derived, 54 run, all exit
0 (`dispatch-gates --ran`)</summary>
- On head cbc61eb, `node scripts/pm/dispatch-gates.mjs --commands`
derived 54 commands. All 54 ran, each with a 900 s timeout, with the
exit codes recorded before any pipe. All 54 exited 0.
- The `--ran` reconciliation printed: `54 derived famil(ies) accounted
for — 54 run, 0 NOT-MEASURED`.
- Both ratcheted files read headroom 0 at their ceilings (86 and 188),
and every line is at most 120 bytes.
- On f64ec72, a one-line text edit to director.md, these gates were
re-run: `check:pm-skill-ratchet`, `check:pm-skill-id-lint`,
`check:doc-authoring`, `check:nul-bytes`. All exited 0, and director.md
read 86 lines (ceiling 86, headroom 0).
- Earlier, on 7d105ed: `pnpm check:pm-skill-ratchet` had exited 1 on a
125-byte line, which was trimmed to 119 bytes. The full run on cbc61eb
above supersedes those readings.
- Prerequisites: `pnpm install --frozen-lockfile`, and a `turbo` build
of `@objectstack/formula` and `@objectstack/lint` for
`check:doc-formula-expressions`.
- Families CI runs beyond the derived list are read from this PR's check
runs, not re-run locally.
</details>
## 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.
- [ ] 3. No formatter ran; `pnpm lint` passes. (no formatter ran; `pnpm
lint` was not run locally on this diff, so the CI lint job decides it)
- [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: `.claude/**` and `scripts/pm/**`; `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. (except the 维护者速读
block, which the seat contract writes in Chinese)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01J8VVAjYZRbZ8TG8TRzG5zd
---
_Generated by [Claude
Code](https://claude.ai/code/session_01J8VVAjYZRbZ8TG8TRzG5zd)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7b293c4 commit e43d326
3 files changed
Lines changed: 48 additions & 18 deletions
File tree
- .claude/skills/pm-dispatch/references
- lanes
- scripts/pm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
| 54 | + | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17541 | 17541 | | |
17542 | 17542 | | |
17543 | 17543 | | |
17544 | | - | |
| 17544 | + | |
| 17545 | + | |
17545 | 17546 | | |
17546 | 17547 | | |
17547 | 17548 | | |
17548 | | - | |
17549 | | - | |
17550 | | - | |
17551 | | - | |
| 17549 | + | |
| 17550 | + | |
| 17551 | + | |
| 17552 | + | |
| 17553 | + | |
| 17554 | + | |
| 17555 | + | |
| 17556 | + | |
17552 | 17557 | | |
17553 | 17558 | | |
17554 | 17559 | | |
| |||
17656 | 17661 | | |
17657 | 17662 | | |
17658 | 17663 | | |
17659 | | - | |
| 17664 | + | |
| 17665 | + | |
17660 | 17666 | | |
17661 | 17667 | | |
17662 | 17668 | | |
| |||
17668 | 17674 | | |
17669 | 17675 | | |
17670 | 17676 | | |
17671 | | - | |
| 17677 | + | |
17672 | 17678 | | |
17673 | 17679 | | |
17674 | 17680 | | |
| |||
17679 | 17685 | | |
17680 | 17686 | | |
17681 | 17687 | | |
| 17688 | + | |
| 17689 | + | |
| 17690 | + | |
| 17691 | + | |
| 17692 | + | |
| 17693 | + | |
| 17694 | + | |
17682 | 17695 | | |
17683 | 17696 | | |
17684 | 17697 | | |
17685 | 17698 | | |
17686 | 17699 | | |
17687 | 17700 | | |
17688 | | - | |
| 17701 | + | |
| 17702 | + | |
| 17703 | + | |
| 17704 | + | |
17689 | 17705 | | |
17690 | 17706 | | |
17691 | 17707 | | |
| |||
25234 | 25250 | | |
25235 | 25251 | | |
25236 | 25252 | | |
25237 | | - | |
25238 | | - | |
| 25253 | + | |
| 25254 | + | |
| 25255 | + | |
25239 | 25256 | | |
25240 | 25257 | | |
25241 | 25258 | | |
| |||
36112 | 36129 | | |
36113 | 36130 | | |
36114 | 36131 | | |
| 36132 | + | |
| 36133 | + | |
| 36134 | + | |
| 36135 | + | |
| 36136 | + | |
| 36137 | + | |
| 36138 | + | |
| 36139 | + | |
| 36140 | + | |
| 36141 | + | |
| 36142 | + | |
| 36143 | + | |
| 36144 | + | |
36115 | 36145 | | |
36116 | 36146 | | |
36117 | 36147 | | |
| |||
0 commit comments