A political simulation game about governing with an AI cabinet: choose a country baseline, propose policies, negotiate commitments, and follow their consequences through institutions and society.
The project is starting a new implementation. Read the project framework — v0.8.1 for the agreed design, proposed architecture, and implementation gates. A runnable game has not yet been built. A local React interface preview is included, but it does not execute policy decisions.
Follow the implementation tracker for the delivery sequence, open decisions, acceptance checks, and completion evidence.
These implementation constraints supplement the reviewed framework; the framework remains unchanged.
- Local first: the Rust/Axum service will serve the built browser interface and API on one loopback origin, with Hiyal saves on local disk and exported backups. Public hosting is deferred.
- OpenRouter only: every application LLM call will use OpenRouter, including ministers, assistant briefings, reports, response repairs, offline authoring/calibration, and live-model evaluations. Direct-provider APIs and Seatline are outside the initial implementation.
- No required paid infrastructure or subscriptions: no paid hosting, managed database, search/news API, monitoring subscription, or GPU service is needed. Explicitly budgeted OpenRouter usage and applicable credit-purchase fees are the only planned service expense.
- Bounded inference: select an inexpensive schema-capable model, initially shared by the three ministers. Declare numeric call, token, repair/retry, and cost allowances before live use; pause when an allowance is exhausted. No automatic model upgrade, paid fallback outside the declared budget, or automatic credit recharge is part of the plan. Free variants are optional; their availability and quotas do not guarantee campaign capacity.
- Keep routine checks offline: use scripted actors and recorded responses for development and CI. Live OpenRouter evaluations will be small, manually triggered, and capped. Keep CI to one essential Linux job, with expensive or cross-platform checks run deliberately.
- Keep credentials in the backend: the OpenRouter key must stay outside the browser bundle, committed files, and recorded prompts/receipts. Local replay must work without an API key or network access.
This is the intended operating policy, not an implemented setup guide. The tracker includes writing and verifying runnable setup instructions. A later public deployment needs its own persistent-storage and ongoing free-tier assessment; a free frontend or temporary trial credits alone do not establish a free backend.
The interface is one guided Play screen plus three reference screens: Cabinet (the three ministers and how they voted), Progress (decisions, budget, ministers' delivery reports, organisations and the public) and Sources (what is real data and what is a game rule). Every quarter follows the same six steps (make a plan, cabinet reacts, revise, final vote, you decide, end quarter) and the screen offers one clearly named action at a time. Keys 1–4 switch screens and ? opens the how-to-play guide. Read how Myth Maker works for the game in plain terms (design decisions and how to revert or re-tune them are recorded in docs/decisions), including the mapping from each step to the engine's phases and commands, and the known design gaps. The best-case delivery forecast is a display-only optimistic upper bound from P0 lag and capacity rules (including attainable Community Access Network bonuses from Q2 when access funding is at least 10); it is not a simulation result.
Requirements: Node.js 22.12+ within the 22.x line and npm, with network access on the first install. CI and the included .nvmrc use Node 22.16.0; apps/web/.npmrc enforces the supported engine range. From the repository root:
nvm use "$(cat apps/web/.nvmrc)" # optional when using nvm
npm --prefix apps/web ci --ignore-scripts
npm --prefix apps/web run devOpen the localhost URL printed by Vite (normally http://127.0.0.1:5173). The web app binds to loopback only. To check the production interface build, run npm --prefix apps/web run build. The /api development proxy targets the implemented local Rust service at 127.0.0.1:8787. Launch it separately using the P1d command below; if it is not running, the forecast shows an unavailable state with a Retry control. New drafts request Rust forecasts after a short debounce; an in-progress response is clearly distinguished from a completed forecast. Do not place an API key in apps/web, environment variables exposed to Vite, or browser code. Vite exposes only variables with the MYTH_PUBLIC_ prefix; its build refuses exposed names containing KEY, TOKEN, SECRET, PASSWORD, or CREDENTIAL. This guard does not replace a complete security review. The offline API and generated transport contracts now exist, but the authoritative P3 reducer, full game persistence, and live-inference admission remain future work.
Start the loopback-only Axum backend with cargo +1.99.1 run --locked -p myth-local-api, then the frontend with npm --prefix apps/web run dev. The UI obtains its optimistic delivery ceilings from Rust via /api/preview; without the server, it explicitly displays an unavailable state (no duplicate TypeScript simulation). The backend also provides clean-belief scripted cabinet vote snapshots and bounded checksum-verified local choice recordings. It does not perform actual policy decisions, LLM calls, authoritative saves or Hiyal replay. Live mode fails closed. See offline backend setup and API for exact commands, files and security boundaries.
Private world checkpoint, country pack, event and ledger receipt formats are versioned Rust DTOs with strict Serde input validation and generated schemas. The pure domain supports checked fixed-point apportionment with explicit rounding residuals. A private local CLI can save and verify an illustrative world fixture without an API key; the stored SHA-256 is an accidental-corruption check, not tamper authentication, and Unix checkpoints are owner-only. see P1 operating and verification contract. Do not confuse this private checkpoint with an authoritative P3 campaign reducer or P4 Hiyal replay. The pinned Hiyal candidate is recorded in config/hiyal-pin.toml but is intentionally not yet linked.
The separate myth-contracts Rust crate validates JSON commands and minister-action inputs before converting them to the pure domain types. Rust generates TypeScript declarations at apps/web/src/generated/transport.ts and JSON Schema files in docs/contracts/. The checked-in artifacts are enforced by CI: cargo +1.99.1 run --locked -p myth-contracts --bin export-contracts -- --check.
See the P1-03 contracts note for accepted shapes, privacy boundaries, generator commands and remaining model-route compatibility checks. The P1-03 transport crate alone is not an operating API; the separate P1d loopback adapter now supplies Rust-calculated optimistic capacity previews, but still does not execute a complete policy simulation.
The experimental P5 Hiyal/OpenRouter integration is being reviewed in draft PR #12. The default loopback API and React UI still do not enable live inference, and the new manual pilot command is not called in CI. The private Hiyal adapter now has a strict typed minister-output path, three cabinet profiles, a shared durable allowance, and independent trial budgets. Fake-provider tests demonstrate role-specific decisions and keyless replay; they are not evidence that any OpenRouter route actually supports the requested strict schema or that a live cabinet behaves acceptably. See the P5 review packet and the acceptance gates before authorizing paid Experiment A.
The local Rust service in PR #14 owns Hiyal campaigns, durable typed commands, verified snapshot/SSE updates, and a replayable offline decision sequence. The React view caches only committed public snapshots with TanStack Query; provider keys and private simulation journals stay server-side. Player proposals, amendments, final decisions, treasury consequences and verified offline comparison forks are available through the connected interface.
npm --prefix apps/web ci --ignore-scripts --no-audit --no-fund
npm --prefix apps/web run build
cargo +1.99.1 run --locked -p myth-local-apiOpen http://127.0.0.1:8787. The default is MYTH_MODE=scripted, and live model inference remains disabled. No hosted or paid services are needed for the offline pilot. The one thing the server fetches is the news: at the start of a campaign and of each term it reads GOV.UK's Department for Education news and freezes a couple of matching stories into the game (decision 0013); it sends nothing about your game. MYTH_REAL_NEWS=off plays fully offline, and cargo run -p myth-local-api --bin myth-news shows what would be fetched. The private Hiyal campaign directory defaults to local-data/saves/hiyal-campaigns; do not expose it as a public asset path.
Read the P6 implementation and verification record before interpreting a preview or an outcome. The connected Cabinet/Campaign/Intel tabs now show public-only evidence and recorded decisions, with a tested independent-process restart. The local interface uses Base UI focus-managed controls/dialogs, exact whole-credit entry, explicit en-GB locale, and the saved treasury. The offline P6-01–05 engineering checks are complete, including a file-locked single OS writer and interrupted-command/SSE recovery tests. The full P6 gate remains open for independent review and the separately authorized, measured paid Experiment C′.
All pre-framework repository files are preserved on the archive branch, pointing to 79a1bd7. That snapshot includes the old application, data, images, databases, tests, and frontend submodule reference.
The default branch contains the framework, implementation tracker, and this README. Existing Git history is retained.