@punks/cli 3.2.2 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/dist/BASELINE_CHANGELOG.md +43 -0
- package/dist/CHANGELOG.md +24 -0
- package/dist/baseline/scaffold-baseline/baseline.json +5 -5
- package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +4 -1
- package/dist/baseline/scaffold-baseline/data/catalog/packs.json +5 -2
- package/dist/baseline/scaffold-baseline/data/catalog/skills.json +24 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/RECIPES.md +333 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/SKILL.md +203 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md +229 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +8 -6
- package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +36 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
- package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/LICENSE +21 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/RECIPES.md +435 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
- package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +34 -9
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +18 -11
- package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +9 -2
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +6 -8
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +8 -5
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +29 -14
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +45 -32
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +2 -1
- package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +86 -12
- package/dist/baseline/scaffold-baseline.json +5 -5
- package/dist/baseline/scaffold-baseline.tgz +0 -0
- package/dist/data/AGENTS.md +1 -1
- package/dist/index.js +10 -10
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
- package/dist/skills/agnostic/frontend/animate/LICENSE +21 -0
- package/dist/skills/agnostic/frontend/animate/RECIPES.md +324 -0
- package/dist/skills/agnostic/frontend/animate/SKILL.md +199 -0
- package/dist/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
- package/dist/skills/agnostic/frontend/review-animations/LICENSE +21 -0
- package/dist/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
- package/dist/skills/agnostic/frontend/review-animations/STANDARDS.md +187 -0
- package/dist/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
- package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +8 -6
- package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
- package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +33 -3
- package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
- package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
- package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
- package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
- package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
- package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
- package/dist/skills/frameworks/expo/animate-expo/LICENSE +21 -0
- package/dist/skills/frameworks/expo/animate-expo/RECIPES.md +385 -0
- package/dist/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
- package/dist/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
- package/dist/skills/phases/delivery-phase/phases/review.md +34 -9
- package/dist/skills/phases/delivery-phase/phases/router.md +16 -9
- package/dist/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
- package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
- package/dist/skills/phases/review-phase/phases/retain-report.md +9 -2
- package/dist/skills/phases/review-phase/phases/return-route.md +6 -8
- package/dist/skills/phases/review-phase/phases/run-review.md +8 -5
- package/dist/skills/phases/review-phase/references/durable-report.md +29 -14
- package/dist/skills/phases/review-phase/references/state-graph.md +18 -5
- package/dist/skills/phases/review-phase/references/targets.md +2 -1
- package/dist/skills/phases/review-phase/scripts/review-contract.mjs +91 -11
- package/package.json +52 -9
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.test.ts +0 -130
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.test.ts +0 -135
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts +0 -138
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts +0 -135
- package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.test.ts +0 -875
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.lifecycle.test.ts +0 -205
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.native.test.ts +0 -2765
- package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +0 -2108
- package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +0 -116
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +0 -29
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: animate
|
|
3
|
+
description: Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Building Animations
|
|
7
|
+
|
|
8
|
+
A construction skill. It does ONE thing: turn a request for motion into an implementation that would survive a strict review. It does not audit a codebase (that's `improve-animations`), critique a diff (that's `review-animations`), hunt for places that could animate (that's `find-animation-opportunities`), or build for React Native (that's `animate-expo`).
|
|
9
|
+
|
|
10
|
+
## Operating Posture
|
|
11
|
+
|
|
12
|
+
You are a senior design engineer building the animation yourself. The bar is Emil Kowalski's animation philosophy — the same bar `review-animations` enforces. Write it so it passes that review the first time.
|
|
13
|
+
|
|
14
|
+
Two failure modes, and the first is worse:
|
|
15
|
+
|
|
16
|
+
1. **Animating something that shouldn't animate.** The gate below exists to produce zero lines of code sometimes. That's a success, not a dodge.
|
|
17
|
+
2. **Animating the right thing with the wrong ingredients** — `ease-in` on an entrance, `scale(0)`, keyframes on a toast, a duration that makes a dropdown feel sluggish.
|
|
18
|
+
|
|
19
|
+
Never present motion options as a menu. Make the call, state the reasoning in one line, write the code.
|
|
20
|
+
|
|
21
|
+
## Hard Rules
|
|
22
|
+
|
|
23
|
+
1. **Run the sequence in order.** Steps 1 and 2 gate everything. Don't reach for a curve before you know whether it animates at all.
|
|
24
|
+
2. **No approximated values.** Every curve, duration, and spring config comes from the tables below. Never invent `cubic-bezier(0.4, 0, 0.2, 1)` because it looks familiar.
|
|
25
|
+
3. **Extend the codebase's tokens, don't fork them.** If `--ease-out` or a duration scale already exists, use it. Adding a parallel system is a defect.
|
|
26
|
+
4. **Reduced motion and hover gating ship with the animation**, not as a follow-up.
|
|
27
|
+
5. **Cheapest tool that works.** Don't install a motion library for a fade.
|
|
28
|
+
|
|
29
|
+
## The Build Sequence
|
|
30
|
+
|
|
31
|
+
### 1. Should this animate at all?
|
|
32
|
+
|
|
33
|
+
| Frequency | Decision |
|
|
34
|
+
| ----------------------------------------------------------- | ----------------------------------------------------- |
|
|
35
|
+
| 100+ times/day (keyboard shortcuts, command palette toggle) | **No animation. Ever.** Stop here. |
|
|
36
|
+
| Tens of times/day (hover effects, list navigation) | Near-imperceptible only — fast and subtle, or nothing |
|
|
37
|
+
| Occasional (modals, drawers, toasts) | Standard animation |
|
|
38
|
+
| Rare / first-time (onboarding, success, celebration) | The delight budget lives here |
|
|
39
|
+
|
|
40
|
+
**Keyboard-initiated actions are a disqualifier, not a judgment call.** Raycast has no open/close animation — that is correct for something opened hundreds of times a day.
|
|
41
|
+
|
|
42
|
+
If the request fails this gate, say so plainly and don't write the animation. Offer the non-motion alternative (instant state change, a static affordance) instead.
|
|
43
|
+
|
|
44
|
+
### 2. What is the purpose?
|
|
45
|
+
|
|
46
|
+
Name it in one of these words before continuing:
|
|
47
|
+
|
|
48
|
+
- **Feedback** — confirming the interface heard the user
|
|
49
|
+
- **Spatial consistency** — showing where something came from or went
|
|
50
|
+
- **State indication** — making a state change legible
|
|
51
|
+
- **Preventing a jarring change** — bridging content that would otherwise teleport
|
|
52
|
+
- **Explanation** — demonstrating how something works (marketing/onboarding only)
|
|
53
|
+
- **Delight** — allowed _only_ at the rare/first-time tier
|
|
54
|
+
|
|
55
|
+
Can't name it? Don't build it. "It looks cool" on a frequently-seen element is a reason to stop.
|
|
56
|
+
|
|
57
|
+
Also check **function**: data the user is reading or acting on should not move for style. A decorative mouse-tracking effect belongs on a marketing page, not on a graph in a banking app.
|
|
58
|
+
|
|
59
|
+
### 3. Pick the tool — cheapest that works
|
|
60
|
+
|
|
61
|
+
Walk down; stop at the first that fits.
|
|
62
|
+
|
|
63
|
+
| Need | Tool |
|
|
64
|
+
| ------------------------------------------------------------------------- | -------------------------------------------- |
|
|
65
|
+
| Hover, press, color, a state toggle you control with a class or attribute | **CSS transition** |
|
|
66
|
+
| Entry animation on mount, no JS state | **CSS `@starting-style`** |
|
|
67
|
+
| Predetermined motion that must stay smooth while the page is busy loading | **CSS animation** (runs off the main thread) |
|
|
68
|
+
| Programmatic control with CSS performance, no library | **WAAPI** (`element.animate()`) |
|
|
69
|
+
| Springs, layout animations, exit animations, gesture-driven values | **Motion** (`motion.dev`) |
|
|
70
|
+
|
|
71
|
+
CSS animations beat JS under load — they run off the main thread, while `requestAnimationFrame`-based animation drops frames while the browser loads, scripts, or paints. Use CSS for predetermined motion, JS for dynamic and interruptible motion.
|
|
72
|
+
|
|
73
|
+
If the task needs a _component_ rather than an animation — a toast, a drawer, a command menu, a dropdown — stop and invoke `pick-ui-library`. Hand-rolling those is how you end up with a `<div>` dropdown and no focus management.
|
|
74
|
+
|
|
75
|
+
### 4. Pick the properties
|
|
76
|
+
|
|
77
|
+
- **`transform` and `opacity` only.** They skip layout and paint and run on the GPU. `width`/`height`/`margin`/`padding`/`top`/`left` trigger all three. (`clip-path` is the sanctioned fourth — see RECIPES.md. `height` is tolerated only for accordions, where there's no transform equivalent.)
|
|
78
|
+
- **Never `scale(0)`.** Start from `scale(0.9–0.97)` + `opacity: 0`. Nothing in the real world appears from nothing.
|
|
79
|
+
- **`transform-origin` at the trigger** for popovers, dropdowns, menus, tooltips — `var(--transform-origin)` in Base UI. **Modals are exempt**; they're not anchored to a trigger, so they stay centered.
|
|
80
|
+
- **Percentages in `translate()`** are relative to the element's own size — `translateY(100%)` moves by its own height whatever the content. Prefer over hardcoded pixels.
|
|
81
|
+
- **In Motion, use the full transform string.** `x`/`y`/`scale` shorthands are not hardware-accelerated and drop frames under load:
|
|
82
|
+
|
|
83
|
+
```jsx
|
|
84
|
+
<motion.div animate={{ x: 100 }} /> // drops frames under load
|
|
85
|
+
<motion.div animate={{ transform: "translateX(100px)" }} /> // hardware accelerated
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- **Never drive a child's transform from a CSS variable on the parent** — it recalculates styles for every child. Set `transform` on the element directly.
|
|
89
|
+
|
|
90
|
+
### 5. Easing and duration — or a spring
|
|
91
|
+
|
|
92
|
+
**Easing**, in decision order:
|
|
93
|
+
|
|
94
|
+
| Situation | Easing |
|
|
95
|
+
| ----------------------------------- | ------------- |
|
|
96
|
+
| Entering or exiting | `ease-out` |
|
|
97
|
+
| Moving / morphing on screen | `ease-in-out` |
|
|
98
|
+
| Hover / color change | `ease` |
|
|
99
|
+
| Constant motion (marquee, progress) | `linear` |
|
|
100
|
+
| Default | `ease-out` |
|
|
101
|
+
|
|
102
|
+
**Never `ease-in` on UI.** It starts slow, delaying the exact moment the user is watching. `ease-out` at 200ms _feels_ faster than `ease-in` at 200ms.
|
|
103
|
+
|
|
104
|
+
Built-in CSS easings are too weak. Use these:
|
|
105
|
+
|
|
106
|
+
```css
|
|
107
|
+
--ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out for UI */
|
|
108
|
+
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* strong ease-in-out for on-screen movement */
|
|
109
|
+
--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* iOS-like drawer curve (Ionic) */
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Need a curve that isn't here? Take it from [easing.dev](https://easing.dev/) or [easings.co](https://easings.co/). Don't hand-roll one.
|
|
113
|
+
|
|
114
|
+
**Duration:**
|
|
115
|
+
|
|
116
|
+
| Element | Duration |
|
|
117
|
+
| ------------------------ | ------------- |
|
|
118
|
+
| Button press feedback | 100–160ms |
|
|
119
|
+
| Tooltips, small popovers | 125–200ms |
|
|
120
|
+
| Dropdowns, selects | 150–250ms |
|
|
121
|
+
| Modals, drawers | 200–500ms |
|
|
122
|
+
| Marketing / explanatory | Can be longer |
|
|
123
|
+
|
|
124
|
+
**UI animations stay under 300ms.** A 180ms dropdown feels more responsive than a 400ms one.
|
|
125
|
+
|
|
126
|
+
**Reach for a spring instead** when the motion is drag with momentum, an element that should feel alive, a gesture the user can interrupt or reverse, or decorative mouse-tracking:
|
|
127
|
+
|
|
128
|
+
```js
|
|
129
|
+
{ type: "spring", duration: 0.5, bounce: 0.2 } // Apple-style — easier to reason about
|
|
130
|
+
{ type: "spring", mass: 1, stiffness: 100, damping: 10 } // traditional physics — more control
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Keep bounce at 0.1–0.3, and avoid bounce in most UI — reserve it for drag-to-dismiss and playful interactions.
|
|
134
|
+
|
|
135
|
+
### 6. Interruption and exit
|
|
136
|
+
|
|
137
|
+
- **Transitions, not keyframes, for anything triggered rapidly** — toasts, toggles, anything a user can fire twice in a second. Transitions retarget from the current value; keyframes restart from zero.
|
|
138
|
+
- **Springs for gestures**, because they carry velocity through an interruption.
|
|
139
|
+
- **Exit the way it entered.** A toast that slides in from the bottom leaves through the bottom. Symmetric paths are what make swipe-to-dismiss feel obvious.
|
|
140
|
+
- **Asymmetric timing where the user is deciding.** Slow on the deliberate phase (a hold-to-confirm press: 2s linear), snappy on the system response (release: 200ms ease-out).
|
|
141
|
+
|
|
142
|
+
### 7. Reduced motion and pointer gating
|
|
143
|
+
|
|
144
|
+
Ships with the animation, every time.
|
|
145
|
+
|
|
146
|
+
```css
|
|
147
|
+
@media (prefers-reduced-motion: reduce) {
|
|
148
|
+
.element {
|
|
149
|
+
animation: fade 0.2s ease;
|
|
150
|
+
} /* keep opacity/color, drop transform-based motion */
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@media (hover: hover) and (pointer: fine) {
|
|
154
|
+
.element:hover {
|
|
155
|
+
transform: scale(1.05);
|
|
156
|
+
} /* touch fires false hovers on tap */
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
```jsx
|
|
161
|
+
const reduce = useReducedMotion();
|
|
162
|
+
const closedX = reduce ? 0 : "-100%";
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Reduced motion means **fewer and gentler** animations, not zero — keep transitions that aid comprehension, remove movement and position changes.
|
|
166
|
+
|
|
167
|
+
## Recipes
|
|
168
|
+
|
|
169
|
+
For ready-to-build implementations of the common cases — button press, dropdown, tooltip, modal, drawer, toast, accordion, stagger, hold-to-confirm, tab indicator, scroll reveal, drag-to-dismiss — see [RECIPES.md](RECIPES.md). Load it whenever the request matches one of those components; start from the recipe rather than from a blank file.
|
|
170
|
+
|
|
171
|
+
## Never Ship
|
|
172
|
+
|
|
173
|
+
Self-check before you finish. Each of these is an automatic block in `review-animations`:
|
|
174
|
+
|
|
175
|
+
| Never | Instead |
|
|
176
|
+
| ---------------------------------------------------------- | ------------------------------------------- |
|
|
177
|
+
| `transition: all` | Name the exact properties |
|
|
178
|
+
| `transform: scale(0)` entrance | `scale(0.95)` + `opacity: 0` |
|
|
179
|
+
| `ease-in` on a UI element | `ease-out` or a strong custom curve |
|
|
180
|
+
| Built-in `ease-out` on a deliberate animation | `cubic-bezier(0.23, 1, 0.32, 1)` |
|
|
181
|
+
| Animation on a keyboard shortcut or 100+/day action | No animation |
|
|
182
|
+
| UI duration over 300ms with no reason | 150–250ms |
|
|
183
|
+
| `transform-origin: center` on a trigger-anchored popover | `var(--transform-origin)` (modals exempt) |
|
|
184
|
+
| Keyframes on toasts, toggles, rapidly-triggered elements | CSS transitions |
|
|
185
|
+
| Animating `width`/`height`/`margin`/`padding`/`top`/`left` | `transform` / `opacity` |
|
|
186
|
+
| Motion `x`/`y`/`scale` props under load | Full `transform` string |
|
|
187
|
+
| Ungated `:hover` motion | `@media (hover: hover) and (pointer: fine)` |
|
|
188
|
+
| Missing `prefers-reduced-motion` | Gentler variant, not zero |
|
|
189
|
+
| Everything entering at once | 30–80ms stagger |
|
|
190
|
+
|
|
191
|
+
## Output
|
|
192
|
+
|
|
193
|
+
Write the code. Then, in at most a few lines:
|
|
194
|
+
|
|
195
|
+
- **The gate result** — frequency tier and the named purpose. If something in the request was rejected, say which and why.
|
|
196
|
+
- **The ingredients** — tool, properties, curve, duration or spring config, in one line each.
|
|
197
|
+
- **What to feel-check** — if the result depends on feel you can't judge from code (a crossfade, a spring's bounce, the opacity/height balance in an entering list), say so and point at the check: play it at 2–5× duration or in the DevTools animation inspector, step it frame by frame, test gestures on a real device, and look again the next day with fresh eyes.
|
|
198
|
+
|
|
199
|
+
Don't pad this into a report. The code is the deliverable.
|
|
200
|
+
|
|
201
|
+
## Tone
|
|
202
|
+
|
|
203
|
+
Opinionated and brief. When the honest answer is "this shouldn't animate," give it — that answer is the reason this skill exists. When feel genuinely can't be settled from code, say so instead of guessing at a value.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Upstream provenance
|
|
2
|
+
|
|
3
|
+
Copied without modification from [`emilkowalski/skills`](https://github.com/emilkowalski/skills/tree/e879241fab3cdb22e8d95587cdbf40b57a88d7da/skills/animate) at commit:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
e879241fab3cdb22e8d95587cdbf40b57a88d7da
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The adjacent `LICENSE` is the byte-identical upstream MIT license retained for this skill.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Emil Kowalski
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-animations
|
|
3
|
+
description: Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Reviewing Animations
|
|
8
|
+
|
|
9
|
+
A specialized review skill. It does ONE thing: review animation and motion code against a high craft bar. It does not write features, fix unrelated bugs, or review non-motion code. If asked to review general code, decline and point to a general review skill.
|
|
10
|
+
|
|
11
|
+
## Operating Posture
|
|
12
|
+
|
|
13
|
+
You are a senior design engineer with a brutal eye for craft. Your bias is toward **motion that feels right**, not motion that merely runs. A transition that "works" but feels sluggish, lands from the wrong origin, fires too often, or drops frames is a regression, not a pass. Default to flagging. Approval is earned, not assumed.
|
|
14
|
+
|
|
15
|
+
The substantive bar comes from Emil Kowalski's animation philosophy (animations.dev). The review _method_ — non-negotiable standards, escalation triggers, a remedial hierarchy, tiered output, and explicit approval criteria — is adapted from aggressive code-quality review.
|
|
16
|
+
|
|
17
|
+
For the full rule catalog (easing curves, duration tables, spring config, gestures, clip-path, performance, a11y), see [STANDARDS.md](STANDARDS.md). Load it whenever a finding needs a precise value or citation.
|
|
18
|
+
|
|
19
|
+
## The Ten Non-Negotiable Standards
|
|
20
|
+
|
|
21
|
+
Every animation in the diff is measured against these. A violation is a finding.
|
|
22
|
+
|
|
23
|
+
1. **Justified motion.** Every animation must answer "why does this animate?" — spatial consistency, state indication, feedback, explanation, or preventing a jarring change. "It looks cool" on a frequently-seen element is a block.
|
|
24
|
+
|
|
25
|
+
2. **Frequency-appropriate.** Match motion to how often it's seen. Keyboard-initiated and 100+/day actions get **no** animation. Tens/day gets reduced motion. Occasional gets standard. Rare/first-time can have delight.
|
|
26
|
+
|
|
27
|
+
3. **Responsive easing.** Entering/exiting elements use `ease-out` or a strong custom curve. `ease-in` on UI is a block — it delays the moment the user watches most. Built-in CSS easings are too weak; expect custom cubic-beziers.
|
|
28
|
+
|
|
29
|
+
4. **Sub-300ms UI.** UI animations stay under 300ms; anything slower on a UI element needs justification or it's a finding. Per-element budgets live in [STANDARDS.md](STANDARDS.md).
|
|
30
|
+
|
|
31
|
+
5. **Origin & physical correctness.** Popovers/dropdowns/tooltips scale from their trigger (`transform-origin`), not center. Never animate from `scale(0)` — start from `scale(0.9–0.97)` + opacity (Modals are exempt — they stay centered.)
|
|
32
|
+
|
|
33
|
+
6. **Interruptibility.** Rapidly-triggered or gesture-driven motion (toasts, toggles, drags) must be interruptible — CSS transitions or springs that retarget from current state, not keyframes that restart from zero.
|
|
34
|
+
|
|
35
|
+
7. **GPU-only properties.** Animate `transform` and `opacity` only. Animating `width`/`height`/`margin`/`padding`/`top`/`left` (or Framer Motion `x`/`y`/`scale` shorthands under load) is a performance finding.
|
|
36
|
+
|
|
37
|
+
8. **Accessibility.** `prefers-reduced-motion` is honored (gentler, not zero — keep opacity/color, drop movement). Hover animations are gated behind `@media (hover: hover) and (pointer: fine)`.
|
|
38
|
+
|
|
39
|
+
9. **Asymmetric enter/exit.** Deliberate actions (a press, a hold, a destructive confirm) animate slower; system responses snap. Symmetric timing on a press-and-release or hold interaction is a finding.
|
|
40
|
+
|
|
41
|
+
10. **Cohesion.** Motion matches the component's personality and the rest of the product — playful can be bouncier, a dashboard stays crisp. Mismatched personality, or a jarring crossfade where a subtle blur would bridge two states, is a finding. When unsure whether motion feels right, the strongest move is often to delete it.
|
|
42
|
+
|
|
43
|
+
## Aggressive Escalation Triggers
|
|
44
|
+
|
|
45
|
+
Flag these on sight, hard:
|
|
46
|
+
|
|
47
|
+
- `transition: all` (unbounded property animation)
|
|
48
|
+
- `scale(0)` or pure-fade entrances with no initial transform
|
|
49
|
+
- `ease-in` on any UI interaction; weak built-in easing on a deliberate animation
|
|
50
|
+
- Animation on a keyboard shortcut, command-palette toggle, or 100+/day action
|
|
51
|
+
- UI duration > 300ms with no stated reason
|
|
52
|
+
- `transform-origin: center` on a trigger-anchored popover/dropdown/tooltip
|
|
53
|
+
- Keyframes on toasts, toggles, or anything added/triggered rapidly
|
|
54
|
+
- Animating layout properties (`width`/`height`/`margin`/`padding`/`top`/`left`)
|
|
55
|
+
- Framer Motion `x`/`y`/`scale` props on motion that runs while the page is busy
|
|
56
|
+
- Updating a CSS variable on a parent to drive a child transform (style recalc storm)
|
|
57
|
+
- Missing `prefers-reduced-motion` handling on movement
|
|
58
|
+
- Ungated `:hover` motion
|
|
59
|
+
- Symmetric enter/exit timing on a press-and-release or hold interaction
|
|
60
|
+
- Everything-at-once entrance where a 30–80ms stagger belongs
|
|
61
|
+
|
|
62
|
+
## Remedial Preference Hierarchy
|
|
63
|
+
|
|
64
|
+
When proposing fixes, prefer earlier moves over later ones:
|
|
65
|
+
|
|
66
|
+
1. **Delete the animation** (high-frequency / no purpose / keyboard-triggered).
|
|
67
|
+
2. **Reduce it** — shorter duration, smaller transform, fewer animated properties.
|
|
68
|
+
3. **Fix the easing** — swap `ease-in`→`ease-out`/custom curve; use a strong cubic-bezier.
|
|
69
|
+
4. **Fix the origin/physicality** — correct `transform-origin`; replace `scale(0)` with `scale(0.95)`+opacity.
|
|
70
|
+
5. **Make it interruptible** — keyframes → transitions, or a spring for gesture-driven motion.
|
|
71
|
+
6. **Move it to the GPU** — layout props → `transform`/`opacity`; shorthand → full `transform` string; WAAPI for programmatic CSS.
|
|
72
|
+
7. **Asymmetric timing** — slow the deliberate phase, snap the response.
|
|
73
|
+
8. **Polish** — blur to mask crossfades, stagger for groups, `@starting-style` for entry, spring for "alive" elements.
|
|
74
|
+
9. **Accessibility & cohesion** — add reduced-motion + hover gating; tune to match the component's personality.
|
|
75
|
+
|
|
76
|
+
## Required Output Format
|
|
77
|
+
|
|
78
|
+
Two parts, in this order.
|
|
79
|
+
|
|
80
|
+
### Part 1 — Findings table (REQUIRED)
|
|
81
|
+
|
|
82
|
+
A single markdown table. One row per issue. Never a "Before:/After:" list.
|
|
83
|
+
|
|
84
|
+
| Before | After | Why |
|
|
85
|
+
| ------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------- |
|
|
86
|
+
| `transition: all 300ms` | `transition: transform 200ms ease-out` | Specify exact properties; `all` animates unintended properties off-GPU |
|
|
87
|
+
| `transform: scale(0)` | `transform: scale(0.95); opacity: 0` | Nothing appears from nothing — `scale(0)` looks like it came from nowhere |
|
|
88
|
+
| `ease-in` on dropdown | `ease-out` + custom curve | `ease-in` delays the moment the user watches most; feels sluggish |
|
|
89
|
+
| `transform-origin: center` on popover | `var(--transform-origin)` (Base UI) | Popovers scale from their trigger, not center (modals are exempt) |
|
|
90
|
+
|
|
91
|
+
### Part 2 — Verdict (REQUIRED)
|
|
92
|
+
|
|
93
|
+
Group remaining commentary by impact tier, highest first. Omit empty tiers.
|
|
94
|
+
|
|
95
|
+
1. **Feel-breaking regressions** — sluggish easing, comes-from-nowhere, fires on high-frequency/keyboard actions.
|
|
96
|
+
2. **Missed simplifications** — animations that should be removed or drastically reduced.
|
|
97
|
+
3. **Performance** — non-GPU properties, dropped-frame risks, recalc storms.
|
|
98
|
+
4. **Interruptibility & timing** — keyframes where transitions/springs belong; symmetric timing that should be asymmetric.
|
|
99
|
+
5. **Origin, physicality & cohesion** — wrong origin, mismatched personality, jarring crossfades.
|
|
100
|
+
6. **Accessibility** — reduced-motion and pointer/hover gating.
|
|
101
|
+
|
|
102
|
+
Close with an explicit decision:
|
|
103
|
+
|
|
104
|
+
- **Block** — any feel-breaking regression, animation on a keyboard/high-frequency action, `scale(0)`/`ease-in` on UI, or a non-GPU animation with an easy GPU fix.
|
|
105
|
+
- **Approve** — no feel-breaking regressions, no obvious motion that should be deleted, durations and easing within bounds, interruptibility handled where needed, reduced-motion respected.
|
|
106
|
+
|
|
107
|
+
Be specific and cite `file:line`. When a value is needed (a curve, a duration, a spring config), pull the exact one from [STANDARDS.md](STANDARDS.md) rather than approximating.
|
|
108
|
+
|
|
109
|
+
## Guidelines
|
|
110
|
+
|
|
111
|
+
- Prefer CSS transitions/`@starting-style`/WAAPI for predetermined motion; JS/springs for dynamic, interruptible, gesture-driven motion.
|
|
112
|
+
- When unsure whether motion feels right, recommend reviewing it in slow motion / frame-by-frame and with fresh eyes the next day rather than guessing.
|
package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Animation Standards Reference
|
|
2
|
+
|
|
3
|
+
The precise values, curves, and rules behind the review. Cite these in findings instead of approximating. Distilled from Emil Kowalski's design engineering philosophy.
|
|
4
|
+
|
|
5
|
+
## Should it animate? (frequency table)
|
|
6
|
+
|
|
7
|
+
| Frequency | Decision |
|
|
8
|
+
| ----------------------------------------------------------- | ---------------------------- |
|
|
9
|
+
| 100+ times/day (keyboard shortcuts, command palette toggle) | No animation. Ever. |
|
|
10
|
+
| Tens of times/day (hover effects, list navigation) | Remove or drastically reduce |
|
|
11
|
+
| Occasional (modals, drawers, toasts) | Standard animation |
|
|
12
|
+
| Rare / first-time (onboarding, feedback, celebrations) | Can add delight |
|
|
13
|
+
|
|
14
|
+
**Never animate keyboard-initiated actions** — they repeat hundreds of times daily; animation makes them feel slow and disconnected. (Raycast has no open/close animation — correct for something used hundreds of times a day.)
|
|
15
|
+
|
|
16
|
+
Valid purposes for motion: spatial consistency, state indication, explanation, feedback, preventing jarring change. "It looks cool" on a frequently-seen element is not valid.
|
|
17
|
+
|
|
18
|
+
## Easing
|
|
19
|
+
|
|
20
|
+
Decision order:
|
|
21
|
+
|
|
22
|
+
- Entering or exiting → **`ease-out`** (starts fast, feels responsive)
|
|
23
|
+
- Moving / morphing on screen → **`ease-in-out`**
|
|
24
|
+
- Hover / color change → **`ease`**
|
|
25
|
+
- Constant motion (marquee, progress) → **`linear`**
|
|
26
|
+
- Default → **`ease-out`**
|
|
27
|
+
|
|
28
|
+
**Never `ease-in` on UI.** It starts slow, delaying the exact moment the user is watching. `ease-out` at 200ms _feels_ faster than `ease-in` at 200ms.
|
|
29
|
+
|
|
30
|
+
Built-in CSS easings are too weak. Use strong custom curves:
|
|
31
|
+
|
|
32
|
+
```css
|
|
33
|
+
--ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out for UI */
|
|
34
|
+
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* strong ease-in-out for on-screen movement */
|
|
35
|
+
--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* iOS-like drawer curve (Ionic) */
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Find curves at [easing.dev](https://easing.dev/) or [easings.co](https://easings.co/) — don't hand-roll from scratch.
|
|
39
|
+
|
|
40
|
+
## Duration
|
|
41
|
+
|
|
42
|
+
| Element | Duration |
|
|
43
|
+
| ------------------------ | ------------- |
|
|
44
|
+
| Button press feedback | 100–160ms |
|
|
45
|
+
| Tooltips, small popovers | 125–200ms |
|
|
46
|
+
| Dropdowns, selects | 150–250ms |
|
|
47
|
+
| Modals, drawers | 200–500ms |
|
|
48
|
+
| Marketing / explanatory | Can be longer |
|
|
49
|
+
|
|
50
|
+
**Rule: UI animations stay under 300ms.** A 180ms dropdown feels more responsive than a 400ms one. Faster spinners make load feel faster (same actual time). Instant tooltips after the first (skip delay + animation) make a toolbar feel faster.
|
|
51
|
+
|
|
52
|
+
## Physicality
|
|
53
|
+
|
|
54
|
+
- **Never `scale(0)`.** Start from `scale(0.9–0.97)` + `opacity: 0`. Nothing in the real world appears from nothing.
|
|
55
|
+
- **Origin-aware popovers.** Scale from the trigger, not center:
|
|
56
|
+
```css
|
|
57
|
+
.popover {
|
|
58
|
+
transform-origin: var(--transform-origin);
|
|
59
|
+
} /* Base UI */
|
|
60
|
+
```
|
|
61
|
+
**Modals are exempt** — they appear centered in the viewport, keep `transform-origin: center`.
|
|
62
|
+
- **Button press feedback.** `transform: scale(0.97)` on `:active`, `transition: transform 160ms ease-out`. Subtle (0.95–0.98). Applies to any pressable element.
|
|
63
|
+
|
|
64
|
+
## Springs
|
|
65
|
+
|
|
66
|
+
Feel natural because they simulate physics; no fixed duration — they settle on parameters. Use for: drag with momentum, "alive" elements (Dynamic Island), interruptible gestures, decorative mouse-tracking.
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
// Apple-style (easier to reason about) — recommended
|
|
70
|
+
{ type: "spring", duration: 0.5, bounce: 0.2 }
|
|
71
|
+
|
|
72
|
+
// Traditional physics (more control)
|
|
73
|
+
{ type: "spring", mass: 1, stiffness: 100, damping: 10 }
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Keep bounce subtle (0.1–0.3); avoid bounce in most UI — reserve for drag-to-dismiss and playful interactions. Springs maintain velocity when interrupted (keyframes restart from zero), so they're ideal for gestures users may reverse mid-motion.
|
|
77
|
+
|
|
78
|
+
Mouse interactions: interpolate with `useSpring` rather than tying value directly to mouse position (direct = artificial, no momentum). Only do this when the motion is decorative.
|
|
79
|
+
|
|
80
|
+
## Interruptibility
|
|
81
|
+
|
|
82
|
+
CSS **transitions** can be interrupted and retargeted mid-animation; **keyframes** restart from zero. For anything triggered rapidly (toasts being added, toggles), transitions are smoother.
|
|
83
|
+
|
|
84
|
+
```css
|
|
85
|
+
/* Interruptible — good for dynamic UI */
|
|
86
|
+
.toast {
|
|
87
|
+
transition: transform 400ms ease;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Not interruptible — avoid for dynamic UI */
|
|
91
|
+
@keyframes slideIn {
|
|
92
|
+
from {
|
|
93
|
+
transform: translateY(100%);
|
|
94
|
+
}
|
|
95
|
+
to {
|
|
96
|
+
transform: translateY(0);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use `@starting-style` for entry without JS:
|
|
102
|
+
|
|
103
|
+
```css
|
|
104
|
+
.toast {
|
|
105
|
+
opacity: 1;
|
|
106
|
+
transform: translateY(0);
|
|
107
|
+
transition:
|
|
108
|
+
opacity 400ms ease,
|
|
109
|
+
transform 400ms ease;
|
|
110
|
+
@starting-style {
|
|
111
|
+
opacity: 0;
|
|
112
|
+
transform: translateY(100%);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Legacy fallback: `useEffect(() => setMounted(true), [])` + `data-mounted` attribute.
|
|
118
|
+
|
|
119
|
+
## Asymmetric timing
|
|
120
|
+
|
|
121
|
+
Slow where the user is deciding, fast where the system responds.
|
|
122
|
+
|
|
123
|
+
```css
|
|
124
|
+
.overlay {
|
|
125
|
+
transition: clip-path 200ms ease-out;
|
|
126
|
+
} /* release: fast */
|
|
127
|
+
.button:active .overlay {
|
|
128
|
+
transition: clip-path 2s linear;
|
|
129
|
+
} /* press: slow, deliberate */
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Performance
|
|
133
|
+
|
|
134
|
+
- **Only animate `transform` and `opacity`** — they skip layout/paint and run on the GPU. `padding`/`margin`/`height`/`width`/`top`/`left` trigger all three rendering steps.
|
|
135
|
+
- **Don't drive child transforms via a CSS variable on the parent** — it recalcs styles for all children. Set `transform` directly on the element.
|
|
136
|
+
```js
|
|
137
|
+
element.style.setProperty("--swipe-amount", `${d}px`); // bad: recalc on all children
|
|
138
|
+
element.style.transform = `translateY(${d}px)`; // good: only this element
|
|
139
|
+
```
|
|
140
|
+
- **Framer Motion shorthands are NOT hardware-accelerated.** `x`/`y`/`scale` run on the main thread via rAF and drop frames under load. Use the full transform string:
|
|
141
|
+
```jsx
|
|
142
|
+
<motion.div animate={{ x: 100 }} /> // drops frames under load
|
|
143
|
+
<motion.div animate={{ transform: "translateX(100px)" }} /> // hardware accelerated
|
|
144
|
+
```
|
|
145
|
+
- **CSS animations beat JS under load** — they run off the main thread; rAF-based animations stutter while the browser loads/scripts/paints. Use CSS for predetermined motion, JS for dynamic/interruptible.
|
|
146
|
+
- **WAAPI** gives JS control with CSS performance (hardware-accelerated, interruptible, no library):
|
|
147
|
+
```js
|
|
148
|
+
element.animate([{ clipPath: "inset(0 0 100% 0)" }, { clipPath: "inset(0 0 0 0)" }], {
|
|
149
|
+
duration: 1000,
|
|
150
|
+
fill: "forwards",
|
|
151
|
+
easing: "cubic-bezier(0.77, 0, 0.175, 1)",
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Transforms & clip-path
|
|
156
|
+
|
|
157
|
+
- **`translate` percentages** are relative to the element's own size — `translateY(100%)` moves by the element's height regardless of dimensions (how Sonner/Vaul position toasts/drawers). Prefer over hardcoded px.
|
|
158
|
+
- **`scale()` scales children too** (font, icons, content) — a feature for press feedback.
|
|
159
|
+
- **3D**: `rotateX/Y` + `transform-style: preserve-3d` for depth/orbit/flip without JS.
|
|
160
|
+
- **`clip-path: inset(t r b l)`** is a powerful animation tool: each value eats in from that side. Uses: reveal-on-scroll (`inset(0 0 100% 0)` → `inset(0 0 0 0)`), hold-to-delete overlay, seamless tab color transitions (duplicate + clip the active copy), comparison sliders.
|
|
161
|
+
|
|
162
|
+
## Gestures & drag
|
|
163
|
+
|
|
164
|
+
- **Momentum dismissal**: don't require crossing a distance threshold — compute velocity (`Math.abs(distance)/elapsedMs`); dismiss if `> ~0.11`. A flick should be enough.
|
|
165
|
+
- **Damping at boundaries**: dragging past a natural edge moves less the further you go (real things slow before stopping).
|
|
166
|
+
- **Pointer capture** once dragging starts, so it continues when the pointer leaves bounds.
|
|
167
|
+
- **Multi-touch protection**: ignore extra touch points after the drag begins (`if (isDragging) return`) — prevents jumps.
|
|
168
|
+
- **Friction over hard stops** — allow over-drag with rising resistance rather than an invisible wall.
|
|
169
|
+
|
|
170
|
+
## Masking imperfect crossfades
|
|
171
|
+
|
|
172
|
+
When a crossfade shows two overlapping states despite tuning easing/duration, add subtle `filter: blur(2px)` during the transition to blend them into one perceived transformation. Keep blur < 20px (heavy blur is expensive, especially Safari).
|
|
173
|
+
|
|
174
|
+
## Stagger
|
|
175
|
+
|
|
176
|
+
Stagger group entrances; 30–80ms between items. Longer delays feel slow. Stagger is decorative — never block interaction while it plays.
|
|
177
|
+
|
|
178
|
+
```css
|
|
179
|
+
.item {
|
|
180
|
+
opacity: 0;
|
|
181
|
+
transform: translateY(8px);
|
|
182
|
+
animation: fadeIn 300ms ease-out forwards;
|
|
183
|
+
}
|
|
184
|
+
.item:nth-child(2) {
|
|
185
|
+
animation-delay: 50ms;
|
|
186
|
+
}
|
|
187
|
+
.item:nth-child(3) {
|
|
188
|
+
animation-delay: 100ms;
|
|
189
|
+
}
|
|
190
|
+
@keyframes fadeIn {
|
|
191
|
+
to {
|
|
192
|
+
opacity: 1;
|
|
193
|
+
transform: translateY(0);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Accessibility
|
|
199
|
+
|
|
200
|
+
```css
|
|
201
|
+
@media (prefers-reduced-motion: reduce) {
|
|
202
|
+
.element {
|
|
203
|
+
animation: fade 0.2s ease;
|
|
204
|
+
} /* keep opacity/color, drop transform-based motion */
|
|
205
|
+
}
|
|
206
|
+
@media (hover: hover) and (pointer: fine) {
|
|
207
|
+
.element:hover {
|
|
208
|
+
transform: scale(1.05);
|
|
209
|
+
} /* gate hover motion — touch fires false hovers on tap */
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
```jsx
|
|
214
|
+
const reduce = useReducedMotion();
|
|
215
|
+
const closedX = reduce ? 0 : "-100%";
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Reduced motion means fewer and gentler animations, not zero — keep transitions that aid comprehension, remove movement/position changes.
|
|
219
|
+
|
|
220
|
+
## Debugging (recommend in reviews when feel is uncertain)
|
|
221
|
+
|
|
222
|
+
- **Slow motion**: bump duration 2–5× or use DevTools animation inspector. Check colors crossfade cleanly, easing doesn't stop abruptly, `transform-origin` is right, coordinated properties stay in sync.
|
|
223
|
+
- **Frame-by-frame**: Chrome DevTools Animations panel reveals timing drift between coordinated properties.
|
|
224
|
+
- **Real devices** for gestures (drawers, swipe) — connect a phone, hit the dev server by IP, use Safari remote devtools.
|
|
225
|
+
- **Fresh eyes next day** — imperfections invisible during development surface later.
|
|
226
|
+
|
|
227
|
+
## Cohesion
|
|
228
|
+
|
|
229
|
+
Match motion to the component's personality: playful can be bouncier; a professional dashboard should be crisp and fast. Sonner feels right partly because easing, duration, design, and even the name are in harmony — slightly slower, `ease` rather than `ease-out`, to feel elegant. Opacity + height in entering/exiting lists is trial and error; there's no formula — adjust until it feels right.
|
package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Upstream provenance
|
|
2
|
+
|
|
3
|
+
Copied without modification from [`emilkowalski/skills`](https://github.com/emilkowalski/skills/tree/e879241fab3cdb22e8d95587cdbf40b57a88d7da/skills/review-animations) at commit:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
e879241fab3cdb22e8d95587cdbf40b57a88d7da
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The adjacent `LICENSE` is the byte-identical upstream MIT license retained for this skill.
|
|
@@ -8,7 +8,11 @@ The required-inner-skills list in canonical [SKILL.md](SKILL.md) is authoritativ
|
|
|
8
8
|
Execute every listed skill; keep this reference focused on sequencing and disclosed rules.
|
|
9
9
|
|
|
10
10
|
- `opensrc` provides source context for installed or external packages
|
|
11
|
-
- scoped `AGENTS.md` files provide per-path skill requirements through
|
|
11
|
+
- scoped `AGENTS.md` files provide per-path skill requirements through one final
|
|
12
|
+
`## Skills` table with `Skill | Exact trigger`; select matching non-phase rows
|
|
13
|
+
and open each selected installed skill's `SKILL.md`, which remains workflow
|
|
14
|
+
authority. Root `AGENTS.md` stays table-free. Phase wrappers remain global
|
|
15
|
+
orchestration entrypoints and are excluded from scoped tables.
|
|
12
16
|
|
|
13
17
|
## Graph map
|
|
14
18
|
|
|
@@ -43,10 +43,12 @@ silently renaming them.
|
|
|
43
43
|
remains step 13.
|
|
44
44
|
7. If readonly discovery has independent code paths, specs, backlog items, external docs, or hypotheses, read and use `$parallel-research` before final task synthesis.
|
|
45
45
|
8. Research with `opensrc path <package>` or `opensrc path <owner>/<repo>` plus primary-source web docs when current behavior matters.
|
|
46
|
-
9. Locate scoped `AGENTS.md` files for every planned task path.
|
|
47
|
-
|
|
48
|
-
triggers match the task,
|
|
49
|
-
|
|
46
|
+
9. Locate scoped `AGENTS.md` files for every planned task path. Scoped guidance
|
|
47
|
+
uses one final `## Skills` table with `Skill | Exact trigger`. Select only
|
|
48
|
+
non-phase rows whose exact triggers match the task, then open each selected
|
|
49
|
+
installed skill's `SKILL.md`; that installed file is workflow authority.
|
|
50
|
+
Root `AGENTS.md` stays table-free. Phase wrappers remain global orchestration
|
|
51
|
+
entrypoints and are excluded from scoped tables.
|
|
50
52
|
10. For every implementation task, convert applicable scoped or named skill
|
|
51
53
|
obligations into `implementation_skill_guidance`; preserve `assigned_skills`
|
|
52
54
|
as planning provenance.
|
|
@@ -76,8 +78,8 @@ silently renaming them.
|
|
|
76
78
|
5. Scan relevant routed learning artifacts before task synthesis when prior bug knowledge, domain behavior, or project conventions could affect the plan.
|
|
77
79
|
6. Resolve each task's scoped guidance from root `AGENTS.md` down to the nearest `AGENTS.md` for its `location`.
|
|
78
80
|
7. Use each task's required skill guidance while shaping its scope, dependencies, validation, RED target, and review mode; do not merely list skills after the plan is written.
|
|
79
|
-
8. Assign each task the deduplicated union of skills whose exact
|
|
80
|
-
|
|
81
|
+
8. Assign each task the deduplicated union of skills whose exact triggers match
|
|
82
|
+
in every touched scope, merging all touched scopes for
|
|
81
83
|
cross-directory tasks.
|
|
82
84
|
9. Build plan-derived worker waves: place every currently unblocked task with
|
|
83
85
|
a disjoint write scope in the same wave. Use a one-task wave only when
|