Skip to content

feat(data): add motion-principles domain (Emil Kowalski)#296

Open
najamali wants to merge 2 commits intonextlevelbuilder:mainfrom
najamali:feat/emil-motion-principles
Open

feat(data): add motion-principles domain (Emil Kowalski)#296
najamali wants to merge 2 commits intonextlevelbuilder:mainfrom
najamali:feat/emil-motion-principles

Conversation

@najamali
Copy link
Copy Markdown

@najamali najamali commented May 3, 2026

Summary

Adds a new motion search domain covering 37 motion-design principles synthesized from Emil Kowalski's open-source design engineering skill. Emil built Sonner and Vaul, runs animations.dev, and is widely regarded as the motion authority for modern web UI. This PR ports his rules into ui-ux-pro-max as a searchable, BM25-indexable CSV.

Coverage (37 rules across 8 categories)

  • Decision — Frequency-based animation gating, never-animate-keyboard-actions, every-animation-has-a-purpose
  • Easing — Custom cubic-beziers (the built-in CSS easings are too weak), ease-out for entries, ease-in-out for on-screen movement, linear for constant motion
  • Duration — Per-element ranges (button 100-160ms, dropdown 150-250ms, modal 200-500ms), sub-300ms rule, asymmetric enter/exit
  • Spring — When to use vs. tween, Apple-style config ({ duration, bounce }), subtle bounce in product UI
  • Component:active scale(0.97), never animate from scale(0), popover transform-origin (with modal exception), skip tooltip delay on subsequent hovers, blur to mask imperfect crossfades, @starting-style
  • Performance — transform/opacity only, the CSS-vars-on-parent recalc trap, Framer Motion shorthand isn't hardware-accelerated, CSS animations beat JS under load, WAAPI for programmatic CSS animations
  • Gesture — Velocity-based dismissal (>0.11), boundary damping, pointer capture, multi-touch protection
  • A11yprefers-reduced-motion (gentler not zero), hover gating with @media (hover: hover) and (pointer: fine)
  • Polish — Stagger 30-80ms, cohesion (motion personality matches component personality), next-day review, real-device gesture testing

