Files
interactive-story/planning/archive
JesseMarkowitzandClaude Opus 5 44edece67e M9: a campaign you can actually get back
A campaign could already be exported and imported. What could not survive the
trip was everything that explains it: the state events behind the authoritative
document, the prompt each turn was actually given, the passages it was shown,
the summaries that carry long-story continuity, and which take belonged to which
turn. An imported campaign could be read and could no longer say why it was what
it was — and a manual correction, the one state change no narration explains,
was indistinguishable from something the story had established.

The bundle is now `ai-dnd-adventure-v3`, and the version is the design rather
than a side effect. Everything added here could have been another optional key,
the way persona, Save Points, narrative state and imported knowledge each were.
That mechanism stops working at exactly this addition: a v2 file with no prompt
provenance is ambiguous between "written before M9" and "written by M9 from a
campaign that has none", and those are different facts about a campaign. A
version number is how a recovery file states what it was capable of recording.
v1 and v2 still import, and every seam from pre-active-head onward is tested for
the rule that an older file is never reinterpreted under a newer assumption.

Two categories became three. "Chosen travels, derived is recomputed" was enough
until stored prompts had to be decided: they are derived, and they must travel
anyway. The test that separates evidence from cache is not "could this be
recomputed" but "would a recomputation answer the same question" — a rebuilt
search index answers the same question, a rebuilt prompt says what the turn
would be told *now*, which is the opposite of what the inspector is for.

Also here: a real SQLite backup, through the online backup API rather than a
file copy, taken while the application is running and verified before it is
kept; story cards settled as compatibility-only legacy data and taken out of the
narrator's prompt, because they were the untracked path around knowledge
authority that IMPORTED-KNOWLEDGE-DESIGN §73 already forbade; and no schema
change at all, proved against a database M8's own code wrote.

Three defects, found by running the milestone's own tests rather than by reading
them. Deleting a campaign leaked its FTS index rows, and SQLite then handed the
freed ids to the next source imported into any campaign, which failed with an
integrity error that Reindex could not repair — both ends are closed, and a
database already carrying the damage now repairs itself. An imported node with
no state snapshot was being stamped with the campaign's head state, so an Undo
to turn 2 showed what the story knew at turn 20. And the snapshot relink did not
persist at all, because it mutated a dict in place on a column SQLAlchemy tracks
by assignment: it looked correct in memory and wrote the wrong ids to disk.

Carrying per-turn prompts looked like it would halve the length of campaign that
can be restored. Measured — and after compressing them inside the file —
everything M9 added costs 12% of it: the import ceiling moves from about 318
turns to about 279, against a 100-turn certification target. The dominant cost
is not M9's at all. The per-position narrative state document is 74% of a
bundle, and v2 already carried it.

Backend 1,102 passed / 14 skipped / 0 failed. Frontend 145 passed. Lint,
production build and Docker build clean. Verified across two server processes
with two data directories, and in a real browser against a real narrator.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qyn3oRd4D6pi72nKBG725B
2026-09-07 01:55:45 -04:00
..

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

milestone-reports/ — the completed milestones

One report per milestone that has been accepted, unedited. M7's joined them when M8's report was written, following the convention that a milestone report is useful during the immediately following milestone and historical afterwards.

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, M4-IMPLEMENTATION-REPORT.md, M5-IMPLEMENTATION-REPORT.md, M6-IMPLEMENTATION-REPORT.md, M7-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.