Add Phase 12: native RPG world state

Structured world/player/NPC stats, two-way flags, and sticky milestones
per scenario (stat_schema). The AI proposes a per-turn delta; a Python
engine referees it (clamp to min/max, per-turn cap, cooldown, counters).
Band word-labels plus a fixed stat guide (descriptions + full ranges)
keep the model grounded. World State drawer + Insights delta report;
undo/retry roll it back via the Phase 11 snapshot pattern.

- migrations 26-28 (scenarios.stat_schema, adventures.world_state,
  actions.world_state_before); all nullable, additive, safe on existing rows
- migration 29 raises the default context budget 4096 -> 16384
  (custom values preserved)
- seeded demo scenario 04-rpg-world-state.json (Bandit Camp)
- 19 new tests (33 total pass)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parththakkar106
2026-07-21 14:47:29 +05:30
co-authored by Claude Opus 4.8
parent 64356414b1
commit 4dac445f90
18 changed files with 1509 additions and 5 deletions
+9
View File
@@ -100,3 +100,12 @@ Open questions are recorded at the top of each phase file under "Ask before impl
serving, database decision.
10. **[Phase 10 — Deploy & publish](10-phase-deploy.md)**: Render blueprint + deploy, seeded
demo scenarios, live smoke test, resume/website links and blurb.
## Post-launch
- **[State revert + retry fix](11-state-revert-and-retry-fix.md)**: undo/retry roll the shared
`script_state` back; per-action `state_before` snapshots; undo concurrency lock.
- **[Phase 12 — RPG world state](12-phase-rpg-world-state.md)**: structured world/player/NPC stats
+ milestones per scenario (`stat_schema`); the AI proposes deltas, a Python engine clamps them
(min/max, per-turn cap, cooldown, sticky milestones); band descriptions keep the model honest;
World State drawer + Insights delta report; reuses the Phase 11 undo/retry snapshot.