Skip to main content
Glama
LIVING_WORLD_IMPLEMENTATION_INDEX.mdβ€’12.9 kB
# Living World Kernel Upgrade - Implementation Index **Status:** βœ… TRIAGE COMPLETE - READY FOR IMPLEMENTATION **Date:** December 6, 2025 **Created By:** Triage Analysis --- ## πŸ“‹ DOCUMENT STRUCTURE ### EXECUTIVE DOCUMENTS **1. TRIAGE_SUMMARY.txt** (START HERE) - πŸ“– Quick 2-minute overview - πŸ“Š Key findings at a glance - βœ… Success metrics - 🎯 Decision checklist - **Read this first** **2. TRIAGE_LIVING_WORLD_KERNEL.md** (DETAILED ANALYSIS) - Part 1: Architectural Analysis (what exists, 70% done) - Part 2: Integration Analysis (how it fits) - Part 3: Risk Assessment (what could go wrong) - Part 4: Required Game Design Decisions (what you need to decide) - Part 5: Success Criteria (rewritten phases 1-3) - Part 6: Game Design Decisions (detailed options with recommendations) - Part 7: Dependency Mapping (what blocks what) - Part 8: Architecture Compliance (does it follow patterns?) - Part 9: Known Issues to Fix First (prerequisites) - Part 10: Recommended Handoff Structure - **Read this before starting implementation** ### IMPLEMENTATION DOCUMENTS **3. HANDOFF_LIVING_WORLD_PHASE_1.md** (PHASE 1 SPEC) - βœ… Complete implementation spec for Spatial Graph System - πŸ“ All 5 deliverables in detail - πŸ§ͺ 15+ test cases fully written out - πŸ“Š Database schema with constraints - πŸ”§ MCP tool signatures with examples - βœ… Implementation checklist - 🎯 Success criteria and acceptance tests - **HAND THIS TO CLAUDE CODE FOR PHASE 1** **4. HANDOFF_LIVING_WORLD_PHASE_2_OUTLINE.md** (PHASE 2 OUTLINE) - ⏳ Forward-looking outline for Phase 2 - ⚠️ DO NOT START YET - wait for Phase 1 + fixes - πŸ“‹ Game design decisions needed - 🎯 Success criteria for Phase 2 - πŸ“¦ All deliverables outlined - ⏱️ Estimated timeline - **READ BEFORE PHASE 2 - DON'T IMPLEMENT YET** **5. LIVING_WORLD_IMPLEMENTATION_INDEX.md** (THIS FILE) - πŸ“‘ Quick reference and navigation - πŸ—ΊοΈ Document relationships - ⏭️ What to read/do next - πŸ”— Cross-references --- ## 🎯 QUICK NAVIGATION BY ROLE ### If You're a MANAGER / DESIGNER 1. Read: `TRIAGE_SUMMARY.txt` (5 min) 2. Ask the team: Game design decisions from Part 6 of `TRIAGE_LIVING_WORLD_KERNEL.md` 3. Approve timeline: Phase 1 (3-4 days), blocking fixes (2 hours), Phase 2 (4-5 days) ### If You're Implementing PHASE 1 1. Read: `TRIAGE_SUMMARY.txt` (understand context) 2. Read: `HANDOFF_LIVING_WORLD_PHASE_1.md` (implementation spec) 3. Follow the checklist - start with schema, then repo, then tools, then tests 4. Use TDD: Write test first, then implementation 5. `npm test -- tests/spatial-graph.test.ts` frequently ### If You're Implementing PHASE 2 (LATER) 1. Wait for Phase 1 to be βœ… COMPLETE 2. Wait for blocking issues to be βœ… FIXED (EDGE-001, EDGE-006, stats) 3. Manager/designer must βœ… APPROVE game design decisions 4. Then: Read `HANDOFF_LIVING_WORLD_PHASE_2_OUTLINE.md` 5. Get full Phase 2 implementation spec (created later) ### If You're Reviewing Code 1. Reference: `TRIAGE_LIVING_WORLD_KERNEL.md` Part 8 (architecture compliance) 2. Check: Are schemas using Zod? 3. Check: Is repository pattern followed? 4. Check: Are tests comprehensive? 5. Check: Does it respect "LLM describes, engine validates" pattern? ### If You're Triaging Bugs Found During Implementation 1. Add findings to `Agents/EMERGENT_DISCOVERY_LOG.md` 2. Reference the original triage: `TRIAGE_LIVING_WORLD_KERNEL.md` 3. If it's a Phase 2 issue, note it for Phase 2 planning 4. If it's architectural, flag for design review --- ## πŸ“Š DOCUMENT RELATIONSHIP MAP ``` DECISION POINT ↓ [Manager reads TRIAGE_SUMMARY.txt] ↓ [Decide: Phase 1 only, or Phase 1+2?] β”œβ”€ Phase 1 only? β”‚ └─→ Developer gets HANDOFF_LIVING_WORLD_PHASE_1.md β”‚ Developer implements (3-4 days) β”‚ When done: Phase 2 planning happens later β”‚ └─ Phase 1+2 planned? β”œβ”€β†’ Designer approves game design decisions β”‚ (from TRIAGE_LIVING_WORLD_KERNEL.md Part 6) β”‚ β”œβ”€β†’ Developer Phase 1 β”‚ Uses: HANDOFF_LIVING_WORLD_PHASE_1.md β”‚ β”œβ”€β†’ [Phase 1 complete] β”‚ β”œβ”€β†’ Fix blocking issues β”‚ (EDGE-001, EDGE-006, stats from TRIAGE Part 9) β”‚ β”œβ”€β†’ Developer Phase 2 β”‚ Uses: HANDOFF_LIVING_WORLD_PHASE_2_OUTLINE.md β”‚ Gets: Full Phase 2 spec (created then) β”‚ └─→ [Phase 2 complete] ["Living World" system ready for production] ``` --- ## ⏱️ READING ROADMAP ### SHORTEST PATH (5 minutes) β†’ `TRIAGE_SUMMARY.txt` only βœ… Understand what's being done, why, and timeline ### MANAGEMENT PATH (15 minutes) 1. `TRIAGE_SUMMARY.txt` (5 min) 2. `TRIAGE_LIVING_WORLD_KERNEL.md` Part 6 (10 min) βœ… Understand decisions needed and timeline ### DEVELOPER - PHASE 1 PATH (30 minutes) 1. `TRIAGE_SUMMARY.txt` (5 min) 2. `HANDOFF_LIVING_WORLD_PHASE_1.md` (25 min) βœ… Ready to start implementation ### COMPLETE ANALYSIS PATH (2-3 hours) 1. `TRIAGE_SUMMARY.txt` (5 min) 2. `TRIAGE_LIVING_WORLD_KERNEL.md` - ALL PARTS (60 min) 3. `HANDOFF_LIVING_WORLD_PHASE_1.md` (30 min) 4. `HANDOFF_LIVING_WORLD_PHASE_2_OUTLINE.md` (20 min) βœ… Complete understanding of system, phases, and implementation --- ## πŸ” FINDING SPECIFIC ANSWERS ### "What exists already?" β†’ `TRIAGE_LIVING_WORLD_KERNEL.md` Part 1 ### "What's the architecture?" β†’ `TRIAGE_LIVING_WORLD_KERNEL.md` Part 2 + Part 8 ### "What could go wrong?" β†’ `TRIAGE_LIVING_WORLD_KERNEL.md` Part 3 ### "What do I need to decide before starting?" β†’ `TRIAGE_LIVING_WORLD_KERNEL.md` Part 6 ### "What's blocking Phase 2?" β†’ `TRIAGE_LIVING_WORLD_KERNEL.md` Part 9 ### "How long will Phase 1 take?" β†’ `TRIAGE_SUMMARY.txt` Timeline section ### "What tests do I need to write?" β†’ `HANDOFF_LIVING_WORLD_PHASE_1.md` Section 5 ### "What's the database schema?" β†’ `HANDOFF_LIVING_WORLD_PHASE_1.md` Section 3 ### "What MCP tools need to be created?" β†’ `HANDOFF_LIVING_WORLD_PHASE_1.md` Section 4 ### "How do I know when Phase 1 is done?" β†’ `HANDOFF_LIVING_WORLD_PHASE_1.md` Success Criteria section ### "What about Phase 2?" β†’ `HANDOFF_LIVING_WORLD_PHASE_2_OUTLINE.md` ### "I found a bug during implementation" β†’ Reference `Agents/EMERGENT_DISCOVERY_LOG.md` and `TRIAGE_LIVING_WORLD_KERNEL.md` Part 9 --- ## βœ… IMPLEMENTATION CHECKLIST ### BEFORE YOU START - [ ] Managers: Read `TRIAGE_SUMMARY.txt` - [ ] Managers: Approve timeline and game design decisions - [ ] Developers: Read `HANDOFF_LIVING_WORLD_PHASE_1.md` - [ ] Developers: Understand TDD approach ### PHASE 1 IMPLEMENTATION - [ ] Create schema (`src/schema/spatial.ts`) - [ ] Create repository (`src/storage/repos/spatial.repo.ts`) - [ ] Add database migration (`src/storage/migrations.ts`) - [ ] Add character.currentRoomId column - [ ] Write tests first (`tests/spatial-graph.test.ts`) - [ ] Create tools (`src/server/spatial-tools.ts`) - [ ] Register tools (`src/server/index.ts`) - [ ] All tests passing - [ ] `npm run build` succeeds - [ ] Commit with message: `feat(spatial): Implement persistent room system` ### BEFORE PHASE 2 STARTS - [ ] Phase 1 βœ… complete and merged - [ ] Fix EDGE-001 (self-theft prevention) βœ… - [ ] Fix EDGE-006 (victim/fence conflict) βœ… - [ ] Add perception/stealth to character stats βœ… - [ ] Manager approves game design decisions βœ… - [ ] Developers review `HANDOFF_LIVING_WORLD_PHASE_2_OUTLINE.md` βœ… ### PHASE 2 IMPLEMENTATION (LATER) - [ ] Create hearing engine (`src/engine/social/hearing.ts`) - [ ] Create stealth/perception engine (`src/engine/social/stealth-perception.ts`) - [ ] Extend npc-memory-tools with `interact_socially` - [ ] Write 20+ integration tests - [ ] All tests passing - [ ] Commit with message: `feat(social): Implement hearing and eavesdropping mechanics` --- ## 🚨 CRITICAL SUCCESS FACTORS ### Phase 1 Must: 1. βœ… Use Zod validation (don't skip) 2. βœ… Use repository pattern (don't use raw SQL in tools) 3. βœ… Write tests first (TDD - RED β†’ GREEN β†’ REFACTOR) 4. βœ… Respect "LLM describes, engine validates" pattern 5. βœ… Persist descriptions (can't be retroactively changed) 6. βœ… Follow existing code patterns (study src/schema/, src/storage/, src/server/) ### Before Phase 2 Must: 1. βœ… Fix EDGE-001 and EDGE-006 2. βœ… Add perception/stealth stats 3. βœ… Finalize game design decisions 4. βœ… Get management buy-in ### Phase 2 Must: 1. βœ… All of Phase 1's constraints 2. βœ… Proper Stealth vs Perception opposed rolls 3. βœ… Spatial awareness (hearing ranges) 4. βœ… Environment modifiers (tavern vs forest) 5. βœ… Memory recording for witnesses only --- ## πŸŽ“ LEARNING RESOURCES ### To Understand the Codebase: 1. Read: `Agents/PROJECT_CONTEXT.md` (architecture overview) 2. Study: `src/schema/character.ts` (example Zod schema) 3. Study: `src/storage/repos/character.repo.ts` (example repository) 4. Study: `src/server/combat-tools.ts` (example MCP tools) 5. Study: `tests/server/*.test.ts` (example tests with Vitest) ### To Understand Game Design: 1. Review: D&D 5e rules for Stealth/Perception 2. Review: Combat mechanics in `src/engine/combat/` 3. Review: NPC memory system in `src/server/npc-memory-tools.ts` 4. Review: EMERGENT_DISCOVERY_LOG.md for context on similar systems ### To Understand TDD: 1. Read: `Agents/TDD_FRAMEWORK.md` 2. Review: Example test in `tests/spatial-graph.test.ts` (in Phase 1 spec) 3. Practice: Write test before implementation for every feature --- ## πŸ“ž DECISION POINTS REQUIRING INPUT **Manager/Designer must decide:** 1. **Phase 1 only or Phase 1+2?** - Phase 1 only: 3-4 days, ships sooner - Phase 1+2: 2 weeks, complete system 2. **Hearing Range Formula (for Phase 2)?** - Option A: Fixed ranges (simple) - Option B: Perception-based (complex) - Option C: Environment-aware (immersive) ← Recommended - Option D: Hybrid (most complex) - See: `TRIAGE_LIVING_WORLD_KERNEL.md` Part 6 3. **Character Description Changes?** - Should LLM be able to change room descriptions? (Recommendation: No) 4. **Adjacent Room Hearing?** - Should characters in adjacent rooms hear conversations? - (Recommendation: Loud shouts yes, whispers no) --- ## πŸ”— CROSS-REFERENCES ### From EMERGENT_DISCOVERY_LOG.md: - EDGE-001: Self-theft logic flaw (blocks Phase 2) - EDGE-006: Victim/fence conflict (blocks Phase 2) - NEW-MECH-001: No mechanical transfers (affects Phase 1 design) - MED-007: No actual dialogue system (future enhancement) ### From PROJECT_CONTEXT.md: - Tech stack and architecture overview - MCP tool categories and count (122 tools) - Test coverage (659 tests) - Repository locations (frontend/backend) ### From PLAYTEST_PHILOSOPHY.md: - Why we test the way we do - Player-centric development approach - Emergent gameplay focus --- ## πŸ“¦ DELIVERABLES SUMMARY | Phase | What | Status | Duration | |-------|------|--------|----------| | **1** | Spatial Graph System (rooms, exits, persistence) | 🟒 SPEC READY | 3-4 days | | **Fixes** | EDGE-001, EDGE-006, add stats | 🟑 OUTLINED | ~2 hours | | **2** | Social Hearing Mechanics (overhearing, stealth) | 🟑 OUTLINE READY | 4-5 days | | **3** | Auto-Mender Dev Tools | πŸ”΄ NOT STARTED | Future | --- ## 🎯 SUCCESS LOOKS LIKE ### Phase 1 Complete: - βœ… Rooms persist in database - βœ… Room descriptions locked after creation - βœ… Rooms link via exits - βœ… Perception-based exit filtering works - βœ… All 15+ tests pass - βœ… Code review approved ### Phase 2 Complete: - βœ… Whispers heard only by target + neighbors - βœ… Shouts heard across location - βœ… Stealth vs Perception rolls working - βœ… Eavesdroppers see filtered memory entries - βœ… All 20+ tests pass - βœ… "Living World" feels alive --- ## πŸš€ NEXT STEPS **For Managers:** 1. Read `TRIAGE_SUMMARY.txt` (5 min) 2. Review game design decisions in `TRIAGE_LIVING_WORLD_KERNEL.md` Part 6 3. Decide: Phase 1 only, or Phase 1+2? 4. Approve timeline **For Developers (Phase 1):** 1. Read `HANDOFF_LIVING_WORLD_PHASE_1.md` (25 min) 2. Set up test database 3. Start with schema (`src/schema/spatial.ts`) 4. Use TDD throughout 5. Reference `src/schema/character.ts` and `src/storage/repos/character.repo.ts` as models **For Developers (Phase 2):** 1. Wait for Phase 1 βœ… + fixes βœ… + decisions βœ… 2. Then review `HANDOFF_LIVING_WORLD_PHASE_2_OUTLINE.md` --- ## ❓ QUESTIONS? - **What's being built?** β†’ `TRIAGE_SUMMARY.txt` - **Why this way?** β†’ `TRIAGE_LIVING_WORLD_KERNEL.md` - **How to implement?** β†’ `HANDOFF_LIVING_WORLD_PHASE_1.md` - **What about Phase 2?** β†’ `HANDOFF_LIVING_WORLD_PHASE_2_OUTLINE.md` --- **Status:** βœ… TRIAGE COMPLETE **Ready for:** Implementation **Quality:** Production-ready specification **Confidence:** 95% Proceed with Phase 1 implementation.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mnehmos/rpg-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server