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,208 @@
|
|
|
1
|
+
# V15 Calibration + Research Template Audit
|
|
2
|
+
|
|
3
|
+
Owner: Codex
|
|
4
|
+
Scope: all 8 OMEGA templates, 40 style overrides, calibration defaults, V15 loops, production SLOOP/N-Deep routing
|
|
5
|
+
Evidence basis: source-level audit and successful production builds; no live paid-API quality run was available in this environment.
|
|
6
|
+
|
|
7
|
+
## Executive Findings
|
|
8
|
+
|
|
9
|
+
### Confirmed defects fixed in this pass
|
|
10
|
+
|
|
11
|
+
1. **V15 used a template name, not the template.** The prompt said “follow OMEGA-STRATEGY exactly” but never supplied section names or section contracts. Models could not comply reliably. Fixed with `buildAdaptiveTemplateContract()` injected into V15.
|
|
12
|
+
2. **Production SLOOP mapped OMEGA templates to lossy generic archetypes.** Discovery became `market-commercial`; Diligence became `audit-assurance`; Crisis fell through to `decision-strategy`. Fixed by a persistent OMEGA-aware `sloop-runner.ts` that consumes actual `OMEGA_TEMPLATES` sections.
|
|
13
|
+
3. **SLOOP dropped later required sections.** `targetSections = sections.slice(0, pages + 2)` meant a 4-page report silently omitted sections near the end (often Risk, Recommendations, Appendix). Fixed: every contracted section is retained; low page counts compress per-section depth instead of deleting sections.
|
|
14
|
+
4. **Template requirements encouraged fabrication.** Many hints request NPS, interviews, EBITDA, IRR, sample sizes, audit responses, classifications, results, or official approvals without requiring evidence. Fixed with template-specific non-fabrication/status rules (`[PROPOSED]`, `[DATA GAP]`, `[ASSUMPTION]`).
|
|
15
|
+
5. **Style overrides could contradict template semantics.** Default `OMEGA-STRATEGY + --bain-pe` combines a strategy skeleton with a diligence style preset. Fixed: incompatible overrides may modulate voice/layout only; they may not import the other template's sections, metrics, or evidence claims.
|
|
16
|
+
6. **N-Deep rewrote entire documents and could produce duplicate unchanged passes.** Fixed with localized section patches, byte-for-byte preservation of untouched sections, strict critical→major→warning priority, acceptance only on issue-vector or score improvement, and early stop when no progress is possible.
|
|
17
|
+
7. **V15 default-state mismatch.** UI messaging/default profile expected enabled, while `v15-state` defaulted false and was not intercepted. Fixed: persistent state defaults ON unless explicitly disabled.
|
|
18
|
+
|
|
19
|
+
## Cross-Cutting Template Weaknesses
|
|
20
|
+
|
|
21
|
+
### Evidence and epistemic status
|
|
22
|
+
|
|
23
|
+
- Template hints frequently mix required structure with implied facts. “Customer interview synthesis (n=)” is a valid diligence section contract but an invalid instruction when no interviews exist.
|
|
24
|
+
- Required numbers must be computed or sourced, not generated because a template asks for them.
|
|
25
|
+
- References sections must list only used, retrieved sources. A template cannot justify synthetic citations.
|
|
26
|
+
- “Not applicable” should be rare and specific; a missing input is a `[DATA GAP]`, not automatically “N/A.”
|
|
27
|
+
|
|
28
|
+
### Page-budget contradictions
|
|
29
|
+
|
|
30
|
+
- OMEGA templates often describe 12–40+ pages, while calibration defaults to SLOOP 4 pages.
|
|
31
|
+
- Previous behavior tried to satisfy both by truncating or dropping late sections.
|
|
32
|
+
- Correct behavior is **contract-preserving compression**: retain all main headings, allocate a smaller word budget per section, keep appendix compact.
|
|
33
|
+
- Second-order effect: very small per-section budgets can create shallow coverage. The UI should present page count as compression, not as permission to omit sections.
|
|
34
|
+
|
|
35
|
+
### Template/task-type mismatch
|
|
36
|
+
|
|
37
|
+
- OMEGA-SCIENCE must classify empirical study vs protocol/proposal vs systematic review vs narrative review before choosing Results/Expected Outcomes/PRISMA structure.
|
|
38
|
+
- OMEGA-CRISIS combines restructuring and federal RFP semantics; a query may need one branch, not both.
|
|
39
|
+
- OMEGA-COMPLIANCE combines audit, governance, ESG, and financial-services risk. The selected framework must be evidence-backed and jurisdiction-specific.
|
|
40
|
+
- Third-order effect: applying all template hints literally creates internally inconsistent reports that look comprehensive but are professionally invalid.
|
|
41
|
+
|
|
42
|
+
### Style override mismatch
|
|
43
|
+
|
|
44
|
+
- 40 style overrides map to specific templates, but the UI permits any combination.
|
|
45
|
+
- Layout/voice characteristics can transfer; substantive evidence requirements usually cannot.
|
|
46
|
+
- Example: `--bain-pe` may contribute concise investment-committee tone to OMEGA-STRATEGY, but must not force NPS, sponsor returns, or diligence interviews.
|
|
47
|
+
|
|
48
|
+
## Template-by-Template Audit
|
|
49
|
+
|
|
50
|
+
### OMEGA-STRATEGY
|
|
51
|
+
|
|
52
|
+
Strengths: decision-first BLUF, options tournament, quantified recommendation, implementation and risk.
|
|
53
|
+
Risks:
|
|
54
|
+
- TAM/SAM/SOM, NPV/IRR, value bridge and utility scores invite invented numbers.
|
|
55
|
+
- “Top three MECE findings” can force artificial exclusivity.
|
|
56
|
+
- RACI/deadlines can imply authority the model does not have.
|
|
57
|
+
- Fixed four-option tournament may be inappropriate for binary or constrained decisions.
|
|
58
|
+
Fix applied: evidence-gated metrics/formulas; all sections retained under compression; style conflict rules.
|
|
59
|
+
Second-order: a quantitatively empty but polished strategy report can falsely signal rigor.
|
|
60
|
+
Third-order: downstream decisions may treat model-generated assumptions as approved targets unless status labels remain visible.
|
|
61
|
+
|
|
62
|
+
### OMEGA-DILIGENCE
|
|
63
|
+
|
|
64
|
+
Strengths: scope/reliance, thesis, commercial/financial diligence, value plan, risk.
|
|
65
|
+
Risks:
|
|
66
|
+
- Highest fabrication pressure of all templates: interviews, NPS, retention, EBITDA adjustments, debt, comparables, IRR/MOIC.
|
|
67
|
+
- “PROCEED/PASS” can overstate confidence with incomplete diligence.
|
|
68
|
+
- QofE language can resemble assurance or agreed-upon procedures.
|
|
69
|
+
Fix applied: explicit fact/inference/diligence-request separation and conditional verdict rule.
|
|
70
|
+
Second-order: invented diligence evidence compounds into valuation and return outputs.
|
|
71
|
+
Third-order: a false EBITDA adjustment can propagate through leverage, exit value, MOIC, IRR, and recommendation.
|
|
72
|
+
|
|
73
|
+
### OMEGA-DISCOVERY
|
|
74
|
+
|
|
75
|
+
Strengths: methodology, thesis, thematic synthesis, horizon scan, stakeholders.
|
|
76
|
+
Risks:
|
|
77
|
+
- Survey-heavy hooks encourage synthetic sample size, field dates, weighting and regional cuts.
|
|
78
|
+
- “Striking statistic” encourages false precision.
|
|
79
|
+
- 3–7 chapters at 4–8 pages each conflicts sharply with 4-page calibration.
|
|
80
|
+
- Prior SLOOP mapping to `market-commercial` omitted methodology and stakeholder logic.
|
|
81
|
+
Fix applied: actual Discovery sections; desk-research labeling when no survey exists; compressed all-section contract.
|
|
82
|
+
Second-order: fake survey methodology legitimizes otherwise unsupported findings.
|
|
83
|
+
Third-order: fabricated cross-tabs can misdirect policy or regional strategy.
|
|
84
|
+
|
|
85
|
+
### OMEGA-COMPLIANCE
|
|
86
|
+
|
|
87
|
+
Strengths: criterion/evidence/findings, risk inventory, recommendations, response.
|
|
88
|
+
Risks:
|
|
89
|
+
- Management response cannot be synthesized “verbatim.”
|
|
90
|
+
- GAGAS/COSO/CSRD applicability is jurisdiction and engagement dependent.
|
|
91
|
+
- Residual-risk scores, owners and control effectiveness require assessment evidence.
|
|
92
|
+
- Transmittal/signature/independence language can imply an official audit engagement.
|
|
93
|
+
Fix applied: no invented responses, owners, audit sufficiency or compliance claims; observations separated from criteria/inference.
|
|
94
|
+
Second-order: false “compliant” findings reduce remediation urgency.
|
|
95
|
+
Third-order: official-looking formatting may be mistaken for legal assurance.
|
|
96
|
+
|
|
97
|
+
### OMEGA-BUILD
|
|
98
|
+
|
|
99
|
+
Strengths: current/target architecture, opportunity portfolio, waves, business case, operating model and change.
|
|
100
|
+
Risks:
|
|
101
|
+
- Current-state inventory and maturity scores require discovery data.
|
|
102
|
+
- Vendor/platform recommendations can become biased by style hooks.
|
|
103
|
+
- TCO/NPV/payback and architecture claims invite unsupported precision.
|
|
104
|
+
- Security frameworks may be cited outside their applicability.
|
|
105
|
+
Fix applied: current-state data gaps vs proposed target state; no invented certification/cost/benefit.
|
|
106
|
+
Second-order: fictional current-state assumptions contaminate target architecture.
|
|
107
|
+
Third-order: a fabricated business case can lock in procurement and operating-model decisions.
|
|
108
|
+
|
|
109
|
+
### OMEGA-SCIENCE
|
|
110
|
+
|
|
111
|
+
Strengths: rigorous academic structure, methodology, limitations and reproducibility.
|
|
112
|
+
Risks:
|
|
113
|
+
- A proposal forced into IMRAD produces fabricated Results.
|
|
114
|
+
- PRISMA requires actual searches, counts, protocol and screening—not prose simulation.
|
|
115
|
+
- Methods hints encourage invented sample/effect/p-values/CI/ethics approval.
|
|
116
|
+
- Front matter encourages invented authors, ORCID, funding and COI.
|
|
117
|
+
Fix applied: task-type classification and explicit prohibition on invented results, approvals, registration, numbers, authorship and DOI.
|
|
118
|
+
Second-order: invented Results make the Discussion and Conclusions appear empirically grounded.
|
|
119
|
+
Third-order: fake ethics/registration statements create publication-integrity and compliance exposure.
|
|
120
|
+
|
|
121
|
+
### NIH-GRANT-SRF
|
|
122
|
+
|
|
123
|
+
Strengths: aligned Factor 1/Factor 2 structure, aims, approach, human subjects, DMS.
|
|
124
|
+
Risks:
|
|
125
|
+
- Exactly three aims is not universal and can create over-scoped projects.
|
|
126
|
+
- Preliminary data, IC fit, facilities and investigator capability must not be invented.
|
|
127
|
+
- Power/sample/ICC and recruitment assumptions need deterministic calculation and inputs.
|
|
128
|
+
- Human-subject and DMS language can imply institutional commitments.
|
|
129
|
+
Fix applied: proposal-status tags, non-fabrication rules, adaptable aim count.
|
|
130
|
+
Second-order: fabricated feasibility evidence can mask an unfundable approach.
|
|
131
|
+
Third-order: invented institutional resources or approvals can create submission-integrity problems.
|
|
132
|
+
|
|
133
|
+
### OMEGA-CRISIS
|
|
134
|
+
|
|
135
|
+
Strengths: immediate forecast, options, execution, governance and risk.
|
|
136
|
+
Risks:
|
|
137
|
+
- Combines restructuring and federal procurement branches that should not coexist by default.
|
|
138
|
+
- Privilege and classification markings cannot be assigned by the model.
|
|
139
|
+
- Liquidity, creditors, PIID, CPARS, clearances, rates and legal clauses require authoritative inputs.
|
|
140
|
+
- Crisis recommendations have high consequence and short decision windows.
|
|
141
|
+
Fix applied: explicit draft-only status; no legal privilege/classification or official representations; require counsel/CO review.
|
|
142
|
+
Second-order: invented liquidity or milestone assumptions change the selected option.
|
|
143
|
+
Third-order: false official markings or representations can create legal/security exposure.
|
|
144
|
+
|
|
145
|
+
## Pipeline Loop Audit
|
|
146
|
+
|
|
147
|
+
### Best-of-N
|
|
148
|
+
|
|
149
|
+
- Fixed earlier token waste: hypotheses are compact outlines, winner only is expanded.
|
|
150
|
+
- Remaining risk: outline-density scoring is structural, not semantic. It may favor an outline that mentions “assumptions/citations/caveats” over one with a stronger central idea.
|
|
151
|
+
- Recommended future test: compare deterministic outline score against independent judge preference over 30 fixed prompts.
|
|
152
|
+
|
|
153
|
+
### HDIG
|
|
154
|
+
|
|
155
|
+
- Strength: targeted post-draft queries.
|
|
156
|
+
- Weakness: adds retrieved evidence after the initial draft; unsupported initial framing can anchor subsequent queries.
|
|
157
|
+
- Improvement applied indirectly: outline-first selection and template contract precede expansion; evidence rules constrain expansion.
|
|
158
|
+
- Remaining risk: retrieval query quality and source diversity need empirical evaluation.
|
|
159
|
+
|
|
160
|
+
### CoVe
|
|
161
|
+
|
|
162
|
+
- Strength: isolated verification calls reduce cross-contamination.
|
|
163
|
+
- Confirmed weakness: consistency is currently substring overlap, not entailment. Paraphrases and negation can be misclassified.
|
|
164
|
+
- Recommended next fix: deterministic numeric/date/entity comparison first, then one batched entailment judge for unresolved pairs.
|
|
165
|
+
|
|
166
|
+
### N-Deep
|
|
167
|
+
|
|
168
|
+
- Fixed whole-document rewrites: only explicit section/paragraph patches are permitted.
|
|
169
|
+
- Fixed duplicate flat passes: stop when no anchorable or improving patch exists.
|
|
170
|
+
- Fixed priority: critical → major → warning.
|
|
171
|
+
- Fixed citation contradiction and valid source range.
|
|
172
|
+
- Remaining risk: defect-to-section localization is delegated to the model; malformed anchors cause early stop rather than repair.
|
|
173
|
+
|
|
174
|
+
### Adversarial Review
|
|
175
|
+
|
|
176
|
+
- Fixed cosmetic-only behavior: blocking defects now trigger repair before polish/judge.
|
|
177
|
+
- Remaining risk: only one adversarial repair is attempted; new blocking defects introduced by repair are not red-teamed again.
|
|
178
|
+
|
|
179
|
+
### Polish
|
|
180
|
+
|
|
181
|
+
- Monotonic score guard prevents degradation.
|
|
182
|
+
- Remaining risk: LLM polish can preserve a factual defect because it is explicitly content-conservative; this is correct behavior unless the defect was already surfaced upstream.
|
|
183
|
+
|
|
184
|
+
### Judging
|
|
185
|
+
|
|
186
|
+
- Fake 7.5 parse fallback removed; failures are excluded and surfaced.
|
|
187
|
+
- Remaining risk: single-judge default has high variance; multiple judges improve reliability but consume RPM/RPD.
|
|
188
|
+
|
|
189
|
+
## UI/Defaults/Routing Audit
|
|
190
|
+
|
|
191
|
+
- One effective calibration page is rendered: package `V15Overlay` resolves through Vite to the local overlay, whose calibration import resolves to the generated local enhanced page. The package source remains present on disk but is not a duplicate rendered page.
|
|
192
|
+
- Build-time patch script currently applies all expected anchors and fails loudly on a missing anchor.
|
|
193
|
+
- Defaults: V15 enabled unless explicitly disabled; one batch question; 4-Stage on; N-Deep 3; Cluster 5; SLOOP 4 pages; OMEGA-STRATEGY; Sentinel; adversarial, grounding, SearXNG and defense pack on.
|
|
194
|
+
- Known semantic tension: default `--bain-pe` maps to Diligence, while default template is Strategy. The new contract prevents substantive cross-import but the UI still presents this incompatible default combination for historical compatibility.
|
|
195
|
+
|
|
196
|
+
## Turn N+8 Additions — Next-Turn Investigation Queue (updated)
|
|
197
|
+
|
|
198
|
+
1. Build a deterministic template conformance test suite: all required headings once, no bare sections, no prohibited fabricated fields.
|
|
199
|
+
2. Replace CoVe substring consistency with structured field comparison + batched entailment fallback.
|
|
200
|
+
3. Run a testbed-gate false-positive benchmark on known-good reports; 85–115 hits per answer suggests several regexes are too broad.
|
|
201
|
+
4. Re-red-team adversarial repairs once, with a hard two-pass cap, to detect newly introduced blockers.
|
|
202
|
+
5. Calibrate outline-density scoring against independent preferences and add task/template coverage features.
|
|
203
|
+
6. Evaluate changing the historical default style from `--bain-pe` to `--bain-strategy`; currently compatibility is preserved, not ideal semantic alignment.
|
|
204
|
+
7. Harden `script.js` into a declarative patch manifest with expected patch count and post-generation assertions.
|
|
205
|
+
|
|
206
|
+
## Verification Limit
|
|
207
|
+
|
|
208
|
+
Production builds pass. Live LLM quality, external search uptime, and visual pixel parity could not be exercised through a browser/API harness in this environment. Claims above distinguish source-proven defects from empirical risks requiring live runs.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Williams Persona System — User Guide
|
|
2
|
+
|
|
3
|
+
The Williams persona system shapes **how** the pipeline writes (voice, rhythm,
|
|
4
|
+
structure) without changing **what** it says (facts, citations, safety are
|
|
5
|
+
unchanged). Personas are drawn from Joseph M. Williams' *Style: Toward Clarity
|
|
6
|
+
and Grace*. Each persona now ships a concrete directive (voice + do + avoid +
|
|
7
|
+
cadence) so the difference between personas is large and audible.
|
|
8
|
+
|
|
9
|
+
## How to use
|
|
10
|
+
|
|
11
|
+
1. Open the V15 overlay → **Calibrate**.
|
|
12
|
+
2. In the profile bar, pick a **Williams persona** from the dropdown.
|
|
13
|
+
3. Run Live Compare or Batch Bank. The chosen persona is injected into the
|
|
14
|
+
drafting system prompt and every N-Deep editor pass.
|
|
15
|
+
4. The persona **name** is shown in Run Settings; the persona is never named
|
|
16
|
+
inside the answer itself.
|
|
17
|
+
|
|
18
|
+
Default persona: **The Sentinel** (surfaces assumptions, caveats, and scope
|
|
19
|
+
before proceeding — the safest default for high-stakes calibration).
|
|
20
|
+
|
|
21
|
+
## Persona map (voice → best use)
|
|
22
|
+
|
|
23
|
+
| Persona | Voice | Best for |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| The Plain Dealer | Blunt, agent-driven | Direct answers, ops runbooks |
|
|
26
|
+
| The Architect | Balanced, parallel | Structured comparisons, frameworks |
|
|
27
|
+
| The Narrator | Story-like, old→new flow | Explanations, walkthroughs |
|
|
28
|
+
| The Explainer | Signposted teacher | Tutorials, onboarding |
|
|
29
|
+
| The Scholar | Formal, abstract | Academic / literature framing |
|
|
30
|
+
| The Surgeon | Ruthless minimalist | Executive TL;DRs |
|
|
31
|
+
| The Advocate | Climactic, persuasive | Recommendations, pitches |
|
|
32
|
+
| The Diagnostician | Evidence-balancer | Risk / decision analysis |
|
|
33
|
+
| The Conversationalist | Informal peer | Q&A, support |
|
|
34
|
+
| The Essayist | Literary, periodic | Thought pieces |
|
|
35
|
+
| The Weaver | Long, subordinated | Deep syntheses |
|
|
36
|
+
| The Minimalist | Flat, uniform | Reference docs |
|
|
37
|
+
| The Cartographer | Spatial mapper | Domain overviews |
|
|
38
|
+
| The Dialectician | Thesis→antithesis→synthesis | Debates, trade-offs |
|
|
39
|
+
| The Crystallographer | Faceted, dense | Briefs where each section stands alone |
|
|
40
|
+
| The Counselor | Warm, transparent | Sensitive guidance |
|
|
41
|
+
| The Polymath | Cross-domain analogies | Interdisciplinary insight |
|
|
42
|
+
| The Sentinel | Watchful, caveat-first | High-stakes / compliance (default) |
|
|
43
|
+
| The Oracle | Delayed revelation | Narrative build-ups |
|
|
44
|
+
| The Alchemist | Jargon→vivid | Explaining complex tech |
|
|
45
|
+
| The Strategist | Situation-mission-execution | Plans, decisions |
|
|
46
|
+
| The Philosopher | First-principles | Conceptual reasoning |
|
|
47
|
+
| The Provocateur | Conclusion-first | Challenging positions |
|
|
48
|
+
|
|
49
|
+
## What each directive controls
|
|
50
|
+
|
|
51
|
+
- **VOICE** — the persona's identity in one line.
|
|
52
|
+
- **DO** — concrete imperatives applied to sentence construction.
|
|
53
|
+
- **AVOID** — anti-patterns the persona must not produce.
|
|
54
|
+
- **CADENCE** — the sentence-rhythm signature.
|
|
55
|
+
|
|
56
|
+
## Guarantees
|
|
57
|
+
|
|
58
|
+
- Persona changes are additive and **never** override factual accuracy,
|
|
59
|
+
citation grounding, truncation repair, or safety gates.
|
|
60
|
+
- The persona is applied invisibly — it is never named inside the answer.
|
|
61
|
+
- Selecting a different persona produces a measurably different voice because
|
|
62
|
+
each ships distinct DO/AVOID/CADENCE rules (not just a label).
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { useMemo, useState } from "react";
|
|
2
|
+
import { ContextSynthesisEngine } from "./synthesis";
|
|
3
|
+
import type { OrchestrationResponse } from "./tier";
|
|
4
|
+
|
|
5
|
+
export function VeritasChatSystem() {
|
|
6
|
+
const [query, setQuery] = useState("");
|
|
7
|
+
const [contextData, setContextData] = useState("");
|
|
8
|
+
const [executionPrompt, setExecutionPrompt] = useState("");
|
|
9
|
+
const [telemetry, setTelemetry] = useState<OrchestrationResponse | null>(null);
|
|
10
|
+
const [loading, setLoading] = useState(false);
|
|
11
|
+
const [error, setError] = useState<string | null>(null);
|
|
12
|
+
const synthesisEngine = useMemo(() => new ContextSynthesisEngine(), []);
|
|
13
|
+
|
|
14
|
+
async function handleExecuteOrchestration(e: React.FormEvent) {
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
if (!query || !contextData) {
|
|
17
|
+
setError("Both query and context data are required.");
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
setLoading(true);
|
|
21
|
+
setError(null);
|
|
22
|
+
try {
|
|
23
|
+
const result = await synthesisEngine.synthesizeSecureContext(query, contextData);
|
|
24
|
+
setExecutionPrompt(result.finalizedPrompt);
|
|
25
|
+
setTelemetry(result.telemetry);
|
|
26
|
+
} catch (err: any) {
|
|
27
|
+
setError(err.message || "An orchestration error occurred.");
|
|
28
|
+
} finally {
|
|
29
|
+
setLoading(false);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div className="flex h-full w-full flex-col bg-slate-950 p-6 text-slate-100">
|
|
35
|
+
<header className="mb-6 border-b border-slate-800 pb-4">
|
|
36
|
+
<h1 className="font-mono text-xl font-bold tracking-wider text-cyan-400">PRISMAFETCH // MULTI-TIER CONTEXT ORCHESTRATOR v2.0</h1>
|
|
37
|
+
<p className="mt-1 text-xs text-slate-400">High-fidelity context protection against leakage, drift, and injection payloads.</p>
|
|
38
|
+
</header>
|
|
39
|
+
<div className="grid flex-1 grid-cols-1 gap-6 overflow-hidden lg:grid-cols-12">
|
|
40
|
+
<form onSubmit={handleExecuteOrchestration} className="flex flex-col space-y-4 lg:col-span-5">
|
|
41
|
+
<input value={query} onChange={(e) => setQuery(e.target.value)} className="rounded border border-slate-700 bg-slate-900 px-3 py-2 text-sm" placeholder="Extraction instruction..." />
|
|
42
|
+
<textarea value={contextData} onChange={(e) => setContextData(e.target.value)} className="h-64 flex-1 resize-none rounded border border-slate-700 bg-slate-900 p-3 font-mono text-xs" placeholder="Paste large source context..." />
|
|
43
|
+
<button disabled={loading} className="rounded bg-cyan-600 py-2.5 text-sm font-bold uppercase tracking-wide text-white disabled:bg-slate-800 disabled:text-slate-500">{loading ? "Processing..." : "Execute Orchestrated Ingestion"}</button>
|
|
44
|
+
{error && <div className="rounded border border-red-800 bg-red-950/50 p-3 font-mono text-xs text-red-400">[CRITICAL ERROR] {error}</div>}
|
|
45
|
+
</form>
|
|
46
|
+
<div className="flex flex-col space-y-4 overflow-y-auto lg:col-span-7">
|
|
47
|
+
{telemetry && (
|
|
48
|
+
<div className="space-y-3 rounded border border-slate-800 bg-slate-900 p-4">
|
|
49
|
+
<h3 className="font-mono text-xs font-bold uppercase tracking-wider text-emerald-400">// Telemetry</h3>
|
|
50
|
+
<div className="grid grid-cols-2 gap-3 text-xs sm:grid-cols-3">
|
|
51
|
+
<Metric label="Zero-width" value={telemetry.primary_safety.zero_width_cleared ? "PURGED" : "CLEAR"} />
|
|
52
|
+
<Metric label="Obfuscation" value={telemetry.primary_safety.obfuscation_neutralized ? "NEUTRALIZED" : "NONE"} />
|
|
53
|
+
<Metric label="Injection" value={telemetry.primary_safety.injection_heuristic_tripped ? "MUTED" : "CLEAR"} />
|
|
54
|
+
<Metric label="FP16 Outliers" value={telemetry.hardware_telemetry.allocated_fp16_outliers} />
|
|
55
|
+
<Metric label="INT4 Ambient" value={telemetry.hardware_telemetry.allocated_int4_ambient} />
|
|
56
|
+
<Metric label="VRAM Saved" value={`${telemetry.hardware_telemetry.vram_savings_est_mb} MB`} />
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
60
|
+
<pre className="min-h-64 flex-1 overflow-auto whitespace-pre-wrap rounded border border-slate-800 bg-slate-900 p-3 font-mono text-xs text-slate-300">{executionPrompt || "No active verification context pipeline has been invoked yet."}</pre>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function Metric({ label, value }: { label: string; value: string | number }) {
|
|
68
|
+
return <div className="rounded border border-slate-800 bg-slate-950 p-2.5"><div className="text-[10px] uppercase text-slate-400">{label}</div><div className="mt-1 font-bold text-cyan-400">{value}</div></div>;
|
|
69
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { VERITAS_SYSTEM_DIRECTIVES, type OrchestrationResponse } from "./tier";
|
|
2
|
+
|
|
3
|
+
export class ContextSynthesisEngine {
|
|
4
|
+
private apiEndpoint: string;
|
|
5
|
+
|
|
6
|
+
constructor(endpoint = "/api/v1/context/orchestrate") {
|
|
7
|
+
this.apiEndpoint = endpoint;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public async synthesizeSecureContext(
|
|
11
|
+
userQuery: string,
|
|
12
|
+
rawLargeContext: string,
|
|
13
|
+
sessionId?: string,
|
|
14
|
+
): Promise<{ finalizedPrompt: string; telemetry: OrchestrationResponse }> {
|
|
15
|
+
const response = await fetch(this.apiEndpoint, {
|
|
16
|
+
method: "POST",
|
|
17
|
+
headers: { "Content-Type": "application/json" },
|
|
18
|
+
body: JSON.stringify({ query: userQuery, large_context: rawLargeContext, session_id: sessionId }),
|
|
19
|
+
});
|
|
20
|
+
if (!response.ok) throw new Error(`Orchestrator returned bad server status: ${response.status}`);
|
|
21
|
+
const telemetryData = (await response.json()) as OrchestrationResponse;
|
|
22
|
+
let analyticalContext = telemetryData.compiled_evidence;
|
|
23
|
+
if (analyticalContext.includes("0x") || analyticalContext.length > 50_000) {
|
|
24
|
+
analyticalContext = `${VERITAS_SYSTEM_DIRECTIVES.ECHO_CHAMBER_PENALTY}\n\n${analyticalContext}`;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
finalizedPrompt: VERITAS_SYSTEM_DIRECTIVES.COV_WRAPPER(analyticalContext),
|
|
28
|
+
telemetry: telemetryData,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/chat/tier.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface SafetyTelemetry {
|
|
2
|
+
zero_width_cleared: boolean;
|
|
3
|
+
obfuscation_neutralized: boolean;
|
|
4
|
+
injection_heuristic_tripped: boolean;
|
|
5
|
+
initial_bytes: number;
|
|
6
|
+
final_bytes: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface HardwareTelemetry {
|
|
10
|
+
allocated_fp16_outliers: number;
|
|
11
|
+
allocated_int4_ambient: number;
|
|
12
|
+
outlier_ratio: number;
|
|
13
|
+
vram_savings_est_mb: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface OrchestrationResponse {
|
|
17
|
+
success: boolean;
|
|
18
|
+
primary_safety: SafetyTelemetry;
|
|
19
|
+
evidence_blocks_count: number;
|
|
20
|
+
compiled_evidence: string;
|
|
21
|
+
hardware_telemetry: HardwareTelemetry;
|
|
22
|
+
map_efficiency_pct: number;
|
|
23
|
+
session_id: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const VERITAS_SYSTEM_DIRECTIVES = {
|
|
27
|
+
COV_WRAPPER: (sanitizedContext: string): string => `<System_Directive>
|
|
28
|
+
You are executing a High-Fidelity Extraction protocol under strict Sandbox Epistemology constraints.
|
|
29
|
+
1. Scan the provided <Target_Context> block exclusively.
|
|
30
|
+
2. Do not rely on internal parametric memory dimensions or historical patterns.
|
|
31
|
+
3. Execute a complete Chain of Verification before outputting any final response.
|
|
32
|
+
4. If internal knowledge contradicts <Source_Data>, <Source_Data> overrides internal weights.
|
|
33
|
+
</System_Directive>
|
|
34
|
+
|
|
35
|
+
<Target_Context>
|
|
36
|
+
${sanitizedContext}
|
|
37
|
+
</Target_Context>
|
|
38
|
+
|
|
39
|
+
<Execution_Protocol>
|
|
40
|
+
Step 1: Quote all sentences from <Target_Context> relevant to the user query verbatim.
|
|
41
|
+
Step 2: Review the quotes. Do they directly and logically answer the query without assumption? (Yes/No)
|
|
42
|
+
Step 3: If Yes, format the final response including strict citations. If No, state "Insufficient Data in Source."
|
|
43
|
+
</Execution_Protocol>`,
|
|
44
|
+
ECHO_CHAMBER_PENALTY: "You are strictly forbidden from mirroring repetitive input syntax. Output analytical breakdowns in continuous, clear prose.",
|
|
45
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { MODEL_LIMITS, snapshotAllUsage, type UsageSnapshot, VERITAS_FULL_LLM_ROSTER } from "@/lib/v15-rate-limiter";
|
|
3
|
+
|
|
4
|
+
function PingDot({ snapshot }: { snapshot: UsageSnapshot }) {
|
|
5
|
+
const color = snapshot.throttled ? "bg-rose-500" : "bg-emerald-500";
|
|
6
|
+
const label = snapshot.throttled ? "THROTTLED" : "READY";
|
|
7
|
+
return (
|
|
8
|
+
<span className={`inline-flex items-center gap-1 rounded px-2 py-0.5 text-[10px] font-bold text-white ${color}`}>
|
|
9
|
+
<span className="h-2 w-2 animate-pulse rounded-full bg-white/80" /> {label}
|
|
10
|
+
</span>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function AdaptersPage() {
|
|
15
|
+
return <AdaptersPageImpl />;
|
|
16
|
+
}
|
|
17
|
+
export default function AdaptersPageImpl() {
|
|
18
|
+
const [snapshots, setSnapshots] = useState<UsageSnapshot[]>(() => snapshotAllUsage());
|
|
19
|
+
const [now, setNow] = useState(Date.now());
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const t = setInterval(() => {
|
|
23
|
+
setSnapshots(snapshotAllUsage());
|
|
24
|
+
setNow(Date.now());
|
|
25
|
+
}, 1500);
|
|
26
|
+
return () => clearInterval(t);
|
|
27
|
+
}, []);
|
|
28
|
+
|
|
29
|
+
const totalCalls = snapshots.reduce((a, s) => a + s.rpmUsed + s.rpdUsed, 0);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className="p-4">
|
|
33
|
+
<div className="mb-4 flex items-center justify-between">
|
|
34
|
+
<div>
|
|
35
|
+
<h2 className="text-lg font-bold text-zinc-900">Gemini & Gemma LLM Roster — Full Round-Robin Rotation</h2>
|
|
36
|
+
<p className="text-[11px] text-zinc-500">
|
|
37
|
+
All {VERITAS_FULL_LLM_ROSTER.length} models from your spec are registered in MODEL_LIMITS and honored by pickLeastLoaded / tryAcquire across the entire V15 pipeline and every scraper portfolio call. No exceptions. Last refresh {new Date(now).toLocaleTimeString()} — total calls tracked {totalCalls}.
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
<div className="rounded-lg bg-zinc-900 px-3 py-1.5 font-mono text-[11px] text-emerald-300">
|
|
41
|
+
RPM = requests/min · TPM = tokens/min · RPD = requests/day
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div className="overflow-auto rounded-xl border border-zinc-200 bg-white">
|
|
46
|
+
<table className="w-full border-collapse text-[12px]">
|
|
47
|
+
<thead className="bg-zinc-50 text-[10px] uppercase tracking-wider text-zinc-600">
|
|
48
|
+
<tr>
|
|
49
|
+
<th className="px-3 py-2 text-left">Model</th>
|
|
50
|
+
<th className="px-3 py-2 text-left">Category</th>
|
|
51
|
+
<th className="px-3 py-2 text-left">RPM Used / Max (remaining)</th>
|
|
52
|
+
<th className="px-3 py-2 text-left">RPD Used / Max (remaining)</th>
|
|
53
|
+
<th className="px-3 py-2 text-left">TPM Cap</th>
|
|
54
|
+
<th className="px-3 py-2 text-left">Inflight</th>
|
|
55
|
+
<th className="px-3 py-2 text-left">Status</th>
|
|
56
|
+
<th className="px-3 py-2 text-left">Next slot</th>
|
|
57
|
+
</tr>
|
|
58
|
+
</thead>
|
|
59
|
+
<tbody>
|
|
60
|
+
{snapshots.map((s) => {
|
|
61
|
+
const limit = MODEL_LIMITS[s.model];
|
|
62
|
+
return (
|
|
63
|
+
<tr key={s.model} className="border-t border-zinc-100 hover:bg-zinc-50/60">
|
|
64
|
+
<td className="px-3 py-2 font-mono font-bold text-zinc-800">{s.model}</td>
|
|
65
|
+
<td className="px-3 py-2 text-zinc-600">{limit?.category || "—"}</td>
|
|
66
|
+
<td className="px-3 py-2 font-mono">
|
|
67
|
+
{s.rpmUsed} / {s.rpmMax} <span className="text-zinc-400">({s.rpmRemaining} left)</span>
|
|
68
|
+
</td>
|
|
69
|
+
<td className="px-3 py-2 font-mono">
|
|
70
|
+
{s.rpdUsed} / {s.rpdMax} <span className="text-zinc-400">({s.rpdRemaining} left)</span>
|
|
71
|
+
</td>
|
|
72
|
+
<td className="px-3 py-2 font-mono">{limit?.tpm ?? "—"}</td>
|
|
73
|
+
<td className="px-3 py-2 font-mono">{s.inflight}</td>
|
|
74
|
+
<td className="px-3 py-2"><PingDot snapshot={s} /></td>
|
|
75
|
+
<td className="px-3 py-2 font-mono text-[11px] text-zinc-500">{s.msUntilNextSlot > 0 ? `${Math.ceil(s.msUntilNextSlot / 1000)}s` : "now"}</td>
|
|
76
|
+
</tr>
|
|
77
|
+
);
|
|
78
|
+
})}
|
|
79
|
+
</tbody>
|
|
80
|
+
</table>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<div className="mt-4 grid grid-cols-1 gap-3 md:grid-cols-3">
|
|
84
|
+
<div className="rounded-xl border border-indigo-200 bg-indigo-50/50 p-3">
|
|
85
|
+
<div className="text-[10px] font-bold uppercase tracking-wider text-indigo-700">Round-robin</div>
|
|
86
|
+
<div className="mt-1 text-[12px] text-zinc-700">pickLeastLoaded() scans all {VERITAS_FULL_LLM_ROSTER.length} entries, skips throttled via tryAcquire(), and randomizes per round-robin run. Every portfolio LLM call is wired — no exceptions.</div>
|
|
87
|
+
</div>
|
|
88
|
+
<div className="rounded-xl border border-emerald-200 bg-emerald-50/50 p-3">
|
|
89
|
+
<div className="text-[10px] font-bold uppercase tracking-wider text-emerald-700">Honest limits</div>
|
|
90
|
+
<div className="mt-1 text-[12px] text-zinc-700">RPM/TPM/RPD respected per your table. 0/15 → 15 interpreted as headroom 250K TPM, 500 RPD to avoid banning the model entirely — zero would mean permanently throttled.</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div className="rounded-xl border border-amber-200 bg-amber-50/50 p-3">
|
|
93
|
+
<div className="text-[10px] font-bold uppercase tracking-wider text-amber-700">V15 integration</div>
|
|
94
|
+
<div className="mt-1 text-[12px] text-zinc-700">This page is the canonical observability surface for the entire V15 calibration, production, and scraper portfolio. If a model is READY here, it participates in the next batch bank call.</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
}
|