@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.
Files changed (98) hide show
  1. package/AGENTS.md +1 -1
  2. package/dist/BASELINE_CHANGELOG.md +43 -0
  3. package/dist/CHANGELOG.md +24 -0
  4. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  5. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +4 -1
  6. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +5 -2
  7. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +24 -0
  8. package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  9. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/LICENSE +21 -0
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/RECIPES.md +333 -0
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/SKILL.md +203 -0
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md +229 -0
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +36 -3
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  31. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  32. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/RECIPES.md +435 -0
  33. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  34. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  35. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +34 -9
  36. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +18 -11
  37. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  38. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  39. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +9 -2
  40. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +6 -8
  41. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +8 -5
  42. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +29 -14
  43. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +45 -32
  44. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +2 -1
  45. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +86 -12
  46. package/dist/baseline/scaffold-baseline.json +5 -5
  47. package/dist/baseline/scaffold-baseline.tgz +0 -0
  48. package/dist/data/AGENTS.md +1 -1
  49. package/dist/index.js +10 -10
  50. package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  51. package/dist/skills/agnostic/frontend/animate/LICENSE +21 -0
  52. package/dist/skills/agnostic/frontend/animate/RECIPES.md +324 -0
  53. package/dist/skills/agnostic/frontend/animate/SKILL.md +199 -0
  54. package/dist/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  55. package/dist/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  56. package/dist/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  57. package/dist/skills/agnostic/frontend/review-animations/STANDARDS.md +187 -0
  58. package/dist/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  59. package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  60. package/dist/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  61. package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  62. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  63. package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +33 -3
  64. package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  65. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  66. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  67. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  68. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  69. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  70. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  71. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  72. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  73. package/dist/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  74. package/dist/skills/frameworks/expo/animate-expo/RECIPES.md +385 -0
  75. package/dist/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  76. package/dist/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  77. package/dist/skills/phases/delivery-phase/phases/review.md +34 -9
  78. package/dist/skills/phases/delivery-phase/phases/router.md +16 -9
  79. package/dist/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  80. package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  81. package/dist/skills/phases/review-phase/phases/retain-report.md +9 -2
  82. package/dist/skills/phases/review-phase/phases/return-route.md +6 -8
  83. package/dist/skills/phases/review-phase/phases/run-review.md +8 -5
  84. package/dist/skills/phases/review-phase/references/durable-report.md +29 -14
  85. package/dist/skills/phases/review-phase/references/state-graph.md +18 -5
  86. package/dist/skills/phases/review-phase/references/targets.md +2 -1
  87. package/dist/skills/phases/review-phase/scripts/review-contract.mjs +91 -11
  88. package/package.json +52 -9
  89. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.test.ts +0 -130
  90. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.test.ts +0 -135
  91. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts +0 -138
  92. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts +0 -135
  93. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.test.ts +0 -875
  94. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.lifecycle.test.ts +0 -205
  95. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.native.test.ts +0 -2765
  96. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +0 -2108
  97. package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +0 -116
  98. package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +0 -29
