@punks/cli 3.2.1 → 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 (117) hide show
  1. package/AGENTS.md +2 -0
  2. package/dist/BASELINE_CHANGELOG.md +76 -0
  3. package/dist/CHANGELOG.md +46 -1
  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 +7 -3
  7. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +32 -0
  8. package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +25 -17
  9. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/rule-authoring/SKILL.md +18 -0
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/rule-authoring/references/migration.md +10 -0
  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/review-animations/LICENSE +21 -0
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md +229 -0
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +9 -7
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/architecture-convergence.md +4 -3
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/tdd/SKILL.md +3 -2
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/tdd/high-signal-tests.md +17 -3
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/domain-modeling/{CONTEXT-FORMAT.md → GLOSSARY-FORMAT.md} +9 -9
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/domain-modeling/SKILL.md +12 -12
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +4 -1
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +36 -3
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  35. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  36. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  37. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  38. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  39. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/RECIPES.md +435 -0
  40. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  41. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  42. package/dist/baseline/scaffold-baseline/skills/misc/wait-what/SKILL.md +1 -1
  43. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +5 -7
  44. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +50 -25
  45. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +29 -21
  46. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +28 -10
  47. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  48. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/prepare-review.md +1 -1
  49. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +9 -2
  50. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +6 -8
  51. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +8 -5
  52. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +29 -14
  53. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +45 -32
  54. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +2 -1
  55. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +86 -12
  56. package/dist/baseline/scaffold-baseline.json +5 -5
  57. package/dist/baseline/scaffold-baseline.tgz +0 -0
  58. package/dist/data/AGENTS.md +2 -0
  59. package/dist/index.js +17 -17
  60. package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +10 -2
  61. package/dist/skills/agnostic/docs/rule-authoring/SKILL.md +18 -0
  62. package/dist/skills/agnostic/docs/rule-authoring/references/migration.md +10 -0
  63. package/dist/skills/agnostic/frontend/animate/LICENSE +21 -0
  64. package/dist/skills/agnostic/frontend/animate/RECIPES.md +324 -0
  65. package/dist/skills/agnostic/frontend/animate/SKILL.md +199 -0
  66. package/dist/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  67. package/dist/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  68. package/dist/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  69. package/dist/skills/agnostic/frontend/review-animations/STANDARDS.md +187 -0
  70. package/dist/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  71. package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  72. package/dist/skills/agnostic/planning/create-plan/SKILL.md +9 -7
  73. package/dist/skills/agnostic/planning/create-plan/references/architecture-convergence.md +4 -3
  74. package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  75. package/dist/skills/agnostic/quality/tdd/SKILL.md +3 -2
  76. package/dist/skills/agnostic/quality/tdd/high-signal-tests.md +17 -3
  77. package/dist/skills/agnostic/requirements/domain-modeling/{CONTEXT-FORMAT.md → GLOSSARY-FORMAT.md} +9 -9
  78. package/dist/skills/agnostic/requirements/domain-modeling/SKILL.md +12 -12
  79. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +4 -1
  80. package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +33 -3
  81. package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  82. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  83. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  84. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  85. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  86. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  87. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  88. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  89. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  90. package/dist/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  91. package/dist/skills/frameworks/expo/animate-expo/RECIPES.md +385 -0
  92. package/dist/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  93. package/dist/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  94. package/dist/skills/misc/wait-what/SKILL.md +1 -1
  95. package/dist/skills/phases/delivery-phase/SKILL.md +5 -7
  96. package/dist/skills/phases/delivery-phase/phases/review.md +50 -25
  97. package/dist/skills/phases/delivery-phase/phases/router.md +27 -19
  98. package/dist/skills/phases/delivery-phase/references/phase-handoff.md +28 -10
  99. package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  100. package/dist/skills/phases/review-phase/phases/prepare-review.md +1 -1
  101. package/dist/skills/phases/review-phase/phases/retain-report.md +9 -2
  102. package/dist/skills/phases/review-phase/phases/return-route.md +6 -8
  103. package/dist/skills/phases/review-phase/phases/run-review.md +8 -5
  104. package/dist/skills/phases/review-phase/references/durable-report.md +29 -14
  105. package/dist/skills/phases/review-phase/references/state-graph.md +19 -6
  106. package/dist/skills/phases/review-phase/references/targets.md +2 -1
  107. package/dist/skills/phases/review-phase/scripts/review-contract.mjs +91 -11
  108. package/package.json +4 -23
  109. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.test.ts +0 -130
  110. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.test.ts +0 -135
  111. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts +0 -138
  112. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts +0 -135
  113. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.test.ts +0 -875
  114. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.lifecycle.test.ts +0 -205
  115. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.native.test.ts +0 -2765
  116. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +0 -2108
  117. package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +0 -116
@@ -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.
@@ -9,4 +9,4 @@ routed `requirements-grill` status artifact. Preserve its canonical terms;
9
9
  route proposed terminology changes through `requirements-grill` instead of
