Complete lore management system for AAA game development. Extracts, validates, and manages 200+ entity types across 34 categories from narrative text.
Architecture: DDD (Domain-Driven Design) — src/domain/, src/application/, src/infrastructure/, src/presentation/
Language: Python 3.11+
MCP Server: lore_mcp_server/ — standalone MCP server for lore CRUD operations
# Run tests
python -m pytest tests/ -v
# Run MCP server
python lore_mcp_server/server.py
# Run main app
python main.pysrc/domain/— Domain model, entities, value objects, repository interfacessrc/application/— Use cases, servicessrc/infrastructure/— SQLite/InMemory repository implementationssrc/presentation/— CLI, API layerlore_mcp_server/— MCP server (separate package).claude/skills/— 33 domain extraction skillsentities/— Extracted entity output (JSON)examples/— Sample lore JSON filestests/— Test suite
This project uses domain skills (.claude/skills/) to extract entities from narrative text. Each skill is a specialist:
Core Narrative (work together on story structure):
narrative-writing— Story, chapters, acts, plot branchescharacter-design— Characters, relationships, evolutionquest-design— Quests, objectives, moral choiceslore-writing— Lore fragments, codex, bestiary, dreams
World Building (spatial and environmental):
world-building— Geography, locations, dungeons, dimensionsenvironmental-design— Climate, weather, atmosphere, lightingurban-design— City districts, markets, plazas
Social & Political (societies and power):
faction-design— Factions, hierarchies, territoriespolitical-analysis— Governments, laws, courtssocial-culture— Social class, honor, karma, festivalsreligious-lore— Cults, rituals, blessings, curseshistorical-research— Eras, timelines, calendars
Game Systems (mechanics and progression):
progression-design— Skills, perks, XP, talent treeseconomic-modeling— Trade, currency, marketslegendary-items— Artifacts, runes, enchantmentsachievement-design— Achievements, trophies, rankspuzzle-design— Puzzles, riddles, traps, Easter eggsmilitary-strategy— Armies, weapons, fortifications
Technical & Media (production and aesthetics):
cinematic-direction— Cutscenes, camera pathsaudio-direction— Music, sound effects, motifsvfx-design— Particles, shaders, visual effectstransport-design— Mounts, vehicles, portalscontent-management— Mods, localization, UGCmedia-analysis— Newspapers, propaganda, rumorsresearch-design— Academies, libraries, archivesbiology-design— Ecosystems, evolution, food chainscelestial-science— Galaxies, stars, cosmic eventsui-design— Player choices, flowcharts, tagsanalytics-balance— Metrics, difficulty curves, loot tables
Base Skills (infrastructure, auto-loaded):
lore-extraction— Base extraction rules for all agentsentity-validator— Validation rules for extracted entitiesjson-formatter— JSON output formatting rulestechnical-systems— Safety net, catches remaining 193 entity types
When working as a team on lore extraction:
- Lead (Orchestrator) — Breaks text into domains, assigns to teammates, merges results, resolves cross-references. Uses delegate mode.
- Narrative Team —
narrative-writing+character-design+quest-design+lore-writing - World Team —
world-building+environmental-design+urban-design - Society Team —
faction-design+political-analysis+social-culture+religious-lore+historical-research - Systems Team —
progression-design+economic-modeling+legendary-items+ remaining game mechanics - Technical Team —
cinematic-direction+audio-direction+vfx-design+technical-systems
- Each teammate owns a domain — do NOT edit entities outside your assigned category
- Cross-references: When you find an entity that belongs to another domain, note it in your output as
"cross_ref": { "domain": "...", "entity": "...", "note": "..." }— the lead will route it - Output format: Always produce valid JSON following loreSystem schema. Use UUIDs for IDs.
- File ownership: Write output to
entities/<your-domain>.json— each teammate writes to their own file - Deduplication: The lead merges and deduplicates across domains after all teammates finish
- Lead reads source text and creates tasks per domain
- Each teammate claims their domain tasks
- Teammates extract entities using their skills
- Teammates report findings with cross-references
- Lead merges, deduplicates, validates final output
- Lead writes merged result to
entities/
- All entity IDs are UUIDs
- All output must be valid JSON
- Entity names are human-readable, not slugs
- Relationships reference other entities by ID
- Every entity has at minimum:
id,name,type - Use
snake_casefor field names - Timestamps in ISO 8601 format