clearotron 0.5.1 → 0.6.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +7 -7
- package/INSTALL.md +10 -10
- package/QUICKSTART.md +6 -6
- package/README.md +2 -2
- package/THIRD-PARTY-NOTICES.md +4 -4
- package/bin/README.md +2 -2
- package/bin/clearotron.mjs +1 -1
- package/bin/connect.mjs +1 -1
- package/bin/disconnect.mjs +1 -1
- package/bin/example.mjs +2 -2
- package/bin/grant.mjs +1 -1
- package/bin/onboard.mjs +78 -23
- package/bin/start.mjs +49 -18
- package/bin/update.mjs +13 -3
- package/build-info.json +2 -2
- package/docs/DELIVERY.md +1 -1
- package/docs/PORTAL.md +1 -1
- package/docs/RELEASES.md +1 -1
- package/docs/architecture/02-architecture.md +10 -2
- package/docs/architecture/03-run-lifecycle.md +6 -2
- package/docs/architecture/04-configuration-reference.md +3 -3
- package/docs/architecture/05-config-governance.md +5 -4
- package/docs/architecture/08-development-guide.md +4 -4
- package/docs/architecture/09-security-and-data.md +1 -1
- package/{driver/skills/clearance-search/SKILL.md → docs/architecture/retired-manuals/clearance-search-spine.md} +17 -30
- package/{driver/skills/clearance-search/templates/email/generic.md → docs/architecture/retired-manuals/email-generic.md} +1 -1
- package/{driver/skills/clearance-search → docs/architecture/retired-manuals}/template-formatting.md +3 -4
- package/docs/configuration.md +1 -1
- package/docs/decisions/0002-no-dark-functionality.md +5 -0
- package/driver/CHANGELOG.md +60 -0
- package/driver/README.md +11 -1
- package/driver/accepted-order.mjs +13 -5
- package/driver/attempt-rows.mjs +64 -0
- package/driver/attributed-span.mjs +1 -1
- package/driver/authority-trees.mjs +1 -1
- package/driver/best-draft.mjs +3 -3
- package/driver/blind-frame-record.mjs +2 -2
- package/driver/cancel.mjs +3 -2
- package/driver/carry-through.mjs +2 -2
- package/driver/citation-census.json +3 -3
- package/driver/clearance-variants-record.mjs +4 -10
- package/driver/common-law-coverage-status.mjs +3 -3
- package/driver/common-law-receipts.mjs +2 -2
- package/driver/compare.mjs +1 -1
- package/driver/config-inventory.mjs +6 -79
- package/driver/consumption-ledger.mjs +2 -1
- package/driver/contract-dictation-registry.mjs +5 -0
- package/driver/contract-e3-backlog.mjs +45 -66
- package/driver/contract-e3-baseline.json +16 -16
- package/driver/contract-vocabulary.mjs +8 -6
- package/driver/corrections-feedforward.mjs +3 -1
- package/driver/coverage-form-io.mjs +7 -8
- package/driver/coverage-tool.mjs +1 -1
- package/driver/declination-tool.mjs +2 -2
- package/driver/degraded-parts.mjs +9 -9
- package/driver/demo-container.mjs +5 -4
- package/driver/deploy-live-run-guard.mjs +19 -7
- package/driver/derived-state.mjs +2 -2
- package/driver/dev-portal.mjs +2 -1
- package/driver/dispatch-record.mjs +1 -1
- package/driver/disposition-tool.mjs +2 -1
- package/driver/doubt-closure-tool.mjs +2 -2
- package/driver/driver.config.mjs +35 -724
- package/driver/e2e-rounds.mjs +3 -4
- package/driver/engine/CONTRACT.md +3 -0
- package/driver/engine/README.md +2 -0
- package/driver/engine/anthropic-agent.mjs +8 -37
- package/driver/engine/auth.mjs +74 -0
- package/driver/engine/child-record.mjs +1 -1
- package/driver/engine/deny-authority-write.mjs +2 -2
- package/driver/engine/jx-turn.mjs +10 -2
- package/driver/engine/mcp/README.md +1 -1
- package/driver/engine/mcp/band-server.mjs +6 -6
- package/driver/engine/mcp/codex-config.mjs +1 -1
- package/driver/engine/mcp/declination-server.mjs +2 -3
- package/driver/engine/mcp/dispositions-server.mjs +3 -3
- package/driver/engine/mcp/gather-config.mjs +24 -19
- package/driver/engine/mcp/grid-provenance.mjs +1 -1
- package/driver/engine/mcp/held-answers.mjs +5 -5
- package/driver/engine/mcp/perplexity-server.mjs +16 -7
- package/driver/engine/mcp/recording-server.mjs +7 -6
- package/driver/engine/mcp/register-server.mjs +29 -0
- package/driver/engine/mcp/stdio-server.mjs +5 -5
- package/driver/engine/mcp/supplemental.mjs +9 -9
- package/driver/engine/openai-agent.mjs +5 -2
- package/driver/engine/registry.mjs +103 -0
- package/driver/engine/run-choices.mjs +162 -0
- package/driver/engine/stamps.mjs +35 -0
- package/driver/enqueue-schema.mjs +4 -4
- package/driver/envelope-settle.mjs +3 -2
- package/driver/feedback-issues.mjs +1 -1
- package/driver/feedback-mint.mjs +3 -2
- package/driver/feedback-store.mjs +3 -2
- package/driver/findings-model.mjs +1 -1
- package/driver/flag-snapshot.mjs +5 -4
- package/driver/floor-duty.mjs +3 -3
- package/driver/foreign-record-links.mjs +1 -1
- package/driver/frame-diff-record.mjs +2 -8
- package/driver/framework.mjs +1 -1
- package/driver/gate-metrics.mjs +10 -11
- package/driver/gateway.mjs +220 -839
- package/driver/goods-evidence.mjs +10 -6
- package/driver/jx-lanes.mjs +3 -3
- package/driver/jx-units.mjs +31 -37
- package/driver/jx.mjs +44 -59
- package/driver/knockout-assess-record.mjs +3 -3
- package/driver/knockout-caveats.mjs +21 -0
- package/driver/knockout-correction-record.mjs +58 -28
- package/driver/knockout-frame-record.mjs +2 -2
- package/driver/knockout-register-read.mjs +38 -21
- package/driver/knockout-register-record.mjs +5 -6
- package/driver/knockout-review-record.mjs +12 -11
- package/driver/ladder/model-gauge.mjs +88 -0
- package/driver/ladder/next-rung.mjs +296 -0
- package/driver/ladder/rescue.mjs +146 -0
- package/driver/ladder/stage-tools.mjs +57 -0
- package/driver/ladder/turn-failure.mjs +166 -0
- package/driver/log.mjs +2 -2
- package/driver/matter-frame-record.mjs +4 -4
- package/driver/methodology-witness.mjs +2 -2
- package/driver/narrative-refutation-record.mjs +145 -42
- package/driver/one-build-per-run.mjs +62 -0
- package/driver/outbox-backoff.mjs +4 -4
- package/driver/owner-screen.mjs +0 -10
- package/driver/owner-use-check.mjs +2 -28
- package/driver/package.json +1 -1
- package/driver/partial-payload-baseline.json +1 -1
- package/driver/parts-not-completed.mjs +1 -1
- package/driver/pipeline-knockout.mjs +1015 -1001
- package/driver/pipeline.mjs +511 -9265
- package/driver/placement-decisions.mjs +2 -2
- package/driver/placement-form-io.mjs +7 -9
- package/driver/placement-union.mjs +0 -6
- package/driver/plan-stability.mjs +7 -10
- package/driver/portal-acks.mjs +3 -2
- package/driver/portal-confirmation.mjs +48 -0
- package/driver/portal-families.mjs +3 -2
- package/driver/portal-local-auth.mjs +1 -2
- package/driver/portal-routes/README.md +24 -0
- package/driver/portal-routes/admin.mjs +425 -0
- package/driver/portal-routes/compose.mjs +66 -0
- package/driver/portal-routes/config.mjs +118 -0
- package/driver/portal-routes/connect.mjs +283 -0
- package/driver/portal-routes/feedback.mjs +178 -0
- package/driver/portal-routes/me.mjs +165 -0
- package/driver/portal-routes/queue.mjs +64 -0
- package/driver/portal-routes/report.mjs +106 -0
- package/driver/portal-routes/run.mjs +508 -0
- package/driver/portal-routes/runs.mjs +127 -0
- package/driver/portal-routes/usage.mjs +82 -0
- package/driver/portal-runs.mjs +588 -0
- package/driver/portal-service.mjs +78 -2592
- package/driver/portal-static.mjs +3 -1
- package/driver/predelivery-lint.mjs +92 -9
- package/driver/production-pool-guard.mjs +1 -1
- package/driver/profiles.mjs +5 -4
- package/driver/progress.mjs +29 -24
- package/driver/publish/README.md +10 -5
- package/driver/publish/archive-tags.mjs +3 -2
- package/driver/publish/demo-marking.mjs +2 -2
- package/driver/publish/index.mjs +215 -140
- package/driver/publish/knockout.mjs +153 -107
- package/driver/publish/office-record-links.mjs +22 -0
- package/driver/publish/parse.mjs +20 -5
- package/driver/publish/pool-admin.mjs +9 -3
- package/driver/publish/render.mjs +11 -3
- package/driver/publish/report-dates.mjs +3 -4
- package/driver/publish/report-registry.mjs +7 -10
- package/driver/publish/seed-pool.mjs +3 -2
- package/driver/publish/shell.mjs +106 -0
- package/driver/publish/templates/report.css +3 -1
- package/driver/queue-order.mjs +4 -3
- package/driver/record-carry.mjs +0 -9
- package/driver/record-discard.mjs +1 -4
- package/driver/record-fold.mjs +3 -3
- package/driver/record-goods.mjs +5 -5
- package/driver/reference-score.mjs +2 -3
- package/driver/register-capabilities.mjs +0 -6
- package/driver/register-count.mjs +3 -2
- package/driver/register-digest-record.mjs +7 -7
- package/driver/register-fixture-marker.mjs +3 -3
- package/driver/register-plan.mjs +2 -2
- package/driver/register-records.mjs +2 -2
- package/driver/register-taint.mjs +3 -3
- package/driver/register-unit-record.mjs +48 -9
- package/driver/register-unreachable.mjs +4 -3
- package/driver/registry-fidelity.mjs +79 -34
- package/driver/repair-composers.mjs +14 -9
- package/driver/repair-digest.mjs +4 -6
- package/driver/repair-scope.mjs +3 -3
- package/driver/repair-targets.mjs +24 -9
- package/driver/repairs.mjs +44 -58
- package/driver/replay-archive.mjs +7 -7
- package/driver/report-card-record.mjs +3 -3
- package/driver/report-overview-record.mjs +4 -4
- package/driver/research-answers.mjs +38 -6
- package/driver/research-checks.mjs +4 -4
- package/driver/result-noun-fields.mjs +28 -11
- package/driver/review-addresses.mjs +163 -0
- package/driver/rule-shape.mjs +1 -1
- package/driver/run-delivered.mjs +340 -0
- package/driver/run-economics.mjs +8 -26
- package/driver/run-failed.mjs +545 -0
- package/driver/run-integrity.mjs +1 -1
- package/driver/run-outcome.mjs +314 -0
- package/driver/run-park.mjs +23 -0
- package/driver/run-quote.mjs +32 -0
- package/driver/run-record.mjs +352 -0
- package/driver/run-requirements.mjs +22 -0
- package/driver/run-shell.mjs +55 -0
- package/driver/runner.mjs +71 -33
- package/driver/saved-register-pages.mjs +4 -4
- package/driver/score-redaction.mjs +2 -2
- package/driver/search-policy.mjs +12 -13
- package/driver/settle-stamp.mjs +4 -3
- package/driver/skeptic-record.mjs +2 -2
- package/driver/skeptic-search.mjs +1 -1
- package/driver/skills/README.md +7 -7
- package/driver/skills/blind-frame/SKILL.md +1 -2
- package/driver/skills/case-law-citation/SKILL.md +9 -37
- package/driver/skills/case-law-citation/sources/courtlistener.md +1 -3
- package/driver/skills/case-law-citation/sources/eurlex.md +8 -11
- package/driver/skills/case-law-citation/sources/legaldatahunter.md +1 -1
- package/driver/skills/clearance-common-law/SKILL.md +45 -111
- package/driver/skills/clearance-common-law/perplexity-prompts.md +7 -79
- package/driver/skills/clearance-register/SKILL.md +15 -33
- package/driver/skills/clearance-register/digest.md +31 -92
- package/driver/skills/clearance-register/providers/clarivate.md +2 -2
- package/driver/skills/clearance-register/providers/corsearch.md +5 -5
- package/driver/skills/clearance-register/providers/euipo.md +1 -2
- package/driver/skills/clearance-register/providers/free-tier.md +0 -19
- package/driver/skills/clearance-register/providers/signa.md +6 -25
- package/driver/skills/clearance-register/providers/uspto-local.md +0 -24
- package/driver/skills/clearance-register/register-recipes.md +8 -15
- package/driver/skills/clearance-register/status-rules.md +6 -24
- package/driver/skills/clearance-register/unit.md +11 -20
- package/driver/skills/clearance-search/delivery-contract.md +24 -120
- package/driver/skills/clearance-search/field-doctrine-pharma.md +1 -5
- package/driver/skills/clearance-search/firm-wide-reasoning.md +24 -43
- package/driver/skills/clearance-search/phase2-execution.md +29 -77
- package/driver/skills/clearance-search/report-prose.md +3 -4
- package/driver/skills/clearance-search/risk-framework-demo.md +1 -1
- package/driver/skills/clearance-search/risk-framework-triage.manifest.json +3 -3
- package/driver/skills/clearance-search/risk-framework-triage.md +7 -9
- package/driver/skills/clearance-search/risk-framework.manifest.json +1 -1
- package/driver/skills/clearance-search/risk-framework.md +1 -1
- package/driver/skills/clearance-search/synthesis-rules.md +30 -107
- package/driver/skills/clearance-search/worked-examples.md +5 -5
- package/driver/skills/clearance-variants/SKILL.md +46 -45
- package/driver/skills/clearance-variants/transliteration-scripts.md +4 -4
- package/driver/skills/frame-diff/SKILL.md +1 -1
- package/driver/skills/knockout-assess/SKILL.md +6 -14
- package/driver/skills/knockout-frame/SKILL.md +1 -1
- package/driver/skills/matter-frame/SKILL.md +7 -12
- package/driver/skills/matter-frame/watchlist-reference.md +1 -4
- package/driver/skills/narrative-refutation/SKILL.md +20 -30
- package/driver/skills/placement-inquiry/SKILL.md +8 -18
- package/driver/skills-store-provenance.mjs +1 -1
- package/driver/stage-context.mjs +32 -35
- package/driver/stage-freshness.mjs +127 -11
- package/driver/stages-knockout.mjs +49 -22
- package/driver/stages.mjs +88 -283
- package/driver/status-snapshot.mjs +2 -1
- package/driver/steps/correction-cycle.mjs +311 -0
- package/driver/steps/corrections.mjs +644 -0
- package/driver/steps/delivery.mjs +1287 -0
- package/driver/steps/frame-comparison.mjs +922 -0
- package/driver/steps/intake.mjs +84 -0
- package/driver/steps/open-run.mjs +419 -0
- package/driver/steps/overview-and-cards.mjs +899 -0
- package/driver/steps/placement-and-digest.mjs +23 -0
- package/driver/steps/register-sweep.mjs +1563 -0
- package/driver/steps/skeptic-and-follow-up.mjs +831 -0
- package/driver/steps/synthesis.mjs +261 -0
- package/driver/steps/verdict-gate.mjs +968 -0
- package/driver/suite-census.json +403 -91
- package/driver/surface-exit-verdict.mjs +0 -8
- package/driver/synthesis-record.mjs +72 -6
- package/driver/terminal-clamp.mjs +10 -0
- package/driver/tokens.mjs +8 -62
- package/driver/tool-calls.mjs +2 -2
- package/driver/unit-state-verdict.mjs +1 -1
- package/driver/usage-ledger.mjs +2 -1
- package/driver/verify-knockout.mjs +20 -35
- package/driver/verify.mjs +47 -36
- package/driver/web-grid.mjs +3 -4
- package/driver/whatif-memo-run.mjs +2 -2
- package/driver/whatif-queue.mjs +4 -3
- package/driver/withheld-families.mjs +14 -15
- package/driver/worker-heartbeat.mjs +3 -2
- package/driver/write-up-form.mjs +0 -3
- package/mcp-server/CHANGELOG.md +4 -0
- package/mcp-server/http-server.mjs +1 -1
- package/mcp-server/lib/brief.mjs +22 -4
- package/mcp-server/lib/events.mjs +2 -2
- package/mcp-server/lib/evidence.mjs +3 -2
- package/mcp-server/lib/findings.mjs +2 -1
- package/mcp-server/lib/knockout.mjs +9 -10
- package/mcp-server/lib/ops.mjs +9 -9
- package/mcp-server/lib/runs.mjs +9 -10
- package/mcp-server/lib/trace.mjs +1 -1
- package/mcp-server/lib/whatif.mjs +2 -3
- package/mcp-server/package.json +1 -1
- package/mcp-server/server.mjs +5 -5
- package/package.json +2 -1
- package/portal-ui/dist/assets/{index-fPqAU0sx.js → index-D5rkCjDc.js} +26 -14
- package/portal-ui/dist/index.html +1 -1
- package/portal-ui/package.json +3 -3
- package/providers/README.md +1 -1
- package/providers/_shared/answer-memory.mjs +4 -5
- package/providers/_shared/execute-plan.mjs +48 -1
- package/providers/_shared/records-from-search.mjs +46 -0
- package/providers/clarivate/README.md +2 -2
- package/providers/clarivate/src/adapter.js +147 -0
- package/providers/clarivate/src/core.js +1 -14
- package/{driver/engine/mcp/clarivate-server.mjs → providers/clarivate/src/mount.js} +5 -10
- package/providers/corsearch/README.md +3 -3
- package/providers/corsearch/src/adapter.js +80 -0
- package/providers/corsearch/src/core.js +14 -11
- package/{driver/engine/mcp/corsearch-server.mjs → providers/corsearch/src/mount.js} +5 -10
- package/providers/euipo/README.md +2 -2
- package/providers/euipo/src/adapter.js +85 -0
- package/providers/euipo/src/core.js +1 -1
- package/providers/euipo/src/euipo-client.js +1 -2
- package/{driver/engine/mcp/euipo-server.mjs → providers/euipo/src/mount.js} +5 -10
- package/providers/free-tier/README.md +2 -2
- package/providers/free-tier/src/adapter.js +127 -0
- package/{driver/engine/mcp/free-tier-server.mjs → providers/free-tier/src/mount.js} +5 -10
- package/providers/jx-subclass/coverage.mjs +1 -6
- package/providers/jx-subclass/score-truth.mjs +2 -1
- package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/providers/perplexity/src/core.js +2 -2
- package/providers/signa/README.md +2 -2
- package/providers/signa/src/adapter.js +157 -0
- package/providers/signa/src/capabilities.js +0 -3
- package/providers/signa/src/core.js +2 -2
- package/{driver/engine/mcp/signa-server.mjs → providers/signa/src/mount.js} +7 -12
- package/providers/signa/src/offices.generated.js +17 -15
- package/providers/uspto-local/README.md +1 -1
- package/providers/uspto-local/bin/verify-index.mjs +1 -1
- package/providers/uspto-local/src/adapter.js +75 -0
- package/{driver/engine/mcp/uspto-local-server.mjs → providers/uspto-local/src/mount.js} +5 -10
- package/scripts/band-shape-probe.mjs +2 -2
- package/scripts/citation-line-check.mjs +7 -7
- package/scripts/compare.mjs +1 -1
- package/scripts/dead-names.mjs +2 -2
- package/scripts/e2e-first-time.mjs +19 -7
- package/scripts/e2e.mjs +13 -13
- package/scripts/engine-probe.mjs +1 -1
- package/scripts/env-audit.mjs +7 -4
- package/scripts/env-classify.mjs +5 -1
- package/scripts/feedback-mint.mjs +1 -1
- package/scripts/freeze-example-run.mjs +7 -7
- package/scripts/mint-suite-census.mjs +2 -2
- package/scripts/nightly-notice.mjs +1 -1
- package/scripts/release-cut-decision.mjs +7 -2
- package/scripts/release-note-required.mjs +26 -9
- package/scripts/release-notes-lint.mjs +3 -2
- package/scripts/release-version-pr-checks.mjs +1 -1
- package/scripts/settings-render-check.mjs +23 -3
- package/scripts/test-run.mjs +5 -5
- package/scripts/travelling-predicates.mjs +1 -1
- package/scripts/undeclared-field-census.mjs +1 -1
- package/scripts/unexecuted-asserts.mjs +1 -1
- package/scripts/verify-publishable.mjs +1 -1
- package/shared/client-door.mjs +1 -1
- package/shared/connect-clients.mjs +1 -1
- package/shared/connector-signin-probe.mjs +1 -1
- package/shared/env-aliases.mjs +1 -1
- package/shared/invocation.mjs +14 -2
- package/shared/names-in-force.mjs +2 -0
- package/shared/register-selection.mjs +2 -2
- package/shared/store-in-repo.mjs +3 -3
- package/shared/summary-blocks.mjs +0 -3
- package/shared/trigger-lane.mjs +1 -1
- package/shared/vacuous-pass.mjs +2 -2
- package/shared/verb-shim.mjs +4 -2
- package/node_modules/exceljs/README.md +0 -3023
package/bin/start.mjs
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
// n+1 and the client door n+2 unless each is set explicitly
|
|
14
14
|
// npx clearotron start --demo the demo posture: own data directory, nothing persisted
|
|
15
15
|
// npx clearotron start --no-worker do not drain the queue here; run the worker yourself
|
|
16
|
+
// npx clearotron start --background run as services that survive closing the terminal; `clearotron stop` stops them
|
|
16
17
|
// npx clearotron start --help
|
|
17
18
|
//
|
|
18
19
|
// It is NOT `npm run example`. Demo replays a frozen example report with no credentials, no model and no
|
|
@@ -415,13 +416,13 @@ export function clientDoorDownLines({ host, port, exited }) {
|
|
|
415
416
|
*/
|
|
416
417
|
export const DEMO_ROUTINE_LINES = [
|
|
417
418
|
/^auth ON — /,
|
|
418
|
-
/^key path: none
|
|
419
|
+
/^key path: none \(TRADEMARK_MCP_KEY_SOCKET is not set\)/,
|
|
419
420
|
/^roster: \d+ customer\(s\) from /,
|
|
420
421
|
/^This is `clearotron demo`: /,
|
|
421
422
|
/^listening on http:\/\//,
|
|
422
423
|
/^audit log: /,
|
|
423
424
|
/^trigger lane: the engine door takes an access key, and this portal holds one\.$/,
|
|
424
|
-
/^trigger lane:
|
|
425
|
+
/^trigger lane: the Start button may start and stop searches for /,
|
|
425
426
|
/^settings surface ON — /,
|
|
426
427
|
/^saved searches ON — /,
|
|
427
428
|
/^brief reading OFF — this is the demo/,
|
|
@@ -991,14 +992,44 @@ export function childEnv({ ports, paths, user, portalSecret, tokenSecret, opsTok
|
|
|
991
992
|
// the wrong direction. Re-exported so every existing reader keeps working.
|
|
992
993
|
export { mergeEnvFile } from "../shared/env-file-merge.mjs";
|
|
993
994
|
|
|
995
|
+
/**
|
|
996
|
+
* The supervisor's writers, which stop at a terminal that has gone.
|
|
997
|
+
*
|
|
998
|
+
* CLOSING THE WINDOW TURNED THE TEARDOWN INTO A LOOP (measured on Linux, 2026-11-10). The hangup reached
|
|
999
|
+
* the teardown, whose first act is a line on the screen. The write failed (EIO from a hung-up terminal,
|
|
1000
|
+
* EPIPE from a closed pipe), and with no listener on the stream the failure became an uncaught exception.
|
|
1001
|
+
* Its handler wrote the exception to the same dead terminal, which failed again, on the next tick, without
|
|
1002
|
+
* end. The services had already been told to stop, so they stopped, but the timers the teardown waits on
|
|
1003
|
+
* never ran: this process held a full core, ignored SIGTERM because it was already stopping, and left the
|
|
1004
|
+
* demo's folder and its running record behind.
|
|
1005
|
+
*
|
|
1006
|
+
* Each stream now has a listener, so a failed write is an event rather than an exception, and a stream
|
|
1007
|
+
* that has failed once is written to no more: there is nobody left to read it. Per stream, because
|
|
1008
|
+
* `start | head` closes stdout alone, and the refusals on stderr still have a reader.
|
|
1009
|
+
*/
|
|
1010
|
+
export function terminalWriters({ stdout = process.stdout, stderr = process.stderr } = {}) {
|
|
1011
|
+
const gone = new Set();
|
|
1012
|
+
const writer = (stream) => {
|
|
1013
|
+
stream.on("error", () => { gone.add(stream); });
|
|
1014
|
+
return (text) => { if (!gone.has(stream)) stream.write(text); };
|
|
1015
|
+
};
|
|
1016
|
+
const toOut = writer(stdout);
|
|
1017
|
+
const toErr = stderr === stdout ? toOut : writer(stderr);
|
|
1018
|
+
return {
|
|
1019
|
+
say: (s = "") => toOut(`${s}\n`),
|
|
1020
|
+
err: (s) => toErr(`${s}\n`),
|
|
1021
|
+
toErr,
|
|
1022
|
+
gone: (stream = stdout) => gone.has(stream),
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
|
|
994
1026
|
|
|
995
1027
|
// ── everything below runs only as a command ──────────────────────────────────────────────────────────
|
|
996
1028
|
|
|
997
1029
|
const isMain = isEntrypoint(import.meta.url);
|
|
998
1030
|
if (isMain) {
|
|
999
1031
|
const argv = process.argv.slice(2);
|
|
1000
|
-
const say
|
|
1001
|
-
const err = (s) => process.stderr.write(`${s}\n`);
|
|
1032
|
+
const { say, err, toErr } = terminalWriters();
|
|
1002
1033
|
// Flipped at the first state-changing act (the third criterion): a refusal AFTER
|
|
1003
1034
|
// writes must say what survives and that re-running is safe — the reader's only question at that
|
|
1004
1035
|
// moment, and one the screen never answered while the writes sat above the port probe.
|
|
@@ -1585,7 +1616,7 @@ if (isMain) {
|
|
|
1585
1616
|
write: (f, text) => writeFileSync(f, text, { mode: 0o600 }),
|
|
1586
1617
|
read: (f) => readFileSync(f, "utf8"),
|
|
1587
1618
|
});
|
|
1588
|
-
if (r.created) say(` created ${denylist} (the
|
|
1619
|
+
if (r.created) say(` created ${denylist} (the list of keys you have revoked)`);
|
|
1589
1620
|
} catch (e) {
|
|
1590
1621
|
// FATAL, and this is the one place that judgement belongs. A door that cannot consult its
|
|
1591
1622
|
// revocation list is a door that cannot be revoked from, and starting it anyway is the failure
|
|
@@ -1805,16 +1836,16 @@ if (isMain) {
|
|
|
1805
1836
|
// snapshot could not be written", naming a deployed server's archive path, followed by the portal
|
|
1806
1837
|
// saying its configuration page cannot answer. Exactly the reader the paragraph above names.
|
|
1807
1838
|
//
|
|
1808
|
-
//
|
|
1809
|
-
//
|
|
1810
|
-
//
|
|
1811
|
-
//
|
|
1812
|
-
//
|
|
1839
|
+
// A REAL START HANDS IT THE SAME PATHS, for the same reason. On an install with no settings yet, the
|
|
1840
|
+
// snapshot read an environment that named no pool and printed the hosted-archive refusal on the first
|
|
1841
|
+
// screen, while every service this command started had been handed the install's pool. An operator's own
|
|
1842
|
+
// `CLEAROTRON_REPORTS_DIR` still wins: `startPaths` applies it before anything here reads `paths.pool`.
|
|
1843
|
+
// A reader that resolves no paths of its own (doctor, the services, the commands) still meets the refusal.
|
|
1844
|
+
// `envs.worker` is the shared block — the install's paths in both spellings and nothing else — so engine
|
|
1845
|
+
// and provider identity still resolve from the real environment and report, honestly, what is missing.
|
|
1813
1846
|
try {
|
|
1814
1847
|
const { writeFlagSnapshot } = await import("../driver/flag-snapshot.mjs");
|
|
1815
|
-
const { path } = await writeFlagSnapshot(
|
|
1816
|
-
? { quiet: true, env: { ...process.env, ...envs.worker }, poolRoot: paths.pool }
|
|
1817
|
-
: { quiet: true });
|
|
1848
|
+
const { path } = await writeFlagSnapshot({ quiet: true, env: { ...process.env, ...envs.worker }, poolRoot: paths.pool });
|
|
1818
1849
|
say(` configuration snapshot: ${path}`);
|
|
1819
1850
|
} catch (e) {
|
|
1820
1851
|
err(` WARNING: the configuration snapshot could not be written (${String(e?.message ?? e)}).`);
|
|
@@ -2268,10 +2299,10 @@ if (isMain) {
|
|
|
2268
2299
|
// last lines put on the screen before the sentence that points at them, so nothing that explains a failure stays only in the file.
|
|
2269
2300
|
const DEMO_STARTUP_LOG = DEMO ? join(paths.base, "startup.log") : null;
|
|
2270
2301
|
const fileDemoLine = (line) => {
|
|
2271
|
-
try { appendFileSync(DEMO_STARTUP_LOG, `${line}\n`); } catch {
|
|
2272
|
-
if (demoLineOnScreen(line))
|
|
2302
|
+
try { appendFileSync(DEMO_STARTUP_LOG, `${line}\n`); } catch { err(line); return; }
|
|
2303
|
+
if (demoLineOnScreen(line)) err(line);
|
|
2273
2304
|
};
|
|
2274
|
-
const showFiledTail = (rec) => { if (DEMO) for (const line of rec.tail)
|
|
2305
|
+
const showFiledTail = (rec) => { if (DEMO) for (const line of rec.tail) err(line); };
|
|
2275
2306
|
const start = (name, script, env, { args = [], fatal = true, clientDoor = false } = {}) => {
|
|
2276
2307
|
const child = spawn(process.execPath, [join(REPO, script), ...args], {
|
|
2277
2308
|
cwd: REPO,
|
|
@@ -2310,7 +2341,7 @@ if (isMain) {
|
|
|
2310
2341
|
const keep = (line) => { if (line.trim()) tail.push(line); while (tail.length > 12) tail.shift(); };
|
|
2311
2342
|
child.stderr?.setEncoding("utf8");
|
|
2312
2343
|
child.stderr?.on("data", (chunk) => {
|
|
2313
|
-
if (!DEMO)
|
|
2344
|
+
if (!DEMO) toErr(chunk);
|
|
2314
2345
|
const parts = (pending + String(chunk)).split("\n");
|
|
2315
2346
|
pending = parts.pop() ?? "";
|
|
2316
2347
|
for (const line of parts) { keep(line); if (DEMO) fileDemoLine(line); }
|
|
@@ -2587,7 +2618,7 @@ if (isMain) {
|
|
|
2587
2618
|
// A door that exited printed why; one still up when the wait ran out printed nothing, and is not sent there.
|
|
2588
2619
|
for (const line of clientDoorDownLines({ host: HOST, port: ports.client, exited: clientDoor?.child?.exitCode !== null })) say(line);
|
|
2589
2620
|
}
|
|
2590
|
-
say(` Engine door http://${HOST}:${ports.mcp}/mcp — the portal's Start button calls this.
|
|
2621
|
+
say(` Engine door http://${HOST}:${ports.mcp}/mcp — the portal's Start button calls this. For your staff, not clients.`);
|
|
2591
2622
|
say("");
|
|
2592
2623
|
// ── WHAT `status` AND `stop` READ ABOUT THIS START ───────────────────────────────────────────────
|
|
2593
2624
|
//
|
package/bin/update.mjs
CHANGED
|
@@ -321,12 +321,22 @@ export async function update(argv = process.argv.slice(2)) {
|
|
|
321
321
|
//
|
|
322
322
|
// No override flag, deliberately. A timer retries in an hour; a human waits or clears the queue. An
|
|
323
323
|
// escape hatch on an unattended path is a hatch that gets taken by the unattended path.
|
|
324
|
-
|
|
325
|
-
|
|
324
|
+
//
|
|
325
|
+
// A PARKED RUN HOLDS IT TOO (owner, 2026-11-09: a search is not upgraded part-way, and a run is not resumed after an
|
|
326
|
+
// update). A park in a queue is read with the queue; a run folder parked on its own comes from the runner's own scan,
|
|
327
|
+
// so the update and the runner cannot disagree about what will resume. A scan that cannot load is a could-not-look and
|
|
328
|
+
// refuses like an unreadable queue.
|
|
329
|
+
let parkedRunDirs = [];
|
|
330
|
+
try { parkedRunDirs = (await import("../driver/runner.mjs")).parkedRunDirOrphans(); }
|
|
331
|
+
catch (e) { parkedRunDirs = null; console.error(`\n The scan for parked run folders could not run: ${String(e?.message ?? e).slice(0, 200)}`); }
|
|
332
|
+
const holds = liveRunHolds({ queueDirs: config.queueDirs, lockDir: config.runLockDir, parkedRunDirs: parkedRunDirs ?? [] });
|
|
333
|
+
if (parkedRunDirs === null) holds.unreadable.push({ path: "parked run folders", error: "the runner's scan did not load" });
|
|
334
|
+
const held = [...holds.queued, ...holds.claimed, ...holds.parked, ...holds.slots];
|
|
326
335
|
if (held.length) {
|
|
327
|
-
console.error(`\n REFUSED — ${held.length} run(s) queued, claimed or in flight.`);
|
|
336
|
+
console.error(`\n REFUSED — ${held.length} run(s) queued, claimed, parked or in flight.`);
|
|
328
337
|
for (const q of holds.queued) console.error(` queued ${q.id}`);
|
|
329
338
|
for (const c of holds.claimed) console.error(` claimed ${c.id} pid ${c.pid ?? "unknown"}`);
|
|
339
|
+
for (const p of holds.parked) console.error(` parked ${p.id}`);
|
|
330
340
|
for (const sl of holds.slots) console.error(` slot ${sl.file} pid ${sl.pid}`);
|
|
331
341
|
console.error(packaged
|
|
332
342
|
? "\n An update replaces the program's files under whatever is running. Nothing was touched."
|
package/build-info.json
CHANGED
package/docs/DELIVERY.md
CHANGED
|
@@ -213,7 +213,7 @@ surface for non-staff readers on this engine:
|
|
|
213
213
|
(`customer/<key>/index.html`) links `report.html` (`publish/index.mjs`) with no split language.
|
|
214
214
|
- **One preparation chokepoint.** What a non-staff reader receives is prepared by the portal's
|
|
215
215
|
`readReport()` (`driver/portal-report.mjs`, `staff:false`), which removes the reader-visible
|
|
216
|
-
deltas — `[internal]` review tails, the internal band/reviewer shorthand, the staff Ask
|
|
216
|
+
deltas — `[internal]` review tails, the internal band/reviewer shorthand, the staff Ask AI
|
|
217
217
|
connector — in one place, rather than at render time into a second document.
|
|
218
218
|
|
|
219
219
|
**A surface for non-staff readers must read through `readReport()`, never open a report by path.** That is
|
package/docs/PORTAL.md
CHANGED
|
@@ -55,7 +55,7 @@ burned it.
|
|
|
55
55
|
signed-out API caller gets the same 401 the edge produces for a missing JWT.
|
|
56
56
|
- `GET /portal/api/searches?account=` — registry levels + the company's saved recipes.
|
|
57
57
|
- `POST /portal/api/run/plan` — the **confirmation gate**: validation, the registry-derived
|
|
58
|
-
stage label (never a company's recipe label), mark count, turnaround hint,
|
|
58
|
+
stage label (never a company's recipe label), mark count, turnaround hint, and
|
|
59
59
|
a 10-minute HMAC `confirmationToken` bound to the fields of the server-stamped job that fix scope,
|
|
60
60
|
cost and identity (`jobHashOf`: marks, markName, classes, goods, product/recipeKey), the confirming
|
|
61
61
|
identity, and a ONE-SHOT jti. Jurisdictions are deliberately OUTSIDE the hash, so the plan step can
|
package/docs/RELEASES.md
CHANGED
|
@@ -56,5 +56,5 @@ Downgrading is an ordinary install of the older version. Your configuration and
|
|
|
56
56
|
by either — they live outside the package — so moving between channels is not a migration.
|
|
57
57
|
|
|
58
58
|
Every version's notes are on the [releases page](https://github.com/CordilleraSarl/clearotron/releases)
|
|
59
|
-
and in `CHANGELOG.md
|
|
59
|
+
and in [`CHANGELOG.md`](https://github.com/CordilleraSarl/clearotron/blob/main/CHANGELOG.md), grouped Before you upgrade / New / Fixed / For operators. A beta's notes are the same notes; the stable
|
|
60
60
|
that follows aggregates all of them into one entry.
|
|
@@ -113,7 +113,7 @@ packet-sender; the driver does not change.
|
|
|
113
113
|
## The engine seam
|
|
114
114
|
|
|
115
115
|
One stage execution = one `runStage()` call = one engine invocation. Everything provider-specific
|
|
116
|
-
lives behind the seam (`engine/CONTRACT.md`; selection in `
|
|
116
|
+
lives behind the seam (`engine/CONTRACT.md`; selection in `engine/registry.mjs` `selectEngine()`). Engine
|
|
117
117
|
choice is **process-wide**: `CLEAROTRON_AI` is read at every activation and governs every stage of
|
|
118
118
|
every job in it. There is no per-stage, per-job or comms-specific override, so comparing the two
|
|
119
119
|
engines means flipping the variable and running sequentially, or standing up a second instance.
|
|
@@ -266,12 +266,20 @@ All paths relative to [`driver/`](../../driver/). The load-bearing seven are mar
|
|
|
266
266
|
| Module | Role |
|
|
267
267
|
|---|---|
|
|
268
268
|
| ● `runner.mjs` | Queue drain: claims, dedup, parks, orphan reclaim, admission budget, graceful stop. |
|
|
269
|
-
| ● `pipeline.mjs` | The run:
|
|
269
|
+
| ● `pipeline.mjs` | The clearance run: the run slot, the preflight and the freezes, then its ordered steps (`steps/`), handed to `runShell`. The largest module in the tree; [03](03-run-lifecycle.md) is its map. |
|
|
270
270
|
| ● `stages.mjs` | The clearance lane's per-stage declaration table (tier/model, thinking, timeout + stall, skill reads, output, validator) + stage messages. Not the only one: the knockout lane keeps `KO_STAGES` in its own table. |
|
|
271
271
|
| ● `gateway.mjs` | `runStage()`: attempt ladder, warm patch, file-truth gating, fail taxonomy, engine selection, turn/ping lanes. |
|
|
272
272
|
| ● `engine/` | The engine seam: `CONTRACT.md`, `anthropic-agent.mjs`, `openai-agent.mjs`, `common.mjs` (shared spawn/watchdog substrate), `mcp/` (engine-local gather servers). |
|
|
273
273
|
| ● `verify.mjs` | Structural validators for every stage output + `parseVerdict` (the verdict gate's parser). |
|
|
274
274
|
| ● `driver.config.mjs` | Env → config resolution: paths, caps, engine + register-provider selection, credential preflight. |
|
|
275
|
+
| `steps/` | The clearance's steps, one module each, in the order `pipeline.mjs` hands them to `runShell`: intake, register sweep, frame comparison, placement and digest, skeptic and follow-up, synthesis, correction cycle, verdict gate, overview and cards, delivery. `corrections.mjs` holds what the correction steps share. |
|
|
276
|
+
| `run-shell.mjs` | What every run does around its steps, the same for a clearance and a Knockout: it runs a product's steps in order, ends a failure through `run-failed.mjs` and a delivery through the product's ending. |
|
|
277
|
+
| `run-failed.mjs` | The failure path of both products: postpone, stop, park for recovery or end, and the notice it sends. |
|
|
278
|
+
| `run-delivered.mjs` | How a clearance ends delivered: the publish, the packet, the delivered state and the archive. |
|
|
279
|
+
| `run-outcome.mjs` | How a run that cannot finish is described: the failure a stage raises, the designed refusal, and the packet that tells the requester. |
|
|
280
|
+
| `run-park.mjs` | The one writer of `.postponed`, the marker a parked run resumes from. |
|
|
281
|
+
| `run-record.mjs` | The one door to a run's files: where they are, and how they are read and written. |
|
|
282
|
+
| `portal-service.mjs` · `portal-routes/` · `portal-runs.mjs` · `portal-confirmation.mjs` | The portal: the service, its routes grouped one module per area ([`portal-routes/README.md`](../../driver/portal-routes/README.md)), the runs a reader can see, and the token that confirms an order. |
|
|
275
283
|
| `pipeline-knockout.mjs` · `stages-knockout.mjs` · `verify-knockout.mjs` | The knockout (triage) lane: its own run body, its own stage table (`KO_STAGES`) and its own validators. `pipeline()` dispatches into it on a knockout policy, so its stages can never leak into the clearance `STAGE_ORDER`. |
|
|
276
284
|
| `phase0.mjs` | Pure run identity: slug, codename, dates, run/archive dirs. |
|
|
277
285
|
| `enqueue-schema.mjs` | Job-file shape, `validateJob` classification (reject/clarify/run). |
|
|
@@ -168,8 +168,12 @@ off-gateway and never took a lane, so by the end it governed an empty set. Compu
|
|
|
168
168
|
|
|
169
169
|
## 3 — The stage sequence
|
|
170
170
|
|
|
171
|
-
Everything below
|
|
172
|
-
|
|
171
|
+
Everything below is the clearance's steps. `pipelineInner()` (`pipeline.mjs`) hands them, in order, to
|
|
172
|
+
`runShell` (`run-shell.mjs`): intake, register-sweep, frame-comparison, placement-and-digest,
|
|
173
|
+
skeptic-and-follow-up, synthesis, correction-cycle, verdict-gate, overview-and-cards and delivery, one
|
|
174
|
+
module each under `steps/`. A step that throws ends through `run-failed.mjs`, the recovery machinery
|
|
175
|
+
(§5). A delivered run ends through `run-delivered.mjs`. A Knockout hands its own steps to the same
|
|
176
|
+
`runShell` from `pipeline-knockout.mjs`. Before the first step and before any model spend: run slot, register
|
|
173
177
|
credential preflight (fail-fast — a resume without the provider credential must not burn stages),
|
|
174
178
|
profile freeze to `_driver/profile.json`, framework freeze, instructed-scope record, and status
|
|
175
179
|
seeding. Frozen sidecars are never silently re-derived; a corrupt one crashes loudly by design.
|
|
@@ -243,7 +243,7 @@ deployment may override (verify live values per deployment).
|
|
|
243
243
|
| `CLEAROTRON_STOP_GRACE_MS` | 60000 | Grace after first SIGTERM before exit(1). |
|
|
244
244
|
| `CLEAROTRON_MAX_CLAIM_AGE_MS` | 172800000 (48 h; 0 disables) | Hard ceiling on a claim's age (from the `.pid` sidecar mtime) — beyond it, re-claim regardless of liveness. |
|
|
245
245
|
| `CLEAROTRON_KNOCKOUT_VARIANT_CAP` | unset (⇒ the lane's own cap) | Ceiling on variants a knockout screens per name. Set only to bound an unusually wide batch; absent means the lane decides. |
|
|
246
|
-
| `CLEAROTRON_SIGNA_ANSWER_MEMORY` | `
|
|
246
|
+
| `CLEAROTRON_SIGNA_ANSWER_MEMORY` | `on` | On the Signa register, whether a run reuses an answer it already holds instead of asking again. `off` asks every time. `watch` also asks every time, and records whether a held answer would have matched. `on` reuses held answers. |
|
|
247
247
|
| `CLEAROTRON_CLARIVATE_ANSWER_MEMORY` | `on` | On the Clarivate register, whether a run reuses a count, a search, an owner lookup or a record it already holds instead of asking again. `off` asks every time. |
|
|
248
248
|
|
|
249
249
|
### Retries, timeouts, watchdogs
|
|
@@ -348,8 +348,8 @@ cannot be read as one list.
|
|
|
348
348
|
| `ANTHROPIC_DEFAULT_OPUS_MODEL` / `ANTHROPIC_DEFAULT_SONNET_MODEL` / `ANTHROPIC_DEFAULT_HAIKU_MODEL` / `ANTHROPIC_DEFAULT_FABLE_MODEL` | The model each tier's alias resolves to, read by the Claude program: on Foundry, the deployment names; anywhere, a way to hold a tier still. Set the fable one to your Fable deployment's name if you set `CLEAROTRON_SYNTHESIS_MODEL=fable`; setup does not ask for it. |
|
|
349
349
|
| `OPENAI_API_KEY` | **Read only to be DELETED.** The `openai-agent` adapter strips it from the `codex exec` environment under subscription billing, so an unrelated key exported on the box cannot spoil a clean subscription bill. It is never the api-key credential for this product — that is `CODEX_API_KEY`. Listed because a reader who has one set needs to know it is removed. |
|
|
350
350
|
| `CORSEARCH_SESSION_KEY` | Register provider auth (session cookie). **Preflighted at run start — a missing credential fails fast before any model spend.** |
|
|
351
|
-
| `CLARIVATE_API_KEY` / `CLARIVATE_API_BASE` | Clarivate adapter — on the engine path: `clarivate
|
|
352
|
-
| `SIGNA_API_KEY` / `SIGNA_BASE_URL` | Signa adapter — the recommended tier's credential pair, with the same four driver-side adapters and its own `signa
|
|
351
|
+
| `CLARIVATE_API_KEY` / `CLARIVATE_API_BASE` | Clarivate adapter — on the engine path: `providers/clarivate/src/mount.js` in `gather-config.mjs`'s stage-grant table, plus driver-side `recordFetch` / `countHits` / `listRecords` / `executePlan`. `CLARIVATE_API_BASE` overrides the core's `DEFAULT_BASE`. |
|
|
352
|
+
| `SIGNA_API_KEY` / `SIGNA_BASE_URL` | Signa adapter — the recommended tier's credential pair, with the same four driver-side adapters and its own `providers/signa/src/mount.js`. `SIGNA_BASE_URL` is optional and falls back to the core's `DEFAULT_BASE`. See [`providers/README.md`](../../providers/README.md), which carries the one open gap on this path: the stage grant in `gather-config.mjs` hands Signa a far narrower register-tool set than the other providers, `register_enumerate` among the withheld, and gives no probed reason for it. |
|
|
353
353
|
| `PERPLEXITY_API_KEY` | Marketplace grid research server. |
|
|
354
354
|
| `EUIPO_CLIENT_ID` / `EUIPO_CLIENT_SECRET` / `EUIPO_ENVIRONMENT` | EUIPO OAuth2 client-credentials; environment defaults to **sandbox** — production requires an explicit set. |
|
|
355
355
|
| `CLEAROTRON_MCP_URL` | Staff "Ask your AI" connector base, baked into the report at render — there is one report, and `portal-report.mjs` strips the block for non-staff readers at serve time. Fails closed → link omitted when unset. |
|
|
@@ -125,8 +125,8 @@ has taken it.
|
|
|
125
125
|
(`pipeline.mjs` `RETIRED_ENV`, `jx-units.mjs`) and nothing reads it, so renaming a dead name looked like
|
|
126
126
|
handing an operator a name that warns about nothing. A decision of 2026-09-04 reversed that: the
|
|
127
127
|
whole namespace carries one prefix, dead names included, because a tree spelled two ways costs more
|
|
128
|
-
than a retired row spelled consistently. The per-lane `CLEAROTRON_NATIVE_LANGUAGE_<code>` switch in the same row
|
|
129
|
-
|
|
128
|
+
than a retired row spelled consistently. The per-lane `CLEAROTRON_NATIVE_LANGUAGE_<code>` switch in the same row was
|
|
129
|
+
retired on 2026-11-11 (§5.5).
|
|
130
130
|
|
|
131
131
|
Variables outside the install surface were left alone by the August rename — `CLEAROTRON_ENGINE_MAX_BUFFER`
|
|
132
132
|
and its siblings were never in that window. **That separate decision was taken on 2026-09-04**: the rename
|
|
@@ -233,8 +233,9 @@ environment reads what the ACTIVE provider can actually do.
|
|
|
233
233
|
|
|
234
234
|
### 5.5 Search-depth spine — T3 (defaults OFF; arm deliberately)
|
|
235
235
|
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
`CLEAROTRON_JX_SERP_DEADLINE_MS`. The per-lane `CLEAROTRON_NATIVE_LANGUAGE_<XX>` switch for `zh`, `ja` and `ko`
|
|
237
|
+
was **retired on 2026-11-11**: no deployment set it, and a lane in the run's frozen lane decision always
|
|
238
|
+
runs. A box that still sets it is warned that it does nothing (`pipeline.mjs` `RETIRED_ENV`).
|
|
238
239
|
`CLEAROTRON_JX_SERP_GRID`, `CLEAROTRON_JX_NATIVEREAD` and `CLEAROTRON_JX_CONSUME` were **deleted by item 8**
|
|
239
240
|
under ADR-0002: each was off here and on in production, so the shipped default described a
|
|
240
241
|
configuration nobody ran. The slices now run on conditions a requester can already see.
|
|
@@ -118,7 +118,7 @@ The seam is real but has known single-vendor assumptions outside it. The full pa
|
|
|
118
118
|
zero. `modelWire` is the same discipline for the model gauge: the served id the turn OBSERVED on the
|
|
119
119
|
wire, or `null` — never the alias you asked for. The gateway derives `modelActual` / `modelBasis` /
|
|
120
120
|
`modelMismatch` from it, so an adapter that never sets it stamps every row `unknown`.
|
|
121
|
-
3. Register it: add the adapter to the `ENGINES` map in `
|
|
121
|
+
3. Register it: add the adapter to the `ENGINES` map in `engine/registry.mjs` (or call `registerEngine()`),
|
|
122
122
|
and add its binary to `ENGINE_BINARIES` in `driver.config.mjs` so the setup wizard can offer it —
|
|
123
123
|
the two lists are pinned against each other, because "the wizard offers an engine the driver does
|
|
124
124
|
not ship" and "the driver ships an engine setup cannot reach" are both invisible otherwise. Then
|
|
@@ -138,10 +138,10 @@ The reasoning layer dictates what it needs; a thin adapter supplies it. Concrete
|
|
|
138
138
|
normalization, record normalization into the provider-neutral fields the driver reads
|
|
139
139
|
(`REC` accessors in `registry-fidelity.mjs` — application/registration numbers, dates,
|
|
140
140
|
`statusClass`, proprietor, designations).
|
|
141
|
-
2. **
|
|
142
|
-
it to `REGISTER_SERVERS` in `gather-config.mjs` (`registerEntry()` **throws loudly** for any provider
|
|
141
|
+
2. **The tools**: wrap the core in `providers/<id>/src/mount.js`, like corsearch's (~130 lines); the one
|
|
142
|
+
register server mounts it by name. Add it to `REGISTER_SERVERS` in `gather-config.mjs` (`registerEntry()` **throws loudly** for any provider
|
|
143
143
|
without a built server — a provider flip without the server breaks every register unit, loudly).
|
|
144
|
-
3. **Driver
|
|
144
|
+
3. **Driver adapter**: `providers/<id>/src/adapter.js`, listed in `PROVIDERS` in `driver.config.mjs` (label, credential env name,
|
|
145
145
|
`recordFetch` + `executePlan` adapters, public-record-URL capability) — the credential is
|
|
146
146
|
preflighted at run start. Add the id to `KNOWN_REGISTER_PROVIDERS` too, or the error message that
|
|
147
147
|
tells an operator what to set will omit it. Selection is `CLEAROTRON_DATABASE` in every
|
|
@@ -142,7 +142,7 @@ the company's name, the goods description, or any profile material.
|
|
|
142
142
|
| `signa` | `api.signa.so` | `providers/signa/src/core.js` |
|
|
143
143
|
| `euipo` | `euipo.europa.eu` and `api.euipo.europa.eu` in production; `auth-sandbox.euipo.europa.eu` and `api-sandbox.euipo.europa.eu` under `EUIPO_ENVIRONMENT=sandbox` — different hosts, different corpora | `providers/euipo/src/euipo-client.js` |
|
|
144
144
|
| `uspto-local` | **Nothing.** Queries read a local SQLite FTS5 file at `USPTO_LOCAL_DB` | `providers/uspto-local/src/index-store.js` |
|
|
145
|
-
| `free-tier` | The EUIPO hosts above, and nothing else — the composite pairs EUIPO with the local US index | `
|
|
145
|
+
| `free-tier` | The EUIPO hosts above, and nothing else — the composite pairs EUIPO with the local US index | `providers/free-tier/src/mount.js` |
|
|
146
146
|
|
|
147
147
|
`api.uspto.gov` is reached by the index build alone — `npm run sync:uspto`, which downloads the bulk
|
|
148
148
|
corpus (`providers/uspto-local/src/sync.js`). No clearance run contacts it.
|
|
@@ -10,13 +10,12 @@ description: Orchestrator for preliminary trademark search requests with registe
|
|
|
10
10
|
- [Register sources — the active vendor is the source of truth](#register-sources--the-active-vendor-is-the-source-of-truth)
|
|
11
11
|
- [Model](#model)
|
|
12
12
|
- [Upfront instructions (per-mark guidance from the reviewing lawyer)](#upfront-instructions-per-mark-guidance-from-the-reviewing-lawyer)
|
|
13
|
-
- [Scope discipline — "stop if manageable"](#scope-discipline--stop-if-manageable)
|
|
14
13
|
- [Process overview](#process-overview)
|
|
15
14
|
- [HITL exception (shared across sub-skills)](#hitl-exception-shared-across-sub-skills)
|
|
16
15
|
- [Failure fallbacks](#failure-fallbacks)
|
|
17
16
|
- [Phase 0 — Workspace hygiene + matter-frame + template selection (run-start)](#phase-0--workspace-hygiene--matter-frame--template-selection-run-start)
|
|
18
17
|
- [Phase 1 — Template](#phase-1--template)
|
|
19
|
-
- [Phase 2 — Research and synthesis](#phase-2--research-and-synthesis) → detail in [phase2-execution.md](phase2-execution.md)
|
|
18
|
+
- [Phase 2 — Research and synthesis](#phase-2--research-and-synthesis) → detail in [phase2-execution.md](../../../driver/skills/clearance-search/phase2-execution.md)
|
|
20
19
|
- [Phase 3 — Delivery](#phase-3--delivery)
|
|
21
20
|
- [Delivery & handoff](#delivery--handoff)
|
|
22
21
|
- [Reply rules](#reply-rules)
|
|
@@ -30,12 +29,12 @@ This file is the **driver's compute orchestration spec** — it lives in `driver
|
|
|
30
29
|
This workflow is run by the **deterministic driver** (`driver/`): an intake path (the `enqueue` CLI or the ops-MCP `start_run` tool) enqueues a job and the driver invokes each stage as a standalone compute turn (the `anthropic-agent` engine — a headless `claude -p` process off the gateway; sequencing, fan-in, gating, retries all in code). The judgment content + companion files below are what the stages read; the driver passes each stage its run-dir paths + the job context (email message id, forwarder, instructions, mark names).
|
|
31
30
|
|
|
32
31
|
Companion files (this skill):
|
|
33
|
-
- [phase2-execution.md](phase2-execution.md) — Phase 2 methodology (variants → gather → Touchpoint 2 placement → digest → skeptic review → cross-pollination → synthesis → Touchpoint 3 narrative refutation → case-law grounding)
|
|
32
|
+
- [phase2-execution.md](../../../driver/skills/clearance-search/phase2-execution.md) — Phase 2 methodology (variants → gather → Touchpoint 2 placement → digest → skeptic review → cross-pollination → synthesis → Touchpoint 3 narrative refutation → case-law grounding)
|
|
34
33
|
- [template-formatting.md](template-formatting.md) — HTML/CSS spec for the report
|
|
35
|
-
- [risk-framework.md](risk-framework.md) — the house-default band ladder (Very High · High · Moderate · Manageable), each band stated as Legal position, Practical position and Potential consequences
|
|
36
|
-
- [synthesis-rules.md](synthesis-rules.md) — how to combine common-law + register findings into a single risk assessment (carries the default-to-senior-lawyer-judgment posture)
|
|
37
|
-
- [worked-examples.md](worked-examples.md) — the analytical depth target
|
|
38
|
-
- [templates/email/](
|
|
34
|
+
- [risk-framework.md](../../../driver/skills/clearance-search/risk-framework.md) — the house-default band ladder (Very High · High · Moderate · Manageable), each band stated as Legal position, Practical position and Potential consequences
|
|
35
|
+
- [synthesis-rules.md](../../../driver/skills/clearance-search/synthesis-rules.md) — how to combine common-law + register findings into a single risk assessment (carries the default-to-senior-lawyer-judgment posture)
|
|
36
|
+
- [worked-examples.md](../../../driver/skills/clearance-search/worked-examples.md) — the analytical depth target
|
|
37
|
+
- [templates/email/](email-generic.md) — a RECORD of the retired per-customer email bodies (`generic.md`), kept for history. Nothing selects one and no seat writes from one: `composeEmailHtml` composes the single cover note in code. Do not draft against it
|
|
39
38
|
|
|
40
39
|
Top-level reusable judgment skills (the three new "touchpoints" — see Phase 2 below):
|
|
41
40
|
- `matter-frame` — runs **inline** at Phase 0: produces `matter-context.md` naming client + sector + customer base + materially-matters jurisdictions + off-field sectors + watchlist-owner seeds. Strategic foundation the rest of the workflow reasons against. Reusable by `knockout-searches` and future clearance-search.
|
|
@@ -101,18 +100,6 @@ Before Phase 1, scan the forwarded email body for **per-mark guidance** from the
|
|
|
101
100
|
|
|
102
101
|
This hook exists because some judgment calls (mark-element distinctiveness, industry-specific enforcement patterns) require the reviewing lawyer's institutional knowledge and cannot be reliably inferred from the search itself.
|
|
103
102
|
|
|
104
|
-
## Scope discipline — "stop if manageable"
|
|
105
|
-
|
|
106
|
-
When the request form lists multiple proposed names and includes language like *"preferred name — please stop review here if manageable"*, the skill MUST honour it:
|
|
107
|
-
|
|
108
|
-
1. Run the full Phase 2 workflow on the **preferred (first) name only**.
|
|
109
|
-
2. Synthesise its risk verdict.
|
|
110
|
-
3. **If the preferred name is rated Composite 1 or 2 (Manageable / Low Risk),** stop. Do not run the alternates. Deliver Phase 1 + the preferred name's Phase 2 + 3 output. Note in the narrative: "Per request form, review stopped at [preferred name] as risk was assessed manageable. Alternates not searched."
|
|
111
|
-
4. **If the preferred name is rated Composite 3+,** continue to the alternates so the reviewing lawyer has the full picture for selecting a fallback.
|
|
112
|
-
5. The reviewing lawyer is the final arbiter — if their upfront instructions say otherwise (e.g. "run all three regardless"), follow those instructions.
|
|
113
|
-
|
|
114
|
-
This prevents producing noise findings on names that the client never intended to evaluate.
|
|
115
|
-
|
|
116
103
|
## Process overview
|
|
117
104
|
|
|
118
105
|
Three phases, all complete before a single reply is sent to the forwarder.
|
|
@@ -120,16 +107,16 @@ Three phases, all complete before a single reply is sent to the forwarder.
|
|
|
120
107
|
**Phase 1 — Template:**
|
|
121
108
|
1. Extract all fields from the forwarded search request form
|
|
122
109
|
2. Mark the email as read immediately (prevents duplicate processing if a heartbeat picks up the same unread email)
|
|
123
|
-
3. Derive the run slug and open the run-dir from those fields — Phase 1 authors NO client prose. The report is written in Phase 2 synthesis (per [delivery-contract.md](delivery-contract.md)) and the client email is composed in CODE at Phase 3 (`composeEmailHtml`)
|
|
110
|
+
3. Derive the run slug and open the run-dir from those fields — Phase 1 authors NO client prose. The report is written in Phase 2 synthesis (per [delivery-contract.md](../../../driver/skills/clearance-search/delivery-contract.md)) and the client email is composed in CODE at Phase 3 (`composeEmailHtml`)
|
|
124
111
|
|
|
125
|
-
**Phase 2 — Research and synthesis** (run by the deterministic driver; methodology in [phase2-execution.md](phase2-execution.md)):
|
|
112
|
+
**Phase 2 — Research and synthesis** (run by the deterministic driver; methodology in [phase2-execution.md](../../../driver/skills/clearance-search/phase2-execution.md)):
|
|
126
113
|
1. **Variants** — `clearance-variants` produces the variant manifest (consumes `matter-context.md` from Phase 0)
|
|
127
114
|
2. **Gather** — common-law + the applicable register units run as batched stages against the manifest
|
|
128
115
|
3. **Touchpoint 2: placement-inquiry** — structured inquiry per candidate; produces `placement-recommendations.md` (each candidate placed headline / sheet-2 / watchlist / out-of-scope with reasoning)
|
|
129
116
|
4. **Register digest** — combines the unit digests into `register-findings.md`; consumes `placement-recommendations.md`
|
|
130
117
|
5. **Skeptic review** — a fresh-eyes coverage check; a unit with a gap its register can close is re-run
|
|
131
118
|
6. **Cross-pollination** — Option D deterministic cross-checks (cap N=10) using both layers' findings
|
|
132
|
-
7. **Synthesis** — joint risk analysis using [risk-framework.md](risk-framework.md) and [synthesis-rules.md](synthesis-rules.md)
|
|
119
|
+
7. **Synthesis** — joint risk analysis using [risk-framework.md](../../../driver/skills/clearance-search/risk-framework.md) and [synthesis-rules.md](../../../driver/skills/clearance-search/synthesis-rules.md)
|
|
133
120
|
8. **Touchpoint 3: narrative-refutation** — refutes the narrative against the source files; produces `senior-eye-review.md` (verdict CLEAR / CONDITIONAL / BLOCKING)
|
|
134
121
|
9. **Case-law grounding** — ground watchlist / enforcer findings in cited precedent
|
|
135
122
|
10. **Cross-mark references** — once, after all marks complete (multi-mark requests only)
|
|
@@ -184,14 +171,14 @@ On every invocation, before Phase 1:
|
|
|
184
171
|
|
|
185
172
|
1. **Generate the run codename** — a random `<adjective>-<noun>` (lowercase, single hyphen; pick freshly, never reuse a prior run's). This fixes your run-dir leaf `<date>-<codename>` for the entire run.
|
|
186
173
|
2. **Create the run-dir by WRITING into it.** The `write` tool creates parent dirs automatically, so your first write (the matter-context.md in step 3, then `register-units/<axis>.md` files as Phase 2 needs them) creates `studio/clearance-search/<slug>/<date>/`. The unique codename already guarantees a clean, collision-free dir, so there is **nothing to inspect** — do not `read` or list a directory to check or create it; track every file by its known path.
|
|
187
|
-
3. **Run `matter-frame` inline** to produce `studio/clearance-search/<slug>/<date>/matter-context.md`. This is the strategic foundation — it names client + sector + customer base + materially-matters jurisdictions + off-field sectors + watchlist-owner seeds. Downstream (Phase 1 variants, Phase 2 register units, Touchpoint 2 placement, Touchpoint 3 refutation) all consume this artifact. Read [matter-frame/SKILL.md](
|
|
174
|
+
3. **Run `matter-frame` inline** to produce `studio/clearance-search/<slug>/<date>/matter-context.md`. This is the strategic foundation — it names client + sector + customer base + materially-matters jurisdictions + off-field sectors + watchlist-owner seeds. Downstream (Phase 1 variants, Phase 2 register units, Touchpoint 2 placement, Touchpoint 3 refutation) all consume this artifact. Read [matter-frame/SKILL.md](../../../driver/skills/matter-frame/SKILL.md) and execute it inline; it makes no tool calls and stays in context.
|
|
188
175
|
4. **Per-customer delivery is driven by the RESOLVED CUSTOMER PROFILE, not the sender domain.** The intake
|
|
189
176
|
AI resolves which customer this is for and stamps `profileKey` on the job (email-loop §B3.2a); the driver
|
|
190
177
|
freezes that profile into `_driver/profile.json`, and the deterministic publish code reads its `delivery`
|
|
191
178
|
descriptor — which today carries only the P&C header flag. `email` no longer selects a body: every
|
|
192
179
|
customer gets the same cover note (`{ email: "summary" }`), and a stored `"table"` folds to it.
|
|
193
180
|
There is no per-customer body left to select and no template to pick: one file remains
|
|
194
|
-
([templates/email/generic.md](
|
|
181
|
+
([templates/email/generic.md](email-generic.md)) and it is a RECORD of the retired
|
|
195
182
|
per-customer body, not an instruction. What the profile still decides is the P&C flag, and it
|
|
196
183
|
decides it through the bound profile, never `*@domain`.
|
|
197
184
|
5. **Phase 3 archives this run** on successful delivery: the dated subdir is moved to `studio/clearance-search/archive/<YYYY-MM>/<slug>/<date>/`. A run that delivered but failed to archive is a workflow violation — Phase 3 (see [Phase 3](#phase-3--delivery--must-pattern)) handles the move.
|
|
@@ -200,7 +187,7 @@ On every invocation, before Phase 1:
|
|
|
200
187
|
|
|
201
188
|
Extract the fields from the Trademark Search Request Form and derive the slug. **Phase 1 produces no client-facing prose** — it is field extraction and run-dir setup, and nothing else.
|
|
202
189
|
|
|
203
|
-
The report body is authored in Phase 2 synthesis against [delivery-contract.md](delivery-contract.md); the email that carries it is composed in CODE at Phase 3 (`composeEmailHtml`), one cover note for every customer. A body drafted here reaches no reader — the notify seat is a courier that sends the driver's file verbatim. ([template-formatting.md](template-formatting.md) survives as the KNOCKOUT RENDERER'S formatting reference — see its header; it is not a drafting instruction to this seat.)
|
|
190
|
+
The report body is authored in Phase 2 synthesis against [delivery-contract.md](../../../driver/skills/clearance-search/delivery-contract.md); the email that carries it is composed in CODE at Phase 3 (`composeEmailHtml`), one cover note for every customer. A body drafted here reaches no reader — the notify seat is a courier that sends the driver's file verbatim. ([template-formatting.md](template-formatting.md) survives as the KNOCKOUT RENDERER'S formatting reference — see its header; it is not a drafting instruction to this seat.)
|
|
204
191
|
|
|
205
192
|
**Slug derivation.** The slug for the run-dir is `tmp<n>-<kebab-mark-name>` — e.g. `tmp2201-project-novapulse`, `tmp8642-glowvault`. The TMP number from the request form's *Reference No.* field is the firm's unique identifier and guarantees uniqueness; the kebab mark name keeps the slug human-readable. Lowercase, ASCII letters / digits / hyphens only. Multi-mark requests: use one slug for the request (typically the first mark); if per-mark separation is needed inside the run, use a `marks/<mark-kebab>/` subdir within the dated dir.
|
|
206
193
|
|
|
@@ -209,7 +196,7 @@ The report body is authored in Phase 2 synthesis against [delivery-contract.md](
|
|
|
209
196
|
## Phase 2 — Research and synthesis
|
|
210
197
|
|
|
211
198
|
Phase 2 is **sequenced by the deterministic driver** (`driver/`); the step-by-step
|
|
212
|
-
**methodology** lives in [phase2-execution.md](phase2-execution.md). It covers:
|
|
199
|
+
**methodology** lives in [phase2-execution.md](../../../driver/skills/clearance-search/phase2-execution.md). It covers:
|
|
213
200
|
- **Step 1** — variants (`clearance-variants` writes the variant manifest)
|
|
214
201
|
- **Step 2** — gather (common-law + the applicable register units) → Touchpoint 2 placement-inquiry → register digest
|
|
215
202
|
- **Step 2.6** — skeptic review (fresh-eyes audit before trust)
|
|
@@ -239,13 +226,13 @@ The driver runs the delivery stage on **every** completed run — the search is
|
|
|
239
226
|
|
|
240
227
|
### Deliverable 1: Narrative summary (email body)
|
|
241
228
|
|
|
242
|
-
**No template is selected and no seat composes this.** `composeEmailHtml` builds the cover note in code from the structure below, one shape for every customer; the files under [templates/email/](
|
|
229
|
+
**No template is selected and no seat composes this.** `composeEmailHtml` builds the cover note in code from the structure below, one shape for every customer; the files under [templates/email/](email-generic.md) are a record of the retired per-customer bodies, not a spec to draft against. The confidentiality marking is `confPosture` (`shared/brand.mjs`) — three-valued, stated there and nowhere else. What follows is the **content** the code renders, described so a reader can see what the mail carries.
|
|
243
230
|
|
|
244
231
|
**Game-title developer attribution MUST come from `common-law-findings.md`'s `developer_of_record` / `publisher_of_record` fields** — never confabulate publishers (Bandai Namco, Tencent, etc.) by inferring from prior-frequent gaming companies. If the field is `not extracted` or empty, write "(developer unverified)" rather than guessing.
|
|
245
232
|
|
|
246
233
|
**Methodology lives in the Excel Methodology tab, NOT in the email body.** Do not include paragraph-length descriptions of search approach, sub-skills invoked, variants generated, etc. in the client-facing email. That bloat is what the render-layer split fixes.
|
|
247
234
|
|
|
248
|
-
**The email is a COVER NOTE; the HTML report is the single master document (wp50).** The house default for every customer: the email carries only the headline risk tier, the report link, and any surviving scope/verdict/handling flags plus reviewer's open questions — no findings body, no client-voice prose, no hand-holding preamble. Client-voice findings live in the **HTML report** (the one surface the client reads). The last exception — a customer's review-table overlay (`delivery.email:'table'`) — is DELETED as of 2026-07-28, along with the knob that asked for it: a second full findings surface in the mail was the seam that let per-conflict tiers diverge from the report, and on the knockout lane it shipped internal purple notes over the wire. A lawyer who needs a bespoke, forwardable client mail asks the assistant to draft one from the run's `report-data.json` — formatting is judgement, and it belongs where judgement lives, not in a profile enum. The operative delivery spec is [delivery-contract.md](delivery-contract.md) + the driver's `report-synthesis` stage. (The `client-summary` stage, which re-voiced the findings into a separate client-facing document, is RETIRED as of 2026-08-01 — the one report is the one surface.)
|
|
235
|
+
**The email is a COVER NOTE; the HTML report is the single master document (wp50).** The house default for every customer: the email carries only the headline risk tier, the report link, and any surviving scope/verdict/handling flags plus reviewer's open questions — no findings body, no client-voice prose, no hand-holding preamble. Client-voice findings live in the **HTML report** (the one surface the client reads). The last exception — a customer's review-table overlay (`delivery.email:'table'`) — is DELETED as of 2026-07-28, along with the knob that asked for it: a second full findings surface in the mail was the seam that let per-conflict tiers diverge from the report, and on the knockout lane it shipped internal purple notes over the wire. A lawyer who needs a bespoke, forwardable client mail asks the assistant to draft one from the run's `report-data.json` — formatting is judgement, and it belongs where judgement lives, not in a profile enum. The operative delivery spec is [delivery-contract.md](../../../driver/skills/clearance-search/delivery-contract.md) + the driver's `report-synthesis` stage. (The `client-summary` stage, which re-voiced the findings into a separate client-facing document, is RETIRED as of 2026-08-01 — the one report is the one surface.)
|
|
249
236
|
|
|
250
237
|
Structure (content shared across templates):
|
|
251
238
|
|
|
@@ -258,7 +245,7 @@ Structure (content shared across templates):
|
|
|
258
245
|
**1. Scope statement** (from variant manifest's scope_statement field)
|
|
259
246
|
> "We conducted common law and marketplace searches and trademark register searches for [N] proposed marks in the context of [product description], focusing on Classes [X, Y, Z]. Our common-law search covered the [N] mandatory marketplaces dictated for this customer (e.g., for gaming: Steam, Epic Games Store, Google Play, Apple App Store, Microsoft Store, itch.io), plus general web, e-commerce, social media and domain registries — and, for any collaborated / non-gaming goods, a general search scoped to those goods (e.g. [pizza]). Our register search ran via [vendor] (with EUIPO for EU/EUTM confirmation) across [N] jurisdictions with funnel narrowing and live-status filtering. Cross-pollination between layers applied per our standard methodology (see audit trail)."
|
|
260
247
|
|
|
261
|
-
**Coverage statement (mandatory, honest).** Right after the scope, state plainly what was and was not searched, from the `## Coverage ledger`: *"Searched to completion in [these jurisdictions / axes]; coverage was limited in [these]; not searched this run in [these] — risk in unsearched markets is **unassessed**, not clean."* A `deferred` / `coverage-limited` jurisdiction is **never** rendered as a clean negative; the reviewing lawyer must see exactly what they are signing off on. **A dropped variant / field / source is a coverage limitation too:** read the variant manifest's `### Scope ledger` section (the variants-stage coverage statement, spanning the variant / field / source layers) alongside the two findings-file ledgers, and surface any `dropped` row as a recall limitation in the same breath (e.g. *"transliteration sweeps were not run — conflicts under non-Latin scripts are unassessed"*; *"the developer ecosystem was not searched — collisions on that channel are unassessed"*) — a dropped variant axis, an off-fielded sector, or an unsearched channel is unsearched recall, never silent absence (see [synthesis-rules.md](synthesis-rules.md) → *Coverage honesty*).
|
|
248
|
+
**Coverage statement (mandatory, honest).** Right after the scope, state plainly what was and was not searched, from the `## Coverage ledger`: *"Searched to completion in [these jurisdictions / axes]; coverage was limited in [these]; not searched this run in [these] — risk in unsearched markets is **unassessed**, not clean."* A `deferred` / `coverage-limited` jurisdiction is **never** rendered as a clean negative; the reviewing lawyer must see exactly what they are signing off on. **A dropped variant / field / source is a coverage limitation too:** read the variant manifest's `### Scope ledger` section (the variants-stage coverage statement, spanning the variant / field / source layers) alongside the two findings-file ledgers, and surface any `dropped` row as a recall limitation in the same breath (e.g. *"transliteration sweeps were not run — conflicts under non-Latin scripts are unassessed"*; *"the developer ecosystem was not searched — collisions on that channel are unassessed"*) — a dropped variant axis, an off-fielded sector, or an unsearched channel is unsearched recall, never silent absence (see [synthesis-rules.md](../../../driver/skills/clearance-search/synthesis-rules.md) → *Coverage honesty*).
|
|
262
249
|
|
|
263
250
|
**2. Per-mark findings** — for each mark, lead with the **proposed-mark assessment**, then the five finding categories:
|
|
264
251
|
|
|
@@ -292,7 +279,7 @@ The **Methodology** sheet carries: matter-context summary, search approach, plac
|
|
|
292
279
|
**Detail-fetch coverage** (register search-depth floor — kept here, not in the Excel spec, because the Step 2.6 skeptic review depends on it) — rank the union of unique URIs returned across all register searches by signal strength, then detail-fetch as follows:
|
|
293
280
|
|
|
294
281
|
1. **Identical-mark hits** — fetch all, no cap.
|
|
295
|
-
2. **Near-exact (dominant-token-substring) in-class-live hits — fetch all, no cap (Slice A).** The mirror, at the orchestrator floor, of the unit-side [exact-in-class-live floor](
|
|
282
|
+
2. **Near-exact (dominant-token-substring) in-class-live hits — fetch all, no cap (Slice A).** The mirror, at the orchestrator floor, of the unit-side [exact-in-class-live floor](../../../driver/skills/clearance-register/unit.md#exact-in-class-live-floor-primary-sweep-unit-owns-it). The **near-exact band** — where the **dominant element** (from the variant manifest) appears as a *substring* of `mark_text` (case-insensitive, after the `normalize()` strip in [status-rules.md](../../../driver/skills/clearance-register/status-rules.md), see the Identical-match normalisation shape) in a **filed target class** with **live** status, but is not an identical match (e.g. NORDWAVE NOVAPULSE, NOVAPULSE.com on dominant element NOVAPULSE) — is **enumerate-and-fetch, no top-N, no score gate**. This is the F-1/F-3 hole: the near-exact band otherwise falls into the Top-K sample (item 5) and a dangerous in-class-live conflict gets paged past the cliff. Slice A is **exhaustive** — distinct from the sample-with-disclosure Slice B below.
|
|
296
283
|
3. **Phonetic-equivalent fringe — floor, sample-with-disclosure (Slice B).** Run the provider phonetic capability on the dominant token for the matter languages (provider-agnostic: `<provider>_expand_phoneme` then `match_mode: phonetic`; Clarivate uses native `match_mode: phonetic`). It **is a floor** — it MUST run for the dominant token in the filed class — but phonetic sets are unbounded, so it is **sample-with-disclosure**: where it cannot be fully worked, the coverage unit is **`coverage-limited`** (reason: "phonetic fringe sampled, not enumerated"), never `confirmed-clean`. Keep Slice A (exhaustive) and Slice B (sampled) **structurally distinct** — they have different correctness properties.
|
|
297
284
|
4. **Watchlist-owner hits** — fetch all.
|
|
298
285
|
5. **Top-K by relevance** — sample from each match-mode (exact / phrase / default) and across regions to ensure representative coverage. If the worker stops detail-fetching before ~25 URIs across all match-modes, the worker MUST answer in its digest audit: did the result set genuinely run out, or is this the empirical execution-tier truncation pattern (~10 URIs, no explanation)? The 25 figure is a tripwire-with-question, not a target — the Step 2.6 skeptic reads the worker's answer and re-spawns escalated to Opus if the answer is missing or unconvincing.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
>
|
|
8
8
|
> This file is kept as the record of the per-customer body that used to exist, so a reader tracing why
|
|
9
9
|
> the delivery shape changed can see what it replaced. **The live spec for the cover note is
|
|
10
|
-
> Deliverable 1 in [SKILL.md](
|
|
10
|
+
> Deliverable 1 in [SKILL.md](clearance-search-spine.md); the confidentiality marking is `confPosture` in
|
|
11
11
|
> `shared/brand.mjs` and nowhere else.**
|
|
12
12
|
|
|
13
13
|
The default client-facing email format. Used when the forwarded request resolved to any client without a per-customer template (e.g. demo customers, internal test runs, new clients). Tight bullets, no customer-specific framing.
|
package/{driver/skills/clearance-search → docs/architecture/retired-manuals}/template-formatting.md
RENAMED
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
> you trust a line.**
|
|
5
5
|
>
|
|
6
6
|
> **LIVE — [Formatting specifications](#formatting-specifications) onward (fonts, colours, table
|
|
7
|
-
> styling, spacing, alignment, CSS classes).** This
|
|
8
|
-
>
|
|
9
|
-
> `padding:0cm 5.4pt`, Calibri 11pt. It is a description of what the renderer emits, addressed to
|
|
7
|
+
> styling, spacing, alignment, CSS classes).** This file records the retired Word template. The renderer does not follow it.
|
|
8
|
+
> It is a description of what the renderer emits, addressed to
|
|
10
9
|
> whoever maintains the renderer. **Changing a value here changes nothing on its own; the renderer is
|
|
11
10
|
> the thing that emits.** Never edit a value here without moving the renderer in the same change, or
|
|
12
11
|
> the two silently disagree and this file starts lying.
|
|
@@ -171,4 +170,4 @@ Consistent with Outlook/Word HTML:
|
|
|
171
170
|
**RETIRED — instructions to a seat that no longer drafts this:**
|
|
172
171
|
|
|
173
172
|
4. ~~**Calibrate against this spec** before sending.~~ Nothing is drafted against this spec, so there is nothing to calibrate. The renderer emits it; the check that matters is `render-frozen`, not a reader's eye.
|
|
174
|
-
5. ~~**Bullet formula (spec 09)**~~ — and it is not merely unused, it is **SUPERSEDED**. It formed the bullet as `Level <Composite 1–5> Risk = <letter A–E>`, and the live doctrine forbids exactly that: `delivery-contract.md` rules ZERO risk codes on a client surface, and [worked-examples.md](worked-examples.md) §"The client-table bullet formula" carries the form in force — the framework's own **band word**, a plain word, never a numeral or letter code. Follow worked-examples.md. Copying the formula above would put a retired rating code in front of a client.
|
|
173
|
+
5. ~~**Bullet formula (spec 09)**~~ — and it is not merely unused, it is **SUPERSEDED**. It formed the bullet as `Level <Composite 1–5> Risk = <letter A–E>`, and the live doctrine forbids exactly that: `delivery-contract.md` rules ZERO risk codes on a client surface, and [worked-examples.md](../../../driver/skills/clearance-search/worked-examples.md) §"The client-table bullet formula" carries the form in force — the framework's own **band word**, a plain word, never a numeral or letter code. Follow worked-examples.md. Copying the formula above would put a retired rating code in front of a client.
|
package/docs/configuration.md
CHANGED
|
@@ -22,7 +22,7 @@ that:
|
|
|
22
22
|
|
|
23
23
|
| | Provider | How you get it | Coverage |
|
|
24
24
|
|---|---|---|---|
|
|
25
|
-
| **1 — recommended** | `signa` | **Self-serve API key**, issued from the vendor's site. No sales call |
|
|
25
|
+
| **1 — recommended** | `signa` | **Self-serve API key**, issued from the vendor's site. No sales call | 15 offices: US, EU, WIPO/Madrid + 12 |
|
|
26
26
|
| **2 — free, with real limits** | `free-tier` (`euipo` + `uspto-local`) | Two free accounts, and a 41.5 GB local build for the US half | EU + US, and nothing else. No sound-alike search |
|
|
27
27
|
| **3 — widest coverage** | `corsearch`, `clarivate` | Credential issued by the vendor | Global; Clarivate reaches 186 offices |
|
|
28
28
|
|
|
@@ -89,3 +89,8 @@ the run that are already disclosed.
|
|
|
89
89
|
**The `resumed-unsplit` arm can retire** once no box can still hold a run whose findings predate the
|
|
90
90
|
split. Nobody has measured that and this addendum does not ask for it now; the condition is written
|
|
91
91
|
down so the question can be asked later rather than rediscovered.
|
|
92
|
+
|
|
93
|
+
**Retired, 2026-11-11.** A run from an earlier build is no longer resumed, so runs left from earlier
|
|
94
|
+
builds no longer reach this code. A current run whose grid has two or more terms splits on its first
|
|
95
|
+
pass, and a resume derives the same grid from the run's frozen inputs, so no current run reaches the arm
|
|
96
|
+
either. The single-member assembly stays for `single-term-grid`, which its tests now drive.
|