clone

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

docs(openspec): specify native MIAU facing from travel

Dami committed ca0e3e6
commit
ca0e3e67554a6deb15d987b4391d99fc28b96e6d
parent
32f8f3038fe3380c8a90a134bafdab680be07635
author
Dami <dami.etoile@gmail.com>
5 files changed, +106 -0
Aopenspec/changes/fix-miau-forward-facing/.openspec.yaml2++
Aopenspec/changes/fix-miau-forward-facing/design.md29++++++++++++++++++++++
Aopenspec/changes/fix-miau-forward-facing/proposal.md24++++++++++++++++++
Aopenspec/changes/fix-miau-forward-facing/specs/game-presentation/spec.md40++++++++++++++++++++++++++++++
Aopenspec/changes/fix-miau-forward-facing/tasks.md11++++++++
A openspec/changes/fix-miau-forward-facing/.openspec.yaml +2 -0
A openspec/changes/fix-miau-forward-facing/design.md +29 -0
@@ -0,0 +1,29 @@
1+## Context2+3+The board currently infers native-left facing only when no palette entry exists. Basic Proofs, Word Lab, and the FENN example all repeat `MIAU: '🐈'`, so those proofs lose mirroring. The `faces` palette field already states a custom glyph's native horizontal direction. The 🐈 image has no authored up/down view.4+5+## Goals / Non-Goals6+7+**Goals:** Make the native direction explicit for the built-in cat and have successful horizontal movement face that direction on every board surface. Keep mod glyphs predictable and Undo/reset exact.8+9+**Non-Goals:** Rotate the side-profile emoji for vertical motion or infer an arbitrary emoji's native direction from its Unicode name.10+11+## Decisions12+13+- Resolve native direction from the final glyph: 🐈 used for MIAU or CAT is left-facing even when supplied as a plain string. An explicit palette `faces` value takes precedence. A different plain glyph stays non-directional. This fixes bundled content without changing the CommonJS schema.14+- A successful horizontal movement event sets facing to its horizontal direction. A pushed directional actor also faces its actual displacement. If the same actor moves itself later in a turn, its horizontal self direction wins. Vertical movement preserves the last horizontal orientation because the available emoji has no up/down drawing. Blocked intents do not move and do not turn.15+- Retain per-ID visual history for Undo and clear it on level load/reset. Rendering compares that direction with the glyph's declared native direction and mirrors only the emoji bitmap.16+17+## Risks / Trade-offs18+19+- **A platform draws 🐈 with a different native direction** → the glyph declaration can be changed in one place; the movement logic remains the same.20+- **A mod replaces MIAU with a different plain glyph** → it will not flip without an explicit `faces` declaration, avoiding accidental mirroring of front-facing emoji.21+- **Vertical travel lacks a matching emoji view** → preserve the last horizontal pose and send a separate design question if a four-direction visual becomes necessary.22+23+## Migration Plan24+25+Ship as a presentation correction. Existing packs using `MIAU: '🐈'` gain forward-facing movement automatically; saved packs and progress require no migration.26+27+## Open Questions28+29+- Whether the designer wants a separate up/down direction cue for MIAU in a later visual change.
A openspec/changes/fix-miau-forward-facing/proposal.md +24 -0
A openspec/changes/fix-miau-forward-facing/specs/game-presentation/spec.md +40 -0
@@ -0,0 +1,40 @@
1+## MODIFIED Requirements2+3+### Requirement: Supported character glyphs SHALL use scoped facing state4+The presentation SHALL maintain horizontal facing per entity ID as visual state separate from simulation coordinates. The built-in MIAU 🐈 SHALL have native left-facing direction, including when a pack repeats that same glyph as a plain palette string. A mod palette object MAY declare `faces: 'left' | 'right'` for another profile glyph; a different plain string and a front-facing glyph such as FENN 🦊 SHALL remain non-directional by default. Every accepted horizontal displacement SHALL update a directional entity's facing to its travel direction, including being pushed. When a pushed entity also moves itself horizontally in the same turn, its self-movement direction SHALL take precedence. Vertical movement, transformation, idle frames, and blocked intents SHALL preserve prior horizontal facing. Undo SHALL restore per-ID facing history, while loading or resetting a level SHALL use its native declared or neutral facing. A facing change MAY use a glyph-only squash; reduced motion SHALL apply the direction immediately.5+6+#### Scenario: Built-in cat faces forward in every pack7+- **WHEN** a MIAU entity with the built-in 🐈 glyph moves right in a core proof or a pack with `palette.MIAU: '🐈'`8+- **THEN** the settled board mirrors the native-left glyph to face right, without mirroring its cell, shadow, or text9+10+#### Scenario: Leftward travel uses the native pose11+- **WHEN** that MIAU entity subsequently moves left12+- **THEN** the settled board draws the native-left glyph without a mirror13+14+#### Scenario: Pushes turn a directional actor15+- **WHEN** a directional entity is successfully pushed one cell to the right16+- **THEN** its settled horizontal facing is right, while a blocked push leaves its prior facing unchanged17+18+#### Scenario: Self-movement wins after a push19+- **WHEN** one accepted turn pushes an actor right and then moves that actor left under an automaton rule20+- **THEN** the actor's settled horizontal facing is left21+22+#### Scenario: Vertical movement preserves the horizontal pose23+- **WHEN** a MIAU entity moves up or down after facing right24+- **THEN** its horizontal glyph orientation remains right because the side-profile emoji has no vertical view25+26+#### Scenario: A transformation preserves per-ID facing27+- **WHEN** an entity transforms to another noun during a settled turn28+- **THEN** the entity ID retains its prior horizontal facing, unless the resulting noun has no directional glyph and uses its normal fallback29+30+#### Scenario: A custom mod glyph opts in explicitly31+- **WHEN** a mod supplies a different profile glyph with `faces: 'right'`32+- **THEN** leftward travel mirrors that glyph, while a different plain-string glyph is not mirrored33+34+#### Scenario: Undo and reset restore the correct pose35+- **WHEN** the player undoes a directional turn or resets/loads a level36+- **THEN** Undo restores the prior per-ID facing, and reset/load returns MIAU to the declared native-left pose37+38+#### Scenario: Reduced motion skips facing animation39+- **WHEN** reduced motion is enabled and a horizontal move changes facing40+- **THEN** the settled glyph faces its direction immediately without a transitional squash
A openspec/changes/fix-miau-forward-facing/tasks.md +11 -0