Files

  • data/motion-principles.csv (37 rows; Category, Principle, Keywords, Why It Matters, Do, Don't, Code Good, Code Bad, Severity, Source)
  • data/motion-principles-CREDITS.md (source attribution + credit guidance for derived work)
  • scripts/core.py — register motion in CSV_CONFIG and detect_domain
  • CLAUDE.md — document new domain
  • templates/base/skill-content.md — add Motion Review workflow section
  • cli/assets/ — synced per CLAUDE.md sync rules

Test plan

  • python3 src/ui-ux-pro-max/scripts/search.py "ease out animation" --domain motion → hits Easing rows
  • python3 src/ui-ux-pro-max/scripts/search.py "framer motion drops frames" → auto-detects motion domain
  • python3 src/ui-ux-pro-max/scripts/search.py "scale on press button feedback" --domain motion → returns Component rule
  • python3 src/ui-ux-pro-max/scripts/search.py "purple gradient" --domain antipattern → no regression on existing domains

Attribution

Each row's Source column attributes specifically. Most trace to Emil directly; Vaul-derived gesture rules and Sonner library principles credit those projects; prefers-reduced-motion and easing-curve resources cite WCAG and easing.dev. Full credit guidance in motion-principles-CREDITS.md recommends linking to emilkowal.ski and animations.dev in derived work.

Why this PR is a separate one from #295

Independent and non-overlapping. Anti-patterns / philosophies / asset protocol is about what to design; motion principles is about how to animate. Easier to review, easier to reject one without losing the other.

🤖 Generated with Claude Code

najamali and others added 2 commits May 3, 2026 15:44
…et protocol

Adds two new search domains and four process docs ported from impeccable
(pbakaus), Anthropic frontend-design, and jiji262/claude-design-skill.

New data:
- data/anti-patterns.csv: 30 deterministic anti-pattern rules covering
  generic AI aesthetics (purple gradients, default shadcn, Inter
  everywhere, stock photos, nested cards) with severity, mode, and
  better-alternative columns
- data/design-philosophies.csv: 10 philosophies x 5 schools (Swiss,
  Brutalist, Editorial, Hara, Maximalism, Aurora, Y2K, Organic, Anti-
  Design) with flagship examples, signature moves, and AI prompt seeds
- data/asset-protocol.md: 5-step Core Asset Protocol for branded work
- data/advisor-mode.md: 3-direction protocol for vague briefs

New templates:
- templates/base/DESIGN.md: per-project design memory (mode, locked
  direction, tokens, hard rules, anti-pattern checklist)
- templates/base/PRODUCT.md: per-project product memory (audience, voice
  rules, constraints, decision log)

Search engine:
- core.py: add 'antipattern' and 'philosophy' domains to CSV_CONFIG and
  detect_domain keyword sets

Docs:
- CLAUDE.md: document new domains and process files
- skill-content.md: add Advisor Mode, Anti-Pattern Check, Asset Protocol,
  and project-memory sections to the skill workflow

CLI assets synced per CLAUDE.md sync rules.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a new 'motion' search domain covering 37 motion-design principles
synthesized from Emil Kowalski's open-source design engineering skill
(github.com/emilkowalski/skill, animations.dev, Sonner, Vaul).

Coverage:
- Animation Decision Framework: frequency tiers, purpose audit
- Easing: custom cubic-beziers, ease-out for entries, ease-in-out for
  on-screen movement, linear for constant motion
- Duration: per-element ranges, asymmetric enter/exit, sub-300ms rule
- Springs: when to use, Apple-style config, bounce ranges
- Components: button :active scale(0.97), never-from-zero, popover
  origin (with modal exception), tooltip skip-on-subsequent, blur
  masking, @starting-style
- Transforms: percentage translate, scale-children, transform-origin
- Performance: transform/opacity only, CSS-vars-on-parent caveat,
  Framer Motion shorthand pitfall, CSS > JS under load, WAAPI usage
- Gestures: velocity dismissal (>0.11), boundary damping, pointer
  capture, multi-touch protection
- Accessibility: prefers-reduced-motion (gentler not zero), hover
  gating with @media (hover: hover) and (pointer: fine)
- Polish: stagger 30-80ms, cohesion, next-day review, real-device
  testing
- Sonner-derived library principles: defaults > options, edge cases
  invisibly handled
- Debug: DevTools Animations panel, slow-motion review

Files:
- data/motion-principles.csv (37 rows)
- data/motion-principles-CREDITS.md (source attribution + credit
  guidance for derived work)
- scripts/core.py: register 'motion' domain in CSV_CONFIG and
  detect_domain keyword set
- CLAUDE.md, skill-content.md: document the new domain
- cli/assets/ synced

Test plan:
- search.py "ease out animation" --domain motion -> hits Easing rows
- search.py "framer motion drops frames" -> auto-detects motion domain
- search.py "purple gradient" --domain antipattern -> still works (no
  regression)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@najamali
Copy link
Copy Markdown
Author

najamali commented May 3, 2026

Note: this PR is stacked on #295 (anti-patterns + philosophies + asset protocol).

The diff currently shows +1186 / 21 files because #295 hasn't merged yet. The actual content of this PR is ~190 lines / 9 files — only the motion-principles additions:

  • data/motion-principles.csv (37 rows)
  • data/motion-principles-CREDITS.md
  • scripts/core.py — adds the motion block to CSV_CONFIG + keyword set
  • CLAUDE.md, skill-content.md — documents the new domain
  • cli/assets/ — synced

If #295 merges first, this PR's diff will auto-shrink to its actual scope.
If #295 is closed without merging, I'll rebase this branch onto main and the diff will clean up automatically.
If you want to merge them in either order, just say which — happy to split or restack.

Either PR can be reviewed independently of the other; they touch the same CSV_CONFIG dict but otherwise are logically separate (anti-patterns = what to avoid; motion = how to animate).

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