Repository navigation
Commit 7b9e229
feat(pm): first-touch-sweep lists a card whose area:* is not exactly one North Star area (#36378)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbCxiFE11rsKwyNffJZKYqJs)_
Fixes #36220
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户无感:分诊每轮的首触扫描多出一行,列出领域标签不在北极星八个领域之内、或同时挂了两个领域的公开卡,并算进“待首触”的总数。
- 属于车队工具;替分诊和按领域取卡的席位解决领域统计被拆成多行、卡片漏派给负责该领域的席位的问题。
- 出错时只是分诊多看或少看几张卡;这次改动只读看板、不写任何东西,可以直接撤回。
- 无
## What changes
`scripts/pm/first-touch-sweep.mjs` gains one row, the **area list**, and
it counts in the verdict:
- The area labels are **read** from `docs/NORTH-STAR.md`'s *Product
areas* table on every run (`northStarAreas`): the table opens at the
line starting `| Area |`, ends at the first non-row line, and a row
whose first cell opens with a backticked `area:` label names one (the
Security row carries none). No area name is spelled in the code; the
self-test asserts the code above it spells no area label at all.
- `offListArea` lists every settled open card whose `area:*` set is
non-empty and is not exactly one of those labels: a retired label
(`area:studio`), two areas, or both. Same exclusions as every other row,
plus `security` (a security card carries no area by rule), plus the ~2
min settle (a relabel is two writes). A card with no `area:*` stays on
rows one and two and on the area backstop, not here.
- Those cards join the `owed` set. The verdict names them: `sweep FOUND
n card(s) owed a first touch — k of them off the North Star area list`.
A sweep is CLEAN only when this row is empty too. Exit codes keep their
meaning (0 = a whole sweep).
- The text output prints the row, with each card's area labels, after
the five disjunctions and before the two backstops. `--json` adds
`north_star_areas` (the list read) and `off_list_area`.
- A North Star the checkout cannot read, or one with no readable area
table, is `PREREQUISITE NOT MET` (exit 3). A broken table never turns
into a row that passes every card.
- The row is asked only on `objectstack-ai/objectstack`. The North Star
says cloud "follows these rules with its own areas", and the self-test
pins that sentence. On any other board the row prints `not asked` and
the file is not read.
Not built: retiring the legacy labels from the repository (the card's
optional item). That is the maintainer's call.
**Read first** (riskiest first):
1. `sweep()`: the North Star read at the top (a prerequisite return
before any page is walked), and `offList` joining `hits`. This is the
one place the new row changes the verdict.
2. `northStarAreas()`: the table boundary (first line starting `| Area
|`, stops at the first line not starting with a pipe). If the North
Star's table moves or is reshaped, this is what breaks loudly.
3. `verdictLine()`: the PARTIAL and FOUND strings. Nothing else in the
repo parses them (`git grep` for the verdict prefixes outside this file:
no hit).
**Two-minute verification:** `node scripts/pm/first-touch-sweep.mjs
--self-test` should print `✓ first-touch-sweep self-test: 85 cases pass
across 7 batteries — offline, no network.`
## Tests
<details><summary>Self-test (0bdb095)</summary>
```
$ node scripts/pm/first-touch-sweep.mjs --self-test
✓ first-touch-sweep self-test: 85 cases pass across 7 batteries — offline, no network.
exit 0 (base 3a81fb7: 69 cases across 6 batteries)
```
The new battery pins the card's three cases against the real
`docs/NORTH-STAR.md` table: a legacy-area card (`area:studio`, asserted
absent from the list read), a two-area card (the first two labels read)
and a one-area clean control (the first label read). The result is
`offList` = the first two cards, the verdict `sweep FOUND 2 card(s) owed
a first touch — 2 of them off the North Star area list`, and exit 0. It
also pins the synthetic-table parse, the three parse refusals, the
exclusions, security and settle, the not-asked board, and both
prerequisite paths.
</details>
<details><summary>Importer self-test: fleet-roster (imports
sweep())</summary>
```
$ node scripts/pm/fleet-roster.mjs --self-test
✓ fleet-roster self-test: 150 cases in 12 batteries pass.
exit 0
```
</details>
<details><summary>Live read-only run (0bdb095)</summary>
```
$ node scripts/pm/first-touch-sweep.mjs --since=2026-11-22T00:00:00Z
first-touch-sweep — objectstack-ai/objectstack · now 2026-11-22T08:37Z · window since 2026-11-22T00:00Z
enumerated 473 open issue(s) over 6 page(s) · the platform counts 473
① bare — no pm:*, no needs-user-decision, no area:*: 1
② pm:queue with no area:* (multi-lane board): 3
③ area:* with no pm state: 7
④ pm:queue + area:* with no priority:*: 0
⑤ created in the window with pm:queue / priority:* applied in the creation minute (the touch adds area and type; a grade a person set stays): 66
area list (docs/NORTH-STAR.md: 8 areas) — an area:* set that is not exactly one of the North Star areas: 0
area:* backstop (daily, not part of the verdict) — open cards with no area:*: 4 · all of them: #36355 #36361 #36369 #36375
issue type backstop (daily, not part of the verdict) — open cards with no issue type: 18 · all of them: #36353 #36355 #36356 #36360 #36361 #36362 #36363 #36364 #36365 #36366 #36367 #36369 #36370 #36371 #36372 #36373 #36374 #36375
sweep FOUND 68 card(s) owed a first touch
exit 0
```
The board shows 0 off-list cards today because the 46 the card measured
were relabelled by hand earlier on 2026-11-22. So the live run proves
the read and the row's wiring, and the self-test proves that a positive
is found. The cloud board answers HTTP 403 to this container's token at
both base and head (exit 3, before the new code runs), so its `not
asked` path is proven by the self-test only.
</details>
## Acceptance notes
- **Boundary, by design:** the row takes the sweep's exclusions
(`tracking`, `status:parked`, `pm:seat`, `qa-run`, `eval-run`) like
every other row. So a `tracking` coordination parent that carries a
retired area is not listed. Widening that is a one-line change if the
seat wants it.
- **The sweep's self-test is not run by CI.** No root `package.json`
alias and no workflow step runs `first-touch-sweep.mjs --self-test`.
`check-self-test-wired` does not see the script because CI never runs
the script itself. So this pin, like the 69 cases before it, guards only
a hand run. This was already true before this PR. Wiring it is a
`package.json` alias plus a `lint.yml` step, outside this claim's file
surface, so it is reported to the seat and not done here.
- No `.claude/**` text changed. The North Star's one-area sentence and
triage's existing first-touch duty to re-check the area already require
this row. `triage-duties.md` still says "five disjunctions" and is not
wrong: this is a sixth printed row, not a sixth disjunction of that
rule.
- `skip-changeset`: `scripts/pm/**` publishes nothing.
## Verification
<details><summary>Targeted gates (dispatch-gates --commands, reconciled
with --ran), 0bdb095</summary>
```
head 0bdb095 (branch tip b75c0a7 + merge of origin/main 3faabd2; the derivation is byte-identical before and after the merge)
dispatch-gates --ran: 63 derived famil(ies) accounted for — 62 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).
61 of 63 exit 0.
exit 1 node scripts/check-self-test-workflow-commands.mjs — REFUSED: scripts/check-adr-0087-registration.mjs --self-test could not be run: spawnSync node ETIMEDOUT
(its 120 s spawn cap vs a shared box at load ~12; that self-test run directly took 1m49s and exited 0; the file is untouched by this diff). NOT MEASURED locally, CI owns it.
exit 3 pnpm check:i18n-coverage — PREREQUISITE NOT MET: the workspace CLI is not built (a 15-package build closure; nothing in this diff is in its population). NOT MEASURED locally, CI owns it.
Re-run on 0bdb095 after the merge: first-touch-sweep --self-test 0 · fleet-roster --self-test 0 · check-skills-token-ratchet 0 · check:nul-bytes 0 · check:ratchet-remedy-authority 0 · check:commit-card-trailers 0
Outside the derivation, run: first-touch-sweep.mjs --self-test (the edited script), fleet-roster.mjs --self-test (its one importer).
```
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- signed: repo:objectstack#7 · zhuangjianguo ·
session_01QsR2jTeURPvEm465RcoYEC -->
Co-authored-by: Claude <noreply@anthropic.com>1 parent cb5a975 commit 7b9e229
1 file changed
Lines changed: 139 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
70 | 88 | | |
71 | 89 | | |
72 | 90 | | |
73 | 91 | | |
74 | | - | |
| 92 | + | |
75 | 93 | | |
76 | 94 | | |
77 | 95 | | |
| |||
125 | 143 | | |
126 | 144 | | |
127 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
128 | 157 | | |
129 | 158 | | |
130 | 159 | | |
| |||
179 | 208 | | |
180 | 209 | | |
181 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
182 | 251 | | |
183 | 252 | | |
184 | 253 | | |
| |||
218 | 287 | | |
219 | 288 | | |
220 | 289 | | |
221 | | - | |
| 290 | + | |
222 | 291 | | |
223 | 292 | | |
224 | | - | |
225 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
226 | 297 | | |
227 | 298 | | |
228 | 299 | | |
| |||
234 | 305 | | |
235 | 306 | | |
236 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
237 | 311 | | |
238 | 312 | | |
239 | 313 | | |
240 | | - | |
| 314 | + | |
241 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
242 | 329 | | |
243 | 330 | | |
244 | 331 | | |
| |||
289 | 376 | | |
290 | 377 | | |
291 | 378 | | |
292 | | - | |
| 379 | + | |
| 380 | + | |
293 | 381 | | |
294 | 382 | | |
295 | | - | |
| 383 | + | |
296 | 384 | | |
297 | 385 | | |
298 | 386 | | |
| |||
313 | 401 | | |
314 | 402 | | |
315 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
316 | 410 | | |
317 | 411 | | |
318 | 412 | | |
| |||
336 | 430 | | |
337 | 431 | | |
338 | 432 | | |
| 433 | + | |
| 434 | + | |
339 | 435 | | |
340 | 436 | | |
341 | 437 | | |
| |||
447 | 543 | | |
448 | 544 | | |
449 | 545 | | |
| 546 | + | |
450 | 547 | | |
451 | | - | |
| 548 | + | |
452 | 549 | | |
453 | 550 | | |
454 | 551 | | |
| |||
541 | 638 | | |
542 | 639 | | |
543 | 640 | | |
544 | | - | |
| 641 | + | |
545 | 642 | | |
546 | 643 | | |
547 | 644 | | |
| |||
581 | 678 | | |
582 | 679 | | |
583 | 680 | | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
584 | 714 | | |
585 | 715 | | |
586 | 716 | | |
| |||
0 commit comments