Make kaintuck fully data-driven via trail-kit

Make kaintuck fully data-driven via trail-kit

#32 in Riparion/riparion-retro — merged 2026-06-12

What

Refactors the kaintuck game so its content and flow live in an embedded RON scenario interpreted by a new reusable crate, crates/trail-kit. The engine reads the scenario once behind a OnceLock (mirroring the adventure game's data()).

Now data, not Rust:

  • Tables — goods, boats, towns + price ranks, stands, paces, scoring, ending text.
  • Hazard flow — per-leg threshold tables + the arm→minigame binding (HazardArm), including the past-divide branch and grouped-ambush thinning.
  • Outcomes — a small declarative Effect vocabulary with per-tier effect lists; a kind-agnostic catastrophe band (catastrophe_below / catastrophe_needs_unsteady) works for every minigame, not just steady-hand.
  • Minigame params — prompts, tolerances, durations, board sizes, icons.
  • Set-piece menus — the Falls/Natchez/stand option lists (labels, costs, gates, ordering), rendered through one generic SetPieceMenu + Game::run_set_piece.
  • All narration — every hazard/outcome message and cover-art key.

Behaviour preservation

Exactly preserved, gated by a golden-trace oracle that hashes full world state and the narration queue across seven scripted seeds (proven to trip on a one-character prose edit), plus failure-branch pins, a run_set_piece dispatch test, an inverse-map round-trip test, and a scenario self-consistency test (variant/kind agreement, hazard-arm well-formedness, DieIfDead ordering, menu costs).

SAVE_VERSION 2→3 (dropped the cached base_ranks); v2 saves fall back to a fresh game.

Also

  • Six near-identical minigame screen wrappers collapsed into one generic Minigame host.
  • Deleted the now-redundant NOTES.md "engines stay separate" section.
  • Other games are untouched; this proves the pattern for later reuse.

Test plan

  • cargo test -p kaintuck -p trail-kit — 32 tests pass (incl. golden trace).
  • cargo clippy clean; cargo check --workspace clean.
  • Recommended manual smoke: dx serve kaintuck and play River → Natchez → Trace → Nashville.

🤖 Generated with Claude Code

Last updated 2026-06-12