Realm is a 5–10 year project at full scope. The phase plan exists to prevent the project from dying in the gap between vision and shipping: every phase produces a testable, possibly sellable artifact before the next phase begins. You do not start Phase N+1 until Phase N’s test gate is passed. That discipline is how a solo or small-team project ships instead of becoming an abandoned repo.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/at6132/econ/llms.txt
Use this file to discover all available pages before exploring further.
Timeline at a glance
| Phase | Description | Realistic milestone |
|---|---|---|
| 0 | Spec & Foundation | Week 0 |
| 1 | Solo Engine Prototype | 3–6 months |
| 2 | Solo Polish & Visual Identity | 3–6 months |
| 3 | Solo Launch | 6–9 months from start |
| 4 | User-Code Layer | 9–15 months from start |
| 5 | Multiplayer Foundations + Closed Cohort 1 | 18–24 months from start |
| 6 | Closed Cohorts + Open Beta | 27–36 months from start |
| 7 | Public Persistent Multiplayer | 3+ years from start |
Phases
Phase 0 — Spec & Foundation
Complete.
- Read and reconciled all design documents (docs 01–12)
- Wrote five worked business examples using only the 9 primitives
- Chose the v1 simulation stack (Python engine, Next.js frontend)
- Set up the project repository with a clean directory structure
- Wrote the one-pager pitch and the canonical glossary (doc 15)
Can you describe, in one paragraph each, exactly what 5 different player-invented businesses look like — including which primitives they use, what their daily activities are, and how they make money? If yes → Phase 1. If no → the primitives spec is incomplete. Revise the primitives and try again.
Phase 1 — Solo Engine Prototype
Engineering complete. Playtest gate (A1) deferred to Phase 2 cadence.
17_PHASE_1_COMPLETION_CHECKLIST.md) is closed as of 2026-05-08. The stranger playtest gate (A1) — 3 of 5 strangers saying they’d play another hour — has not yet been formally run and is tracked under Phase 2 process.What was built:Engine core:- Tick-based deterministic simulation loop (
advance_tick; RNG via(tick, purpose)pairs — no wall-clock in sim) - World generation: Frontier bootstrap grid; terrain via biome noise; plot terrain, hidden subsurface composition, ownership
- Materials (Primitive 2): 12 definitions including
spoiled_grain; party-wide storage unit cap withfield_stockadebonus; grain →spoiled_grainspoilage transform (conserved, Law 1) - Capital (Primitive 5): accounts, atomic double-entry transfers, conservation enforced at the ledger layer
- Production (Primitive 6): 5 recipe templates (e.g., timber → lumber, ore → metal); 40% of recipe
labor_centspaid to distinctstub_hiresemployees per batch;tool_cache/watch_hutlower labor cost on the producing plot (BPS) - Movement (Primitive 4): shipping with tick-based transit; fee =
BASE + manhattan × PER_TILE; deliveries respect storage cap - Order books (Primitive 7b): asks + bids, escrow, iceberg clips, counterparty reputation minimum, FIFO by price then
order_id - P2P trade (Primitive 7a): atomic exchange with optional idempotency key and stable structured error codes
- Basic contracts (Primitive 8): supply FSM with buyer deposit and liquidated damages; employment with recurring wages
- Reputation (Primitive 9 placeholder): honor/breach counters; order book filters on
min_counterparty_honored
- 6 Tier 1 behavioral archetypes: grain consumer, lumber buyer, timber relister, coal buyer, clay buyer, electricity buyer
- Next.js shell with Bloomberg-style tab panels
- SVG organic mesh world map (no Pixi.js yet — that is Phase 2)
- Plot detail, market order book + depth chart, inventory, build menu, hire menu, action log, caravans, contracts, Bazaar (P2P) tabs
- SQLite save/load including order books, P2P idempotency, and market history
Get 3–5 strangers to play the prototype for 1 hour. After their session, ask them: “would you keep playing if I gave you another hour?” 3 of 5 must say yes. Watch for: when they’re confused (first-hour script needs work), when the world feels empty (increase agent activity), when cause and effect are invisible (add visible price reasoning). If they call it a spreadsheet rather than a game — that’s acceptable in Phase 1. You’re testing whether the economics are fun, not the visuals.
Phase 2 — Solo Polish & Visual Identity
Engineering complete. Stranger $30 playtest gate (A1) deferred by project choice.
18_PHASE_2_COMPLETION_CHECKLIST.md as of 2026-05-10. All in-scope rows are ✅: 117 engine tests pass; tsc and next build green. The A1 human gate — 3 of 5 strangers saying they’d buy it for $30 after 5+ hours — is deferred and must be run before Phase 3 launch.What was built:Visuals:- Pixi.js v8 world map: colored terrain, plot boundaries, ownership shading, GL/SVG toolbar toggle
- Schematic plot view (
PlotSchematicPanel.tsx): drag-drop production flow editor; validates against engine recipes and party inventory viaPOST /plots/{id}/schematic/validate - Real charting (Recharts):
MarketHistoryChart.tsxwith axis labels, Bazaar symbol sync, ask + bid series - Polished UI: Cmd/Ctrl+K command palette, tab strip, notification toaster (
realmToast.tsx) - Settings modal: pause/speed control, scenario selector, save management
- Tier 2 optimizing agents: 5 archetypes in
agents_tier2.py(market-maker, logistics, production-planner, employer, and a fifth); distinct from Tier 1 schedules - 27 materials (up from 12), 20 recipe templates (up from 5)
- Contract stubs: loan, equity, service-subscription FSM with tick-based lifecycle and API routes
- Surveying:
survey_plotreveals terrain andrecipe_ids; cost flows to system reserve; supports an optional tradable survey intel market - Decay (Law 5):
tick_building_decay;maintain_buildingfee =max(1_000, cost // 5); labor bonus gated by building condition - Information cost (Law 6):
purchase_market_intel; free tier shows lastFREE_MARKET_HISTORY_TICKSticks; paid tier extends visibility; fee → system reserve
- 4 scenarios: Frontier (default), The Bootstrapper (20,000 start, 40×30 grid), The Cartel (grain-side pressure overlay)
- Scenario selection UI in settings modal
- Snapshot version bumped to v2; additive fields for scenario ID, market intel expiry, building instance ID and condition BPS
Get 5 strangers to play for 5+ hours each (across multiple sessions, ideally a week of self-directed play). At the end: at least 3 of 5 say “I’d buy this for $30 today.” Bonus signals: testers post screenshots organically, tell friends, ask when multiplayer is coming. Those are stronger than the survey answer alone.
Phase 3 — Solo Launch
Planned. Begins after Phase 2 playtest gate (A1) passes.
- LLM agent runtime (Anthropic API integration)
- Memory system: rolling window + long-term summary
- 5 named characters with distinct personalities (per the AI agent design doc): examples include Margaux the Industrialist, Rico the Speculator
- Cost monitoring and per-session budget caps
- Stable build pipeline, crash reporting, opt-in telemetry
- Save file forward-compatibility (saves from v1.0 work in v1.1+)
- Auto-update mechanism
- Steam page and/or itch.io and/or self-hosted
- Trailer and launch video, marketing copy, screenshots
- Demo version (limited scenario, no save)
- One-time purchase, recommended 50
- Payment processing and email/newsletter collection
- Documentation site (this site)
- Discord community
- Bug report workflow
Launch publicly. Within 30 days of launch: at least 200 paying users with >70% day-7 retention, and a Steam (or equivalent) rating averaging 80%+. Soft-launch to beta testers first. Fix critical issues. Then public launch. If retention is below targets, the design has a flaw at scale — address it before moving to Phase 4. If reviews flag the same issue repeatedly, that issue is the priority.What success here enables: revenue to fund Phase 4+, a community to draw closed-cohort participants from, press and streamer attention, and a library of player feedback to inform multiplayer design.
Phase 4 — User-Code Layer
Planned. Target: 9–15 months from project start.
- Lua sandbox: sandboxed interpreter with restricted stdlib, deterministic, resource-metered
- Read API and Write API (per the user-code layer spec)
- Service definition, publication, and versioning
- Resource metering: CPU and storage budgets billed in in-game currency
- Service marketplace UI
- Visual drag-drop block editor for non-programmers
- Compilation from blocks to Lua
- Beginner templates: “auto-restock,” “price alerts,” and similar
- Pre-shipped services that AI agents publish (so the marketplace isn’t empty at launch)
- Services that AI agents subscribe to from the player
- Services that the player can create and sell to AI agents
- Code editor (Monaco or CodeMirror)
- Live preview and test environment
- Debugging tools: logs, breakpoints if feasible
At least 30% of returning players (week-2 cohort) deploy at least one service or use the block editor non-trivially. At least 50% of testers can describe a service they wish existed (showing they understand the platform’s value). Track via telemetry: who opens the IDE, who writes code, who deploys, who subscribes. If fewer than 30% engage, the UX is too hard — add more templates, simplify the block editor, and improve tutorials.
Phase 5 — Multiplayer Foundations + Closed Cohort 1
Planned. Target: 18–24 months from project start.
- Authoritative server architecture
- Postgres-based state (migrated from SQLite for multi-user concurrency)
- Real-time WebSocket layer
- Auth: email + password, OAuth optional
- Identity and account management
- Anti-cheat (mostly automatic via the determinism and audit-log architecture)
- Genesis bonuses: starting-capital boosts for early players who fill needed roles (shipping, finance, agriculture), phasing out as roles become saturated
- NPC seed economy: consumers, laborers, baseline banks and utilities
- Frontier zone reveal mechanic
- Invite-only registration
- Season management: start, run, end, ranking, and archive
- Live leaderboard
- Spectator mode for non-participants
- Monitoring and alerting, backup and disaster recovery
- Customer support workflow and moderation tools
Closed Cohort 1 runs for its full 90-day season with: less than 5% participant dropout, less than 2 hours of unplanned downtime total, no exploits affecting more than 5% of player state, and at least 60% of participants saying they’d join Cohort 2. Run a 7-day pre-season stress test with 20 participants before the full season. If the cohort falls apart — mass exit, major exploits, infrastructure failure — do not open public mode. Run Cohort 2 first.
Phase 6 — Closed Cohorts + Open Beta
Planned. Target: 27–36 months from project start.
- Cohort 2 (with lessons from Cohort 1)
- Cohort 3 (larger, ~150 players)
- Public open beta (1 shard, free or low-cost entry)
- Tournament and in-season event tooling
- Streamer and content-creator tools: replay export, embed widgets
- Mobile companion app v1: read-only access plus the key quick-action flows from the mobile spec
Public open beta runs for 90 days with: 1,000+ daily active users at peak, 40%+ day-30 retention, no critical exploits, and a steady-state economy (no hyperinflation, healthy market depth across major asset classes). Monitor KPIs daily. Address economic dysfunction immediately — hyperinflation or market collapse is a design problem, not just a numbers problem. If the open beta shows systemic problems, fix and re-run before opening permanent multiplayer.
Phase 7 — Public Persistent Multiplayer
Planned. Target: 3+ years from project start.
- Multi-shard architecture with shard selection UI
- Cross-shard player profile: single account, multiple worlds
- Subscription or updated monetization model for multiplayer
- Mobile companion v2: full functionality per the mobile spec
- Player-issued currencies (Primitive 5 v2)
- Advanced financial primitives: derivatives, insurance, bond markets
- Player governance and corporations: multi-player businesses with shareholders
Cross-cutting hygiene (every phase)
These tasks run throughout the entire project lifecycle, not as discrete phase deliverables:- Update spec docs whenever a design decision changes
- Maintain the glossary — when a new term enters design discussions, add it before it appears in three docs
- Quarterly risk review
- Regular playtests — do not go more than 4 weeks without one
- Performance monitoring
- Backup save files and database
Continue exploring
Glossary
Canonical definitions of every term used in the Realm spec and design discussions.
Design pillars
The seven non-negotiable principles behind every design decision in Realm.
Economic primitives
The 9 economic atoms that players compose into every business in the game.
Architecture
How the Python engine, Next.js frontend, and SQLite/Postgres persistence fit together.