clearotron 0.7.0-beta.2 → 0.7.0-beta.4

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 (137) hide show
  1. package/INSTALL.md +5 -5
  2. package/QUICKSTART.md +4 -4
  3. package/README.md +2 -2
  4. package/bin/README.md +3 -4
  5. package/bin/clearotron.mjs +1 -1
  6. package/bin/onboard.mjs +28 -40
  7. package/bin/status.mjs +11 -0
  8. package/build-info.json +2 -2
  9. package/docs/DELIVERY.md +30 -6
  10. package/docs/architecture/04-configuration-reference.md +1 -0
  11. package/driver/CHANGELOG.md +34 -0
  12. package/driver/compose-read.mjs +4 -3
  13. package/driver/contract-arm2-baseline.json +1 -2
  14. package/driver/contract-dictation-registry.mjs +7 -48
  15. package/driver/contract-e3-backlog.mjs +55 -52
  16. package/driver/contract-e3-baseline.json +22 -7
  17. package/driver/contract-vocabulary.mjs +4 -2
  18. package/driver/coverage-form.mjs +4 -0
  19. package/driver/coverage-rows-run.mjs +68 -4
  20. package/driver/engine/anthropic-agent.mjs +10 -13
  21. package/driver/engine/common.mjs +34 -22
  22. package/driver/engine/health.mjs +251 -0
  23. package/driver/engine/jx-turn.mjs +2 -1
  24. package/driver/engine/mcp/codex-config.mjs +16 -1
  25. package/driver/engine/mcp/crowd-note.mjs +1 -1
  26. package/driver/engine/mcp/gather-config.mjs +34 -9
  27. package/driver/engine/mcp/perplexity-server.mjs +33 -23
  28. package/driver/engine/mcp/recording-server.mjs +67 -58
  29. package/driver/engine/mcp/unit-note-server.mjs +2 -0
  30. package/driver/engine/openai-agent.mjs +9 -24
  31. package/driver/engine/probe.mjs +24 -7
  32. package/driver/findings-model.mjs +54 -0
  33. package/driver/jx-units.mjs +139 -30
  34. package/driver/knockout-assess-record.mjs +2 -2
  35. package/driver/knockout-correction-check.mjs +119 -0
  36. package/driver/knockout-correction-record.mjs +1 -1
  37. package/driver/knockout-frame-record.mjs +24 -10
  38. package/driver/knockout-review-record.mjs +35 -430
  39. package/driver/ladder/dispatch.mjs +4 -2
  40. package/driver/ladder/form-repair.mjs +5 -5
  41. package/driver/ladder/form-sync.mjs +4 -6
  42. package/driver/ladder/next-rung.mjs +10 -0
  43. package/driver/ladder/repair-messages.mjs +37 -65
  44. package/driver/ladder/stage.mjs +3 -3
  45. package/driver/ladder/turn-signals.mjs +4 -14
  46. package/driver/manual-paragraphs.mjs +22 -2
  47. package/driver/mark-logos.mjs +25 -9
  48. package/driver/package.json +1 -1
  49. package/driver/pipeline-knockout.mjs +2 -2
  50. package/driver/predelivery-lint.mjs +39 -7
  51. package/driver/product-fault.mjs +53 -0
  52. package/driver/publish/knockout.mjs +2 -1
  53. package/driver/publish/register-record-html.mjs +7 -9
  54. package/driver/publish/register-record.mjs +0 -1
  55. package/driver/publish/render.mjs +16 -10
  56. package/driver/publish/strings.mjs +0 -1
  57. package/driver/publish/templates/knockout.css +1 -1
  58. package/driver/publish/templates/report.css +2 -4
  59. package/driver/recording-agreement.mjs +6 -4
  60. package/driver/register-band-run.mjs +2 -2
  61. package/driver/register-digest-record.mjs +31 -9
  62. package/driver/register-unit-record.mjs +10 -1
  63. package/driver/repair-composers.mjs +12 -11
  64. package/driver/repair-contract.mjs +6 -6
  65. package/driver/repair-targets.mjs +7 -6
  66. package/driver/run-outcome.mjs +8 -0
  67. package/driver/runner.mjs +42 -3
  68. package/driver/skills/README.md +5 -4
  69. package/driver/skills/blind-frame/SKILL.md +1 -1
  70. package/driver/skills/case-law-citation/SKILL.md +1 -1
  71. package/driver/skills/clearance-common-law/SKILL.md +6 -423
  72. package/driver/skills/clearance-common-law/grid.md +272 -0
  73. package/driver/skills/clearance-common-law/meaning.md +142 -0
  74. package/driver/skills/clearance-common-law/perplexity-prompts.md +4 -2
  75. package/driver/skills/clearance-register/SKILL.md +7 -174
  76. package/driver/skills/clearance-register/digest.md +89 -25
  77. package/driver/skills/clearance-register/providers/clarivate-questions.md +154 -0
  78. package/driver/skills/clearance-register/providers/clarivate.md +5 -149
  79. package/driver/skills/clearance-register/providers/signa-questions.md +120 -0
  80. package/driver/skills/clearance-register/providers/signa.md +3 -114
  81. package/driver/skills/clearance-register/providers/uspto-local.md +3 -3
  82. package/driver/skills/clearance-register/register-recipes.md +10 -10
  83. package/driver/skills/clearance-register/status-rules.md +2 -2
  84. package/driver/skills/clearance-register/unit.md +96 -54
  85. package/driver/skills/clearance-search/delivery-contract.md +11 -49
  86. package/driver/skills/clearance-search/firm-wide-reasoning.md +10 -13
  87. package/driver/skills/clearance-search/look-at-what-you-have.md +7 -0
  88. package/driver/skills/clearance-search/phase2-execution.md +12 -117
  89. package/driver/skills/clearance-search/report-card-rules.md +2 -2
  90. package/driver/skills/clearance-search/report-prose.md +30 -23
  91. package/driver/skills/clearance-search/synthesis-rules.md +27 -69
  92. package/driver/skills/clearance-search/worked-examples.md +11 -16
  93. package/driver/skills/clearance-variants/SKILL.md +7 -7
  94. package/driver/skills/clearance-variants/transliteration-scripts.md +2 -2
  95. package/driver/skills/frame-diff/SKILL.md +1 -1
  96. package/driver/skills/knockout-assess/SKILL.md +54 -41
  97. package/driver/skills/knockout-frame/SKILL.md +13 -12
  98. package/driver/skills/knockout-register-read/SKILL.md +2 -10
  99. package/driver/skills/matter-frame/SKILL.md +2 -2
  100. package/driver/skills/narrative-refutation/SKILL.md +7 -6
  101. package/driver/skills/placement-inquiry/SKILL.md +3 -3
  102. package/driver/skills/skeptic/SKILL.md +111 -0
  103. package/driver/skills/whatif-memo/SKILL.md +5 -2
  104. package/driver/stage-declarations.mjs +6 -0
  105. package/driver/stages-knockout.mjs +36 -38
  106. package/driver/stages.mjs +69 -64
  107. package/driver/steps/delivery.mjs +6 -4
  108. package/driver/steps/open-run.mjs +2 -0
  109. package/driver/steps/overview-and-cards.mjs +2 -2
  110. package/driver/steps/register-sweep.mjs +20 -1
  111. package/driver/steps/synthesis.mjs +28 -11
  112. package/driver/suite-census.json +217 -61
  113. package/driver/synthesis-record.mjs +24 -2
  114. package/driver/verify-knockout.mjs +23 -3
  115. package/driver/whatif-memo-run.mjs +39 -10
  116. package/driver/whatif-queue.mjs +53 -7
  117. package/mcp-server/CHANGELOG.md +8 -0
  118. package/mcp-server/lib/ops.mjs +19 -10
  119. package/mcp-server/lib/whatif.mjs +7 -6
  120. package/mcp-server/package.json +1 -1
  121. package/mcp-server/server.mjs +55 -19
  122. package/package.json +1 -1
  123. package/portal-ui/package.json +1 -1
  124. package/providers/clarivate/src/adapter.js +3 -0
  125. package/providers/jx/src/nativeread.js +5 -3
  126. package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
  127. package/providers/oauth-mcp-bridge/package.json +1 -1
  128. package/providers/perplexity/src/core.js +7 -2
  129. package/providers/signa/src/adapter.js +3 -0
  130. package/scripts/e2e-first-time.mjs +2 -2
  131. package/shared/brand.mjs +0 -2
  132. package/shared/connector-signin-probe.mjs +1 -1
  133. package/shared/names-in-force.mjs +1 -0
  134. package/skills/clearotron-account/SKILL.md +21 -11
  135. package/skills/clearotron-client/SKILL.md +15 -15
  136. package/skills/clearotron-ops/COURIER.md +5 -1
  137. package/skills/clearotron-ops/SKILL.md +21 -14
