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 source

ADDED Requirements

Requirement: Pack manifests SHALL declare or derive a semantic rules revision

The loader SHALL validate manifest.rules as a positive integer no greater than the host's current rules revision. The host's current revision SHALL be 2, representing the post-W6 precedence, transform-reading, and contact-order contract. An omitted field SHALL mean legacy revision 1 and SHALL be materialized in normalized pack data. A value greater than 2 SHALL reject the pack before any catalog mutation.

All pack-service manifest projections, including manifestFromView() and createPackView(), SHALL preserve the effective revision. A view round trip or persisted catalog record SHALL not silently remove manifest.rules.

Scenario: A current pack loads without a compatibility note

  • WHEN a valid pack declares manifest.rules: 2
  • THEN local preview succeeds with errors: [], no rules-version warning, and normalized data retains manifest.rules: 2

Scenario: An omitted revision uses legacy semantics metadata

  • WHEN a valid imported pack omits manifest.rules
  • THEN preview succeeds, normalized data contains manifest.rules: 1, and the catalog remains unchanged until the caller explicitly installs it

Scenario: A pack view preserves its revision

  • WHEN a legacy pack is previewed, installed, and projected back through a pack-service view
  • THEN the view and any later export/share operation retain manifest.rules: 1 rather than rebuilding a manifest without the field

Scenario: Malformed revisions fail validation with player copy

  • WHEN a pack declares manifest.rules as 0, -1, 1.5, or a string
  • THEN preview fails with the player message This pack's rules version isn't valid, so it can't be installed., preserves the technical manifest.rules validation detail, and does not install or partially register the pack

Scenario: Future revisions fail atomically with player copy

  • WHEN a pack declares manifest.rules: 3
  • THEN preview fails with the player message This pack needs a newer version of Miau Is True. Update the game to play it., preserves the technical unsupported-rules-revision detail, and the catalog contains none of that pack's levels

Requirement: Older rules SHALL produce one nonblocking W11 warning

The preview service SHALL return one bounded, nonblocking warning when a pack's effective rules revision is below the host revision.

When a pack's effective rules revision is below the host revision, local CommonJS and data-only shared previews SHALL return one warning, while keeping errors: [] and allowing explicit installation. The warning SHALL have word: 'RULES', levelId: null, levelTitle: null, sentence: null, and the player message This pack was made for older rules; some proofs may play differently. Its technical detail SHALL identify the declared or derived revision and the current host revision. The host SHALL continue to run current rules semantics; the warning is not a legacy simulation mode.

Scenario: An explicit old revision is surfaced once

  • WHEN a valid pack declares manifest.rules: 1 and contains seven proofs
  • THEN preview succeeds with one pack-level warning, the exact player message, and detail showing 1 versus current 2; it does not emit seven duplicate warnings

Scenario: Local and shared previews agree

  • WHEN the same legacy pack is previewed from CommonJS and from a data-only shared link
  • THEN both previews expose the same warning envelope and normalized manifest.rules: 1 without installing the pack as a side effect

Scenario: Warnings remain transient

  • WHEN a warned legacy pack is installed, exported, or encoded as a shared link
  • THEN its normalized manifest retains only rules: 1, no warning field is serialized, and the warning is recomputed when the pack is previewed again