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-24-add-rules-compatibility-revision / specs / level-sharing / spec.md
spec.md 3.9K rendered
1## ADDED Requirements23### Requirement: Pack manifests SHALL declare or derive a semantic rules revision45The loader SHALL validate `manifest.rules` as a positive integer no greater6than the host's current rules revision. The host's current revision SHALL be7`2`, representing the post-W6 precedence, transform-reading, and contact-order8contract. An omitted field SHALL mean legacy revision `1` and SHALL be9materialized in normalized pack data. A value greater than `2` SHALL reject the10pack before any catalog mutation.1112All pack-service manifest projections, including `manifestFromView()` and13`createPackView()`, SHALL preserve the effective revision. A view round trip or14persisted catalog record SHALL not silently remove `manifest.rules`.1516#### Scenario: A current pack loads without a compatibility note1718- **WHEN** a valid pack declares `manifest.rules: 2`19- **THEN** local preview succeeds with `errors: []`, no rules-version warning,20 and normalized data retains `manifest.rules: 2`2122#### Scenario: An omitted revision uses legacy semantics metadata2324- **WHEN** a valid imported pack omits `manifest.rules`25- **THEN** preview succeeds, normalized data contains `manifest.rules: 1`, and26 the catalog remains unchanged until the caller explicitly installs it2728#### Scenario: A pack view preserves its revision2930- **WHEN** a legacy pack is previewed, installed, and projected back through a31 pack-service view32- **THEN** the view and any later export/share operation retain33 `manifest.rules: 1` rather than rebuilding a manifest without the field3435#### Scenario: Malformed revisions fail validation with player copy3637- **WHEN** a pack declares `manifest.rules` as `0`, `-1`, `1.5`, or a string38- **THEN** preview fails with the player message `This pack's rules version39 isn't valid, so it can't be installed.`, preserves the technical40 `manifest.rules` validation detail, and does not install or partially register41 the pack4243#### Scenario: Future revisions fail atomically with player copy4445- **WHEN** a pack declares `manifest.rules: 3`46- **THEN** preview fails with the player message `This pack needs a newer47 version of Miau Is True. Update the game to play it.`, preserves the48 technical unsupported-rules-revision detail, and the catalog contains none49 of that pack's levels5051### Requirement: Older rules SHALL produce one nonblocking W11 warning5253The preview service SHALL return one bounded, nonblocking warning when a54pack's effective rules revision is below the host revision.5556When a pack's effective rules revision is below the host revision, local57CommonJS and data-only shared previews SHALL return one warning, while keeping58`errors: []` and allowing explicit installation. The warning SHALL have59`word: 'RULES'`, `levelId: null`, `levelTitle: null`, `sentence: null`, and the60player message `This pack was made for older rules; some proofs may play differently.`61Its technical detail SHALL identify the declared or derived revision and the62current host revision. The host SHALL continue to run current rules semantics;63the warning is not a legacy simulation mode.6465#### Scenario: An explicit old revision is surfaced once6667- **WHEN** a valid pack declares `manifest.rules: 1` and contains seven proofs68- **THEN** preview succeeds with one pack-level warning, the exact player69 message, and detail showing `1` versus current `2`; it does not emit seven70 duplicate warnings7172#### Scenario: Local and shared previews agree7374- **WHEN** the same legacy pack is previewed from CommonJS and from a data-only75 shared link76- **THEN** both previews expose the same warning envelope and normalized77 `manifest.rules: 1` without installing the pack as a side effect7879#### Scenario: Warnings remain transient8081- **WHEN** a warned legacy pack is installed, exported, or encoded as a shared82 link83- **THEN** its normalized manifest retains only `rules: 1`, no warning field is84 serialized, and the warning is recomputed when the pack is previewed again