@@ -66,7 +66,7 @@ Both tiers below are answers to ONE question, and you answer it in writing on ev
66
66
 
67
67
  > **Does this conflict change the advice, or only complete the record?**
68
68
 
69
- Expanded, the way you would put it to yourself before signing: would the senior lawyer signing this clearance need to discuss **this** conflict with the client before the client acts — because this owner can and plausibly would block adoption, or because resolving it changes what the client should *do* (consent, scope-narrowing, a coexistence call, filing strategy)? Changes-the-advice → headline-candidate. Completes-the-record → sheet 2.
69
+ Expanded, the way you would put it to yourself before signing: would the reviewing lawyer signing this clearance need to discuss **this** conflict with the client before the client acts — because this owner can and plausibly would block adoption, or because resolving it changes what the client should *do* (consent, scope-narrowing, a coexistence call, filing strategy)? Changes-the-advice → headline-candidate. Completes-the-record → sheet 2.
70
70
 
71
71
  Two things the question deliberately is **not**. It is not "does this warrant the client narrative" — narrative-worthiness is relative to the rest of the band, so it moves whenever the band's composition moves, and the same record placed twice lands in two tiers. And it is not a risk tier: you are told below not to tier risk numerically, that is the digest's job, and a boundary you can only decide by computing the thing you are forbidden to compute is a boundary that falls back to feel. Ask what the conflict *does to the advice*, and write the answer down.
72
72
 
@@ -109,7 +109,7 @@ When your placement deviates from a strict reading of the candidate's class-matc
109
109
 
110
110
  ### Band reconciliation — form the expectation for THIS mark, then check the band against it
111
111
 
112
- Before placing individual candidates, step back and reason about the band **as a whole**, the way a senior lawyer reads a search result before drafting. Write a short reconciliation (3-8 lines) at the top of the file:
112
+ Before placing individual candidates, step back and reason about the band **as a whole**, the way the reviewing lawyer reads a search result before drafting. Write a short reconciliation (3-8 lines) at the top of the file:
113
113
 
114
114
  - **What did I expect to see for THIS mark?** Given the archetype + risk theory (from `matter-context` / the manifest): a coined word in an empty class should return little; a saturated everyday word in a crowded class should return a wall of names; a famous-element-masked mark should surface the famous owner.
115
115
  - **Does the band match that expectation?** Reconcile, and name the mismatches explicitly. The traps to catch (these are reasoning prompts, not a checklist to mechanise):
@@ -173,7 +173,7 @@ The inquiry above is primary. The patterns below describe how the inquiry's answ
173
173
  ## Reasoning posture
174
174
 
175
175
  - **Declare the borderline ones.** If your written answer to the promotion question could be argued either way by two competent lawyers on this record, **say so**: set `"borderline": true` on that entry in `placements.json`, and let the `reason` state both readings and which one you took. Declaring a borderline is a correct professional outcome, never a failure — what is a failure is a confident tier on a record the question does not decide. The digest is told to expect your declarations and to resolve each one either way in writing, so a declaration costs the run nothing and gives the disagreement somewhere auditable to happen. It is an **internal** adjudication flag between stages: it never travels into the client's report as hedge language.
176
- - **If you'd promote a candidate to a tier higher than a senior lawyer would, write the reasoning that defends the promotion explicitly. If you cannot defend it, demote.** This is the tie-break AFTER the promotion question, never instead of it: answer the question first, in writing; demote-on-undefendable settles what the answer leaves standing.
176
+ - **If you'd promote a candidate to a tier higher than the reviewing lawyer would, write the reasoning that defends the promotion explicitly. If you cannot defend it, demote.** This is the tie-break AFTER the promotion question, never instead of it: answer the question first, in writing; demote-on-undefendable settles what the answer leaves standing.
177
177
  - **Nothing is silently filtered.** Every out-of-scope candidate has a one-line reasoning trace. Audit trail must show *why*, not just *what*.
178
178
  - **Owner attribution gaps stop promotion.** If a candidate is a common-law game title without a confirmed `developer_of_record` / `publisher_of_record` field in common-law-findings, place at sheet-2 with a verify-flag. Do NOT confabulate publishers by inferring from prior-frequent gaming companies (Bandai Namco, Tencent, etc.).
