Replaces AI-DnD's RPG relative-delta world state with the genre-neutral typed
narrative state of ADR 010: explicit, absolute, allowlisted events proposed by
the model, validated by the application, applied to one authoritative document,
and snapshotted per position so restore stays a row read.
This commit includes the corrective pass that followed the independent review
in planning/reports/M5-IMPLEMENTATION-REPORT.md. The invariant it exists to
hold is:
visible active transcript position == stored head == authoritative state
Narrator editing (D10, STORY-BRANCH-SEMANTICS §§14-15)
A narrator edit no longer rewrites a row. It returns to the state before the
turn, takes the reader's exact text as the accepted narration, re-derives the
state that text implies, and becomes a new active continuation — while the
original narration keeps its words, its live flag and its whole future as
retained history. At the tip the correction is another take; with story below
it, it forks. No new history machinery: this is the existing fork/take/head
path with the reader's text in place of a generated reply. The §14A refusal
is therefore gone for narrator turns, and remains only for player input.
Pre-M5 positions
Migration 88 backfills the empty narrative document onto every action written
before M5, and a missing snapshot now restores the empty document instead of
leaving the previous position's state standing. Restoring to an old Save
Point no longer leaves a later position's entities and facts on screen.
Narrator context
Replayed history carries prose only; the machine-readable block is no longer
reconstructed into past turns, where it contradicted the authoritative state
in the same prompt. A fact withdrawn by a manual correction is now named as
no longer true, with the reader's reason, rather than silently dropped.
Also
- state_changes joins the action-list bulk read, removing one query per row.
- Extraction takes only the application's own protocol payload: an ordinary
```json or ```python block in a story survives, and a mangled proposal
still does not reach the reader.
Planning: ADR 013 records the authoritative document shape; §§14-15/14A, D10,
C04 and BUILD-MILESTONES are updated to describe what exists. Debt is recorded
against M8 (scenario editor UX) and M9 (export of the audit trail).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PWU4gTfLYY6Qq9U7aa9Qw2
Archive — historical material, not authoritative
Everything under planning/archive/ is evidence and history. None of it
governs current implementation. If an archived document and an active planning
document disagree, the active document is right and the archived one records
what was believed or measured at the time.
Do not consult this directory during ordinary milestone work unless an active document sends you here for a specific piece of historical evidence.
What is here
phase0/ — why AI-DnD was selected
Phase 0A static research and Phase 0B local validation, closed 2026-09-01.
| File | What it is |
|---|---|
RESEARCH-PLAN.md |
The question Phase 0 existed to answer, and its final dispositions. |
PRELIMINARY-RECOMMENDATION.md |
The Phase 0A conclusion, from static review alone. |
REUSE-MATRIX.md |
What each candidate offered against the required subsystems. |
AI-DND-ANALYSIS.md |
The selected base, analysed before the fork. |
AI-ADVENTURE-ANALYSIS.md |
The rejected finalist still cited as the implementation reference for typed state events. |
OPEN-DUNGEON-ANALYSIS.md |
The rejected finalist still cited as the UX/future-media reference. |
PHASE-0B-RECOMMENDATION.md |
The strongest single document. The measured Phase 0B findings and the fork decision. |
PHASE-0B-BASELINE.md |
Clean clones, builds and test runs for the three finalists. |
PHASE-0B-AI-DND-EXPERIMENT.md |
AI-DnD driven against a real local Ollama. |
PHASE-0B-AI-ADVENTURE-OLLAMA.md |
ai-adventure's Ollama and service-boundary behaviour. |
PHASE-0B-OPEN-DUNGEON-HISTORY.md |
Whether Open Dungeon could be retrofitted with history. |
PHASE-0B-OFFLINE-NETWORK.md |
What each candidate reached for with no route to the Internet. |
PHASE-0B-UNDO-SPIKE.md |
The disposable spike that proved non-destructive undo/redo, and became ADR 012's architecture. |
PHASE-0B-FOLLOWUP-CHECKS.md |
The world-state protocol, export/head, story-card lineage and Postgres checks. |
Phase 0A discovery and triage material (the candidate inventory, source index, reference-project list, licensing and static-privacy reviews, the Phase 0A status page) and the Phase 0B execution prompts were deleted in the 2026-09-03 documentation cleanup. They are intermediate working documents whose conclusions all reached the two recommendation reports above, and they remain in Git history.
milestone-reports/ — completed milestone evidence
M1-BASELINE-REPORT.md, M1-IMPLEMENTATION-REPORT.md,
M2-BASELINE-REPORT.md, M2-IMPLEMENTATION-REPORT.md,
M3-IMPLEMENTATION-REPORT.md.
M3's report is both its review and its primary evidence record; no separate M3 baseline report was produced. It arrived here when M4's report landed.
Every architectural conclusion these reports reached has already been applied to
the active planning documents and the ADRs — see planning/VERSION.md, which
lists the corrections each milestone produced. The reports are kept for their
measurements and their reasoning, not as instructions.
The current milestone's report stays in planning/reports/ while it is
still useful for reviewing the next milestone, and moves here when it is not.
decisions/ — superseded or completed ADRs
008-phase0-before-build-plan.md — a process gate ("do not start production
work before Phase 0 closes") that Phase 0 satisfied on 2026-09-01. It
constrains nothing now. ADR numbering continues from 012 in
planning/DECISIONS/; 008 is not reused.
A note on paths inside these files
Archived documents are kept verbatim. File paths written inside them refer to where those files lived when the document was written — before this archive existed, and in some cases before files were deleted. That is deliberate: an evidence record that has been quietly edited is no longer evidence. Resolve any such path against Git history, not against the current tree.