# Story game — plan of record

Plan created: **2026-10-12**. Implementation checkpoint: **2026-10-13**. Product name in Czech: **Příběh**. Code name: **story**.

Status: **Implementation, accepted Matrix demo, model/prompt optimization and the complete demo catalog including all eight Harry Potter movies completed and published.** There are 29 demo titles and 87 fixed Story packs at 10/15/20 scenes. Latest published release: **addon 2.1.66 / skin 1.3.53**; see `.agents/state/release.json`. The subsequent game mode selector revision is local and awaits authorized visual verification (`160-mode-selector.md`). Sol 6.1 / medium is the recommended Story trial after fresh Matrix 10/15/20 samples; Luna/Sonnet had material fidelity defects. These are measured samples, not universal factual guarantees. No commit. Exact evidence and limitations are in `110-progress-and-handoff.md`, `130-ai-experiments.md`, `140-demo-catalog.md` and `150-harry-potter-demos.md`; those chapters preserve their pre-release checkpoints.

## Objective

Add a second game beside Milionář. The player follows the actual plot of a selected work in its presentation order, reads concise continuous narration, and answers A–D questions about what really happens. Three lives allow two mistakes; the third ends the game. Difficulty determines 10, 15, or 20 questions, each variant covering the whole selected story.

Use the existing work selection, modern launch card, visual components, provider clients, and optional voice infrastructure. Give Story its own small rules engine and content contract. **No copied Millionaire controller, duplicate dialog framework, persistent generated-content memory, or unrelated cleanup.**

## Reading order

An incoming agent reads repository `AGENTS.md`, this index, `110-progress-and-handoff.md`, and `900-decisions.md` before editing. Then read the chapter for the next phase and inspect the current code; the filesystem may have changed since this plan was written.

| File | Responsibility |
|---|---|
| [010-goals-and-specification.md](010-goals-and-specification.md) | Complete player behavior, boundaries, and acceptance rules |
| [020-current-state.md](020-current-state.md) | Verified implementation baseline, file map, and existing seams |
| [030-architecture.md](030-architecture.md) | Ownership, reuse, engine, adapter, workers, and cleanup |
| [040-entry-points-and-settings.md](040-entry-points-and-settings.md) | Common launcher, source handling, eligibility, preferences |
| [050-content-contract.md](050-content-contract.md) | Whole-story JSON, validation, normalization, and errors |
| [060-prompts-and-ai.md](060-prompts-and-ai.md) | Narrator instructions, accuracy strategy, request lifecycle |
| [070-dialog-and-design.md](070-dialog-and-design.md) | Layout, properties, focus, visual consistency, and text fit |
| [080-matrix-demo.md](080-matrix-demo.md) | Fixed Matrix fixtures and presentation-order story coverage |
| [090-verification.md](090-verification.md) | Targeted offline checks, authorized Kodi checks, regression gates |
| [100-implementation-roadmap.md](100-implementation-roadmap.md) | Ordered implementation phases with concrete completion gates |
| [110-progress-and-handoff.md](110-progress-and-handoff.md) | Live progress board, evidence, blockers, and next action |
| [120-lessons-and-risks.md](120-lessons-and-risks.md) | Known traps, reasoning, and append-only learning log |
| [130-ai-experiments.md](130-ai-experiments.md) | Real model/effort trials, content review, cost/latency and rejected variants |
| [140-demo-catalog.md](140-demo-catalog.md) | All 22 fixed Story demos, selected movie/series/episode scopes and offline evidence |
| [150-harry-potter-demos.md](150-harry-potter-demos.md) | Complete eight-film collection in both games, additional fixed data and latest catalog evidence |
| [160-mode-selector.md](160-mode-selector.md) | Shared segmented game selector, selection versus focus, offline checks and pending visual verification |
| [900-decisions.md](900-decisions.md) | Approved decisions and explicitly identified implementation defaults |

## Phase board

| Phase | Deliverable | Status |
|---|---|---|
| P0 | Recheck baseline and choose the smallest shared seams | Done |
| P1 | Content contract, pure engine, fixed Matrix packs | Done; targeted offline checks pass |
| P2 | Shared modern shell, Story views and offline playable flow | Built and exercised in Kodi; evidence in `110` |
| P3 | Existing launches, remembered mode and independent difficulty | Built; targeted entry/caller regression passes |
| P4 | One-shot AI generation and optional shared voice | Built and measured; prompt/configuration trial completed; actual voice untested |
| P5 | Focused regression, authorized visual checks, user acceptance | Targeted checks, demo acceptance and fresh AI trial completed; limits documented |
| P6 | Story counterpart for every Millionaire demo | Done locally; 66 fixed packs, scoped episodes and offline modal/regression checks pass |
| P7 | All Harry Potter movies in both demo modes | Done locally; seven additional quiz titles / 21 additional Story packs, existing first movie preserved |
| UI revision | Replace the weak selected-mode underline | Implemented locally; 44 offline tests pass; GUI verification pending authorization (see `160`) |

`100-implementation-roadmap.md` defines the gates. Update this board together with the detailed handoff; never report a phase complete on the strength of a plan, a screenshot of one state, or an unrun test.

## Working agreement

- Talk to Standa briefly in Czech; all plan filenames and prose stay English. Czech UI literals are intentional product labels.
- Questions and approval requests go in the ordinary final chat response, never tools or commentary.
- Research, this plan, implementation and Matrix demo testing were authorized (D35/D37); D42/D43 subsequently authorize the complete demo catalog and its mixed narrative scopes. Ask before new work outside the actual approved scope.
- This checkout is the live Kodi installation and already contains extensive unrelated modifications. Do not reset, stage, commit, or replace them.
- Prefer cheap targeted offline checks. Matrix demo testing in Kodi was authorized and performed during implementation; no GUI or API tests were run in the earlier planning-only phase. Unrelated GUI/device work still requires authorization.
- No paid AI/TTS test unless requested. No production deployment or commit is implied. Deploy only on request, through `python3 scripts/release.py publish`.

## Release acceptance

Story is complete only when all three Matrix difficulties work through the real shared modal offline, every terminal/life rule is proven, existing modern Millionaire behavior passes focused regression, agreed layouts are verified in Kodi when authorized, and Standa accepts the result. Generated AI content is never advertised as independently verified or guaranteed factually exact.
