Skip to content

Encode request-shaped UI motion criteria as guide rules and checks - #135

Merged
owjs3901 merged 4 commits into
mainfrom
devfive/3099154426bffbeef8b62999b80bb038/motion-criteria
Nov 28, 2026
Merged

owjs3901 merged 4 commits into
mainfrom
devfive/3099154426bffbeef8b62999b80bb038/motion-criteria

Conversation

@devfive-relay-c70423

Copy link
Copy Markdown
Contributor

Summary

Encodes the project's UI animation design/implementation/review criteria into devup-mcp, generically: as guide rules, developmentContract identifiers, static devup_ui_validate rules and executable devup_runtime_audit checks. Request-specific instructions still override every default.

Criterion What changed
1. Sequential = next starts after previous finishes; no parent-container animation or overlapping stagger unless asked Guide §0; sequential-no-overlap requirement. Static: sequence-overlaps (per-item delay shorter than the item's duration inside a data-reveal-sequence="sequential" group, keyframes and motion-library forms) and sequence-animates-container; stagger-too-long no longer fires inside a sequential group. Runtime: reveal motion.sequence: "sequential" | "together" | "overlap"; the stagger scenario fails a unit that starts before the previous one finished, and a group element that animates itself. RevealGroup sequence="sequential" delays each item by index * (400ms + --reveal-gap).
2. Unit from wording (card/row/section, numbered list → step, side-by-side cards → card, contents move together, rows from the actual layout) Guide §0; motion-request-first. Runtime: motion.unit (row groups items by the rows laid out at the audited width, so mobile 2×2 and desktop 1×4 are judged differently; a row's cards must start together).
3. Order vs movement direction, progress-line conditions Guide §0. Runtime: motion.order (document/reverse) and motion.direction (from-right/from-left/from-bottom/from-top, or one per unit), measured from each item's first displaced frame; a direction that cannot be seen is unverified, never assumed. The existing progress-sync covers "card as the line reaches each number".
4. Dropdown/accordion: content height, interruptible, collapsed = no space and no focus, form values kept Guide §0; disclosure-height-and-focus. Static: disclosure-collapsed-focusable, disclosure-fixed-max-height, disclosure-unmounts-form (info). Runtime: new motion kind: "disclosure" (target, panel, optional field, after): opens and closes straight through and interrupted at 40%, and fails leftover height, focusable content while collapsed, a panel that is not its content height (including content clipped by an inner overflow: hidden), a following element that does not move with it, a frame-to-frame jump on interruption, or a typed value lost by closing and reopening.
5. Page entrance once per visit; no pre-animation flash; readable if the script is slow or fails Folded into the existing one-shot-reveals-without-ssr-flash entry (visit semantics spelled out). The existing reload/history/bfcache/client-nav/fast-scroll/no-script scenarios already measure it.
6. Entrance vs repeating emphasis; emphasis returns to its resting state; reduced motion, also switched on mid-use Guide §0; emphasis-reduced-motion. Static: motion-without-reduced-motion now also covers infinite emphasis loops (rotation-only spinners excepted). Runtime: new reduced-motion-toggle scenario switches the preference on mid-entrance and requires every running animation in the block to stop with the content shown in place. Fix found by it: the shipped RevealItem kept animating when reduced motion was switched on mid-use (its _motionReduce rule loses on specificity to the [data-reveal-state="in"] & selector). motion-runtime.ts now settles every marked group to shown when the preference changes.
7. Real-browser mid-state verification plan; re-verify the combined state across PRs Guide §0 ("Record before implementing") and §4; implementation-plan skill; mid-sequence-motion completion evidence. Motion evidence rows now carry the per-unit sequence verdict (stagger.sequence).

Compatibility

  • MCP tool schemas are unchanged: motion options are free-form JSON validated in validate_motion, and every new field is optional. Unknown or misspelled values are rejected, and group fields require motion.items.
  • developmentContract version 6 → 7: 4 requirements and 1 completion-evidence identifier added. They are kept short so the export reply keeps its 1 KiB headroom (14323 of 15360 bytes on Windows).
  • The emitted runner bundle gains sequence-checks.mjs and disclosure-checks.mjs.

Tests

  • Rust: rule tests for each new static rule (motion_contract_tests.rs), validation of the new motion fields and the disclosure kind, an evidence-row test, and contract and guide term coverage.
  • Harness, pure (runs in CI): test/sequence.test.mjs covers sequence, unit, order, direction, reduced-motion toggle and disclosure verdicts. It is loaded from test/checks.test.mjs, which CI already runs, so the workflow file is unchanged.
  • Harness, real Chromium (local): test/motion-contract.test.mjs runs correct and broken pages for sequential cards, rows at 390px and 1440px, reverse order with direction, a live versus load-time reduced-motion switch with an emphasis loop, and accordions (focusable, padded, capped, jumping, unmounting). Existing reveal and keyframes fixtures were updated for the new default scenario.

🤖 Generated with Claude Code


Submitted via Devfive hub. Employee: ; device: 3099154426bffbeef8b62999b80bb038

leader and others added 3 commits November 29, 2026 00:16
devup_feature_trace gains optional stateChecks, requirements, designGaps
and changes inputs that return a verification matrix:

- per-state groups (default/hover/active/focus/selected/disabled) comparing
  Figma size, position, colour, border and typography with implementation
  values, optional pixel checks through devup_visual_compare, and expected
  component-set variant states; missing design, missing capture and
  static-only states stay unverified
- requirement verdicts (verified/unverified/not-applicable) with evidence,
  screen/component/state scope and browser-verification-required for
  interaction or visual requirements proven only statically
- Figma data gaps (missing nodes/properties, failed reads/exports) with the
  screens, states and requirements they block; claims gate design-match
  and completion
- change impact for shared components, shared vs screen-only config scope,
  static vs observed result counts
- a review report per change and an ordered followUp for unfinished
  verification, documented in the guide (section 17) and the
  devup-implementation-plan skill

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sequential entrances, animation units, order and direction, dropdown and
accordion behaviour, once-per-visit entrances, emphasis loops and reduced
motion switched on mid-use become guide rules, developmentContract
identifiers, devup_ui_validate rules and devup_runtime_audit checks
(reveal sequence/unit/order/direction, reduced-motion-toggle, and a new
disclosure motion kind). The shared motion controller now settles marked
groups when reduced motion is switched on while the page is open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pure sequence, unit, direction and disclosure verdict tests are loaded
from checks.test.mjs, which CI already runs, so the workflow file does not
need to change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@owjs3901
owjs3901 marked this pull request as ready for review November 28, 2026 17:38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devfive-relay-c70423

Copy link
Copy Markdown
Contributor Author

Merge-order note: this branch now includes #133 (merged in to resolve the skills/manifest.json checksum conflict on devup-implementation-plan/SKILL.md). Merge #133 first; after that, this diff shows only the motion changes. Combined #133+#134+#135 local cargo test --workspace: 2380 passed, 0 failed.

@owjs3901
owjs3901 merged commit 8e95c00 into main Nov 28, 2026
9 checks passed
@owjs3901
owjs3901 deleted the devfive/3099154426bffbeef8b62999b80bb038/motion-criteria branch November 28, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant