@punks/cli 3.2.2 → 3.3.1

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.
Files changed (105) hide show
  1. package/AGENTS.md +4 -2
  2. package/README.md +1 -1
  3. package/dist/BASELINE_CHANGELOG.md +56 -0
  4. package/dist/CHANGELOG.md +32 -0
  5. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  6. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +4 -1
  7. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +6 -2
  8. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +32 -0
  9. package/dist/baseline/scaffold-baseline/data/subagents/manifest.mjs +1 -0
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/LICENSE +21 -0
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/RECIPES.md +333 -0
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/SKILL.md +203 -0
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/improve-mobile-frontend/SKILL.md +109 -0
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/improve-mobile-frontend/UPSTREAM.md +5 -0
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md +229 -0
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +36 -3
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  35. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  36. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/RECIPES.md +435 -0
  37. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  38. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  39. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +34 -9
  40. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +18 -11
  41. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  42. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  43. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +9 -2
  44. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +6 -8
  45. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +8 -5
  46. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +29 -14
  47. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +45 -32
  48. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +2 -1
  49. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +86 -12
  50. package/dist/baseline/scaffold-baseline.json +5 -5
  51. package/dist/baseline/scaffold-baseline.tgz +0 -0
  52. package/dist/data/AGENTS.md +1 -1
  53. package/dist/data/subagents/manifest.mjs +1 -0
  54. package/dist/index.js +27 -27
  55. package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  56. package/dist/skills/agnostic/frontend/animate/LICENSE +21 -0
  57. package/dist/skills/agnostic/frontend/animate/RECIPES.md +324 -0
  58. package/dist/skills/agnostic/frontend/animate/SKILL.md +199 -0
  59. package/dist/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  60. package/dist/skills/agnostic/frontend/improve-mobile-frontend/SKILL.md +109 -0
  61. package/dist/skills/agnostic/frontend/improve-mobile-frontend/UPSTREAM.md +5 -0
  62. package/dist/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  63. package/dist/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  64. package/dist/skills/agnostic/frontend/review-animations/STANDARDS.md +187 -0
  65. package/dist/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  66. package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  67. package/dist/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  68. package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  69. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  70. package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +33 -3
  71. package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  72. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  73. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  74. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  75. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  76. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  77. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  78. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  79. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  80. package/dist/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  81. package/dist/skills/frameworks/expo/animate-expo/RECIPES.md +385 -0
  82. package/dist/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  83. package/dist/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  84. package/dist/skills/phases/delivery-phase/phases/review.md +34 -9
  85. package/dist/skills/phases/delivery-phase/phases/router.md +16 -9
  86. package/dist/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  87. package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  88. package/dist/skills/phases/review-phase/phases/retain-report.md +9 -2
  89. package/dist/skills/phases/review-phase/phases/return-route.md +6 -8
  90. package/dist/skills/phases/review-phase/phases/run-review.md +8 -5
  91. package/dist/skills/phases/review-phase/references/durable-report.md +29 -14
  92. package/dist/skills/phases/review-phase/references/state-graph.md +18 -5
  93. package/dist/skills/phases/review-phase/references/targets.md +2 -1
  94. package/dist/skills/phases/review-phase/scripts/review-contract.mjs +91 -11
  95. package/package.json +52 -9
  96. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.test.ts +0 -130
  97. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.test.ts +0 -135
  98. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts +0 -138
  99. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts +0 -135
  100. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.test.ts +0 -875
  101. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.lifecycle.test.ts +0 -205
  102. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.native.test.ts +0 -2765
  103. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +0 -2108
  104. package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +0 -116
  105. 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,109 @@
