World model & causal reasoning
Full description: Read the full narrative
The world-model subsystem stores causal structure (SQLite nodes/edges + embeddings), fuses five weighted forecast sources, keeps a scored ledger of predictions versus outcomes, and feeds knowledge back through a temporal KG. The DoWhy Python microservice is an optional external discovery path.
| Component | Verified structure | Source |
|---|---|---|
| Causal graph | Bayesian posterior inference over causal_nodes/causal_edges; GET /api/causal-graph (+ DOT) | server/world-model/causalGraph.ts:79,391 server/db/schema.sql:284-298 server/index.ts:13929-13939 |
| Ensemble predictor | 5 sources (physics/statistical/pattern/causal/LLM), default weights 0.30/0.25/0.25/0.10/0.10 with per-domain variants for earthquake/tsunami/wildfire/severe-weather/flood | server/world-model/ensemblePredictor.ts:58,82-96 |
| Physics NN (hand-coded) | Gutenberg–Richter a=4.5 b=1.0; aftershock/tsunami probability; saturation vapor pressure; precipitation; storm severity; Rothermel ROS; ignition probability | server/world-model/physicsNN.ts:11,28,43,60,67,77,93,109 |
| Prediction validation | Brier scores + calibration report; /api/predict/validation-report | server/world-model/predictionValidator.ts:18,23,45 server/index.ts:13903 |
| Forecast ledger | sweep every 6 h scoring prediction_log | server/world-model/forecastLedger.ts:32,134-137 server/index.ts:14471 |
| Scenario what-ifs | energy-ratio 10^(1.5ΔM) magnitude-change template; /api/predict/scenario(s) | server/world-model/scenarioSimulator.ts:37,159 server/index.ts:13885-13916 |
| Temporal KG v2 | LLM entity/edge generation, completion, counterfactuals; edge decay constant 72 h; chat write-through/read-through bridge | server/kgV2/evolvingGraph.ts:28,145-149 server/kgV2/chatKgBridge.ts:4-22,28 |
| Causal discovery | Flask + DoWhy microservice (/discover, /health) in causal/python-service; optional in compose | server/causal/python-service/causal_service.py:9,13 |
| Dream / forks / entropy / discovery | synthetic scenario generation; parallel-reality forks; entropy mixer broadcasts rolling domain anomaly scores every 60 s (header: “not a neural net”); discovery cycle 24 h | server/dream:engine server/causal/entropyMixer.ts:5-14,39 server/causal/discoveryEngine.ts:8 |
Scope note
These are cognitive/state subsystems: their data structures, timers and gates are code-verified, and boot logs confirm the engines start. No prediction-accuracy claim is made anywhere in this documentation — accuracy tooling (Brier, calibration) exists to measure such claims over time, not to assert them.