@punks/cli 3.2.2 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/AGENTS.md +4 -2
  2. package/README.md +1 -1
  3. package/dist/BASELINE_CHANGELOG.md +56 -0
  4. package/dist/CHANGELOG.md +32 -0
  5. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  6. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +4 -1
  7. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +6 -2
  8. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +32 -0
  9. package/dist/baseline/scaffold-baseline/data/subagents/manifest.mjs +1 -0
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/LICENSE +21 -0
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/RECIPES.md +333 -0
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/SKILL.md +203 -0
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/improve-mobile-frontend/SKILL.md +109 -0
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/improve-mobile-frontend/UPSTREAM.md +5 -0
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md +229 -0
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +36 -3
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  35. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  36. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/RECIPES.md +435 -0
  37. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  38. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  39. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +34 -9
  40. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +18 -11
  41. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  42. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  43. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +9 -2
  44. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +6 -8
  45. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +8 -5
  46. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +29 -14
  47. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +45 -32
  48. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +2 -1
  49. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +86 -12
  50. package/dist/baseline/scaffold-baseline.json +5 -5
  51. package/dist/baseline/scaffold-baseline.tgz +0 -0
  52. package/dist/data/AGENTS.md +1 -1
  53. package/dist/data/subagents/manifest.mjs +1 -0
  54. package/dist/index.js +27 -27
  55. package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  56. package/dist/skills/agnostic/frontend/animate/LICENSE +21 -0
  57. package/dist/skills/agnostic/frontend/animate/RECIPES.md +324 -0
  58. package/dist/skills/agnostic/frontend/animate/SKILL.md +199 -0
  59. package/dist/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  60. package/dist/skills/agnostic/frontend/improve-mobile-frontend/SKILL.md +109 -0
  61. package/dist/skills/agnostic/frontend/improve-mobile-frontend/UPSTREAM.md +5 -0
  62. package/dist/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  63. package/dist/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  64. package/dist/skills/agnostic/frontend/review-animations/STANDARDS.md +187 -0
  65. package/dist/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  66. package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  67. package/dist/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  68. package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  69. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  70. package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +33 -3
  71. package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  72. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  73. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  74. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  75. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  76. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  77. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  78. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  79. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  80. package/dist/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  81. package/dist/skills/frameworks/expo/animate-expo/RECIPES.md +385 -0
  82. package/dist/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  83. package/dist/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  84. package/dist/skills/phases/delivery-phase/phases/review.md +34 -9
  85. package/dist/skills/phases/delivery-phase/phases/router.md +16 -9
  86. package/dist/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  87. package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  88. package/dist/skills/phases/review-phase/phases/retain-report.md +9 -2
  89. package/dist/skills/phases/review-phase/phases/return-route.md +6 -8
  90. package/dist/skills/phases/review-phase/phases/run-review.md +8 -5
  91. package/dist/skills/phases/review-phase/references/durable-report.md +29 -14
  92. package/dist/skills/phases/review-phase/references/state-graph.md +18 -5
  93. package/dist/skills/phases/review-phase/references/targets.md +2 -1
  94. package/dist/skills/phases/review-phase/scripts/review-contract.mjs +91 -11
  95. package/package.json +52 -9
  96. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.test.ts +0 -130
  97. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.test.ts +0 -135
  98. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts +0 -138
  99. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts +0 -135
  100. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.test.ts +0 -875
  101. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.lifecycle.test.ts +0 -205
  102. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.native.test.ts +0 -2765
  103. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +0 -2108
  104. package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +0 -116
  105. package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +0 -29
@@ -11,7 +11,7 @@ Official sources:
11
11
 
12
12
  ## Preflight before creation
13
13
 
14
- Before creating any item, build the complete in-memory projection. Resolve every dependency target, reject missing targets, self-edges, and cycles, derive and verify every milestone, and prove the configured hierarchy, classification, and dependency representation is representable in GitHub. A failed preflight writes nothing.
14
+ Before creating any item, build the complete in-memory projection. Resolve every dependency target, reject missing targets, self-edges, and cycles, derive and verify overview milestones only, and prove the configured hierarchy, classification, and dependency representation is representable in GitHub. A failed preflight writes nothing.
15
15
 
16
16
  ## Intent
17
17
 
@@ -20,7 +20,7 @@ Use GitHub Projects V2 and GitHub Issues together.
20
20
  Canonical mapping:
21
21
 
22
22
  - capability module -> Project V2 custom single-select field
23
- - execution milestone -> chronological repository milestone derived from native issue dependencies
23
+ - execution milestone -> chronological repository milestone for overview-level items (`fog` through `epic`), inherited by containing stories when supported
24
24
  - epic/capability -> parent GitHub issue in the Project
25
25
  - story -> child issue/sub-issue in the Project
26
26
  - story ordering -> native issue dependency
@@ -92,23 +92,23 @@ If repository policy permits none of these, fail preflight. Do not create classi
92
92
 
