- commit
- e34bf0fde4f4add1369890b248e4cc76c8556205
- parent
- fcc26c0f023261443351e6774b9a00fbef34535f
- author
- Dami <dami.etoile@gmail.com>
| A | openspec/ | 21 | +++++++++++++++++++++ |
| M | openspec/ | 2 | +- |
@@ -0,0 +1,21 @@
1+# Settled state inventory for W32+3+The authoritative shape is `game.getState()` from `src/engine.js` after a turn or restore. The compact solver stores only values that can change the next transition. `game.restore()` reconstructs rule and automata projections from the decoded values.4+5+| Field | Role | Codec treatment |6+| --- | --- | --- |7+| `width`, `height`, `title`, `hint` | Static level definition | Check board identity; restore from the authored level. |8+| `objects[].id`, `kind`, word `text` | Static authored identity | Fixed slot and metadata; presence bit distinguishes destruction. |9+| `objects[].x`, `y` | Dynamic positions | Encode a cell for each surviving object. |10+| Object `noun` | Dynamic transformation result | Encode a noun index for each surviving non-word object. |11+| `automata[].id`, `subject`, `property`, `pattern` | Static definitions | Stable system-ID slots and authored metadata. |12+| `automata[].phase` | Dynamic beat position | Encode for every system, including inactive systems. |13+| `automata[].active`, `carriers`, `instanceIds`, `next` | Derived from rules, objects, and phase | Recompute after restore. |14+| `rules`, `sentences` | Derived from surviving word positions and texts | Recompute after restore. |15+| `moves` | Display/history count; no current mechanic reads it | Exclude from search identity; BFS depth is the shortest count. |16+| `won` | Terminal result | Check before enqueue; nonterminal encoded states use `false`. |17+| `mechanics` | Future persistent gate/switch/crumble state | Require explicit codec registration for each dynamic field. |18+19+The current engine has no `mechanics` envelope. Future changes must add state there and prove that two identical boards with different mechanic values produce different solver identities. A new unrecognized state field must fail encoding until this inventory and codec are updated.20+21+The `8ecc483` restore correction is required by this model: restoring a settled noun must not run another transformation link. The codec's decode/restore tests guard that invariant in addition to the engine fixture.@@ -1,7 +1,7 @@
11 ## 1. Baseline and state inventory22 33 - [ ] 1.1 Record current solver route, expansion, time, and memory baselines for core, Word Lab, and representative Crossword, Crate Works, Tidewater, and Clockwork proofs.4-- [ ] 1.2 Inventory every field in settled engine snapshots and identify which fields determine future transitions, including automata phases and current transformation nouns.4+- [x] 1.2 Inventory every field in settled engine snapshots and identify which fields determine future transitions, including automata phases and current transformation nouns.55 - [ ] 1.3 Add a regression that restoring a settled state and taking one step matches direct play for noun chains, automata, removal, and rule edits.66 77 ## 2. Canonical compact codec