clearotron 0.5.1 → 0.6.0-beta.1

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 (390) hide show
  1. package/.env.example +7 -7
  2. package/INSTALL.md +10 -10
  3. package/QUICKSTART.md +6 -6
  4. package/README.md +2 -2
  5. package/THIRD-PARTY-NOTICES.md +4 -4
  6. package/bin/README.md +2 -2
  7. package/bin/clearotron.mjs +1 -1
  8. package/bin/connect.mjs +1 -1
  9. package/bin/disconnect.mjs +1 -1
  10. package/bin/example.mjs +2 -2
  11. package/bin/grant.mjs +1 -1
  12. package/bin/onboard.mjs +78 -23
  13. package/bin/start.mjs +88 -33
  14. package/bin/update.mjs +13 -3
  15. package/build-info.json +2 -2
  16. package/docs/DELIVERY.md +1 -1
  17. package/docs/PORTAL.md +1 -1
  18. package/docs/RELEASES.md +1 -1
  19. package/docs/architecture/02-architecture.md +10 -2
  20. package/docs/architecture/03-run-lifecycle.md +6 -2
  21. package/docs/architecture/04-configuration-reference.md +3 -3
  22. package/docs/architecture/05-config-governance.md +5 -4
  23. package/docs/architecture/08-development-guide.md +4 -4
  24. package/docs/architecture/09-security-and-data.md +1 -1
  25. package/{driver/skills/clearance-search/SKILL.md → docs/architecture/retired-manuals/clearance-search-spine.md} +17 -30
  26. package/{driver/skills/clearance-search/templates/email/generic.md → docs/architecture/retired-manuals/email-generic.md} +1 -1
  27. package/{driver/skills/clearance-search → docs/architecture/retired-manuals}/template-formatting.md +3 -4
  28. package/docs/configuration.md +1 -1
  29. package/docs/decisions/0002-no-dark-functionality.md +5 -0
  30. package/driver/CHANGELOG.md +69 -0
  31. package/driver/README.md +11 -1
  32. package/driver/accepted-order.mjs +13 -5
  33. package/driver/attempt-rows.mjs +64 -0
  34. package/driver/attributed-span.mjs +1 -1
  35. package/driver/authority-trees.mjs +1 -1
  36. package/driver/band-shape.mjs +21 -3
  37. package/driver/best-draft.mjs +3 -3
  38. package/driver/blind-frame-record.mjs +2 -2
  39. package/driver/cancel.mjs +3 -2
  40. package/driver/carry-through.mjs +2 -2
  41. package/driver/citation-census.json +3 -3
  42. package/driver/clearance-variants-record.mjs +4 -10
  43. package/driver/common-law-coverage-status.mjs +3 -3
  44. package/driver/common-law-receipts.mjs +2 -2
  45. package/driver/commonlaw-carry-floor.json +3 -3
  46. package/driver/compare.mjs +1 -1
  47. package/driver/config-inventory.mjs +6 -79
  48. package/driver/consumption-ledger.mjs +2 -1
  49. package/driver/contract-arm2-baseline.json +2 -3
  50. package/driver/contract-dictation-registry.mjs +5 -0
  51. package/driver/contract-e3-backlog.mjs +45 -66
  52. package/driver/contract-e3-baseline.json +16 -16
  53. package/driver/contract-vocabulary.mjs +8 -6
  54. package/driver/corrections-feedforward.mjs +3 -1
  55. package/driver/coverage-form-io.mjs +7 -8
  56. package/driver/coverage-tool.mjs +1 -1
  57. package/driver/declination-tool.mjs +2 -2
  58. package/driver/degraded-parts.mjs +9 -9
  59. package/driver/demo-container.mjs +5 -4
  60. package/driver/demo-posture.mjs +17 -0
  61. package/driver/deploy-live-run-guard.mjs +19 -7
  62. package/driver/derived-state.mjs +2 -2
  63. package/driver/dev-portal.mjs +2 -1
  64. package/driver/dispatch-record.mjs +1 -1
  65. package/driver/disposition-tool.mjs +2 -1
  66. package/driver/doubt-closure-tool.mjs +2 -2
  67. package/driver/driver.config.mjs +35 -724
  68. package/driver/e2e-rounds.mjs +3 -4
  69. package/driver/engine/CONTRACT.md +3 -0
  70. package/driver/engine/README.md +2 -0
  71. package/driver/engine/anthropic-agent.mjs +13 -42
  72. package/driver/engine/auth.mjs +74 -0
  73. package/driver/engine/child-record.mjs +1 -1
  74. package/driver/engine/deny-authority-write.mjs +2 -2
  75. package/driver/engine/jx-turn.mjs +10 -2
  76. package/driver/engine/mcp/README.md +1 -1
  77. package/driver/engine/mcp/band-server.mjs +20 -13
  78. package/driver/engine/mcp/codex-config.mjs +1 -1
  79. package/driver/engine/mcp/declination-server.mjs +2 -3
  80. package/driver/engine/mcp/dispositions-server.mjs +3 -3
  81. package/driver/engine/mcp/gather-config.mjs +24 -19
  82. package/driver/engine/mcp/grid-provenance.mjs +1 -1
  83. package/driver/engine/mcp/held-answers.mjs +5 -5
  84. package/driver/engine/mcp/perplexity-server.mjs +16 -7
  85. package/driver/engine/mcp/recording-server.mjs +7 -6
  86. package/driver/engine/mcp/register-server.mjs +29 -0
  87. package/driver/engine/mcp/stdio-server.mjs +5 -5
  88. package/driver/engine/mcp/supplemental.mjs +9 -9
  89. package/driver/engine/openai-agent.mjs +5 -2
  90. package/driver/engine/registry.mjs +103 -0
  91. package/driver/engine/run-choices.mjs +162 -0
  92. package/driver/engine/stamps.mjs +35 -0
  93. package/driver/enqueue-schema.mjs +4 -4
  94. package/driver/envelope-settle.mjs +3 -2
  95. package/driver/feedback-issues.mjs +1 -1
  96. package/driver/feedback-mint.mjs +3 -2
  97. package/driver/feedback-store.mjs +3 -2
  98. package/driver/findings-model.mjs +1 -1
  99. package/driver/flag-snapshot.mjs +5 -4
  100. package/driver/floor-duty.mjs +3 -3
  101. package/driver/foreign-record-links.mjs +1 -1
  102. package/driver/frame-diff-record.mjs +2 -8
  103. package/driver/framework.mjs +1 -1
  104. package/driver/gate-metrics.mjs +10 -11
  105. package/driver/gateway.mjs +220 -839
  106. package/driver/goods-evidence.mjs +26 -14
  107. package/driver/jx-lanes.mjs +3 -3
  108. package/driver/jx-units.mjs +31 -37
  109. package/driver/jx.mjs +44 -59
  110. package/driver/knockout-assess-record.mjs +3 -3
  111. package/driver/knockout-caveats.mjs +21 -0
  112. package/driver/knockout-correction-record.mjs +58 -28
  113. package/driver/knockout-frame-record.mjs +2 -2
  114. package/driver/knockout-register-read.mjs +38 -21
  115. package/driver/knockout-register-record.mjs +5 -6
  116. package/driver/knockout-review-record.mjs +12 -11
  117. package/driver/ladder/model-gauge.mjs +88 -0
  118. package/driver/ladder/next-rung.mjs +296 -0
  119. package/driver/ladder/rescue.mjs +146 -0
  120. package/driver/ladder/stage-tools.mjs +57 -0
  121. package/driver/ladder/turn-failure.mjs +166 -0
  122. package/driver/log.mjs +2 -2
  123. package/driver/matter-frame-record.mjs +4 -4
  124. package/driver/methodology-witness.mjs +2 -2
  125. package/driver/named-band.mjs +60 -3
  126. package/driver/narrative-refutation-record.mjs +145 -42
  127. package/driver/one-build-per-run.mjs +62 -0
  128. package/driver/outbox-backoff.mjs +4 -4
  129. package/driver/owner-screen.mjs +0 -10
  130. package/driver/owner-use-check.mjs +2 -28
  131. package/driver/package.json +1 -1
  132. package/driver/partial-payload-baseline.json +1 -1
  133. package/driver/parts-not-completed.mjs +1 -1
  134. package/driver/pipeline-knockout.mjs +1015 -1001
  135. package/driver/pipeline.mjs +714 -9351
  136. package/driver/placement-decisions.mjs +2 -2
  137. package/driver/placement-form-io.mjs +7 -9
  138. package/driver/placement-union.mjs +0 -6
  139. package/driver/plan-stability.mjs +7 -10
  140. package/driver/portal-acks.mjs +3 -2
  141. package/driver/portal-confirmation.mjs +48 -0
  142. package/driver/portal-families.mjs +3 -2
  143. package/driver/portal-local-auth.mjs +1 -2
  144. package/driver/portal-routes/README.md +24 -0
  145. package/driver/portal-routes/admin.mjs +425 -0
  146. package/driver/portal-routes/compose.mjs +66 -0
  147. package/driver/portal-routes/config.mjs +118 -0
  148. package/driver/portal-routes/connect.mjs +283 -0
  149. package/driver/portal-routes/feedback.mjs +178 -0
  150. package/driver/portal-routes/me.mjs +165 -0
  151. package/driver/portal-routes/queue.mjs +64 -0
  152. package/driver/portal-routes/report.mjs +106 -0
  153. package/driver/portal-routes/run.mjs +508 -0
  154. package/driver/portal-routes/runs.mjs +127 -0
  155. package/driver/portal-routes/usage.mjs +82 -0
  156. package/driver/portal-runs.mjs +588 -0
  157. package/driver/portal-service.mjs +82 -2593
  158. package/driver/portal-static.mjs +3 -1
  159. package/driver/predelivery-lint.mjs +101 -9
  160. package/driver/production-pool-guard.mjs +1 -1
  161. package/driver/profiles.mjs +5 -4
  162. package/driver/progress.mjs +29 -24
  163. package/driver/publish/README.md +10 -5
  164. package/driver/publish/archive-tags.mjs +3 -2
  165. package/driver/publish/demo-marking.mjs +2 -2
  166. package/driver/publish/index.mjs +215 -140
  167. package/driver/publish/knockout.mjs +153 -107
  168. package/driver/publish/office-record-links.mjs +22 -0
  169. package/driver/publish/parse.mjs +20 -5
  170. package/driver/publish/pool-admin.mjs +9 -3
  171. package/driver/publish/render.mjs +11 -3
  172. package/driver/publish/report-dates.mjs +3 -4
  173. package/driver/publish/report-registry.mjs +7 -10
  174. package/driver/publish/seed-pool.mjs +3 -2
  175. package/driver/publish/shell.mjs +106 -0
  176. package/driver/publish/templates/report.css +9 -7
  177. package/driver/queue-order.mjs +4 -3
  178. package/driver/record-carry.mjs +0 -9
  179. package/driver/record-discard.mjs +1 -4
  180. package/driver/record-fold.mjs +3 -3
  181. package/driver/record-goods.mjs +79 -23
  182. package/driver/reference-score.mjs +2 -3
  183. package/driver/register-capabilities.mjs +0 -6
  184. package/driver/register-count.mjs +3 -2
  185. package/driver/register-digest-record.mjs +7 -7
  186. package/driver/register-fixture-marker.mjs +3 -3
  187. package/driver/register-plan.mjs +2 -2
  188. package/driver/register-records.mjs +2 -2
  189. package/driver/register-taint.mjs +3 -3
  190. package/driver/register-unit-record.mjs +48 -9
  191. package/driver/register-unreachable.mjs +4 -3
  192. package/driver/registry-fidelity.mjs +79 -34
  193. package/driver/repair-composers.mjs +14 -9
  194. package/driver/repair-digest.mjs +4 -6
  195. package/driver/repair-scope.mjs +3 -3
  196. package/driver/repair-targets.mjs +24 -9
  197. package/driver/repairs.mjs +44 -58
  198. package/driver/replay-archive.mjs +7 -7
  199. package/driver/report-card-record.mjs +3 -3
  200. package/driver/report-overview-record.mjs +4 -4
  201. package/driver/research-answers.mjs +38 -6
  202. package/driver/research-checks.mjs +4 -4
  203. package/driver/result-noun-fields.mjs +28 -11
  204. package/driver/review-addresses.mjs +163 -0
  205. package/driver/rule-shape.mjs +1 -1
  206. package/driver/run-delivered.mjs +340 -0
  207. package/driver/run-economics.mjs +8 -26
  208. package/driver/run-failed.mjs +545 -0
  209. package/driver/run-integrity.mjs +1 -1
  210. package/driver/run-outcome.mjs +314 -0
  211. package/driver/run-park.mjs +23 -0
  212. package/driver/run-quote.mjs +32 -0
  213. package/driver/run-record.mjs +352 -0
  214. package/driver/run-requirements.mjs +22 -0
  215. package/driver/run-shell.mjs +55 -0
  216. package/driver/runner.mjs +71 -33
  217. package/driver/saved-register-pages.mjs +4 -4
  218. package/driver/score-redaction.mjs +2 -2
  219. package/driver/search-policy.mjs +12 -13
  220. package/driver/settle-stamp.mjs +4 -3
  221. package/driver/skeptic-record.mjs +2 -2
  222. package/driver/skeptic-search.mjs +1 -1
  223. package/driver/skills/README.md +7 -7
  224. package/driver/skills/blind-frame/SKILL.md +1 -2
  225. package/driver/skills/case-law-citation/SKILL.md +9 -37
  226. package/driver/skills/case-law-citation/sources/courtlistener.md +1 -3
  227. package/driver/skills/case-law-citation/sources/eurlex.md +8 -11
  228. package/driver/skills/case-law-citation/sources/legaldatahunter.md +1 -1
  229. package/driver/skills/clearance-common-law/SKILL.md +45 -111
  230. package/driver/skills/clearance-common-law/perplexity-prompts.md +7 -79
  231. package/driver/skills/clearance-register/SKILL.md +15 -33
  232. package/driver/skills/clearance-register/digest.md +35 -96
  233. package/driver/skills/clearance-register/providers/clarivate.md +2 -2
  234. package/driver/skills/clearance-register/providers/corsearch.md +5 -5
  235. package/driver/skills/clearance-register/providers/euipo.md +1 -2
  236. package/driver/skills/clearance-register/providers/free-tier.md +0 -19
  237. package/driver/skills/clearance-register/providers/signa.md +6 -25
  238. package/driver/skills/clearance-register/providers/uspto-local.md +0 -24
  239. package/driver/skills/clearance-register/register-recipes.md +8 -15
  240. package/driver/skills/clearance-register/status-rules.md +6 -24
  241. package/driver/skills/clearance-register/unit.md +11 -20
  242. package/driver/skills/clearance-search/delivery-contract.md +24 -120
  243. package/driver/skills/clearance-search/field-doctrine-pharma.md +1 -5
  244. package/driver/skills/clearance-search/firm-wide-reasoning.md +24 -43
  245. package/driver/skills/clearance-search/phase2-execution.md +29 -77
  246. package/driver/skills/clearance-search/report-prose.md +3 -4
  247. package/driver/skills/clearance-search/risk-framework-demo.md +1 -1
  248. package/driver/skills/clearance-search/risk-framework-triage.manifest.json +3 -3
  249. package/driver/skills/clearance-search/risk-framework-triage.md +7 -9
  250. package/driver/skills/clearance-search/risk-framework.manifest.json +1 -1
  251. package/driver/skills/clearance-search/risk-framework.md +1 -1
  252. package/driver/skills/clearance-search/synthesis-rules.md +30 -107
  253. package/driver/skills/clearance-search/worked-examples.md +5 -5
  254. package/driver/skills/clearance-variants/SKILL.md +46 -45
  255. package/driver/skills/clearance-variants/transliteration-scripts.md +4 -4
  256. package/driver/skills/frame-diff/SKILL.md +1 -1
  257. package/driver/skills/knockout-assess/SKILL.md +6 -14
  258. package/driver/skills/knockout-frame/SKILL.md +1 -1
  259. package/driver/skills/matter-frame/SKILL.md +7 -12
  260. package/driver/skills/matter-frame/watchlist-reference.md +1 -4
  261. package/driver/skills/narrative-refutation/SKILL.md +20 -30
  262. package/driver/skills/placement-inquiry/SKILL.md +10 -20
  263. package/driver/skills-store-provenance.mjs +1 -1
  264. package/driver/stage-context.mjs +32 -35
  265. package/driver/stage-freshness.mjs +127 -11
  266. package/driver/stages-knockout.mjs +49 -22
  267. package/driver/stages.mjs +89 -288
  268. package/driver/status-snapshot.mjs +2 -1
  269. package/driver/steps/correction-cycle.mjs +311 -0
  270. package/driver/steps/corrections.mjs +644 -0
  271. package/driver/steps/delivery.mjs +1287 -0
  272. package/driver/steps/frame-comparison.mjs +927 -0
  273. package/driver/steps/intake.mjs +84 -0
  274. package/driver/steps/open-run.mjs +419 -0
  275. package/driver/steps/overview-and-cards.mjs +899 -0
  276. package/driver/steps/placement-and-digest.mjs +23 -0
  277. package/driver/steps/register-sweep.mjs +1563 -0
  278. package/driver/steps/skeptic-and-follow-up.mjs +836 -0
  279. package/driver/steps/synthesis.mjs +261 -0
  280. package/driver/steps/verdict-gate.mjs +968 -0
  281. package/driver/suite-census.json +456 -96
  282. package/driver/surface-exit-verdict.mjs +0 -8
  283. package/driver/synthesis-record.mjs +72 -6
  284. package/driver/terminal-clamp.mjs +10 -0
  285. package/driver/tokens.mjs +8 -62
  286. package/driver/tool-calls.mjs +2 -2
  287. package/driver/unexecuted-asserts.json +2 -2
  288. package/driver/unit-state-verdict.mjs +1 -1
  289. package/driver/usage-ledger.mjs +2 -1
  290. package/driver/verify-knockout.mjs +20 -35
  291. package/driver/verify.mjs +47 -36
  292. package/driver/web-grid.mjs +3 -4
  293. package/driver/whatif-memo-run.mjs +2 -2
  294. package/driver/whatif-queue.mjs +4 -3
  295. package/driver/withheld-families.mjs +14 -15
  296. package/driver/worker-heartbeat.mjs +3 -2
  297. package/driver/write-up-form.mjs +0 -3
  298. package/mcp-server/CHANGELOG.md +8 -0
  299. package/mcp-server/http-server.mjs +11 -12
  300. package/mcp-server/lib/brief.mjs +22 -4
  301. package/mcp-server/lib/events.mjs +2 -2
  302. package/mcp-server/lib/evidence.mjs +3 -2
  303. package/mcp-server/lib/findings.mjs +2 -1
  304. package/mcp-server/lib/knockout.mjs +9 -10
  305. package/mcp-server/lib/ops.mjs +9 -9
  306. package/mcp-server/lib/runs.mjs +9 -10
  307. package/mcp-server/lib/trace.mjs +1 -1
  308. package/mcp-server/lib/whatif.mjs +2 -3
  309. package/mcp-server/package.json +1 -1
  310. package/mcp-server/server.mjs +5 -5
  311. package/node_modules/buffers/package.json +1 -1
  312. package/package.json +2 -1
  313. package/portal-ui/dist/assets/{index-fPqAU0sx.js → index-CYaO2ygd.js} +26 -14
  314. package/portal-ui/dist/assets/{index-AtB9ZpDH.css → index-izLa9apq.css} +2 -2
  315. package/portal-ui/dist/index.html +4 -4
  316. package/portal-ui/package.json +3 -3
  317. package/providers/README.md +1 -1
  318. package/providers/_shared/answer-memory.mjs +4 -5
  319. package/providers/_shared/execute-plan.mjs +48 -1
  320. package/providers/_shared/records-from-search.mjs +46 -0
  321. package/providers/clarivate/README.md +2 -2
  322. package/providers/clarivate/src/adapter.js +147 -0
  323. package/providers/clarivate/src/core.js +1 -14
  324. package/{driver/engine/mcp/clarivate-server.mjs → providers/clarivate/src/mount.js} +5 -10
  325. package/providers/corsearch/README.md +3 -3
  326. package/providers/corsearch/src/adapter.js +80 -0
  327. package/providers/corsearch/src/core.js +14 -11
  328. package/{driver/engine/mcp/corsearch-server.mjs → providers/corsearch/src/mount.js} +5 -10
  329. package/providers/euipo/README.md +2 -2
  330. package/providers/euipo/src/adapter.js +85 -0
  331. package/providers/euipo/src/core.js +1 -1
  332. package/providers/euipo/src/euipo-client.js +1 -2
  333. package/{driver/engine/mcp/euipo-server.mjs → providers/euipo/src/mount.js} +5 -10
  334. package/providers/free-tier/README.md +2 -2
  335. package/providers/free-tier/src/adapter.js +127 -0
  336. package/{driver/engine/mcp/free-tier-server.mjs → providers/free-tier/src/mount.js} +5 -10
  337. package/providers/jx-subclass/coverage.mjs +1 -6
  338. package/providers/jx-subclass/score-truth.mjs +2 -1
  339. package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
  340. package/providers/oauth-mcp-bridge/package.json +1 -1
  341. package/providers/perplexity/src/core.js +2 -2
  342. package/providers/signa/README.md +2 -2
  343. package/providers/signa/src/adapter.js +157 -0
  344. package/providers/signa/src/capabilities.js +0 -3
  345. package/providers/signa/src/core.js +2 -2
  346. package/{driver/engine/mcp/signa-server.mjs → providers/signa/src/mount.js} +7 -12
  347. package/providers/signa/src/offices.generated.js +17 -15
  348. package/providers/uspto-local/README.md +1 -1
  349. package/providers/uspto-local/bin/verify-index.mjs +1 -1
  350. package/providers/uspto-local/src/adapter.js +75 -0
  351. package/{driver/engine/mcp/uspto-local-server.mjs → providers/uspto-local/src/mount.js} +5 -10
  352. package/scripts/band-shape-probe.mjs +2 -2
  353. package/scripts/citation-line-check.mjs +7 -7
  354. package/scripts/compare.mjs +1 -1
  355. package/scripts/dead-names.mjs +2 -2
  356. package/scripts/e2e-first-time.mjs +19 -7
  357. package/scripts/e2e.mjs +13 -13
  358. package/scripts/engine-probe.mjs +1 -1
  359. package/scripts/env-audit.mjs +7 -4
  360. package/scripts/env-classify.mjs +5 -1
  361. package/scripts/feedback-mint.mjs +1 -1
  362. package/scripts/freeze-example-run.mjs +7 -7
  363. package/scripts/mint-suite-census.mjs +2 -2
  364. package/scripts/nightly-notice.mjs +1 -1
  365. package/scripts/release-cut-decision.mjs +7 -2
  366. package/scripts/release-note-required.mjs +26 -9
  367. package/scripts/release-notes-lint.mjs +3 -2
  368. package/scripts/release-version-pr-checks.mjs +1 -1
  369. package/scripts/render-check.mjs +1 -1
  370. package/scripts/settings-render-check.mjs +23 -3
  371. package/scripts/test-run.mjs +5 -5
  372. package/scripts/travelling-predicates.mjs +1 -1
  373. package/scripts/undeclared-field-census.mjs +1 -1
  374. package/scripts/unexecuted-asserts.mjs +3 -3
  375. package/scripts/verify-publishable.mjs +1 -1
  376. package/shared/client-door.mjs +1 -1
  377. package/shared/connect-clients.mjs +1 -1
  378. package/shared/connector-signin-probe.mjs +1 -1
  379. package/shared/customer-store.mjs +3 -2
  380. package/shared/env-aliases.mjs +1 -1
  381. package/shared/invocation.mjs +14 -2
  382. package/shared/names-in-force.mjs +2 -0
  383. package/shared/register-selection.mjs +2 -2
  384. package/shared/store-in-repo.mjs +3 -3
  385. package/shared/summary-blocks.mjs +0 -3
  386. package/shared/trigger-lane.mjs +1 -1
  387. package/shared/vacuous-pass.mjs +2 -2
  388. package/shared/verb-shim.mjs +4 -2
  389. package/vendor/buffers/package.json +1 -1
  390. package/node_modules/exceljs/README.md +0 -3023
