clone

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

main
miau-is-true / openspec / changes / add-frail-leftover-tiles / tasks.md
tasks.md 2.7K source

1. Foundation and validation

  • [ ] 1.1 Register the FRAIL mechanic type and validate the single level-scoped declaration { id: 'frail', type: 'frail', version: 1, state: 'derived', leaves: { NOUN: NOUN } } at the normalized level/mod boundary.
  • [ ] 1.2 Preserve the validated noun map through CommonJS load/export, catalog storage, data-only sharing, and restore; keep current noun and stable object ID in authoritative object state.
  • [ ] 1.3 Reject malformed, unknown, duplicate, executable, or per-object FRAIL metadata atomically with an actionable pack/level path.

2. Turn lifecycle

  • [ ] 2.1 Capture pre-turn occupancy and resolve player and automata movement, rule reparsing, and transforms before FRAIL evaluation.
  • [ ] 2.2 Evaluate distinct occupant departures once at the end-of-movement checkpoint, preserve handovers, and ensure a moving FRAIL entity cannot crumble itself.
  • [ ] 2.3 Look up the object's current noun in frail.leaves; apply a mapped result as an ID-preserving noun transform or remove it when unmapped, including repeated leftover chains and normal same-turn contacts.
  • [ ] 2.4 Emit cloned settled crumbled: [{ id, from, to }] records in stable deterministic order without changing legacy events.

3. State, sharing, and solver

  • [ ] 3.1 Include FRAIL noun/existence in accepted snapshots, Undo, reset, replay, and authoritative restore. Keep the mechanic definition bound to the level and reapply it on reset/restore; do not copy it into dynamic snapshots or add per-object leaves or a hidden crumble counter.
  • [ ] 3.2 Register FRAIL's derived projection inputs with the compact solver codec and distinguish same-board states with different current nouns, existence, or chain stage without adding a hidden FRAIL state bit.
  • [ ] 3.3 Differential-test public and compact transitions for handovers, pushed words, automata movers, transforms, contacts, and chained leftovers.
  • [ ] 3.4 Prove shared/imported data and solver replay reproduce the same crumbled events and next contact result.

4. Fixtures and handoff

  • [ ] 4.1 Add focused engine scenarios for step-off versus standing, word and automaton movers, moving FRAIL entities, handover, and blocked movement.
  • [ ] 4.2 Add SINK, DEFEAT, WIN, initial-contact, removal, and two-link chain scenarios, including reset and Undo.
  • [ ] 4.3 Coordinate Draft A/B Tidewater proof IDs and authored glyphs with the worlds/design teams without changing their owned pack files in this change.
  • [ ] 4.4 Run the full Node suite, production build, strict OpenSpec validation, and the bundled-world solver gate before enabling a shipped proof.
  • [ ] 4.5 Resolve the event ordering presentation question and post the accepted contract to the design/worlds inboxes.