- Done
- [-] In progress
- Planned
- [?] Under consideration
- Project structure and git repo
- FastAPI backend skeleton with CORS
- Ollama async client (generate + chat + model list)
- Obsidian vault R/W service (frontmatter-aware)
- Per-system rules modules: OSE, DCC, SWN/WWN, FGG, ARS
- OSRIC 3.0 placeholder module
- AI expansion endpoints: scene, NPC, location, freeform query
- Lore endpoints: list, read, write, search, AI-generate with review flag
- Rules endpoints: dice roller (XdY+Z), system info, rules query
- Session endpoints: start, current state, journal, threads, party (in-memory)
- Foundry VTT module: AI panel sidebar, lore browser, scene/NPC context menus
-
window.SanctumAPI helper for macros - Obsidian vault template: NPC, location, session, faction templates
- Rules index pages for all systems
- Docker compose for backend
- Wire session/party/character storage to PostgreSQL (tower.local)
- SQLAlchemy async models: Campaign, Character, GameSession, Thread, JournalEntry
- Migration tooling (Alembic) — initial migration in alembic/versions/0001
- Character CRUD with full stat block (abilities, saves, HP, inventory, XP, spells)
- Retainer / hireling tracking (retainer_of_id, morale, wage)
- Session history log (persisted, searchable by campaign)
- Multi-campaign support (campaigns as top-level namespace)
- Dedicated /campaigns, /characters, /sessions routers replacing in-memory store
- Deploy Foundry module to tower.local (
/mnt/foundry/FountryVTT/Data/modules/sanctum/) - Hex scene canvas creator — blank hex-grid canvas, correct grid type/size/colors, registers HexMap in DB
- Hex overland map generation — procedural terrain tiles placed on canvas (Phase 9)
- Alt+click hex to look up or create vault location note with AI expand
- AI handout generator — Location, NPC, Item, Rumor, Document, Faction
- Handout → Foundry JournalEntry + optional Obsidian vault write
- Map sync: push Foundry Note pins → vault stubs; pull vault locations → map pins
-
/ai/handoutbackend endpoint with per-type prompt templates - Scene template presets — blank canvases with preset grid/lighting (dungeon/settlement/battle/wilderness)
- Dungeon map generation — visual room layout placed on canvas
- Hex exploration state tracking — HexMap + HexCell models, CRUD, /maps router, migration 0002
- Import hex_crawl tile assets into Foundry scenes
- Context injection: active session + party pulled from DB into AI system prompt (opt-in via campaign_id)
- Random tables: OSE, DCC, SWN, FGG, generic — dungeon dressing, encounters, treasure, rumors, NPC motivation, reaction with optional AI flavor
- Vault context: keyword-search relevant NPC/location notes injected into AI prompts (
build_vault_context) - Dialog generator: multi-turn NPC conversation panel, stateless history, persona from vault note, Save to Journal
- Encounter builder:
/ai/encounterendpoint — dungeon level, terrain, party size/level - Treasure generator:
/ai/treasureendpoint — room/hoard/personal/cache/incidental with AI description - AI lore review queue: list all
pending_review: truenotes, approve/edit/reject in Foundry; badge on Journal header - Model selector per request (model param on expand/dialog/encounter endpoints)
- Wandering monster tables: per-system, per-terrain (data files only, endpoint exists)
- OSRIC 3.0 — update module when rules are released
- Faction tracker: Faction/Asset/Turn DB models, CRUD API, Foundry panel with HP bars and turn log
- Thread / quest tracker: ThreadEvent model, event log API, Foundry timeline panel with open/close/branch
- NPC relationship graph: NPCRelationship DB model, canvas graph in Foundry, add/edit/delete UI
- XP and leveling assistant:
/characters/{id}/award-xp, per-system XP tables, level-up detection, Foundry panel - Reaction and morale roll assistant:
/rules/reaction,/rules/morale— 2d6 with optional AI flavor - Calendar / time tracker: CalendarState DB model, advance time/days, rations, light tracking, Foundry panel
-
/rules/xp-tableendpoint — per-system/class XP thresholds for all supported systems - Obsidian Templater integration: template files for NPC/Location/Session/Faction/Item/Quest;
POST /vault-templates/initwrites to vault;POST /vault-templates/from-templatecreates stubs
- Mythic GME oracle: OracleState DB model, Fate Check (d100 vs odds+chaos), Scene Check, Random Event (focus+meaning tables), chaos factor tracker, Foundry panel (⚄ Oracle in Journal header)
- Reaction roll assistant:
/rules/reaction— 2d6 with optional AI flavor (moved from Phase 5) - Morale roll assistant:
/rules/morale— 2d6 with optional AI flavor (moved from Phase 5) - Note: official foundryvtt-mythic-gme module incompatible with Foundry 14; Sanctum oracle is the working replacement
- OSE Advanced Fantasy as distinct system (
ose_advanced) — separate system prompt, tone, class list - Full OSE class data: all 7 standard classes with HD, saves, XP, armor, weapons, special abilities
- OSE Advanced classes (Carcass Crawler): Acrobat, Assassin, Barbarian, Bard, Druid, Illusionist, Knight, Paladin, Ranger + new races (Gnome, Half-Elf, Half-Orc)
-
GET /rules/classes?system=ose|ose_advanced— full class reference with saves, HD, XP -
GET /rules/dungeon-procedures— OSE turn procedures and light source data - Expanded OSE random tables: wandering monsters by dungeon level (1-2, 3-4, 5-6, 7+) and terrain (forest, hills, swamp, road); room contents; doors; traps
- Dungeon Tracker Foundry panel: turn counter, light source tracker (torch/lantern/candle), wandering check (d6), rest reminder, OSE procedure reference
- OSE system prompt expanded: THAC0, all five saves, turn procedure, light, surprise, encounter distance, reaction table
- OSE Advanced system prompt: class-aware tone, same mechanics, expanded class roster
- XP tables: all OSE and OSE Advanced classes with correct per-level thresholds
-
ose_advancedadded to Foundry module system selector
- Mythic GME 2e — Fate Check, Scene Check, Random Event, chaos factor (already implemented Phase 6)
- Mythic Variations 1 & 2 — Detail Check, Behavior Check, complex questions; Detail Check Revisited (Vol 56) integrates with 2e
- Adventure Crafter — adventure arc generation (Themes, PlotPoints, Characters, Turning Points)
- Location Crafter — fills individual hex/dungeon locations with Purpose, Focus, descriptors, NPCs, features
- Mythic Magazine Vol 49 — Society Crafter — faction/civilization setup: origin, productivity, culture, covenants, defense, Society Events table
- Mythic Magazine Vol 60 — Fantasy World Crafter — world-level setup: sub-genre, mythology, Central Society (calls Society Crafter), magic, monsters, threats; World Meaning Table, Adventure Seeds
- Mythic Magazine Vol 61 — City Crafter — settlement level: City Identity, five Districts, City Map, City Events, four Landmarks
- Mythic Magazine Vol 63 — Campaign Crafter — campaign arc: Hook, End Goal, Running Influences, Crucial Characters, Grand Conclusion; includes Rivals system
- Mythic Magazine Vol 25 — Handling Long Journeys: Journey Segmentation, Journey Check Table, Journey Events Elements
- Mythic Magazine Vol 51/62 — Event Crafter Collections — Fantasy Treasure, Mercenary Missions, Quest Waypoints (Vol 62); Conspiracy, Creature Feature, Catastrophe (Vol 51)
- Mythic Magazine Vol 56 — Detail Check Revisited — integrates Variations II Detail Check with GME 2e chaos factor
- Mythic Magazine Vol 61 — Degrees of Fate — 5-level Yes/No oracle vs binary Fate Check
- SYWTBAGM (Justin Alexander) — node-based scenario design (structural connectivity layer); failure clock; 4-watch hexcrawl running sheet; 12-mile hex alternative; comprehensive hexmap/dungeon symbol sets
- Justin Alexander Hexcrawl Series — thealexandrian.net; hexcrawl procedures, navigation, encounter distance, watch structure
- Dolmenwood Campaign Book (Necrotic Gnome) — weather tables (encoded:
backend/data/tables/weather.json); getting lost procedures; foraging; OSE-compatible wilderness procedures; Seasons & Unseasons
- Detail Check Revisited (Vol 56): Detail Focus table wired to chaos factor in MythicOracle panel (
POST /oracle/{id}/detail-check) - Degrees of Fate (Vol 61): 5-level oracle mode toggle in MythicOracle panel (
POST /oracle/{id}/degrees-check)
-
POST /world/setup— Fantasy World Crafter (sub-genre, mythology, magic, threats, tone + AI overview + seed) -
POST /world/society— Society Crafter (origin, productivity, defense, culture, current event + AI expansion) -
POST /world/settlement— City Crafter (identity, 5 districts, 4 landmarks + AI names + rumour hook) -
POST /world/campaign— Campaign Crafter (hook, goal, 2 influences, rival + AI opening scene) - WorldBuilder Foundry panel — tabbed UI (World / Society / Settlement / Campaign), seed input, Save to Journal
- Journey Tracker Foundry panel — per-watch travel procedure (Vol 25): watch counter, Journey Check, Journey Events, weather roll, getting lost
-
POST /rules/weather— 2d6 weather roll from Dolmenwood tables with I/V/W effects; optional AI flavor - Wandering monster tables: mountains, coast, desert, plains added to
data/tables/ose.json -
POST /world/tick— monthly world tick: Society Events roll per faction, Event Crafter Collection roll, faction turn advancement; Tick tab in WorldBuilder panel - Wandering monster tables: forest, hills, swamp, road terrain entries complete
- Failure Clock field in DungeonTracker panel (optional countdown; configurable max; AI-flavored zero event)
- Encounter check mode toggle: d6 (OSE default 1-in-6) vs d8 (SYWTBAGM 1-in-8) in DungeonTracker settings
- Dungeon node map: adjacency list on dungeon record (node IDs + connections) for Location Crafter context injection
- NarrativeCharacter DB table — Mythic GME cast list (name, role, status, thread associations)
- Settlement DB entity — links hex → faction, stores City Crafter output
- Dungeon DB extended fields — cross-section layout, dungeon tags, faction ecology
- Faction DB extended fields — problem, goal, domain_title, society_events_table reference
- Location Crafter (Mythic Cartographer) — Purpose (d20) + Focus (d20) + descriptor pairs per hex/room; drives AI expansion
- OSE Dungeon Stocking — 2-in-6 monster, 1-in-6 trap, 1-in-6 special, empty otherwise; treasure type per monster HD
- SYWTBAGM (Justin Alexander) — node-based dungeon design; room connections as graph; hidden information layer
- Dolmenwood / OSE wilderness — feature density by terrain; hex landmark types; lair categories
-
POST /world/hexmap/{map_id}/generate— procedural terrain + feature seeding for a region- Input: region_type (coastal/inland/mountain/forest/mixed), world_context seed, feature_density
- Terrain distribution tables per region type → bulk-update HexCell terrain fields
- Feature seeding: per-terrain density tables → mark hexes as dungeon/settlement/lair/ruin/special/empty
- Returns summary: terrain counts, feature list with hex coords
-
POST /world/location— Location Crafter: Purpose (d20) + Focus (d20) + descriptor pair + AI description- Usable for both hex POIs and dungeon rooms
- Input: context (terrain, region, existing notes), seed
-
GET /maps/{map_id}/poi— list all feature hexes with known/hidden status
- Terrain distribution tables — % weights per region type (backend/data/tables/terrain_distribution.json)
- Feature density tables — dungeon/lair/settlement/ruin counts per 20-hex region per terrain type
- Location Crafter tables — Purpose d20, Focus d20, Action/Subject meaning words (extend oracle tables)
- HexCell extended fields (migration):
poi_name,poi_type,poi_known_to_pc(hidden info layer),poi_data(JSONB for Location Crafter output)
- WorldBuilder "Map" tab — region type selector, density controls, Generate Terrain button
- Updates HexCell records, places Foundry Note pins on feature hexes
- Hidden/revealed toggle: referee sees all POIs; "reveal" marks
poi_known_to_pc
- HexCell detail panel — click hex → show POI name, type, known status, Location Crafter output, AI expand
-
POST /dungeon/create— create dungeon record with metadata (name, level range, type, hex cell link) -
POST /dungeon/{id}/generate-rooms— generate room graph: N rooms, adjacency list, basic dimensions -
POST /dungeon/{id}/stock— OSE stocking procedure per room: monster (wandering table by dungeon level), trap, special, treasure (by type), empty -
POST /dungeon/{id}/rooms/{room_id}/location-crafter— Location Crafter for a specific room -
GET /dungeon/{id}— full dungeon: rooms, connections, contents, exploration state -
PATCH /dungeon/{id}/rooms/{room_id}— update room (explored, contents revealed, notes)
-
Dungeonmodel — campaign_id, hex_cell_id (FK), name, dungeon_type (cave/ruin/tomb/tower/keep), level_range_min, level_range_max, faction_id (nullable), tags (JSONB), notes -
DungeonRoommodel — dungeon_id (FK), room_number, description, connections (JSONB adjacency list), width_ft, length_ft, light (none/dim/lit), terrain, explored, contents_revealed, notes -
RoomContentsmodel — room_id (FK), content_type (monster/trap/treasure/special/empty), content_data (JSONB: statblock stub, trap type, treasure roll result, etc.), revealed
- Dungeon Manager panel — create dungeon, view room graph list, stock all rooms, per-room detail
- Room list: number, description, content_type badge, explored/unexplored toggle
- Stock button: runs OSE procedure across all empty rooms
- Per-room: reveal contents, add GM notes, mark explored
- Integration hook: DungeonTracker "current dungeon" selector links to Dungeon record
- Hidden information layer — referee view shows all contents; "reveal to player" marks contents_revealed
- Location Crafter button per room — rolls Purpose + Focus + AI description, saves to room notes
Tracking & hidden information (cross-cutting)
- Hex POI known/hidden state —
poi_known_to_pcon HexCell; toggle in Foundry hex panel - Room contents revealed state —
revealedon RoomContents; referee controls what PC "knows" - Dungeon ← → HexCell link —
hex_cell_idon Dungeon; clicking a feature hex can open its dungeon
- [?] Ambient audio hooks (link scene type to audio triggers in Foundry)
- [?] Web character sheet UI (standalone from Foundry, for mobile use)
- [?] Export: session summary → formatted PDF or markdown
- [?] Import: hex_crawl world data → Obsidian vault + Foundry scenes
- [?] SWN sector generator integration
- [?] OSRIC 3.0 — update rules module when released
- [?] Alexander Hexcrawl series procedures — navigation rules, hex turn structure, pointcrawl variant