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
package/INSTALL.md CHANGED
@@ -102,8 +102,8 @@ run is [mcp-server/CONNECT.md](mcp-server/CONNECT.md), and why something is the
102
102
  pay for Claude through your own Google Cloud, Microsoft Azure or Amazon Bedrock account (§3b).
103
103
 
104
104
  **Installed is not usable.** `npx clearotron install` proves the engine can complete a turn before it
105
- writes anything, and `clearotron doctor --probe-engine` re-proves it on a configured box. Both
106
- spend one cheap turn; plain `doctor` spends nothing.
105
+ writes anything, and `clearotron doctor` re-proves it on a configured box: it makes one real engine call
106
+ when an engine is configured. Both spend one cheap turn.
107
107
 
108
108
  **The check covers tools.** Every search stage calls tools. On some machines codex's own sandbox
109
109
  refuses every one of those calls while the turn reports success, so the check asks the engine to call
@@ -172,7 +172,7 @@ mkdir ~/app && cd ~/app
172
172
  npm init -y
173
173
  npm install /path/to/clearotron-<version>.tgz
174
174
  npx clearotron install # the wizard
175
- npx clearotron doctor # reads; writes nothing and contacts nothing outside this machine
175
+ npx clearotron doctor # reads, and makes one real engine call when an engine is configured; changes no setting
176
176
  ```
177
177
 
178
178
  `npx` works from `~/app` because npm links a **dependency's** `bin` into the consuming project — the
@@ -793,8 +793,8 @@ its own header says never to expose it, and nothing here starts it.
793
793
  ## 6. Run a headless clearance report
794
794
 
795
795
  1. Make sure `CLEAROTRON_AI` names the engine you want (`anthropic-agent` or `openai-agent`), its CLI is
796
- authenticated, and your active register provider's credential is set. `clearotron doctor
797
- --probe-engine` answers all three, and the engine half of it by actually running a turn — an
796
+ authenticated, and your active register provider's credential is set. `clearotron doctor`
797
+ answers all three, and the engine half of it by actually running a turn — an
798
798
  executable on `PATH` that is signed out passes every other check and fails at the first stage.
799
799
 
800
800
  2. Write a **job file**. The required fields are an `id`, a `forwarder` handle, at least one mark
package/QUICKSTART.md CHANGED
@@ -33,7 +33,7 @@ it from, and closing the window stops it.
33
33
 
34
34
  ```bash
35
35
  npx clearotron install # in a terminal: it asks one question at a time, offers to install the reasoning program if the machine has none, and shows you how to sign it in
36
- clearotron doctor # reads only; add --probe-engine to spend one cheap turn proving the AI
36
+ clearotron doctor # makes one real engine call when an engine is configured; changes no setting
37
37
  ```
38
38
 
39
39
  `install` puts the program under `~/.local` and needs no root, and every command after it here uses the
@@ -44,9 +44,9 @@ That installs the stable release. For the newest beta, run `npx clearotron@beta
44
44
  [docs/RELEASES.md](docs/RELEASES.md) says what each one promises.
45
45
 
46
46
  `doctor` is the one to read. It checks that the reasoning program is there, on `PATH` or as the copy
47
- setup installed, and that your register credential resolves. `clearotron doctor` reports the
48
- configuration without running an AI turn. Add `--probe-engine` to run a proof turn. An executable that is
49
- signed out passes every other check and fails at the first stage.
47
+ setup installed, and that your register credential resolves. `clearotron doctor` also makes one
48
+ real engine call when an engine is configured, because an executable that is signed out passes every other
49
+ check and fails at the first stage.
50
50
 
51
51
  ## Run one
52
52
 
package/README.md CHANGED
@@ -78,8 +78,8 @@ says which one holds your reports so you can keep them deliberately.
78
78
 
79
79
  ## Quick start
80
80
 
81
- With it installed, check what it found before it does anything. `doctor` only reads — it writes nothing and contacts
82
- nothing outside this machine, and names whatever is still missing:
81
+ With it installed, check what it found before it does anything. `doctor` changes no setting of this install, makes
82
+ one real engine call when an engine is configured, and names whatever is still missing:
83
83
 
