@punks/cli 3.2.2 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/AGENTS.md +1 -1
  2. package/dist/BASELINE_CHANGELOG.md +43 -0
  3. package/dist/CHANGELOG.md +24 -0
  4. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  5. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +4 -1
  6. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +5 -2
  7. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +24 -0
  8. package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  9. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/LICENSE +21 -0
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/RECIPES.md +333 -0
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/SKILL.md +203 -0
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md +229 -0
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +36 -3
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  31. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  32. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/RECIPES.md +435 -0
  33. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  34. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  35. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +34 -9
  36. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +18 -11
  37. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  38. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  39. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +9 -2
  40. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +6 -8
  41. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +8 -5
  42. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +29 -14
  43. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +45 -32
  44. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +2 -1
  45. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +86 -12
  46. package/dist/baseline/scaffold-baseline.json +5 -5
  47. package/dist/baseline/scaffold-baseline.tgz +0 -0
  48. package/dist/data/AGENTS.md +1 -1
  49. package/dist/index.js +10 -10
  50. package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  51. package/dist/skills/agnostic/frontend/animate/LICENSE +21 -0
  52. package/dist/skills/agnostic/frontend/animate/RECIPES.md +324 -0
  53. package/dist/skills/agnostic/frontend/animate/SKILL.md +199 -0
  54. package/dist/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  55. package/dist/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  56. package/dist/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  57. package/dist/skills/agnostic/frontend/review-animations/STANDARDS.md +187 -0
  58. package/dist/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  59. package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  60. package/dist/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  61. package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  62. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  63. package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +33 -3
  64. package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  65. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  66. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  67. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  68. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  69. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  70. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  71. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  72. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  73. package/dist/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  74. package/dist/skills/frameworks/expo/animate-expo/RECIPES.md +385 -0
  75. package/dist/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  76. package/dist/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  77. package/dist/skills/phases/delivery-phase/phases/review.md +34 -9
  78. package/dist/skills/phases/delivery-phase/phases/router.md +16 -9
  79. package/dist/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  80. package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  81. package/dist/skills/phases/review-phase/phases/retain-report.md +9 -2
  82. package/dist/skills/phases/review-phase/phases/return-route.md +6 -8
  83. package/dist/skills/phases/review-phase/phases/run-review.md +8 -5
  84. package/dist/skills/phases/review-phase/references/durable-report.md +29 -14
  85. package/dist/skills/phases/review-phase/references/state-graph.md +18 -5
  86. package/dist/skills/phases/review-phase/references/targets.md +2 -1
  87. package/dist/skills/phases/review-phase/scripts/review-contract.mjs +91 -11
  88. package/package.json +52 -9
  89. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.test.ts +0 -130
  90. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.test.ts +0 -135
  91. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts +0 -138
  92. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts +0 -135
  93. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.test.ts +0 -875
  94. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.lifecycle.test.ts +0 -205
  95. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.native.test.ts +0 -2765
  96. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +0 -2108
  97. package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +0 -116
  98. package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +0 -29
