# Skara Brae — Vision Version 1.0 (WI-2, 2026-10-03) · OpenUP artifact: `requirements/vision.md` · Canonical home: **skara-brae-common repo**, `docs/openup/` (decision reversed 2026-10-03; drafts move verbatim from skara-brae-server/docs/) ## Problem / Opportunity Text-based browser MMORPGs have proven retention and monetization for two decades (Torn City, since 2004), but incumbents carry 2000s-era engines. There is room for a modern, API-first, type-safe implementation of the formula: deep numeric progression, player-driven economy, idle-friendly pacing, real-time feedback. ## Product Vision **Skara Brae** is a fantasy text-based/idle MMORPG set in an ancient, labyrinthine city of stone and sorcery (The Bard's Tale I inspiration, dark-fantasy tone). It transplants **Torn City's proven loop** — energy-gated activities, training, economy, social systems — into that setting, adds **idle-RPG elements** (offline progression, hireable workers, pets; Idle Fantasy inspiration), and grounds combat in a **RoleMaster-inspired critical-hit system** (open-ended d100, crit tables with bleed/stun effects, level-gap damage caps). **Tagline:** *Set your hero to work. Close the app. Come back to loot.* ## Stakeholders - **Owner/developer (solo)** — builds and operates the game on self-hosted infrastructure (Forgejo/Jenkins pipeline). - **Players** — web/PWA users; the API-first contract also serves future community tools. ## Key Features (committed MVP scope, Phase 1) 1. Accounts (register/login, JWT) and character creation (5 races, 10 classes). 2. Stat training with escalating gold costs; energy/nerve/HP resources with lazy timed regeneration. 3. Adventures (energy/nerve-gated zone runs) with turn-based combat, crit tables, XP/gold/loot. 4. Economy: shop (buy/sell, stock), equipment slots, inventory. 5. Magic (class-gated spell levels, spell points) and bard songs (combat buffs). 6. Level-up review board; temple healing. 7. REST API (Rust/Axum) + Vue 3 client; WebSocket notifications. Later phases (not committed): PvP, guilds, properties, crafting, pets, blessings, offline workers, tower endgame. ## Constraints & Quality Bars - Behavior continuity: refactors must be wire-format and game-semantics identical (WI-2 governs). - Quality gates: `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, full test suite — zero-warning policy. - Game data lives in the shared `skara-brae-common` repo as language-neutral JSON (single source of truth for server, client, and a future generated wiki). - BIGINT (`i64`) stat growth; stats only ever go up. ## Success Criteria (current iteration) WI-1 delivered injectable RNG (deterministic domain tests). This iteration (WI-2) delivers an architecture cleanup that makes the codebase safe to grow on: typed responses, domain-extracted adventure service, named game-balance constants, one domain error taxonomy, fmt baseline — with all 45 existing tests green and zero behavior change. Longer term: a playable MVP per the feature list above.