@@ -43,7 +43,7 @@ import {
43
43
  missingCredentials, preflightEngineBinary, providerIdFrom,
44
44
  } from "./driver.config.mjs";
45
45
  import {
46
- resolveAuthMode, billingMode, cloudsSwitchedOn, BILLING_MODES, CLOUD_SWITCH, CLOUD_CREDENTIAL_CHECK,
46
+ resolveAuthMode, billingMode, billingRefusalReason, cloudName,
47
47
  } from "./engine/auth.mjs";
48
48
  import { billingRefusalWords } from "./run-requirements.mjs"; // — a refusal that quotes the billing word says it by name
49
49
  import { CASELAW_BRIDGES } from "./engine/mcp/gather-config.mjs"; // — the list that decides what is spawned
@@ -91,7 +91,7 @@ export function engineInventory(env = process.env) {
91
91
  // set, reconstructed from the table so it cannot drift from it. Every other refusal (a cloud mode with
92
92
  // no cloud switched on or with two, a cloud switch beside a mode it contradicts, a word that is not a
93
93
  // mode) leaves `missing` empty, because the page reads `missing` as "set this key" and a key that is
94
- // set is not missing, and carries a `reason` the page words itself (billingRefusalReason, below).
94
+ // set is not missing, and carries a `reason` the page words itself (billingRefusalReason in engine/auth.mjs).
95
95
  const mode = billingMode(env);
96
96
  const keyAbsent = Boolean(spec?.apiKeyEnv) && String(env[spec.apiKeyEnv] ?? "") === "";
97
97
  if (mode === "api-key" && keyAbsent) {
@@ -137,79 +137,6 @@ export function engineInventory(env = process.env) {
137
137
  return { id, vendor: spec?.vendor ?? null, known: Boolean(spec), billing, binaryPresent, selected };
138
138
  }
139
139
 
140
- /**
141
- * What a reader calls the account a cloud mode bills: "Google Cloud", "Microsoft Azure", "Amazon Bedrock"
142
- * or "Gateway". Null for no cloud.
143
- *
144
- * ONE TABLE OF CLOUD NAMES, NOT TWO. `CLOUD_CREDENTIAL_CHECK` in engine/auth.mjs already names each cloud
145
- * the way a reader knows it, for the advice a refused sign-in prints, and this reads it rather than keeping
146
- * a second list that could name a cloud differently on the page. It writes the gateway "the gateway", for
147
- * use inside a sentence; a label on a page drops the article and starts with a capital, and that one
148
- * adjustment is the whole of what this adds.
149
- */
150
- export function cloudName(cloud) {
151
- const who = CLOUD_CREDENTIAL_CHECK[cloud]?.who;
152
- if (!who) return null;
153
- const bare = who.replace(/^the /, "");
154
- return bare.charAt(0).toUpperCase() + bare.slice(1);
155
- }
156
-
157
- /**
158
- * WHY A BILLING SETTING REFUSES EVERY SEARCH, as data: which refusal it is and the names involved, so the
159
- * config page words it once, in plain English, without reading the resolver's sentence apart.
160
- *
161
- * `kind` is one of:
162
- * switch-beside-mode subscription or api-key, and a cloud's switch on beside it (`clouds`)
163
- * two-clouds cloud, and more than one cloud switched on (`clouds`)
164
- * no-cloud cloud, and no cloud switched on and no gateway address (`clouds` lists every
165
- * switch, and `gateway` the gateway's setting, as the choices to make)
166
- * not-a-mode a word that is not a billing mode (`modes` are the ones this engine takes)
167
- * cloud-on-codex cloud, on the Codex engine, which a cloud account cannot pay for (`engineSetting`
168
- * and `engineChoice` name the Claude engine only where it would pay: one cloud
169
- * switched on, or none and a gateway address; otherwise that move is one more refusal)
170
- * unclassified a refusal this list does not name; the page says only that searches are refused.
171
- * Not "other": that is an assistant's id in connect-clients.mjs, and a surface may
172
- * not name one in code
173
- *
174
- * `defaulted` says the billing setting is blank, so `subscription` is the default and not a word anybody
175
- * wrote: a page that said "payment is set to subscription" would send a reader looking for a line their
176
- * settings file does not have. It is the state measured on Foundry, a switch on and the word unset.
177
- *
178
- * THE SAME PREDICATES AS THE RESOLVER, IN ITS ORDER. `resolveAuthMode` refuses by throwing a sentence and
179
- * nothing else, so the kind is read back from the same environment through the same functions it uses
180
- * (`billingMode`, `cloudsSwitchedOn`), in the order it checks them. Called only once it has thrown.
181
- *
182
- * NAMES, NEVER A VALUE. `mode` is sent only when it is one of the three modes; the word in a `not-a-mode`
183
- * refusal is whatever was typed, and it is not sent at all.
184
- */
185
- export function billingRefusalReason(id, env = process.env) {
186
- const mode = billingMode(env);
187
- const setting = "CLEAROTRON_AI_BILLING";
188
- const clouds = (ids) => ids.map((c) => ({ name: cloudName(c), setting: CLOUD_SWITCH[c] }));
189
- const defaulted = String(env[setting] ?? "").trim() === "";
190
- const base = { setting, mode: null, defaulted, clouds: [], modes: [], gateway: null, engineSetting: null, engineChoice: null };
191
- if (id === "openai-agent") {
192
- if (mode === "cloud") {
193
- // The resolver's own test for a cloud the Claude engine would pay through, in its words: one switch,
194
- // or no switch and a gateway address.
195
- const on = cloudsSwitchedOn(env);
196
- const claudeWouldPay = on.length === 1 || (!on.length && Boolean(env.ANTHROPIC_BASE_URL));
197
- return { ...base, kind: "cloud-on-codex", mode, modes: ["subscription", "api-key"],
198
- ...(claudeWouldPay ? { engineSetting: "CLEAROTRON_AI", engineChoice: "anthropic-agent" } : {}) };
199
- }
200
- if (mode !== "subscription" && mode !== "api-key") return { ...base, kind: "not-a-mode", modes: ["subscription", "api-key"] };
201
- }
202
- if (id === "anthropic-agent") {
203
- const on = cloudsSwitchedOn(env);
204
- if ((mode === "subscription" || mode === "api-key") && on.length) return { ...base, kind: "switch-beside-mode", mode, clouds: clouds(on) };
205
- if (mode === "cloud" && on.length > 1) return { ...base, kind: "two-clouds", mode, clouds: clouds(on) };
206
- if (mode === "cloud" && !on.length) {
207
- return { ...base, kind: "no-cloud", mode, clouds: clouds(Object.keys(CLOUD_SWITCH)), gateway: "ANTHROPIC_BASE_URL" };
208
- }
209
- if (!BILLING_MODES.includes(mode)) return { ...base, kind: "not-a-mode", modes: [...BILLING_MODES] };
210
- }
211
- return { ...base, kind: "unclassified", mode: BILLING_MODES.includes(mode) ? mode : null };
212
- }
213
140
 
214
141
  /**
215
142
  * The three states an install can be in, as far as running a search goes..
@@ -490,10 +417,10 @@ export function caseLawInventory(env = process.env) {
490
417
  // NOBODY TO ASK, SO SAY WHAT IS TRUE INSTEAD: the source is optional. This sent the reader to
491
418
  // "whoever provisioned the bridge", and an install of one's own has nobody in that role (measured on
492
419
  // a fresh install of a beta, 2026-11-04). Without it a Full country search runs and discloses the gap.
493
- : `Optional, and not set up. This build records no site to create an account at. A Full country `
494
- + `search runs without it, and its report discloses the case-law gap instead of reporting no `
495
- + `adverse case law. With an account, follow providers/oauth-mcp-bridge/README.md, which ends by `
496
- + `writing ${tokenFile}.`,
420
+ // NOR ASK FOR AN ACCOUNT IT CANNOT NAME A SITE FOR (measured in a stranger walk of a beta, 2026-11-10): the
421
+ // account sentence goes until the product can name where one is made.
422
+ : `Optional, and not set up. A Full country search runs without it, and its report discloses the case-law `
423
+ + `gap instead of reporting no adverse case law.`,
497
424
  };
498
425
  });
499
426
 
@@ -26,6 +26,7 @@
26
26
 
27
27
  import { appendFileSync, readFileSync, readdirSync } from "node:fs";
28
28
  import { join } from "node:path"; import { studioDirFor } from "../shared/pre-rename-spellings.mjs";
29
+ import { readJson } from "./run-record.mjs";
29
30
 
30
31
  /** Where the consumption ledger sits: beside the matter ledger, in the studio dir. */
31
32
  export function consumptionLedgerPath(studioRoot) {
@@ -94,7 +95,7 @@ export function recordRunConsumption(ctx, { phase, tokens = null, providerUsage
94
95
  // startedAt comes from the run's own status.json rather than ctx: it is written once at seed and
95
96
  // survives a resume, so a run that postponed and came back still measures wall from its true start.
96
97
  let startedAt = null;
97
- try { startedAt = JSON.parse(readFileSync(join(run.runDir, "status.json"), "utf8"))?.startedAt ?? null; }
98
+ try { startedAt = readJson(join(run.runDir, "status.json"))?.startedAt ?? null; }
98
99
  catch { /* no status yet — the row simply carries no wall figure */ }
99
100
  return recordConsumption({
100
101
  studioRoot: run.studioRoot,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "_README": [
3
- "#850 E2 arm 2 — 'a declared element no validator token speaks about'. THE RATCHET BASELINE.",
3
+ "E2 arm 2 — 'a declared element no validator token speaks about'. THE RATCHET BASELINE.",
4
4
  "Per stage, carrying the ELEMENT NAMES: this file IS the audit object, not a bare count, so a plateau",
5
5
  "is legible per stage and a reader can see WHICH elements no validator polices.",
6
6
  "CI fails on any PER-STAGE INCREASE (driver/test/contract-audit.test.mjs) — a new unpoliced element in",
@@ -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": 105,
14
+ "total": 104,
15
15
  "byStage": {
16
16
  "matter-frame": [
17
17
  "### Intake asks line shape — rendered by the driver from intake_asks[]",
@@ -56,7 +56,6 @@
56
56
  ],
57
57
  "common-law": [
58
58
  "BATCHING — split the keys into ceil(N/batch) batches of <=batch variants and concatenate the matrices",
59
- "Grid program receipt — paste the SANDBOX PROGRAM block from the tool result verbatim into the audit trail",
60
59
  "INSTRUCTED CHECKS — execute each as part of the sweep, or state honestly why it could not run",
61
60
  "INSTRUCTED CHECKS — the ask text the requester wrote, quoted back in the findings file with its receipt",
62
61
  "Summary section — Perplexity calls executed, mandatory platforms covered N/N, findings surfaced, open flags",
@@ -157,6 +157,11 @@ export const TOOL_ORDER_BACKLOG = [
157
157
  + "spine's digest doctrine moves wholly into digest.md, or #865 scopes shared-spine text per seat — "
158
158
  + "and NOT by granting it: the funnel must never hold a writer into judgment's findings document, "
159
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." },
160
165
  { stage: "skeptic", tool: "perplexity_research", site: "driver/skills/clearance-search/phase2-execution.md",
161
166
  closes: "#865 — skeptic holds NO retrieval tool ('new search work enters via the escalation lane, never "
162
167
  + "from this seat' — it converted to the RECORDING category, gaining record_skeptic plus the "
@@ -157,7 +157,7 @@ export const E3_BACKLOG = [
157
157
  },
158
158
  // ── DISCHARGED 2026-08-17 by, and the row said this could not happen ──────────────────────────
159
159
  //
160
- // It read: stage "blind-frame", where "driver/stages.mjs:981", evidence "Emit the STRUCTURED model
160
+ // It read: stage "blind-frame", where "driver/stages.mjs:780", evidence "Emit the STRUCTURED model
161
161
  // (dictated keys + closed enums per the skill). It is your ONLY output file — do NOT write a prose
162
162
  // companion.", reparsedBy "verify.mjs validators.blindFrame …", removedByMove **"NOTHING ON THE PLAN
163
163
  // REMOVES THIS"**.
@@ -171,7 +171,7 @@ export const E3_BACKLOG = [
171
171
  {
172
172
  stage: "common-law",
173
173
  kind: "dictated-line-shape",
174
- where: "driver/stages.mjs:1135 (emitted at 1918, 1947, 2127, 2347)",
174
+ where: "driver/stages.mjs:954 (emitted at 1918, 1947, 2127, 2347)",
175
175
  surface: "stage-message",
176
176
  evidence: "CROSS-CHECK HAND-OFF: … record it on its OWN line in EXACTLY the form \"CROSS-CHECK REQUIRED: <what> — <why>\" (that exact prefix; an em-dash between what and why; name the mark in CAPS in <what>). The driver parses ONLY this exact line shape…",
177
177
  reparsedBy: "driver/doubt-ledger.mjs:183 CROSS_CHECK_RE = /^(?:[-*]\\s+)?CROSS-CHECK REQUIRED:\\s*(.+?)\\s+—\\s+(.+?)\\s*$/ → mintCrossCheckDoubts",
@@ -218,7 +218,7 @@ export const E3_BACKLOG = [
218
218
  {
219
219
  stage: "common-law",
220
220
  kind: "dictated-line-shape",
221
- where: "driver/skills/clearance-common-law/SKILL.md:186 (restated at driver/skills/clearance-search/synthesis-rules.md:392)",
221
+ where: "driver/skills/clearance-common-law/SKILL.md:186 (restated at driver/skills/clearance-search/synthesis-rules.md)",
222
222
  surface: "skill-file",
223
223
  evidence: "A clean PR/connotation row MUST cite its search — add a `**Connotation-search source:** <URL | \"perplexity_research — no result\">` line.",
224
224
  reparsedBy: "driver/connotation-search.mjs — validators.commonLaw rejects a clean claim with no such line (connotation_search_missing); the hint is re-dictated by correctionHint() in gateway.mjs",
@@ -227,7 +227,7 @@ export const E3_BACKLOG = [
227
227
  {
228
228
  stage: "common-law",
229
229
  kind: "dictated-line-shape",
230
- where: "driver/stages.mjs:1063 and driver/stages.mjs:1068 (the no-grid-spec legacy branch)",
230
+ where: "driver/stages.mjs:862 and driver/stages.mjs:867 (the no-grid-spec legacy branch)",
231
231
  surface: "stage-message",
232
232
  evidence: "GRID KEYS (the validator checks EXACTLY these N terms — use each VERBATIM as its Negative-results matrix key…) … MACHINE RECEIPTS (MANDATORY): save the grid call's stdout JSON VERBATIM … the single stdout object, or a JSON ARRAY of the per-batch stdout objects in batch order when batched.",
233
233
  reparsedBy: "driver/common-law-receipts.mjs — the receipts gate's exact identity join on the dictated key list; validators.commonLaw grid-completeness arm",
@@ -256,7 +256,7 @@ export const E3_BACKLOG = [
256
256
  {
257
257
  stage: "register-unit",
258
258
  kind: "literal-json-skeleton",
259
- where: "driver/stages.mjs:2338 (the non-supplemental-lane branch)",
259
+ where: "driver/stages.mjs:2135 (the non-supplemental-lane branch)",
260
260
  surface: "stage-message",
261
261
  evidence: "BAND ARTIFACT (MANDATORY): ALSO write the COMPLETE NAMED BAND for this axis to <path> — a JSON ARRAY, one block per register_enumerate / count-probe call, in the named-band contract: {\"state\":\"enumerated\",\"query\":\"<what was searched>\",\"total_hits\":N,\"records\":[{record_id, mark_text, classes, status,",
262
262
  reparsedBy: "driver/named-band.mjs parseNamedBand / bandRecords / bandCrowds / mergeNamedBands (named in driver/skills/clearance-register/unit.md:60-62); validators.registerUnit",
@@ -265,7 +265,7 @@ export const E3_BACKLOG = [
265
265
  {
266
266
  stage: "register-unit",
267
267
  kind: "exactly-these-keys",
268
- where: "driver/stages.mjs:2303",
268
+ where: "driver/stages.mjs:2100",
269
269
  surface: "stage-message",
270
270
  evidence: "Every block you append MUST carry \"state\":\"enumerated\" (ONLY if you paged it to has_more:false) or \"state\":\"incomplete\" — EXACTLY those two strings; there is no \"verified\"/\"checked\"/\"complete\"/\"clean\" state, and any other value fails the stage.",
271
271
  reparsedBy: "driver/named-band.mjs parseNamedBand (off-enum state fails validators.registerUnit)",
@@ -283,7 +283,7 @@ export const E3_BACKLOG = [
283
283
  {
284
284
  stage: "register-unit",
285
285
  kind: "exactly-these-keys",
286
- where: "driver/stages.mjs:4309 (the frame-reopen / scoped-retry message builder). A second number stood here and had been stale for some time: it pointed at a contract-element description rather than a builder, at its old line and at every mechanical shift of it. Two candidate builders sit beside 4164 and picking one would be a guess, so the wrong pointer is removed rather than moved a third time — one accurate citation beats one accurate and one invented.",
286
+ where: "driver/stages.mjs:4110 (the frame-reopen / scoped-retry message builder). A second number stood here and had been stale for some time: it pointed at a contract-element description rather than a builder, at its old line and at every mechanical shift of it. Two candidate builders sit beside 4164 and picking one would be a guess, so the wrong pointer is removed rather than moved a third time — one accurate citation beats one accurate and one invented.",
287
287
  surface: "stage-message",
288
288
  evidence: "Every block you append MUST carry \"state\":\"enumerated\" (ONLY if paged to has_more:false) or \"state\":\"incomplete\" — EXACTLY those two strings … (re-dispatch builders, which REPLACE def.message)",
289
289
  reparsedBy: "driver/named-band.mjs parseNamedBand. Scope warning: these builders replace def.message on every escalation / envelope-close / frame-reopen dispatch, so an E3 lint that walks STAGES[*].message only never sees them",
@@ -292,7 +292,7 @@ export const E3_BACKLOG = [
292
292
  {
293
293
  stage: "placement-inquiry",
294
294
  kind: "literal-json-skeleton",
295
- where: "driver/stages.mjs:2359-2353",
295
+ where: "driver/stages.mjs:2292-2293",
296
296
  surface: "stage-message",
297
297
  evidence: "PLACEMENT FORM (MANDATORY): record every placement in <path> — {\"rows\":[…]} … · A REGISTER candidate: {\"select\":\"<one record URI it holds>\",\"tier\":\"…\",\"reason\":\"…\"} (+ optional \"borderline\":true) … · A COMMON-LAW candidate …: {\"kind\":\"seat\",\"mark\",\"owner\",\"jurisdiction\",\"records\":[],\"tier\",\"reason\"}",
298
298
  reparsedBy: "driver/placement-form.mjs (SELECT_ROW_FIELDS at placement-form.mjs:93, the seat-row contract SEAT_ROW_CONTRACT, formRowKey/rowIsSettled/renderEntry) via validators.placement. The same field list is ALSO carried in the driver-written form's own seat_row_contract, so the shape exists twice",
@@ -301,25 +301,19 @@ export const E3_BACKLOG = [
301
301
  {
302
302
  stage: "placement-inquiry",
303
303
  kind: "exactly-these-keys",
304
- where: "driver/stages.mjs:2499",
304
+ where: "driver/stages.mjs:2296",
305
305
  surface: "stage-message",
306
306
  evidence: "· tier EXACTLY one of headline-candidate / sheet-2 / watchlist-annex / out-of-scope-filtered.",
307
307
  reparsedBy: "driver/placement-form.mjs / driver/placement-model.mjs via validators.placement",
308
308
  removedByMove: "NOTHING ON THE #850 PLAN REMOVES THIS",
309
309
  },
310
- {
311
- stage: "placement-inquiry",
312
- kind: "exactly-these-keys",
313
- where: "driver/skills/placement-inquiry/SKILL.md:58-66",
314
- surface: "skill-file",
315
- evidence: "**2. The structured mirror** `…/placements.json` … `{\"schema_version\":1,\"placements\":[...]}`, ONE object per placed candidate, keys EXACTLY `{\"mark\",\"owner\",\"jurisdiction\",\"records\",\"tier\",\"reason\"}` plus the optional `\"borderline\"` … `tier` — EXACTLY one of `headline-candidate` / `sheet-2` / `watch",
316
- reparsedBy: "driver/placement-model.mjs. AND IT IS STALE: #562 made placements.json driver-rendered, and placement-inquiry's message in stages.mjs says \"DO NOT WRITE placements.json (the driver renders it from this form)\" — the skill file the stage is ordered to \"read and follow exactly\" dictates the key set of a file the message forbids it to write. Two contracts in one dispatch",
317
- removedByMove: "NOTHING ON THE #850 PLAN REMOVES THIS",
318
- },
310
+ // placement-inquiry "exactly-these-keys" in the skill file — DELETED with its dictation, 2026-11-11. The row quoted
311
+ // the manual's "structured mirror" key list for placements.json. The manual now describes the placement form the
312
+ // step fills in and says the driver renders placements.json from it, so the skill file dictates no key list.
319
313
  {
320
314
  stage: "placement-inquiry",
321
315
  kind: "dictated-line-shape",
322
- where: "driver/skills/placement-inquiry/SKILL.md:42",
316
+ where: "driver/skills/placement-inquiry/SKILL.md:38",
323
317
  surface: "skill-file",
324
318
  evidence: "Use these section headings, in this order: **Band reconciliation** …, the four placement tiers (**Headline candidates**, **Sheet 2 / register watch**, **Watchlist annex**, **Out-of-scope / filtered**), **Disagreements / flags surfaced to downstream**, **Coverage rulings & open questions** …, and **O",
325
319
  reparsedBy: "driver/pipeline.mjs — the PLACEMENT RULINGS TAIL block handed to register-digest is lifted from these named sections (register-digest's message in stages.mjs references it); driver/skills/clearance-register/digest.md:342-352 re-parses the Disagreements section into its own table",
@@ -347,7 +341,7 @@ export const E3_BACKLOG = [
347
341
  // (coverage-form.mjs coverageFormBrief) and the tool schema, with every row receiver-validated at
348
342
  // call time. Same dictated vocabulary, same authored site, new route — this row's evidence follows
349
343
  // the dictation so the row keeps describing something that exists.
350
- where: "driver/stages.mjs:2710 (the digest message) + driver/coverage-form.mjs (coverageFormBrief — the dispatch block carrying the enum and the row shape)",
344
+ where: "driver/stages.mjs:2507 (the digest message) + driver/coverage-form.mjs (coverageFormBrief — the dispatch block carrying the enum and the row shape)",
351
345
  surface: "stage-message",
352
346
  evidence: "Record a \"status\" and a \"reason\" on EVERY row ONLY by calling the … tool — the driver validates each row as it arrives, holds the record itself, and renders both the ## Coverage ledger table and the coverage JSON from it",
353
347
  reparsedBy: "driver/coverage-call.mjs validateCoverageCall (receiver-validated at call time, the same predicates the gate judges with) + driver/coverage-form.mjs rowIsSettled via validators.registerFindings over the _driver/ accumulator",
@@ -430,7 +424,7 @@ export const E3_BACKLOG = [
430
424
  {
431
425
  stage: "frame-diff",
432
426
  kind: "exactly-these-keys",
433
- where: "driver/stages.mjs:2878",
427
+ where: "driver/stages.mjs:2675",
434
428
  surface: "stage-message",
435
429
  evidence: "For each blind-model variant / field / source the run did NOT scope or search, emit one directive {layer, item, observation, severity} … severity = dominant-element (the omission is ON the spine) | material (a real omission worth a targeted sweep) | minor (already covered, or presentation only).",
436
430
  reparsedBy: "driver/verify.mjs validators.frameDiff + driver/pipeline.mjs runSupplementalSweeps (the parser REFUSES a firing variant directive that dictates nothing dispatchable)",
@@ -454,7 +448,7 @@ export const E3_BACKLOG = [
454
448
  {
455
449
  stage: "synthesis",
456
450
  kind: "literal-json-skeleton",
457
- where: "driver/stages.mjs:3259",
451
+ where: "driver/stages.mjs:3059",
458
452
  surface: "stage-message",
459
453
  evidence: "MACHINE FINDINGS (MANDATORY): … a JSON OBJECT {\"schema_version\":<FINDINGS_SCHEMA_VERSION>,\"rated_under_framework\":\"…\",\"findings\":[...],\"coverage\":[...],\"context_notes\":[...],\"actions\":[...],\"ask_answers\":[...]} … Each finding object has EXACTLY these keys: {\"ordinal\",\"mark\",\"owner\",\"band\",\"net\",\"bor",
460
454
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson via validators.narrative",
@@ -468,7 +462,7 @@ export const E3_BACKLOG = [
468
462
  {
469
463
  stage: "synthesis",
470
464
  kind: "exactly-these-keys",
471
- where: "driver/stages.mjs:3292",
465
+ where: "driver/stages.mjs:3092",
472
466
  surface: "stage-message",
473
467
  evidence: "- off_field_ground (MANDATORY on every off-field finding, FORBIDDEN on every other disposition): EXACTLY one bare token of: ${OFF_FIELD_GROUNDS.join(\" / \")}",
474
468
  reparsedBy: "driver/findings-model.mjs validateOffFieldGround — the enum is imported from findings-model.mjs and interpolated back into the prompt, so code already holds the list it asks the model to type",
@@ -477,7 +471,7 @@ export const E3_BACKLOG = [
477
471
  {
478
472
  stage: "synthesis",
479
473
  kind: "literal-json-skeleton",
480
- where: "driver/stages.mjs:3293",
474
+ where: "driver/stages.mjs:3093",
481
475
  surface: "stage-message",
482
476
  evidence: "- manageable …: {\"category\":\"<EXACTLY one of large-competitor / commercial-partner / troll / well-known-enforcer>\",\"reason\":\"<one-two lines…>\"}",
483
477
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
@@ -486,16 +480,16 @@ export const E3_BACKLOG = [
486
480
  {
487
481
  stage: "synthesis",
488
482
  kind: "literal-json-skeleton",
489
- where: "driver/stages.mjs:3309",
483
+ where: "driver/stages.mjs:3109",
490
484
  surface: "stage-message",
491
485
  evidence: "- meters: {\"mark_similarity\":{...},\"goods_proximity\":{...},\"use\":{...},\"enforcer\":{...}} — all four present, each {\"token\",\"basis\",\"source\"}. … mark_similarity = high | medium | low. goods_proximity = high | medium | low. enforcer = high | medium | low | unknown. use = confirmed | not-confirmed | un",
492
- reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson; driver/verify.mjs:1181 checkFindingsSibling gates meters.*.source; finding_basis_source_missing",
486
+ reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson; driver/verify.mjs:1192 checkFindingsSibling gates meters.*.source; finding_basis_source_missing",
493
487
  removedByMove: "NOTHING ON THE #850 PLAN REMOVES THIS",
494
488
  },
495
489
  {
496
490
  stage: "synthesis",
497
491
  kind: "literal-json-skeleton",
498
- where: "driver/stages.mjs:3310",
492
+ where: "driver/stages.mjs:3110",
499
493
  surface: "stage-message",
500
494
  evidence: "- quadrant: {\"x\",\"y\"} numbers in [0,1]. x = goods/services proximity (0 = distant, 1 = identical). y = mark similarity (0 = distinct, 1 = identical).",
501
495
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
@@ -504,7 +498,7 @@ export const E3_BACKLOG = [
504
498
  {
505
499
  stage: "synthesis",
506
500
  kind: "literal-json-skeleton",
507
- where: "driver/stages.mjs:3311",
501
+ where: "driver/stages.mjs:3111",
508
502
  surface: "stage-message",
509
503
  evidence: "- source: {\"source_type\",\"resolved_link\"}. source_type EXACTLY one of: register-vendor / register-euipo / common-law-marketplace / common-law-web / case-law",
510
504
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
@@ -513,7 +507,7 @@ export const E3_BACKLOG = [
513
507
  {
514
508
  stage: "synthesis",
515
509
  kind: "exactly-these-keys",
516
- where: "driver/stages.mjs:3312",
510
+ where: "driver/stages.mjs:3112",
517
511
  surface: "stage-message",
518
512
  evidence: "coverage[]: ONE object per coverage AREA, EXACTLY {\"area\",\"state\",\"note\"}. … state EXACTLY one of: confirmed-clean / coverage-limited / open / not-searched / note.",
519
513
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson; the render owns the coverage panel from these typed states",
@@ -522,7 +516,7 @@ export const E3_BACKLOG = [
522
516
  {
523
517
  stage: "synthesis",
524
518
  kind: "literal-json-skeleton",
525
- where: "driver/stages.mjs:3321",
519
+ where: "driver/stages.mjs:3121",
526
520
  surface: "stage-message",
527
521
  evidence: "use_check = {\"source\",\"quality\",\"question\"}: … quality: OPTIONAL, EXACTLY one of owner-site / independent / register-mirror … own_rights = {\"source\"}",
528
522
  reparsedBy: "driver/verify.mjs checkFindingsSibling (finding_use_check_missing); driver/own-rights.mjs:19-22",
@@ -531,7 +525,7 @@ export const E3_BACKLOG = [
531
525
  {
532
526
  stage: "synthesis",
533
527
  kind: "literal-json-skeleton",
534
- where: "driver/stages.mjs:3378",
528
+ where: "driver/stages.mjs:3178",
535
529
  surface: "stage-message",
536
530
  evidence: "MARK ASSESSMENT … STRUCTURED FORM …: either field may instead be an OBJECT {\"read\":\"…\",\"spectrum\":\"…\",\"per_class\":[{\"class\":\"5\",\"note\":\"…\"}],\"per_market\":[{\"market\":\"CN\",\"note\":\"…\"}],\"counter_registrations\":[{\"mark\":\"…\",\"uri\":\"/mark/…\",\"note\":\"…\"}],\"acquired\":\"<optional>\",\"note\":\"<optional residual>",
537
531
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson; the report collapses the rows behind toggles and the audit workbook renders them",
@@ -540,7 +534,7 @@ export const E3_BACKLOG = [
540
534
  {
541
535
  stage: "synthesis",
542
536
  kind: "literal-json-skeleton",
543
- where: "driver/stages.mjs:3384",
537
+ where: "driver/stages.mjs:3184",
544
538
  surface: "stage-message",
545
539
  evidence: "FOUR ANSWERS …: \"four_answers\": {\"third_party_rights\":{...},\"objection_likelihood\":{...},\"registrability\":{...},\"client_enforceability\":{...}} … Each answer … is {\"read\":\"…\",\"token\":\"…\",\"basis\":\"…\",\"ordinals\":[…]}. Tokens (closed enums …): third_party_rights = strong|moderate|weak; objection_likelih",
546
540
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
@@ -549,7 +543,7 @@ export const E3_BACKLOG = [
549
543
  {
550
544
  stage: "synthesis",
551
545
  kind: "literal-json-skeleton",
552
- where: "driver/stages.mjs:3231",
546
+ where: "driver/stages.mjs:3190",
553
547
  surface: "stage-message",
554
548
  evidence: "ACTIONS REGISTER …: emit \"actions\": [...] — ONE object per forward step …, each EXACTLY {\"id\",\"kind\",\"text\",\"ordinals\"} plus an OPTIONAL \"deadline\" and an OPTIONAL \"condition\". … kind: EXACTLY one of — consent / coexistence-agreement / territorial-delimitation / goods-amendment / mark-modification /",
555
549
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson; pipeline applyCoverageFloor legalActions arm derives the delivered disposition from the closed kind enum",
@@ -558,7 +552,7 @@ export const E3_BACKLOG = [
558
552
  {
559
553
  stage: "synthesis",
560
554
  kind: "exactly-these-keys",
561
- where: "driver/stages.mjs:3391",
555
+ where: "driver/stages.mjs:3191",
562
556
  surface: "stage-message",
563
557
  evidence: "COVERAGE JUDGMENT …: emit \"coverage_judgment\": {\"sufficient\":<bool>, \"reason\":\"<one line…>\"} — EXACTLY those two keys. Do NOT emit \"rows\": the driver writes that register itself … anything you type there is replaced wholesale.",
564
558
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson. The \"Do NOT emit rows\" clause is the purest E3 case in the tree — the prompt names a field, dictates its shape and states in the same breath that code overwrites it",
@@ -567,7 +561,7 @@ export const E3_BACKLOG = [
567
561
  {
568
562
  stage: "synthesis",
569
563
  kind: "literal-json-skeleton",
570
- where: "driver/stages.mjs:3237",
564
+ where: "driver/stages.mjs:3037",
571
565
  surface: "stage-message",
572
566
  // RE-QUOTED, NOT PARKED. The writer's conversion reworded this dictation — the
573
567
  // ask answers ride the findings RECORD now and the driver renders the labelled line into both the
@@ -588,28 +582,10 @@ export const E3_BACKLOG = [
588
582
  // it sat in the anchor-not-found slice — where a DEAD row is invisible, because that bucket is for
589
583
  // un-anchorable quotes over live dictations. stage-message 31 -> 30 and the unresolved list 5 -> 4 in
590
584
  // this commit for the same reason.
591
- {
592
- stage: "synthesis",
593
- kind: "dictated-line-shape",
594
- where: "driver/stages.mjs:3155 (restated at driver/skills/clearance-search/synthesis-rules.md:426)",
595
- surface: "stage-message",
596
- evidence: "END that finding's actual-use line with a literal \"- **Use-check source:** <result URL | \"perplexity_research — no result\">\" line",
597
- reparsedBy: "driver/verify.mjs validators.narrative (spec-11 hard reject); the repair hint re-dictates the literal in correctionHint() in gateway.mjs",
598
- removedByMove: "NOTHING ON THE #850 PLAN REMOVES THIS",
599
- },
600
- {
601
- stage: "synthesis",
602
- kind: "dictated-line-shape",
603
- where: "driver/stages.mjs:3168 (restated at driver/skills/clearance-search/synthesis-rules.md:473)",
604
- surface: "stage-message",
605
- evidence: "END that finding's reasoning with a literal \"- **Own-rights source:** <record URI(s) | \"no applicant-owned registrations in the searched register material\">\" line",
606
- reparsedBy: "driver/own-rights.mjs, in its header — \"This module only requires the 'Own-rights source:' line to exist\"; repair hint in correctionHint() in gateway.mjs (the `own_rights_missing` branch; re-verified 2026-08-29 — the old :1736 predated this branch and pointed into the A4 repeat-signature block)",
607
- removedByMove: "NOTHING ON THE #850 PLAN REMOVES THIS",
608
- },
609
585
  {
610
586
  stage: "synthesis",
611
587
  kind: "exactly-these-keys",
612
- where: "driver/stages.mjs:3370",
588
+ where: "driver/stages.mjs:3170",
613
589
  surface: "stage-message",
614
590
  evidence: "add it to the top-level \"context_notes\" array — each object EXACTLY {\"type\":\"famous-neighbour-ungrounded\",\"mark\",\"owner\",\"context\"}",
615
591
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
@@ -618,7 +594,7 @@ export const E3_BACKLOG = [
618
594
  {
619
595
  stage: "synthesis",
620
596
  kind: "literal-json-skeleton",
621
- where: "driver/stages.mjs:3261",
597
+ where: "driver/stages.mjs:3061",
622
598
  surface: "stage-message",
623
599
  evidence: "- owner: {\"name\",\"country\",\"registrations\":[...]}. … Each registration: {\"uri\", optionally \"classes\":[\"9\",\"41\"],\"status\",\"filed\",\"expiry\",\"jurisdiction\"}. The \"uri\" is the ONLY field that matters: the driver BINDS classes/status/filed/expiry/jurisdiction AND the owner name from the FETCHED record ke",
624
600
  reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson + the record-binding join. Six of the seven keys are stated in the prompt and overwritten by code in the same sentence",
@@ -627,7 +603,7 @@ export const E3_BACKLOG = [
627
603
  {
628
604
  stage: "case-law",
629
605
  kind: "literal-json-skeleton",
630
- where: "driver/stages.mjs:3548",
606
+ where: "driver/stages.mjs:3348",
631
607
  surface: "stage-message",
632
608
  evidence: "ALSO write the RETRIEVAL RECORD to <path> — a JSON OBJECT with EXACTLY these keys: {\"schema_version\":2,\"queries\":[{\"query\":\"<the search you dispatched, verbatim>\",\"jurisdiction\":\"…\",\"results\":<how many hits it returned, or null when the query never reached a source — never 0 for a query you could not send>}, …],\"citations\":[{\"proceeding\":\"…\",\"forum\":\"…\",\"jurisdiction\":\"…\",\"decided\":\"…\"",
633
609
  reparsedBy: "driver/verify.mjs validators.caseLaw — the ledger arm, armed by the stage-contract marker `citations` (the case-law stage's `contract: { citations: 1 }` in stages.mjs)",
@@ -636,7 +612,7 @@ export const E3_BACKLOG = [
636
612
  {
637
613
  stage: "case-law",
638
614
  kind: "dictated-line-shape",
639
- where: "driver/stages.mjs:3556",
615
+ where: "driver/stages.mjs:3356",
640
616
  surface: "stage-message",
641
617
  evidence: "EVERY \"Grounded profile\" section MUST start its body with the line \"- ord: <N>\" naming which finding it grounds (use the ordinal from this list; a profile that grounds no listed finding omits the line)",
642
618
  reparsedBy: "driver/publish/parse.mjs:339, parseCaseLawProfiles() in parse.mjs (\"the optional '- ord: <N>' first body line … gives an EXACT join\"); driver/findings-model.mjs:274 /^-\\s*ord:\\s*(\\d+)\\s*$/m; driver/publish/index.mjs publishReport (joinCaseLawProfiles)",
@@ -645,7 +621,7 @@ export const E3_BACKLOG = [
645
621
  {
646
622
  stage: "case-law",
647
623
  kind: "literal-json-skeleton",
648
- where: "driver/skills/case-law-citation/SKILL.md:153-177",
624
+ where: "driver/skills/case-law-citation/SKILL.md:127-151",
649
625
  surface: "skill-file",
650
626
  evidence: "```markdown\\n### Grounded profile — <proposed mark> vs <conflicting mark / owner> (<jurisdiction>)\\n- ord: <N …>\\n\\n**Question grounded:** …\\n\\n**On-point authorities:** …\\n\\n**Tags:** … **Coverage gaps:** …\\n``` OR, when nothing is on point: ```markdown … **No on-point precedent found.** …```",
651
627
  reparsedBy: "driver/publish/parse.mjs:339 parseCaseLawProfiles — splits on /^#{2,3}\\s+Grounded profile\\s+—\\s+/m and reads the `- ord:` first body line",
@@ -654,7 +630,7 @@ export const E3_BACKLOG = [
654
630
  {
655
631
  stage: "case-law",
656
632
  kind: "dictated-line-shape",
657
- where: "driver/skills/case-law-citation/SKILL.md:90-100",
633
+ where: "driver/skills/case-law-citation/SKILL.md:64-74",
658
634
  surface: "skill-file",
659
635
  evidence: "Copy this checklist into your working notes and tick each finding through it:\\n```\\nGrounding progress (per finding):\\n- [ ] Step 1: Pick the source(s) by jurisdiction; read that adapter\\n…\\n```",
660
636
  reparsedBy: "",
@@ -670,7 +646,7 @@ export const E3_BACKLOG = [
670
646
  {
671
647
  stage: "narrative-refutation",
672
648
  kind: "dictated-line-shape",
673
- where: "driver/stages.mjs:4893",
649
+ where: "driver/stages.mjs:4694",
674
650
  surface: "stage-message",
675
651
  // RE-QUOTED BY CONVERSION 9. The LINE-TOKEN half is gone — no "anywhere on the line", no "[kind: …]
676
652
  // token", no "a line with no token is treated as fact", because a kind is a typed field now and an
@@ -691,7 +667,7 @@ export const E3_BACKLOG = [
691
667
  {
692
668
  stage: "narrative-refutation",
693
669
  kind: "dictated-line-shape",
694
- where: "driver/skills/narrative-refutation/SKILL.md:73",
670
+ where: "driver/skills/narrative-refutation/SKILL.md:70",
695
671
  surface: "skill-file",
696
672
  // RE-QUOTED BY CONVERSION 9. The dictation survives and its CHANNEL changed: `on` is an array of
697
673
  // ordinals the seat sends, and the bracketed forms are now labelled as what the DRIVER renders. The
@@ -705,7 +681,7 @@ export const E3_BACKLOG = [
705
681
  {
706
682
  stage: "narrative-refutation",
707
683
  kind: "dictated-line-shape",
708
- where: "driver/stages.mjs:1879 and driver/skills/narrative-refutation/SKILL.md:41-50",
684
+ where: "driver/stages.mjs:1676 and driver/skills/narrative-refutation/SKILL.md:39-48",
709
685
  // RE-QUOTED 2026-08-16. The dictated SENTENCE survives in narrative-refutation's SKILL.md — it is the
710
686
  // `evidence` below, verbatim. What changed is that the four kinds moved from an inline list after the
711
687
  // colon onto their own `- [kind: …]` bullet lines. Measured, not assumed: the old anchor matched 59 of
@@ -770,7 +746,7 @@ export const E3_BACKLOG = [
770
746
  {
771
747
  stage: "report-card",
772
748
  kind: "literal-json-skeleton",
773
- where: "driver/stages.mjs:3997",
749
+ where: "driver/stages.mjs:3798",
774
750
  surface: "stage-message",
775
751
  evidence: "The finding's OWN record — the ONLY source for this card …:\\n```json\\n<JSON.stringify(finding, null, 2)>\\n```",
776
752
  reparsedBy: "none — this is the INPUT side, and that is why it belongs in the survey: a full JSON object rendered into the prompt is exactly the mechanism #850 proves produced R-RECEIPT (the model pattern-matches a shown shape). E3's clause 1 as written (\"a code fence or inline example showing the exact object shape the model must emit\") does not reach an injected record, so the lint needs an explicit rule for shown-but-not-owed structure",
@@ -860,7 +836,7 @@ export const E3_EVIDENCE_UNRESOLVED = [
860
836
  // absorbed. It was the narrative "## Answers to your instructions" row deleted above: its dictation is
861
837
  // gone, so there is no un-anchorable quote left to be unresolved. The one that REMAINS is a live row
862
838
  // whose quote spans a template line. Measured before deleting, not predicted — two rows shared
863
- // `where: "driver/stages.mjs:3083"`, so which one occupied this slot could not be read off the strings.
839
+ // `where: "driver/stages.mjs:2860"`, so which one occupied this slot could not be read off the strings.
864
840
  "synthesis|driver/stages.mjs",
865
841
  ];
866
842
 
@@ -893,8 +869,11 @@ export const E3_SURFACE_CENSUS = Object.freeze({
893
869
  // with the dictation it described — the seat writes no output, so there is no first line.
894
870
  // 31 -> 30 at conversion 10: the synthesis narrative's "## Answers to your instructions" row goes the
895
871
  // same way — the answers are typed entries on the findings record and the driver renders both surfaces.
896
- "stage-message": 30,
872
+ // 30 -> 28: the use-check and own-rights rows are deleted with their dictation; the writer records them as fields.
873
+ "stage-message": 28,
897
874
  "tool-response": 1,
898
- "skill-file": 15,
875
+ // 15 -> 14: the placement manual's "structured mirror" key list is deleted with its dictation; the driver renders
876
+ // placements.json from the form the step fills in.
877
+ "skill-file": 14,
899
878
  "driver-written-form": 0,
900
879
  });