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-validate-mod-feature-contract / specs / level-sharing / spec.md
spec.md 1.5K source

ADDED Requirements

Requirement: Pack previews SHALL expose nonfatal rule warnings without serializing them

Local CommonJS previews and data-only shared-link previews SHALL apply the same supported-feature and property validation. A successful preview SHALL return a bounded warnings collection separate from errors: [], with word, levelId, levelTitle, optional sentence, a player-language message, and technical detail. Warnings SHALL not prevent installation and SHALL not be serialized into exported CommonJS source, shared payloads, installed pack data, or engine snapshots. Unknown required features SHALL fail atomically before installation.

Scenario: Local and shared preview agree on warnings

  • WHEN the same valid pack with an initially formed unknown predicate is previewed from a local module and a shared link
  • THEN both previews succeed and expose the same warning context without installing the pack

Scenario: Diagnostics stay outside portable data

  • WHEN a warned pack is exported as CommonJS or encoded into a share URL and decoded again
  • THEN the authored data remains valid, the warning is recomputed on preview, and no transient diagnostic field appears in the exported data

Scenario: Unsupported shared feature fails before Gift installation

  • WHEN a shared payload declares a feature unsupported by the current host
  • THEN the decoder returns a player-readable error and Gift cannot install partial content