Update planning package after Phase 0B

This commit is contained in:
JesseMarkowitz
2026-09-01 20:41:23 -04:00
parent ba737de9b4
commit 717670afe0
34 changed files with 2061 additions and 1204 deletions
@@ -1,29 +1,44 @@
# ADR 005 — Branch-Preserving Story History
**Status:** Accepted in principle; implementation pending Phase 0
**Status:** Accepted; implementation direction validated in Phase 0B
## Decision
Returning to an earlier story point should preserve abandoned future history as another branch rather than destructively erasing it.
Returning to an earlier story point preserves abandoned future history rather than destructively erasing it.
The selected implementation model uses a **movable active head over retained lineage**:
- Undo moves the head backward,
- Redo moves it forward along the retained continuation,
- accepted turns are not deleted by ordinary Undo,
- a new write after moving backward creates a new continuation on first divergent write,
- the displaced future remains retained/disposable,
- normal UI presents Undo/Redo/Retry/Save Point rather than branch-management concepts.
## Context
The user must be able to recover from unwanted story developments and explore alternatives while retaining prior work.
Phase 0B found that AI-DnD's shipped Undo was destructive even though its tree/take infrastructure was otherwise strong. A disposable spike demonstrated non-destructive head-cursor Undo/Redo using existing lineage chokepoints and branch creation while preserving branch-scoped memory isolation.
## Alternatives Considered
- destructive undo,
- overwrite-in-place editing,
- complete copy of campaigns for every retry,
- branch-preserving turn graph.
- branch-preserving turn graph with movable active head.
## Reason
A branch-preserving history provides recovery, experimentation, and auditability without unnecessary campaign duplication.
The selected model provides recovery, experimentation, auditability, and Redo without unnecessary campaign duplication or a complicated user-facing branch workflow.
## Consequences
- turn identity/parentage must be first-class,
- state restore must be branch-aware,
- retry/edit semantics must be explicitly defined,
- the selected candidate repository must either support this or be adaptable to it.
- turn identity/parentage remains first-class,
- active head and retained tip are distinct concepts,
- state restore is lineage-aware,
- retry/edit/add-take must honor fork-if-behind-head behavior,
- summaries/memories must respect active lineage/head,
- named checkpoints point to durable story positions,
- abandoned history is marked disposable but is not automatically cleaned up in v1,
- export/import must preserve the active head coordinate as well as the retained history graph.