// THE_VISION

Quest Keeper AI

An AI Dungeon Master meets Visual Game Engine—where every action has mechanical weight, every quest tracks progress, and your world persists across sessions.

Strategic Pillars

  • 🔴 Mechanical Depth - Rich, trackable game systems (quests, skills, items)
  • 🟠 Visual Feedback - Maps, battlemaps, character sheets that reflect state
  • 🟠 AI Integration - LLM DM with proper tools to manipulate world
  • 🟡 Session Continuity - Save, load, condense, resume anywhere
  • 🟢 Multiplayer Foundation - Session IDs, multi-character support

The Key Innovation

The AI describes the world; the engine defines it. LLMs never lie about your HP, inventory, or quest progress because all state comes from a verified SQLite database—not hallucination.

Phase 1: Core Foundation

✅ Complete

Unified backend, working frontend integration, all core systems operational.

  • Unified rpg-mcp server (80+ MCP tools)
  • Tauri desktop app with React frontend
  • Three.js 3D battlemap visualization
  • Character creation with D&D 5e stats
  • Inventory system with equipment slots & consumables
  • Combat encounters with initiative & actions
  • Quest system with objectives & rewards
  • Procedural world generation (Perlin noise)
  • Multi-LLM support (Claude, GPT, Gemini, OpenRouter)
  • SQLite persistence with WAL mode
  • Bundled database with LOTR content

Phase 2: Advanced Systems

🔄 In Progress

DM secrets, grand strategy, and spatial combat enhancements.

  • DM Secrets system with reveal conditions
  • Leak detection for secret information
  • Spoiler formatting for dramatic reveals
  • Grand strategy nation management
  • Turn-based resolution with fog of war
  • Diplomatic actions (alliances, claims)
  • Full Spellcasting Engine (Slots, Concentration)
  • Theft & Fence Economy (Heat system)
  • Corpse Decay & Loot Tables
  • NPC Memory & Relationship Tracking
  • Improvisation Engine (Rule of Cool)
  • Spatial Navigation (Room Networks)
  • Spatial combat with grid positions
  • World map visualization (2D tile view)
  • POI system for locations

Phase 3: Progression Systems

📋 Upcoming

OSRS-style deep character growth and tracking systems.

  • Skill system with XP curves
  • Skills: Combat, Magic, Crafting, Gathering, Social
  • Quest chains (multi-part storylines)
  • Quest prerequisites & unlock progression
  • Achievement system with milestones
  • Titles & rewards from achievements
  • Discovery achievements
  • Faction reputation system
  • Standing-based unlocks
  • Faction conflicts

Design Goal: Every action should feel meaningful. Level up skills through use, unlock content through exploration, and build reputation through choices.

Phase 4: Enhanced Combat

📋 Upcoming

Tactical, spatial, visual combat system.

  • Grid-based positioning (X/Y coordinates)
  • Movement costs by terrain type
  • Opportunity attack detection
  • Click-to-select tokens on battlemap
  • Drag-to-move token interaction
  • Context menu for combat actions
  • Area effect visualization (fireball, etc.)
  • Cover mechanics
  • Height advantage calculations
  • Combat log panel

Phase 5: Session Management

🔄 In Progress

Play forever, context permitting.

  • Session save/load tools
  • Session management UI
  • Campaign setup wizard
  • World generation modal
  • Multiple save slots
  • Auto-save on state changes
  • Context condensing for LLM limits
  • Token-aware compression
  • Priority information selection
  • Session export (Markdown adventure log)
  • JSON state dump
  • Character sheet export (PDF)

Context Condensing

When context limits are hit, the system summarizes session state into a compact format that can bootstrap a new session—preserving party status, active quests, recent events, and key relationships.

Phase 6: Workflow Automation

🔄 In Progress

One prompt → complex generation.

  • YAML workflow definitions
  • Workflow executor
  • Dynamic tool registry (135+ tools)
  • Event inbox system
  • Narrative context aggregation
  • batch_create_characters tool
  • batch_create_npcs tool
  • batch_distribute_items tool
  • batch_create_relationships tool
  • Dependency resolution (DAG)
  • Variable interpolation
  • Workflow rollback support
  • Campaign templates (LOTR, etc.)
  • Settlement generators
  • Encounter generators
  • Workflow browser UI

Example: Fellowship Setup

One prompt creates all 9 Fellowship members, assigns signature items, establishes relationships, and sets up Rivendell—using sequential batch operations instead of 50+ parallel calls (which caused duplicate Gandalfs).

// FUTURE_VISION

Long-Term Goals

  • Universal RPG Support - Pathfinder, Call of Cthulhu, PbtA, custom systems
  • Content Marketplace - Share campaigns, NPCs, items with community
  • Mobile Companion - Character sheets and dice on the go
  • Multiplayer Foundation - Session sharing, DM controls
  • Visual Generation - AI-powered scene and character art

Technical Debt to Address

  • Add comprehensive test suite (Vitest)
  • Accessibility improvements (ARIA labels, keyboard nav)
  • Performance profiling for large worlds
  • Streaming LLM responses
  • WebSocket transport for real-time events

Success Metrics

  • Average session length > 30 minutes
  • Return rate > 50% within 7 days
  • Quest completion rate > 60%
  • MCP call failure rate < 1%
  • UI response time < 200ms