{ "intent": "Add Haunting/Normal/Crusade difficulty tiers and document the whole four-part extension in the README.", "scope": [ "reverse_survivors/src/core/types.ts (DifficultyId, DifficultyConfig, DIFFICULTIES)", "reverse_survivors/src/core/sim.ts (createInitialState parameter, enemySpeed helper, hp scaling), director.ts (regenRate rate)", "reverse_survivors/src/App.tsx (tier selector), src/styles.css, README.md", "Non-goal: endless mode and localStorage persistence, both deliberately excluded" ], "changes": [ "Difficulty is a pure config object resolved once in createInitialState and stored on GameState, so no downstream code re-looks-it-up.", "Normal is exactly 1.0 on every multiplier, which is what lets every pre-existing raw-hp assertion keep passing unchanged.", "Enemy speed now derives from a single enemySpeed helper, so difficulty and frenzy compose in one place instead of fighting at three call sites.", "regenRate gained an optional rate parameter defaulting to 1, keeping its existing call sites and assertions valid.", "Fixed while wiring the selector: handleRestart ignored the chosen tier, so restarting after picking Crusade silently reverted to Normal. Surfaced by the react-hooks purity rule flagging Date.now() in the new handler, which led to extracting restartSeed().", "README rewritten to cover the new units, powers, statuses and tiers, and to document the deliberate reversal of its former 'placement is never yours to choose' promise." ], "verification": [ { "command": "npm run check (typecheck + eslint --max-warnings 0 + vitest --coverage)", "result": "pass", "evidence": "160 tests passed. Coverage 100% on all four metrics: statements 531/531, branches 159/159, functions 101/101, lines 514/514." }, { "command": "npm run build", "result": "pass", "evidence": "tsc --noEmit clean, vite build in ~72ms, 210.08 kB / 66.26 kB gzip." }, { "command": "headless full-game playtest driving the real sim (vite-node)", "result": "pass", "evidence": "Banking energy then bursting wave+frenzy+ambush killed the survivor at t=53s with the warden's slow live (1.92s) and frenzy active (4.20s). A passive director loses on every tier; Crusade won at t=56s; Haunting and Normal went to the survivor. Same seed twice produced byte-identical outcomes." } ], "risks": [ "Tier multipliers are simulation-verified rather than human-playtested and may need retuning.", "Pre-existing and unchanged here: with a trickle strategy the survivor out-kills a 6 energy/sec income, so banking and bursting is the effective approach." ], "rollback": [ "git revert the commit; the game returns to a single fixed difficulty with no persisted state to migrate.", "After rollback run `npm run check` in reverse_survivors/ and confirm the suite passes at 100% coverage." ] }