179
179
  - **Don't down-place an on-field in-class identical mark on filer-size or apparent-dormancy grounds.** A small / individual / tail-market filer of an in-class identical mark is a real paper conflict — place it at headline-candidate or sheet-2 (never out-of-scope), the promotion question deciding which, and leave the filer-size / revocation-vulnerability read for the digest/synthesis Stage-2. Those are mitigants to weigh, not reasons to keep a real conflict out of the report.
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: skeptic
3
+ description: The skeptic review, a fresh-eyes audit of the gathered findings before they are trusted. **Run by the driver** — do not call directly. Reads the register and common-law findings, the variant manifest and the driver's coverage table, and hands back its flags and escalation decisions through `record_skeptic`.
4
+ ---
5
+
6
+ # Skeptic review (a fresh-eyes self-audit before you trust the findings)
7
+
8
+ Before cross-pollination, get a **second opinion** on the findings — a fresh-eyes review by a reviewer that did
9
+ not write them (the tier is declared in `stages.mjs`), so it is a genuinely independent perspective rather than
10
+ the authoring stack auditing itself. It reads the two findings files + the manifest and hands its audit back by
11
+ calling the **`record_skeptic`** tool: `flags` — one entry per flag, one line each, citing the affected
12
+ worker/axis/finding — and `escalations` — one entry per register axis that has a **material, unresolved** gap a
13
+ re-run would actually fix, each with `axis` and a one-line `reason`.
14
+
15
+ **It writes no file.** The driver renders `skeptic-flags.md` from those values: the flag bullets, the
16
+ "no flags surfaced" sentinel when `flags` is empty, and the `## Escalation decisions` section. An EMPTY `flags`
17
+ array IS the clean answer and an EMPTY `escalations` array IS a decision — omitting either is not one.
18
+
19
+ Escalation is decided by the `escalations` field and by nothing else. Naming an axis in a flag does **not**
20
+ escalate it, and typing an `ESCALATE:` token inside a flag or a reason is REFUSED rather than parsed — so a
21
+ passing mention never triggers a re-run, and a real gap is never missed because the axis name happened to be
22
+ absent from prose.
23
+
24
+ **Coverage is DATA here, never a re-derivation.** The dispatch carries a driver-computed table built from
25
+ `register-coverage-ledger.json` (every axis/unit/status/reason row) and `_driver/plan-execution.json` (every
26
+ query the active provider refused, with the mechanical reason), plus the owner×element screen's receipt. Both
27
+ files are also named as inputs and can be read directly, but the escalation question is already answered in the
28
+ table — do **not** reconstruct the ledger by reading the findings prose.
29
+
30
+ Two classes of gap are **not** escalation triggers:
31
+ - a gap the **Coverage ledger records as `coverage-limited`** — a crowd recorded with its count, which a
32
+ warm re-run cannot close;
33
+ - a deferral marked `NOT CLOSEABLE` in the table — the active provider cannot express the slice (a predicate it
34
+ lacks, an office outside its coverage, a script its index cannot hold, an owner surface it does not have), the
35
+ envelope close has already asked it again, it was not asked in this run, or it names no search at all — so a
36
+ re-run cannot close it. **A `NOT CLOSEABLE` deferral is never closeable by time**, and the deadline envelope will
37
+ not close it either. It stays an open,
38
+ disclosed gap, and the coverage floor is right to refuse a clean verdict over it — if a findings surface reads
39
+ such a slice as clean, that IS a flag; it is never an escalation.
40
+
41
+ Escalate only genuinely closeable gaps (a `deferred` row the table lists as CLOSEABLE, or a new concern on a
42
+ `confirmed-clean` row). The driver enforces both skips too, but keep the `escalations` list clean.
43
+
44
+ **A saturated everyday-word translation IS recoverable — narrow it to the field by class (replaces the old
45
+ re-run-the-specific-concept-rendering move).** When a unit digest records `translit-too-generic` (the
46
+ saturation probe read an everyday-word-scale count on a meaning-translation variant — see
47
+ [`clearance-register` unit.md](../clearance-register/unit.md)), that is a **cheap ∧ material ∧ recoverable** gap on a
48
+ *real* element, not a documented structural limit: a warm re-run that SCOPES the saturated meaning token to the
49
+ filed in-scope Nice classes (a structured `nice-class:` × `region:` filter — the token kept as the substring
50
+ predicate, **never** goods-vocabulary words ANDed into the search text) and enumerates it closes the gap. (This
51
+ is the carve-out from the rule just above: a meaning slice left `coverage-limited` **without the class-scoped
52
+ enumeration attempt** is NOT an accepted structural limit — it is exactly the closeable gap to escalate; only a
53
+ slice that WAS class-scoped and enumerated, then ran into a documented limit, is the accepted `coverage-limited`
54
+ that does not re-trigger.) Do **NOT** swap the everyday word for a narrower / more specific rendering. Send an
55
+ `escalations` entry with axis `transliteration-numeric` and the reason: saturated meaning token not class-scoped; re-run
56
+ class-scoped enumeration (token × in-scope nice-class × region). The driver decides whether the gap can be closed; a gap it does not close stays disclosed.
57
+ `translit-underretrieved` is a context note; escalate only where the table lists a gap that can still be searched. (Do
58
+ NOT escalate when a translation is genuinely distinctive and merely found little — that is a complete axis, not a
59
+ gap.)
60
+
61
+ **Posture: ask "what's wrong here?", not "is this right?" — dumb questions welcome.** The obvious question a
62
+ fresh outsider would ask ("why is the client's own partner the top conflict?", "you said worldwide but only N
63
+ jurisdictions ran — why is the rest clean?") is exactly the one to surface; consistency with an earlier step
64
+ is not a reason to skip it, and "the rule said so" is not an answer.
65
+
66
+ **The questions the skeptic answers**, in plain terms:
67
+
68
+ - Did the worker actually probe the variations the manifest called for — the phonetic / type /
69
+ archetype-based / transliteration sweeps — or did it shortcut? Any ✅ manifest sweep skipped
70
+ **without a documented reason**?
71
+ - Now that the full picture is in, does any finding look **over- or under-rated** for risk?
72
+ - Was it looked at **holistically** — cross-layer, and (for multi-mark runs) cross-mark?
73
+ - Are these the results expected for a mark like this — and if it's thin, is that because a
74
+ sweep was missed, or because the field is genuinely clear?
75
+ - Register-specific: are the audit trail + negative-results matrix present, do the per-unit counts
76
+ reconcile, **and did the register-findings file actually get written (file-truth precondition — synthesis must read the file,
77
+ not inline output)?** Common-law-specific: are the dictated platforms covered, any field-scoped follow-up the step chose to make recorded with its receipt, and the flagged elements' grid results judged, with a negative-results matrix?
78
+ - **Self-conflict / partner:** is any headline or high-rated conflict the applicant's **own** mark, an
79
+ affiliate's, or a named **partner** in `matter-context`? A partner / own mark is a coexistence-or-business
80
+ question, not an adversarial conflict — if one is driving the risk, flag it (the canonical "why is the
81
+ client's own partner the #1 conflict?" miss). (Carve-out: a deliberate **"client's own prior rights"** note
82
+ — the applicant's own filing/footprint stated when priority is live — is *expected*, not a self-conflict;
83
+ flag only when the applicant's own / affiliate / partner mark is presented as an adversarial conflict or
84
+ headline.)
85
+ - **Dominant-element spine / calibration:** is each finding ranked by the *dominant element* + whole-mark confusion
86
+ test? Is a distinguished mark (house-mark-prefixed) **over-rated**, or a
87
+ bare-dominant-element-in-field conflict **under-rated or dropped**? Did an **on-point identical or
88
+ near-identical mark in the class** fall out of the report? It must not, even if revocable and whatever its
89
+ owner's size. Is any escalation of a distinguished mark resting on optics/PR/partner rather than a
90
+ named confusion theory? Is the headline risk driven by the top on-point conflicts, not a distinguished
91
+ mark or unrelated-field noise?
92
+ - **Coverage ledger:** is any `deferred` / `coverage-limited` row being narrated (or about to be narrated) as a
93
+ clean negative? Is a material jurisdiction that no question reached at all missing from the ledger? One covered
94
+ by a complete worldwide answer, or left in a crowd's count by the identical mark's narrowing, is accounted for
95
+ and needs no row of its own. A deferred row treated as clean is a recall gap — flag it.
96
+ - **Registrability flag:** did `clearance-variants` name the dominant element? Do the supplied forms and held evidence raise a distinctiveness or deceptive/offensive concern that synthesis must assess? Surface the concern and its evidence for synthesis to carry into `mark_assessment`. Synthesis follows this check; do not flag its assessment as missing here or expect a distinctiveness assessment in the variant manifest.
97
+
98
+ The skeptic **surfaces flags only and recommends re-runs** via its `escalations` entries — it does not re-run anything
99
+ itself. **The driver decides** (in code) off those entries: a flag that a worker *shortcut the process* (missed an
100
+ axis with no reason, under-probed a high-value category, mis-calibrated risk) → a flagged unit gets a fresh turn with the skeptic's concerns and its own band, and defends its finding or runs only the missing sub-query. **A `deferred`
101
+ coverage-ledger row the table lists as CLOSEABLE is exactly this kind of documented-reason gap** — the owning
102
+ unit resumes and runs the missing question. A deferral the table marks NOT CLOSEABLE is not re-run. This is the
103
+ recall-recovery loop: a *visible* deferral is recoverable; a silent one is not. A re-run unit's digest is re-run; if the flag is about the digest's own judgment, re-run the digest alone.
104
+
105
+ A worker that did the work properly and validly found little is **not** re-run — thinness alone is a question, not
106
+ a quota; never manufacture make-work to hit a number. At most one re-run per worker; if still short, proceed but
107
+ record the gap in the Audit Trail and narrative so the reviewing lawyer sees it. Log every skeptic flag + the decision + outcome
108
+ in the Audit Trail.
109
+
110
+ This review replaces the old single-session "Opus + max thinking does it all" guard — quality now
111
+ comes from a fresh-eyes audit plus targeted escalation, not from one giant session.
@@ -11,8 +11,11 @@ gathered and saying what it means under an assumption somebody has handed you.
11
11
  - The **assumption**, in the reader's own words. Apply it as stated. Do not improve it, narrow it, or
12
12
  answer a nearby question you find easier.
13
13
  - The run's **findings** — the conflicts the clearance reported, with their ratings.
14
- - The **rating framework** the original run was assessed under. Use that one. A memo assessed under a
15
- different framework than its parent cannot be compared with it, which is the only reason it exists.
14
+ - The **rating framework** the original run was assessed under: its name, its bands from highest to
15
+ lowest, and its rating table where it has one. Use that one. A memo assessed under a different
16
+ framework than its parent cannot be compared with it, which is the only reason it exists. Use the
17
+ original report's findings and the rating rules supplied here. If a band change depends on a rule that
18
+ is missing, keep the reported band and explain the limit.
16
19
 
17
20
  ## What you may not do
18
21
 
@@ -79,6 +79,12 @@ export function declaredStageOf(label = "") {
79
79
 
80
80
  /** Does this declaration make the stage's reply its output? PURE. */
81
81
  export const replyIsOutput = (declaration) => declaration?.output === "reply";
82
+ /**
83
+ * How a stage's turn returns its result, which picks the output rule it is given (engine/common.mjs): through its record
84
+ * tool, named; as its reply; or as a file it writes, which is also the answer for a stage with no declaration. PURE.
85
+ */
86
+ export const turnOutputOf = (declaration) => (replyIsOutput(declaration) ? { kind: "reply" }
87
+ : declaration?.recording ? { kind: "record", tool: declaration.recording } : { kind: "file" });
82
88
 
83
89
  /** The named validator a stage declares, from the stage file's own table of them. Throws where the name is not in the table. */
84
90
  export function declaredValidator(stage, table) {
@@ -9,7 +9,7 @@ import { paths } from "./run-record.mjs";
9
9
  import { existsSync, readFileSync } from "node:fs";
10
10
  import { join } from "node:path";
11
11
  import { driverDir } from "../shared/driver-dir.mjs"; //
12
- import { validators as koValidators, registerLaneState, PERMITTED_SOURCES, useOf } from "./verify-knockout.mjs";
12
+ import { validators as koValidators, registerLaneState, PERMITTED_SOURCES, useOf, FAMILIES_RULE, FRAME_REPAIR_RULE } from "./verify-knockout.mjs";
13
13
  import { kebab, PRODUCT_POLICIES } from "./search-policy.mjs";
14
14
  // — the door owns "did the request name any classes?"; this builder reads it rather than
15
15
  // re-deriving it. A third copy is what put the knockout frame a class behind the intake.
@@ -20,7 +20,7 @@ import { FROZEN_METHOD_FILE, methodDictation, inputsShape } from "./framework-me
20
20
  import { knockoutReviewFile, validateKnockoutReviewFile } from "./knockout-review-record.mjs";
21
21
  import { knockoutRegisterChunkFile, knockoutRegisterFile, validateKnockoutRegisterFile } from "./knockout-register-record.mjs";
22
22
  import { narrowingOrderLine } from "./effective-scope.mjs";
23
- import { REVIEW_APPLIES_THE_SUPPLIED_FRAMEWORK } from "./stages.mjs";
23
+ import { CROWD_DOC, REVIEW_APPLIES_THE_SUPPLIED_FRAMEWORK } from "./stages.mjs";
24
24
  import { declaredValidator } from "./stage-declarations.mjs";
25
25
  import { defectEvidence } from "./ko-review-evidence.mjs"; // each stage's validator, by the name its declaration gives
26
26
 
@@ -201,8 +201,10 @@ export function knockoutBarVerdict({ startedAt = null, deliveredAt = null } = {}
201
201
  function registerStateLine(K) {
202
202
  const lane = registerLaneState(K.runDir);
203
203
  if (lane.state === "skipped") return `The register component was skipped on this run, so it holds no filings.`;
204
- if (lane.state === "unavailable") return `The register listing was unavailable on this run. Use the recorded counts and failure reason, and keep that gap explicit. The recorded counts: ${K.registerCounts}.${lane.reason ? ` The recorded reason: ${lane.reason}` : ""}`;
205
- if (lane.state === "unknown") return `The held files do not establish whether the register component ran. Keep that uncertainty explicit.`;
204
+ // THE REPORT STATES COVERAGE, NOT THE RATER (design, 2026-11-24). The unavailable state can arise from a counts file alone, so the
205
+ // line names no cause; the counts and any recorded reason reach the report from code.
206
+ if (lane.state === "unavailable") return `No register listing is available to this assessment. Weigh the evidence supplied. The report states what the register covered.`;
207
+ if (lane.state === "unknown") return `The saved material does not establish whether the register search ran. Weigh the evidence supplied. The report states what the register covered.`;
206
208
  return "";
207
209
  }
208
210
  const registerRecordHeld = (K) => registerLaneState(K.runDir).state === "held";
@@ -250,7 +252,7 @@ const FILINGS_ONCE_SENTENCE = `In this file each filing is held once, under \`fi
250
252
 
251
253
  // WHERE A SOURCE MAY COME FROM, in one form of words at every step: rating, correction and check.
252
254
  const CITED_URL_RULE = `A cited URL must come from ${PERMITTED_SOURCES}.`;
253
- const SIBLING_SOURCE = `When you use another name's research payload, explain how its held content bears on this name and its requested use. Keep the original search scope and provenance. A source's presence in the batch does not establish that it supports the claim.`;
255
+ const SIBLING_SOURCE = `When you use another name's research payload, explain how its held content bears on this name and its requested use. Keep the original search scope and provenance. A source's presence in the order does not establish that it supports the claim.`;
254
256
  // The earlier rights a rating is handed from the order's other names (ko-earlier-rights.mjs), and what it says it did with each.
255
257
  const EARLIER_RIGHTS_SENTENCE = (file) => `Earlier filings and market sources to consider for this name are in ${file}. Each suggested filing resembles a spelling being searched and overlaps a requested class. Read its goods, status and territory against the proposed use.`;
256
258
  const EARLIER_RIGHTS_ANSWER = `For each filing, say what you concluded for this name: weigh it in a finding and list its recordId in \`weighedFilings\`, or write a \`registerReads\` row saying why it does or does not bear on this name. Where a filing or source was found is provenance only, and no reason either way.`;
@@ -283,15 +285,17 @@ export function calibrationExcerptOf(text, ref) {
283
285
  + `${L.slice(start, end).join("\n").replace(/\s+$/, "")}\n=== END MANUAL EXCERPT ===`;
284
286
  }
285
287
 
286
- // A FAMILY OF CLOSE VARIATIONS RATED IN ONE SESSION, each name with its own rating and reasons. A family of one keeps the one-name
287
- // words, unchanged.
288
- const FAMILY_OPENER = (n) => `You are rating a family of ${n} names for a Knockout screen. Each name is a client choice and gets its own rating and reasons.`;
288
+ // A GROUP OF CLOSELY RELATED NAMES RATED IN ONE SESSION, each name with its own rating and reasons. A group of one keeps the
289
+ // one-name words, unchanged.
290
+ const FAMILY_OPENER = `You are rating a group of closely related names for a Knockout screen. Each name is a client choice and gets its own rating and reasons.`;
289
291
  const FAMILY_RULE = `Read the common evidence once, and give each name its own comparison wherever its sound, appearance or a particular earlier filing changes the answer. A difference in band needs a reason grounded in the evidence. Matching bands are equally admissible. Spellings generated only to search for one name remain search terms, not names to rate.`;
290
292
  const FAMILY_RIGHTS_SENTENCE = (file) => `Earlier filings and market sources to consider for these names are in ${file}, each listed under the name it is for. Each suggested filing resembles a spelling being searched and overlaps a requested class. Read its goods, status and territory against the proposed use.`;
291
293
  const FAMILY_RIGHTS_ANSWER = `For each filing, say what you concluded for the name it is listed under: weigh it in a finding and list its recordId in \`weighedFilings\`, or write a \`registerReads\` row saying why it does or does not bear on that name. Where a filing or source was found is provenance only, and no reason either way.`;
292
294
  // THE INTAKE GROUPS THE NAMES INTO FAMILIES, checked in code (knockout-frame-record.mjs, familiesDefect).
293
- const FAMILIES_LINE = `Group the submitted names for the same proposed use when they share a recognisable word, phrase, stem, look or sound that could lead to the same earlier conflict. Consider each whole name and the proposed goods or services. Changes in word order, plural, ending or accompanying words can leave a family. A common descriptor, business suffix or theme alone is insufficient. Keep a short chain together when the middle name warrants both comparisons. Otherwise use the strongest direct relationship and retain material links to names in other groups. Keep an uncertain name separate. Put each submitted name verbatim in exactly one group in batch.families. Keep spellings generated only for searching outside the groups.`;
294
- const FAMILY_READER_OPENER = (n) => `You are reading the register for a family of ${n} names of a KNOCKOUT screen: close variations the client chose for one proposed use. Read each distinct filing once, and keep for each name its own source, goods, status, relevance and follow-up questions. Carry an uncertain filing that may matter to a rating with your reason; never drop one silently. You rate nothing; the step after you rates what you carry forward, with your reasons.`;
295
+ const FAMILIES_LINE = `Group the submitted names for the same proposed use when they share a recognisable word, phrase, stem, look or sound that could lead to the same earlier conflict. Consider each whole name and the proposed goods or services. Changes in word order, plural, ending or accompanying words can leave a family. A common descriptor, business suffix or theme alone is insufficient. Keep a short chain together when the middle name warrants both comparisons. Otherwise use the strongest direct relationship. Keep an uncertain name separate. ${FAMILIES_RULE}`;
296
+ /** The provider manual the register reader reads: the questions file where the provider splits one out, else the whole manual. PURE. */
297
+ export const readerProviderDoc = (meta) => meta?.questionsDoc ?? meta?.skillDoc ?? null;
298
+ const FAMILY_READER_OPENER = (n) => `You are reading the register for a group of ${n} names of a KNOCKOUT screen: close variations the client chose for one proposed use. Read each distinct filing once, and keep for each name its own source, goods, status, relevance and follow-up questions. Carry an uncertain filing that may matter to a rating with your reason; never drop one silently. You rate nothing; the step after you rates what you carry forward, with your reasons.`;
295
299
  // THE REVIEW CHECKS FACTS AGAINST THEIR SOURCES AND THE RATINGS OF FINDINGS ON REGISTERED MARKS, and one correction answers what it
296
300
  // raises. Measured in testing, 2026-11-23: of 23 review complaints on five real orders, 13 chased thin web leads and 4 were coverage
297
301
  // gaps code now answers; 2 were wrong facts and 4 were findings rated too low.
@@ -425,7 +429,7 @@ export const KO_STAGES = {
425
429
  //
426
430
  // `RETIRED_POLICIES` keeps "Depth 1" deliberately, so an archived run re-renders under the name it
427
431
  // was sold under. That is a rendering concession for old artifacts, not live vocabulary.
428
- `You are framing a KNOCKOUT SEARCH batch — a triage pass. You frame, you do NOT search.`,
432
+ `You are framing a KNOCKOUT SEARCH order — a triage pass. You frame, you do NOT search.`,
429
433
  `The instructed scope (AUTHORITATIVE — quote mark names verbatim from it): ${K.instructedScope}`,
430
434
  // THE REQUEST LEADS. The structured brief can hold no goods at all while the client's message states them: on a
431
435
  // saved eight-name batch, 2026-10-28, the goods field was empty, neither this stage nor the rating read the message,
@@ -458,11 +462,11 @@ export const KO_STAGES = {
458
462
  // passed the stage. Saying "the driver writes it exactly as you send it" is what replaces the
459
463
  // second chance the Write tool used to give.
460
464
  `HAND THE FRAME BACK BY CALLING \`record_knockout_frame\`. THERE ARE NO FILES FOR YOU TO WRITE and this dispatch names none — the driver writes both the plan and the scope note from what you send, and nothing you write by hand is read.`,
461
- `Send \`scope_note\`: the 2–3 sentence scope note, FINISHED — what the batch is, which classes, anything flagged. It is written to knockout-frame.md exactly as you send it, with no heading added and nothing composed into it, so it must read as a complete document on arrival.`,
465
+ `Send \`scope_note\`: the 2–3 sentence scope note, FINISHED — what the order is, which classes, anything flagged. It is written to knockout-frame.md exactly as you send it, with no heading added and nothing composed into it, so it must read as a complete document on arrival.`,
462
466
  `Send \`marks\`: one row per instructed mark, names verbatim from the instructed scope, each with its classes, beltAndBraces, classesPlain, contextFraming, places (task 2d: the places THIS name is searched on, two or more, one of them the whole web, as many as the name needs) and priority, and useKind only where the request gives that name a different use (task 2c). The driver writes each name's spellings (task 2e). Two names that differ only in spacing, punctuation or case are REFUSED — they would share one research payload, and one of them would then be rated on the other's evidence.`,
463
- `Send \`batch\`: productContext, inUseAs (task 2c), useKind (task 2c), and executionOrder as a permutation of your mark names. THE PLACES ARE PER NAME (task 2d) and go on each mark, not here.`,
467
+ `Send \`batch\`: productContext, inUseAs (task 2c), useKind (task 2c), families, and executionOrder as a permutation of your mark names. THE PLACES ARE PER NAME (task 2d) and go on each mark, not here.`,
464
468
  FAMILIES_LINE,
465
- `IF YOU CALL AGAIN, SEND ONLY WHAT YOU ARE CORRECTING. The driver merges marks BY NAME onto what it already accepted, so a mark you omit keeps its row — but a mark you DO send replaces that row whole, so send a corrected mark complete rather than as a fragment.`,
469
+ FRAME_REPAIR_RULE,
466
470
  ),
467
471
  },
468
472
  "knockout-register-read": {
@@ -470,13 +474,13 @@ export const KO_STAGES = {
470
474
  // the judgment tier.
471
475
  model: "sonnet", thinking: "medium", timeoutSec: 900, stallSec: 600,
472
476
  // DECLARATIVE ONLY on this lane, as the assess stage records; the effective read is in the message.
473
- skillReads: ["skills/knockout-register-read/SKILL.md"],
477
+ skillReads: ["skills/knockout-register-read/SKILL.md", CROWD_DOC],
474
478
  // A reader bound to a family writes its own record; one with no family bound (chunkNo null) writes the order's.
475
479
  out: (K, chunkNo) => (chunkNo == null ? K.registerReading : knockoutRegisterChunkFile(K.runDir, chunkNo)),
476
480
  validate: declaredValidator("knockout-register-read", KO_VALIDATORS),
477
481
  reads: (K) => ({ files: [K.instructedScope, K.inboundRequest, K.plan, paths(K.runDir).profile], message: true }),
478
482
  message: ({ K, job = {}, profile = null, readingLines = [], providerDoc = null, inScope = null, planFile = null, scopeFile = null, familySize = 1 }) => lines(
479
- reads(["skills/knockout-register-read/SKILL.md", providerDoc].filter(Boolean)),
483
+ reads(["skills/knockout-register-read/SKILL.md", CROWD_DOC, providerDoc].filter(Boolean)),
480
484
  // The same assignment whether the name is ordered alone or in a shortlist.
481
485
  familySize > 1 ? FAMILY_READER_OPENER(familySize) : `You are reading the register for one name of a KNOCKOUT screen. You rate nothing; the step after you rates what you carry forward, with your reasons.`,
482
486
  existsSync(K.inboundRequest) ? `The client's request, as it arrived: ${K.inboundRequest}` : "",
@@ -531,7 +535,7 @@ export const KO_STAGES = {
531
535
  ...(calibrationExcerpt ? [calibrationExcerpt] : []),
532
536
  APPLY_THE_SUPPLIED_RULES,
533
537
  // ONE JOB FOR A NAME, the same whether it is ordered alone or in a shortlist; a family's words where the group holds more than one.
534
- chunkMarks.length > 1 ? [FAMILY_OPENER(chunkMarks.length), FAMILY_RULE].join("\n") : `You are rating one name for a Knockout screen.`,
538
+ chunkMarks.length > 1 ? [FAMILY_OPENER, FAMILY_RULE].join("\n") : `You are rating one name for a Knockout screen.`,
535
539
  `Rate ONLY these marks (one entry each, names verbatim): ${chunkMarks.map((m) => m.name).join(" · ")}.`,
536
540
  chunkMarks.length > 1 ? `The plan for these names (context framing, classes): ${planFile ?? K.plan}` : `The plan for this name (context framing, classes): ${planFile ?? K.plan}`,
537
541
  requestLine(K,
@@ -545,7 +549,7 @@ export const KO_STAGES = {
545
549
  // it, so the requester's per-name detail reached the run and stopped. Shipping the doctrine
546
550
  // without pointing at the field it turns on is half a fix.
547
551
  `Read each name's contextFraming against the client's request. Apply the manner-of-use calibration to the use the client actually states. Where the frame inferred a use, keep it as a possibility; it does not narrow the instructed scope or lower the rating. Correct a material framing error when the request or evidence contradicts it, and explain the correction in the assessment.`,
548
- `Each mark's RAW research payload: the record of its web searches, every spelling on every place, with the listings each search returned and any search that could not run. It holds no summary and no judgment; the judgment is yours. ${CITED_URL_RULE} The batch's other recorded research payloads and its recorded owner checks are under ${K.researchDir}.`,
552
+ `Each mark's RAW research payload: the record of its web searches, every spelling on every place, with the listings each search returned and any search that could not run. It holds no summary and no judgment; the judgment is yours. ${CITED_URL_RULE} The order's other recorded research payloads and its recorded owner checks are under ${K.researchDir}. ${SIBLING_SOURCE}`,
549
553
  ...chunkMarks.map((m) => `- ${m.name}: ${K.research(kebab(m.name))}${m.degraded ? ` (DEGRADED: ${m.degraded} — apply the null-results doctrine, never inflate)` : ""}`),
550
554
  // THE ORDERED TERRITORIES, where the request named some. The web questions used to carry them in
551
555
  // their own scope lines and drop what fell outside; the grid returns results and judges nothing, so
@@ -651,19 +655,19 @@ export const KO_STAGES = {
651
655
  // consistent scale across the batch and the typed fields' requirements; an earlier proposal to shorten the opening and drop
652
656
  // those requirements was withdrawn. The line below says so to the rating step and changes none of it: the manual's "keep
653
657
  // the length" and the validators' minimums stand. Model words, landed as approved.
654
- `Give each name a complete opening assessment for a client reading that name's report alone. Explain the relevant landscape, what drives the rating, and what matters for the client's decision. Preserve the established depth and a broadly consistent scale across the batch. Use sub-headings, short paragraphs and bullets to make the assessment easy to scan. Keep the existing structured fields and their requirements. Do not invent observations or repeat a point merely to fill space; preserve the material supporting and contrary facts, goods and class distinctions, implications and search limitations needed to understand the advice. The batch summary compares the names separately and does not replace any name's own opening assessment.`,
655
- `SAY NOTHING ABOUT WHETHER THE REGISTER LANE RAN — whether registers were searched, counted, overlaid or checked, how many filings exist, or how far the search reached. Not in any field, not in the chunk summary. The report states its coverage in code from the run's own measurements, and the validator refuses a chunk that speaks for it. That is a rule about the lane, not about the filings: a filing you were handed is evidence like any other.`,
658
+ `Give each name a complete opening assessment for a client reading that name's report alone. Explain the relevant landscape, what drives the rating, and what matters for the client's decision. Preserve the established depth and a broadly consistent scale across the order. Use sub-headings, short paragraphs and bullets to make the assessment easy to scan. Keep the existing structured fields and their requirements. Do not invent observations or repeat a point merely to fill space; preserve the material supporting and contrary facts, goods and class distinctions, implications and search limitations needed to understand the advice. The order summary compares the names separately and does not replace any name's own opening assessment.`,
659
+ `SAY NOTHING ABOUT WHETHER THE REGISTER LANE RAN — whether registers were searched, counted, overlaid or checked, how many filings exist, or how far the search reached. Not in any field, not in the group summary. The report states its coverage in code from the run's own measurements, and the validator refuses a group that speaks for it. That is a rule about the lane, not about the filings: a filing you were handed is evidence like any other. You may say what a particular held filing's record does not show.`,
656
660
  THIN_LEADS,
657
661
  `EVERY conflicting name is a typed findings[] record. A named conflict belongs in findings[], not in bullets — write it once.`,
658
- `The manual sets out each mark's record: its \`findings[]\`, its opening read in \`assessment\`, its typed read, and the chunk's \`chunkSummary\`, which code joins into the batch summary, so a mark missing from it is missing from the report.`,
659
- `HAND YOUR RATINGS BACK BY CALLING \`record_knockout_assess\`. THERE IS NO FILE FOR YOU TO WRITE and this dispatch names none — the driver writes this chunk itself from what you send, and nothing you write by hand is read. You are not told which chunk number to send and there is no field for it: the driver bound that when it dispatched you.`,
662
+ `The manual sets out each mark's record: its \`findings[]\`, its opening read in \`assessment\`, its typed read, and the group's \`chunkSummary\`, which code joins into the order summary, so a mark missing from it is missing from the report.`,
663
+ `HAND YOUR RATINGS BACK BY CALLING \`record_knockout_assess\`. THERE IS NO FILE FOR YOU TO WRITE and this dispatch names none — the driver writes this group itself from what you send, and nothing you write by hand is read. You are not told which group number to send and there is no field for it: the driver bound that when it dispatched you.`,
660
664
  // A REPAIR SENDS ONLY WHAT CHANGED (design, 2026-11-06). The recorder merges a correction onto the written record field by field
661
665
  // and validates the assembled record, so re-sending a whole name to fix one sentence was output the contract asked for and the
662
666
  // merge never needed. A refused first call writes nothing, so it is no base: a partial first call is still refused.
663
- `On the first call, send the complete assessment. Once the tool has confirmed a written record for this chunk, correct a name by sending its exact name and only the fields you changed. Omitted names and omitted fields within a name keep their recorded values. A field you send replaces that whole field: send a changed list or object complete, including unchanged entries. Update the chunk summary when the correction changes it. If the tool has written no record, send the complete corrected assessment.`,
667
+ `On the first call, send the complete assessment. Once the tool has confirmed a written record for this group, correct a name by sending its exact name and only the fields you changed. Omitted names and omitted fields within a name keep their recorded values. A field you send replaces that whole field: send a changed list or object complete, including unchanged entries. Update the group summary when the correction changes it. If the tool has written no record, send the complete corrected assessment.`,
664
668
  // NO GROUP CARRIES THE ORDER'S DUTIES. Code takes the product context from the plan and the framework from the frozen one, and
665
669
  // assembles the order's summary from each name's after every name is rated.
666
- (chunkMarks.length > 1 ? `You send \`marks\` and \`chunkSummary\`, and in \`batch.standardCaveats\` only a qualification that holds for each name's whole report. Use the supplied frozen framework. Open your \`chunkSummary\` with a line for each name; code assembles the order's summary from each name's once every name is rated.` : `You send \`marks\` and \`chunkSummary\`, and in \`batch.standardCaveats\` only a qualification that holds for this name's whole report. Use the supplied frozen framework. Open your \`chunkSummary\` with a line for this name; code assembles the order's summary from each name's once every name is rated.`),
670
+ (chunkMarks.length > 1 ? `You send \`marks\` and \`chunkSummary\`. Use \`batch.standardCaveats\` only for a qualification the brief establishes for every name in the order. Put a qualification specific to an assigned name in that name’s assessment. Use the supplied frozen framework. Open your \`chunkSummary\` with a line for each name; code assembles the order's summary from each name's once every name is rated.` : `You send \`marks\` and \`chunkSummary\`. Use \`batch.standardCaveats\` only for a qualification the brief establishes for every name in the order. Put a qualification specific to an assigned name in that name’s assessment. Use the supplied frozen framework. Open your \`chunkSummary\` with a line for this name; code assembles the order's summary from each name's once every name is rated.`),
667
671
  ),
668
672
  },
669
673
 
@@ -699,29 +703,23 @@ export const KO_STAGES = {
699
703
  validate: declaredValidator("knockout-review", KO_VALIDATORS),
700
704
  reads: (K) => ({ files: [K.findings, K.plan, ...asRequested(K), ...frozenRules(K), K.registerRecords, K.ownerChecks],
701
705
  dirs: [K.researchDir], message: true, deck: true }),
702
- // ── THE MESSAGE PROMISES A TABLE ONLY WHEN IT HAS ONE ──────────────────────────
706
+ // ── THE MESSAGE PROMISES A BLOCK ONLY WHEN IT HAS ONE ──────────────────────────
703
707
  //
704
- // `evidenceLines` is the driver's measurement, passed at dispatch. Two things follow, and the arms
705
- // found both: the defaults must not be absent — a message that throws on a ctx without them cannot
706
- // be composed by anything except the production call site, which is how a dispatch goes unexamined
707
- // — and the promise has to branch. A stage message that says "the lines are below" and then lists
708
- // none has handed the seat an absence dressed as a pass, which is the reading this whole rule
709
- // exists to stop. A record the driver's read flags nowhere is handed its first-read lines instead,
710
- // by the owner's ruling of 2026-10-10, so both branches have rows under them; a record with no such
711
- // line is not dispatched at all.
708
+ // Every block below is the driver's, passed at dispatch, and each has a default, so the message composes on a ctx without them.
709
+ // A heading over no rows would hand the seat an absence dressed as evidence, so each block is left out when it is empty.
712
710
  message: ({ K, frameworkPath = null, digestLines = [], searchedRows = [], setAsideRows = [], sourceLines = [], ownerCheckRows = [], sourceAnswers = [], earlierRightsReview = [], registerTableFile = null }) => lines(
713
711
  // THE CLIENT'S QUESTION LEADS, in the owner's words (ruling 2026-09-24).
714
712
  `Does the report answer the client's question: who could object, how strong they are, what the client should do? Are the marks a lawyer would list present, and is each position written from the record that matters?`,
715
713
  reads(["skills/knockout-assess/SKILL.md", "skills/clearance-search/firm-wide-reasoning.md", frameworkPath].filter(Boolean)),
716
714
  REVIEW_APPLIES_THE_SUPPLIED_FRAMEWORK,
717
- `You are the INDEPENDENT CHECK on a knockout screen: another step rated this batch. Check what the client is told against the request, the framework and the evidence. You change no band and no finding yourself.`,
715
+ `You are the INDEPENDENT CHECK on a knockout screen: another step rated this order. Check what the client is told against the request, the framework and the evidence. You change no band and no finding yourself.`,
718
716
  `Apply the frozen framework, the knockout assessment manual and shared firm-wide reasoning. An unidentified owner is an explicit evidence gap, not by itself grounds to remove or lower a finding's band. Never invent attribution or a right; explain what the held evidence supports and what remains uncertain.`,
719
717
  requestLine(K, (at) => `The client's request, as it arrived: ${at}`, (at) => `The available brief: ${at}. The original request is not held here.`),
720
718
  // THE REVIEW CHECKS THE OPINIONS AGAINST THEIR CITED EVIDENCE, handed to it in this message, and does not chase a thin web lead.
721
719
  // It does not reword: a supported line stands. A clean read is an answer, and the recorder refuses a call that sends neither.
722
720
  REVIEW_SCOPE,
723
721
  THIN_LEADS,
724
- `MATERIAL DEFECTS COME FIRST. A defect is material when repairing it would change what the client is told: a band the framework and the evidence do not support, including one band where the evidence divides the requested goods, or a division it does not support (\`band\`), a filing or use a lawyer would raise that the answer leaves out (\`missing\`), something set aside against the evidence (\`exclusion\`), scope the request asked for that the answer does not cover, including reasoning that never connects the requested use and the held goods to the conclusion (\`scope\`), or a line that contradicts the record beneath it (\`contradiction\`). Send each as a \`material\` row: \`kind\`, \`mark\` verbatim, the finding's ordinal as \`finding\` where it is about one, and what is wrong and why it matters as \`problem\`. Identify the held evidence behind the defect in rests_on. A defect about scope, the framework, or internal agreement may instead identify the supplied request passage, framework rule, or rated field in problem. Do not invent a filing or URL to justify that defect. A filing held for this batch may bear on more than one name, so a defect on one name may rest on a filing held under another, by its held recordId and source. You repair nothing: the step that rated the batch answers each row. A rating a lawyer could reasonably reach is not a defect, and neither is a preference about wording.`,
722
+ `MATERIAL DEFECTS COME FIRST. A defect is material when repairing it would change what the client is told: a band the framework and the evidence do not support, including one band where the evidence divides the requested goods, or a division it does not support (\`band\`), a filing or use a lawyer would raise that the answer leaves out (\`missing\`), something set aside against the evidence (\`exclusion\`), scope the request asked for that the answer does not cover, including reasoning that never connects the requested use and the held goods to the conclusion (\`scope\`), or a line that contradicts the record beneath it (\`contradiction\`). Send each as a \`material\` row: \`kind\`, \`mark\` verbatim, the finding's ordinal as \`finding\` where it is about one, and what is wrong and why it matters as \`problem\`. Identify the held evidence behind the defect in rests_on. A defect about scope, the framework, or internal agreement may instead identify the supplied request passage, framework rule, or rated field in problem. Do not invent a filing or URL to justify that defect. A filing held for this order may bear on more than one name, so a defect on one name may rest on a filing held under another, by its held recordId and source. You repair nothing: the step that rated the order answers each row. A rating a lawyer could reasonably reach is not a defect, and neither is a preference about wording.`,
725
723
  // What each rating did with the earlier rights it was handed from the order's other names.
726
724
  earlierRightsReview.length ? [EARLIER_RIGHTS_REVIEW, ...earlierRightsReview].join("\n") : "",
727
725
  `rests_on takes a recordId, a question qid, or a URL from ${PERMITTED_SOURCES}. A failed question's qid supports a statement about the failure, not a finding about filings the question never returned. ${SIBLING_SOURCE}`,
@@ -763,12 +761,12 @@ export const KO_STAGES = {
763
761
  return lines(
764
762
  frameworkPath ? reads([frameworkPath]) : "",
765
763
  REVIEW_APPLIES_THE_SUPPLIED_FRAMEWORK,
766
- `An independent check read this rated batch and raised the defects below. Repair what the evidence supports, and nothing else.`,
764
+ `An independent check read this rated order and raised the defects below. Repair what the evidence supports, and nothing else.`,
767
765
  requestLine(K,
768
766
  (at) => `THE CLIENT'S OWN REQUEST, VERBATIM: ${at}. Read it before you rate. Its stated goods, services, and intended use lead over the plan; the customer's profile fills gaps. Keep a guessed use as a possibility. Do not use that guess to narrow the instructed scope or lower a rating.`,
769
767
  (at) => `AVAILABLE BRIEF: ${at}. The original request is not held here. Read the brief before you rate, keep its stated scope, and distinguish supplied facts from inferred uses. Do not lower a rating on a guessed use.`),
770
768
  `The record as rated: ${K.assessChunk(chunkNo)}. The ordinals you use are the ones in that file.`,
771
- `The batch plan: ${K.plan}. The frozen framework's bands: ${paths(K.runDir).framework}.`,
769
+ `The order's plan: ${K.plan}. The frozen framework's bands: ${paths(K.runDir).framework}.`,
772
770
  orderedTerritories(job).length ? `THE TERRITORIES THIS SCREEN WAS ORDERED FOR: ${orderedTerritories(job).join(", ")}. A use found only outside them is out of scope for this screen.` : "",
773
771
  `THE DEFECTS.`,
774
772
  ...scope.defects.map((d) => `${d.n}. [${d.kind}] "${d.mark}"${d.names ? `, finding ${ordinalOf(d) ?? "?"} (${d.names.name})` : ""}: ${d.problem}${d.rests_on?.length ? ` Rests on: ${d.rests_on.join(", ")}.` : ""}`),
@@ -781,7 +779,7 @@ export const KO_STAGES = {
781
779
  frameworkMethod ? methodDictation(frameworkMethod) : "",
782
780
  frameworkMethod ? `- inputs: ${inputsShape(frameworkMethod)} — the framework's own inputs for this finding, each one of the values it lists, reasoned in its order before the band. On every rated finding.` : "",
783
781
  `HAND BACK BY CALLING \`record_knockout_correction\`, sending only what changes. THERE IS NO FILE FOR YOU TO WRITE. For a name: the fields that change. A finding goes back whole under its ordinal, and a new one takes the next ordinal. Change a name no defect concerns only for a finding it shares with a name you repair, or an answer that depends on your repair; a shared rating alone is not such a dependency. List each finding you change or remove there in that defect's \`findings\`, and say why. Within an affected name, repair the findings and dependent answers needed to resolve the defect, and explain their connection to it. Leave unrelated findings unchanged.`,
784
- `A filing held for this batch may bear on more than one name. Weigh it against the particular name and its instructed scope, and cite its held recordId and source. Keep where it was found: using that filing does not mean its original search answered this name's register question.`,
782
+ `A filing held for this order may bear on more than one name. Weigh it against the particular name and its instructed scope, and cite its held recordId and source. Keep where it was found: using that filing does not mean its original search answered this name's register question.`,
785
783
  `${CITED_URL_RULE} ${SIBLING_SOURCE}`,
786
784
  OWNER_SOURCE,
787
785
  `BRING EVERY DEPENDENT ANSWER WITH IT. Whatever the repair changes, the name's lines that rest on it change with it: \`basis\`, \`factors\`, \`counterFactors\`, \`mitigation\`, \`assessment\`, \`bullets\`, \`classGroups\`, \`classesDriving\`, its \`registerReads\` and its block in \`chunkSummary\`. A rating that moves needs \`basis\`, \`assessment\` and \`chunkSummary\` in the call. The manual's rules still hold: a name is never rated above its worst card.`,