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
@@ -24,7 +24,7 @@
24
24
  //
25
25
  // — THAT IS NO LONGER UNIVERSAL, and a tail composed here can now name a tool its reader does not
26
26
  // hold. A recording stage whose artifact the DRIVER writes is seeded `Read` alone, so `editRepairTail`'s
27
- // "using the Edit tool" and `fullWriteTail`'s "with the Write tool" are wrong for it — gateway.mjs
27
+ // targeted edits and `fullWriteTail`'s whole-file write are wrong for it — gateway.mjs
28
28
  // intercepts those stages before either tail is reached and orders a re-call of the typed tool instead.
29
29
  // blind-frame is the first; every conversion adds one. If you are adding a tail here, the question is no
30
30
  // longer "what should it say" but "which stages can obey it". The models were simply told, in the
@@ -72,10 +72,10 @@ export const ABBREVIATED_VALUE_NOTE =
72
72
 
73
73
  export function editRepairTail(target) {
74
74
  const what = target || "the stage output";
75
- return `Apply the fix by TARGETED EDITS to ${what} using the Edit tool: change ONLY what the correction ` +
75
+ return `Apply the fix by TARGETED EDITS to ${what} with your file-editing operation: change ONLY what the correction ` +
76
76
  `above names, and leave every other line of the file byte-identical. Do NOT rewrite, re-emit or re-type ` +
77
77
  `the whole file — everything not named above already passed, a full rewrite risks degrading it, and an ` +
78
- `unexplained size jump is flagged. If ${what} does not exist, create it in full with the Write tool. ` +
78
+ `unexplained size jump is flagged. If ${what} does not exist, create it in full. ` +
79
79
  `Do not stop until it is corrected and valid.`;
80
80
  }
81
81
 
