2sagaco48 1.0.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/diagnostics.mjs +141 -0
- package/dist/compute.worker-j5ahIpF-.js +1 -0
- package/dist/graph.worker-DG6iGCB9.js +1 -0
- package/dist/index.html +2314 -0
- package/flatten-guide.md +248 -0
- package/index.html +12 -0
- package/package.json +38 -0
- package/src/App.orig.tsx +204 -0
- package/src/App.orig1.tsx +27 -0
- package/src/App.orig2.tsx +25 -0
- package/src/App.tsx +3 -0
- package/src/BaseApp.tsx +18 -0
- package/src/INTEGRATION_LEDGER.md +22 -0
- package/src/PERSIST_CANARY.orig.txt +1 -0
- package/src/PERSIST_CANARY.txt +1 -0
- package/src/REGRESSION_LEDGER.md +651 -0
- package/src/TEMPLATE_PIPELINE_AUDIT.md +208 -0
- package/src/WILLIAMS_PERSONA_GUIDE.md +62 -0
- package/src/chat/VeritasChat.tsx +69 -0
- package/src/chat/synthesis.ts +31 -0
- package/src/chat/tier.ts +45 -0
- package/src/components/AdaptersPage.orig.tsx +99 -0
- package/src/components/AdaptersPage.tsx +3 -0
- package/src/components/AdversarialPanel.tsx +136 -0
- package/src/components/AnchorBaselinePanel.tsx +75 -0
- package/src/components/AnswerPanel.tsx +60 -0
- package/src/components/ArtifactPanel.tsx +43 -0
- package/src/components/ChatApp.orig.tsx +1582 -0
- package/src/components/ChatApp.orig1.tsx +722 -0
- package/src/components/ChatApp.tsx +95 -0
- package/src/components/ChatAugmentPanels.tsx +73 -0
- package/src/components/CitationLedgerPanel.tsx +313 -0
- package/src/components/ComputeSandboxPanel.tsx +130 -0
- package/src/components/ConfigPanel.tsx +110 -0
- package/src/components/ControlPlanePage.tsx +195 -0
- package/src/components/CreativeTreeLifePage.tsx +234 -0
- package/src/components/CreativeTreeOfLifePanel.tsx +149 -0
- package/src/components/DebugTracePanel.tsx +137 -0
- package/src/components/DeepReasoningTrace.tsx +48 -0
- package/src/components/EntitySheetPanel.tsx +51 -0
- package/src/components/FailureModesPanel.tsx +104 -0
- package/src/components/GBSDashboard.tsx +239 -0
- package/src/components/GraphView.tsx +116 -0
- package/src/components/HUD.tsx +125 -0
- package/src/components/HypothesisPanel.tsx +67 -0
- package/src/components/InnovationGenomeEngine.tsx +792 -0
- package/src/components/InnovationPersonaGuide.tsx +348 -0
- package/src/components/InnovationPersonaPanel.tsx +289 -0
- package/src/components/LiveResourceHUD.tsx +109 -0
- package/src/components/LongWriterPanel.tsx +112 -0
- package/src/components/MainPipelineV10Bridge.tsx +72 -0
- package/src/components/MarkdownLite.tsx +63 -0
- package/src/components/MemoryInspector.tsx +38 -0
- package/src/components/MemoryMonitor.tsx +52 -0
- package/src/components/MemoryStressPanel.tsx +176 -0
- package/src/components/ModulesPage.tsx +171 -0
- package/src/components/PipelineDebugConsole.orig.tsx +1856 -0
- package/src/components/PipelineDebugConsole.tsx +3 -0
- package/src/components/PreFlightHUD.tsx +67 -0
- package/src/components/PrismaFetchTracePanel.tsx +87 -0
- package/src/components/ReportOSPanel.tsx +165 -0
- package/src/components/ResourceEstimatorPage.tsx +327 -0
- package/src/components/RichText.tsx +181 -0
- package/src/components/SagaOsPanel.tsx +605 -0
- package/src/components/SagaOsReference.tsx +421 -0
- package/src/components/SagaOsV2Panel.tsx +594 -0
- package/src/components/SagaStyleTab.tsx +382 -0
- package/src/components/SageBlueprintPanel.tsx +416 -0
- package/src/components/SharedChatInput.tsx +77 -0
- package/src/components/StatFinancePanel.tsx +190 -0
- package/src/components/StylePersonaPanel.tsx +128 -0
- package/src/components/TemplatesPage.tsx +300 -0
- package/src/components/TestPanel.tsx +63 -0
- package/src/components/TraceLog.tsx +89 -0
- package/src/components/V15CalibrationAugment.tsx +1134 -0
- package/src/components/V15CalibrationDialog.tsx +1871 -0
- package/src/components/V15Overlay.orig.tsx +120 -0
- package/src/components/V15Overlay.tsx +4 -0
- package/src/components/V15OverlayWrapper.tsx +362 -0
- package/src/components/V15Toggle.tsx +34 -0
- package/src/console/DiagnosticRecoveryPanel.tsx +358 -0
- package/src/console/EngineeringConsole.tsx +103 -0
- package/src/console/FictionSystemPanels.tsx +882 -0
- package/src/console/InspectorPanels.tsx +254 -0
- package/src/console/ManuscriptGraderPanel.tsx +182 -0
- package/src/console/RecursiveReviserPanel.tsx +245 -0
- package/src/console/SeedControlPanel.tsx +135 -0
- package/src/console/StoryControllerPanel.tsx +443 -0
- package/src/console/engineBridge.ts +258 -0
- package/src/console/gemini.ts +106 -0
- package/src/console/grading.ts +250 -0
- package/src/console/util.ts +45 -0
- package/src/fiction/continuity.ts +372 -0
- package/src/fiction/crash-protection.ts +111 -0
- package/src/fiction/diagnostics.ts +208 -0
- package/src/fiction/diff.ts +74 -0
- package/src/fiction/entity-state-machine.ts +214 -0
- package/src/fiction/nive-engine.ts +404 -0
- package/src/fiction/pipeline-selftest.ts +132 -0
- package/src/fiction/seed-control.ts +193 -0
- package/src/fiction/story-engine.ts +326 -0
- package/src/fiction/types.ts +68 -0
- package/src/flatten-guide.md +379 -0
- package/src/index.css +14 -0
- package/src/index.orig.css +13 -0
- package/src/lib/academic-sources.base.ts +188 -0
- package/src/lib/academic-sources.orig.ts +28 -0
- package/src/lib/academic-sources.ts +10 -0
- package/src/lib/advanced-math.ts +119 -0
- package/src/lib/adversarial-engine.base.ts +409 -0
- package/src/lib/adversarial-engine.ts +82 -0
- package/src/lib/ai-revision.ts +623 -0
- package/src/lib/app-state.tsx +426 -0
- package/src/lib/artifact-registry.ts +97 -0
- package/src/lib/artifacts.ts +180 -0
- package/src/lib/atlas-dr.ts +167 -0
- package/src/lib/browser-mtls.ts +127 -0
- package/src/lib/browser-queue.ts +221 -0
- package/src/lib/browser-search-scraper.base.ts +382 -0
- package/src/lib/browser-search-scraper.orig.ts +90 -0
- package/src/lib/browser-search-scraper.ts +10 -0
- package/src/lib/calc-interceptor.ts +82 -0
- package/src/lib/citation-lane-tap.ts +78 -0
- package/src/lib/citation-ledger-store.ts +369 -0
- package/src/lib/citation-ledger.ts +203 -0
- package/src/lib/compute-sandbox.ts +215 -0
- package/src/lib/compute.worker.ts +153 -0
- package/src/lib/connectors/gemini.ts +120 -0
- package/src/lib/connectors/jina.ts +233 -0
- package/src/lib/connectors/marketdata.ts +51 -0
- package/src/lib/connectors/prismafetch.base.ts +175 -0
- package/src/lib/connectors/prismafetch.ts +1 -0
- package/src/lib/connectors/serpapi.ts +65 -0
- package/src/lib/connectors/wikidata.ts +44 -0
- package/src/lib/constraints.ts +331 -0
- package/src/lib/continuation-detector.base.ts +153 -0
- package/src/lib/continuation-detector.ts +48 -0
- package/src/lib/contradraft.ts +168 -0
- package/src/lib/cors-proxy.ts +120 -0
- package/src/lib/coverage.ts +81 -0
- package/src/lib/debug/architecture-prescription.ts +556 -0
- package/src/lib/debug/covea-repair.ts +543 -0
- package/src/lib/debug/helios-ground.ts +319 -0
- package/src/lib/debug/intent-decomposer.ts +281 -0
- package/src/lib/debug/intent-lattice.ts +349 -0
- package/src/lib/debug/pipeline-diagnosis.ts +1149 -0
- package/src/lib/debug/pipeline-trace-bus.ts +424 -0
- package/src/lib/debug/prompt-forge.ts +678 -0
- package/src/lib/debug/repair-sites.ts +513 -0
- package/src/lib/debug/research-phase.ts +266 -0
- package/src/lib/debug/retrieval-context.ts +76 -0
- package/src/lib/debug/retrieval-hardener.ts +142 -0
- package/src/lib/debug/scraper-debug-runner.ts +576 -0
- package/src/lib/debug/scraper-forensics.ts +418 -0
- package/src/lib/debug/scraper-lane-roadmap.ts +136 -0
- package/src/lib/debug/self-test.ts +415 -0
- package/src/lib/debug/step-attribution.ts +211 -0
- package/src/lib/debug/template-rubric.ts +301 -0
- package/src/lib/debug/unified-innovation.ts +126 -0
- package/src/lib/debug/veritas-hybrid-scraper.ts +335 -0
- package/src/lib/defense-registry.ts +104 -0
- package/src/lib/defenses.ts +162 -0
- package/src/lib/deterministic-citation-ledger.ts +174 -0
- package/src/lib/elo-registry.base.ts +117 -0
- package/src/lib/elo-registry.ts +1 -0
- package/src/lib/entity-resolver.ts +291 -0
- package/src/lib/failure-modes.ts +267 -0
- package/src/lib/feature-registry.ts +69 -0
- package/src/lib/flaw-registry.ts +143 -0
- package/src/lib/flaws/_template.ts +52 -0
- package/src/lib/flaws/builtins.ts +63 -0
- package/src/lib/flaws/finance.ts +169 -0
- package/src/lib/flaws/fixers.ts +10 -0
- package/src/lib/flaws/index.ts +32 -0
- package/src/lib/flaws/legal.ts +157 -0
- package/src/lib/flaws/medical.ts +188 -0
- package/src/lib/flaws/original-defenses-pack.ts +81 -0
- package/src/lib/flaws/sample-declarative-pack.json +38 -0
- package/src/lib/flaws/selftest.ts +201 -0
- package/src/lib/flaws/software-extended.ts +125 -0
- package/src/lib/flaws/software-rn-webgl.ts +182 -0
- package/src/lib/flaws/statistics-advanced.ts +46 -0
- package/src/lib/flaws/statistics.ts +61 -0
- package/src/lib/gbse/config.ts +20 -0
- package/src/lib/gbse/engine.ts +226 -0
- package/src/lib/gbse/graph.ts +118 -0
- package/src/lib/gbse/graph.worker.ts +21 -0
- package/src/lib/gbse/tests.ts +117 -0
- package/src/lib/gbse/tiers.ts +65 -0
- package/src/lib/gbse/types.ts +94 -0
- package/src/lib/innovation-genome-engine-v2.orig.ts +1001 -0
- package/src/lib/innovation-genome-engine-v2.ts +3 -0
- package/src/lib/innovation-genome-engine.orig.ts +330 -0
- package/src/lib/innovation-genome-engine.ts +3 -0
- package/src/lib/innovation-genome-v10.orig.ts +314 -0
- package/src/lib/innovation-genome-v10.ts +2 -0
- package/src/lib/innovation-genome-v3.orig.ts +2015 -0
- package/src/lib/innovation-genome-v3.ts +2 -0
- package/src/lib/innovation-genome-v4.orig.ts +1959 -0
- package/src/lib/innovation-genome-v4.ts +2 -0
- package/src/lib/innovation-genome-v5.orig.ts +1210 -0
- package/src/lib/innovation-genome-v5.ts +2 -0
- package/src/lib/innovation-genome-v7.orig.ts +2549 -0
- package/src/lib/innovation-genome-v7.ts +2 -0
- package/src/lib/innovation-genome-v8.orig.ts +1485 -0
- package/src/lib/innovation-genome-v8.ts +2 -0
- package/src/lib/innovation-genome-v9.orig.ts +643 -0
- package/src/lib/innovation-genome-v9.ts +2 -0
- package/src/lib/jina.base.ts +293 -0
- package/src/lib/jina.ts +1 -0
- package/src/lib/live-telemetry.ts +61 -0
- package/src/lib/longwriter.ts +84 -0
- package/src/lib/manuscript-grade-v2.ts +298 -0
- package/src/lib/memory-governor.ts +173 -0
- package/src/lib/memory-stress-tests.ts +248 -0
- package/src/lib/model-intelligence.ts +48 -0
- package/src/lib/model-rotator.ts +75 -0
- package/src/lib/models.orig.ts +513 -0
- package/src/lib/models.ts +151 -0
- package/src/lib/n-deep.base.ts +592 -0
- package/src/lib/n-deep.ts +51 -0
- package/src/lib/nih-simulator.ts +56 -0
- package/src/lib/nih-vulnerability-fixes.ts +460 -0
- package/src/lib/omega-templates.base.ts +294 -0
- package/src/lib/omega-templates.ts +225 -0
- package/src/lib/omni-nexus.ts +64 -0
- package/src/lib/oracle-adapters.ts +67 -0
- package/src/lib/oracle-registry.ts +163 -0
- package/src/lib/orchestrator.ts +357 -0
- package/src/lib/output-boundary.ts +235 -0
- package/src/lib/overrides/vite-native-chaos-harness.ts +154 -0
- package/src/lib/overrides/vite-native-contract-plane.ts +245 -0
- package/src/lib/overrides/vite-native-doctor-plane.ts +208 -0
- package/src/lib/overrides/vite-native-knowledge-store.ts +267 -0
- package/src/lib/overrides/vite-native-policy-plane.ts +190 -0
- package/src/lib/overrides/vite-native-replay-plane.ts +197 -0
- package/src/lib/overrides/vite-native-runtime-plane.ts +106 -0
- package/src/lib/overrides/vite-native-scraper.ts +848 -0
- package/src/lib/overrides/vite-native-selftest-functional.ts +217 -0
- package/src/lib/overrides/vite-native-selftest.ts +183 -0
- package/src/lib/overrides/vite-native-snapshot-plane.ts +123 -0
- package/src/lib/philosophy-toolkit.ts +75 -0
- package/src/lib/pipeline.orig.ts +659 -0
- package/src/lib/pipeline.ts +42 -0
- package/src/lib/precache.ts +128 -0
- package/src/lib/py-sandbox.ts +205 -0
- package/src/lib/quality-score.ts +96 -0
- package/src/lib/quant-engine.ts +231 -0
- package/src/lib/quant-lib.ts +80 -0
- package/src/lib/reportos.ts +175 -0
- package/src/lib/research-os.ts +306 -0
- package/src/lib/resource-estimator.ts +114 -0
- package/src/lib/rpm-governor.ts +93 -0
- package/src/lib/runtime-estimator.ts +135 -0
- package/src/lib/sage/empty-space-v6.ts +560 -0
- package/src/lib/sage/empty-space-v7.ts +222 -0
- package/src/lib/sage/empty-space.ts +733 -0
- package/src/lib/sage/engine.ts +786 -0
- package/src/lib/sage/index.ts +17 -0
- package/src/lib/sage/judge.ts +246 -0
- package/src/lib/sage/prng.ts +53 -0
- package/src/lib/sage/reality-grounding.ts +380 -0
- package/src/lib/sage/repetition.ts +151 -0
- package/src/lib/sage/saga-os-v2-engines.ts +1870 -0
- package/src/lib/sage/saga-os-v2.ts +274 -0
- package/src/lib/sage/saga-os-v3-core.ts +1491 -0
- package/src/lib/sage/saga-os-v3-release.ts +739 -0
- package/src/lib/sage/saga-os-v4-aureate.ts +1161 -0
- package/src/lib/sage/saga-os-v4.ts +212 -0
- package/src/lib/sage/saga-os-v5.ts +205 -0
- package/src/lib/sage/saga-os-v6.ts +346 -0
- package/src/lib/sage/saga-os-v7.ts +314 -0
- package/src/lib/sage/saga-os-v8.ts +505 -0
- package/src/lib/sage/saga-os.ts +329 -0
- package/src/lib/sage/taxonomy.ts +403 -0
- package/src/lib/sage/unified-roll.ts +524 -0
- package/src/lib/sage/worked-sketches.ts +44 -0
- package/src/lib/sage.ts +166 -0
- package/src/lib/scraper-debug-bus.ts +53 -0
- package/src/lib/scraper-enhanced.orig.ts +153 -0
- package/src/lib/scraper-enhanced.ts +10 -0
- package/src/lib/scraper-hardener.base.orig.ts +155 -0
- package/src/lib/scraper-hardener.base.ts +317 -0
- package/src/lib/scraper-hardener.ts +1 -0
- package/src/lib/scraper-palisade/palisade-adjudicator.orig.ts +419 -0
- package/src/lib/scraper-palisade/palisade-adjudicator.ts +13 -0
- package/src/lib/scraper-vnext/arbiter-omega.orig.ts +688 -0
- package/src/lib/scraper-vnext/arbiter-omega.ts +13 -0
- package/src/lib/scraper-vnext/canonical-portfolio-augments.ts +479 -0
- package/src/lib/scraper-vnext/canonical-portfolio-orchestrator.orig.ts +1529 -0
- package/src/lib/scraper-vnext/canonical-portfolio-orchestrator.ts +13 -0
- package/src/lib/scraper-vnext/conclave-omega.ts +1830 -0
- package/src/lib/scraper-vnext/content-extractor-v2.ts +226 -0
- package/src/lib/scraper-vnext/diagnostics-suite.ts +36 -0
- package/src/lib/scraper-vnext/epistemic-packer.ts +97 -0
- package/src/lib/scraper-vnext/fusion-v2.ts +65 -0
- package/src/lib/scraper-vnext/hydra-reader.orig.ts +1216 -0
- package/src/lib/scraper-vnext/hydra-reader.ts +13 -0
- package/src/lib/scraper-vnext/native-scraper-browser-vnext.orig.ts +91 -0
- package/src/lib/scraper-vnext/native-scraper-browser-vnext.ts +13 -0
- package/src/lib/scraper-vnext/nexus-consensus.orig.ts +905 -0
- package/src/lib/scraper-vnext/nexus-consensus.ts +13 -0
- package/src/lib/scraper-vnext/portfolio-consensus-adjudicator.ts +804 -0
- package/src/lib/scraper-vnext/portfolio-consensus-memory.ts +377 -0
- package/src/lib/scraper-vnext/portfolio-terminal-governor.ts +548 -0
- package/src/lib/scraper-vnext/query-strategist.orig.ts +224 -0
- package/src/lib/scraper-vnext/query-strategist.ts +423 -0
- package/src/lib/scraper-vnext/retrieval-accelerator.ts +708 -0
- package/src/lib/scraper-vnext/retrieval-audit-augments.ts +477 -0
- package/src/lib/scraper-vnext/retrieval-control-plane.ts +904 -0
- package/src/lib/scraper-vnext/retrieval-policy-augments.ts +358 -0
- package/src/lib/scraper-vnext/safe-fetch-v2.ts +157 -0
- package/src/lib/scraper-vnext/sentinel-omega.ts +56 -0
- package/src/lib/scraper-vnext/sentinel-orchestrator.ts +69 -0
- package/src/lib/scraper-vnext/sibyl-oracle.orig.ts +413 -0
- package/src/lib/scraper-vnext/sibyl-oracle.ts +13 -0
- package/src/lib/scraper-vnext/smart-read-v2.ts +55 -0
- package/src/lib/scraper-vnext/spa-rescue-bridge.ts +608 -0
- package/src/lib/scraper-vnext/strata-engine.orig.ts +2666 -0
- package/src/lib/scraper-vnext/strata-engine.ts +13 -0
- package/src/lib/scraper-vnext/structured-source-adapter.orig.ts +369 -0
- package/src/lib/scraper-vnext/structured-source-adapter.ts +34 -0
- package/src/lib/scraper-vnext/terminal-complete.ts +224 -0
- package/src/lib/scraper-vnext/terminal-final.ts +277 -0
- package/src/lib/scraper-vnext/terminal-saturation.ts +345 -0
- package/src/lib/scraper-vnext/terminal-wire.ts +425 -0
- package/src/lib/scraper-vnext/vanguard-titanium.orig.ts +467 -0
- package/src/lib/scraper-vnext/vanguard-titanium.ts +17 -0
- package/src/lib/search-cache.ts +138 -0
- package/src/lib/sloop-runner.base.ts +223 -0
- package/src/lib/sloop-runner.ts +104 -0
- package/src/lib/sloop.ts +114 -0
- package/src/lib/small-model-adapters.ts +82 -0
- package/src/lib/sscp.ts +86 -0
- package/src/lib/system-map.ts +54 -0
- package/src/lib/uni-node.ts +86 -0
- package/src/lib/universal-rigor-guard.ts +433 -0
- package/src/lib/v15-gate-testbed.ts +274 -0
- package/src/lib/v15-gemini.base.ts +89 -0
- package/src/lib/v15-gemini.ts +1 -0
- package/src/lib/v15-grounding.orig.ts +241 -0
- package/src/lib/v15-grounding.ts +79 -0
- package/src/lib/v15-pipeline.base.ts +769 -0
- package/src/lib/v15-pipeline.orig.ts +1154 -0
- package/src/lib/v15-pipeline.ts +674 -0
- package/src/lib/v15-questions.ts +64 -0
- package/src/lib/v15-rate-limiter.orig.ts +91 -0
- package/src/lib/v15-rate-limiter.ts +48 -0
- package/src/lib/v15-state.base.ts +87 -0
- package/src/lib/v15-state.ts +28 -0
- package/src/lib/visual-table-generator.tsx +207 -0
- package/src/lib/wasm-runtime.ts +133 -0
- package/src/lib/williams-persona-guide.ts +265 -0
- package/src/lib/williams-style.base.ts +464 -0
- package/src/lib/williams-style.ts +59 -0
- package/src/lib/worker-pool.ts +96 -0
- package/src/lib/writing-tiers.ts +125 -0
- package/src/main.orig.tsx +10 -0
- package/src/main.tsx +10 -0
- package/src/utils/cn.orig.ts +6 -0
- package/src/utils/cn.ts +6 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +31 -0
- package/unify.mjs +537 -0
- package/vite.config.ts +18 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* template-rubric.ts — NET-NEW (Type C). See flatten-guide.md.
|
|
3
|
+
* ===========================================================================
|
|
4
|
+
* WHAT A "10-RATED REPORT" LOOKS LIKE FOR THIS PIPELINE, GROUND-TRUTHED.
|
|
5
|
+
*
|
|
6
|
+
* The diagnosis engine (pipeline-diagnosis.ts) needs a concrete, per-template
|
|
7
|
+
* target — not a generic rubric. This module loads that target from the
|
|
8
|
+
* package's own authoritative sources so the rubric is always in sync with
|
|
9
|
+
* what the pipeline was TOLD to produce:
|
|
10
|
+
*
|
|
11
|
+
* · OMEGA_TEMPLATES — section registry per template id
|
|
12
|
+
* · buildTemplatePrompt — the exact prompt injected as directive
|
|
13
|
+
* · ARCHETYPES / getPersonaDirective — Williams style contract
|
|
14
|
+
* · Innovation Genome v1 — dimensions + selected discovery path
|
|
15
|
+
* · Innovation Genome v2 — extended persona + domain pack + risk tier
|
|
16
|
+
* · V10 Creative Tree — from window._VERITAS_V10_DISCOVERY (captured live)
|
|
17
|
+
*
|
|
18
|
+
* Everything here is a READ. This module never mutates pipeline state.
|
|
19
|
+
* ===========================================================================
|
|
20
|
+
*/
|
|
21
|
+
import {
|
|
22
|
+
OMEGA_TEMPLATES,
|
|
23
|
+
STYLE_OVERRIDES,
|
|
24
|
+
findTemplate,
|
|
25
|
+
buildTemplatePrompt,
|
|
26
|
+
type OmegaTemplate,
|
|
27
|
+
type OmegaSection,
|
|
28
|
+
} from '@/lib/omega-templates';
|
|
29
|
+
import { ARCHETYPES } from '@/lib/williams-style';
|
|
30
|
+
// Genome v1 (base) — dimensions, personas, discovery paths
|
|
31
|
+
import {
|
|
32
|
+
DIMENSIONS as GENOME_V1_DIMENSIONS,
|
|
33
|
+
PERSONAS as GENOME_V1_PERSONAS,
|
|
34
|
+
seedToGenome,
|
|
35
|
+
classifyPersona as classifyPersonaV1,
|
|
36
|
+
selectPath as selectPathV1,
|
|
37
|
+
compileCompactDirective as compileGenomeV1Directive,
|
|
38
|
+
roll as rollGenomeV1,
|
|
39
|
+
type Genome,
|
|
40
|
+
type InnovationGenomeResult,
|
|
41
|
+
} from "../innovation-genome-engine.orig";
|
|
42
|
+
// Genome v2 (extended) — extended personas, mutations, domain packs, risk tiers
|
|
43
|
+
import {
|
|
44
|
+
EXTENDED_PERSONAS as GENOME_V2_PERSONAS,
|
|
45
|
+
DOMAIN_PACKS,
|
|
46
|
+
classifyPersonaExtended,
|
|
47
|
+
selectPathExtended,
|
|
48
|
+
compileCompactDirectiveV2,
|
|
49
|
+
rollV2,
|
|
50
|
+
inferInnovationDomain,
|
|
51
|
+
newInnovationSeed,
|
|
52
|
+
type InnovationGenomeV2,
|
|
53
|
+
} from "../innovation-genome-engine-v2.orig";
|
|
54
|
+
|
|
55
|
+
export interface SectionCriterion {
|
|
56
|
+
id: string;
|
|
57
|
+
title: string;
|
|
58
|
+
purpose: string;
|
|
59
|
+
/** Structural markers the section should contain to score ≥9. */
|
|
60
|
+
requiredMarkers: string[];
|
|
61
|
+
/** Sentinel phrases that, if present, PREVENT a 10 (data gaps, placeholders). */
|
|
62
|
+
antiMarkers: string[];
|
|
63
|
+
/** Deterministic detectors mapped to a 0-10 sub-score. */
|
|
64
|
+
detectors: Array<(sectionText: string) => { score: number; evidence: string }>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface TemplateRubric {
|
|
68
|
+
templateId: string;
|
|
69
|
+
templateName: string;
|
|
70
|
+
archetype: string;
|
|
71
|
+
personaVoice: string;
|
|
72
|
+
personaDirective: string;
|
|
73
|
+
styleOverrideCode: string | null;
|
|
74
|
+
styleOverrideLabel: string | null;
|
|
75
|
+
/** The literal prompt the pipeline injects. Kept verbatim, never truncated. */
|
|
76
|
+
buildPrompt: string;
|
|
77
|
+
sections: SectionCriterion[];
|
|
78
|
+
/** What the pipeline MUST produce to earn a 10 on this template. */
|
|
79
|
+
tenPointContract: string[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** Sub-scorers for section quality — pure, reproducible, no network. */
|
|
83
|
+
function detectorCitationDensity(section: string): { score: number; evidence: string } {
|
|
84
|
+
const cites = (section.match(/\[[Ss]?\d{1,3}\]/g) ?? []).length;
|
|
85
|
+
const words = Math.max(1, section.split(/\s+/).length);
|
|
86
|
+
const density = (cites / words) * 100;
|
|
87
|
+
const score =
|
|
88
|
+
density === 0 ? 1 : density < 0.4 ? 3 : density < 1.0 ? 6 : density < 2.5 ? 9 : 10;
|
|
89
|
+
return { score, evidence: `${cites} citation tag(s) across ${words} words (${density.toFixed(2)}/100w)` };
|
|
90
|
+
}
|
|
91
|
+
function detectorPlaceholders(section: string): { score: number; evidence: string } {
|
|
92
|
+
const gaps =
|
|
93
|
+
(section.match(/\[DATA GAP\]/gi) ?? []).length +
|
|
94
|
+
(section.match(/\[ASSUMPTION\]/gi) ?? []).length +
|
|
95
|
+
(section.match(/\[TBD\]/gi) ?? []).length +
|
|
96
|
+
(section.match(/\bTBD\b/gi) ?? []).length +
|
|
97
|
+
(section.match(/\[PROPOSED\]/gi) ?? []).length;
|
|
98
|
+
const score = gaps === 0 ? 10 : gaps === 1 ? 6 : gaps <= 3 ? 4 : 2;
|
|
99
|
+
return { score, evidence: `${gaps} unresolved placeholder(s)` };
|
|
100
|
+
}
|
|
101
|
+
function detectorTruncation(section: string): { score: number; evidence: string } {
|
|
102
|
+
const trailing = /[a-z]\s+(and|but|or|which|that|because|however|so|thereby|although|by)\s*[.!]?\s*$/i.test(section.trim());
|
|
103
|
+
const midCut = /\b(is|are|was|were|has|have|will|can|should)\s*$/i.test(section.trim());
|
|
104
|
+
const bad = trailing || midCut;
|
|
105
|
+
return { score: bad ? 1 : 10, evidence: bad ? "trails off on a connector or auxiliary" : "sentence completion clean" };
|
|
106
|
+
}
|
|
107
|
+
function detectorNumericSpecificity(section: string): { score: number; evidence: string } {
|
|
108
|
+
const nums = (section.match(/\b\d[\d,.]*\s?(%|USD|\$|billion|million|bps|x|years?|months?|Q[1-4])\b/gi) ?? []).length;
|
|
109
|
+
const score = nums === 0 ? 2 : nums < 3 ? 5 : nums < 8 ? 8 : 10;
|
|
110
|
+
return { score, evidence: `${nums} quantified figure(s)` };
|
|
111
|
+
}
|
|
112
|
+
function detectorActionability(section: string): { score: number; evidence: string } {
|
|
113
|
+
const verbs = (section.match(/\b(recommend|proceed|approve|reject|prioritise|prioritize|deprioritize|invest|divest|hire|contract|deploy|kill|pause|escalate|deadline)\b/gi) ?? []).length;
|
|
114
|
+
const score = verbs === 0 ? 3 : verbs < 2 ? 6 : verbs < 5 ? 8 : 10;
|
|
115
|
+
return { score, evidence: `${verbs} action verb(s)` };
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Section-specific marker library derived from OMEGA_TEMPLATES structure. */
|
|
119
|
+
const SECTION_HINTS: Record<string, { markers: string[]; anti: string[]; detectors: Array<(s: string) => { score: number; evidence: string }> }> = {
|
|
120
|
+
BLUF: {
|
|
121
|
+
markers: ["Decision Trigger", "Value at Stake", "Recommendation", "Deadline"],
|
|
122
|
+
anti: ["It depends", "further analysis"],
|
|
123
|
+
detectors: [detectorPlaceholders, detectorTruncation, detectorNumericSpecificity, detectorActionability],
|
|
124
|
+
},
|
|
125
|
+
"Situation (SCQA)": {
|
|
126
|
+
markers: ["Baseline State", "Complication", "Decision Question"],
|
|
127
|
+
anti: [],
|
|
128
|
+
detectors: [detectorTruncation, detectorCitationDensity],
|
|
129
|
+
},
|
|
130
|
+
"Diagnostic (T-Bar)": {
|
|
131
|
+
markers: ["Market Dynamics", "Competitive Position", "Trade-off"],
|
|
132
|
+
anti: [],
|
|
133
|
+
detectors: [detectorCitationDensity, detectorNumericSpecificity],
|
|
134
|
+
},
|
|
135
|
+
Recommendation: {
|
|
136
|
+
markers: ["Next Step", "Owner", "Threshold"],
|
|
137
|
+
anti: ["It depends"],
|
|
138
|
+
detectors: [detectorActionability, detectorPlaceholders],
|
|
139
|
+
},
|
|
140
|
+
References: {
|
|
141
|
+
markers: ["[S", "http", "DOI"],
|
|
142
|
+
anti: ["Untitled", "source-1", "source-2"],
|
|
143
|
+
detectors: [
|
|
144
|
+
(s) => {
|
|
145
|
+
const trusted = (s.match(/https?:\/\/[^\s)]+/g) ?? []).length;
|
|
146
|
+
return { score: trusted === 0 ? 1 : trusted < 3 ? 5 : 10, evidence: `${trusted} resolvable URL(s)` };
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
const DEFAULT_DETECTORS = [detectorPlaceholders, detectorTruncation, detectorCitationDensity];
|
|
152
|
+
|
|
153
|
+
function buildSectionCriteria(section: OmegaSection): SectionCriterion {
|
|
154
|
+
const hint = SECTION_HINTS[section.title] ?? SECTION_HINTS[section.id] ?? null;
|
|
155
|
+
return {
|
|
156
|
+
id: section.id,
|
|
157
|
+
title: section.title,
|
|
158
|
+
// Field name in package is `hint`, not `purpose`.
|
|
159
|
+
purpose: (section as any).hint ?? "",
|
|
160
|
+
requiredMarkers: hint?.markers ?? [],
|
|
161
|
+
antiMarkers: hint?.anti ?? [],
|
|
162
|
+
detectors: hint?.detectors ?? DEFAULT_DETECTORS,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function loadTemplateRubric(
|
|
167
|
+
templateId: string,
|
|
168
|
+
styleOverrideCode?: string | null,
|
|
169
|
+
williamsPersona?: string | null
|
|
170
|
+
): TemplateRubric | null {
|
|
171
|
+
const tpl = findTemplate(OMEGA_TEMPLATES as OmegaTemplate[], templateId);
|
|
172
|
+
if (!tpl) return null;
|
|
173
|
+
// Package `StyleOverride` uses `token` + `legacy` (not `code` + `label`).
|
|
174
|
+
const override = styleOverrideCode
|
|
175
|
+
? (STYLE_OVERRIDES as any[]).find((s) => s.token === styleOverrideCode || s.code === styleOverrideCode) ?? null
|
|
176
|
+
: null;
|
|
177
|
+
// `OmegaTemplate` has no `archetype` field — the template id IS the archetype.
|
|
178
|
+
const archetypeName = williamsPersona || (tpl as any).archetype || tpl.id;
|
|
179
|
+
const archetype = (ARCHETYPES as readonly any[]).find((a) => a.name === archetypeName);
|
|
180
|
+
const personaDirective = archetype ? renderPersonaDirective(archetype) : "(no matched archetype)";
|
|
181
|
+
|
|
182
|
+
// NO TRUNCATION. This is the exact string the pipeline uses as directive.
|
|
183
|
+
const buildPrompt = buildTemplatePrompt(tpl, override?.token ?? override?.code ?? "");
|
|
184
|
+
|
|
185
|
+
return {
|
|
186
|
+
templateId: tpl.id,
|
|
187
|
+
templateName: tpl.name ?? tpl.id,
|
|
188
|
+
archetype: archetypeName ?? "(unset)",
|
|
189
|
+
personaVoice: archetype?.voice ?? archetype?.desc ?? "",
|
|
190
|
+
personaDirective,
|
|
191
|
+
styleOverrideCode: override?.token ?? override?.code ?? null,
|
|
192
|
+
styleOverrideLabel: override?.legacy ?? override?.label ?? null,
|
|
193
|
+
buildPrompt,
|
|
194
|
+
sections: tpl.sections.map(buildSectionCriteria),
|
|
195
|
+
tenPointContract: buildTenPointContract(tpl),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function renderPersonaDirective(a: any): string {
|
|
200
|
+
if (typeof a?.directive === "string") return a.directive;
|
|
201
|
+
const parts: string[] = [];
|
|
202
|
+
if (a?.voice) parts.push(`Voice: ${a.voice}`);
|
|
203
|
+
if (Array.isArray(a?.do)) parts.push(`DO: ${a.do.join(" · ")}`);
|
|
204
|
+
if (Array.isArray(a?.avoid)) parts.push(`AVOID: ${a.avoid.join(" · ")}`);
|
|
205
|
+
if (a?.cadence) parts.push(`CADENCE: ${a.cadence}`);
|
|
206
|
+
return parts.join("\n") || String(a?.name ?? "");
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function buildTenPointContract(tpl: OmegaTemplate): string[] {
|
|
210
|
+
return [
|
|
211
|
+
`Every section named in ${tpl.id} appears with the section title verbatim.`,
|
|
212
|
+
"Every load-bearing claim carries a resolvable citation tag [S#] mapped to a References section with a real URL.",
|
|
213
|
+
"No [DATA GAP], [ASSUMPTION], [TBD], or [PROPOSED] placeholder survives the final pass.",
|
|
214
|
+
"No sentence ends mid-clause on a connector word (and/but/or/which/that/because).",
|
|
215
|
+
"Every numeric claim has a unit and a source; deterministic compute records exist for any calculation.",
|
|
216
|
+
"CoVe-flagged claims are either verified or explicitly downgraded — never silently retained.",
|
|
217
|
+
"Adversarial red-team blocking defects are resolved by a targeted repair pass, not a full rewrite.",
|
|
218
|
+
"Style overlay honors the Williams archetype directive across all sections.",
|
|
219
|
+
"Innovation genome directive is reflected in the discovery framing, not just prepended.",
|
|
220
|
+
"Guard score ≥ 9.0 AND judge score ≥ 9.0 AND both agree within 1.0.",
|
|
221
|
+
];
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// ── GENOME LOADERS ────────────────────────────────────────────────────────
|
|
225
|
+
|
|
226
|
+
export interface GenomeSnapshot {
|
|
227
|
+
v1: InnovationGenomeResult;
|
|
228
|
+
v2: InnovationGenomeV2;
|
|
229
|
+
v10?: unknown;
|
|
230
|
+
domain: string;
|
|
231
|
+
seed: number;
|
|
232
|
+
/** Compact v1 directive — full, untruncated. */
|
|
233
|
+
directiveV1: string;
|
|
234
|
+
/** Compact v2 directive — full, untruncated. */
|
|
235
|
+
directiveV2: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export function computeGenomeSnapshot(problem: string, sharedSeed?: number): GenomeSnapshot {
|
|
239
|
+
const seed = sharedSeed ?? newInnovationSeed();
|
|
240
|
+
const domain = inferInnovationDomain(problem);
|
|
241
|
+
const v1 = rollGenomeV1(seed, problem, String(domain));
|
|
242
|
+
const v2 = rollV2({ seed, userProblem: problem, domain });
|
|
243
|
+
const v10 = typeof window !== "undefined" ? (window as any)._VERITAS_V10_DISCOVERY : undefined;
|
|
244
|
+
return {
|
|
245
|
+
v1,
|
|
246
|
+
v2,
|
|
247
|
+
v10,
|
|
248
|
+
domain: String(domain),
|
|
249
|
+
seed,
|
|
250
|
+
directiveV1: compileGenomeV1Directive(v1),
|
|
251
|
+
directiveV2: compileCompactDirectiveV2(v2),
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** Read whatever the running pipeline stored on window (populated by package v15-pipeline shim). */
|
|
256
|
+
export function readLiveGenome(): { v4?: unknown; v7?: unknown; v9?: unknown; v10?: unknown; v10Discovery?: unknown } {
|
|
257
|
+
if (typeof window === "undefined") return {};
|
|
258
|
+
const w = window as any;
|
|
259
|
+
return {
|
|
260
|
+
v4: w._VERITAS_V4_REPORT,
|
|
261
|
+
v7: w._VERITAS_V7_AUDIT,
|
|
262
|
+
v9: w._VERITAS_V9_AUDIT,
|
|
263
|
+
v10: w._VERITAS_V10_DIAGNOSTICS,
|
|
264
|
+
v10Discovery: w._VERITAS_V10_DISCOVERY,
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Re-exports so downstream modules do not each drag in package paths.
|
|
269
|
+
export {
|
|
270
|
+
OMEGA_TEMPLATES,
|
|
271
|
+
STYLE_OVERRIDES,
|
|
272
|
+
ARCHETYPES,
|
|
273
|
+
GENOME_V1_DIMENSIONS,
|
|
274
|
+
GENOME_V1_PERSONAS,
|
|
275
|
+
GENOME_V2_PERSONAS,
|
|
276
|
+
DOMAIN_PACKS,
|
|
277
|
+
seedToGenome,
|
|
278
|
+
classifyPersonaV1,
|
|
279
|
+
classifyPersonaExtended,
|
|
280
|
+
selectPathV1,
|
|
281
|
+
selectPathExtended,
|
|
282
|
+
};
|
|
283
|
+
export type { OmegaTemplate, OmegaSection, Genome };
|
|
284
|
+
|
|
285
|
+
/** Extract sections from a rendered draft by heading. */
|
|
286
|
+
export function splitDraftBySections(draft: string, tpl: TemplateRubric): Record<string, string> {
|
|
287
|
+
const out: Record<string, string> = {};
|
|
288
|
+
if (!draft) return out;
|
|
289
|
+
// Find each section title as a heading; capture until the next known title.
|
|
290
|
+
const titles = tpl.sections.map((s) => s.title);
|
|
291
|
+
const escaped = titles.map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
292
|
+
const rx = new RegExp(
|
|
293
|
+
`##\\s*(${escaped.join("|")})[\\s\\S]*?(?=##\\s*(?:${escaped.join("|")})|$)`,
|
|
294
|
+
"gi"
|
|
295
|
+
);
|
|
296
|
+
for (const m of draft.matchAll(rx)) {
|
|
297
|
+
const title = titles.find((t) => t.toLowerCase() === m[1].toLowerCase());
|
|
298
|
+
if (title) out[title] = m[0];
|
|
299
|
+
}
|
|
300
|
+
return out;
|
|
301
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* unified-innovation.ts — one genome, v1 base + v2 expansion pack.
|
|
3
|
+
*
|
|
4
|
+
* V2 is not treated as an independent competing engine. A single stable seed
|
|
5
|
+
* creates the v1 base genome; v2 applies domain/risk/capability expansion to
|
|
6
|
+
* the same seed and records the delta. Every path symbol is expanded before it
|
|
7
|
+
* enters an LLM prompt.
|
|
8
|
+
*/
|
|
9
|
+
import {
|
|
10
|
+
roll as rollV1,
|
|
11
|
+
type DiscoveryPath,
|
|
12
|
+
type InnovationGenomeResult,
|
|
13
|
+
} from "../innovation-genome-engine.orig";
|
|
14
|
+
import {
|
|
15
|
+
rollV2,
|
|
16
|
+
buildExplorationPopulationV2,
|
|
17
|
+
inferInnovationDomain,
|
|
18
|
+
type InnovationGenomeV2,
|
|
19
|
+
} from "../innovation-genome-engine-v2.orig";
|
|
20
|
+
import { generatePersona, type WilliamsPersona } from '@/lib/williams-style';
|
|
21
|
+
|
|
22
|
+
export const PATH_NODE_NAMES: Record<string, string> = {
|
|
23
|
+
P: "Problem Choice",
|
|
24
|
+
A: "Anomaly Valuation",
|
|
25
|
+
E: "Embodiment and Real-World Experiment",
|
|
26
|
+
N: "Cross-Domain Analogy",
|
|
27
|
+
V: "Evaluator Revision",
|
|
28
|
+
T: "Taste and Explanatory Quality",
|
|
29
|
+
S: "Social Validation and Stabilization",
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export function stableSeed(text: string, salt = ""): number {
|
|
33
|
+
let h = 0x811c9dc5;
|
|
34
|
+
const input = `${salt}|${text}`;
|
|
35
|
+
for (let i = 0; i < input.length; i++) {
|
|
36
|
+
h ^= input.charCodeAt(i);
|
|
37
|
+
h = Math.imul(h, 0x01000193);
|
|
38
|
+
}
|
|
39
|
+
return h >>> 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function expandPath(path: DiscoveryPath): string {
|
|
43
|
+
const nodes = path.seq.split(/\s*→\s*/).filter(Boolean);
|
|
44
|
+
return nodes.map((node, i) => `${i + 1}. ${PATH_NODE_NAMES[node] ?? `Unknown node ${node}`}`).join("\n");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface UnifiedInnovationPlan {
|
|
48
|
+
version: "v1+v2-unified";
|
|
49
|
+
seed: number;
|
|
50
|
+
domain: string;
|
|
51
|
+
base: InnovationGenomeResult;
|
|
52
|
+
expansion: InnovationGenomeV2;
|
|
53
|
+
/** Backward-compatible debug aliases; v2 remains an expansion of v1. */
|
|
54
|
+
v1: InnovationGenomeResult;
|
|
55
|
+
v2: InnovationGenomeV2;
|
|
56
|
+
directiveV1: string;
|
|
57
|
+
directiveV2: string;
|
|
58
|
+
williams: WilliamsPersona;
|
|
59
|
+
expandedPath: string;
|
|
60
|
+
exploration: Array<{
|
|
61
|
+
id: string;
|
|
62
|
+
mutation: string;
|
|
63
|
+
persona: string;
|
|
64
|
+
pathName: string;
|
|
65
|
+
expandedPath: string;
|
|
66
|
+
}>;
|
|
67
|
+
directive: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function buildUnifiedInnovationPlan(
|
|
71
|
+
problem: string,
|
|
72
|
+
options?: { seed?: number; personaSeed?: number; risk?: "low" | "medium" | "high" | "critical" },
|
|
73
|
+
): UnifiedInnovationPlan {
|
|
74
|
+
const domain = String(inferInnovationDomain(problem));
|
|
75
|
+
const seed = options?.seed ?? stableSeed(problem, domain);
|
|
76
|
+
const base = rollV1(seed, problem, domain);
|
|
77
|
+
// Expansion uses the exact same seed. It augments domain/safety/capability;
|
|
78
|
+
// it does not roll an unrelated second genome.
|
|
79
|
+
const expansion = rollV2({ seed, userProblem: problem, domain, risk: options?.risk ?? "medium" });
|
|
80
|
+
const williams = generatePersona(options?.personaSeed ?? seed);
|
|
81
|
+
const expandedPath = expandPath(expansion.path);
|
|
82
|
+
const population = buildExplorationPopulationV2(expansion, 6);
|
|
83
|
+
const exploration = population.map((branch) => ({
|
|
84
|
+
id: branch.branchId,
|
|
85
|
+
mutation: branch.mutation,
|
|
86
|
+
persona: branch.persona.name,
|
|
87
|
+
pathName: branch.path.name,
|
|
88
|
+
expandedPath: expandPath(branch.path),
|
|
89
|
+
}));
|
|
90
|
+
|
|
91
|
+
const directive = [
|
|
92
|
+
`## UNIFIED INNOVATION GENOME v1 + v2 EXPANSION (seed ${seed})`,
|
|
93
|
+
`BASE IDENTITY: ${base.persona.name} — ${base.persona.tagline}`,
|
|
94
|
+
"V1 BASE DIMENSIONS (the inherited genome):",
|
|
95
|
+
...base.dimensionReport.map((d) => `- ${d.name} [${d.block}]: ${d.level} (${d.value.toFixed(2)}), from ${d.lowPole} toward ${d.highPole}`),
|
|
96
|
+
`V2 DOMAIN/SAFETY EXPANSION: ${expansion.persona.name} — ${expansion.persona.tagline}`,
|
|
97
|
+
`DOMAIN: ${expansion.domainPack.name}`,
|
|
98
|
+
`WILLIAMS RESEARCH PERSONA: ${williams.archetype.name}`,
|
|
99
|
+
williams.systemPromptFragment,
|
|
100
|
+
`DISCOVERY PATH ${expansion.path.id} (${expansion.path.name}) — expanded in full words:`,
|
|
101
|
+
expandedPath,
|
|
102
|
+
"V2 IS AN EXPANSION PACK: domain gates, safety, capability, anomalies and failure memory extend the base genome; they do not replace it.",
|
|
103
|
+
`REQUIRED ARTIFACT: ${expansion.domainPack.candidateArtifact}`,
|
|
104
|
+
`ATTACKER: ${expansion.domainPack.candidateSpecificAttacker}`,
|
|
105
|
+
`VERIFIER: ${expansion.domainPack.verifier}`,
|
|
106
|
+
`MANDATORY GATES: ${expansion.domainPack.mandatoryGates.join("; ")}`,
|
|
107
|
+
"EXPLORATION BRANCHES (preserve independently until evidence eliminates them):",
|
|
108
|
+
...exploration.map((b) => `${b.id} [${b.mutation}] ${b.persona} · ${b.pathName}\n${b.expandedPath}`),
|
|
109
|
+
].join("\n");
|
|
110
|
+
|
|
111
|
+
return {
|
|
112
|
+
version: "v1+v2-unified",
|
|
113
|
+
seed,
|
|
114
|
+
domain,
|
|
115
|
+
base,
|
|
116
|
+
expansion,
|
|
117
|
+
v1: base,
|
|
118
|
+
v2: expansion,
|
|
119
|
+
directiveV1: `BASE GENOME (shared seed ${seed}): ${base.persona.name}\n${expandPath(base.path)}`,
|
|
120
|
+
directiveV2: `V2 EXPANSION PACK (same seed ${seed}): ${expansion.persona.name}\n${expandedPath}`,
|
|
121
|
+
williams,
|
|
122
|
+
expandedPath,
|
|
123
|
+
exploration,
|
|
124
|
+
directive,
|
|
125
|
+
};
|
|
126
|
+
}
|