1
+ ---
2
+ name: improve-mobile-frontend
3
+ description: Improve mobile-web frontend behavior across touch interactions, viewport sizing, safe areas, gesture ownership, browser chrome, and real-device validation. Use when building or reviewing phone-focused web UI, fixing behavior that works in desktop emulation but fails on a phone, or auditing hover, tap, input zoom, pull-to-refresh, carousel, notch, or theme-color defects.
4
+ ---
5
+
6
+ # Improve Mobile Frontend
7
+
8
+ Treat mobile behavior as an interaction contract, not a smaller desktop layout. Inspect the existing viewport metadata, global CSS, interactive controls, and gesture surfaces before changing code. Apply the narrowest rule that fixes the observed behavior and preserves keyboard focus, text selection, scrolling, zoom, and assistive technology.
9
+
10
+ ## Improvement loop
11
+
12
+ 1. Reproduce each defect on its actual interaction path: touch, scroll, focus, rotation, installed-app mode, or browser chrome transition. Record which browser and device state exposes it.
13
+ 2. Map the defect to the rules below. Check existing global and component rules first so the fix extends the current system.
14
+ 3. Implement the smallest scoped change. Global viewport or overscroll rules require a product-level reason; component behavior stays with the component.
15
+ 4. Verify keyboard focus, visible focus indicators, text selection where users need to copy or edit, pinch zoom, screen-reader semantics, vertical scrolling, and reduced-motion behavior remain intact.
16
+ 5. Test the affected path on real iOS and Android hardware when available. Emulation is useful preflight, never final proof. Report the exact devices and browsers tested; name missing hardware proof as a validation gap.
17
+
18
+ Completion means every observed defect has a scoped rule, its accessibility counterchecks pass, and real-device evidence or an explicit evidence gap is recorded.
19
+
20
+ ## Interaction rules
21
+
22
+ ### Hover belongs to hover-capable pointers
23
+
24
+ Touch browsers can synthesize `:hover` after a tap and leave the visual state stuck. Gate hover-only decoration and motion:
25
+
26
+ ```css
27
+ @media (hover: hover) and (pointer: fine) {
28
+ .control:hover {
29
+ /* hover-only feedback */
30
+ }
31
+ }
32
+ ```
33
+
34
+ Keep focus and active feedback outside that query. A keyboard user still needs `:focus-visible`; a touch user still needs immediate pressed feedback.
35
+
36
+ ### Tap feedback should be deliberate
37
+
38
+ Provide feedback on pointer down through `:active`, component state, or an equivalent immediate response. `touch-action: manipulation` suits ordinary buttons and links when double-tap gesture handling is unnecessary:
39
+
40
+ ```css
41
+ .control {
42
+ touch-action: manipulation;
43
+ }
44
+ ```
45
+
46
+ Remove `-webkit-tap-highlight-color` only when the component supplies an equally visible pressed state. Prefer a scoped transparent highlight on those controls; a blanket reset can erase the only tap acknowledgement.
47
+
48
+ ### Viewport height expresses intent
49
+
50
+ Use `100dvh` for app shells that must track the currently visible viewport as browser chrome expands and collapses. Use `100svh` for hero or landing sections that must fit without being hidden when browser chrome is fully visible. Prefer `min-height` over fixed `height` when content may grow, and retain a compatible fallback when the supported browser matrix requires it.
51
+
52
+ ### Inputs remain readable
53
+
54
+ Text inputs, textareas, and selects use a computed font size of at least `16px` on small screens to prevent focus zoom in iOS Safari. Do not disable user zoom to hide this symptom. Preserve labels, focus visibility, error association, and adequate touch targets.
55
+
56
+ ### Scroll ownership is explicit
57
+
58
+ Choose pull-to-refresh and scroll chaining behavior per surface. `overscroll-behavior: none` on `html, body` is appropriate only for an app-like experience that deliberately owns the root gesture and provides any needed refresh affordance. Prefer `contain` or a scoped scroll container when only a modal, sheet, map, or feed must stop chaining. Content sites normally retain native page scrolling and refresh.
59
+
60
+ For a horizontal carousel or swipe surface, declare vertical-page ownership explicitly:
61
+
62
+ ```css
63
+ .carousel-gesture-surface {
64
+ touch-action: pan-y;
65
+ }
66
+ ```
67
+
68
+ The gesture implementation then owns horizontal movement while the browser keeps vertical scrolling. Apply the rule only to the actual gesture surface, and keep controls inside it operable by keyboard and assistive technology.
69
+
70
+ ### Selection stays available where meaningful
71
+
72
+ `user-select: none` may prevent accidental long-press selection on button-like controls or drag handles. Scope it to those controls. Text, editable content, code, identifiers, and other copyable information retain selection; native semantic controls are preferred over making arbitrary text behave like a button.
73
+
74
+ ## Device integration
75
+
76
+ ### Safe areas
77
+
78
+ Use `viewport-fit=cover` only with safe-area compensation. Apply `env(safe-area-inset-top)`, `-right`, `-bottom`, and `-left` to the edge-owning shell or fixed chrome, usually in addition to its normal spacing:
79
+
80
+ ```css
81
+ .app-shell {
82
+ padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
83
+ }
84
+ ```
85
+
86
+ Do not add safe-area padding indiscriminately to every nested container. Verify portrait, landscape, keyboard-open, and installed-app states so content neither collides with a cutout nor receives doubled spacing.
87
+
88
+ ### Browser chrome color
89
+
90
+ Provide `theme-color` for each supported color scheme so browser chrome matches the page:
91
+
92
+ ```html
93
+ <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)" />
94
+ <meta name="theme-color" content="#0b0b0b" media="(prefers-color-scheme: dark)" />
95
+ ```
96
+
97
+ Keep these values aligned with the actual surface colors and any framework metadata API. Verify browsers that ignore `media` still receive a sensible default.
98
+
99
+ ## Delivery evidence
100
+
101
+ Report:
102
+
103
+ - defects fixed and the scope chosen for each rule;
104
+ - preserved focus, zoom, selection, and scroll behavior;
105
+ - viewport, orientation, and browser-chrome states exercised;
106
+ - real device, OS, and browser versions tested;
107
+ - remaining device or browser coverage gaps.
108
+
109
+ See [UPSTREAM.md](UPSTREAM.md) for source attribution.
@@ -0,0 +1,5 @@
1
+ # Source attribution
2
+
3
+ This skill is an original, implementation-focused adaptation of mobile-web guidance attributed to Emil Kowalski in an image supplied by the user on 2026-08-19. The supplied image pairs common phone-browser defects with remedies covering hover capability queries, tap highlighting, dynamic and small viewport units, input font sizing, touch feedback, overscroll, safe areas, selection, carousel gesture ownership, theme colors, and real-hardware testing.
4
+
5
+ No canonical publication URL or source repository was supplied. The guidance was rewritten, expanded with accessibility and scoping constraints, and is not represented as a byte-identical upstream work.
@@ -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.