1## Context23The engine derives properties from movable word sentences and returns settled events after each turn. Clockwork needs a data-only automaton record `{ id, subject?, property, pattern, phase? }`. Public pattern steps are objects: `{ action: 'move', dx, dy, cue?, sound? }` or `{ action: 'wait', cue?, sound? }`. With no subject, the automaton is property-carried: every noun currently matched by `SUBJECT IS PROPERTY` follows the pattern, so pushing the property word can transfer the behavior to another noun.45## Goals / Non-Goals67**Goals:**89- Normalize optional-subject automata and object pattern steps.10- Advance one phase per accepted player turn only when at least one current entity carries the property; a blocked automaton action still consumes that beat.11- Resolve each turn in the agreed order: player move, parse/transform, automaton actions, parse/transform, then SINK/DEFEAT/WIN.12- Move automata with the same atomic push rules as `YOU`, using front-first ordering.13- Expose the exact automata state and automated movement details needed to derive current/next beat feedback.14- Include phase in Undo/reset, replay, and solver state, and validate local/shared data.1516**Non-Goals:**1718- Beat-driven property additions/removals or completion predicates.19- JavaScript callbacks, arbitrary predicates, or executable behavior in shared payloads.20- Pattern string shorthand, pattern versions, required handoff metadata, or explicit carrier fields.21- Replacing board sentence parsing or adding new core vocabulary beyond declared property words.2223## Decisions2425### Use the implemented object-step schema2627The level record uses `id`, optional `subject`, `property`, `pattern`, and optional `phase`. A pattern step is either a move object with integer `dx`/`dy` and optional `cue`/`sound`, or a wait object with optional `cue`/`sound`. Only cardinal move deltas are valid. Object steps match the public mod contract and avoid a second string-only representation.2829### Let board sentences activate and transfer the property3031The automaton is active when the current level's parsed rules contain the matching `SUBJECT IS PROPERTY`, with optional subject restriction. The property word remains part of the visible board sentence, so pushing it can change which noun carries the behavior on the next parse. Active carrier IDs are derived from rules and objects rather than duplicated in state.3233### Resolve a turn in explicit phases3435For an accepted player turn, resolve the player move first, then re-parse rules and transformations. Resolve automaton actions for current carriers, moving front-first along each action direction and tying by entity ID. Re-parse rules and transformations again, followed by SINK, DEFEAT, and WIN. This prevents contacts from observing half-applied automaton movement.3637### Advance phase on active accepted turns3839If the automaton is active after the player phase, its shared numeric phase advances once after the automaton beat, even when the action is blocked and the entity stays in place. A blocked player input is not a turn and does not advance phase. Explicit `wait` is a valid action.4041### Keep cues and sound presentation-only4243Cue and sound fields travel in `automated` event entries and are consumed by presentation/audio. They do not alter coordinates, rule semantics, or solver state beyond the phase transition. The stage derives current and next beat display from the automata pattern and phase.4445### Share normalized data only4647Trusted local CommonJS modules may declare the automaton record after validation. Shared payloads carry normalized automata data and are validated before installation without evaluating code. Unsupported fields or malformed steps fail atomically.4849## Risks / Trade-offs5051- [Risk] An automaton action can be blocked by STOP or bounds. → Preserve the board position, report the block in `automated`, and still advance the active phase for that accepted player turn.52- [Risk] Pushing the property word transfers behavior unexpectedly. → Re-parse after player movement and derive active carriers from rules plus objects.53- [Risk] Multiple carriers collide during one beat. → Use front-first projection ordering and the existing atomic push chain with stable entity ID ties.54- [Risk] Long patterns enlarge solver state. → Bound pattern length during validation and key only normalized automata state.5556## Migration Plan57581. Add optional automaton normalization with absent data preserving current levels.592. Add player/parse/automaton/parse/contact resolution phases and automata state/events.603. Include phase in Undo/reset, replay, and solver state keys.614. Add local module and shared payload validation fixtures.625. Add visual/audio feedback derived from phase and pattern data.6364## Open Questions6566- Phase wraps modulo the authored pattern length on each accepted active turn.67- The designer's D21 beat-strip presentation review remains open: one 28px actor emoji tile; 22px cells with only direction/wait glyphs; a muted `NOUN IS TICK` label after the cells; and on mobile, a 14px gap below the ledger before the strip.6869## Verification checkpoint7071Engine, mod, share, and solver fixtures cover property transfer, blocked beats, wait, contacts, Undo/reset/restore, replay, and phase-distinct search. `tests/pack-service.test.js` verifies that malformed shared automata fail atomically without changing an installed catalog. `tests/browser/automata.mjs` and `tests/browser/automata-edges.mjs` capture movement, blocked/next beats, and a MOUSE-to-BELL property transfer on mobile with no browser errors. The full 326-test Node suite, production build, strict OpenSpec validation, and revised 23-proof world solver gate pass. Presentation acceptance remains in tasks 4.4 and 5.4; the current fixture exposed the three specific D21 items above.