@feigi/fleet-ctl 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/.claude-plugin/plugin.json +9 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +18 -0
  4. package/agents/fleet-finisher.agent.md +7 -0
  5. package/agents/fleet-implementer-alt.agent.md +210 -0
  6. package/agents/fleet-implementer.agent.md +210 -0
  7. package/agents/fleet-merge-bot.agent.md +7 -0
  8. package/agents/fleet-review-comments.agent.md +40 -0
  9. package/agents/fleet-review-correctness.agent.md +43 -0
  10. package/agents/fleet-review-runner.agent.md +73 -0
  11. package/agents/fleet-review-silent-failure.agent.md +49 -0
  12. package/agents/fleet-review-simplify.agent.md +46 -0
  13. package/agents/fleet-review-snapshot.agent.md +24 -0
  14. package/agents/fleet-review-tests.agent.md +46 -0
  15. package/agents/fleet-review-types.agent.md +41 -0
  16. package/agents/fleet-review-verifier.agent.md +29 -0
  17. package/commands/review-and-fix.md +98 -0
  18. package/commands/run-merge-bot.md +357 -0
  19. package/commands/run-team-help.md +17 -0
  20. package/package.json +23 -0
  21. package/scripts/agent-test-dir-prose.test.mjs +59 -0
  22. package/scripts/agent-test.test.mjs +1636 -0
  23. package/scripts/ambient-git-vars-mjs-prose.test.mjs +354 -0
  24. package/scripts/ambient-git-vars-prose.test.mjs +192 -0
  25. package/scripts/ancestry-check-position-prose.test.mjs +175 -0
  26. package/scripts/apply-ruleset.test.mjs +420 -0
  27. package/scripts/arg-header-probes-prose.test.mjs +393 -0
  28. package/scripts/arg.mjs +600 -0
  29. package/scripts/arg.test.mjs +1354 -0
  30. package/scripts/board-cli.test.mjs +694 -0
  31. package/scripts/board-identity.test.mjs +429 -0
  32. package/scripts/board-liveness-banner.test.mjs +119 -0
  33. package/scripts/board-prev-shape.test.mjs +229 -0
  34. package/scripts/board-tryparse-null.test.mjs +119 -0
  35. package/scripts/board.html +471 -0
  36. package/scripts/board.mjs +2037 -0
  37. package/scripts/board.test.mjs +3086 -0
  38. package/scripts/brief-after-cut-prose.test.mjs +53 -0
  39. package/scripts/candidates-exit3-prose.test.mjs +302 -0
  40. package/scripts/candidates.mjs +674 -0
  41. package/scripts/candidates.test.mjs +2101 -0
  42. package/scripts/caveat-unification-prose.test.mjs +98 -0
  43. package/scripts/ci-comment-rot-prose.test.mjs +2025 -0
  44. package/scripts/ci-completes-premise-prose.test.mjs +257 -0
  45. package/scripts/ci-state-prose.test.mjs +113 -0
  46. package/scripts/ci-state.mjs +761 -0
  47. package/scripts/ci-state.test.mjs +1640 -0
  48. package/scripts/ci-vacuous-green.test.mjs +368 -0
  49. package/scripts/citation-sweep-prose.test.mjs +1572 -0
  50. package/scripts/claim-lifecycle.test.mjs +185 -0
  51. package/scripts/claim-ticket.sh +417 -0
  52. package/scripts/claim-ticket.test.mjs +1121 -0
  53. package/scripts/closing-keyword-prose.test.mjs +193 -0
  54. package/scripts/cockpit-launch-idempotent-prose.test.mjs +165 -0
  55. package/scripts/cockpit-tick-nonblocking.test.mjs +210 -0
  56. package/scripts/compute-board.mjs +579 -0
  57. package/scripts/compute-board.test.mjs +1060 -0
  58. package/scripts/compute-spend.mjs +329 -0
  59. package/scripts/compute-spend.test.mjs +451 -0
  60. package/scripts/cross-repo-citation-prose.test.mjs +156 -0
  61. package/scripts/cwd-isolation-pins.mjs +83 -0
  62. package/scripts/dedupe-guard-prose.test.mjs +243 -0
  63. package/scripts/derive-testcmd.sh +239 -0
  64. package/scripts/derive-testcmd.test.mjs +380 -0
  65. package/scripts/diff-stats.mjs +231 -0
  66. package/scripts/diff-stats.test.mjs +408 -0
  67. package/scripts/dispatch-block-golden-prose.test.mjs +1024 -0
  68. package/scripts/dispatch-block-pins-prose.test.mjs +615 -0
  69. package/scripts/drop-merged-label.sh +173 -0
  70. package/scripts/drop-merged-label.test.mjs +480 -0
  71. package/scripts/expected-jobs-prose.test.mjs +80 -0
  72. package/scripts/filing-bar-seat-prose.test.mjs +242 -0
  73. package/scripts/filing-claim-bar-prose.test.mjs +166 -0
  74. package/scripts/finisher-dispatch-premise-prose.test.mjs +312 -0
  75. package/scripts/finisher-halt-prose.test.mjs +106 -0
  76. package/scripts/finisher-name-prose.test.mjs +134 -0
  77. package/scripts/finisher-own-tree-prose.test.mjs +285 -0
  78. package/scripts/finisher-pin-race-prose.test.mjs +339 -0
  79. package/scripts/fix-applier-correction-rules-prose.test.mjs +201 -0
  80. package/scripts/fix-applier-result-file-prose.test.mjs +100 -0
  81. package/scripts/fleet-bootstrap +155 -0
  82. package/scripts/fleet-heartbeat.mjs +272 -0
  83. package/scripts/fleet-heartbeat.test.mjs +450 -0
  84. package/scripts/fleet-provenance +207 -0
  85. package/scripts/fleet-provenance.test.mjs +64 -0
  86. package/scripts/fleet-run +148 -0
  87. package/scripts/fleet-run.test.mjs +90 -0
  88. package/scripts/fleet-state.mjs +400 -0
  89. package/scripts/fleet-state.test.mjs +373 -0
  90. package/scripts/fleet-tick-prose.test.mjs +299 -0
  91. package/scripts/fleet-tick.mjs +832 -0
  92. package/scripts/fleet-tick.test.mjs +1332 -0
  93. package/scripts/force-with-lease-reason-prose.test.mjs +184 -0
  94. package/scripts/frontmatter-allowlist.json +64 -0
  95. package/scripts/frontmatter-check.mjs +256 -0
  96. package/scripts/frontmatter-check.test.mjs +436 -0
  97. package/scripts/git-env.mjs +124 -0
  98. package/scripts/git-env.test.mjs +149 -0
  99. package/scripts/git-status-untracked-mode-sweep.test.mjs +216 -0
  100. package/scripts/gone-walk.test.mjs +213 -0
  101. package/scripts/gp-sep-invariant-prose.test.mjs +188 -0
  102. package/scripts/head-moved-after-label-prose.test.mjs +233 -0
  103. package/scripts/immutable-body-claim-prose.test.mjs +413 -0
  104. package/scripts/implementer-model-tier.test.mjs +643 -0
  105. package/scripts/inflight-citation-prose.test.mjs +144 -0
  106. package/scripts/inflight-exit2-prose.test.mjs +81 -0
  107. package/scripts/inflight-probe-guard-prose.test.mjs +109 -0
  108. package/scripts/inflight-scan-scope-prose.test.mjs +57 -0
  109. package/scripts/inflight.sh +1106 -0
  110. package/scripts/inflight.test.mjs +2984 -0
  111. package/scripts/injection-control-prose.test.mjs +404 -0
  112. package/scripts/install-root-audit.test.mjs +464 -0
  113. package/scripts/instrument-check-prose.test.mjs +235 -0
  114. package/scripts/instruments.sh +394 -0
  115. package/scripts/instruments.test.mjs +787 -0
  116. package/scripts/issue-tracker-prose.test.mjs +71 -0
  117. package/scripts/json.sh +248 -0
  118. package/scripts/json.test.mjs +364 -0
  119. package/scripts/ledger-dispatch.test.mjs +516 -0
  120. package/scripts/ledger-grammar.mjs +85 -0
  121. package/scripts/ledger-grammar.test.mjs +142 -0
  122. package/scripts/ledger-read-require-file.test.mjs +197 -0
  123. package/scripts/ledger.mjs +1753 -0
  124. package/scripts/ledger.test.mjs +3554 -0
  125. package/scripts/line-distance-prose.test.mjs +245 -0
  126. package/scripts/liveness-rationale-prose.test.mjs +83 -0
  127. package/scripts/locale-pin-prose.test.mjs +189 -0
  128. package/scripts/member-outcome-prose.test.mjs +167 -0
  129. package/scripts/member-outcomes-header.test.mjs +148 -0
  130. package/scripts/member-outcomes-prose.test.mjs +63 -0
  131. package/scripts/member-outcomes.mjs +231 -0
  132. package/scripts/member-outcomes.test.mjs +507 -0
  133. package/scripts/member-prompt-prose.test.mjs +161 -0
  134. package/scripts/member-record.mjs +605 -0
  135. package/scripts/member-record.test.mjs +516 -0
  136. package/scripts/member-write-guard.mjs +279 -0
  137. package/scripts/member-write-guard.test.mjs +211 -0
  138. package/scripts/merge-commit-probe-prose.test.mjs +122 -0
  139. package/scripts/merge-gate.mjs +262 -0
  140. package/scripts/merge-gate.test.mjs +613 -0
  141. package/scripts/muted-git-guard-sweep.test.mjs +493 -0
  142. package/scripts/net-ssh-precedence-prose.test.mjs +91 -0
  143. package/scripts/net-watchdog-prose.test.mjs +79 -0
  144. package/scripts/net.sh +409 -0
  145. package/scripts/net.test.mjs +211 -0
  146. package/scripts/no-ci-gate-prose.test.mjs +108 -0
  147. package/scripts/no-undo-audit.sh +1134 -0
  148. package/scripts/no-undo-audit.test.mjs +3965 -0
  149. package/scripts/no-wave.test.mjs +138 -0
  150. package/scripts/node-floor-sweep.test.mjs +611 -0
  151. package/scripts/pointer-target-prose.test.mjs +186 -0
  152. package/scripts/pr-overlap.mjs +417 -0
  153. package/scripts/pr-overlap.test.mjs +695 -0
  154. package/scripts/printf-die-sweep.test.mjs +384 -0
  155. package/scripts/prompt-renderer.mjs +39 -0
  156. package/scripts/prompt-renderer.test.mjs +68 -0
  157. package/scripts/prose-pin.mjs +808 -0
  158. package/scripts/prose-pin.test.mjs +1034 -0
  159. package/scripts/prove-merge.sh +228 -0
  160. package/scripts/prove-merge.test.mjs +995 -0
  161. package/scripts/pull-table-relabel-prose.test.mjs +60 -0
  162. package/scripts/quiet-payload-prose.test.mjs +222 -0
  163. package/scripts/reap.sh +1768 -0
  164. package/scripts/reap.test.mjs +4395 -0
  165. package/scripts/reaping-prose.test.mjs +159 -0
  166. package/scripts/refuter-scratch-prose.test.mjs +135 -0
  167. package/scripts/release-label-required-prose.test.mjs +71 -0
  168. package/scripts/release-label-split-prose.test.mjs +169 -0
  169. package/scripts/release-ticket.sh +1716 -0
  170. package/scripts/release-ticket.test.mjs +5106 -0
  171. package/scripts/renovate-release-contract.test.mjs +379 -0
  172. package/scripts/repo-root.mjs +544 -0
  173. package/scripts/repo-root.test.mjs +873 -0
  174. package/scripts/reporter-output-rule-prose.test.mjs +208 -0
  175. package/scripts/review-agent-report-only.test.mjs +49 -0
  176. package/scripts/review-core-cwd-isolation.test.mjs +374 -0
  177. package/scripts/review-core-reads.test.mjs +478 -0
  178. package/scripts/review-core-refuter-scratch.test.mjs +148 -0
  179. package/scripts/review-core-snapshot-path.test.mjs +777 -0
  180. package/scripts/review-core-specialist-scratch.test.mjs +189 -0
  181. package/scripts/review-core-testcmd.test.mjs +288 -0
  182. package/scripts/review-core-unrun.test.mjs +530 -0
  183. package/scripts/review-core-unverified-discriminant.test.mjs +208 -0
  184. package/scripts/review-core.mjs +1028 -0
  185. package/scripts/review-eval-resolver-path.test.mjs +55 -0
  186. package/scripts/review-eval.mjs +197 -0
  187. package/scripts/review-host-fixture.mjs +73 -0
  188. package/scripts/review-in-run-retry.test.mjs +187 -0
  189. package/scripts/review-no-vendor-dispatch.test.mjs +45 -0
  190. package/scripts/review-path-default.test.mjs +796 -0
  191. package/scripts/review-runner-spawns.test.mjs +93 -0
  192. package/scripts/review-runner.test.mjs +155 -0
  193. package/scripts/review-tier-audit.test.mjs +140 -0
  194. package/scripts/run-artifact-pr-prose.test.mjs +341 -0
  195. package/scripts/run-merge-bot-prose.test.mjs +1391 -0
  196. package/scripts/scratch-partition-invariant-prose.test.mjs +74 -0
  197. package/scripts/scripts-path-citation-sweep.test.mjs +73 -0
  198. package/scripts/section-between-guard-prose.test.mjs +378 -0
  199. package/scripts/select-dimensions.test.mjs +674 -0
  200. package/scripts/shared-refusal.test.mjs +388 -0
  201. package/scripts/shell-traps-prose.test.mjs +507 -0
  202. package/scripts/shortlist.mjs +355 -0
  203. package/scripts/shortlist.test.mjs +366 -0
  204. package/scripts/slow-transport.mjs +72 -0
  205. package/scripts/snapshot-repo.test.mjs +772 -0
  206. package/scripts/snapshot-runner-audience-prose.test.mjs +129 -0
  207. package/scripts/spend-view.test.mjs +312 -0
  208. package/scripts/staleness-qualifier-prose.test.mjs +251 -0
  209. package/scripts/staleness-verdict-prose.test.mjs +142 -0
  210. package/scripts/staleness.mjs +414 -0
  211. package/scripts/staleness.test.mjs +893 -0
  212. package/scripts/stalled-member-liveness-prose.test.mjs +219 -0
  213. package/scripts/stash-prohibition-prose.test.mjs +313 -0
  214. package/scripts/strip-comments.mjs +44 -0
  215. package/scripts/tier-check.mjs +468 -0
  216. package/scripts/tier-check.test.mjs +726 -0
  217. package/scripts/tier-guard-gate-prose.test.mjs +216 -0
  218. package/scripts/tier-outcomes-header.test.mjs +586 -0
  219. package/scripts/tier-outcomes.mjs +441 -0
  220. package/scripts/tier-outcomes.test.mjs +342 -0
  221. package/scripts/tier-roles.mjs +250 -0
  222. package/scripts/tier-roles.test.mjs +316 -0
  223. package/scripts/tracker-block-copy-prose.test.mjs +288 -0
  224. package/scripts/triage-labels-gloss-prose.test.mjs +97 -0
  225. package/scripts/unattended-git-sweep.test.mjs +142 -0
  226. package/scripts/verify-sha-exit2-prose.test.mjs +269 -0
  227. package/scripts/verify-sha.sh +117 -0
  228. package/scripts/verify-sha.test.mjs +693 -0
  229. package/scripts/watcher-degraded-block.test.mjs +372 -0
  230. package/scripts/watcher-key-prose.test.mjs +106 -0
  231. package/scripts/within-run-pair-prose.test.mjs +208 -0
  232. package/scripts/worktree-audit.sh +482 -0
  233. package/scripts/worktree-audit.test.mjs +1407 -0
  234. package/scripts/worktree-head-prose.test.mjs +276 -0
  235. package/scripts/worktree-listing-sweep.test.mjs +217 -0
  236. package/scripts/worktree-model-prose.test.mjs +216 -0
  237. package/scripts/worktree.sh +470 -0
  238. package/skills/next-ticket/SKILL.md +138 -0
  239. package/skills/run-team/SKILL.md +3603 -0
  240. package/skills/run-team/references/ci-and-staleness.md +75 -0
  241. package/skills/run-team/references/correction-tickets.md +37 -0
  242. package/skills/run-team/references/isolation.md +23 -0
  243. package/skills/run-team/references/member-lifecycle.md +73 -0
  244. package/skills/run-team/references/reaping.md +73 -0
  245. package/skills/sizing-a-ticket/SKILL.md +39 -0