84
84
  ```bash
85
85
  clearotron doctor
package/bin/README.md CHANGED
@@ -14,7 +14,7 @@ and is what you want when you are working in this tree.
14
14
  | File | Shipped verb | In a checkout | Cost |
15
15
  |---|---|---|---|
16
16
  | `example.mjs` | `clearotron demo` | `npx clearotron demo` | Free. No credentials, no model, no engine, no register call. |
17
- | `onboard.mjs` | `clearotron install` | `npm run setup` | **Spends one cheap engine turn.** `clearotron doctor` writes nothing and contacts nothing outside this machine. |
17
+ | `onboard.mjs` | `clearotron install` | `npm run setup` | **Spends one cheap engine turn**, and so does `clearotron doctor` when an engine is configured; `doctor` changes no setting. |
18
18
  | `start.mjs` | `clearotron start` | `npm start` | Free to start. What it starts can spend — see below. |
19
19
  | `uspto-sync.mjs` | `clearotron sync` | `npm run sync:uspto` | Not billed, but 41.5 GB of download and about nine hours of indexing. |
20
20
  | `signa-sync.mjs` | — | `node bin/signa-sync.mjs` | One vendor read (`GET /v1/offices`, paged). Needs `SIGNA_API_KEY`. |
@@ -25,9 +25,8 @@ the demo pool could collide with is checked by realpath and by containment befor
25
25
  because a demo runs on deployed machines too.
26
26
 
27
27
  `onboard.mjs` validates each answer through the door the engine itself uses before it persists anything,
28
- and the engine check is a real turn through the adapter's own spawn path. `--check` is the free half: it
29
- reports what this machine is configured for and writes nothing. Add `--probe-engine` to spend the turn
30
- deliberately.
28
+ and the engine check is a real turn through the adapter's own spawn path. `--check` reports what this machine
29
+ is configured for, makes one real engine call when an engine is configured, and changes no setting.
31
30
 
32
31
  `start.mjs` is a supervisor. It starts four children. `driver/portal-service.mjs` (the portal, default
33
32
  port 18802) and `mcp-server/http-server.mjs` (the engine door the portal's Start button calls, default
@@ -70,7 +70,7 @@ export const VERBS = {
70
70
 
71
71
  export const SUMMARY = {
72
72
  install: "configure this install — one question at a time, nothing written until each answer checks out",
73
- doctor: "report what this machine is configured for. Writes nothing and contacts nothing outside this machine",
73
+ doctor: "report what this machine is configured for, and make one real engine call when an engine is configured. Changes no setting of this install",
74
74
  demo: "replay a finished example clearance and serve it. No keys, no model, no account",
75
75
  start: "start the product — the portal, the engine door, the client door and the worker — and print one address to open",
76
76
  stop: "stop the background product and give the box back — connect's door is not touched",
package/bin/onboard.mjs CHANGED
@@ -4,8 +4,7 @@
4
4
  // clearotron install / clearotron doctor — one install, from nothing to a first real run.
5
5
  //
6
6
  // npx clearotron install the wizard: one decision at a time, Enter takes the default
7
- // npx clearotron doctor report what this machine is configured for. Writes NOTHING.
8
- // npx clearotron doctor --probe-engine …and spend one cheap turn proving the engine can run
7
+ // npx clearotron doctor report what this machine is configured for, and make one real engine call when an engine is configured
9
8
  // npx clearotron doctor --probe-providers …and spend one cheap paired call proving each register lane
10
9
  // npx clearotron doctor --probe-connector …and ask your own door whether an assistant could sign in
11
10
  //
@@ -281,10 +280,10 @@ const READ_ENV_PATH = () => activeEnvPath({ repoRoot: REPO });
281
280
  const argv = process.argv.slice(2);
282
281
  const has = (n) => argv.includes(n);
283
282
  const CHECK_ONLY = has("--check");
284
- // Opt-in, and off by default on purpose — see runCheck's header. A flag rather than an environment
285
- // variable: a variable read by shipping code owes a governance row, and this is a per-invocation
286
- // intention, not a property of the machine. Same reasoning as `bin/uspto-sync.mjs --force-disk`.
287
- const PROBE_ENGINE = has("--probe-engine");
283
+ // THE ENGINE IS PROVEN BY A REAL TURN EVERY TIME (owner ruling, 2026-11-25). It was opt-in, and a production
284
+ // install whose sign-in had stopped renewing passed `doctor` for three weeks because its engine program still
285
+ // said it was signed in. `--probe-engine`, the flag that used to ask for the turn, is still accepted and changes
286
+ // nothing.
288
287
  // issue 1871 — the same opt-in shape, for the credentials that had no proof at all. Never implied by
289
288
  // a plain --check: this SPENDS, and on two of the register adapters the count IS a billable search.
290
289
  const PROBE_PROVIDERS = has("--probe-providers");
@@ -1448,12 +1447,12 @@ function defaultWith(name, read) {
1448
1447
  }
1449
1448
 
1450
1449
  // ── --check ──────────────────────────────────────────────────────────────────────────────────────────
1451
- // Reports. Writes nothing and creates nothing, ever.
1450
+ // Reports. Changes no setting of this install, ever.
1452
1451
  //
1453
- // It calls nobody EITHER, with exactly one opt-in exception: `--probe-engine` spends one cheap engine
1454
- // turn. Off by default, and the default is off for the original reason — a check that dials a provider
1455
- // is a check that can fail for reasons that are not about this machine. Named as a flag so the reader
1456
- // who asked for it is the one who pays for it, and so `--check` stays the thing you can run anywhere.
1452
+ // It calls one thing outside this machine: the engine, for one cheap turn, every time, because an engine
1453
+ // program's own word that it is signed in was not true (owner ruling, 2026-11-25). The turn may renew the
1454
+ // engine's own sign-in file and leave the program's session log, which is why this says "changes no setting"
1455
+ // and no longer "writes nothing". Every other call is opt-in, by its own flag.
1457
1456
  //
1458
1457
  // Exit 0 when everything PRESENT is coherent, 1 when something present is WRONG, 2 when it could not
1459
1458
  // look. An absence is reported loudly and is not, on its own, a failure — a fresh clone has configured
@@ -1642,14 +1641,14 @@ export function whatSetupLeft({ copy = null, engine = null, turnRan = false } =
1642
1641
  export async function runCheck() {
1643
1642
  say("\n Trademark clearance engine — configuration check\n");
1644
1643
  const ctx = await readCheckContext();
1645
- const { leadIsTheRefusal, refusal, turnLeads, signInLineLeads } = await sayOpening(ctx);
1644
+ const { leadIsTheRefusal, refusal, turnLeads } = await sayOpening(ctx);
1646
1645
 
1647
1646
  // The path this command runs from, with the build it names below it.
1648
1647
  say(`\n repo: ${REPO}`);
1649
1648
 
1650
1649
  await sayDeployment(ctx);
1651
1650
  await sayNode();
1652
- await sayEngine({ ...ctx, turnLeads, signInLineLeads });
1651
+ await sayEngine({ ...ctx, turnLeads });
1653
1652
  await sayHowToRun();
1654
1653
  await sayEnvFile();
1655
1654
  await sayConfigurationStore(ctx);
@@ -1831,8 +1830,7 @@ async function readCheckContext() {
1831
1830
 
1832
1831
  // ── WHAT THE OPENING NEEDS FROM THE ENGINE SECTION, READ BEFORE IT ─────────────────────────────────
1833
1832
  //
1834
- // The opening says whether the engine program resolves (the sign-in line) and, under --probe-engine,
1835
- // runs the turn on the copy that resolves. Both are read here, once, and the Engine section still
1833
+ // The opening runs the turn on the copy that resolves. Both are read here, once, and the Engine section still
1836
1834
  // prints every line about them. `engineJudged` is that section's own condition: it judges nothing when
1837
1835
  // the units' environment cannot be read, or when CLEAROTRON_AI names no engine this driver ships.
1838
1836
  const engineJudged = serviceKnown && !(engSel && !engSpec);
@@ -1862,10 +1860,6 @@ async function readCheckContext() {
1862
1860
  // on PATH for an install run from npx, and now that the engine program comes with the install this is
1863
1861
  // the line most installs see first. The opening prints it when it leads and the Engine section prints
1864
1862
  // it otherwise; null where that section would print the demo lines instead.
1865
- const signInLine = engineJudged && installMode !== ENGINE_MODES.DEMO
1866
- ? "The engine program is installed. Whether it is signed in cannot be read from disk: run "
1867
- + `\`${reachableCommand("doctor --probe-engine")}\` to find out.`
1868
- : null;
1869
1863
 