@@ -89,11 +89,11 @@ export function editRepairTail(target) {
89
89
  // against the file. Same write mode, different truth about why.
90
90
  export function appendRepairTail(target) {
91
91
  const what = target || "the stage output";
92
- return `Apply this by TARGETED EDITS to ${what} using the Edit tool: ADD exactly what the correction ` +
92
+ return `Apply this by TARGETED EDITS to ${what} with your file-editing operation: ADD exactly what the correction ` +
93
93
  `above names and leave every other line of the file byte-identical. This correction ADDS what is ` +
94
94
  `missing — it does not replace what is there — so do NOT rewrite, re-emit or re-type the whole file: ` +
95
95
  `a full rewrite risks degrading prose that is already correct, and growth beyond the additions ` +
96
- `themselves is flagged. If ${what} does not exist, create it in full with the Write tool. Do not stop ` +
96
+ `themselves is flagged. If ${what} does not exist, create it in full. Do not stop ` +
97
97
  `until the additions are in place and the file is valid.`;
98
98
  }
99
99
 
@@ -101,7 +101,7 @@ export function appendRepairTail(target) {
101
101
  // missing is the file itself, so there is nothing to patch.
102
102
  export function fullWriteTail(target) {
103
103
  const what = target || "the stage output";
104
- return `Write the COMPLETE file now at ${what} with the Write tool — full file, from the work already in ` +
104
+ return `Write the COMPLETE file now at ${what} — full file, from the work already in ` +
105
105
  `your context. Do not stop until it exists and is complete.`;
106
106
  }
107
107
 
@@ -16,8 +16,8 @@
16
16
  // single part holds (two cards counting one owner's registrations differently), or one whose check cannot be run on a
17
17
  // part, keeps the overview's repair it always had.
18
18
  //
19
- // Two faults are placed by what they cite. A citation held in a register of the record (the four answers' findings) is
20
- // the writer's, since no card or overview repair can change the record. A citation of a withdrawn or absent finding in
19
+ // Two faults are placed by what they cite. A citation held in a register of the record (the four answers' findings, a
20
+ // forward step's, an open coverage row's) is the writer's, since no card or overview repair can change the record. A citation of a withdrawn or absent finding in
21
21
  // the overview's own prose is the overview's: a check of its own reads the overview as its writer wrote it.
22
22
  import { readFileSync } from "node:fs";
23
23
  import { prescriptionProseChecks, scopeNumberProseChecks, wipoLanguageChecks, countingChecks, countsFromFindings, OVERVIEW_CITATION_ID } from "./predelivery-lint.mjs";
@@ -88,13 +88,14 @@ const withdrawnCitationLine = (ordinal) => `Your text cites finding ${ordinal},
88
88
  * The faults the writer's repair is given for one a register of the record holds, each finding named by the number the
89
89
  * writer's record carries. The check judged the delivered record, which the fold may have renumbered; `toModel` maps a
90
90
  * delivered ordinal to the writer's, or to null for one the fold does not know, which keeps its number as written.
91
- * In the four answers each withdrawn finding gets its ruled line, and the findings the run does not have get the general
92
- * instruction together, since the ruled line says "withdrew". A forward step gets the general instruction, with the
91
+ * In the four answers and the coverage rows each withdrawn finding gets its ruled line, and the findings the run does not
92
+ * have get the general instruction together, since the ruled line says "withdrew". A forward step gets the general instruction, with the
93
93
  * step it concerns named, because the step's support is what is rechecked. PURE.
94
94
  */
95
95
  export function writersCitationFaults(fault, toModel) {
96
- if (!["four_answers", "actions"].includes(fault?.register) || !Array.isArray(fault.cites)) return [fault];
97
- const number = (c) => toModel(c.ordinal) ?? c.ordinal;
96
+ if (!["four_answers", "actions", "coverage"].includes(fault?.register) || !Array.isArray(fault.cites)) return [fault];
97
+ // A coverage row's numbers are the writer's already (predelivery-lint.mjs coverageCitationChecks); the others are mapped.
98
+ const number = fault.writersNumbering ? (c) => c.ordinal : (c) => toModel(c.ordinal) ?? c.ordinal;
98
99
  if (fault.register === "actions") {
99
100
  const seen = new Map(fault.cites.map((c) => [`${c.action}:${number(c)}`, { action: c.action, ordinal: number(c), withdrawn: Boolean(c.withdrawn) }]));
100
101
  return [{ ...fault, detail: actionCitationDetail([...seen.values()]) }];
@@ -98,6 +98,14 @@ export function terminalReasonFields(reason, { cap = 200, fullCap = 4000 } = {})
98
98
  return { reason: abbrev(full, cap), reasonTruncated: truncated, reasonFull: truncated ? abbrev(full, fullCap) : null };
99
99
  }
100
100
 
101
+ // The client's sentence for an order that never became a run: the words of the client failure email's
102
+ // `refused` branch below, without its markup, because a notice filed before any run exists is relayed as
103
+ // text. It names what was ordered from `job.product` exactly as that branch does.
104
+ export function clientNotStartedText(job, mark) {
105
+ const ordered = reportIdentityFor(job?.product ?? null).identity;
106
+ return `${ordered ? `The ${ordered}` : "The search"} for ${mark} was not started, and nothing was delivered. ${CLIENT_ACTION}`;
107
+ }
108
+
101
109
  // (enforcement check E11 in the family) — `reasonDetail` and `reasonQuantity` are PACKET FIELDS.
102
110
  //
103
111
  // The merge gate computes WHICH dictated connotation query dropped and hands it over as StageFailure.detail
package/driver/runner.mjs CHANGED
@@ -48,6 +48,9 @@ import { orderedQueueFiles } from "./queue-order.mjs"; // the order jobs are a
48
48
  import { isCancelled } from "./cancel.mjs"; // a stopped run must not come back through any resume path
49
49
  import { whatsappRouting } from "./stages.mjs";
50
50
  import { writeOutboxPacket } from "./outbox.mjs";
51
+ import { maybeCheckEngine } from "./engine/health.mjs"; // the engine proven between jobs, on a tick with nothing to run
52
+ import { engineCommit } from "./engine-build.mjs";
53
+ import { clientNotStartedText } from "./run-outcome.mjs";
51
54
  import { writeRunStatus, terminalRunState } from "./progress.mjs"; // A5 — grace-exit park + reclaim-bound terminal go through the guarded status writer; terminalRunState is the run record's own terminal vocabulary (2155)
52
55
  import { identitySeed } from "./progress.mjs"; // — the same stamp a run seeds, for the process that runs them
53
56
  import { writeDrainerStamp } from "./drainer-identity.mjs"; // — deploy health cannot interrogate a running process; it says so itself
@@ -346,6 +349,18 @@ function dropMatter(qdir, msgId) {
346
349
  // Exported for unit tests (the integration path exercises them via claimAndRun).
347
350
  export { matterSignature, matterLedgerPath, findDuplicateMatter, recordMatter, dropMatter, readMatterLedger };
348
351
 
352
+ // WHOSE NOTICE THIS IS, for the three notices filed before any run exists. A run's account is read from
353
+ // the profile frozen into it; these notices have no run, so the door could not tell whose they were and
354
+ // dropped every one for a token scoped to named companies (server.mjs filterByAccounts) — which is how a
355
+ // failure before start reached no courier at all. The account is the one the order NAMED: a scoped door
356
+ // always writes it (resolveScopedProfileKey). An order that named none carries null, which only a full
357
+ // grant sees, because the runner may still resolve such an order to a company from the sender's domain.
358
+ function noticeAccount(job) {
359
+ const account = typeof job?.profileKey === "string" && job.profileKey.trim() ? job.profileKey.trim() : null;
360
+ const organisation = account === "generic" && typeof job?.tenant === "string" && job.tenant ? job.tenant : null;
361
+ return { account, organisation };
362
+ }
363
+
349
364
  // Best-effort intake-reject notice. The silent-intake failure mode (live slogan-mark matter, 2026-06-10): a
350
365
  // job that dies at validation never reaches pipeline(), so no run-level failure event fires and the
351
366
  // requester hears nothing. This is the runner-side backstop: the rejection rides the outbox as a
@@ -363,6 +378,7 @@ async function intakeNotify(agentId, base, job, v) {
363
378
  `Job parked as ${base}.failed in the ${agentId} queue.`;
364
379
  const p = writeOutboxPacket(`intake-${base}.failed`, {
365
380
  kind: "intake-rejected", classify: v?.classify ?? "reject", base, agent: agentId,
381
+ ...noticeAccount(job),
366
382
  jobId: job?.id ?? null, msgId: job?.msgId ?? null,
367
383
  forwarder: job?.forwarder ?? null, forwarderEmail: job?.forwarderEmail ?? null,
368
384
  markName: (job?.markName ?? job?.name ?? job?.marks?.[0]?.name) || null,
@@ -634,6 +650,7 @@ async function duplicateNotify(agentId, base, job, prior = null, sig = null) {
634
650
  + ` command line) and it will go through.`;
635
651
  const p = writeOutboxPacket(`intake-${base}.duplicate`, {
636
652
  kind: "duplicate-skipped", base, agent: agentId,
653
+ ...noticeAccount(job),
637
654
  jobId: job?.id ?? null, msgId: job?.msgId ?? null,
638
655
  forwarder: job?.forwarder ?? null, forwarderEmail: job?.forwarderEmail ?? null,
639
656
  markName: (job?.markName ?? job?.name ?? job?.marks?.[0]?.name) || null,
@@ -696,13 +713,19 @@ function preRunFailNotify(agentId, base, job, reason) {
696
713
  // terminalReasonFields `reason`, so this cut is a no-op today — which is exactly why it survived: a
697
714
  // latent second cap, unmarked, waiting for the next caller to pass a raw reason. It collapses and
698
715
  // trims identically, so this is the same string with the cut made visible when there is one.
699
- const text = `❌ Clearotron request "${mark}" FAILED before the run could start: ${terminalReasonFields(reason).reason} — ` +
700
- `nothing has been searched or delivered. Job parked as ${base}.failed in the ${agentId} queue.`;
716
+ // A CLIENT'S ORDER IS TOLD IN THE CLIENT'S WORDS. Once a courier scoped to the client's company can see
717
+ // this notice, `text` can reach the client, and the staff line quotes the machine reason and the queue.
718
+ // The client gets the shipped not-started sentence the failure email uses; the reason stays a field.
719
+ const text = job?.clientPrincipal === true
720
+ ? clientNotStartedText(job, mark)
721
+ : `❌ Clearotron request "${mark}" FAILED before the run could start: ${terminalReasonFields(reason).reason} — ` +
722
+ `nothing has been searched or delivered. Job parked as ${base}.failed in the ${agentId} queue.`;
701
723
  // `intake-${base}.` PREFIX, not a third scheme: scripts/e2e.mjs's outboxPackets matches by runId
702
724
  // first and by that prefix second, so a name outside it is a notice the harness reports as
703
725
  // never sent. The queue base is the routing key; `kind` carries what actually happened.
704
726
  const p = writeOutboxPacket(`intake-${base}.prerun-failed`, {
705
727
  kind: "pre-run-failed", base, agent: agentId,
728
+ ...noticeAccount(job),
706
729
  jobId: job?.id ?? null, msgId: job?.msgId ?? null,
707
730
  forwarder: job?.forwarder ?? null, forwarderEmail: job?.forwarderEmail ?? null,
708
731
  markName: (job?.markName ?? job?.name ?? job?.marks?.[0]?.name) || null,
@@ -713,6 +736,8 @@ function preRunFailNotify(agentId, base, job, reason) {
713
736
  return Boolean(p);
714
737
  }
715
738
 
739
+ export { intakeNotify, duplicateNotify, preRunFailNotify }; // exported for the run-less notice test
740
+
716
741
  // B3 — guaranteed failure-notice backstop for PRE-TRY throws. The run-level catch in `runShell` owns every
717
742
  // failure inside its try{} (it RETURNS {ok:false, failedStage, …} after notifying — the
718
743
  // _driver/failure.json + outbox packet); a throw that reaches runPrepared's catch instead (res.failedStage
@@ -2288,6 +2313,19 @@ function hasQueuedWork() {
2288
2313
  });
2289
2314
  }
2290
2315
 
2316
+ // THE ENGINE IS PROVEN BETWEEN JOBS TOO (engine/health.mjs): when the worker starts, after the installed build
2317
+ // changes, and when it has had no successful call for the routine interval. Only on a tick with nothing to run, so
2318
+ // it never delays a job; an empty tick costs one read of the installed build. Isolated: a check that throws
2319
+ // must not end the activation. `checkOnStart` is set by the watch entrypoint alone: a systemd one-shot starts a
2320
+ // process every tick, and a start there is not a restart.
2321
+ let checkOnStart = false;
2322
+ async function idleEngineCheck() {
2323
+ const starting = checkOnStart;
2324
+ checkOnStart = false;
2325
+ try { await maybeCheckEngine({ build: engineCommit(), starting }); }
2326
+ catch (e) { note(`[runner] engine check FAILED to run (isolated): ${e?.message ?? e}`); }
2327
+ }
2328
+
2291
2329
  export async function main({ once = true } = {}) {
2292
2330
  // `once:false` is the no-systemd deployment: loop instead of returning, and let the SAME per-activation
2293
2331
  // body below run once per tick. Delegated rather than inlined so the systemd path (once:true, always)
@@ -2303,7 +2341,7 @@ export async function main({ once = true } = {}) {
2303
2341
  // happens to be down but there's no work anyway. A DUE run-dir POSTPONED orphan counts as work too.
2304
2342
  const dueOrphans = scanDueRunDirOrphans();
2305
2343
  const whatIfDue = hasPendingWhatIf();
2306
- if (!hasQueuedWork() && dueOrphans.length === 0 && !whatIfDue) return;
2344
+ if (!hasQueuedWork() && dueOrphans.length === 0 && !whatIfDue) return await idleEngineCheck();
2307
2345
  // Deployment config check — this is the DEPLOYMENT entrypoint, the layer that owns "what is this
2308
2346
  // install's public hostname" (not the pipeline, which is also driven by tests and by --resume with no
2309
2347
  // deployment around it). Reports only: a missing hostname costs a link, not the deliverable, so it must
@@ -2508,6 +2546,7 @@ if (isEntrypoint(import.meta.url)) {
2508
2546
  // BEST-EFFORT AND NEVER FATAL — a drainer that cannot write its stamp still drains. The absence is a
2509
2547
  // finding where it is READ (scripts/live-surface-check.mjs), which costs no client a report.
2510
2548
  const watching = argv.includes("--watch");
2549
+ checkOnStart = watching;
2511
2550
  writeDrainerStamp(config.workspaceRoot, {
2512
2551
  ...identitySeed(),
2513
2552
  mode: watching ? "watch" : "once",
@@ -21,7 +21,8 @@ instead; and `clearance-search/templates/search-request-form.html`, named only i
21
21
  | `matter-frame` | Phase 0. Writes the matter's commercial context — sector, customer base, channels of trade, jurisdictions that materially matter, off-field sectors, watchlist seeds — before any search runs. `watchlist-reference.md` is enrichment, not authority. |
22
22
  | `clearance-variants` | Classifies the mark into one of six archetypes, derives a risk theory from that, emits the variant manifest both execution skills read. Non-Latin scripts: `transliteration-scripts.md`. |
23
23
  | `blind-frame`, `frame-diff` | Re-derives the threat model from the raw instruction alone, deliberately starved of the matter frame, then diffs that model against what the run actually scoped and emits reopen directives the driver acts on. Something has to test the frame instead of reasoning inside it. |
24
- | `clearance-common-law` | The marketplace / web / social sweep, as structured Perplexity research over the platform list the stage dictates. Prompt templates: `perplexity-prompts.md`. |
24
+ | `clearance-common-law` | The marketplace / web / social sweep, as structured Perplexity research over the platform list the stage dictates. A shared spine plus one file per seat: `grid.md` (the marketplace grid) and `meaning.md` (the meaning sweep and its PR / reputational section); a single session reads both. Prompt templates: `perplexity-prompts.md`. |
25
+ | `skeptic` | The fresh-eyes review of the gathered findings before they are trusted. Hands back its flags and escalation decisions through `record_skeptic`. |
25
26
  | `clearance-register` | Register execution in the two modes a spawn selects: `unit.md` (the funnel — enumerate one axis to completion) and `digest.md` (judgment over the merged band). Plus `register-recipes.md`, `status-rules.md`, `stealth-filer-indicators.md`, `providers/`. |
26
27
  | `placement-inquiry` | Applies commercial relevance per candidate — headline-candidate / sheet-2 / watchlist-annex / out-of-scope-filtered — before any tiering runs. |
27
28
  | `case-law-citation` | Grounds risk-relevant findings in precedent fetched in-session, never from memory. One thin adapter per source in `sources/`; `evals.md` defines what working means. |
@@ -62,8 +63,8 @@ are clean. The authoring rules and the empirical-verification checklist a new pr
62
63
  ## Where to start
63
64
 
64
65
  `clearance-register/SKILL.md`, the more elaborated of the two execution skills: a spine plus per-mode files
65
- (`unit.md`, `digest.md`) and per-provider files (`providers/`). The other, `clearance-common-law`, is one spine plus
66
- `perplexity-prompts.md` — the per-mode split and `providers/` are register-only, not a shape every
67
- execution skill shares. `clearance-search/phase2-execution.md` is methodology, not sequencing — the pipeline is
66
+ (`unit.md`, `digest.md`) and per-provider files (`providers/`). The other, `clearance-common-law`, is a spine plus
67
+ one file per seat (`grid.md`, `meaning.md`) and `perplexity-prompts.md`; `providers/` is register-only, not a
68
+ shape every execution skill shares. `clearance-search/phase2-execution.md` is methodology, not sequencing — the pipeline is
68
69
  sequenced in code, in `../stages.mjs` and `../pipeline.mjs`. The old orchestrator manual is kept as a record at
69
70
  [clearance-search-spine.md](../../docs/architecture/retired-manuals/clearance-search-spine.md); no stage reads it.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: blind-frame
3
- description: The frame-STARVED independent re-derivation for the v3 preliminary trademark search workflow. **Run by the driver**, in parallel with the gather sweeps — do not call directly. Reads ONLY the raw instruction (mark, goods, classes, territories, manner of use) and NOT the matter frame, then re-derives the threat model cold across four layers — element + neighbours both directions, field by goods-overlap, sources by real channel, ranking by goods-overlap — and emits a structured model the frame-diff stage diffs against what the run actually scoped. Its job is to test the frame, not to reason inside it.
3
+ description: The frame-STARVED independent re-derivation for the trademark search workflow. **Run by the driver**, in parallel with the gather sweeps — do not call directly. Reads ONLY the raw instruction (mark, goods, classes, territories, manner of use) and NOT the matter frame, then re-derives the threat model cold across four layers — element + neighbours both directions, field by goods-overlap, sources by real channel, ranking by goods-overlap — and emits a structured model the frame-diff stage diffs against what the run actually scoped. Its job is to test the frame, not to reason inside it.
4
4
  ---
5
5
 
6
6
  ## Purpose
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: case-law-citation
3
- description: Grounds risk-relevant trademark findings in cited case law and decisions instead of asserting them. Invoked by the clearance-search orchestrator at Step 4.5 to profile an aggressive enforcer or test a likelihood-of-confusion question against precedent, and usable inline in chat for ad-hoc conflict/enforcement questions. Queries live legal sources — CourtListener (US federal incl. CAFC), EUR-Lex (EU CJEU + General Court judgments, verbatim), and Legal Data Hunter (108-country statutes and case law) — and returns, per finding, on-point authorities (case or decision, forum, date, one-line holding, stable identifier) with relevance notes, or an explicit no-precedent result. Cites only from documents fetched in the session, never from memory. Use when grounding watchlist or aggressive-enforcer hits, or when a trademark conflict, confusability, or enforcement-history question needs precedent.
3
+ description: Grounds risk-relevant trademark findings in cited case law and decisions instead of asserting them. Run by the driver to profile an aggressive enforcer or test a likelihood-of-confusion question against precedent, and usable inline in chat for ad-hoc conflict/enforcement questions. Queries live legal sources — CourtListener (US federal incl. CAFC), EUR-Lex (EU CJEU + General Court judgments, verbatim), and Legal Data Hunter (108-country statutes and case law) — and returns, per finding, on-point authorities (case or decision, forum, date, one-line holding, stable identifier) with relevance notes, or an explicit no-precedent result. Cites only from documents fetched in the session, never from memory. Use when grounding watchlist or aggressive-enforcer hits, or when a trademark conflict, confusability, or enforcement-history question needs precedent.
4
4
  ---
5
5
 
6
6
  # Case-law citation