Browser co-op kitchen game: FastAPI + native WebSockets, server-authoritative 20 Hz simulation, in-memory anonymous lobbies, data-driven YAML levels, Canvas 2D vanilla ES-module client with locally authored SVG art and no external CDNs. .agents/PLAN.md records the LOCKED decisions; .agents/user_stories/ holds the 12 flow contracts; .agents/phases/todo/ breaks them into 14 sequential, test-gated phases (71 task files), each leaving the app launchable and the suite green. LLM-Generated: true
1.6 KiB
1.6 KiB
US-07 — Progress through a campaign that gets harder
As a player finishing level after level, I want to unlock the next kitchen and feel it get harder, so that a session has a trajectory instead of one repeated map.
Acceptance criteria
- The level list shows all shipped levels in campaign order with the difficulty pips, target, time limit, and per-level best score/stars.
- Completing a level unlocks the next one for that session; the next level is
pre-selected in
ROUND_ENDand startable by one action. - Failing a level keeps the same next choice available (retry) and does not unlock forward; unlocking never goes backwards.
- Level content comes from
levels/*.yaml; adding a new valid YAML file makes the level appear in/api/levelswith no Python change (regression test). - Every campaign level passes content validation: reachability, recipe solvability, target plausibility, hazard references.
- Each consecutive level moves at least two escalation axes (§8 of PLAN.md) versus its predecessor; the curve check fails the build otherwise.
- All 10 campaign levels are playable end to end with the intended station set.
- Progression state is per session token and survives a page reload; it is documented as in-memory and lost on server restart.
E2E suite
tests/e2e/test_us07_campaign_progression.py — win level 1, assert level 2 unlocked,
selected, and startable; fail a level, assert locked. Plus
tests/unit/test_level_curve.py for the escalation-axis and validation gates.
Phases
02_level_content_and_validation, 11_campaign_levels_and_progression