clone

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

Archive settled rule refresh specification

Dami committed a3d80a0
commit
a3d80a009f701a910b31129d53a32b1b39288909
parent
c3537ca700d359747945bb0823e36e16b067e46a
author
Dami <dami.etoile@gmail.com>
7 files changed, +24 -8
Ropenspec/changes/refresh-rules-after-contact-destruction/.openspec.yaml → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/.openspec.yaml0
Ropenspec/changes/refresh-rules-after-contact-destruction/README.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/README.md0
Ropenspec/changes/refresh-rules-after-contact-destruction/design.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/design.md0
Ropenspec/changes/refresh-rules-after-contact-destruction/proposal.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/proposal.md0
Ropenspec/changes/refresh-rules-after-contact-destruction/specs/rule-engine/spec.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/specs/rule-engine/spec.md0
Ropenspec/changes/refresh-rules-after-contact-destruction/tasks.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/tasks.md14+++++++-------
Mopenspec/specs/rule-engine/spec.md18+++++++++++++++++-
R openspec/changes/refresh-rules-after-contact-destruction/.openspec.yaml → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/.openspec.yaml +0 -0

No content changes.

R openspec/changes/refresh-rules-after-contact-destruction/README.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/README.md +0 -0

No content changes.

R openspec/changes/refresh-rules-after-contact-destruction/design.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/design.md +0 -0

No content changes.

R openspec/changes/refresh-rules-after-contact-destruction/proposal.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/proposal.md +0 -0

No content changes.

R openspec/changes/refresh-rules-after-contact-destruction/specs/rule-engine/spec.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/specs/rule-engine/spec.md +0 -0

No content changes.

R openspec/changes/refresh-rules-after-contact-destruction/tasks.md → openspec/changes/archive/2026-09-24-refresh-rules-after-contact-destruction/tasks.md +7 -7
@@ -1,15 +1,15 @@
11 ## 1. Engine settlement22 3-- [ ] 1.1 Add the Tidewater fixture where SINK destroys the STOP word and the next move enters ROCK.4-- [ ] 1.2 Reparse surviving words and rebuild rule, property, sentence, and automata indexes after contact removals without rerunning contacts or transformations.5-- [ ] 1.3 Evaluate final victory from surviving entities and refreshed properties; include final rule removal in settled event deltas.3+- [x] 1.1 Add the Tidewater fixture where SINK destroys the STOP word and the next move enters ROCK.4+- [x] 1.2 Reparse surviving words and rebuild rule, property, sentence, and automata indexes after contact removals without rerunning contacts or transformations.5+- [x] 1.3 Evaluate final victory from surviving entities and refreshed properties; include final rule removal in settled event deltas.66 77 ## 2. State restoration and integration88 9-- [ ] 2.1 Cover destruction followed by Undo, reset, and restore, including no stale rule or object indexes.10-- [ ] 2.2 Run Node tests and build; verify browser controls, rule changes, bundled CommonJS mod loading, and Undo.11-- [ ] 2.3 Reverify Tidewater's seven proofs with the real-engine solver and report any changed route to the worlds team.9+- [x] 2.1 Cover destruction followed by Undo, reset, and restore, including no stale rule or object indexes.10+- [x] 2.2 Run Node tests and build; verify browser controls, rule changes, bundled CommonJS mod loading, and Undo.11+- [x] 2.3 Reverify Tidewater's seven proofs with the real-engine solver and report any changed route to the worlds team.1212 1313 ## 3. Ship1414 15-- [ ] 3.1 Strictly validate and archive the OpenSpec change, commit the behavioral fix as a focused unit, and update the stable public preview.15+- [x] 3.1 Strictly validate and archive the OpenSpec change, commit the behavioral fix as a focused unit, and update the stable public preview.
M openspec/specs/rule-engine/spec.md +17 -1
@@ -16,7 +16,7 @@ The engine SHALL represent a level as a bounded rectangular grid containing uniq
1616 - **THEN** the engine leaves state and undo history unchanged1717 1818 ### Requirement: The engine SHALL derive the MVP rule vocabulary from movable words19-The engine SHALL scan horizontal and vertical straight lines for `NOUN IS VALUE` sentences, with adjacent `AND` terms expanding the noun side or value side. The initial semantic properties SHALL be exactly `YOU`, `PUSH`, `STOP`, `WIN`, `SINK`, and `DEFEAT`; a noun-to-noun value SHALL be treated as a transformation. Rules SHALL be recomputed from the current word positions after a turn that changes board state.19+The engine SHALL scan horizontal and vertical straight lines for `NOUN IS VALUE` sentences, with adjacent `AND` terms expanding the noun side or value side. The initial semantic properties SHALL be exactly `YOU`, `PUSH`, `STOP`, `WIN`, `SINK`, and `DEFEAT`; a noun-to-noun value SHALL be treated as a transformation. Rules SHALL be recomputed from the current word positions after a turn that changes board state, including after contact effects remove word entities. The settled active rules, physical sentence spans, derived properties, and rule deltas SHALL describe only surviving words before the next player intent.2020 2121 #### Scenario: An AND sentence expands to multiple properties2222 - **WHEN** the board contains `BABA IS YOU AND PUSH` in one straight line
@@ -30,6 +30,22 @@ The engine SHALL scan horizontal and vertical straight lines for `NOUN IS VALUE`
3030 - **WHEN** a word line lacks `IS` or has no noun and value on both sides3131 - **THEN** the line produces no active rule and does not make the turn fail3232 33+#### Scenario: SINK removes a rule word34+- **WHEN** a turn causes `SINK` to destroy the `STOP` word in `ROCK IS STOP`35+- **THEN** the settled state has no `ROCK IS STOP` rule or sentence span, the event reports that rule removed, and the next move onto ROCK is not blocked by `STOP`36+37+#### Scenario: Contact removal updates derived control and automata38+- **WHEN** contact destruction removes a word granting `YOU` or a declared automaton property39+- **THEN** the settled state's control and automata carriers reflect the surviving words, and Undo restores the previous derivations40+41+#### Scenario: A destroyed WIN word cannot grant a final victory42+- **WHEN** a contact destroys the word that supplied a surviving entity's `WIN` property43+- **THEN** the final victory check uses the surviving rule table and does not mark the level won from the destroyed word44+45+#### Scenario: Restore a state after rule-word destruction46+- **WHEN** a settled snapshot lacking a destroyed rule word is restored or the level is reset47+- **THEN** the restored state derives rules from its present words, while reset restores the initial words and their rules48+3349 ### Requirement: The engine SHALL resolve controlled movement and pushes atomically3450 Entities whose noun has `YOU` SHALL receive the requested cardinal intent. A moving entity SHALL push a contiguous chain of `PUSH` entities when every destination is in bounds and free of `STOP` entities; a blocked chain SHALL not move any member. Word entities SHALL be pushable by default so that players can edit rules.3551