93
93
  Store durable capability membership in a Project V2 custom single-select field named `Capability module`. This field answers which product capability owns the item. It is independent from repository milestones, parent/sub-issue hierarchy, and dependency order.
94
94
 
95
- Fog leaves `Capability module` empty until sharpening selects a module. Every selected concrete non-fog issue receives exactly one capability-module value. A module can contain issues from multiple execution milestones.
95
+ Fog leaves `Capability module` empty until sharpening selects a module. Every selected concrete non-fog issue receives exactly one capability-module value. A module can contain overview items from multiple execution milestones; containing stories may share their epic's milestone.
96
96
 
97
97
  ## Chronological execution milestones
98
98
 
99
- Use repository milestones named `M1`, `M2`, and so on only for dependency-derived execution waves. Do not create one repository milestone per capability module.
99
+ Use repository milestones named `M1`, `M2`, and so on only for overview-level `fog`, `grilling`, `research`, `prototype`, and `epic` items. Stories may inherit their containing epic's milestone when supported, but never receive distinct story milestones; do not create one repository milestone per capability module.
100
100
 
101
101
  1. In memory, resolve the complete selected graph and reject missing targets, self-edges, or cycles.
102
- 2. Derive blocker-free issues as `M1`; derive every other issue as `M(1 + max(milestone number of each blocker))`.
103
- 3. Verify every blocker belongs to a strictly earlier milestone and that GitHub can represent the complete hierarchy and graph.
102
+ 2. Keep one containing overview milestone across each projected story set when supported; use native issue dependencies for story ordering.
103
+ 3. Verify every blocker target is present and that GitHub can represent the complete hierarchy and graph.
104
104
  4. Only after preflight passes, create issues, map planned keys to provider ids, add every native blocker with `addBlockedBy`, and create or reuse milestones.
105
- 5. Assign exactly one verified milestone to each selected milestone-eligible issue.
105
+ 5. Assign at most one verified milestone to each selected overview-level item and propagate that same membership to its stories when supported; never derive story-specific milestones.
106
106
 
107
- Issues from different capability modules can share one milestone, and one capability module can span multiple milestones. Recompute milestone assignment whenever native dependencies change.
107
+ Overview items from different capability modules can share one milestone. Containing stories may share that milestone, but parent/sub-issue hierarchy and milestone assignment never determine story chronology; update native dependencies when story relations change.
108
108
 
109
109
  ## Create missing execution milestones
110
110
 
111
- Create only the chronological repository milestones derived above.
111
+ Create only the chronological repository milestones derived above for overview-level items; propagate membership to containing stories when supported without deriving story-specific milestones.
112
112
 
113
113
  Endpoint:
114
114
 
@@ -135,8 +135,8 @@ Required field:
135
135
 
136
136
  - `title`
137
137
 
138
- For GraphQL milestone assignment after dependency derivation, use the returned milestone node ID as `milestoneId`.
139
- For REST milestone assignment after dependency derivation, use the returned milestone number as `milestone`.
138
+ For GraphQL overview-item milestone assignment, use the returned milestone node ID as `milestoneId`.
139
+ For REST overview-item milestone assignment, use the returned milestone number as `milestone`.
140
140
 
141
141
  ## Create a fog issue
142
142
 
