clone

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

docs(openspec): specify facing, map links, and Workshop access

Dami committed 7ca5868
commit
7ca5868945333efff2b4d9c8bd04a5d5b1c6c3a1
parent
a5fdc0218824f6aa79d4387fa5b7c60ba3099298
author
Dami <dami.etoile@gmail.com>
3 files changed, +73 -2
Mopenspec/changes/build-ink-signal-stage/specs/game-presentation/spec.md33++++++++++++++++++++++++++++
Mopenspec/changes/build-ink-signal-stage/specs/game-stage/spec.md36++++++++++++++++++++++++++++--
Mopenspec/changes/build-ink-signal-stage/tasks.md6+++++
M openspec/changes/build-ink-signal-stage/specs/game-presentation/spec.md +33 -0
@@ -15,6 +15,39 @@ The renderer SHALL draw the simulation on the ink-and-signal full-screen canvas
1515 - **WHEN** the engine exposes `state.sentences`1616 - **THEN** the renderer draws maximal horizontal or vertical bars from those physical spans, including exact duplicates1717 18+## ADDED Requirements19+20+### Requirement: Supported character glyphs SHALL use scoped facing state21+The presentation SHALL maintain facing per entity ID as visual state separate from simulation coordinates. The built-in MIAU and KEKE glyphs SHALL be directional; a mod palette object SHALL opt into directional treatment explicitly. Only an accepted horizontal self-move SHALL update an entity's facing. Pushed entities, vertical self-moves, transformations, idle turns, and blocked intents SHALL preserve the entity's prior facing. Glyphs without directional treatment SHALL use their unchanged fallback. Undo SHALL restore the per-ID facing snapshot, while loading or resetting a level SHALL use its native declared or neutral facing. A facing change MAY use a 70ms glyph-only squash; reduced motion SHALL apply the facing change instantly.22+23+#### Scenario: A direct horizontal MIAU move updates facing24+- **WHEN** a MIAU entity makes an accepted horizontal self-move25+- **THEN** its supported glyph faces the travel direction after the settled turn, with a 70ms glyph-only squash when motion is enabled and unchanged engine coordinates26+27+#### Scenario: Pushes and vertical movement preserve facing28+- **WHEN** a KEKE entity is pushed or makes an accepted vertical self-move29+- **THEN** its prior facing remains unchanged, regardless of the movement direction or whether it was directly controlled30+31+#### Scenario: A transformation preserves per-ID facing32+- **WHEN** an entity transforms to another noun during a settled turn33+- **THEN** the entity ID retains its prior facing, unless the resulting noun has no directional glyph and uses its normal fallback34+35+#### Scenario: A mod opts a glyph into directional treatment36+- **WHEN** a mod palette explicitly marks an object glyph as directional37+- **THEN** the stage applies the same horizontal self-move facing rules to that glyph; unmarked mod glyphs remain non-directional38+39+#### Scenario: Facing stays stable without a qualifying move40+- **WHEN** an entity is idle or receives a blocked intent41+- **THEN** its prior facing remains unchanged and no direction is inferred from the failed intent42+43+#### Scenario: Undo and reset restore native facing44+- **WHEN** the player undoes a turn or loads/resets a level45+- **THEN** undo restores each entity ID's prior facing snapshot and the new level uses its declared or neutral native facing instead of inheriting the previous level's direction46+47+#### Scenario: Reduced motion skips facing animation48+- **WHEN** reduced motion is enabled and a qualifying horizontal self-move changes facing49+- **THEN** the glyph changes facing immediately without the 70ms squash animation50+1851 ### Requirement: The app SHALL show active rules and turn feedback1952 The presentation SHALL render the current proof HUD, ledger, hints, keycap controls, active/inactive words, and no-YOU state on the stage. It SHALL consume settled engine events for blocked movement, undo, reset, transformations, defeat, victory, and rule changes without changing simulation state.2053
M openspec/changes/build-ink-signal-stage/specs/game-stage/spec.md +34 -2
@@ -42,7 +42,7 @@ The stage SHALL use the shared input adapter for keyboard, Standard gamepad, and
4242 - **THEN** the stage emits the same direction intent path used by keyboard input4343 4444 ### Requirement: INDEX SHALL be data-driven and preserve progress45-The INDEX map SHALL lay out levels from catalog data on a serpentine path with at most five nodes per row and three rows per sheet. Progress SHALL be stored by `packId/levelId`; the next unsolved proof SHALL lock until its predecessor is solved, while additional sheets remain reachable through pack path connections.45+The INDEX map SHALL lay out levels from catalog data on a serpentine path with at most five nodes per row and three rows per sheet. Progress SHALL be stored by `packId/levelId`; locks SHALL be evaluated within each pack, and the first proof of every pack SHALL remain available even when bundled packs share one sheet. The next unsolved proof within a pack SHALL lock until its predecessor is solved, while additional sheets remain reachable through pack path connections.4646 4747 #### Scenario: A catalog populates INDEX sheets4848 - **WHEN** a catalog contains more than fifteen levels
@@ -56,6 +56,18 @@ The INDEX map SHALL lay out levels from catalog data on a serpentine path with a
5656 - **WHEN** the player walks onto a locked proof before its predecessor is solved5757 - **THEN** INDEX indicates the lock, emits an error feedback event, and keeps the cursor on the prior proof5858 59+#### Scenario: Each pack keeps an open chapter entry60+- **WHEN** a fresh save contains bundled Core, Basic Proofs, and Word Lab packs on one INDEX sheet61+- **THEN** `core/break-the-rule`, `garden-basics/garden-push`, and `word-lab/shared-control` are available, while later proofs lock according to their own pack's `packId/levelId` progress62+63+#### Scenario: Directional input follows visible serpentine neighbors64+- **WHEN** two adjacent proofs on a serpentine row are visually ordered right-to-left, such as 07 and 0865+- **THEN** Left and Right move between the visible neighboring nodes in that visual direction, and input does not jump according to an invisible array order66+67+#### Scenario: Sheet edges follow only visible path connectors68+- **WHEN** the cursor reaches a proof at a sheet edge with a connector to another sheet69+- **THEN** the arrow direction matching that visible connector reaches the connected sheet, while the opposite edge direction keeps the cursor on the current proof70+5971 ### Requirement: The board SHALL render ink-and-signal geometry without decorative overlap6072 The board renderer SHALL draw a flat near-black slab with hard offset lip, corner dots, merged walls, fixed cell geometry, and stable draw order. Word tiles SHALL use 74% cells, emoji things 60%, operators outline pills, properties chamfered tiles, and sentence bars SHALL come from physical spans in `state.sentences` in the tile gutters. The horizontal sentence bar SHALL span from 0.13 to 0.91 of each cell, and player-facing board text SHALL use Recursive MONO 1. Only real engine stacks may overlap.6173
@@ -102,7 +114,7 @@ Juice SHALL expose sentence frames keyed by the physical cell ids joined with `>
102114 - **THEN** movement, rule, contact, and scene visuals settle immediately while state and accessibility feedback remain correct103115 104116 ### Requirement: Workshop and Gift SHALL connect to the pack service105-The stage SHALL connect Workshop actions to the presentation-independent pack service hooks, support drag-and-drop `.cjs` preview/import, keep URL intake pending until Gift confirmation, and expose in-canvas feedback for success, validation errors, collisions, copy, export, and removal. Workshop and Gift layout SHALL follow the designer reference and remain separate from pack validation logic.117+The stage SHALL connect Workshop actions to the presentation-independent pack service hooks, support drag-and-drop `.cjs` preview/import, keep URL intake pending until Gift confirmation, and expose in-canvas feedback for success, validation errors, collisions, copy, export, and removal. Workshop SHALL have a prominent player-facing entry from Title and INDEX in addition to any Pause route, and entering it SHALL record the originating scene so Back returns there. Keyboard and pointer activation SHALL expose the same Workshop actions. Workshop and Gift layout SHALL follow the designer reference and remain separate from pack validation logic.106118 107119 #### Scenario: Workshop imports a trusted module108120 - **WHEN** the player chooses Import or drops a `.cjs` file and confirms the trusted path
@@ -120,6 +132,26 @@ The stage SHALL connect Workshop actions to the presentation-independent pack se
120132 - **WHEN** a valid share or local module preview returns a pack that already exists121133 - **THEN** Gift shows the pack name, author, level count, first-level preview, and `ALREADY HERE` with Replace, Keep both as a copy, or Not now choices before installation122134 135+#### Scenario: Workshop is reachable from Title and INDEX136+- **WHEN** the player is on Title or INDEX and chooses the visible Workshop entry137+- **THEN** the stage opens Workshop directly without requiring a detour through Pause138+139+#### Scenario: Workshop keyboard and pointer actions agree140+- **WHEN** the player activates Workshop, Import, Play, Share, Export, Remove, or Back with either keyboard or pointer input141+- **THEN** both input paths produce the same action and feedback result142+143+#### Scenario: Back returns to the originating scene144+- **WHEN** the player enters Workshop from Title or INDEX and chooses Back145+- **THEN** the stage returns to that originating scene with its current selection and progress intact146+147+#### Scenario: Local Import Gift can return to Workshop148+- **WHEN** the player chooses Import in Workshop, previews a local `.cjs` pack, and chooses Not now or presses Escape in Gift149+- **THEN** the stage returns to Workshop with the existing pack selection and registry unchanged150+151+#### Scenario: Shared URL Gift can return to Title152+- **WHEN** the app opens with a valid shared `#pack=` URL and the player chooses Not now or presses Escape in Gift153+- **THEN** the stage returns to Title without installing the pack or changing the registry154+123155 ### Requirement: The stage SHALL provide accessible and font-stable output124156 The stage SHALL keep a polite live region for rule, level, no-YOU, win, and pack status; all functions SHALL be reachable from keyboard, pad, and touch; and the player-facing font SHALL be the self-hosted Recursive instance with `MONO 1` and `CASL 0`. Reduced-motion and contrast behavior SHALL preserve readable text independent of animation or color.125157
M openspec/changes/build-ink-signal-stage/tasks.md +6 -0
@@ -11,6 +11,8 @@
1111 - [x] 2.2 Wire the input adapter into the stage so no legacy listener duplicates an engine intent or queues behind juice.1212 - [x] 2.3 Implement and unit-test serpentine INDEX layout, multi-sheet navigation, stable `packId/levelId` progress, and locked-node behavior in `src/scenes/map.js`.1313 - [x] 2.4 Integrate INDEX navigation and progress into the stage scene flow, including solved proof return and pack sheet traversal.14+- [x] 2.5 Align arrow and gamepad navigation with visible serpentine path edges, including the reversed second row, so 07/08 movement follows screen direction rather than array order.15+- [x] 2.6 Add browser and map fixtures for sheet-edge connectors, non-connected edge presses, and keyboard/gamepad parity without invisible jumps.1416 1517 ## 3. Ink-and-signal board and copy1618
@@ -19,6 +21,8 @@
1921 - [x] 3.3 Consume `state.sentences` for maximal horizontal/vertical sentence bars, including exact duplicates and stacked-word paths; use the 0.13–0.91 gutter bar and Recursive MONO 1.2022 - [ ] 3.4 Verify copy deck labels, accessibility live-region announcements, contrast, and static reduced-motion output against the designer reference.2123 - [x] 3.5 Replace typed middle-dot hints with drawn keycap and verb pairs, use proof terminology and Gift copy, and verify the playable title micro-proof.24+- [x] 3.6 Add the per-ID presentation facing projection for built-in directional MIAU/KEKE glyphs and explicitly opted-in mod palette glyphs: only accepted horizontal self-moves change facing; pushes, vertical movement, transforms, blocked/idle turns preserve it; undo restores snapshots and reset uses native defaults.25+- [x] 3.7 Add engine-state/browser fixtures for horizontal self-moves, pushed and vertical movement, transforms, blocked input, non-directional fallbacks, mod palette opt-in, per-ID undo restoration, native level reset, 70ms glyph-only squash, and reduced-motion instant facing without changing simulation coordinates.2226 2327 ## 4. Event-driven juice and audio2428
@@ -36,6 +40,8 @@
3640 - [x] 5.4 Route `#pack=` to pending Gift confirmation with `Keep and play` and `Not now`; remove automatic installation from the player flow.3741 - [x] 5.5 Keep legacy pack controls hidden by default and available only through `?dev` while stage integration is reviewed.3842 - [x] 5.6 Consume normalized preview views, duplicate conflict metadata, and structured no-throw service errors in Workshop and Gift feedback.43+- [x] 5.7 Add prominent Workshop entries to Title and INDEX while retaining the Pause route, with an origin-scene return target.44+- [x] 5.8 Verify keyboard and pointer parity for Workshop entry/actions/Back, preserve Title or INDEX selection and progress when returning, and cover local Import→Gift→Not now/ESC back to Workshop versus shared URL Gift back to Title.3945 4046 ## 6. Font and browser acceptance4147