10
10
  silently renaming them.
11
11
 
12
- Wait — I don't understand where you've got to here. Re-pitch that: give me a little bit of context, talk in ASD-STE100 Simplified Technical English, and use the ubiquitous language from `CONTEXT.md`.
12
+ Wait — I don't understand where you've got to here. Re-pitch that: give me a little bit of context, talk in ASD-STE100 Simplified Technical English, and use the ubiquitous language from `GLOSSARY.md`.
@@ -15,9 +15,9 @@ disable-model-invocation: true
15
15
  handoff, validation, and docs state to choose the current gate.
16
16
  3. If approved artifact links or UI Evidence links are present, carry them as routing evidence.
17
17
  4. Load exactly one phase file from `phases/`.
18
- 5. Complete that phase, write the phase outcome, then stop or re-enter `delivery-phase` to route again.
18
+ 5. Complete that phase and write its outcome. Full delivery re-enters routing immediately; other modes stop at their selected boundary.
19
19
 
20
- Completion of one phase does not imply loading the rest of the chain.
20
+ Full delivery grants its selected inner steps the authority needed to reach closeout. Progressive loading still exposes one phase at a time.
21
21
 
22
22
  ## Entry Modes
23
23
 
@@ -47,16 +47,14 @@ Completion of one phase does not imply loading the rest of the chain.
47
47
  - A phase may delegate to `create-spec`, `write-backlog`, `create-plan`,
48
48
  `implement-spec`, `debugging-phase`, or `docs-ingest-phase` only from
49
49
  its own phase file.
50
- - `review-phase` is user-invoked. Only below the three-pass budget may delivery
51
- persist `review_due` and return the exact `$review-phase` invocation context,
52
- then delivery stops. It never invokes that skill itself.
50
+ - In full delivery, activate `review-phase` as an authorized inner step below the three-pass budget. Outside full delivery, return its exact explicit invocation context and stop.
51
+ - After the third repair, run focused validation. Passing resumes routing toward closeout; terminal failure is a blocker.
53
52
  - After a phase completes, write enough state for future resume. Review-triggered
54
53
  repair uses the idempotent fields in
55
54
  [references/phase-handoff.md](references/phase-handoff.md).
56
55
 
57
56
  ## Stop Conditions
58
57
 
59
- - Selected phase completed and resumable state was written.
60
- - User requested a HITL checkpoint before the next phase.
58
+ - User explicitly requested a HITL checkpoint or one-phase mode and its resumable state was written.
61
59
  - Router reaches closeout and final evidence is reported.
62
60
  - Scope is ambiguous, stale, contradictory, or blocked by missing access.
@@ -3,7 +3,7 @@
3
3
  Use after implementation or whenever delivery has `review_due` for a stale or
4
4
  missing retained review.
5
5
 
6
- ## Prepare Explicit Review
6
+ ## Prepare Review
7
7
 
8
8
  1. Validate accepted bounds and normalize a supported Git/diff target without
9
9
  mutating it. Unsupported targets or invalid bounds enter `review_failed`
@@ -14,39 +14,64 @@ missing retained review.
14
14
  current-route evidence. This is a zero-write no-op: do not persist
15
15
  `review_due` or mutate any handoff, counter, or delivery status.
16
16
  4. Only when recovered `review_count < 3`, persist `review_due` with the valid
17
- normalized target and exact explicit `$review-phase` invocation
18
- context defined in the phase-handoff reference. Do not preallocate an ordinal
19
- or derive `review_run_id` yet.
20
- 5. Return that invocation context and stop. Only an explicit operator invocation
21
- of `$review-phase` consumes it, preallocates ordinal `review_count + 1`, fixes
22
- `review_run_id`, and enters `review_running`.
23
-
24
- For `report_retention_pending`, return an explicit `$review-phase` resume context
25
- with the existing run id, local report identity, and fresh target/source hashes,
26
- then stop. The explicit review invocation resumes retention without rerunning
27
- lenses.
17
+ normalized target and `$review-phase` invocation context defined in the
18
+ phase-handoff reference. Do not preallocate an ordinal or derive
19
+ `review_run_id` yet.
20
+ 5. Full delivery invokes `$review-phase` with that context immediately. Other
21
+ modes return it and stop. Invocation preallocates ordinal `review_count + 1`,
22
+ fixes `review_run_id`, and enters `review_running`.
23
+
24
+ For `report_retention_pending`, use a `$review-phase` resume context with the
25
+ existing run id, local report identity, and fresh target/source hashes. Full
26
+ delivery resumes it immediately; other modes return it and stop. Retention
27
+ resumes without rerunning lenses.
28
28
 
29
29
  ## Route Retained Findings
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
 
47
- Before review, completion is a durable `review_due` handoff plus exact explicit
48
- invocation context and a stop. After review returns `review_routed`, completion
72
+ Before review, completion is a durable `review_due` handoff plus an invocation
73
+ context; full delivery consumes it immediately. After review returns `review_routed`, completion
49
74
  records report path, report SHA-256, report commit SHA, verified retained ref,