@@ -0,0 +1,255 @@
1
+ ---
2
+ name: animate-expo
3
+ description: Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use `animate`.
4
+ ---
5
+
6
+ # Building Animations in Expo
7
+
8
+ A construction skill for React Native. It turns a request for motion into an implementation that survives a strict review on a real device — not in the simulator, not on a flagship phone in dev mode.
9
+
10
+ Mobile changes three things about animation, and everything in this skill follows from them:
11
+
12
+ 1. **There is no hover.** Every affordance the web puts in hover has to live in press, position, or nothing.
13
+ 2. **There are two runtimes.** Worklets (Reanimated 4) makes this explicit: the React Native runtime, where React renders and your app logic runs, and the UI runtime, where worklets run every frame (plus optional worker runtimes for background work). An animation that touches the RN runtime stutters the moment the app does anything else. The whole craft is keeping motion on the UI runtime.
14
+ 3. **The user's finger is on the element.** Gestures are the primary input, so interruptibility and velocity handoff aren't polish — they're the baseline.
15
+
16
+ ## Operating Posture
17
+
18
+ You are a senior mobile engineer building the animation yourself. Make the call, state the reasoning in one line, write the code. Never present motion options as a menu.
19
+
20
+ Two failure modes, and the first is worse:
21
+
22
+ 1. **Animating something that shouldn't animate.** The gate below exists to produce zero lines of code sometimes.
23
+ 2. **Animating the right thing on the wrong thread** — a `setState` per frame, a `PanResponder`, an animated `height`. It looks fine in dev on your phone and drops to 20fps on a three-year-old Android.
24
+
25
+ ## Hard Rules
26
+
27
+ 1. **Run the sequence in order.** Steps 1 and 2 gate everything.
28
+ 2. **Reanimated, not core `Animated`.** Core `Animated` can't be driven by a gesture without crossing the bridge, and `useNativeDriver` refuses anything but transform and opacity anyway. Reanimated worklets run on the UI thread and keep running while JS is busy.
29
+ 3. **No approximated values.** Curves and spring configs come from the tables below.
30
+ 4. **Reduced motion ships with the animation**, not as a follow-up.
31
+ 5. **Feel is judged on a release build on the slowest device you support.** Nothing else counts as verified.
32
+
33
+ ## The Build Sequence
34
+
35
+ ### 1. Should this animate at all?
36
+
37
+ | Frequency | Decision |
38
+ | --- | --- |
39
+ | 100+ times/day — tab switches, keyboard open/close, scrolling, toggles in settings | **No animation.** Platform default or nothing. Stop here. |
40
+ | Tens of times/day — press feedback, list navigation, row selection | Near-imperceptible only: under 150ms, or nothing |
41
+ | Occasional — sheets, modals, toasts, onboarding steps | Standard animation |
42
+ | Rare / first-time — success states, empty-state illustrations, celebration | The delight budget lives here |
43
+
44
+ **Tab switches never slide.** Tabs are peers, not a hierarchy — sliding implies depth that isn't there, and the user pays for it dozens of times a session. `animation: 'none'`.
45
+
46
+ If the request fails this gate, say so and don't write it.
47
+
48
+ ### 2. What is the purpose?
49
+
50
+ Name it in one word before continuing: **feedback**, **spatial consistency**, **state indication**, **preventing a jarring change**, **explanation**, or **delight** (rare tier only).
51
+
52
+ Can't name it? Don't build it.
53
+
54
+ ### 3. Pick the tool — cheapest that works
55
+
56
+ Walk down; stop at the first that fits.
57
+
58
+ | Need | Tool |
59
+ | --- | --- |
60
+ | A state-driven change with no gesture — press, toggle, color, a value flipping | **Reanimated CSS transition** (`transitionProperty` in the style) |
61
+ | Loop, multi-stage, or plays on mount with no state change | **Reanimated CSS animation** (`animationName` keyframes) |
62
+ | An element mounting or unmounting, or a list reflowing | **Layout animations** (`entering` / `exiting` / `itemLayoutAnimation`) |
63
+ | Anything a finger touches, or anything derived from scroll | **`useSharedValue` + `Gesture` + `useAnimatedStyle`** |
64
+ | Screen to screen | **Native stack options in Expo Router.** Never hand-roll this |
65
+ | A bottom sheet that is its own screen | **`presentation: 'formSheet'`** — it's a real UISheetPresentationController, free and correct |
66
+ | Tab bar | **`NativeTabs`** (from `expo-router/unstable-native-tabs`) — the platform's real tab bar, its behaviors and transitions included |
67
+ | Context menu, press-and-hold preview | **`Link.Menu` / `Link.Preview`** (Expo Router, iOS-only) — native menus and peek, never rebuilt in JS |
68
+ | Header that collapses into a large title | **`headerLargeTitleEnabled`** on the native stack (iOS-only; `headerLargeTitle` is deprecated) — not a scroll worklet |
69
+ | Pull to refresh | **`RefreshControl`** — hand-roll only when it's a signature interaction (see the threshold recipe) |
70
+ | UI that tracks the keyboard | **`react-native-keyboard-controller`** — the keyboard's real position, frame by frame, on the UI thread |
71
+ | Vector illustration, celebration, empty state | **Lottie** — for illustration only, never for UI state |
72
+ | A huge animated scene, freeform drawing | **`@shopify/react-native-skia`** — a canvas, for when the view hierarchy itself is the bottleneck |
73
+
74
+ Reach for a shared value only when the value is continuous or interruptible. A press scale is a CSS transition; a drag is a shared value. Using a worklet for a two-state toggle is the mobile equivalent of installing a motion library for a fade.
75
+
76
+ **Dependencies.** Install with `npx expo install <package>` — it resolves the version that matches the project's SDK, which plain `npm install` won't:
77
+
78
+ | Need | Package |
79
+ | --- | --- |
80
+ | Animation | `react-native-reanimated` + `react-native-worklets` |
81
+ | Gestures | `react-native-gesture-handler` |
82
+ | Navigation, sheets, native tabs, menus | `expo-router` |
83
+ | Haptics | `expo-haptics` |
84
+ | Keyboard-following UI | `react-native-keyboard-controller` (needs `KeyboardProvider` at the root — see the keyboard recipe) |
85
+ | Illustration, celebration | `lottie-react-native` |
86
+ | Very large animated scenes, custom drawing | `@shopify/react-native-skia` |
87
+
88
+ ### 4. Pick the properties
89
+
90
+ - **`transform` and `opacity` are free.** Everything else is a layout pass. `width`, `height`, `margin`, `padding`, `flex`, `top`, `left`, `gap` re-run Yoga on every frame for that node *and its siblings*.
91
+ - **The one exception: an absolutely positioned element with no children** — a tab pill, a progress bar fill. It's out of flow, so nothing else re-lays-out, and animating `width` keeps the corner radius that `scaleX` would smear.
92
+ - **Never `scale(0)`.** Start from `scale(0.9–0.97)` + `opacity: 0`. Nothing in the real world appears from nothing.
93
+ - **`transform` is an array and order matters** — `[{ translateY }, { scale }]` scales after moving; reversed, the translate gets scaled too. Keep translate first unless you want the multiplication.
94
+ - **Android shadows are `elevation`, and animating elevation re-renders the shadow every frame.** Animate opacity of a pre-shadowed layer instead.
95
+ - **Never animate `BlurView` intensity.** On Android it re-renders the blur each frame. Crossfade the opacity of a static `BlurView` instead.
96
+ - **Percentages work in `translate`** and are relative to the element's own size — `translateY('100%')` moves a sheet by its own height whatever its content.
97
+
98
+ ### 5. Timing or spring
99
+
100
+ **If a finger was involved, use a spring.** Springs carry velocity through an interruption; timing curves restart. Everything else uses timing.
101
+
102
+ Reanimated's spring takes Apple's two designer parameters directly — use this form, not mass/stiffness/damping:
103
+
104
+ | Interaction | Config |
105
+ | --- | --- |
106
+ | Default settle, no overshoot | `{ duration: 400, dampingRatio: 1 }` |
107
+ | Reposition / snap back after a drag | `{ duration: 400, dampingRatio: 0.8, velocity }` |
108
+ | Sheet, drawer | `{ duration: 300, dampingRatio: 0.8, velocity }` |
109
+ | Must not pass a hard edge | add `overshootClamping: true` |
110
+
111
+ **Bounce only when the gesture carried momentum.** Overshoot on a menu that faded in feels wrong; overshoot on a card you flicked feels right.
112
+
113
+ **Easing**, for everything without a finger on it:
114
+
115
+ | Situation | Easing |
116
+ | --- | --- |
117
+ | Entering or exiting | `ease-out` |
118
+ | Moving / morphing on screen | `ease-in-out` |
119
+ | Constant motion (progress, marquee) | `linear` |
120
+ | Default | `ease-out` |
121
+
122
+ **Never `ease-in` on UI.** It starts slow, delaying the exact moment the user is watching. Reanimated's built-ins are as weak as CSS's — use these:
123
+
124
+ ```js
125
+ import { Easing } from 'react-native-reanimated';
126
+
127
+ const EASE_OUT = Easing.bezier(0.23, 1, 0.32, 1); // strong ease-out for UI
128
+ const EASE_IN_OUT = Easing.bezier(0.77, 0, 0.175, 1); // on-screen movement
129
+ const EASE_SHEET = Easing.bezier(0.32, 0.72, 0, 1); // iOS sheet curve
130
+ ```
131
+
132
+ **Duration:**
133
+
134
+ | Element | Duration |
135
+ | --- | --- |
136
+ | Press feedback | 100–150ms |
137
+ | Toggle, chip, small state change | 150–200ms |
138
+ | Sheet, modal, drawer | spring, ~300ms perceived |
139
+ | Screen transition | the platform default — don't override it |
140
+
141
+ Mobile UI animations stay under 300ms, same as web. The platform's own transitions are longer (iOS push is 350ms); match the platform for navigation, beat it everywhere else.
142
+
143
+ ### 6. Keep it off the JS thread
144
+
145
+ This is the mobile-specific craft, and it's where most React Native motion dies.
146
+
147
+ - **Never `setState` from a gesture or scroll handler.** One React render per frame is the single biggest cause of jank in RN apps. Shared value → `useAnimatedStyle`, and React never re-renders at all.
148
+ - **Never schedule back to the RN runtime inside `onUpdate` or a scroll handler.** `scheduleOnRN(fn, ...args)` from `react-native-worklets` — the Reanimated 4 replacement for the deprecated `runOnJS(fn)(...args)` — queues an RN-runtime call, and in `onUpdate` that's 60–120× per second. It belongs in `onEnd`, or in a `useAnimatedReaction` that fires when a value crosses a threshold.
149
+ - **Never read a shared value during render** (`translateY.get()` in JSX). It's a snapshot that never updates and it silently desyncs. **Never write one during render either** — it fires mid-reconciliation, and a re-render you didn't cause replays the write. Touch shared values only in worklets, handlers, and effects.
150
+ - **Use `.get()` / `.set()`, not `.value`.** Same API, but direct `.value` access is the form the React Compiler can't see through — the Reanimated docs call `get`/`set` the compiler-safe way. `set` also takes a functional update: `sv.set((v) => v + 1)`.
151
+ - **Functions called from a worklet need `'worklet'`** as their first line, or they throw at runtime on device while working fine in the debugger.
152
+
153
+ ### 7. Press, not hover
154
+
155
+ Every hover affordance from the web has to be redesigned, not ported.
156
+
157
+ - **Feedback on press-in, commit on press-out.** Waiting for the tap to complete before showing anything feels dead — this is the latency the user actually perceives.
158
+ - **`scale: 0.97` in 100–150ms** on any pressable, `Pressable` + a CSS transition. `scale` takes the label and icons with it, which is what makes it read as physical.
159
+ - **44×44pt minimum touch target** (48dp Android). If the visual is smaller, add `hitSlop` — don't grow the visual.
160
+ - **`pressRetentionOffset`** so a finger drifting a few pixels doesn't cancel a press the user meant.
161
+ - **Android ripple only in a Material-styled app.** In a custom-designed app, the same scale on both platforms is more coherent than a ripple on one.
162
+
163
+ ### 8. Haptics
164
+
165
+ Mobile has a sense the web doesn't. Use it sparingly and it becomes the thing that makes the app feel expensive; use it everywhere and users turn it off.
166
+
167
+ | Moment | Call |
168
+ | --- | --- |
169
+ | A value ticks past a step — picker, slider detent, segmented control | `Haptics.selectionAsync()` |
170
+ | Something snaps home, a sheet detent catches, a drag commits | `Haptics.impactAsync(ImpactFeedbackStyle.Light)` |
171
+ | A heavy object lands, a destructive action fires | `Haptics.impactAsync(ImpactFeedbackStyle.Medium)` |
172
+ | Operation succeeded or failed | `Haptics.notificationAsync(NotificationFeedbackType.Success / Error)` |
173
+
174
+ Three rules, and they're absolute:
175
+
176
+ - **Same frame as the visual.** A haptic that lags its animation reads as a glitch, not as feedback. Fire it at the causal moment — the detent catching — not when the animation finishes.
177
+ - **One per user action.** Never on scroll, never per frame, never on an entrance animation the user didn't cause.
178
+ - **Never the only feedback.** Haptics are off system-wide for many users, and silent on most Android hardware. The visual has to stand alone.
179
+
180
+ From a worklet, haptics must be scheduled back to the RN runtime: `scheduleOnRN(Haptics.selectionAsync)`.
181
+
182
+ ### 9. Reduced motion and accessibility
183
+
184
+ ```jsx
185
+ import { useReducedMotion, ReduceMotion, withSpring } from 'react-native-reanimated';
186
+
187
+ const reduced = useReducedMotion();
188
+ const y = useSharedValue(reduced ? 0 : SHEET_HEIGHT);
189
+
190
+ // or let each animation decide
191
+ withSpring(0, { duration: 300, dampingRatio: 0.8, reduceMotion: ReduceMotion.System });
192
+ ```
193
+
194
+ Reduced motion means **fewer and gentler**, not zero: keep opacity and color changes that explain a state change, drop translation, scale, parallax and overshoot. Screen transitions become `animation: 'fade'`.
195
+
196
+ **Text scales.** `allowFontScaling` is on by default, so any height you measured at default type size is wrong at 200%. Never animate to a hardcoded height — measure with `onLayout`, or animate a transform instead.
197
+
198
+ ## Setup that silently breaks motion
199
+
200
+ Check these first when "the animation just doesn't run":
201
+
202
+ - Install through Expo so versions match the SDK: `npx expo install react-native-reanimated react-native-worklets`. In an Expo project, `babel-preset-expo` configures the worklets Babel plugin automatically — no `babel.config.js` step. Only a bare RN project without that preset adds the plugin manually, and there it must be last in the list. A missing or misplaced plugin doesn't silently fall back anymore — it throws `Failed to create a worklet` at runtime.
203
+ - `GestureHandlerRootView` must wrap the app, or gestures do nothing with no error.
204
+ - Reanimated 4 requires the New Architecture.
205
+ - **Expo Go is not a performance environment.** Judge feel in a release build; a dev build's JS thread is slow enough to hide exactly the problems you're looking for.
206
+
207
+ ## 120fps
208
+
209
+ On ProMotion iPhones, third-party animations are capped at 60fps unless `CADisableMinimumFrameDurationOnPhone` is set. Recent Expo SDKs set it by default — confirm it's there, and add it if not:
210
+
211
+ ```json
212
+ { "expo": { "ios": { "infoPlist": { "CADisableMinimumFrameDurationOnPhone": true } } } }
213
+ ```
214
+
215
+ Then the frame budget is 8ms, not 16. This is also why a UI-thread animation matters more on mobile than it does on web.
216
+
217
+ ## Recipes
218
+
219
+ For ready-to-build implementations — press feedback, drag-to-dismiss sheet, swipe-to-delete, collapsing header, list entrances, keyboard-synced UI, tab indicator, screen transitions — see [RECIPES.md](RECIPES.md). Load it whenever the request matches one; start from the recipe rather than from a blank file.
220
+
221
+ ## Never Ship
222
+
223
+ | Never | Instead |
224
+ | --- | --- |
225
+ | `PanResponder` | `Gesture.Pan()` from gesture-handler |
226
+ | `setState` in a gesture or scroll handler | shared value + `useAnimatedStyle` |
227
+ | `runOnJS` (deprecated in Reanimated 4) | `scheduleOnRN` from `react-native-worklets` |
228
+ | `scheduleOnRN` per frame | `onEnd`, or `useAnimatedReaction` at a threshold |
229
+ | Reading or writing a shared value during render | `.get()` / `.set()` in worklets, handlers, effects |
230
+ | Core `Animated` for anything a finger touches | Reanimated |
231
+ | Animating `height` / `width` / `margin` / `flex` / `top` | `transform` + `opacity` (absolute, childless elements exempt) |
232
+ | Animating `BlurView` intensity or Android `elevation` | crossfade a static layer |
233
+ | `entering` on a virtualized list row | animate the container, or `itemLayoutAnimation` |
234
+ | A screen transition rebuilt in JS | native stack `animation` |
235
+ | Sliding between tabs | `animation: 'none'` |
236
+ | `Easing.in(...)` on a UI element | `Easing.bezier(0.23, 1, 0.32, 1)` |
237
+ | `scale(0)` entrance | `scale(0.95)` + `opacity: 0` |
238
+ | Distance-only dismissal threshold | velocity **or** distance — a flick is enough |
239
+ | Hard stop at a boundary | rubber-band resistance |
240
+ | A haptic per frame, or as the only feedback | one per commit, always paired with a visual |
241
+ | Judging feel in Expo Go or the simulator | release build, slowest supported device |
242
+
243
+ ## Output
244
+
245
+ Write the code. Then, in at most a few lines:
246
+
247
+ - **The gate result** — frequency tier and named purpose. Say what you rejected and why.
248
+ - **The ingredients** — tool, properties, spring or curve + duration, thread.
249
+ - **What to feel-check on device** — gestures, velocity handoff and haptic timing cannot be judged from code. Name what to try: flick it, interrupt it mid-flight, reverse it, run it on the slowest Android you have.
250
+
251
+ The code is the deliverable. Don't pad it into a report.
252
+
253
+ ## Tone
254
+
255
+ Opinionated and brief. When the honest answer is "this shouldn't animate," or "this needs a real device before I can tell you if it's right," give it.
@@ -0,0 +1,9 @@
1
+ # Upstream provenance
2
+
3
+ Copied without modification from [`emilkowalski/skills`](https://github.com/emilkowalski/skills/tree/e879241fab3cdb22e8d95587cdbf40b57a88d7da/skills/animate-expo) at commit:
4
+
5
+ ```text
6
+ e879241fab3cdb22e8d95587cdbf40b57a88d7da
7
+ ```
8
+
9
+ The adjacent `LICENSE` is the byte-identical upstream MIT license retained for this skill.
@@ -30,17 +30,42 @@ resumes without rerunning lenses.
30
30
 
31
31
  After the retained report establishes the completed ordinal:
32
32
 
33
- 1. Runtime evidence routes primarily to debugging.
34
- 2. Otherwise, an in-scope non-runtime blocker routes primarily to implementation.
35
- 3. Otherwise, broad architecture debt routes to debt follow-up.
36
- 4. Otherwise, route to docs ingest or closeout by documentation completeness.
33
+ 1. Recompute aggregate routing from every finding's validated `return_route`
34
+ with the review contract helper. Reject a mismatch with the retained routing
35
+ object.
36
+ 2. When `secondary_architecture_follow_up` is true, enter `debt_follow_up`
37
+ first and persist the primary `debugging` or `implementation` route as
38
+ `post_debt_route`.
39
+ 3. Without secondary debt, `debugging` opens debugging and `implementation`
40
+ opens implementation.
41
+ 4. Primary `debt_follow_up` enters debt capture with `post_debt_route` set to
42
+ `docs_ingest` when documentation remains, otherwise `closeout`.
43
+ 5. `docs_ingest` enters docs ingest. `closeout` enters closeout.
37
44
 
38
45
  Architecture debt may remain a secondary follow-up beside debugging or
39
- implementation. Opening either repair route is one atomic durable handoff write
40
- of active state, route, `repair_count = review_count`, and idempotency
41
- `review_run_id`. Reject a mismatched or already-consumed repair ordinal.
42
- Complete the transition only after that write. Resume an already-recorded run
43
- directly without another increment.
46
+ implementation. Open its repair only after debt capture. Opening either repair
47
+ route is one atomic durable handoff write of active state, route,
48
+ `repair_count = review_count`, and idempotency `review_run_id`. Reject a
49
+ mismatched or already-consumed repair ordinal. Complete the transition only
50
+ after that write. Resume an already-recorded run directly without another
51
+ increment.
52
+
53
+ ## Capture Debt Follow-Up
54
+
55
+ For each primary or secondary debt finding, enter `debt_follow_up` and upsert a
56
+ goal/spec-linked debt artifact exactly once. Key each entry by retained report
57
+ commit, retained report path, and stable finding ID. Persist the artifact path,
58
+ keys, captured finding IDs, and `post_debt_route` in the review handoff before
59
+ leaving this state. Set `post_debt_route` to the higher-priority `debugging` or
60
+ `implementation` route for secondary debt. For primary debt, set it to
61
+ `docs_ingest` when required documentation remains, otherwise `closeout`. On
62
+ resume, reuse matching keys, add only missing entries, and follow the recorded
63
+ route after every key is present.
64
+
65
+ Debt capture records unaccepted work; it does not implement the debt or open an
66
+ implementation task. Primary capture resumes `docs_ingest` or `closeout`;
67
+ secondary capture resumes its recorded repair. Capture happens once before that
68
+ route.
44
69
 
45
70
  ## Completion
46
71
 
@@ -33,24 +33,31 @@ state take precedence over inferred artifact order.
33
33
  6. Resume an atomic handoff already in `debug_active` through [debug.md](debug.md)
34
34
  or `repair_active` through [implement.md](implement.md). A recorded
35
35
  `review_run_id` cannot increment `repair_count` again.
36
- 7. Route `focused_validation` to its recorded implementation or debugging owner.
36
+ 7. Resume `debt_follow_up` through [review.md](review.md). Its handler reuses or
37
+ records the goal/spec-linked debt artifact, then follows durable
38
+ `post_debt_route`: `debugging` or `implementation` for secondary debt;
39
+ `docs_ingest` or `closeout` for primary debt. It never implements the debt.
40
+ 8. Route `focused_validation` to its recorded implementation or debugging owner.
37
41
  Passing becomes `clean_handoff`; failure remains repair epoch 3.
38
- 8. Route `clean_handoff` to [docs-ingest.md](docs-ingest.md) when docs remain,
42
+ 9. Route `clean_handoff` to [docs-ingest.md](docs-ingest.md) when docs remain,
39
43
  otherwise [closeout.md](closeout.md).
40
- 9. If no matching agent-ready `SPEC.md` exists, it is stale, contradictory, or
44
+ 10. For durable `docs_ingest`, load [docs-ingest.md](docs-ingest.md).
45
+ 11. For durable `closeout`, load [closeout.md](closeout.md).
46
+ 12. If no matching agent-ready `SPEC.md` exists, it is stale, contradictory, or
41
47
  incomplete, or its remote retention or stable blob URL is missing or
42
48
  unverified, load [spec.md](spec.md).
43
- 10. If the verified post-spec backlog projection is missing or stale, load
49
+ 13. If the verified post-spec backlog projection is missing or stale, load
44
50
  [backlog.md](backlog.md).
45
- 11. If no execution-ready matching plan exists, or it lacks dependencies, owned
51
+ 14. If no execution-ready matching plan exists, or it lacks dependencies, owned
46
52
  paths, validation gates, or wave boundaries, load [plan.md](plan.md).
47
- 12. If accepted plan work is incomplete, load [implement.md](implement.md).
48
- 13. If implementation exists and its retained review is missing or stale, load
53
+ 15. If accepted plan work is incomplete, load [implement.md](implement.md).
54
+ 16. If implementation exists and its retained review is missing or stale, load
49
55
  [review.md](review.md). That phase validates accepted bounds and normalizes a
50
56
  supported target before any delivery-budget evaluation, then returns either
51
57
  `review_failed`, `review_budget_exhausted`, or a valid `$review-phase`
52
- context. Full delivery consumes that context immediately; other modes stop.
53
- 14. Route remaining docs-affecting work to [docs-ingest.md](docs-ingest.md),
58
+ context. Full delivery consumes that context immediately; other modes
59
+ return the exact explicit invocation context and stop.
60
+ 17. Route remaining docs-affecting work to [docs-ingest.md](docs-ingest.md),
54
61
  otherwise [closeout.md](closeout.md).
55
62
 
56
63
  Only an explicitly new delivery goal with materially changed accepted bounds
@@ -30,14 +30,19 @@ accepted_bounds_identity:
30
30
  accepted_bounds_hash:
31
31
  review_lineage_id:
32
32
  review_run_id:
33
- state: review_due | review_running | report_retention_pending | review_routed | debug_active | repair_active | focused_validation | clean_handoff
33
+ state: review_due | review_running | report_retention_pending | review_routed | debt_follow_up | debug_active | repair_active | focused_validation | docs_ingest | closeout | clean_handoff
34
34
  primary_route:
35
+ secondary_architecture_follow_up:
36
+ post_debt_route:
35
37
  review_count:
36
38
  repair_count:
37
39
  authoritative_report_path:
38
40
  authoritative_report_commit:
39
41
  verified_retained_ref:
40
42
  stable_finding_ids:
43
+ debt_follow_up_artifact:
44
+ debt_follow_up_keys:
45
+ captured_debt_finding_ids:
41
46
  ```
42
47
 
43
48
  `review_count` is a projection of the highest valid retained report ordinal for
@@ -46,6 +51,19 @@ writes active state, primary route, `repair_count = review_count`, and
46
51
  idempotency `review_run_id`; complete the transition only after the write. A
47
52
  recorded run id resumes its state without increment or guard fallthrough.
48
53
 
54
+ Each debt follow-up key is the tuple of authoritative report commit,
55
+ authoritative report path, and stable finding ID. The debt artifact links the
56
+ delivery goal and accepted Spec, records those keys, and lives outside the
57
+ immutable report. Replaying a recorded key reuses the existing entry. It never
58
+ opens implementation work for unaccepted debt.
59
+
60
+ `post_debt_route` is durable before debt capture starts. It is `debugging` or
61
+ `implementation` for secondary debt, and `docs_ingest` or `closeout` for
62
+ primary debt after capture. Resume follows this field after every debt key is
63
+ present. For primary debt, the successful capture transition atomically records
64
+ every debt key and sets state = `post_debt_route`. Resume continues from the
65
+ recorded `docs_ingest` or `closeout` state without repeating capture.
66
+
49
67
  ## Review Invocation Context
50
68
 
51
69
  Delivery persists this block for `review_due`:
@@ -3,6 +3,10 @@
3
3
  This is the graph-authoring record. It is separate from review runtime
4
4
  handoffs, retained reports, and delivery handoffs.
5
5
 
6
+ Test references below are source-repository provenance. The installed package
7
+ omits the source repository test files; reproduce a claim from the immutable
8
+ source commit with its named command and contract seam.
9
+
6
10
  ## Router Selection
7
11
 
8
12
  Phase: router
@@ -362,8 +366,8 @@ Artifacts:
362
366
  Validation:
363
367
 
364
368
  - Disclosure completion was durable.
365
- - The focused route contract was observed RED at 16/23: seven assertions still
366
- addressed deleted or relocated authority.
369
+ - The focused route contract was observed RED against deleted or relocated
370
+ authority.
367
371
  - The nine authoring route predictions and runtime storage/no-write cases were
368
372
  not yet executable or recorded, so `test-routes.md` was the single route.
369
373
 
@@ -410,8 +414,8 @@ Validation:
410
414
  - All nine predictions matched derivation; no runtime contract mismatch required
411
415
  repair.
412
416
  - Stale, out-of-scope, and invalid artifact subcases resolve separately.
413
- - The focused suite moved from observed RED 16/23 to GREEN 25/25 after replacing
414
- deleted-root assertions and adding two runtime graph contracts.
417
+ - The focused source contract moved from observed RED to GREEN after replacing
418
+ deleted-root assertions and adding runtime graph contracts.
415
419
  - Router priorities 1-12 cover terminal, checkpoint, blocked, and all four gate
416
420
  outputs. Delivery and standalone storage, conflict, and every declared
417
421
  authoritative no-write class are executable assertions.
@@ -441,7 +445,7 @@ storage modes, no-write outcomes, conflicts, and router classes were tested.
441
445
 
442
446
  Artifacts:
443
447
 
444
- - `tests/review-phase-graph.contract.test.mjs`: 25 focused graph contracts.
448
+ - The canonical source review-graph contract and its named Node command.
445
449
  - `Test Routes Outcome`: nine frozen predictions with nine matching derived
446
450
  routes and zero graph repairs.
447
451
 
@@ -474,8 +478,7 @@ Artifacts:
474
478
 
475
479
  - `SKILL.md`, `agents/openai.yaml`, `phases/router.md`, four flat gate files,
476
480
  four references, and `scripts/review-contract.mjs`.
477
- - `tests/review-phase-graph.contract.test.mjs` and all eight shared
478
- `tests/*.test.mjs` files.
481
+ - The canonical source review-graph contract and shared source contract command.
479
482
 
480
483
  Validation:
481
484
 
@@ -498,7 +501,7 @@ Validation:
498
501
  - The no-op test required zero deletions: each remaining instruction changes
499
502
  invocation, routing, evidence, validation, persistence, or stop behavior.
500
503
  - `SKILL.md` and `agents/openai.yaml` consistently disable implicit invocation.
501
- - Focused tests pass 25/25; all eight shared test files pass 94/94. Both Node
504
+ - The focused and shared source contract commands pass. Both Node
502
505
  files pass syntax checks, and the scoped diff passes `git diff --check`.
503
506
  - The requested literal `python` command is unavailable. The same validator
504
507
  executed through `uv run --with pyyaml python` and failed because
@@ -582,8 +585,8 @@ Artifacts:
582
585
 
583
586
  - `SKILL.md`, `agents/openai.yaml`, `phases/router.md`, four flat gate files,
584
587
  four references, and `scripts/review-contract.mjs`.
585
- - `tests/review-phase-graph.contract.test.mjs`, all eight shared test files,
586
- and the applicable `skills` packaging validator output.
588
+ - The canonical source review-graph and shared contract commands, plus the
589
+ applicable `skills` packaging validator output.
587
590
 
588
591
  Validation:
589
592
 
@@ -601,7 +604,7 @@ Validation:
601
604
  form the progressive-disclosure trace.
602
605
  - The no-op test required zero deletions. Root frontmatter and
603
606
  `agents/openai.yaml` consistently enforce explicit-only invocation.
604
- - Focused tests pass 25/25; all eight shared test files pass 94/94. Both Node
607
+ - The focused and shared source contract commands pass. Both Node
605
608
  files pass syntax checks, and the scoped diff passes `git diff --check`.
606
609
  - The applicable packaging validator exits zero, validates the local path,
607
610
  discovers 106 skills, and lists `review-phase` with the exact source
@@ -11,6 +11,8 @@ returns the zero-write `review_budget_exhausted` terminal.
11
11
  ## Inputs
12
12
 
13
13
  - exact local report path and bytes
14
+ - exact bytes resolved from `reportCommitSha:reportPath` for every retained
15
+ candidate, supplied to the validator as `resolvedReportBytes`
14
16
  - primitive accepted-bounds, normalized-target, and governing-source evidence
15
17
  - review mode, lineage, run ID, and delivery ordinal when applicable
16
18
  - expected report SHA-256 and allowed navigation/wiki-log envelope paths
@@ -51,8 +53,11 @@ accepting an exit.
51
53
  the report and allowed envelope, then push or use the approved ref. Preserve
52
54
  the report bytes exactly.
53
55
  6. Verify that the retained ref contains the exact report commit and that the
54
- commit changed only approved envelope paths. Run the complete retained-pass
55
- validator again against the retained blob and current primitive evidence.
56
+ commit changed only approved envelope paths. Resolve
57
+ `reportCommitSha:reportPath` from that commit, pass those exact committed
58
+ bytes to the retained-pass validator, and require exact equality with the
59
+ local report bytes. A local digest or caller assertion cannot replace this
60
+ commit-tree read.
56
61
  7. Only a unique valid retained delivery report establishes its ordinal.
57
62
  Reconcile the delivery `review_count` projection from the highest unique
58
63
  valid retained ordinal. Standalone retention changes no delivery counter.
@@ -81,6 +86,8 @@ accepting an exit.
81
86
  - same-run candidate inventory and uniqueness decision
82
87
  - report commit SHA and its exact changed-path set
83
88
  - approved retained ref and proof that it contains the report commit
89
+ - exact `reportCommitSha:reportPath` resolution and committed/local byte
90
+ equality
84
91
  - delivery ordinal and reconciled counter projection, or standalone mode
85
92
 
86
93
  ## Declared Exits
@@ -31,13 +31,11 @@ debug, debt, documentation, or closeout work.
31
31
  1. Revalidate the retained blob, canonical identities, approved commit paths,
32
32
  same-run uniqueness, ref containment, and current freshness. Reuse only the
33
33
  immutable authority block inside those retained bytes.
34
- 2. Derive the primary route from retained findings in this order:
35
- - any finding with runtime-failure evidence -> `debugging`
36
- - otherwise, any in-scope non-runtime blocking finding -> `implementation`
37
- - otherwise, any broad architecture-debt finding -> `debt_follow_up`
38
- - otherwise, incomplete required documentation -> `docs_ingest`
39
- - otherwise -> `closeout`
40
- 3. Set `secondary_architecture_follow_up` only when a broad architecture-debt
34
+ 2. Pass the complete retained finding set to the public `deriveReviewRouting`
35
+ helper. Each non-empty finding already carries one validated `return_route`.
36
+ The helper applies `debugging` > `implementation` > `debt_follow_up` >
37
+ `docs_ingest`; an empty set returns `closeout`.
38
+ 3. Accept `secondary_architecture_follow_up` only when a `debt_follow_up`
41
39
  finding accompanies a higher-priority debugging or implementation route.
42
40
  4. Require the derived result to equal the retained report's `routing` object.
43
41
  A mismatch is invalid retained routing evidence and routes to
@@ -63,7 +61,7 @@ debug, debt, documentation, or closeout work.
63
61
 
64
62
  - valid retained-pass result and final freshness result
65
63
  - retained report path, SHA-256, commit, and containing ref
66
- - stable finding IDs used by each route class
64
+ - stable finding IDs and their explicit `return_route` classifications
67
65
  - deterministic precedence result and exact match to report `routing`
68
66
  - returned mode-specific state and routing-evidence artifact
69
67
 
@@ -51,7 +51,8 @@ scope; the parent rejects stale, expanded, duplicated, or unverified output.
51
51
  6. Parent-verify every advisory and lens candidate against the frozen target and
52
52
  adjacent evidence. Only verified candidates become findings. Give each
53
53
  accepted finding a stable identifier, lens, severity, location, impact,
54
- evidence, and action.
54
+ evidence, action, and one explicit `return_route`: `debugging`,
55
+ `implementation`, `debt_follow_up`, or `docs_ingest`.
55
56
  7. Run only the smallest safe readonly validation needed to verify candidates or
56
57
  governing acceptance evidence. Broader checks require explicit accepted spec
57
58
  or plan authority. Record missing required RED/GREEN evidence as a finding;
@@ -61,10 +62,11 @@ scope; the parent rejects stale, expanded, duplicated, or unverified output.
61
62
  caches, generated files, snapshots, lockfiles, or state run in a disposable
62
63
  checkout or snapshot rooted at the frozen revision. Reconcile exact commands,
63
64
  isolation mode, hashes, output, skipped checks, and residual risk.
64
- 9. Derive the report route from verified findings: runtime evidence first,
65
- otherwise an in-scope non-runtime blocker, otherwise broad architecture debt,
66
- otherwise documentation ingest or closeout by documentation completeness.
67
- Architecture debt may remain a secondary follow-up.
65
+ 9. Pass the complete verified finding set to `deriveReviewRouting` in
66
+ [`review-contract.mjs`](../scripts/review-contract.mjs). Store its result
67
+ unchanged. The helper uses only `return_route`, applies canonical precedence,
68
+ and preserves debt as a secondary follow-up beside debugging or
69
+ implementation. Finding prose never selects or reranks a route.
68
70
  10. Assemble exactly one complete local report using
69
71
  [`../references/durable-report.md`](../references/durable-report.md). Record
70
72
  an explicit outcome for every lens. After its final bytes are written, treat
@@ -95,6 +97,7 @@ The run is complete only when one local report contains:
95
97
  and mode-specific delivery identities
96
98
  - explicit Standards, skill-adherence, architecture, simplify, and Spec outcomes
97
99
  - every verified stable finding and no unverified advisory candidate
100
+ - one validated `return_route` on each accepted finding
98
101
  - evidence-cardinality results for all applicable skill guidance and notes
99
102
  - exact validation commands, isolation, before/after hashes, outcomes, skipped
100
103
  checks, and residual risk