Establishes the production fork lineage decided in ADR 009. Upstream
AI-DnD is merged with --allow-unrelated-histories so this repository
carries the real upstream history alongside the planning package, and
future upstream commits can still be fetched and cherry-picked against
matching paths.
Upstream: https://github.com/parththakkar106/AI-DnD
Commit: d72f7c1bda
"Stop paying twice for a block a retry can still throw away"
Mon Aug 31 16:14:24 2026 +0000
tip of upstream/main at the time of the fork
License: MIT (c) 2026 Parth Thakkar — retained verbatim in LICENSE
No upstream file is modified by this commit; it is an import only.
Milestone M1 hardening lands on top of it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017foPNqFjAJa2Ngebf5mEfL
Validates the three finalists by clone, build, test run and live local
Ollama inference, then answers the fork question with measurements rather
than static review.
Recommendation: fork AI-DnD, confidence high. The Phase 0A call holds, but
it was wrong that AI-DnD's undo is non-destructive — retry preserves the
replaced take, undo hard-deletes it. A follow-up spike fixed that in 3
files (+130/-31): undo now moves a head cursor, redo round-trips, writing
below a moved-back head forks and keeps the abandoned line, branch-scoped
memory isolation survives, suite 627/632 with all 5 failures asserting the
deleted-row behaviour that was replaced.
Findings that change the plan:
- AI-DnD cannot take a turn air-gapped as shipped; tiktoken fetches its
encoding from a CDN. Proven on an internal Docker network, proven fixed
by vendoring the file.
- ai-adventure needs zero code for Ollama — two config lines — and its
turn/head/checkpoint schema is the target model to build to.
- Open Dungeon has zero automated tests and a positional summary
watermark, making its branch retrofit larger than Phase 0A costed.
- The world-state referee takes relative deltas; a 3B model sent absolute
values under full context, so a wounded player ended at full health.
Validation cannot catch this, so prefer ai-adventure's typed-event
vocabulary when generalising narrative state.
- Export/import recomputes head depth, so a round-trip silently undoes an
undo. Must be fixed alongside the undo work.
Docs only; no production code. Working tree from the runs stays untracked
under phase0b/.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015gUPLuxLs8wypxZPEmccJu