50
75
  lineage, run id, recovered/projected counts, stable finding ids, primary route,
51
- secondary debt route when present, and resulting state. Then stop or re-enter
52
- delivery routing.
76
+ secondary debt route when present, and resulting state. Full delivery re-enters
77
+ routing; other modes stop at their boundary.
@@ -19,12 +19,12 @@ state take precedence over inferred artifact order.
19
19
  `review_failed` even when a persisted counter is 3. Only after those checks
20
20
  may it recover `review_count` and evaluate the budget in memory. Exhaustion
21
21
  returns `review_budget_exhausted` with zero handoff or status writes. A count
22
- below 3 persists `review_due` and returns the exact explicit `$review-phase`
23
- invocation context. Then stop. Delivery never enters `review_running` itself.
24
- 3. For `report_retention_pending`, load [review.md](review.md) only to return the
25
- exact explicit `$review-phase` resume context, then stop. A fresh local report
26
- resumes without rerunning lenses. Stop on terminal `review_failed` with its
27
- exact evidence.
22
+ below 3 persists `review_due`. Full delivery activates `$review-phase` with
23
+ that context; other modes return the exact explicit invocation context and stop.
24
+ 3. For `report_retention_pending`, load [review.md](review.md) to resume
25
+ `$review-phase` in full delivery or return its exact resume context in other
26
+ modes. A fresh local report resumes without rerunning lenses. Stop on terminal
27
+ `review_failed` with its exact evidence.
28
28
  4. Otherwise recover review state by `review_lineage_id`: read the highest valid
29
29
  retained ordinal, reconcile the handoff `review_count` projection, then assess
30
30
  target and source freshness separately.
@@ -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
41
- incomplete, or its remote retention or stable blob URL is missing or
42
- unverified, load [spec.md](spec.md).
43
- 10. If the verified post-spec backlog projection is missing or stale, load
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
47
+ incomplete, or its remote retention or stable blob URL is missing or
48
+ unverified, load [spec.md](spec.md).
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
- `review_failed`, `review_budget_exhausted`, or the exact explicit
52
- `$review-phase` invocation context and stops.
53
- 14. Route remaining docs-affecting work to [docs-ingest.md](docs-ingest.md),
57
+ `review_failed`, `review_budget_exhausted`, or a valid `$review-phase`
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
@@ -59,9 +66,10 @@ revision, resume, rebase, commit, retry, and handoff preserve them.
59
66
 
60
67
  ## HITL And Resume
61
68
 
62
- A HITL checkpoint is explicit user control. Run only the requested phase and
63
- stop after its handoff. Earlier phases may have completed through direct skills;
64
- reuse fresh matching artifacts rather than rerunning them.
69
+ A HITL checkpoint exists only when the user explicitly requests it. Full
70
+ delivery otherwise continues across ordinary in-bounds operations without
71
+ confirmation. Earlier phases may have completed through direct skills; reuse
72
+ fresh matching artifacts rather than rerunning them.
65
73
 
66
74
  ## Output
67
75
 
@@ -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,13 +51,25 @@ 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
 
49
- ## Explicit Review Invocation Context
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.
50
59
 
51
- Delivery persists this block for `review_due` and returns it unchanged before
52
- stopping:
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
+
67
+ ## Review Invocation Context
68
+
69
+ Delivery persists this block for `review_due`:
53
70
 
54
71
  ```text
55
- explicit_operator_invocation_required: true
72
+ review_invocation_authority: full_delivery | explicit_operator
56
73
  review_invocation_skill: $review-phase
57
74
  review_invocation_mode: delivery
58
75
  delivery_goal_identity:
@@ -64,14 +81,15 @@ current_route:
64
81
  normalized_target:
65
82
  ```
66
83
 
67
- The `review_due` handoff leaves `review_run_id` unset. Only the explicit operator
68
- invocation consumes this context, preallocates the next ordinal, fixes the run
69
- id, and enters `review_running`.
84
+ The `review_due` handoff leaves `review_run_id` unset. Full delivery consumes the
85
+ context immediately; other modes return it for explicit operator invocation.
86
+ Consumption preallocates the next ordinal, fixes the run id, and enters
87
+ `review_running`.
70
88
 
71
89
  For `report_retention_pending`, the explicit resume context additionally carries
72
90
  the existing `review_run_id`, ordinal, local report path and SHA-256, target hash,
73
- source hashes, and intended retained ref. Delivery returns it and stops; the
74
- operator invokes `$review-phase` to retry retention without rerunning lenses.
91
+ source hashes, and intended retained ref. Full delivery resumes `$review-phase`;
92
+ other modes return the context for explicit retry without rerunning lenses.
75
93
 
76
94
  After fix 3, `clean_handoff` is final authority. Link immutable review 3, final
77
95
  changes, the same passing focused validation, and clean status.