1870
1864
  // ONE TURN, WHEREVER IT RUNS. The engine as a RUN would see it (engineEnvOf). Only the engine-selection
1871
1865
  // keys — the probe must bill exactly the way this machine bills and moves no other variable. The auth
@@ -1957,11 +1951,11 @@ async function readCheckContext() {
1957
1951
  };
1958
1952
  return { fileEnv, unitDir, startPaths, hosted, unitEnv, effective, serviceEnvLabel, serviceEnvFile, serviceKnown,
1959
1953
  serviceFileEnv, effectiveForService, servicesRead, engineEnvOf, engSel, engineId, engSpec, serviceValue,
1960
- engineChosen, binSet, binSetting, bin, invEnv, installMode, signInLine, runTurn, sayTurn, atOrder,
1954
+ engineChosen, binSet, binSetting, bin, invEnv, installMode, runTurn, sayTurn, atOrder,
1961
1955
  sayWillASearchRun, sayResearch, turnRan: () => probeTurnRan };
1962
1956
  }
1963
1957
 
1964
- async function sayOpening({ hosted, serviceKnown, engineId, engineChosen, bin, signInLine, runTurn, sayTurn, atOrder,
1958
+ async function sayOpening({ hosted, serviceKnown, engineId, engineChosen, bin, runTurn, sayTurn, atOrder,
1965
1959
  sayWillASearchRun, sayResearch }) {
1966
1960
  // ── THE OPENING: WHETHER A SEARCH CAN RUN, WHAT STOPS IT, AND THE NEXT ACTION ─────────────────────
1967
1961
  //
@@ -1976,8 +1970,8 @@ async function sayOpening({ hosted, serviceKnown, engineId, engineChosen, bin, s
1976
1970
  // not write, so running setup alone would not reach them. A refusal with no words for what is missing
1977
1971
  // has no such sentence, and opens as every other state does.
1978
1972
  //
1979
- // EVERY OTHER STATE OPENS WITH "Will a search run?" ITSELF, then the sign-in line when the program
1980
- // resolves, or, under --probe-engine on an install that can search, the turn that answers it. The turn
1973
+ // EVERY OTHER STATE OPENS WITH "Will a search run?" ITSELF, then, on an install that can search, the turn
1974
+ // that answers whether its engine is signed in. The turn
1981
1975
  // is announced before it spends anything, and above the heading: a line that starts a section would end
1982
1976
  // "Will a search run?" for any reader that splits this output at its headings.
1983
1977
  //
@@ -1985,8 +1979,7 @@ async function sayOpening({ hosted, serviceKnown, engineId, engineChosen, bin, s
1985
1979
  // searches and that the order-time answer does not cover.
1986
1980
  const missingWords = serviceKnown && atOrder.length ? whatIsMissing(atOrder) : "";
1987
1981
  const leadIsTheRefusal = !hosted && missingWords !== "";
1988
- const turnLeads = PROBE_ENGINE && serviceKnown && atOrder.length === 0 && engineChosen && bin.executable && !bin.relative;
1989
- const signInLineLeads = !leadIsTheRefusal && !PROBE_ENGINE && signInLine !== null;
1982
+ const turnLeads = serviceKnown && atOrder.length === 0 && engineChosen && bin.executable && !bin.relative;
1990
1983
  // ONE LINE, AS EVERY LINE BELOW IS, and the terminal wraps it. Wrapped here at spaces, it broke the command
1991
1984
  // apart wherever the install's path made a long word: `cd <path> && npx clearotron install` on three lines.
1992
1985
  //
@@ -2005,11 +1998,10 @@ async function sayOpening({ hosted, serviceKnown, engineId, engineChosen, bin, s
2005
1998
  turn = await runTurn();
2006
1999
  }
2007
2000
  sayWillASearchRun();
2008
- if (signInLineLeads) info(signInLine);
2009
2001
  if (turn) sayTurn(turn);
2010
2002
  }
2011
2003
  sayResearch();
2012
- return { leadIsTheRefusal, refusal, turnLeads, signInLineLeads };
2004
+ return { leadIsTheRefusal, refusal, turnLeads };
2013
2005
  }
2014
2006
 
2015
2007
  async function sayDeployment({ fileEnv, hosted, unitEnv }) {
@@ -2184,7 +2176,7 @@ async function sayNode() {
2184
2176
  }
2185
2177
 
2186
2178
  async function sayEngine({ hosted, serviceEnvFile, serviceKnown, servicesRead, engineEnvOf, engSel, engineId,
2187
- engSpec, binSet, binSetting, bin, invEnv, installMode, signInLine, runTurn, sayTurn, turnLeads, signInLineLeads }) {
2179
+ engSpec, binSet, binSetting, bin, invEnv, installMode, runTurn, sayTurn, turnLeads }) {
2188
2180
  say("\n Engine");
2189
2181
  // This block used to read CLEAROTRON_CLAUDE_PATH unconditionally, under the heading "Engine binary", on a
2190
2182
  // box that may be running codex — so it reported the wrong variable and could pass for the wrong
@@ -2219,8 +2211,8 @@ async function sayEngine({ hosted, serviceEnvFile, serviceKnown, servicesRead, e
2219
2211
  // AI this command's file does not, it keeps the words it had.
2220
2212
  info(demoModeLine());
2221
2213
  for (const line of leaveDemoAdvice(noAiChosen ? null : engSpec)) info(line);
2222
- // ASKED TO PROBE with no AI chosen, it says why it did not, where it used to print nothing at all.
2223
- if (PROBE_ENGINE && noAiChosen) info(`not probed — no AI is chosen. \`${invoke("install")}\` asks which AI to use.`);
2214
+ // With no AI chosen it says why it did not prove one, where it used to print nothing at all.
2215
+ if (noAiChosen) info(`not probed — no AI is chosen. \`${invoke("install")}\` asks which AI to use.`);
2224
2216
  } else {
2225
2217
  ok(`${engineId} (${engSel.from}) — ${engSpec.label}`);
2226
2218
 
@@ -2240,8 +2232,8 @@ async function sayEngine({ hosted, serviceEnvFile, serviceKnown, servicesRead, e
2240
2232
  // asked to check.
2241
2233
  //
2242
2234
  // It is the same short call setup's engine menu already makes (menuVersion): `--version`, two
2243
- // seconds, no session and no network. That is within "contacts nothing outside this machine" — what that promises is no
2244
- // provider call and no spend, not that nothing on this machine may be asked its own version.
2235
+ // seconds, no session and no network. Doctor's one engine call is the only provider call it makes and the only
2236
+ // spend; nothing else on this machine is barred from being asked its own version.
2245
2237
  const versionOf = (b) => {
2246
2238
  if (b.version) return b.version;
2247
2239
  if (!b.executable || b.relative || !b.path) return null;
@@ -2325,7 +2317,7 @@ async function sayEngine({ hosted, serviceEnvFile, serviceKnown, servicesRead, e
2325
2317
  // restart a service — neither of which can change the answer, because the refusal is about the
2326
2318
  // platform rather than the binary. Naming WSL2 is the only instruction that ends this state.
2327
2319
  for (const line of leaveDemoAdvice(engSpec)) info(line);
2328
- } else if (!signInLineLeads) info(signInLine); // printed here unless the opening carries it
2320
+ }
2329
2321
 
2330
2322
  // AND WHETHER THE ENGINE AGREES, which is a different question from the one above and the reason an
2331
2323
  // outside user gave up on this product. This command reads its OWN environment; the portal's New
@@ -2404,14 +2396,10 @@ async function sayEngine({ hosted, serviceEnvFile, serviceKnown, servicesRead, e
2404
2396
 
2405
2397
  // An executable file is not a working engine, and this command says so rather than implying
2406
2398
  // otherwise by staying silent.
2407
- if (!PROBE_ENGINE && installMode === ENGINE_MODES.DEMO) {
2408
- // — DEMO DOES NOT ADVERTISE THE PROBE. The generic line below sends the reader to spend a
2409
- // turn; with nothing to spawn, --probe-engine answers "there is no usable binary to probe" and the
2410
- // round trip taught them nothing they were not just told. Advice that cannot pay off is noise in
2411
- // the one command a first-time reader runs to find out what they have.
2399
+ if (installMode === ENGINE_MODES.DEMO) {
2400
+ // — DEMO HAS NOTHING TO PROVE. With nothing to spawn, "there is no usable binary to probe" would
2401
+ // tell the reader nothing they were not just told.
2412
2402
  info("nothing to probe in demo mode — the sign-in question arrives once a binary does.");
2413
- } else if (!PROBE_ENGINE) {
2414
- info("whether it is SIGNED IN is not checked here — add --probe-engine to spend one cheap turn proving it");
2415
2403
  } else if (!bin.executable || bin.relative) {
2416
2404
  info("not probed — there is no usable binary to probe. Fix the line above first.");
2417
2405
  } else if (!turnLeads) {
package/bin/status.mjs CHANGED
@@ -20,6 +20,7 @@ import { CLIENT_DOOR_UNIT, clientDoorPort } from "../shared/client-door.mjs";
20
20
  import { invoke } from "../shared/invocation.mjs";
21
21
  import { readRunning, probe } from "../shared/running-start.mjs";
22
22
  import { configStaleness, stalenessWarning, parseSystemdTimestamp } from "../driver/config-staleness.mjs"; // — F48
23
+ import { engineCheckDir, failedCheckLines, lastEngineAnswer, readEngineCheck } from "../driver/engine/health.mjs";
23
24
 
24
25
  const UNIT_DIR = join(homedir(), ".config", "systemd", "user");
25
26
  const say = (s = "") => console.log(s);
@@ -127,5 +128,15 @@ if (!installed && running.length) {
127
128
  if (existsSync(join(UNIT_DIR, CLIENT_DOOR_UNIT))) {
128
129
  say(` ${CLIENT_DOOR_UNIT.padEnd(34)} ${state(CLIENT_DOOR_UNIT)} (assistant connection — 127.0.0.1:${clientDoorPort(process.env)}; \`${invoke("disconnect")}\` closes it)`);
129
130
  }
131
+ // THE ENGINE CHECK'S LAST FAILURE, while it stands (driver/engine/health.mjs). Read over the units' own file, as the
132
+ // ports are: the worker that checks reads its settings there, and so names its work folder there.
133
+ {
134
+ let unitsEnv = process.env;
135
+ try { unitsEnv = { ...process.env, ...parseEnvFile(readFileSync(join(homedir(), ".env"), "utf8")) }; } catch { /* the shell's */ }
136
+ const engine = String(unitsEnv.CLEAROTRON_AI ?? "").trim();
137
+ const dir = unitsEnv.CLEAROTRON_WORK_DIR ? join(unitsEnv.CLEAROTRON_WORK_DIR, "engine-check") : engineCheckDir();
138
+ const lines = engine ? failedCheckLines(readEngineCheck(engine, { dir }), lastEngineAnswer(engine, { dir })) : [];
139
+ if (lines.length) say(`\n ⚠ ${lines.join("\n ")}`);
140
+ }
130
141
  say(`\n Configuration questions: ${invoke("doctor")}`);
131
142
  process.exit(0);
package/build-info.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "commit": "c69b144111e461d4c0c2b624dd2f4a7b7c47612f",
3
- "version": "0.7.0-beta.2"
2
+ "commit": "9e95c9d5d165996deeef9e96262debd3b8dab998",
3
+ "version": "0.7.0-beta.4"
4
4
  }
package/docs/DELIVERY.md CHANGED
@@ -35,6 +35,7 @@ backstop (the markers are edge-triggers, **not** the source of truth — see Wri
35
35
  | **duplicate-skipped** | `intake-<base>.duplicate.pending` | JSON packet | `<base>.duplicate` + `.reason` in the queue |
36
36
  | **pre-run-failed** | `intake-<base>.prerun-failed.pending` | JSON packet | `<base>.failed` + `.reason` in the queue |
37
37
  | **late-bind-ack** | `<runId>.bindack.pending` | JSON packet | `customer-late-bind-ack` event in `_driver/run.jsonl` |
38
+ | **engine-check-failed** | `engine-check-<engine>.failed.pending` | JSON packet for the operator: no run, no requester | `<CLEAROTRON_WORK_DIR>/engine-check/<engine>.check.json` |
38
39
 
39
40
  `runId` is `<slug>-<date>-<codename>` — the SAME id `status.json`, the pool and every status surface
40
41
  carry. **There is one canonical form, and every minting site writes it.** Packets and outbox markers
@@ -105,17 +106,36 @@ field, never "this was not a refusal".
105
106
 
106
107
  ### `intake-rejected` — `intake-<base>.failed.pending`
107
108
 
108
- `{ ts, kind: "intake-rejected", classify: "clarify"|"reject", base, agent, jobId, msgId,
109
- forwarder, forwarderEmail, markName, errors[], text }` — `classify: "clarify"` means the fix
109
+ `{ ts, kind: "intake-rejected", classify: "clarify"|"reject", base, agent, account, organisation,
110
+ jobId, msgId, forwarder, forwarderEmail, markName, errors[], text }` — `classify: "clarify"` means the fix
110
111
  is a question back to the requester (see [INTAKE.md](INTAKE.md)); `"reject"` means the job was
111
112
  malformed. `text` is ready to send ("… Nothing has been searched or delivered. Job parked as
112
113
  <base>.failed …").
113
114
 
114
115
  ### `duplicate-skipped` — `intake-<base>.duplicate.pending`
115
116
 
116
- `{ ts, kind: "duplicate-skipped", base, agent, jobId, msgId, forwarder, forwarderEmail,
117
- markName, text }` — the matter-dedup gate parked the request instead of running a second paid
118
- search. The queue-side `.duplicate.reason` explains the match and the `dupOverride` force-run.
117
+ `{ ts, kind: "duplicate-skipped", base, agent, account, organisation, jobId, msgId, forwarder,
118
+ forwarderEmail, markName, text }` — the matter-dedup gate parked the request instead of running a
119
+ second paid search. The queue-side `.duplicate.reason` explains the match and the `dupOverride` force-run.
120
+
121
+ ### `pre-run-failed` — `intake-<base>.prerun-failed.pending`
122
+
123
+ `{ ts, kind: "pre-run-failed", base, agent, account, organisation, jobId, msgId, forwarder,
124
+ forwarderEmail, markName, reason, text }` plus the chat routing fields — the request failed before its
125
+ run could start, for example on the engine's sign-in check, so nothing was searched or delivered.
126
+ `text` is ready to send. For an order placed by the person it is for (`clientPrincipal`) it is the
127
+ not-started sentence of the failure email ("The <search ordered> for <mark> was not started, and nothing
128
+ was delivered. Please tell whoever administers this installation."); otherwise it is the staff line with
129
+ the reason. `reason` is always on the packet.
130
+
131
+ ### Whose notice it is, when there is no run
132
+
133
+ The three kinds above are filed before any run exists, so there is no run to read a company from.
134
+ Each carries `account`, the company key its order named (`profileKey`), and `organisation`, the
135
+ organisation of a Generic order. A token scoped to named companies lists and acknowledges the notices
136
+ of those companies, as it does their runs. An order that named no company carries `account: null`,
137
+ which only a full grant sees: the runner may still resolve such an order to a company from the
138
+ sender's email domain.
119
139
 
120
140
  ### `late-bind-ack` — `<runId>.bindack.pending`
121
141
 
@@ -145,6 +165,9 @@ drives the whole delivery side over the ops MCP face — mint its token verb-sco
145
165
  4. For the remaining kinds — `intake-rejected`, `duplicate-skipped`, `pre-run-failed`, `late-bind-ack` — route the
146
166
  packet's `text` → **`ack_event(file)`** (idempotent; validated as a bare `*.pending` name). These
147
167
  describe something that did not become a run, so there is no run to settle.
168
+ 5. Leave `engine-check-failed` pending. It is for this install's operator, who sees the failure in
169
+ `clearotron status`, and it has no requester: do not route, mark or acknowledge it. The next passing
170
+ engine check takes it back.
148
171
 
149
172
  **Poll at any hour.** Owed work does not keep office hours: a run that fails at 03:00 owes its requester
150
173
  a notice at 03:00. Ask the door directly with **`list_runs({ sendPending: true })`** — the no-filesystem
@@ -168,7 +191,8 @@ The filesystem loop below remains equivalent for integrators that do have data-p
168
191
  `forwarder`/`forwarderEmail`, `Subject:` = `subject`, `In-Reply-To:` = `msgId`; optionally
169
192
  chat `whatsappText` to `whatsappTo` and, separately, to `whatsappCcOperator` when present. A null
170
193
  `whatsappTo` with a `whatsappToReason` means nobody is reachable for that requester — surface it, do
171
- not redirect the notice to the operator instead. For every other kind, `text` is ready to route as-is.
194
+ not redirect the notice to the operator instead. For every other kind, `text` is ready to route as-is,
195
+ except `engine-check-failed`, which stays pending for the operator (step 5 of the pure-MCP loop above).
172
196
  3. **Write back**: create a `.sent` marker in the (archived) run dir after a successful send —
173
197
  the idempotency guard that prevents double-sends if markers fire twice. Then clear the
174
198
  consumed `.pending` files. The MCP verb writes it as JSON
@@ -274,6 +274,7 @@ deployment may override (verify live values per deployment).
274
274
  | `CLEAROTRON_ENGINE_MAX_BUFFER` | 64 MiB of chars (min 1024) | Same cap on an engine subprocess's stdout/stderr: an endless newline-free stream resets the stall clock forever and would otherwise grow to the V8 string limit; overflow tree-kills and fails the turn as a plain `nonzero_exit` (never a timeout/wedge), and the truncated tail is never parsed. |
275
275
  | `CLEAROTRON_RATE_LIMIT_DEFAULT_BACKOFF_MS` | 1200000 (20 min) | Park backoff for a 429 with no reset timestamp (immediate resume would hot-loop on the 90 s tick). |
276
276
  | `CLEAROTRON_RECOVERY_MAX` | 3 | Auto-recovery park budget per run (backoffs 2/15/60 min). |
277
+ | `CLEAROTRON_ENGINE_CHECK_ROUTINE` | `7d` | Check the engine on its own when it has had no successful call for this long: a whole number of hours or days (`12h`, `7d`, `30d`), or `off`. Every turn the engine completes moves the clock, so a busy install is never checked. The worker makes the check on a tick with nothing to run, with the run door's one real turn; it also checks when it starts and when the installed build changes, whatever this says. A fault no search can get past writes one `engine-check-failed` packet to the outbox ([DELIVERY.md](../DELIVERY.md)) and no second one until a check passes. Any other value runs at `7d`, and the worker's log says so. |
277
278
  | `CLEAROTRON_MAX_BUDGET_USD` | unset | Optional `--max-budget-usd` ceiling passed to the engine subprocess. |
278
279
  | `CLEAROTRON_NO_PROGRESS_MS` | unset (⇒ derived, see below) | PINS the no-progress watchdog to a fixed wall. Set only to reproduce a stall deliberately — a pinned value overrides the derivation entirely. |
279
280
  | `CLEAROTRON_HARD_MS` | unset (⇒ stage timeout + 60s, else 660s) | PINS the hard turn ceiling, ms. That ceiling measures ACTIVE time — elapsed minus tool wait — so a turn waiting on a slow register call is not killed for waiting; a turn generating for the whole budget still is. Set only to drive the ceiling in a test: the derivation floors at 61s. A non-positive or unparseable value falls through to the derivation, so this cannot disable the wall. |
@@ -1,5 +1,39 @@
1
1
  # clearotron-driver
2
2
 
3
+ ## 0.7.0-beta.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed: Where a logo could not be fetched, the report no longer draws a dashed "Logo not retrieved" box in its place. It shows nothing there, on a clearance report's cards and rows and in a Knockout's filings table. The card's "Register record" still gives the mark's type and register number.
8
+ - For operators: `clearotron doctor` now makes one real call to the configured AI engine, on its cheapest model, and fails when the engine refuses it. An install whose engine sign-in had stopped working passed the check while every new search was refused.
9
+
10
+ For operators: The background service now checks its AI engine when it starts and after seven days without a successful engine call, and `clearotron status` shows a check that failed. `CLEAROTRON_ENGINE_CHECK_ROUTINE` sets that interval, such as 12h or 30d, or turns it off.
11
+
12
+ For operators: A failed engine check also leaves one event in the outbox for the installation's operator, with no order and no requester. An integration that delivers outbox events should leave it pending; the next passing check removes it.
13
+
14
+ Fixed: When the engine is refused over its billing setting, `clearotron doctor` names the setting and no longer prints its value, which could be a pasted key.
15
+
16
+ ## 0.7.0-beta.3
17
+
18
+ ### Patch Changes
19
+
20
+ - Fixed: A client's assistant connected to Clearotron now gets instructions that match what the connector does. It reads a report's own product and coverage before describing the work, and no longer calls every search a preliminary one. It is no longer asked for a requester key or offered a model choice that its account cannot set, and no longer claims a native-language reading on searches that never run one. A report link for a Knockout screen is now pointed to the brief and the report for its findings, which the findings list there cannot show. The reader of an order's brief is now told to leave the choice of search to the person ordering it when more than one would fit.
21
+ - Fixed: When an order fails before its search starts, or is refused before it runs, the notice now reaches an integration whose access is limited to that order's company, as notices about started searches already did. A client who placed the order is told that the search was not started, without the technical reason.
22
+ - Fixed: A Knockout of close variations no longer risks rating each name alone. The intake must now say which names belong together, listing unrelated names on their own, before its plan is saved. Before, a plan that left the groups out was accepted, and every name was then rated in isolation. Once a plan is saved, a correction to one of its fields or one of its names is now accepted on its own, where before it was refused.
23
+ - Fixed: Each name in a Knockout now opens with its overall rating and the goods or services the rating is for, and says how the advice differs for other goods. Before, a name's first paragraphs could describe the name and its market without giving the rating, so a reader could not tell which of the requested goods the rating applied to.
24
+ - Fixed: An assistant opened on a Knockout report link now reads the name's findings in the brief and the delivered report. It no longer asks for finding cards that a Knockout does not have.
25
+ - Fixed: A register search that stops answering partway through a clearance is no longer run again at full cost; the searches it could not finish are delivered as left open.
26
+ - Fixed: The steps that write a report now follow one set of writing rules. The summary and every line a reader sees first are asked for in plain words a client reads, with no sentence over 25 words, while the detail behind a fold keeps its legal language. Before, the same rules were stated several times and disagreed about who the reader was.
27
+ - Fixed: When an order's id is too long, the refusal now states the 128-character limit and the id's own length. Before, it named only the allowed characters, so a caller could not tell what to fix.
28
+ - Fixed: A what-if memo is now offered only on a delivered clearance report whose findings can be read, never on a search still running, one stopped or never delivered, or a Knockout screen. A request outside that is declined when it is asked rather than after it was accepted. Asking to re-run a step of a delivered report now points to the memo instead of only refusing.
29
+ - Fixed: When the review withdraws a finding, an open coverage row that still cites it is now sent back to the writer for correction before delivery. Such a row could otherwise print under "Left open" with the withdrawn finding's owner, though the report carries no card for that finding.
30
+ - Fixed: An assistant placing an order through the connector now tells the requester the search is submitted, not that it is starting, and confirms it only once the order has been accepted. It reports a start only once the search has a status of its own, and checks that status rather than reading silence as progress.
31
+ - Fixed: Wherever a register search is told how to narrow a crowded result, it is now pointed to the section that holds those steps. The register guides now say that the coverage record is where a market the register cannot reach is recorded and disclosed.
32
+ - Fixed: Each step of a clearance is now given only the instructions for its own part of the work. A register or marketplace step no longer receives instructions written for another step, and the review that checks the gathered findings is given its instructions directly instead of being told to open a file.
33
+ - Fixed: A clearance now fetches logos only for the registrations its report draws, at most eight per finding. A finding citing more registrations no longer pays the register for logos that no page shows.
34
+ - Fixed: A link written into the opening paragraphs of the report's assessment of the mark now shows as a link, as it already did in the rows below them, instead of as markup.
35
+ - Fixed: The Chinese-language review now reads the Chinese register records the search found, with their goods where held, so a conflict it spots in them can reach the report instead of only a suggestion to search further.
36
+
3
37
  ## 0.7.0-beta.2
4
38
 
5
39
  ### Patch Changes
@@ -142,9 +142,10 @@ export function systemPrompt({ today = new Date().toISOString().slice(0, 10) } =
142
142
  "",
143
143
  "THE FOUR SEARCHES. Return the id, or an empty string when the brief does not clearly describe one:",
144
144
  ...PRODUCTS.map((p) => ` ${p.id.padEnd(28)} ${p.geography}; up to ${p.maxNames} name${p.maxNames === 1 ? "" : "s"}${p.caseLaw ? "; carries the case-law and opposition reading" : ""}`),
145
- "The geography and the search have to agree — that is what the form checks. A brief naming one country",
146
- "is a full-country-search; two or more, or a region, is a multi-country-focus-search; everywhere is a",
147
- "global-preliminary-search; several names screened quickly is a knockout-search.",
145
+ // NO SHORTCUT FROM GEOGRAPHY TO PRODUCT (design, 2026-11-24): one name in one country, or worldwide, fits a Knockout as well
146
+ // as a clearance, and the reader that mapped one country to a full-country search chose for a client who had not.
147
+ "Use the product the brief clearly requests. Check that its territories and number of names fit. If more",
148
+ "than one product fits and the brief does not say which one the client wants, leave the product blank.",
148
149
  "Choose full-country-search only when the brief asks for ONE country. Its case-law and opposition",
149
150
  "reading is not something to add — it is what that search is — so do not reach for it because the brief",
150
151
  "mentions a dispute in passing.",
@@ -11,7 +11,7 @@
11
11
  "the baseline tracks named elements, and a rename is a new name. Regenerate rather than work around it.",
12
12
  "Measured 139 of 287 declared elements."
13
13
  ],
14
- "total": 104,
14
+ "total": 103,
15
15
  "byStage": {
16
16
  "matter-frame": [
17
17
  "### Intake asks line shape — rendered by the driver from intake_asks[]",
@@ -98,7 +98,6 @@
98
98
  "source attribution — the register name tagged on each record, plus the EUIPO `environment` word",
99
99
  "the compulsory dominant-element crowd row's `unit` cell — the dictated grammar `<axis> / dominant-element crowd (<N> members): <label>` and the bare integer N",
100
100
  "the full clickable record URL, composed from providers/<name>.md 'Record base host' plus the record `uri`",
101
- "the record ids read while answering each instructed check",
102
101
  "the rolled-up one-line `reason` naming the material slice"
103
102
  ],
104
103
  "skeptic": [
@@ -109,66 +109,25 @@ export function grantedToolsFor(stage) {
109
109
  // this is not that: it is the measured population, which is FIVE TIMES the two members was filed
110
110
  // on, and every entry is a live divergence a reader can go and see.
111
111
  //
112
- // SIX OF THE TEN ARE ONE SUB-CLASS NOBODY HAD NAMED: SHARED DOCTRINE, DIVERGENT GRANTS. A skill file is
113
- // served whole to several stages whose grants differ, so the same sentence is a correct instruction to
114
- // one seat and an order for a tool the next seat does not hold. `clearance-register/SKILL.md` goes to
115
- // register-unit and register-digest; `clearance-search/phase2-execution.md` goes to skeptic;
116
- // `clearance-search/synthesis-rules.md` goes to synthesis AND report-overview. report-overview and
117
- // clearance-variants are tool-free BY DESIGN, each with its reason written out in TOOL_FREE_STAGES;
118
- // skeptic has since CONVERTED to the RECORDING category (its reason moved to RECORDING_STAGES) and
119
- // holds exactly its own record tool — still no retrieval tool, so its entries below reproduce
120
- // unchanged. Each of the three is currently served a document telling it to run a lookup.
112
+ // SHARED DOCTRINE, DIVERGENT GRANTS. A skill file is served whole to several stages whose grants differ,
113
+ // so the same sentence is a correct instruction to one seat and an order for a tool the next seat does
114
+ // not hold. `clearance-search/synthesis-rules.md` goes to synthesis AND report-overview, and
115
+ // report-overview is tool-free BY DESIGN, its reason written out in TOOL_FREE_STAGES; clearance-variants
116
+ // is tool-free too, and its own doctrine names a research call. The register spine's eight rows and the
117
+ // skeptic's two resolved when those manuals split by seat: each register mode reads only its own file
118
+ // beside the shared spine, and the skeptic reads a manual of its own.
121
119
  //
122
120
  // Resolution is per pair and is doctrine judgment: grant the tool, drop the order, or scope the
123
121
  // sentence to the seat that holds it. owns that call and says so; E12's job is that the list can
124
122
  // only shrink. The test asserts every entry still reproduces, so a pair fixed in fails CI here
125
123
  // until its line is deleted.
126
124
  export const TOOL_ORDER_BACKLOG = [
127
- { stage: "register-digest", tool: "register_enumerate", site: "driver/skills/clearance-register/SKILL.md",
128
- closes: "#865 — shared doctrine: SKILL.md is served to register-unit (holds register) and register-digest "
129
- + "(holds band only, since the plan freeze retired live search from the judgment seat)." },
130
- { stage: "register-digest", tool: "register_execute_plan", site: "driver/skills/clearance-register/SKILL.md",
131
- closes: "#865 — same shared file, same split grant." },
132
125
  { stage: "register-digest", tool: "register_batch_screen", site: "driver/skills/clearance-register/digest.md",
133
126
  closes: "#865 — the digest's OWN doctrine, not a shared file: this one is the stage being told to "
134
127
  + "batch-screen with a tool its grant does not carry. toolGroupsForStage() in gather-config.mjs already records that "
135
128
  + "this stage's prompt once ordered live register checks; the order outlived the note." },
136
- { stage: "register-unit", tool: "band_record", site: "driver/skills/clearance-register/SKILL.md",
137
- closes: "#865 — same shared file, same split grant." },
138
- { stage: "register-unit", tool: "band_shape", site: "driver/skills/clearance-register/SKILL.md",
139
- closes: "#865 — same shared file, same split grant." },
140
129
  { stage: "report-overview", tool: "band_record", site: "driver/skills/clearance-search/synthesis-rules.md",
141
130
  closes: "#865 — same shared file, same split grant." },
142
- { stage: "register-unit", tool: "band_lookup", site: "driver/skills/clearance-register/SKILL.md",
143
- closes: "#865 — the mirror image: the band tools are the judgment stages', and the unit lane holds "
144
- + "register instead." },
145
- { stage: "register-unit", tool: "record_coverage", site: "driver/skills/clearance-register/SKILL.md",
146
- closes: "#865 — same shared-spine split as the band tools above, minted by the typed coverage "
147
- + "transport: the spine's Coverage-ledger section (mode-scoped to DIGEST in its own words) orders "
148
- + "`record_coverage`, which only register-digest's grant carries — the unit lane must never hold a "
149
- + "writer into judgment's coverage record. Resolved the day the spine's coverage doctrine moves "
150
- + "wholly into digest.md, or #865 scopes shared-spine text per seat." },
151
- { stage: "register-unit", tool: "record_register_digest", site: "driver/skills/clearance-register/SKILL.md",
152
- closes: "#865 — the SAME shared-spine split as record_coverage above, minted by conversion 11's typed "
153
- + "findings transport. The spine's mode list names the tool inside its **Digest mode (judgment — "
154
- + "Layer B)** bullet, which is the sentence that already names record_coverage and the band tools; "
155
- + "register-unit reads the spine and is dispatched as the FUNNEL, so it is ordered a tool only the "
156
- + "digest grant carries. It resolves on the same condition as record_coverage's row — the day the "
157
- + "spine's digest doctrine moves wholly into digest.md, or #865 scopes shared-spine text per seat — "
158
- + "and NOT by granting it: the funnel must never hold a writer into judgment's findings document, "
159
- + "which is the same rule that keeps record_coverage off its grant." },
160
- { stage: "register-digest", tool: "record_unit_note", site: "driver/skills/clearance-register/SKILL.md",
161
- closes: "the mirror of record_register_digest above: the spine's **Unit mode** bullet says the driver renders "
162
- + "the unit's note from its `record_unit_note` call, in wording approved on 2026-11-11. register-digest reads "
163
- + "the spine and is dispatched as JUDGMENT, which that bullet does not address. It resolves on the same "
164
- + "condition as the rows above, and NOT by granting it: the judgment seat never writes a unit's note." },
165
- { stage: "skeptic", tool: "perplexity_research", site: "driver/skills/clearance-search/phase2-execution.md",
166
- closes: "#865 — skeptic holds NO retrieval tool ('new search work enters via the escalation lane, never "
167
- + "from this seat' — it converted to the RECORDING category, gaining record_skeptic plus the "
168
- + "read-only, run-dir-scoped search_run_artifacts, and no retrieval tool) "
169
- + "and is served a document ordering a live query." },
170
- { stage: "skeptic", tool: "register_propose_supplemental", site: "driver/skills/clearance-search/phase2-execution.md",
171
- closes: "#865 — same seat, same file, the supplemental mint it cannot call." },
172
131
  { stage: "report-overview", tool: "perplexity_research", site: "driver/skills/clearance-search/synthesis-rules.md",
173
132
  closes: "#865 — synthesis-rules.md is served to synthesis (holds perplexity + band) and to "
174
133
  + "report-overview (TOOL-FREE: 'renders the shell from the settled narrative + findings')." },