Microkernel-style civilization-scale simulation with deterministic kernel ticks, strict epistemic separation, scheduler mediation, and strategic operations UI.
- Simulation kernel (
sim/kernel) - Agent cognition (
sim/agents) - algorithmic only - Migration (
sim/migration) - Urban development (
sim/urban) - Politics/governance (
sim/politics) - Intelligence and fog of war (
sim/intelligence) - Conflict/security (
sim/conflict) - History/replay (
sim/history) - Scheduler (
sim/scheduler) - API orchestration (
services/api) - Naming service (
services/naming) - GM gateway (
services/gm-gateway) - Frontend strategic console (
services/frontend)
OLLAMA_MODEL_NAMINGOLLAMA_MODEL_PEOPLEOLLAMA_MODEL_GM
Canonical defaults:
OLLAMA_MODEL_NAMING=qwen3.5:0.8bOLLAMA_MODEL_PEOPLE=qwen3.5:4bOLLAMA_MODEL_GM=qwen3.5:9b
Optional high-end GM override:
OLLAMA_MODEL_GM=qwen3.5:27b
./scripts/setup.shsetup.sh provisions .env defaults (Qwen 3.5 role matrix), validates required keys, checks Ollama connectivity/model availability, and suggests pull commands when models are missing.
Suggested pulls:
ollama pull qwen3.5:0.8bollama pull qwen3.5:4bollama pull qwen3.5:9b
python3 -m venv .venv
source .venv/bin/activate
pip install -r services/api/requirements.txt -r services/gm-gateway/requirements.txt -r services/naming/requirements.txt
./scripts/run_local.sh
# or docker compose up --build-
POST /simulation/start|pause|speed|step|replay-mode -
GET /simulation/state -
GET /world/map|nations|cities|agents|cultures -
GET /events -
GET /intel/reports -
GET /intel/fog/{nation_id} -
GET /history/timeline -
GET /history/compare -
GET /diplomacy/organizations -
GET /media/outlets -
GET /media/issues -
POST /media/generate -
GET /history/media -
GET /gm/summary -
POST /gm/chat -
GET /history/causality/{event_id} -
GET /history/milestones -
GET /media/narratives/{event_id}
- API does not mutate kernel directly; scheduler mediates stepping.
- UI/inspectors avoid hidden private state unless debug mode is explicitly enabled.
Additional endpoints:
POST /names/generate(naming service)POST /descriptions/generate(naming service, people model)GET /cache/context/{entity_id}(naming context cache)GET /descriptions/{entity_type}/{entity_id}(API)
- Diagnostics endpoints:
/diagnostics/health,/diagnostics/performance,/diagnostics/caches,/diagnostics/run - Scenario endpoints:
/scenarios,/scenarios/load - Tuning endpoints:
/tuning(GET/POST) - Snapshot/replay endpoints:
/snapshots,/snapshots/save,/snapshots/load,/replay/status - Repro/compare helpers:
/runs/compare,/preflight - Description scheduler:
/descriptions/queue,/descriptions/process,/descriptions/status
Pre-testing scripts:
scripts/preflight.shscripts/smoke_run.shscripts/benchmark_tick.sh
Run full regression suite:
./scripts/test_all.shRun scenario sweep (requires running API):
./scripts/run_scenario_matrix.sh http://localhost:8000 5Run tuning sweep:
./scripts/run_tuning_matrix.sh http://localhost:8000Run benchmark pass:
./scripts/run_benchmarks.sh http://localhost:8000 30Run soak validation:
./scripts/run_soak.sh http://localhost:8000 100 20Generate readiness summary from collected artifacts:
./scripts/generate_readiness_report.sh reportsDeterministic guarantee:
- Runs are reproducible within tolerance for the same seed/scenario/tuning fingerprint.
- External AI service variability may affect enrichment text and latency, but simulation core progression remains seed/config-driven.
Artifacts:
- Scripts emit JSON/MD artifacts under timestamped
reports/<stamp>/folders for operator review.