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 / specs / playable-puzzles / spec.md
spec.md 2.3K source

ADDED Requirements

Requirement: The app SHALL provide three built-in MIAU teaching puzzles

The app SHALL ship exactly three deterministic ordered built-in levels using MIAU as the initial controlled noun. The puzzles SHALL cover movement and pushing, YOU, PUSH and STOP, word manipulation, WIN, and AND subject expansion; each level SHALL include dimensions, entities, and title or hint metadata.

Scenario: The first MIAU level is playable without a mod

  • WHEN the app is started with no mod selected
  • THEN it loads the first MIAU level and displays its board, word tiles, and current rules

Scenario: Completing a teaching puzzle advances the campaign

  • WHEN the active level reaches its win state and the player chooses continue
  • THEN the app loads the next built-in level while preserving the campaign order

Requirement: The app SHALL expose reset, undo, and cardinal controls

The app SHALL provide reset and undo actions and SHALL accept up, down, left, and right intents from keyboard input and touch controls. Controls SHALL call the same engine intent API and SHALL show the current move count and whether undo is available.

Scenario: Keyboard and touch produce the same move

  • WHEN the player uses a keyboard arrow or the corresponding touch direction control
  • THEN the engine receives the same cardinal intent and the resulting state is identical

Scenario: Reset is available after a deadlock

  • WHEN the player has made moves that cannot reach the goal
  • THEN reset restores the initial level and move count without reloading the page

Scenario: Undo is disabled at the initial state

  • WHEN the current level has no successful moves
  • THEN the undo control is visibly unavailable and invoking it has no effect

Requirement: Level definitions SHALL be validated before play

The app SHALL reject a built-in level whose dimensions, coordinates, entity ids, word text, or object nouns are invalid, and SHALL report the level id and validation problem in developer-visible diagnostics.

Scenario: An out-of-bounds entity is rejected

  • WHEN a level definition places an entity outside its declared width or height
  • THEN the level does not start and validation reports the offending entity