@@ -294,4 +294,4 @@ mutation AddBlockedBy($issueId: ID!, $blockingIssueId: ID!) {
294
294
 
295
295
  - GitHub REST issue creation is still acceptable for plain issue creation, but GraphQL is preferred for backlog sync because it can attach Project V2 IDs, parent issues, and dependency relations.
296
296
  - Project fields store capability grouping metadata. Issue hierarchy remains the source for epic -> story.
297
- - Repository milestones store dependency-derived chronology only.
297
+ - Repository milestones store project-overview chronology only; native issue dependencies store story relations.
@@ -14,7 +14,7 @@ Official sources:
14
14
 
15
15
  ## Preflight before creation
16
16
 
17
- Before creating any item, build the complete in-memory projection. Resolve every dependency target, reject missing targets, self-edges, and cycles, derive and verify every milestone, and prove the configured hierarchy, classification, and dependency representation is representable in Linear. A failed preflight writes nothing.
17
+ Before creating any item, build the complete in-memory projection. Resolve every dependency target, reject missing targets, self-edges, and cycles, derive and verify overview milestones only, and prove the configured hierarchy, classification, and dependency representation is representable in Linear. A failed preflight writes nothing.
18
18
 
19
19
  ## Minimum documented mutation
20
20
 
@@ -101,7 +101,7 @@ If workspace policy permits none of these, fail preflight. Do not create labels
101
101
 
102
102
  - fog -> root-level issue with `Kind/fog`; no parent or capability module required until sharpened
103
103
  - capability module -> non-milestone capability metadata, such as a dedicated module label
104
- - execution milestone -> chronological Linear project milestone derived from native blockers
104
+ - execution milestone -> chronological Linear project milestone for overview-level items (`fog` through `epic`), inherited by containing stories when supported
105
105
  - grilling -> capability-module-scoped issue with `Kind/grilling`
106
106
  - research -> capability-module-scoped issue with `Kind/research`
107
107
  - prototype -> capability-module-scoped issue with `Kind/prototype`
@@ -134,17 +134,17 @@ Use these headings in `description`; do not substitute a mutable local spec path
134
134
 
135
135
  ## Chronological execution milestones
136
136
 
137
- Linear project milestones answer first/next/later. Name them chronologically, such as `M1`, `M2`, and `M3`, and derive every assignment from native `blockedBy` / `blocks` relations:
137
+ Linear project milestones answer first/next/later at the project overview level. Name them chronologically, such as `M1`, `M2`, and `M3`, and derive them only for `fog`, `grilling`, `research`, `prototype`, and `epic` issues. When supported, stories inherit their containing overview milestone as one shared membership value; native `blockedBy` / `blocks` relations explain story order.
138
138
 
139
- Only selected non-fog `grilling`, `research`, `prototype`, `epic`, and `story` issues are milestone-eligible. Fog has no execution milestone until sharpened into concrete work. Capability-module metadata remains grouping and is not an execution issue.
139
+ The overview-level taxonomy from `fog` through `epic` is milestone-eligible: `fog`, `grilling`, `research`, `prototype`, and `epic`. Stories never receive distinct derived milestones; when supported, they share the containing overview milestone. Capability-module metadata remains grouping and is not an execution relation.
140
140
 
141
141
  1. In memory, resolve the complete selected graph and reject missing targets, self-edges, or cycles.
142
- 2. Derive blocker-free issues as `M1`; derive every other issue as `M(1 + max(milestone number of each blocker))`.
143
- 3. Verify every blocker is in a strictly earlier milestone and that the configured Linear representation supports the full graph.
144
- 4. Only after preflight passes, create issues, map planned keys to provider ids, create native blocker relations, and create or reuse the derived milestones.
145
- 5. Assign exactly one verified milestone to each selected milestone-eligible issue.
142
+ 2. Keep one containing overview milestone across each projected story set when supported; use native blocker relations for story ordering.
143
+ 3. Verify every blocker target is present and that the configured Linear representation supports the full graph.
144
+ 4. Only after preflight passes, create issues, map planned keys to provider ids, create native blocker relations, and create or reuse the derived overview milestones.
145
+ 5. Assign at most one verified milestone to each selected overview-level item and propagate that same membership to its stories when supported; never derive story-specific milestones.
146
146
 
147
- Issues in the same derived wave share a milestone and can proceed in parallel, even when they belong to different capability modules. A capability module can span multiple milestones. Capability grouping, parent/child hierarchy, and existing milestone assignment never determine chronology. Native blocker relations remain authoritative; recompute milestone assignment and numbering whenever they change.
147
+ Overview items in the same wave share a milestone. Containing stories may share that milestone, but capability grouping, parent/child hierarchy, and milestone assignment never determine story chronology. Native blocker relations remain authoritative for stories; recompute blockers when story relations change.
148
148
 
149
149
  ## Notes
150
150
 
@@ -7,7 +7,7 @@ Connector source:
7
7
 
8
8
  ## Preflight before creation
9
9
 
10
- Before creating any item, build the complete in-memory projection. Resolve every dependency target, reject missing targets, self-edges, and cycles, derive and verify every milestone, and prove the configured hierarchy, classification, and dependency representation is representable in monday.com. A failed preflight writes nothing.
10
+ Before creating any item, build the complete in-memory projection. Resolve every dependency target, reject missing targets, self-edges, and cycles, derive and verify overview milestones only, and prove the configured hierarchy, classification, and dependency representation is representable in monday.com. A failed preflight writes nothing.
11
11
 
12
12
  ## Intent
13
13
 
@@ -17,7 +17,7 @@ Canonical mapping:
17
17
 
18
18
  - fog -> first-class root/backlog item
19
19
  - capability module -> board group
20
- - execution milestone -> dedicated Status or Dropdown column derived from dependency values
20
+ - execution milestone -> dedicated Status or Dropdown column for overview-level items (`fog` through `epic`), inherited by containing stories when supported
21
21
  - grilling/research/prototype -> parent item in a capability group
22
22
  - epic/capability -> parent item
23
23
  - story -> subitem under the epic item
@@ -41,7 +41,7 @@ Expected board shape, subject to explicit board configuration:
41
41
  - one board group per capability module
42
42
  - parent items for epics/capabilities
43
43
  - subitems for stories
44
- - dedicated Status or Dropdown column named `Execution milestone` with `M1`, `M2`, and later derived values
44
+ - dedicated Status or Dropdown column named `Execution milestone` with `M1`, `M2`, and later overview values
45
45
  - dependency column wherever selected work has blockers
46
46
 
47
47
  If the target group for a capability module is missing, create it before creating concrete items.
@@ -105,7 +105,7 @@ Closure notes record the answer or verdict, evidence, observations, open decisio
105
105
 
106
106
  Use one stable board group per durable capability module. A group answers which product capability owns the item; it does not answer when the item executes.
107
107
 
108
- Fog stays in a root/backlog group until sharpening selects a capability module. Do not name capability groups `M1`, `M2`, or other chronological wave names. One capability group can contain items from multiple execution milestones.
108
+ Fog stays in a root/backlog group until sharpening selects a capability module. Do not name capability groups `M1`, `M2`, or other chronological wave names. One capability group can contain overview items from multiple execution milestones; containing stories may share their epic's milestone.
109
109
 
110
110
  ## Create a capability-module group
111
111
 
@@ -130,16 +130,16 @@ Use stable capability names. Do not create implementation-phase groups such as b
130
130
 
131
131
  ## Chronological execution milestones
132
132
 
133
- Use a separate Status or Dropdown column named `Execution milestone` for `M1`, `M2`, and later dependency-derived waves. The exact column ID comes from board metadata.
133
+ Use a separate Status or Dropdown column named `Execution milestone` for `M1`, `M2`, and later project-overview waves. Set it on `fog`, `grilling`, `research`, `prototype`, and `epic` items, and propagate the same value to containing stories when supported; never derive story-specific values. The exact column ID comes from board metadata.
134
134
 
135
135
  1. Inspect both parent-item and subitem board metadata.
136
136
  2. In memory, resolve the complete selected graph and reject missing targets, self-edges, or cycles.
137
137
  3. Prove every edge is representable by monday.com's same-board dependency constraint. If an edge crosses unsupported storage, stop before creation.
138
- 4. Derive dependency-free items as `M1`; derive every other item as `M(1 + max(milestone number of each dependency))`.
139
- 5. Verify every dependency points to a strictly earlier milestone and that all required configured columns exist.
140
- 6. Only after preflight passes, create items, map planned keys to provider ids, populate dependencies, and set exactly one verified milestone value per eligible item.
138
+ 4. Keep one containing overview milestone across each projected story set when supported; use the dependency column for story ordering.
139
+ 5. Verify every dependency target is present and that all required configured columns exist.
140
+ 6. Only after preflight passes, create items, map planned keys to provider ids, populate dependencies, and set at most one verified milestone value per selected overview-level item, propagating that same value to containing stories when supported.
141
141
 
142
- Items from different capability groups can share one execution milestone. Group membership, parent/subitem hierarchy, and current milestone value never create dependency edges. Recompute milestone values whenever the dependency column changes.
142
+ Overview items from different capability groups can share one execution milestone. Containing stories may share that value, but group membership, parent/subitem hierarchy, and current milestone value never create story dependency edges. Update the dependency column when story relations change.
143
143
 
144
144
  ## Create an epic item
145
145
 
@@ -226,7 +226,7 @@ Tool:
226
226
  3. Complete the in-memory hierarchy, graph, milestone, and representability preflight.
227
227
  4. Only after preflight passes, create required groups, items, and subitems.
228
228
  5. Set only explicitly configured classification metadata.
229
- 6. Map planned keys to provider ids, add dependency values, and set already-derived milestones.
229
+ 6. Map planned keys to provider ids, add dependency values, and set already-derived overview milestones.
230
230
 
231
231
  ## Notes
232
232
 
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Emil Kowalski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,435 @@
1
+ # Expo Animation Recipes
2
+
3
+ Ready-to-build implementations for the cases that come up most in a React Native app. Start from the recipe, then adapt.
4
+
5
+ ---
6
+
7
+ ## Setup the recipes assume
8
+
9
+ ```bash
10
+ npx expo install react-native-reanimated react-native-worklets react-native-gesture-handler expo-haptics
11
+ ```
12
+
13
+ (`react-native-keyboard-controller` only for the keyboard recipe.) `expo install`, not `npm install` — it resolves the versions that match the SDK. The worklets Babel plugin is configured by `babel-preset-expo` automatically.
14
+
15
+ `GestureHandlerRootView` wraps the app once — in Expo Router, the root `_layout`:
16
+
17
+ ```jsx
18
+ import { GestureHandlerRootView } from "react-native-gesture-handler";
19
+
20
+ export default function RootLayout() {
21
+ return (
22
+ <GestureHandlerRootView style={{ flex: 1 }}>
23
+ <Stack />
24
+ </GestureHandlerRootView>
25
+ );
26
+ }
27
+ ```
28
+
29
+ Imports and constants every recipe below shares:
30
+
31
+ ```js
32
+ import { useState, useEffect, useMemo } from "react";
33
+ import Animated, {
34
+ useSharedValue,
35
+ useAnimatedStyle,
36
+ useAnimatedScrollHandler,
37
+ useAnimatedReaction,
38
+ withSpring,
39
+ withTiming,
40
+ interpolate,
41
+ Extrapolation,
42
+ Easing,
43
+ FadeInDown,
44
+ FadeOutDown,
45
+ LinearTransition,
46
+ } from "react-native-reanimated";
47
+ import { Gesture, GestureDetector } from "react-native-gesture-handler";
48
+ import { scheduleOnRN } from "react-native-worklets";
49
+ import * as Haptics from "expo-haptics";
50
+
51
+ const EASE_OUT = Easing.bezier(0.23, 1, 0.32, 1); // strong ease-out for UI
52
+ const EASE_IN_OUT = Easing.bezier(0.77, 0, 0.175, 1); // on-screen movement
53
+ const EASE_SHEET = Easing.bezier(0.32, 0.72, 0, 1); // iOS sheet curve
54
+ ```
55
+
56
+ Three conventions, explained once here instead of in every recipe:
57
+
58
+ - **Shared values are read and written with `.get()` / `.set()`**, the form the Reanimated docs recommend for React Compiler support. `.value` still works, but the compiler can't see through it.
59
+ - **`scheduleOnRN(fn, ...args)` replaces the deprecated `runOnJS(fn)(...args)`** for calling back to the React Native runtime from a worklet.
60
+ - **Gestures are wrapped in `useMemo`.** Rebuilding a gesture on every render can reattach the recognizer and drop a drag that's mid-flight.
61
+
62
+ **Gesture Handler v3:** Expo installs v2, and the recipes use its `Gesture.Pan()` builder. If the project is already on v3, the builder is legacy — each gesture is a hook taking one config object, with `onStart` → `onActivate`, `onEnd` → `onDeactivate`, and the `success` flag replaced by `event.canceled` (inverted). The hook manages its own identity, so drop the `useMemo`:
63
+
64
+ ```jsx
65
+ const pan = usePanGesture({
66
+ activeOffsetY: [-10, 10],
67
+ onActivate: () => {
68
+ context.set(translateY.get());
69
+ },
70
+ onUpdate: (e) => {
71
+ translateY.set(context.get() + e.translationY);
72
+ },
73
+ onDeactivate: (e) => {
74
+ /* settle with withSpring as below */
75
+ },
76
+ });
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Two worklets you'll need everywhere
82
+
83
+ Momentum projection decides _where a flick was going_, so a fast short swipe commits and a slow long one doesn't. Rubber-banding makes a boundary resist instead of stopping dead.
84
+
85
+ ```js
86
+ // Where the finger would come to rest if it kept decelerating.
87
+ // Apple's exponential-decay form — not the v²/2a from physics class.
88
+ function project(velocity, decelerationRate = 0.998) {
89
+ "worklet";
90
+ return ((velocity / 1000) * decelerationRate) / (1 - decelerationRate);
91
+ }
92
+
93
+ // The further past the edge, the less the element follows.
94
+ function rubberband(overshoot, dimension, constant = 0.55) {
95
+ "worklet";
96
+ return (overshoot * dimension * constant) / (dimension + constant * Math.abs(overshoot));
97
+ }
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Press feedback
103
+
104
+ Every pressable in the app. This passes the frequency gate only because it's near-imperceptible: 120ms and a 3% scale is the ceiling for something touched this often — anything longer or larger belongs to rarer moments, per step 1 in SKILL.md. No gesture, no shared value — a CSS transition is the whole implementation.
105
+
106
+ ```jsx
107
+ import Animated from "react-native-reanimated";
108
+ import { Pressable, StyleSheet } from "react-native";
109
+
110
+ function PressableScale({ onPress, children }) {
111
+ const [pressed, setPressed] = useState(false);
112
+ return (
113
+ <Pressable
114
+ onPress={onPress}
115
+ onPressIn={() => setPressed(true)}
116
+ onPressOut={() => setPressed(false)}
117
+ hitSlop={12}
118
+ pressRetentionOffset={16}
119
+ >
120
+ <Animated.View style={[styles.box, pressed && styles.pressed]}>{children}</Animated.View>
121
+ </Pressable>
122
+ );
123
+ }
124
+
125
+ const styles = StyleSheet.create({
126
+ box: {
127
+ transform: [{ scale: 1 }],
128
+ transitionProperty: "transform",
129
+ transitionDuration: "120ms",
130
+ transitionTimingFunction: "cubic-bezier(0.23, 1, 0.32, 1)",
131
+ },
132
+ pressed: { transform: [{ scale: 0.97 }] },
133
+ });
134
+ ```
135
+
136
+ `setState` is fine here — it fires twice per press, not per frame. `hitSlop` brings a small icon up to the 44pt target without growing it; `pressRetentionOffset` stops a slight finger drift from cancelling.
137
+
138
+ ---
139
+
140
+ ## Bottom sheet you can drag to dismiss
141
+
142
+ Before writing this: if the sheet is its own destination, use `presentation: 'formSheet'` (see **Screen transitions**) and get the platform's real sheet for free. Build this only when the sheet has to live inside an existing screen.
143
+
144
+ ```jsx
145
+ const translateY = useSharedValue(0);
146
+ const context = useSharedValue(0);
147
+
148
+ const pan = useMemo(
149
+ () =>
150
+ Gesture.Pan()
151
+ .activeOffsetY([-10, 10]) // let a horizontal swipe win; require intent before committing
152
+ .onStart(() => {
153
+ context.set(translateY.get()); // start from the current on-screen value, not from 0
154
+ })
155
+ .onUpdate((e) => {
156
+ const next = context.get() + e.translationY;
157
+ // downward is free; upward past the top resists
158
+ translateY.set(next >= 0 ? next : rubberband(next, HEIGHT));
159
+ })
160
+ .onEnd((e) => {
161
+ const projected = translateY.get() + project(e.velocityY);
162
+ if (projected > HEIGHT * 0.4) {
163
+ translateY.set(
164
+ withSpring(
165
+ HEIGHT,
166
+ {
167
+ duration: 300,
168
+ dampingRatio: 1,
169
+ velocity: e.velocityY,
170
+ overshootClamping: true,
171
+ },
172
+ (finished) => {
173
+ if (finished) scheduleOnRN(onClose);
174
+ },
175
+ ),
176
+ );
177
+ } else {
178
+ translateY.set(
179
+ withSpring(0, { duration: 300, dampingRatio: 0.8, velocity: e.velocityY }),
180
+ );
181
+ scheduleOnRN(Haptics.impactAsync, Haptics.ImpactFeedbackStyle.Light); // it snapped home
182
+ }
183
+ }),
184
+ [onClose],
185
+ );
186
+
187
+ const sheetStyle = useAnimatedStyle(() => ({ transform: [{ translateY: translateY.get() }] }));
188
+ ```
189
+
190
+ The four details that separate this from a bad drag:
191
+
192
+ - **`onStart` captures the current value.** Without it, grabbing a sheet mid-animation teleports it — the animation must continue from where the eye last saw it.
193
+ - **Velocity decides, not distance.** `project()` means a quick flick dismisses even a few pixels down. Requiring 40% travel makes the sheet feel heavy.
194
+ - **Velocity is handed to the spring**, so there's no seam between the finger releasing and the animation continuing. This is the single detail that most separates "fluid" from "fine".
195
+ - **`overshootClamping` on dismissal** — otherwise the sheet springs past the bottom of the screen and flashes a gap.
196
+
197
+ The backdrop derives from the same value, so it's always in sync and costs nothing:
198
+
199
+ ```jsx
200
+ const backdropStyle = useAnimatedStyle(() => ({
201
+ opacity: interpolate(translateY.get(), [0, HEIGHT], [1, 0], Extrapolation.CLAMP),
202
+ }));
203
+ ```
204
+
205
+ ---
206
+
207
+ ## Swipe to delete a row
208
+
209
+ Before writing this: gesture-handler ships [`ReanimatedSwipeable`](https://docs.swmansion.com/react-native-gesture-handler/docs/components/reanimated_swipeable/), which already does swipe-to-reveal actions — thresholds, overshoot, open/close methods — on the UI thread. Reach for it when the row reveals action buttons. Build the gesture yourself only when the interaction is different in kind: swipe-to-commit with momentum projection, like this one.
210
+
211
+ ```jsx
212
+ const x = useSharedValue(0);
213
+ const context = useSharedValue(0);
214
+
215
+ const pan = useMemo(
216
+ () =>
217
+ Gesture.Pan()
218
+ .activeOffsetX([-10, 10]) // must declare the axis, or it fights the vertical scroll
219
+ .onStart(() => {
220
+ context.set(x.get());
221
+ }) // grab mid-spring continues from where the row is, not from 0
222
+ .onUpdate((e) => {
223
+ x.set(Math.min(0, context.get() + e.translationX));
224
+ })
225
+ .onEnd((e) => {
226
+ const projected = x.get() + project(e.velocityX);
227
+ if (projected < -SWIPE_THRESHOLD) {
228
+ x.set(
229
+ withTiming(-WIDTH, { duration: 200, easing: EASE_OUT }, (f) => {
230
+ if (f) scheduleOnRN(onDelete, id);
231
+ }),
232
+ );
233
+ } else {
234
+ x.set(withSpring(0, { duration: 300, dampingRatio: 1, velocity: e.velocityX }));
235
+ }
236
+ }),
237
+ [onDelete, id],
238
+ );
239
+ ```
240
+
241
+ Closing the gap the deleted row left is the list's job, not the row's:
242
+
243
+ ```jsx
244
+ const ROW_CLOSE = LinearTransition.duration(200); // module scope — builders rebuilt in render cost every re-render
245
+
246
+ <Animated.FlatList data={items} itemLayoutAnimation={ROW_CLOSE} ... />
247
+ ```
248
+
249
+ `activeOffsetX` is the mobile-specific part. A pan handler inside a scroll view with no axis declared will steal vertical scrolls, and the list will feel broken in a way that looks like a scrolling bug rather than a gesture bug.
250
+
251
+ ---
252
+
253
+ ## Collapsing header on scroll
254
+
255
+ ```jsx
256
+ const scrollY = useSharedValue(0);
257
+ const onScroll = useAnimatedScrollHandler((e) => { scrollY.set(e.contentOffset.y); });
258
+
259
+ const titleStyle = useAnimatedStyle(() => ({
260
+ opacity: interpolate(scrollY.get(), [0, 60], [1, 0], Extrapolation.CLAMP),
261
+ transform: [{ translateY: interpolate(scrollY.get(), [0, 60], [0, -12], Extrapolation.CLAMP) }],
262
+ }));
263
+
264
+ <Animated.ScrollView onScroll={onScroll} scrollEventThrottle={16}>
265
+ ```
266
+
267
+ **Never animate the header's `height` to collapse it.** That runs a layout pass on the header and everything below it on every scroll frame — the one animation guaranteed to stutter, because it's competing with the scroll itself. Give the container a fixed height and translate the content inside it, clipping with `overflow: 'hidden'`.
268
+
269
+ `Extrapolation.CLAMP` is not optional: without it, scrolling past 60 keeps driving opacity negative and the header reappears inverted at the bottom of a long list.
270
+
271
+ ---
272
+
273
+ ## List entrances
274
+
275
+ ```jsx
276
+ // The Reanimated docs recommend building layout animations outside components,
277
+ // or in useMemo — an inline chain in JSX rebuilds the builder on every render.
278
+ // A per-index delay can't live at module scope, so the row memoizes its own:
279
+ function Row({ item, index }) {
280
+ const entering = useMemo(() => FadeInDown.duration(250).delay(index * 40), [index]);
281
+ return <Animated.View entering={entering}>{/* ... */}</Animated.View>;
282
+ }
283
+
284
+ {
285
+ items.map((item, i) => <Row key={item.id} item={item} index={i} />);
286
+ }
287
+ ```
288
+
289
+ Stagger 30–80ms. Longer feels slow, shorter reads as simultaneous.
290
+
291
+ **Never put `entering` on a row inside `FlatList`, `FlashList`, or any virtualized list.** Rows are recycled, so the animation re-fires every time one scrolls back into view — the list appears to flicker while the user scrolls. Animate the list container once on mount, or use `itemLayoutAnimation` for reflow only.
292
+
293
+ Entrance animations are for content the user asked for and is waiting on. A list they scroll past all day should already be there.
294
+
295
+ ---
296
+
297
+ ## Keyboard-synced UI
298
+
299
+ Needs its own module and a one-time provider ([Expo keyboard guide](https://docs.expo.dev/guides/keyboard-handling/)):
300
+
301
+ ```bash
302
+ npx expo install react-native-keyboard-controller
303
+ ```
304
+
305
+ ```jsx
306
+ import { KeyboardProvider } from "react-native-keyboard-controller";
307
+
308
+ // Root _layout, next to GestureHandlerRootView — hooks below do nothing without it.
309
+ <KeyboardProvider>
310
+ <Stack />
311
+ </KeyboardProvider>;
312
+ ```
313
+
314
+ ```jsx
315
+ import { useReanimatedKeyboardAnimation } from "react-native-keyboard-controller";
316
+
317
+ const { height } = useReanimatedKeyboardAnimation(); // 0 → -keyboardHeight, on the UI thread
318
+ const footerStyle = useAnimatedStyle(() => ({ transform: [{ translateY: height.get() }] }));
319
+ ```
320
+
321
+ Never build this from `Keyboard.addListener` plus a timing animation. The keyboard rides a private system curve, the event arrives on the JS thread after the keyboard has already started moving, and any duration you pick will visibly lag or lead it. The UI must be driven by the keyboard's actual position, frame by frame.
322
+
323
+ ---
324
+
325
+ ## Tab / segmented indicator
326
+
327
+ Measure once, then animate transforms.
328
+
329
+ ```jsx
330
+ const [layouts, setLayouts] = useState({}); // measured with onLayout, not per frame
331
+ const x = useSharedValue(0);
332
+ const w = useSharedValue(0);
333
+
334
+ useEffect(() => {
335
+ const l = layouts[active];
336
+ if (!l) return;
337
+ x.set(withTiming(l.x, { duration: 250, easing: EASE_IN_OUT }));
338
+ w.set(withTiming(l.width, { duration: 250, easing: EASE_IN_OUT }));
339
+ }, [active, layouts]);
340
+
341
+ const pillStyle = useAnimatedStyle(() => ({
342
+ transform: [{ translateX: x.get() }],
343
+ width: w.get(),
344
+ }));
345
+ ```
346
+
347
+ This is the sanctioned `width` animation: the pill is absolutely positioned with no children, so nothing else re-lays-out, and its corner radius survives — `scaleX` would smear the corners into ovals.
348
+
349
+ `ease-in-out`, because the pill is moving across the screen rather than entering or leaving it. Fire `Haptics.selectionAsync()` on the press, not when the pill lands.
350
+
351
+ ---
352
+
353
+ ## Screen transitions (Expo Router)
354
+
355
+ Configure the native stack. Never rebuild a screen transition in JS: the native one runs on the platform side, keeps the interactive back gesture, and matches every other app on the device.
356
+
357
+ ```jsx
358
+ <Stack screenOptions={{ animation: reduced ? "fade" : "default" }}>
359
+ <Stack.Screen
360
+ name="settings"
361
+ options={{ animation: "slide_from_right", animationMatchesGesture: true }}
362
+ />
363
+ <Stack.Screen name="compose" options={{ presentation: "modal" }} />
364
+ <Stack.Screen
365
+ name="filter"
366
+ options={{
367
+ presentation: "formSheet",
368
+ sheetAllowedDetents: "fitToContents",
369
+ sheetGrabberVisible: true,
370
+ }}
371
+ />
372
+ </Stack>
373
+ ```
374
+
375
+ | Navigation | Option |
376
+ | ------------------------------------------- | ------------------------------------------------------ |
377
+ | Deeper into a hierarchy | `animation: 'default'` — the platform push, unmodified |
378
+ | A self-contained task the user can abandon | `presentation: 'modal'` |
379
+ | A short interruption: picker, filter, share | `presentation: 'formSheet'` with detents |
380
+ | Between tabs | `animation: 'none'` |
381
+ | Reduced motion | `animation: 'fade'` |
382
+
383
+ `animationMatchesGesture: true` makes the iOS back swipe run your transition in reverse under the finger, instead of the default push. Set it whenever you set a custom `animation`, or dragging back looks like a different app than pushing forward.
384
+
385
+ `formSheet` is native on both platforms, but not the same on both — the [Expo modal docs](https://docs.expo.dev/router/advanced/modals/#form-sheet-presentation) have the full list:
386
+
387
+ - **Android caps detents at three.** A longer `sheetAllowedDetents` array works on iOS and silently truncates on Android — design for three.
388
+ - **`sheetGrabberVisible` is iOS-only.** Android shows no grabber; don't rely on it as the only "this is draggable" affordance.
389
+ - **Android form sheets can't host native headers or nested stacks.** Keep the sheet's content a single screen; if it needs its own navigation, use `presentation: 'modal'` instead.
390
+ - **`fitToContents` needs explicitly sized content.** A `flex: 1` root has no intrinsic height to fit — size the content, or the detent is wrong.
391
+
392
+ ---
393
+
394
+ ## Toast
395
+
396
+ ```jsx
397
+ // Module scope — layout-animation builders live outside the component.
398
+ const TOAST_ENTER = FadeInDown.duration(300).easing(EASE_OUT);
399
+ const TOAST_EXIT = FadeOutDown.duration(250).easing(EASE_OUT);
400
+
401
+ <Animated.View
402
+ entering={TOAST_ENTER}
403
+ exiting={TOAST_EXIT}
404
+ style={{ position: "absolute", bottom: insets.bottom + 16, left: 16, right: 16 }}
405
+ />;
406
+ ```
407
+
408
+ - **The 300ms cap holds here too.** A toast isn't an exception — it's uninvited, so if anything it should be quicker and quieter than motion the user asked for.
409
+ - **It exits the way it entered.** Entering from the bottom and leaving to the side reads as two unrelated elements.
410
+ - **Exit ~20% faster than entry.** The user has finished reading; the arrival deserves the time, the departure doesn't.
411
+ - **Safe area insets, always.** A toast at `bottom: 16` sits under the home indicator on every modern iPhone.
412
+
413
+ If toasts stack and the list reflows, add `itemLayoutAnimation` and expect to tune the opacity against the reflow by eye — there's no formula for that pair. Look at it again the next day.
414
+
415
+ ---
416
+
417
+ ## Firing something once at a threshold
418
+
419
+ When a crossing point matters — a detent, a snap, a pull-to-refresh arming — don't poll it from JS and don't `scheduleOnRN` every frame.
420
+
421
+ ```jsx
422
+ const armed = useSharedValue(false);
423
+
424
+ useAnimatedReaction(
425
+ () => pullDistance.get() > REFRESH_THRESHOLD,
426
+ (isArmed, wasArmed) => {
427
+ if (isArmed !== wasArmed) {
428
+ armed.set(isArmed);
429
+ scheduleOnRN(Haptics.impactAsync, Haptics.ImpactFeedbackStyle.Light);
430
+ }
431
+ },
432
+ );
433
+ ```
434
+
435
+ The comparison runs on the UI thread every frame; the JS call happens twice per pull. That's the pattern for every "do something when the animation reaches X".