package/AGENTS.md CHANGED
@@ -4,7 +4,7 @@ Primary skills here: `autoreview`, `codebase-design`, `effect`, `effect-backend-
4
4
 
5
5
  This app owns the `hi`/`hint` executable, repo detection flow, local scaffold application, bundled baseline fallback, update/diff ergonomics, and release/baseline publishing scripts. Preserve current CLI behavior during monorepo work.
6
6
 
7
- Reusable skill changes in distributed assets are complete only after the root source-first flow: canonical edit, commit, push, `bun run sync:skills`, exact receipt-SHA verification, then baseline publication when requested.
7
+ Reusable skill changes in distributed assets are complete only after the root source-first flow: before editing, verify `git -C /Users/stefan/Desktop/repos/wearedevpunks-skills branch --show-current` returns exactly `main`; stop otherwise. Edit and commit the canonical source only on that checked-out `main` branch; alternate branches or worktrees are out of scope for this flow. Then push, run `bun run sync:skills`, verify the exact receipt SHA, and publish the baseline when requested.
8
8
 
9
9
  Keep consumer-repo product logic out of the CLI. The future backend owns registry, provenance, auth, telemetry, and artifact access; the CLI remains the local scanner, cache, prompt/skill/hook placer, and filesystem writer.
10
10
 
@@ -2,6 +2,49 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## baseline/stable/2026.08.19-animation-react-compiler-lint - 2026-08-19
6
+
7
+ Compatibility: `>=3.3.0 <4`
8
+
9
+ ### Added
10
+
11
+ - Add `animate-expo` to the Expo pack and add `animate` plus `review-animations` to the frontend pack.
12
+ - Retain Emil Kowalski's upstream MIT license and attribution with the distributed animation skills.
13
+
14
+ ### Changed
15
+
16
+ - Enable Oxlint's React Compiler-powered correctness rules for the React pack so compiler validation failures surface during normal lint runs.
17
+
18
+ ## baseline/stable/2026.08.18-requirements-grill-technical-grounding - 2026-08-18
19
+
20
+ Compatibility: `>=3.2.2 <4`
21
+
22
+ ### Changed
23
+
24
+ - Sync canonical `wearedevpunks/skills@eb1026c0355759c8addfb91856beb6bd5eae94f9` from `main`.
25
+ - Ground technical branches in current code before constructing the first question frontier.
26
+ - Ask technical questions from a concrete evidence anchor, observed constraint, and target code consequence.
27
+ - Block completion until every applicable technical dimension is accepted, parked, deferred, or evidence-backed as not applicable.
28
+
29
+ ## baseline/stable/2026.08.18-write-backlog-milestone-membership - 2026-08-18
30
+
31
+ Compatibility: `>=3.2.2 <4`
32
+
33
+ ### Changed
34
+
35
+ - Sync canonical `wearedevpunks/skills@713367ca0846785fa347adcd3e3224b7455e36df` from `main`.
36
+ - Allow stories to share their containing overview milestone when the provider supports membership, while keeping native blockers authoritative for story ordering and never deriving distinct story milestones.
37
+
38
+ ## baseline/stable/2026.08.17-requirements-grill-live-show-me - 2026-08-17
39
+
40
+ Compatibility: `>=3.2.2 <4`
41
+
42
+ ### Changed
43
+
44
+ - Sync canonical `wearedevpunks/skills@6a633da2b18537a53e51172e37c2c7fc2a3b8c5b` from `main`.
45
+ - Use `$show-me` throughout active requirements grilling for difficult questions, meaningful comparisons, interacting parts, and key turning points, selecting the smallest authority-derived view.
46
+ - Place code-grounded topology, dependency direction and DI, seams, boundaries, persistence, and module-shape questions wherever they deepen the active branch while retaining the final persisted-state presentation.
47
+
5
48
  ## baseline/stable/2026.08.17-high-signal-tests - 2026-08-17
6
49
 
7
50
  Compatibility: `>=3.2.1 <4`
package/dist/CHANGELOG.md CHANGED
@@ -4,6 +4,9 @@
4
4
 
5
5
  ### Changed
6
6
 
7
+ - Prepare `baseline/stable/2026.08.18-requirements-grill-technical-grounding` for CLI `>=3.2.2 <4` from canonical `wearedevpunks/skills@eb1026c0355759c8addfb91856beb6bd5eae94f9`, requiring code grounding before the first technical frontier, evidence/constraint/code-consequence questions, and closure only after applicable technical dimensions are resolved.
8
+ - Prepare `baseline/stable/2026.08.18-write-backlog-milestone-membership` for CLI `>=3.2.2 <4` from canonical `wearedevpunks/skills@713367ca0846785fa347adcd3e3224b7455e36df`, allowing stories to share their containing overview milestone without using milestones to order story relations.
9
+ - Prepare `baseline/stable/2026.08.17-requirements-grill-live-show-me` for CLI `>=3.2.2 <4` from canonical `wearedevpunks/skills@6a633da2b18537a53e51172e37c2c7fc2a3b8c5b`, using `$show-me` throughout active requirements grilling and interleaving code-grounded technical questions wherever a branch benefits.
7
10
  - Prepare `baseline/stable/2026.08.17-high-signal-tests` for CLI `>=3.2.1 <4` from canonical `wearedevpunks/skills@ebc83ccfc317c9dbae1f6348a7827cba2783a02d`, strengthening high-signal TDD culling and the scoped source-first skill-release flow.
8
11
 
9
12
  - Sync canonical `wearedevpunks/skills@354d08e26897ddbf28eb667498fdf3363ca2081c` from `main` and rename the domain-document convention from `CONTEXT.md`/`CONTEXT-MAP.md` to `GLOSSARY.md`/`GLOSSARY-MAP.md`, including `GLOSSARY-FORMAT.md`.
@@ -15,8 +18,29 @@
15
18
  ### Changed
16
19
 
17
20
  - Close applicable technical architecture during requirements grilling so specs own accepted topology, boundaries, dependencies, and seams while planning derives execution work.
21
+ - Use `$show-me` throughout active requirements grilling for difficult questions and key turning points, with code-grounded technical depth placed wherever the branch benefits and the final persisted-state presentation retained.
18
22
  - Make Full Delivery continue through its authorized phases and review cycles without confirmation; HITL pauses now require an explicit user request.
19
23
 
24
+ ## 3.3.0 - 2026-08-19
25
+
26
+ ### Added
27
+
28
+ - Add `animate-expo` to the Expo pack and add `animate` plus `review-animations` to the frontend pack, retaining Emil Kowalski's upstream MIT license and attribution with the distributed skills.
29
+
30
+ ### Changed
31
+
32
+ - Scaffold React workspaces with Oxlint's React Compiler-powered correctness rules so compiler validation failures surface during normal lint runs.
33
+
34
+ ## baseline/stable/2026.08.19-animation-react-compiler-lint - 2026-08-19
35
+
36
+ ### Added
37
+
38
+ - Distribute `animate-expo` with the Expo pack and `animate` plus `review-animations` with the frontend pack, including their upstream MIT license and attribution.
39
+
40
+ ### Changed
41
+
42
+ - Enable Oxlint's React Compiler-powered correctness rules for the React pack.
43
+
20
44
  ## 3.2.2 - 2026-08-17
21
45
 
22
46
  ### Fixed
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "channel": "stable",
4
- "version": "2026.08.17-5ef3e434",
5
- "tag": "baseline/stable/2026.08.17-5ef3e434",
6
- "commit": "5ef3e434d5b8afc9b38d803870003ae016a7b558",
4
+ "version": "2026.08.19-animation-react-compiler-lint",
5
+ "tag": "baseline/stable/2026.08.19-animation-react-compiler-lint",
6
+ "commit": "458b025ec77c326c75bde9a8d77e1eaceb0328d5",
7
7
  "sha256": null,
8
8
  "compatibility": {
9
- "cliVersionRange": ">=3.2.2 <3.3.0"
9
+ "cliVersionRange": ">=3.3.0 <3.4.0"
10
10
  },
11
- "generatedAt": "2026-08-17T09:39:49.000Z"
11
+ "generatedAt": "2026-08-19T16:32:01.000Z"
12
12
  }
@@ -94,6 +94,9 @@
94
94
  ]
95
95
  },
96
96
  {
97
+ "categories": {
98
+ "correctness": "error"
99
+ },
97
100
  "description": "Ultracite React preset for rendered app and shared UI code.",
98
101
  "id": "react-core",
99
102
  "jsPlugins": [],
@@ -104,7 +107,7 @@
104
107
  "recommendedFiles": ["<detected-react-workspace>/**/*.{js,jsx,ts,tsx}"],
105
108
  "recommendedWorkspaces": ["detected React workspaces"]
106
109
  },
107
- "plugins": [],
110
+ "plugins": ["react"],
108
111
  "requiredDevDependencies": [],
109
112
  "rules": {},
110
113
  "settings": {}
@@ -173,6 +173,7 @@
173
173
  "promptSurfaces": ["shared-agents", "root-prompt-spec", "workspace-prompt-spec"],
174
174
  "skills": [
175
175
  "add-app-clip",
176
+ "animate-expo",
176
177
  "building-native-ui",
177
178
  "eas-simulator",
178
179
  "eas-update-insights",
@@ -196,7 +197,7 @@
196
197
  },
197
198
  {
198
199
  "category": "surface",
199
- "description": "Frontend pack: agent-browser, design taste, image generation, and frontend domain structure.",
200
+ "description": "Frontend pack: agent-browser, animation authoring/review, design taste, image generation, and frontend domain structure.",
200
201
  "hooks": [],
201
202
  "id": "frontend",
202
203
  "lintAssets": [],
@@ -208,10 +209,12 @@
208
209
  "promptSurfaces": ["shared-agents", "root-prompt-spec", "workspace-prompt-spec"],
209
210
  "skills": [
210
211
  "agent-browser",
212
+ "animate",
211
213
  "design-taste-frontend",
212
214
  "imagegen-frontend-mobile",
213
215
  "imagegen-frontend-web",
214
- "frontend-domain-structure"
216
+ "frontend-domain-structure",
217
+ "review-animations"
215
218
  ],
216
219
  "triggerPackages": []
217
220
  },
@@ -223,6 +223,14 @@
223
223
  "sourceDirectory": "skills/frameworks/expo/add-app-clip",
224
224
  "tier": "framework"
225
225
  },
226
+ {
227
+ "framework": "expo",
228
+ "id": "animate-expo",
229
+ "language": "typescript",
230
+ "requiresTools": [],
231
+ "sourceDirectory": "skills/frameworks/expo/animate-expo",
232
+ "tier": "framework"
233
+ },
226
234
  {
227
235
  "framework": "expo",
228
236
  "id": "building-native-ui",
@@ -423,6 +431,14 @@
423
431
  "sourceDirectory": "skills/frameworks/pulumi/package-usage",
424
432
  "tier": "framework"
425
433
  },
434
+ {
435
+ "framework": null,
436
+ "id": "animate",
437
+ "language": null,
438
+ "requiresTools": [],
439
+ "sourceDirectory": "skills/agnostic/frontend/animate",
440
+ "tier": "agnostic"
441
+ },
426
442
  {
427
443
  "framework": null,
428
444
  "id": "design-taste-frontend",
@@ -455,6 +471,14 @@
455
471
  "sourceDirectory": "skills/agnostic/frontend/frontend-domain-structure",
456
472
  "tier": "agnostic"
457
473
  },
474
+ {
475
+ "framework": null,
476
+ "id": "review-animations",
477
+ "language": null,
478
+ "requiresTools": [],
479
+ "sourceDirectory": "skills/agnostic/frontend/review-animations",
480
+ "tier": "agnostic"
481
+ },
458
482
  {
459
483
  "framework": null,
460
484
  "id": "finder-phase",
@@ -37,7 +37,12 @@ Then:
37
37
  - treat `.devpunks/specs/prompts/**` as the complete prompt-authoring contract; apply every scoped-prompt criterion it contains
38
38
  - ground scoped prompts in current code evidence: structure, placement, dependencies, and boundaries first; applied coding conventions second; enforced constraints outrank the nearest stable module-family pattern
39
39
  - keep each scoped prompt lean with exact-trigger pointers to co-authored reference content; references disclose content and never create deeper prompt scopes
40
- - render every selected non-phase skill in a `Skill | What / when` table derived from its complete `SKILL.md`
40
+ - render every selected non-phase skill in one final `## Skills` table with
41
+ `Skill | Exact trigger`; each row names the exact invocation condition
42
+ - open every selected installed skill's `SKILL.md`; that installed file remains
43
+ workflow authority
44
+ - keep root `AGENTS.md` table-free; phase wrappers remain global orchestration
45
+ entrypoints and are excluded from scoped tables
41
46
  - always link `opensrc/README.md` from scoped prompts and read it when work depends on third-party library behavior
42
47
  - reconcile only the generated skills, prompts, lint, hooks, scripts, subagents, tools, and wiki assets in scope
43
48
  - preserve repo-owned edits and ask before changing project policy
@@ -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,333 @@
1
+ # Animation Recipes
2
+
3
+ Ready-to-build implementations for the cases that come up most. Start from the recipe, then adapt — don't rebuild from scratch.
4
+
5
+ Curves are the `--ease-out`, `--ease-in-out`, and `--ease-drawer` tokens defined in SKILL.md.
6
+
7
+ ---
8
+
9
+ ## Button press
10
+
11
+ Any pressable element. Instant feedback that the interface heard the user.
12
+
13
+ ```css
14
+ .button {
15
+ transition: transform 160ms var(--ease-out);
16
+ }
17
+
18
+ .button:active {
19
+ transform: scale(0.97);
20
+ }
21
+ ```
22
+
23
+ `scale()` scales children too — the label and icons come along, which is what makes it read as a physical press.
24
+
25
+ No hover gating needed here: `:active` is a real press on touch. Gate any `:hover` styling separately.
26
+
27
+ ---
28
+
29
+ ## Dropdown, popover, menu, select
30
+
31
+ Scales out of its trigger, not out of thin air.
32
+
33
+ ```css
34
+ .popover {
35
+ transform-origin: var(--transform-origin); /* Base UI supplies this */
36
+ transition:
37
+ opacity 200ms var(--ease-out),
38
+ transform 200ms var(--ease-out);
39
+ }
40
+
41
+ .popover[data-starting-style],
42
+ .popover[data-ending-style] {
43
+ opacity: 0;
44
+ transform: scale(0.95);
45
+ }
46
+ ```
47
+
48
+ The `transform-origin` is the whole point — the panel should look like it came out of the thing you clicked.
49
+
50
+ ---
51
+
52
+ ## Tooltip
53
+
54
+ Same shape as a popover, faster, plus the detail most implementations miss.
55
+
56
+ ```css
57
+ .tooltip {
58
+ transform-origin: var(--transform-origin);
59
+ transition:
60
+ transform 125ms var(--ease-out),
61
+ opacity 125ms var(--ease-out);
62
+ }
63
+
64
+ .tooltip[data-starting-style],
65
+ .tooltip[data-ending-style] {
66
+ opacity: 0;
67
+ transform: scale(0.97);
68
+ }
69
+
70
+ /* Once one tooltip is open, neighbours open instantly */
71
+ .tooltip[data-instant] {
72
+ transition-duration: 0ms;
73
+ }
74
+ ```
75
+
76
+ The initial delay prevents accidental activation. After that, skipping both the delay and the animation makes the whole toolbar feel faster.
77
+
78
+ ---
79
+
80
+ ## Modal
81
+
82
+ The one popover that stays centered.
83
+
84
+ ```css
85
+ .modal {
86
+ transform-origin: center; /* exempt — not anchored to a trigger */
87
+ transition:
88
+ opacity 250ms var(--ease-out),
89
+ transform 250ms var(--ease-out);
90
+ }
91
+
92
+ .modal[data-starting-style],
93
+ .modal[data-ending-style] {
94
+ opacity: 0;
95
+ transform: scale(0.96);
96
+ }
97
+
98
+ .backdrop {
99
+ transition: opacity 250ms var(--ease-out);
100
+ }
101
+ ```
102
+
103
+ Animate the backdrop's opacity alongside it so they read as one surface.
104
+
105
+ ---
106
+
107
+ ## Drawer / sheet
108
+
109
+ ```css
110
+ .drawer {
111
+ transform: translateY(0);
112
+ transition: transform 500ms var(--ease-drawer);
113
+ }
114
+
115
+ .drawer[data-closed] {
116
+ transform: translateY(100%);
117
+ }
118
+ ```
119
+
120
+ This is how Vaul hides a drawer before animating it in.
121
+
122
+ Add drag and it becomes a gesture problem — see **Drag to dismiss** below.
123
+
124
+ ---
125
+
126
+ ## Toast
127
+
128
+ ```css
129
+ .toast {
130
+ opacity: 1;
131
+ transform: translateY(0);
132
+ transition:
133
+ opacity 400ms ease,
134
+ transform 400ms ease;
135
+
136
+ @starting-style {
137
+ opacity: 0;
138
+ transform: translateY(100%);
139
+ }
140
+ }
141
+ ```
142
+
143
+ - `ease` rather than `ease-out`, slightly slower than typical UI: Sonner reads as elegant partly because its motion is tuned to the component's personality rather than to the generic UI budget.
144
+ - If `@starting-style` isn't available, fall back to the mount flag:
145
+
146
+ ```jsx
147
+ useEffect(() => {
148
+ setMounted(true);
149
+ }, []);
150
+ // <div data-mounted={mounted}>
151
+ ```
152
+
153
+ When toasts stack and the list reflows, the opacity change has to work against the height change. There's no formula for that pair — adjust until it feels right, then check it again the next day.
154
+
155
+ ---
156
+
157
+ ## Accordion / collapse
158
+
159
+ ```css
160
+ .content {
161
+ overflow: hidden;
162
+ transition:
163
+ height 200ms var(--ease-out),
164
+ opacity 200ms var(--ease-out);
165
+ }
166
+ ```
167
+
168
+ Keep it short — this is one of the few animations that costs layout on every frame, so a long duration is expensive as well as sluggish. Measure the content height in JS (or use a headless primitive that supplies it) rather than animating to `auto`.
169
+
170
+ ---
171
+
172
+ ## Stagger a group entrance
173
+
174
+ For a list or grid the user sees occasionally — not for a list they scroll past all day.
175
+
176
+ ```css
177
+ .item {
178
+ opacity: 0;
179
+ transform: translateY(8px);
180
+ animation: fadeIn 300ms var(--ease-out) forwards;
181
+ }
182
+
183
+ .item:nth-child(2) {
184
+ animation-delay: 50ms;
185
+ }
186
+ .item:nth-child(3) {
187
+ animation-delay: 100ms;
188
+ }
189
+ .item:nth-child(4) {
190
+ animation-delay: 150ms;
191
+ }
192
+
193
+ @keyframes fadeIn {
194
+ to {
195
+ opacity: 1;
196
+ transform: translateY(0);
197
+ }
198
+ }
199
+ ```
200
+
201
+ Stagger is decorative — it must never block interaction while it plays.
202
+
203
+ ---
204
+
205
+ ## Hold to confirm
206
+
207
+ For destructive actions where a plain click is too easy to fire by accident.
208
+
209
+ ```css
210
+ .overlay {
211
+ clip-path: inset(0 100% 0 0);
212
+ transition: clip-path 200ms var(--ease-out); /* release: snappy */
213
+ }
214
+
215
+ .button:active .overlay {
216
+ clip-path: inset(0 0 0 0);
217
+ transition: clip-path 2s linear; /* press: slow and deliberate */
218
+ }
219
+
220
+ .button:active {
221
+ transform: scale(0.97);
222
+ }
223
+ ```
224
+
225
+ `linear` is correct here — the fill is a progress indicator, and progress shouldn't ease.
226
+
227
+ ---
228
+
229
+ ## Tab indicator with a color transition
230
+
231
+ Timing individual color transitions across a tab list never quite lands. Clip instead.
232
+
233
+ Duplicate the tab list. Style the copy as the active state — different background, different text color. Clip the copy so only the active tab shows, and animate the clip on change:
234
+
235
+ ```css
236
+ .tabs-active-copy {
237
+ clip-path: inset(0 60% 0 20%); /* driven by the active tab's position */
238
+ transition: clip-path 250ms var(--ease-in-out);
239
+ }
240
+ ```
241
+
242
+ The text and background change together, in perfect sync, because they're one element being revealed rather than two colors being interpolated.
243
+
244
+ ---
245
+
246
+ ## Scroll reveal
247
+
248
+ Marketing surfaces only. Don't do this to functional UI a user visits daily.
249
+
250
+ ```css
251
+ .reveal {
252
+ clip-path: inset(0 0 100% 0);
253
+ transition: clip-path 600ms var(--ease-in-out);
254
+ }
255
+
256
+ .reveal[data-visible] {
257
+ clip-path: inset(0 0 0 0);
258
+ }
259
+ ```
260
+
261
+ Trigger with `IntersectionObserver`, or Motion's `useInView` with `{ once: true, margin: "-100px" }`. Fire it once — re-animating on every scroll-by is an interface fighting its reader.
262
+
263
+ ---
264
+
265
+ ## Drag to dismiss
266
+
267
+ The gesture recipe. Springs, not durations, because the user can reverse mid-motion.
268
+
269
+ ```js
270
+ // Dismiss on a flick, not just on distance
271
+ const timeTaken = Date.now() - dragStartTime.current;
272
+ const velocity = Math.abs(swipeAmount) / timeTaken;
273
+
274
+ if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) {
275
+ dismiss();
276
+ }
277
+ ```
278
+
279
+ ```js
280
+ // Set transform on the dragged element directly.
281
+ // Driving it through a CSS variable on the parent recalcs styles for every child.
282
+ element.style.transform = `translateY(${distance}px)`;
283
+ ```
284
+
285
+ Four details that separate a good drag from a bad one:
286
+
287
+ - **Pointer capture** once the drag starts, so it continues when the pointer leaves the element's bounds.
288
+ - **Multi-touch protection** — `if (isDragging) return` on new touch points, or switching fingers mid-drag makes the element jump.
289
+ - **Damping past boundaries** — dragging beyond a natural edge moves the element less the further it goes. Real things slow before they stop.
290
+ - **Friction, not a wall** — allow the over-drag with rising resistance rather than refusing it.
291
+
292
+ Settle with a spring so an interrupted drag keeps its velocity:
293
+
294
+ ```js
295
+ { type: "spring", duration: 0.5, bounce: 0.2 }
296
+ ```
297
+
298
+ ---
299
+
300
+ ## Masking a crossfade that won't settle
301
+
302
+ When two states overlap visibly during a transition and no amount of easing or duration tuning fixes it, blur the seam:
303
+
304
+ ```css
305
+ .content {
306
+ transition:
307
+ filter 200ms ease,
308
+ opacity 200ms ease;
309
+ }
310
+
311
+ .content.transitioning {
312
+ filter: blur(2px);
313
+ opacity: 0.7;
314
+ }
315
+ ```
316
+
317
+ Without blur the eye reads two distinct objects swapping. Blur blends them into one perceived transformation. Keep it under 20px — heavy blur is expensive, especially in Safari.
318
+
319
+ ---
320
+
321
+ ## Programmatic, without a library
322
+
323
+ When the motion needs JS control but not a dependency, WAAPI gives you CSS-grade performance:
324
+
325
+ ```js
326
+ element.animate([{ clipPath: "inset(0 0 100% 0)" }, { clipPath: "inset(0 0 0 0)" }], {
327
+ duration: 1000,
328
+ fill: "forwards",
329
+ easing: "cubic-bezier(0.77, 0, 0.175, 1)",
330
+ });
331
+ ```
332
+
333
+ Hardware-accelerated, interruptible, no bundle cost.