clone

a browser grid puzzle game where you push words around to rewrite the rules of each level

main
miau-is-true / openspec / changes / archive / 2026-09-23-build-dynamic-rule-engine / tasks.md
tasks.md 3.2K rendered
1## 1. Engine contract and fixtures23- [x] 1.1 Define the level, entity, rule, and snapshot data shapes used by the engine and tests.4- [x] 1.2 Add fixtures for straight-line `IS` parsing, `AND` expansion, malformed lines, duplicate words, and shared cells.5- [x] 1.3 Add fixtures for the six properties and noun-to-noun transformation, including re-scan after a word move.6- [x] 1.4 Preserve source word IDs and sentence axis on active rule records, including stacked and duplicate sources.78## 2. Deterministic turn resolution910- [x] 2.1 Implement cardinal `YOU` intent handling with stable ordering for multiple controlled entities.11- [x] 2.2 Implement atomic push-chain planning, default pushability for word entities, bounds checks, and `STOP` blocking.12- [x] 2.3 Implement post-move transformation and deterministic `SINK`, `DEFEAT`, and `WIN` contact effects.13- [x] 2.4 Implement complete snapshot undo, reset, move counts, win lockout, and no-op behavior for invalid or blocked intents.14- [x] 2.5 Verify engine fixtures cover every requirement scenario and run the engine test command.15- [x] 2.6 Return settled `step`, `undo`, and `reset` events with `kind`, accepted state, ordered movement, full rule deltas, transformations, destruction details, `controlLost`, and win state.16- [x] 2.7 Add event fixtures for `blocked: { id, dir, blockerId, reason }`, direct versus pushed movement via `pushedBy`, and ordered movement/transform/destroy/win phases.1718## 3. Three built-in levels and input1920- [x] 3.1 Define and validate the three ordered MIAU teaching puzzles covering movement, pushing, rule editing, `STOP`, `WIN`, and `AND` subject expansion.21- [x] 3.2 Add the app shell and level selection state for the three built-in levels.22- [x] 3.3 Route keyboard arrows, touch direction controls, undo, reset, and continue through the common engine API.23- [x] 3.4 Display move count, undo availability, level title/hint, victory, loss of control, and blocked-move feedback.2425## 4. CommonJS mod boundary2627- [x] 4.1 Define the local CommonJS export shape for `manifest`, `levels`, `vocabulary`, and `palette`.28- [x] 4.2 Implement manifest validation with duplicate, coordinate, vocabulary, and level diagnostics.29- [x] 4.3 Register valid mod content atomically and isolate loading or import failures without removing built-in content.30- [x] 4.4 Add fixtures for a valid noun/emoji/level mod and rejected or throwing modules.3132## 5. Emoji and text presentation3334- [x] 5.1 Implement fixed-coordinate grid rendering with stable stack order and noun text fallback.35- [x] 5.2 Render word tiles and the active rule table from settled engine state.36- [x] 5.3 Add Pretext layout for hints and visual emphasis for rules and turn feedback without coupling to grid geometry.37- [x] 5.4 Add accessible labels, readable text status, and reduced-motion-safe presentation for all controls and outcomes.3839## 6. Integration verification4041- [x] 6.1 Run the full test suite and production build after wiring the browser shell.42- [x] 6.2 Run browser smoke checks for built-in start, keyboard/touch movement, word push/rule update, undo/reset, win progression, and mod fallback.43- [x] 6.3 Update implementation notes or the relevant OpenSpec artifacts for any behavior discovered during verification.