Hand-authored zoneCryptValdrisGraph() (8 nodes incl. fork +
Perception DC 15 secret reliquary) self-registers at init. Two
surgical bridges so new runs traverse the authored graph when
GOGOBEE_BRANCHING_ZONES=1: startZoneRun seeds current_node from
g.Entry, and DungeonRun.CurrentRoomType resolves via the live
node's kind so divergent paths (secret_chamber) dispatch through
the right resolver. Gate off is bit-identical to pre-G7.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Harvest tables (expedition + standalone) now keyed by node_id; legacy
room-idx entries auto-migrate via read-fallback + drop-on-save.
- Narration salts swapped from run.CurrentRoom to narrationCadence(run)
(= len(visited_nodes)-1) so flavor pickers survive G9 column drop.
- !zone map renders the graph (BFS by PosX/PosY) when the gate is on:
✓/▶/· status, ╳ for locked-only edges, secrets hidden until visited.
- Region-boundary hook in graph advance/!zone go updates expedition
CurrentRegion + visited list when from/to nodes differ — without
burning supplies or retiring runs (the graph IS the run state).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Full implementation plan for replacing the linear room_seq_json model
with a directed-graph zone topology. Enables Slay-the-Spire-style
forks, perception-gated secret rooms, locked shortcuts, multiple
paths converging on a shared boss.
Plan covers:
- Schema (new zone_node + zone_edge tables; current_node /
visited_nodes / node_choices columns on dnd_zone_run)
- Go-side types (ZoneGraph, ZoneNode, ZoneEdge, lock kinds)
- Authoring model with worked example (Crypt of Valdris POC)
- Nine-phase rollout (G1 schema → G2 types → G3 legacy compiler →
G4 dual-write run state → G5 navigation behind env gate → G6
dependent surfaces → G7 POC zone → G8 mass migration → G9
retire linear model)
- Risk inventory + mitigations
- Surface inventory of files likely to change
- Open authoring questions with proposed defaults
Not yet implemented — handed off to a fresh session.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>