@@ -0,0 +1,586 @@
1
+ import { test } from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import { readFileSync } from "node:fs";
4
+ import { join } from "node:path";
5
+ import { between, phrase, sentences, stripHashGutter, unemphasized } from "./prose-pin.mjs";
6
+ import { COLUMNS as MEMBER_COLUMNS } from "./member-outcomes.mjs";
7
+ import { COLUMNS } from "./tier-outcomes.mjs";
8
+
9
+ // #472: this file's header has never been pinned, while SKILL.md's guard tells
10
+ // the controller that "that file's header carries the column meanings" — so the
11
+ // guard's whole accumulate-across-runs mechanism rests on a shape nothing
12
+ // checks. The deferral said to add the pin alongside the first consumer. The
13
+ // four difficulty columns are that consumer's arrival: they are appended AFTER
14
+ // a free-text `note`, which is a shift nobody would see.
15
+ //
16
+ // The column list is tier-outcomes.mjs's own COLUMNS (#2207), the order its
17
+ // `append` writes in — so the header's column line is pinned against the
18
+ // writer, the way member-outcomes.tsv's is against its scraper.
19
+ const REPO = join(import.meta.dirname, "..", "..");
20
+ const TSV = readFileSync(join(REPO, "docs", "metrics", "tier-outcomes.tsv"), "utf8");
21
+ const RUN_TEAM = readFileSync(join(REPO, "plugin", "skills", "run-team", "SKILL.md"), "utf8");
22
+
23
+ // The header is the LEADING comment block. Slicing it — rather than grepping
24
+ // `#` lines from anywhere — is what stops a stray comment among the data rows
25
+ // from satisfying a prose pin, the same reason member-outcomes-header.test.mjs
26
+ // slices.
27
+ const headerLines = [];
28
+ for (const l of TSV.split("\n")) {
29
+ if (!l.startsWith("#") && l.trim()) break;
30
+ headerLines.push(l);
31
+ }
32
+ const HEADER = headerLines.join("\n");
33
+
34
+ // The ruling step, and no more of SKILL.md than that — the same reason
35
+ // `prose-pin.mjs`'s own slicers give: a positive regex over the whole file is
36
+ // satisfiable from outside the paragraph it guards, and this file is 2700 lines
37
+ // of prose about exactly these words. One definition, because three hand-rolled
38
+ // copies of one slice is how two of them end up bounded differently.
39
+ const rulingStep = () => between(RUN_TEAM, "**Guard: accumulate per PR", "**Then record the run's member facts", "phase 3's ruling step");
40
+
41
+ // The first sentence of the ruling step that names `sizing` — the sentence the
42
+ // phase-0 negative below reads. `sentences()`, never a first-period `[^.]`
43
+ // window (#1983): the pin is NEGATIVE, so a window cut short is its silent
44
+ // direction, and "e.g.", `SKILL.md` or `v1.2` between `sizing` and "phase 0"
45
+ // ended the old window before the forbidden words and passed the misattribution
46
+ // green. RESIDUAL, both directions: sentences() still cuts short at a `.)`,
47
+ // `."`, a mid-sentence `?`, a capitalised "E.g." or an "etc." — the silent
48
+ // direction for this pin — and still merges two real sentences across its
49
+ // known shapes (#1987's `**late**.[1]`, #1899's sentence-final lowercase
50
+ // "vs."), which here can only over-fire. None of those four is in this slice
51
+ // today. `.**` itself IS in this slice (3 bold-lead sentence ends), but each
52
+ // is a genuine boundary between two unrelated sentences, not one straddling
53
+ // the `sizing`/`phase 0` attribution this pin reads.
54
+ const sizingSentence = (slice) => sentences(slice).find((s) => /`sizing`/i.test(s)) ?? "";
55
+
56
+ // Same reason as `rulingStep` above: one definition of the `minted_false_claim`
57
+ // slice, so two hand-rolled copies do not drift to different bounds.
58
+ const mfcDef = () => stripHashGutter(between(HEADER, "minted_false_claim", "# sizing", "the header"));
59
+
60
+ test("the header's column line names every column, in order", () => {
61
+ // Drift here is silent and total: the header's own awk one-liners and every
62
+ // recount in SKILL.md index by position, so a column inserted anywhere but
63
+ // the end shifts $N for every reader of an append-only file.
64
+ //
65
+ // Anchored on the tab-separated shape rather than a substring lookup, so a
66
+ // future paragraph that merely mentions run_date cannot be taken for the
67
+ // column line.
68
+ const line = headerLines.find((l) => l.startsWith("# run_date\t"));
69
+ assert.ok(line, "header has no `# run_date<TAB>...` column line");
70
+ assert.deepEqual(line.replace(/^#\s*/, "").split("\t"), COLUMNS);
71
+ });
72
+
73
+ const LEGACY_COLUMNS = COLUMNS.length - 4;
74
+
75
+ test("every data row has exactly the legacy or the full field count, never between", () => {
76
+ // Rows predating the four covariates are SHORT on purpose — blank means
77
+ // unknown, and padding them would mint measurements. So the pin cannot simply
78
+ // require the full width.
79
+ //
80
+ // It cannot be an UPPER BOUND either, and that is measured: `n <= 12` stayed
81
+ // green when a tab was typed into a legacy row's free-text `note`, because
82
+ // the row went from 8 fields to 9 and 9 is still under the header. A tab in
83
+ // `note` shifts all four appended columns for that row and for no other,
84
+ // which is the one corruption this layout makes invisible — `note` is the
85
+ // only free-text field and it now sits in front of them.
86
+ //
87
+ // Exactly-8-or-exactly-12 is what discriminates: any tab typed into a note
88
+ // lands on 9 or 13 and reds here. A partially-known row is written to the
89
+ // full width with the unknown fields EMPTY, not truncated.
90
+ const rows = TSV.split("\n").filter((l) => l.trim() && !l.startsWith("#"));
91
+ assert.ok(rows.length > 0, "no data rows — the header slice above ate the file");
92
+ const wrong = rows
93
+ .map((r, i) => [i, r.split("\t").length])
94
+ .filter(([, n]) => n !== LEGACY_COLUMNS && n !== COLUMNS.length);
95
+ assert.deepEqual(
96
+ wrong,
97
+ [],
98
+ `rows (0-indexed among data rows) whose field count is neither ${LEGACY_COLUMNS} nor ${COLUMNS.length} — a tab inside \`note\`?`,
99
+ );
100
+ });
101
+
102
+ test("the header says blank means unknown and forbids backfilling a guess", () => {
103
+ // Neither rule is enforceable in code, which is exactly what makes them worth
104
+ // pinning. Dropping the second is how a covariate gets filled in from memory
105
+ // and then read as measured.
106
+ assert.match(HEADER, /BLANK MEANS UNKNOWN/, "the header no longer says blank means unknown");
107
+ assert.match(
108
+ HEADER,
109
+ /Never fill one in\s*\n?#?\s*retroactively/,
110
+ "the header no longer forbids backfilling the four covariates",
111
+ );
112
+ assert.match(
113
+ HEADER,
114
+ /`note` IS FREE TEXT AND NOW SITS BEFORE FOUR COLUMNS/,
115
+ "the header no longer warns that a tab in `note` shifts the appended columns",
116
+ );
117
+ });
118
+
119
+ test("the header names WHICH diff `minted_false_claim` scores, and settles the caught-before-merge case", () => {
120
+ // #1029: the definition read "the diff" and a PR has two — as submitted and
121
+ // as merged. Two rows in one arm scored it opposite ways before the ruling
122
+ // named the submitted one. Nothing derives this column, so neither half is
123
+ // enforceable in code, and a scorer left to infer the convention re-derives
124
+ // the same ambiguity: the caught-before-merge case is the half that decides
125
+ // most rows, and stating only "as submitted" leaves it inferable.
126
+ //
127
+ // Sliced to the definition itself, so a stray "as submitted" elsewhere in the
128
+ // header cannot buy the pass with this one gutted. `stripHashGutter` because
129
+ // `\s+` does not span the `#` a wrapped comment line begins with.
130
+ const def = mfcDef();
131
+ assert.match(
132
+ def,
133
+ phrase("the work AS SUBMITTED asserted a factual claim"),
134
+ "the header no longer says `minted_false_claim` scores the work AS SUBMITTED",
135
+ );
136
+ assert.match(
137
+ def,
138
+ phrase("a claim review caught and the fix pass corrected before merge still counts yes"),
139
+ "the header no longer settles the caught-before-merge case, the half a scorer would otherwise infer",
140
+ );
141
+ });
142
+
143
+ test("the header rules `minted_false_claim` by REFERENT, not by surface, and names the tiebreak", () => {
144
+ // #1457: #1029 settled submitted-vs-merged and left the surface axis
145
+ // implicit. Rulings inferred it two incompatible ways — some rows scored a
146
+ // PR-body-only claim `yes`, one scored a PR-body-only claim `no` citing "the
147
+ // column's diff-scoped definition", a phrase the header never stated. The
148
+ // ruling is referent-scoped: a claim scores on ANY surface the implementer
149
+ // wrote it on when it is about the change being submitted, and is out of
150
+ // scope when it is about code the change does not touch, regardless of
151
+ // surface. A pin that only asserted inclusion of PR/commit bodies would stay
152
+ // green under the narrower "diff-scoped" reading too (every diff-carried
153
+ // claim's surface is trivially the diff); the exclusion clause is what makes
154
+ // this pin red on either kind of drop or inversion.
155
+ const def = mfcDef();
156
+ assert.match(
157
+ def,
158
+ phrase("a diff comment, a doc, a test name, a PR body, a commit body"),
159
+ "the header no longer lists a PR body and a commit body among the surfaces a claim can be written on",
160
+ );
161
+ assert.match(
162
+ def,
163
+ phrase("A PR body and a commit body are IN SCOPE on the same terms as a diff comment"),
164
+ "the header no longer states that a PR/commit body claim scores on the same terms as a diff comment",
165
+ );
166
+ assert.match(
167
+ def,
168
+ phrase("A claim about code the change does not touch is OUT of scope even when the implementer wrote it"),
169
+ "the header no longer excludes a claim about code the change does not touch, regardless of who wrote it or where",
170
+ );
171
+ assert.match(
172
+ def,
173
+ phrase(
174
+ "Tiebreak: would reading the change itself — its diff, its evidence, " +
175
+ "its behaviour — falsify this claim? If yes, it scores.",
176
+ ),
177
+ "the header no longer states the referent tiebreak: would reading the change falsify this claim",
178
+ );
179
+ });
180
+
181
+ test("SKILL.md's guard still delegates the column meanings to this header", () => {
182
+ // #472's finding in one line: the guard PROMISES this header carries the
183
+ // meanings. If that sentence is ever replaced by an inline column list, the
184
+ // two go out of sync silently and this whole file stops being the contract.
185
+ assert.match(
186
+ RUN_TEAM,
187
+ /header carries the column meanings/,
188
+ "SKILL.md no longer delegates the column meanings to the TSV header",
189
+ );
190
+ });
191
+
192
+ test("SKILL.md's ruling step names all four covariates and says a missing one stays blank", () => {
193
+ // The columns are useless unless the ruling step tells the controller to fill
194
+ // them, and worse than useless if it does not say what to do without a value:
195
+ // a guessed covariate looks measured.
196
+ const slice = rulingStep();
197
+
198
+ for (const col of ["sizing", "profile", "loc", "files"]) {
199
+ assert.match(slice, new RegExp("`" + col + "`"), `the ruling step never names \`${col}\``);
200
+ }
201
+ assert.match(
202
+ slice,
203
+ /left BLANK, never estimated/,
204
+ "the ruling step no longer says a value not in hand is left blank",
205
+ );
206
+ assert.match(
207
+ slice,
208
+ /diff-stats\.mjs/,
209
+ "the ruling step names the covariates without saying where three of them come from",
210
+ );
211
+ });
212
+
213
+ test("the documented `profile` value set is exactly what diff-stats.mjs emits", () => {
214
+ // Restating an enum in prose is how it drifts: the first draft of this header
215
+ // said `docs-only`, which the script never emits — `docsOnly` is a separate
216
+ // boolean on the same stats object — and omitted `empty`, which the CLI does
217
+ // reach on a genuine zero-file PR. Two spellings for one stratum split the
218
+ // group the column exists to compare, and nothing here noticed, because the
219
+ // pins above cover the column NAMES and not their values.
220
+ //
221
+ // So derive rather than restate. Both halves are guarded: an unguarded
222
+ // `.match()[0]` at module scope takes the whole file down on a reformat that
223
+ // changed no behaviour, which is why this lives inside the test and asserts
224
+ // before it indexes.
225
+ const src = readFileSync(join(REPO, "plugin", "scripts", "diff-stats.mjs"), "utf8");
226
+ const emitted = [...src.matchAll(/^\s*(?:else\s+)?(?:if\s*\([^)]*\)\s*)?profile = "([a-z-]+)";/gm)].map((m) => m[1]);
227
+ assert.ok(emitted.length >= 5, `diff-stats.mjs profile ladder not found — got ${emitted.length}`);
228
+
229
+ // The header is wrapped across comment lines, so normalise before reading the
230
+ // parenthetical: strip the `# ` gutter, join, drop whitespace inside the list.
231
+ const flat = HEADER.replace(/^#\s?/gm, "").replace(/\n/g, " ");
232
+ const hit = /it prints \(([^)]+)\)/.exec(flat);
233
+ assert.ok(hit, "the header no longer lists the `profile` value set in parentheses");
234
+ const documented = hit[1].replace(/\s+/g, "").split("/").filter(Boolean);
235
+
236
+ assert.deepEqual(
237
+ [...documented].sort(),
238
+ [...new Set(emitted)].sort(),
239
+ "the header's `profile` value set and diff-stats.mjs's ladder disagree",
240
+ );
241
+ });
242
+
243
+ test("the header forbids the `docs-only` spelling the script never emits", () => {
244
+ // The narrow trap, kept separate from the set comparison above: a future edit
245
+ // could satisfy the set while dropping the warning, and "docs-only" is the
246
+ // spelling every other paragraph in the repo uses as an English adjective —
247
+ // which is exactly why it reached this header as a value in the first place.
248
+ assert.match(HEADER, /never\s*\n?#?\s*"docs-only"/, "the header no longer warns off the `docs-only` spelling");
249
+ });
250
+
251
+ test("the sizing verdict has a stated collection channel, and it is not phase 0", () => {
252
+ // The column shipped described as "phase 0's light/heavy verdict ... recorded
253
+ // at claim time", which is wrong twice — phase 0 shortlists (`## Phase 0 —
254
+ // shortlist`), phase 1 claims, and the sizing run happens inside the member in
255
+ // phase 2 — and named no channel at all. With the adjacent rule "a value not in
256
+ // hand is left BLANK, never estimated", that made the covariate correct-to-omit
257
+ // on every row forever: documented as the thing a tier comparison must condition
258
+ // on, and uncollectable.
259
+ const slice = rulingStep();
260
+ // Negative pinned on the ATTRIBUTION, not on one phrasing of it: the first
261
+ // draft of this test forbade the literal `sizing` is phase 0's and stayed
262
+ // green under a reworded restatement of the same error.
263
+ const sentence = sizingSentence(slice);
264
+ assert.ok(sentence, "the ruling step no longer describes `sizing` at all");
265
+ assert.doesNotMatch(
266
+ sentence,
267
+ /phase 0/i,
268
+ `the ruling step attributes sizing to phase 0 again — phase 0 shortlists, it does not size: ${sentence}`,
269
+ );
270
+ // Bound to the word `sizing` itself, not just "somewhere in the sentence":
271
+ // found in review, widening `sizingSentence` from a 120-char window to the
272
+ // whole ~326-char sentence also widened THIS pre-existing positive check,
273
+ // which used to be tight against that same window. A misattribution that
274
+ // keeps "member" alive later in the sentence (e.g. in the trailing
275
+ // `diff-stats.mjs` clause) would otherwise still pass.
276
+ assert.match(
277
+ sentence,
278
+ /`sizing`[\s\S]{0,40}member/i,
279
+ "the ruling step no longer says the sizing verdict is the member's, within reach of `sizing` itself",
280
+ );
281
+ assert.match(
282
+ slice,
283
+ /PR body|Sizing:/,
284
+ "the ruling step no longer says where the controller reads the sizing verdict from",
285
+ );
286
+ });
287
+
288
+ test("a period in the gap does not hide a phase-0 attribution, and the next sentence's phase 0 is not this one's", () => {
289
+ // #1983's reproduction, both directions. Refuse: "e.g." sat between `sizing`
290
+ // and "phase 0" and the first-period window stopped at it, green. Accept: the
291
+ // window is the sentence, so a "phase 0" in the NEXT sentence is not an
292
+ // attribution — widening past the real end would red a true statement.
293
+ const slice = rulingStep();
294
+ const opening = phrase("`sizing` is the");
295
+ const misattributed = slice.replace(opening, "`sizing` is the member's verdict, e.g. the one phase 0 records. `sizing` is the");
296
+ assert.notEqual(misattributed, slice, "the fixture's anchor no longer matches the ruling step — update it, do not delete it");
297
+ assert.match(sizingSentence(misattributed), /phase 0/i, "a phase-0 attribution with an abbreviation before it read as clean");
298
+ const nextSentence = slice.replace(opening, "`sizing` is the member's verdict, e.g. from its own run. Phase 0 only shortlists. `sizing` is the");
299
+ assert.doesNotMatch(sizingSentence(nextSentence), /phase 0/i, "the sizing sentence ran on into the next one");
300
+ });
301
+
302
+ test("a `member` mentioned later in the sentence does not cover a `sizing` misattributed near its own start", () => {
303
+ // Found in review of #1983: extracting the WHOLE sentence (up from a 120-char
304
+ // window) also widened the pre-existing positive check above, which used to
305
+ // require "member" within that same 120 chars. A misattribution that keeps
306
+ // "member" alive later in the ~326-char sentence — here, in the trailing
307
+ // `diff-stats.mjs` clause — passed silently until that check was re-bound to
308
+ // the word `sizing` itself.
309
+ const slice = rulingStep();
310
+ const misattributed = slice
311
+ .replace("`sizing` is the\n**member's** own", "`sizing` is the\n**controller's** own")
312
+ .replace(
313
+ "`profile`, `loc` and `files` all come from `diff-stats.mjs` over the merged\ndiff.",
314
+ "`profile`, `loc` and `files` all come from `diff-stats.mjs` over the member's merged\ndiff.",
315
+ );
316
+ assert.notEqual(misattributed, slice, "the fixture's anchors no longer match the ruling step — update it, do not delete it");
317
+ assert.doesNotMatch(
318
+ sizingSentence(misattributed),
319
+ /`sizing`[\s\S]{0,40}member/i,
320
+ "a `sizing` misattributed to the controller read as the member's because `member` appears later in the sentence",
321
+ );
322
+ });
323
+
324
+ test("the dispatch brief tells the member to emit the Sizing line the ruling step reads", () => {
325
+ // Both ends or neither: a ruling step that reads `Sizing:` off a PR body no
326
+ // member was told to write is the same blank column with more words. Pinned
327
+ // apart from the reader above so dropping either end reds. The brief is the
328
+ // implementer agent body since #1804 (spec 2026-09-24 § 2 Decision 2) — the
329
+ // member's system prompt, where run-team's phase 2 used to paste it.
330
+ const brief = readFileSync(join(REPO, "plugin", "agents", "fleet-implementer.agent.md"), "utf8").split("---").slice(2).join("---");
331
+ assert.match(
332
+ brief,
333
+ /`Sizing: light` or `Sizing: heavy`/,
334
+ "the dispatch brief no longer tells the member to put its sizing verdict in the PR body",
335
+ );
336
+ });
337
+
338
+ test("the ruling step refuses to record a sizing verdict it cannot date", () => {
339
+ // #1070. The channel pinned above says WHERE the verdict is read from; it says
340
+ // nothing about whether the line was produced by the run it claims. A
341
+ // `Sizing:` line typed in before `sizing-a-ticket` ever ran is byte-identical
342
+ // to one the skill produced, so the body is not a second source for itself —
343
+ // measured on a member that wrote the verdict first and caught itself
344
+ // afterwards, which is the only reason anyone knows this can happen.
345
+ const slice = rulingStep();
346
+
347
+ // The rule as ONE span, both conditions joined. Split into two presence
348
+ // checks, a controller holding a signalled-but-undated verdict satisfies the
349
+ // half it is looking at and records it, which is the whole defect.
350
+ assert.match(
351
+ slice,
352
+ phrase("Record `sizing` only when the report places that run before the PR AND the line carries its signal"),
353
+ "recording `sizing` is no longer conditioned on the report's ordering together with the line's signal",
354
+ );
355
+ // The else-branch, bound to the action it demands. A rule with no stated
356
+ // failure action is read as advice, and the adjacent BLANK rule is about a
357
+ // value not in hand — an undated verdict IS in hand, which is what makes it
358
+ // dangerous.
359
+ assert.match(
360
+ slice,
361
+ phrase("leave the field BLANK and say which in `note`"),
362
+ "the ruling step no longer says what to do when the verdict cannot be dated",
363
+ );
364
+ // The three failure cases, as the one sentence that enumerates them: a
365
+ // controller told only about a missing clause still records the case where
366
+ // the member reported writing the line early.
367
+ assert.match(
368
+ slice,
369
+ phrase("Ordering clause missing, verdict authored before the run with no corrected value reported, or body and report naming different verdicts"),
370
+ "the ruling step no longer enumerates which failures blank the covariate",
371
+ );
372
+ // The rejected alternative, kept explicit: deriving the verdict from the diff
373
+ // was ruled premature on #1070, and a controller staring at a blank column
374
+ // with `diff-stats.mjs` output already in hand is exactly who would reach for
375
+ // it — producing a value that reads as measured, which is the defect again.
376
+ assert.match(
377
+ slice,
378
+ phrase("Do not re-derive the verdict from the diff to fill the gap"),
379
+ "the ruling step no longer forbids substituting a diff-derived proxy for the member's verdict",
380
+ );
381
+ });
382
+
383
+ // #1071: `run_date` is DERIVED in `member-outcomes.tsv` (a transcript mtime)
384
+ // and STAMPED AT RULING here, and phase 2 states TWO floors that each count
385
+ // distinct `run_date`s — three PRs across two dates over this file, ten pairs
386
+ // across five dates over the other. The ticket's filer read the ten/five floor
387
+ // as a count over THIS file. It is not one, and nothing in this header said so.
388
+ //
389
+ // The paragraph that now says it makes claims about files this one does not
390
+ // contain, which is the shape that rots silently: it stays true only while
391
+ // member-outcomes.tsv keeps carrying the pairing query, `member-outcomes.mjs`
392
+ // keeps stamping dates off an mtime, and SKILL.md keeps both floors' numbers.
393
+ // So the pins below DERIVE each claim from its real source — the same reason
394
+ // the `profile` pin above derives the enum instead of restating it.
395
+ const MEMBER_TSV = readFileSync(join(REPO, "docs", "metrics", "member-outcomes.tsv"), "utf8");
396
+ const MEMBER_SRC = readFileSync(join(REPO, "plugin", "scripts", "member-outcomes.mjs"), "utf8");
397
+
398
+ const memberHeaderLines = [];
399
+ for (const l of MEMBER_TSV.split("\n")) {
400
+ if (!l.startsWith("#") && l.trim()) break;
401
+ memberHeaderLines.push(l);
402
+ }
403
+
404
+ // Bounded at both ends, for `between`'s own stated reason: this header is 140
405
+ // lines about exactly these words, so an unbounded match is satisfiable from
406
+ // the provenance block above the paragraph or the column legend below it. The
407
+ // end bound is the column line's tab-separated shape, which no prose line has.
408
+ const runDateSources = () =>
409
+ stripHashGutter(between(HEADER, "WHICH FILE'S `run_date` SUPPLIES", "# run_date\t", "the header"));
410
+
411
+ test("the header says which file each distinct-`run_date` count is read from, and that the two columns differ", () => {
412
+ const block = runDateSources();
413
+
414
+ // Each floor bound to its file in ONE span. Split into a mention of the
415
+ // number and a separate mention of the file, a reader counting the ten/five
416
+ // floor over this file satisfies both halves and is wrong anyway — which is
417
+ // the defect, not a wording preference.
418
+ assert.match(
419
+ block,
420
+ phrase("at least three `class=routine` PRs spanning two or more distinct `run_date`s — IS this file's `run_date`"),
421
+ "the header no longer says the revert floor's distinct-date count is read from THIS file",
422
+ );
423
+ assert.match(
424
+ block,
425
+ phrase(
426
+ "at least ten within-run pairs across five or more distinct `run_date`s, the floor that forbids reading the pairs early — is NOT read here at all. It comes from the pairing query in `docs/metrics/member-outcomes.tsv`'s own header",
427
+ ),
428
+ "the header no longer says the pairing floor's distinct-date count is read from member-outcomes.tsv, not here",
429
+ );
430
+
431
+ // The definitional halves, each joined to what it makes the column MEAN. A
432
+ // reader told only that the two are "different" still has to guess which way.
433
+ assert.match(
434
+ block,
435
+ phrase(
436
+ "Here it is STAMPED AT RULING — `tier-outcomes.mjs append` reads the clock when the controller rules a PR's review, where before 2026-09-29 the controller typed it at that same moment — so it records WHICH RUN THE PR BELONGS TO",
437
+ ),
438
+ "the header no longer says this file's `run_date` is stamped at ruling and records which run the PR belongs to, as one contiguous claim",
439
+ );
440
+ assert.match(
441
+ block,
442
+ phrase(
443
+ "In `member-outcomes.tsv` it is DERIVED in code: `member-outcomes.mjs` stamps every row of a session from the NEWEST TRANSCRIPT MTIME in that session directory rather than a clock read, so it records WHEN THE SESSION LAST WROTE",
444
+ ),
445
+ "the header no longer says member-outcomes.tsv's `run_date` is derived from a transcript mtime",
446
+ );
447
+
448
+ // The correction the ticket itself got wrong: it reported the derived date as
449
+ // drifting "if the session is re-scraped after midnight". A re-scrape moves
450
+ // nothing — the mtime is fixed once written, which is why a December backfill
451
+ // still dates an August session in August. Dropping this sentence restores
452
+ // the false claim into a header other prose cites.
453
+ assert.match(
454
+ block,
455
+ phrase("It moves only when the session WRITES AGAIN"),
456
+ "the header no longer says the derived date moves on a re-write, not on a re-scrape",
457
+ );
458
+ assert.match(
459
+ block,
460
+ phrase("never because the file was merely re-scraped"),
461
+ "the header no longer rules out a bare re-scrape as a cause of date drift",
462
+ );
463
+ });
464
+
465
+ test("the header's `run_date` source claims still hold against the query, the scraper and the guard", () => {
466
+ const block = runDateSources();
467
+
468
+ // The floor half: SKILL.md's own recount accumulates distinct dates keyed on
469
+ // a positional field of THIS file. Resolve that `$n` against the column list
470
+ // rather than trusting the paragraph's word for it — the mutation this must
471
+ // survive is repointing the recount at another column.
472
+ const floorAwk = between(RUN_TEAM, "grep -vc '^#' docs/metrics/tier-outcomes.tsv", "```", "SKILL.md's recount block");
473
+ const floorKey = /d\[\$(\d+)\]=1/.exec(floorAwk);
474
+ assert.ok(floorKey, "SKILL.md's recount no longer accumulates the floor's distinct dates");
475
+ assert.match(floorAwk, /length\(d\)/, "SKILL.md's recount no longer prints the floor's distinct-date count");
476
+ assert.equal(COLUMNS[floorKey[1] - 1], "run_date", "the floor's distinct-date count is not this file's `run_date`");
477
+ assert.ok(
478
+ block.includes(floorKey[0]),
479
+ `the header cites an idiom for the floor's date key that SKILL.md no longer uses (\`${floorKey[0]}\`)`,
480
+ );
481
+
482
+ // The header's own prose also names WHICH column that count reads
483
+ // ("column 1 here") — a positional claim nothing above checked, since
484
+ // `floorKey[0]` only pins the awk idiom, not the number the header prints
485
+ // beside it in English. Resolve it against the same `$n` the recount
486
+ // above actually keys on.
487
+ const floorColumnCite = /column (\d+) here/.exec(block);
488
+ assert.ok(floorColumnCite, "the header no longer names which column the revert floor's distinct-date count reads");
489
+ assert.equal(
490
+ Number(floorColumnCite[1]),
491
+ Number(floorKey[1]),
492
+ "the header's `column N here` cite no longer matches the column SKILL.md's recount actually keys on",
493
+ );
494
+
495
+ // The pairing half: the query lives in the OTHER file's header and keys its
496
+ // dates off the other file's own columns, so resolve it against that file's
497
+ // COLUMNS export. This is the claim that makes the paragraph load-bearing —
498
+ // if the query moves or is rekeyed, "read it from there" stops being true.
499
+ // Bounded to the query BLOCK, not the whole 140-line header —
500
+ // member-outcomes-header.test.mjs's own `pairQuery()` bounds it the same
501
+ // way, for the same reason: an unbounded match is satisfiable by a stale
502
+ // `d[$1]=$2` idiom anywhere in that header even after the real query moved
503
+ // or was rekeyed, which is exactly what would make "read it from there"
504
+ // stop being true without this pin noticing.
505
+ const pairQueryStart = memberHeaderLines.findIndex((l) => l.includes("awk -F") && l.includes("fleet-implementer-alt"));
506
+ assert.ok(pairQueryStart >= 0, "member-outcomes.tsv's header lost its within-run pair query");
507
+ let pairQueryEnd = pairQueryStart;
508
+ while (pairQueryEnd < memberHeaderLines.length && !memberHeaderLines[pairQueryEnd].endsWith("docs/metrics/member-outcomes.tsv")) pairQueryEnd++;
509
+ assert.ok(pairQueryEnd < memberHeaderLines.length, "the pairing query never reaches the file it reads");
510
+ const pairQueryBlock = memberHeaderLines.slice(pairQueryStart, pairQueryEnd + 1).join("\n");
511
+
512
+ const pairKey = /d\[\$(\d+)\]=\$(\d+)/.exec(pairQueryBlock);
513
+ assert.ok(pairKey, "member-outcomes.tsv's header no longer carries the pairing query this header points at");
514
+ assert.equal(
515
+ MEMBER_COLUMNS[pairKey[2] - 1],
516
+ "run_date",
517
+ "the pairing query's distinct-date count is not member-outcomes.tsv's `run_date`",
518
+ );
519
+ assert.ok(
520
+ block.includes(pairKey[0]),
521
+ `the header cites an idiom for the pairing query's date key that member-outcomes.tsv no longer uses (\`${pairKey[0]}\`)`,
522
+ );
523
+
524
+ // The header also cites the query's distinct-date ACCUMULATOR
525
+ // (`length(r)`) — resolve the variable name against the query's own
526
+ // `length(...)` call rather than trusting the header's word for it.
527
+ const pairAccumulator = /print n\+0, length\((\w+)\)/.exec(pairQueryBlock);
528
+ assert.ok(pairAccumulator, "member-outcomes.tsv's pair query no longer prints its distinct-date count via `length(...)`");
529
+ assert.ok(
530
+ block.includes(`length(${pairAccumulator[1]})`),
531
+ `the header cites the wrong accumulator for the pairing query's distinct-date count (expected \`length(${pairAccumulator[1]})\`)`,
532
+ );
533
+
534
+ // The DERIVED half as code, not prose: the date comes off a transcript
535
+ // mtime. A scraper switched to a clock read would make this header's
536
+ // central contrast false while every prose pin above stayed green. Bound
537
+ // to rowsForSession, member-outcomes.mjs's one stamp site, rather than
538
+ // scanning the whole file — a regression outside this slice could
539
+ // otherwise satisfy `assert.match` over MEMBER_SRC as a whole through
540
+ // unrelated text elsewhere.
541
+ const rowsForSessionSrc = between(
542
+ MEMBER_SRC,
543
+ "export function rowsForSession(sessionDir, stats = {}) {",
544
+ "export const COLUMNS",
545
+ "member-outcomes.mjs's rowsForSession",
546
+ );
547
+ assert.match(
548
+ rowsForSessionSrc,
549
+ /newest = Math\.max\(newest, statSync\(.+\)\.mtimeMs\)/,
550
+ "member-outcomes.mjs's rowsForSession no longer takes its date from a transcript mtime",
551
+ );
552
+ assert.match(
553
+ rowsForSessionSrc,
554
+ /const run_date = newest \? new Date\(newest\)/,
555
+ "member-outcomes.mjs's rowsForSession no longer stamps `run_date` from that mtime",
556
+ );
557
+
558
+ // The STAMPED-AT-RULING half is the writer's behaviour since #2207, not a
559
+ // SKILL.md duty: tier-outcomes.test.mjs runs `append` and pins the date it
560
+ // writes to the day it ran.
561
+
562
+ // Both floors' numbers, as the paragraph quotes them. It names four figures
563
+ // it does not own; a threshold changed in SKILL.md alone leaves this header
564
+ // quietly citing the old one.
565
+ const guard = unemphasized(RUN_TEAM);
566
+ assert.match(
567
+ guard,
568
+ phrase("Floor: the file holds at least three `class=routine` PRs spanning two or more distinct `run_date`s"),
569
+ "SKILL.md's revert floor is no longer three PRs across two dates — the header quotes those numbers",
570
+ );
571
+ assert.match(
572
+ guard,
573
+ phrase("there are at least ten of them across five or more distinct `run_date`s"),
574
+ "SKILL.md's pairing floor is no longer ten pairs across five dates — the header quotes those numbers",
575
+ );
576
+ assert.match(
577
+ block,
578
+ phrase("at least three `class=routine` PRs spanning two or more"),
579
+ "the header no longer states the revert floor it attributes to this file",
580
+ );
581
+ assert.match(
582
+ block,
583
+ phrase("at least ten within-run pairs across five or more"),
584
+ "the header no longer states the pairing floor it attributes to the other file",
585
+ );
586
+ });