@luci-dev/skills 0.0.0-stage → 0.5.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 (389) hide show
  1. package/dist/benchmark.d.ts +48 -0
  2. package/dist/benchmark.d.ts.map +1 -0
  3. package/dist/benchmark.js +84 -0
  4. package/dist/benchmark.js.map +1 -0
  5. package/dist/discovery.d.ts +105 -0
  6. package/dist/discovery.d.ts.map +1 -0
  7. package/dist/discovery.js +271 -0
  8. package/dist/discovery.js.map +1 -0
  9. package/dist/drafts.d.ts +20 -0
  10. package/dist/drafts.d.ts.map +1 -0
  11. package/dist/drafts.js +57 -0
  12. package/dist/drafts.js.map +1 -0
  13. package/dist/github.d.ts +49 -0
  14. package/dist/github.d.ts.map +1 -0
  15. package/dist/github.js +93 -0
  16. package/dist/github.js.map +1 -0
  17. package/dist/import.d.ts +80 -0
  18. package/dist/import.d.ts.map +1 -0
  19. package/dist/import.js +286 -0
  20. package/dist/import.js.map +1 -0
  21. package/dist/index.d.ts +17 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +17 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/licenses.d.ts +30 -0
  26. package/dist/licenses.d.ts.map +1 -0
  27. package/dist/licenses.js +116 -0
  28. package/dist/licenses.js.map +1 -0
  29. package/dist/linter.d.ts +35 -0
  30. package/dist/linter.d.ts.map +1 -0
  31. package/dist/linter.js +262 -0
  32. package/dist/linter.js.map +1 -0
  33. package/dist/lss.d.ts +74 -0
  34. package/dist/lss.d.ts.map +1 -0
  35. package/dist/lss.js +273 -0
  36. package/dist/lss.js.map +1 -0
  37. package/dist/orchestrator.d.ts +164 -0
  38. package/dist/orchestrator.d.ts.map +1 -0
  39. package/dist/orchestrator.js +370 -0
  40. package/dist/orchestrator.js.map +1 -0
  41. package/dist/packs.d.ts +50 -0
  42. package/dist/packs.d.ts.map +1 -0
  43. package/dist/packs.js +166 -0
  44. package/dist/packs.js.map +1 -0
  45. package/dist/preferences.d.ts +18 -0
  46. package/dist/preferences.d.ts.map +1 -0
  47. package/dist/preferences.js +57 -0
  48. package/dist/preferences.js.map +1 -0
  49. package/dist/project.d.ts +45 -0
  50. package/dist/project.d.ts.map +1 -0
  51. package/dist/project.js +183 -0
  52. package/dist/project.js.map +1 -0
  53. package/dist/rankability.d.ts +51 -0
  54. package/dist/rankability.d.ts.map +1 -0
  55. package/dist/rankability.js +217 -0
  56. package/dist/rankability.js.map +1 -0
  57. package/dist/registry.d.ts +82 -0
  58. package/dist/registry.d.ts.map +1 -0
  59. package/dist/registry.js +300 -0
  60. package/dist/registry.js.map +1 -0
  61. package/dist/trust.d.ts +13 -0
  62. package/dist/trust.d.ts.map +1 -0
  63. package/dist/trust.js +41 -0
  64. package/dist/trust.js.map +1 -0
  65. package/dist/types.d.ts +44 -0
  66. package/dist/types.d.ts.map +1 -0
  67. package/dist/types.js +2 -0
  68. package/dist/types.js.map +1 -0
  69. package/library/3d/threejs/LICENSE.txt +21 -0
  70. package/library/3d/threejs/NOTICE.md +7 -0
  71. package/library/3d/threejs/SKILL.md +102 -0
  72. package/library/3d/threejs/luci.json +39 -0
  73. package/library/accessibility/accessibility-baseline/SKILL.md +51 -0
  74. package/library/accessibility/accessibility-baseline/luci.json +33 -0
  75. package/library/accessibility/fixing-accessibility/NOTICE.md +6 -0
  76. package/library/accessibility/fixing-accessibility/SKILL.md +141 -0
  77. package/library/accessibility/fixing-accessibility/luci.json +36 -0
  78. package/library/animation-motion/animation-systems/LICENSE.txt +21 -0
  79. package/library/animation-motion/animation-systems/NOTICE.md +7 -0
  80. package/library/animation-motion/animation-systems/SKILL.md +192 -0
  81. package/library/animation-motion/animation-systems/luci.json +32 -0
  82. package/library/animation-motion/animejs/SKILL.md +64 -0
  83. package/library/animation-motion/animejs/luci.json +12 -0
  84. package/library/animation-motion/motion-dev/SKILL.md +69 -0
  85. package/library/animation-motion/motion-dev/luci.json +13 -0
  86. package/library/animation-motion/react-view-transitions/AGENTS.md +1380 -0
  87. package/library/animation-motion/react-view-transitions/NOTICE.md +6 -0
  88. package/library/animation-motion/react-view-transitions/README.md +44 -0
  89. package/library/animation-motion/react-view-transitions/SKILL.md +334 -0
  90. package/library/animation-motion/react-view-transitions/luci.json +40 -0
  91. package/library/animation-motion/react-view-transitions/metadata.json +12 -0
  92. package/library/animation-motion/react-view-transitions/references/css-recipes.md +312 -0
  93. package/library/animation-motion/react-view-transitions/references/implementation.md +170 -0
  94. package/library/animation-motion/react-view-transitions/references/nextjs.md +233 -0
  95. package/library/animation-motion/react-view-transitions/references/patterns.md +274 -0
  96. package/library/animation-motion/react-view-transitions/references/troubleshooting.md +47 -0
  97. package/library/code-quality/code-review/NOTICE.md +6 -0
  98. package/library/code-quality/code-review/SKILL.md +94 -0
  99. package/library/code-quality/code-review/agents/openai.yaml +3 -0
  100. package/library/code-quality/code-review/luci.json +33 -0
  101. package/library/components/company-logos/LICENSE.txt +21 -0
  102. package/library/components/company-logos/NOTICE.md +7 -0
  103. package/library/components/company-logos/SKILL.md +27 -0
  104. package/library/components/company-logos/luci.json +38 -0
  105. package/library/components/container-lines/LICENSE.txt +21 -0
  106. package/library/components/container-lines/NOTICE.md +7 -0
  107. package/library/components/container-lines/SKILL.md +124 -0
  108. package/library/components/container-lines/luci.json +48 -0
  109. package/library/design-systems/build-design-system/NOTICE.md +6 -0
  110. package/library/design-systems/build-design-system/SKILL.md +78 -0
  111. package/library/design-systems/build-design-system/luci.json +29 -0
  112. package/library/design-systems/build-design-system/references/components.md +46 -0
  113. package/library/design-systems/build-design-system/references/glossary.md +77 -0
  114. package/library/design-systems/build-design-system/references/taste.md +37 -0
  115. package/library/design-systems/build-design-system/references/tokens.md +59 -0
  116. package/library/design-systems/build-design-system/references/traps.md +128 -0
  117. package/library/design-systems/build-design-system/scripts/capture-guard.mjs +470 -0
  118. package/library/design-systems/build-design-system/scripts/capture.mjs +355 -0
  119. package/library/design-systems/build-design-system/scripts/check-system.mjs +1883 -0
  120. package/library/design-systems/build-design-system/scripts/find-chromium.mjs +137 -0
  121. package/library/design-systems/build-design-system/scripts/oklch.mjs +221 -0
  122. package/library/design-systems/build-design-system/scripts/pixdiff.mjs +186 -0
  123. package/library/design-systems/component-docs/NOTICE.md +6 -0
  124. package/library/design-systems/component-docs/SKILL.md +50 -0
  125. package/library/design-systems/component-docs/luci.json +30 -0
  126. package/library/design-systems/component-docs/references/doc-format.md +85 -0
  127. package/library/design-systems/create-design-md/NOTICE.md +6 -0
  128. package/library/design-systems/create-design-md/SKILL.md +259 -0
  129. package/library/design-systems/create-design-md/luci.json +38 -0
  130. package/library/design-systems/design-system-boss/NOTICE.md +6 -0
  131. package/library/design-systems/design-system-boss/SKILL.md +58 -0
  132. package/library/design-systems/design-system-boss/luci.json +29 -0
  133. package/library/design-systems/design-system-boss/playbooks/build.md +10 -0
  134. package/library/design-systems/design-system-boss/playbooks/component.md +9 -0
  135. package/library/design-systems/design-system-boss/playbooks/migrate.md +11 -0
  136. package/library/design-systems/design-system-boss/playbooks/review.md +9 -0
  137. package/library/design-systems/migrate-design-system/NOTICE.md +6 -0
  138. package/library/design-systems/migrate-design-system/SKILL.md +62 -0
  139. package/library/design-systems/migrate-design-system/luci.json +33 -0
  140. package/library/design-systems/migrate-design-system/references/correct.md +37 -0
  141. package/library/design-systems/migrate-design-system/references/lessons.md +69 -0
  142. package/library/design-systems/migrate-design-system/references/parity.md +44 -0
  143. package/library/design-systems/migrate-design-system/references/running-many-agents.md +52 -0
  144. package/library/design-systems/migrate-design-system/scripts/bodies-check.mjs +215 -0
  145. package/library/design-systems/migrate-design-system/scripts/land.mjs +433 -0
  146. package/library/design-systems/migrate-design-system/scripts/legacy.mjs +283 -0
  147. package/library/design-systems/migrate-design-system/scripts/parity.mjs +173 -0
  148. package/library/design-systems/token-mapping/NOTICE.md +6 -0
  149. package/library/design-systems/token-mapping/SKILL.md +46 -0
  150. package/library/design-systems/token-mapping/luci.json +25 -0
  151. package/library/design-systems/token-mapping/references/mapping-rules.md +54 -0
  152. package/library/design-systems/ui-review/NOTICE.md +6 -0
  153. package/library/design-systems/ui-review/SKILL.md +53 -0
  154. package/library/design-systems/ui-review/luci.json +29 -0
  155. package/library/design-systems/ui-review/references/criteria.md +49 -0
  156. package/library/frontend/composition-patterns/AGENTS.md +946 -0
  157. package/library/frontend/composition-patterns/NOTICE.md +6 -0
  158. package/library/frontend/composition-patterns/README.md +60 -0
  159. package/library/frontend/composition-patterns/SKILL.md +86 -0
  160. package/library/frontend/composition-patterns/luci.json +33 -0
  161. package/library/frontend/composition-patterns/metadata.json +11 -0
  162. package/library/frontend/composition-patterns/rules/_sections.md +29 -0
  163. package/library/frontend/composition-patterns/rules/_template.md +24 -0
  164. package/library/frontend/composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
  165. package/library/frontend/composition-patterns/rules/architecture-compound-components.md +112 -0
  166. package/library/frontend/composition-patterns/rules/patterns-children-over-render-props.md +87 -0
  167. package/library/frontend/composition-patterns/rules/patterns-explicit-variants.md +100 -0
  168. package/library/frontend/composition-patterns/rules/react19-no-forwardref.md +42 -0
  169. package/library/frontend/composition-patterns/rules/state-context-interface.md +191 -0
  170. package/library/frontend/composition-patterns/rules/state-decouple-implementation.md +113 -0
  171. package/library/frontend/composition-patterns/rules/state-lift-state.md +125 -0
  172. package/library/frontend/design-mobile-apps/NOTICE.md +6 -0
  173. package/library/frontend/design-mobile-apps/SKILL.md +121 -0
  174. package/library/frontend/design-mobile-apps/designing.md +56 -0
  175. package/library/frontend/design-mobile-apps/endpoints.md +362 -0
  176. package/library/frontend/design-mobile-apps/implementing.md +213 -0
  177. package/library/frontend/design-mobile-apps/luci.json +31 -0
  178. package/library/frontend/design-mobile-apps/styling/nativewind.md +57 -0
  179. package/library/frontend/design-mobile-apps/styling/stylesheet.md +28 -0
  180. package/library/frontend/design-mobile-apps/styling/uniwind.md +38 -0
  181. package/library/frontend/frontend-design/LICENSE.txt +202 -0
  182. package/library/frontend/frontend-design/NOTICE.md +6 -0
  183. package/library/frontend/frontend-design/SKILL.md +81 -0
  184. package/library/frontend/frontend-design/luci.json +43 -0
  185. package/library/frontend/react-native-skills/AGENTS.md +2897 -0
  186. package/library/frontend/react-native-skills/NOTICE.md +6 -0
  187. package/library/frontend/react-native-skills/README.md +165 -0
  188. package/library/frontend/react-native-skills/SKILL.md +119 -0
  189. package/library/frontend/react-native-skills/luci.json +33 -0
  190. package/library/frontend/react-native-skills/metadata.json +16 -0
  191. package/library/frontend/react-native-skills/rules/_sections.md +86 -0
  192. package/library/frontend/react-native-skills/rules/_template.md +28 -0
  193. package/library/frontend/react-native-skills/rules/animation-derived-value.md +53 -0
  194. package/library/frontend/react-native-skills/rules/animation-gesture-detector-press.md +95 -0
  195. package/library/frontend/react-native-skills/rules/animation-gpu-properties.md +65 -0
  196. package/library/frontend/react-native-skills/rules/design-system-compound-components.md +66 -0
  197. package/library/frontend/react-native-skills/rules/fonts-config-plugin.md +71 -0
  198. package/library/frontend/react-native-skills/rules/imports-design-system-folder.md +68 -0
  199. package/library/frontend/react-native-skills/rules/js-hoist-intl.md +61 -0
  200. package/library/frontend/react-native-skills/rules/list-performance-callbacks.md +44 -0
  201. package/library/frontend/react-native-skills/rules/list-performance-function-references.md +132 -0
  202. package/library/frontend/react-native-skills/rules/list-performance-images.md +53 -0
  203. package/library/frontend/react-native-skills/rules/list-performance-inline-objects.md +97 -0
  204. package/library/frontend/react-native-skills/rules/list-performance-item-expensive.md +94 -0
  205. package/library/frontend/react-native-skills/rules/list-performance-item-memo.md +82 -0
  206. package/library/frontend/react-native-skills/rules/list-performance-item-types.md +104 -0
  207. package/library/frontend/react-native-skills/rules/list-performance-virtualize.md +67 -0
  208. package/library/frontend/react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
  209. package/library/frontend/react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
  210. package/library/frontend/react-native-skills/rules/navigation-native-navigators.md +188 -0
  211. package/library/frontend/react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
  212. package/library/frontend/react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
  213. package/library/frontend/react-native-skills/rules/react-state-dispatcher.md +91 -0
  214. package/library/frontend/react-native-skills/rules/react-state-fallback.md +56 -0
  215. package/library/frontend/react-native-skills/rules/react-state-minimize.md +65 -0
  216. package/library/frontend/react-native-skills/rules/rendering-no-falsy-and.md +74 -0
  217. package/library/frontend/react-native-skills/rules/rendering-text-in-text-component.md +36 -0
  218. package/library/frontend/react-native-skills/rules/scroll-position-no-state.md +82 -0
  219. package/library/frontend/react-native-skills/rules/state-ground-truth.md +80 -0
  220. package/library/frontend/react-native-skills/rules/ui-expo-image.md +66 -0
  221. package/library/frontend/react-native-skills/rules/ui-image-gallery.md +104 -0
  222. package/library/frontend/react-native-skills/rules/ui-measure-views.md +78 -0
  223. package/library/frontend/react-native-skills/rules/ui-menus.md +174 -0
  224. package/library/frontend/react-native-skills/rules/ui-native-modals.md +77 -0
  225. package/library/frontend/react-native-skills/rules/ui-pressable.md +61 -0
  226. package/library/frontend/react-native-skills/rules/ui-safe-area-scroll.md +65 -0
  227. package/library/frontend/react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
  228. package/library/frontend/react-native-skills/rules/ui-styling.md +87 -0
  229. package/library/frontend/tailwindcss/LICENSE.txt +21 -0
  230. package/library/frontend/tailwindcss/NOTICE.md +7 -0
  231. package/library/frontend/tailwindcss/SKILL.md +83 -0
  232. package/library/frontend/tailwindcss/luci.json +39 -0
  233. package/library/frontend-frameworks/react-best-practices/NOTICE.md +6 -0
  234. package/library/frontend-frameworks/react-best-practices/SKILL.md +151 -0
  235. package/library/frontend-frameworks/react-best-practices/luci.json +39 -0
  236. package/library/general/algorithmic-art/LICENSE.txt +202 -0
  237. package/library/general/algorithmic-art/NOTICE.md +6 -0
  238. package/library/general/algorithmic-art/SKILL.md +409 -0
  239. package/library/general/algorithmic-art/luci.json +27 -0
  240. package/library/general/algorithmic-art/templates/generator_template.js +223 -0
  241. package/library/general/algorithmic-art/templates/viewer.html +599 -0
  242. package/library/general/canvas-design/LICENSE.txt +202 -0
  243. package/library/general/canvas-design/NOTICE.md +6 -0
  244. package/library/general/canvas-design/SKILL.md +134 -0
  245. package/library/general/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  246. package/library/general/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  247. package/library/general/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  248. package/library/general/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  249. package/library/general/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  250. package/library/general/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  251. package/library/general/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  252. package/library/general/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  253. package/library/general/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  254. package/library/general/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  255. package/library/general/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  256. package/library/general/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  257. package/library/general/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  258. package/library/general/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  259. package/library/general/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  260. package/library/general/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  261. package/library/general/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  262. package/library/general/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  263. package/library/general/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  264. package/library/general/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  265. package/library/general/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  266. package/library/general/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  267. package/library/general/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  268. package/library/general/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  269. package/library/general/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  270. package/library/general/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  271. package/library/general/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  272. package/library/general/canvas-design/luci.json +29 -0
  273. package/library/index.json +2507 -0
  274. package/library/interaction/animation-on-scroll/LICENSE.txt +21 -0
  275. package/library/interaction/animation-on-scroll/NOTICE.md +7 -0
  276. package/library/interaction/animation-on-scroll/SKILL.md +115 -0
  277. package/library/interaction/animation-on-scroll/luci.json +38 -0
  278. package/library/micro-interactions/masked-reveal/LICENSE.txt +21 -0
  279. package/library/micro-interactions/masked-reveal/NOTICE.md +7 -0
  280. package/library/micro-interactions/masked-reveal/SKILL.md +187 -0
  281. package/library/micro-interactions/masked-reveal/luci.json +63 -0
  282. package/library/micro-interactions/micro-interaction/NOTICE.md +6 -0
  283. package/library/micro-interactions/micro-interaction/SKILL.md +177 -0
  284. package/library/micro-interactions/micro-interaction/luci.json +52 -0
  285. package/library/micro-interactions/micro-interaction/references/css-recipes.md +142 -0
  286. package/library/micro-interactions/micro-interaction/references/framer-motion-recipes.md +187 -0
  287. package/library/micro-interactions/micro-interaction/scripts/README.md +42 -0
  288. package/library/micro-interactions/micro-interaction/scripts/contact-sheet.sh +17 -0
  289. package/library/micro-interactions/micro-interaction/scripts/seek-shot.sh +21 -0
  290. package/library/performance/fixing-motion-performance/NOTICE.md +6 -0
  291. package/library/performance/fixing-motion-performance/SKILL.md +156 -0
  292. package/library/performance/fixing-motion-performance/luci.json +30 -0
  293. package/library/seo/fixing-metadata/NOTICE.md +6 -0
  294. package/library/seo/fixing-metadata/SKILL.md +111 -0
  295. package/library/seo/fixing-metadata/luci.json +36 -0
  296. package/library/shadcn-ui/migrate-radix-to-base/NOTICE.md +6 -0
  297. package/library/shadcn-ui/migrate-radix-to-base/SKILL.md +178 -0
  298. package/library/shadcn-ui/migrate-radix-to-base/class-mapping.md +62 -0
  299. package/library/shadcn-ui/migrate-radix-to-base/consumer-props.md +58 -0
  300. package/library/shadcn-ui/migrate-radix-to-base/disclosure.md +353 -0
  301. package/library/shadcn-ui/migrate-radix-to-base/display-misc.md +410 -0
  302. package/library/shadcn-ui/migrate-radix-to-base/form-controls.md +390 -0
  303. package/library/shadcn-ui/migrate-radix-to-base/luci.json +33 -0
  304. package/library/shadcn-ui/migrate-radix-to-base/menus.md +409 -0
  305. package/library/shadcn-ui/migrate-radix-to-base/overlays.md +459 -0
  306. package/library/shadcn-ui/migrate-radix-to-base/universal-patterns.md +286 -0
  307. package/library/shadcn-ui/migrate-radix-to-base/wrapper-shapes.md +110 -0
  308. package/library/shadcn-ui/shadcn/NOTICE.md +6 -0
  309. package/library/shadcn-ui/shadcn/SKILL.md +187 -0
  310. package/library/shadcn-ui/shadcn/agents/openai.yml +5 -0
  311. package/library/shadcn-ui/shadcn/assets/shadcn-small.png +0 -0
  312. package/library/shadcn-ui/shadcn/assets/shadcn.png +0 -0
  313. package/library/shadcn-ui/shadcn/assets/showcase/color-pair.tsx +126 -0
  314. package/library/shadcn-ui/shadcn/assets/showcase/preview-states.css +14 -0
  315. package/library/shadcn-ui/shadcn/assets/showcase/state-matrix.tsx +72 -0
  316. package/library/shadcn-ui/shadcn/cli.md +290 -0
  317. package/library/shadcn-ui/shadcn/customization.md +211 -0
  318. package/library/shadcn-ui/shadcn/design-system-page.md +268 -0
  319. package/library/shadcn-ui/shadcn/design-system.md +386 -0
  320. package/library/shadcn-ui/shadcn/evals/evals.json +126 -0
  321. package/library/shadcn-ui/shadcn/luci.json +34 -0
  322. package/library/shadcn-ui/shadcn/mcp.md +105 -0
  323. package/library/shadcn-ui/shadcn/references/updating-components.md +91 -0
  324. package/library/shadcn-ui/shadcn/references/workflow.md +31 -0
  325. package/library/shadcn-ui/shadcn/registry.md +277 -0
  326. package/library/shadcn-ui/shadcn/rules/base-vs-radix.md +306 -0
  327. package/library/shadcn-ui/shadcn/rules/chat.md +507 -0
  328. package/library/shadcn-ui/shadcn/rules/composition.md +213 -0
  329. package/library/shadcn-ui/shadcn/rules/forms.md +192 -0
  330. package/library/shadcn-ui/shadcn/rules/icons.md +101 -0
  331. package/library/shadcn-ui/shadcn/rules/styling.md +185 -0
  332. package/library/shadcn-ui/shadcn/scripts/showcase-coverage.mjs +53 -0
  333. package/library/systems/baseline-ui/NOTICE.md +6 -0
  334. package/library/systems/baseline-ui/SKILL.md +90 -0
  335. package/library/systems/baseline-ui/luci.json +35 -0
  336. package/library/testing/tdd/NOTICE.md +6 -0
  337. package/library/testing/tdd/SKILL.md +43 -0
  338. package/library/testing/tdd/agents/openai.yaml +3 -0
  339. package/library/testing/tdd/luci.json +29 -0
  340. package/library/testing/tdd/mocking.md +59 -0
  341. package/library/testing/tdd/tests.md +77 -0
  342. package/library/testing/webapp-testing/LICENSE.txt +202 -0
  343. package/library/testing/webapp-testing/NOTICE.md +6 -0
  344. package/library/testing/webapp-testing/SKILL.md +100 -0
  345. package/library/testing/webapp-testing/examples/console_logging.py +35 -0
  346. package/library/testing/webapp-testing/examples/element_discovery.py +40 -0
  347. package/library/testing/webapp-testing/examples/static_html_automation.py +33 -0
  348. package/library/testing/webapp-testing/luci.json +33 -0
  349. package/library/testing/webapp-testing/scripts/with_server.py +106 -0
  350. package/library/ui-ux/improve-ui/NOTICE.md +6 -0
  351. package/library/ui-ux/improve-ui/SKILL.md +127 -0
  352. package/library/ui-ux/improve-ui/agents/openai.yaml +13 -0
  353. package/library/ui-ux/improve-ui/luci.json +47 -0
  354. package/library/ui-ux/improve-ui/references/plan-template.md +55 -0
  355. package/library/ui-ux/landing-page/LICENSE.txt +21 -0
  356. package/library/ui-ux/landing-page/NOTICE.md +7 -0
  357. package/library/ui-ux/landing-page/SKILL.md +213 -0
  358. package/library/ui-ux/landing-page/luci.json +47 -0
  359. package/library/ui-ux/pricing-page/LICENSE.txt +21 -0
  360. package/library/ui-ux/pricing-page/NOTICE.md +7 -0
  361. package/library/ui-ux/pricing-page/SKILL.md +217 -0
  362. package/library/ui-ux/pricing-page/luci.json +47 -0
  363. package/library/ui-ux/prototype/LOGIC.md +67 -0
  364. package/library/ui-ux/prototype/NOTICE.md +6 -0
  365. package/library/ui-ux/prototype/SKILL.md +31 -0
  366. package/library/ui-ux/prototype/UI.md +112 -0
  367. package/library/ui-ux/prototype/agents/openai.yaml +3 -0
  368. package/library/ui-ux/prototype/luci.json +33 -0
  369. package/library/ui-ux/theme-factory/LICENSE.txt +202 -0
  370. package/library/ui-ux/theme-factory/NOTICE.md +6 -0
  371. package/library/ui-ux/theme-factory/SKILL.md +62 -0
  372. package/library/ui-ux/theme-factory/luci.json +35 -0
  373. package/library/ui-ux/theme-factory/themes/arctic-frost.md +19 -0
  374. package/library/ui-ux/theme-factory/themes/botanical-garden.md +19 -0
  375. package/library/ui-ux/theme-factory/themes/desert-rose.md +19 -0
  376. package/library/ui-ux/theme-factory/themes/forest-canopy.md +19 -0
  377. package/library/ui-ux/theme-factory/themes/golden-hour.md +19 -0
  378. package/library/ui-ux/theme-factory/themes/midnight-galaxy.md +19 -0
  379. package/library/ui-ux/theme-factory/themes/modern-minimalist.md +19 -0
  380. package/library/ui-ux/theme-factory/themes/ocean-depths.md +19 -0
  381. package/library/ui-ux/theme-factory/themes/sunset-boulevard.md +19 -0
  382. package/library/ui-ux/theme-factory/themes/tech-innovation.md +19 -0
  383. package/package.json +21 -3
  384. package/packs/design-system-build.json +10 -0
  385. package/packs/design-system.json +16 -0
  386. package/packs/marketing.json +11 -0
  387. package/packs/motion.json +12 -0
  388. package/packs/ui.json +13 -0
  389. package/README.md +0 -3
@@ -0,0 +1,233 @@
1
+ # View Transitions in Next.js
2
+
3
+ ## Setup
4
+
5
+ `<ViewTransition>` works in the App Router with no configuration. The bundled React channel includes it, and Next.js navigations run in React Transitions. Do **not** add the old `experimental.viewTransition` flag or install `react@canary` into a Next.js app.
6
+
7
+ Read the current [Next.js View Transitions guide](https://nextjs.org/docs/app/guides/view-transitions) and the matching guide under `node_modules/next/dist/docs/` before editing. The installed version is authoritative for flags and API signatures.
8
+
9
+ Because every link click is a transition, any VT with `default="auto"` fires on **every** navigation — use `default="none"` to prevent competing animations.
10
+
11
+ For unexpected or broken animation behavior, see [troubleshooting.md](troubleshooting.md).
12
+
13
+ ---
14
+
15
+ ## Next.js Implementation Additions
16
+
17
+ When following [implementation.md](implementation.md), apply these additions:
18
+
19
+ **Step 4:** Use `transitionTypes` on `<Link>` — see [The `transitionTypes` Prop](#the-transitiontypes-prop-on-nextlink). If the animation depends on dynamic destination content, also see [When Content Must Be Ready](#when-content-must-be-ready).
20
+
21
+ **After Step 6:** For same-route dynamic segments (e.g., `/collection/[slug]`), use the `key` + `name` + `share` pattern — see [Same-Route Dynamic Segment Transitions](#same-route-dynamic-segment-transitions).
22
+
23
+ ---
24
+
25
+ ## Layout-Level ViewTransition
26
+
27
+ **Do NOT add a layout-level VT wrapping `{children}` if pages have their own VTs.** A nested VT skips its own enter/exit only when it mounts or unmounts *as one unit* with a parent VT, which is exactly what a layout VT wrapping `{children}` causes — page-level enter/exit will silently not work. Remove the layout VT entirely. Nesting is otherwise fine and sometimes required: a child VT inside a *persistent* parent VT fires enter/exit normally, and two nested boundaries are the intended shape for [shared elements inside list items](../SKILL.md#composing-shared-elements-with-list-identity).
28
+
29
+ A bare `<ViewTransition>` in layout works only if pages have **no** VTs of their own.
30
+
31
+ **Layouts persist across navigations** — `enter`/`exit` only fire on initial mount, not on route changes. Don't use type-keyed maps in layouts. Because layouts persist, chrome hosted in one (nav, sidebar, player) keeps its state across navigations for free — no `Activity` needed. Reserve `Activity` for in-page show/hide (see [Composing with Activity](patterns.md#composing-with-activity)).
32
+
33
+ ---
34
+
35
+ ## The `transitionTypes` Prop on `next/link`
36
+
37
+ No wrapper component needed, works in Server Components:
38
+
39
+ ```tsx
40
+ <Link href="/products/1" transitionTypes={['transition-to-detail']}>
41
+ View Product
42
+ </Link>
43
+ ```
44
+
45
+ Replaces the manual pattern of `onNavigate` + `startTransition` + `addTransitionType` + `router.push()`. Reserve manual `startTransition` for non-link interactions (buttons, forms).
46
+
47
+ **Availability:** `transitionTypes` shipped in **Next.js 16.2.0** (it is not gated on the `experimental.viewTransition` flag). If unavailable, use `startTransition` + `addTransitionType` + `router.push()` (see [Programmatic Navigation](#programmatic-navigation)). To check: `grep -r "transitionTypes" node_modules/next/dist/` — if no results, fall back to programmatic navigation.
48
+
49
+ ---
50
+
51
+ ## When Content Must Be Ready
52
+
53
+ A page transition can animate whatever Next.js renders during navigation, including a loading fallback. A shared content-to-content morph only works when the incoming content is ready as the navigation commits; content that has not rendered yet cannot form the incoming half of the pair.
54
+
55
+ When an animation depends on dynamic destination content, use Next.js prefetching and caching to make that content available ahead of time. `<Link>` automatically prefetches in production, but the default behavior for dynamic routes may only prefetch a shell or loading boundary. Set `prefetch={true}` to prefetch the full route, and cache the data needed to render the shared content.
56
+
57
+ ```tsx
58
+ <Link href={nextHref} prefetch={true} transitionTypes={['nav-forward']}>
59
+ Next
60
+ </Link>
61
+ ```
62
+
63
+ With Cache Components, put reusable route data in a cached scope such as `use cache` so prefetching can include it. If the destination remains behind an unresolved Suspense boundary, the route transition animates the fallback instead. The content resolves in a separate Suspense transition without the original `nav-forward` or `nav-back` type, so give that content its own reveal animation when needed.
64
+
65
+ Verify directional transitions in a production build with a cold client cache. Development mode does not run automatic `<Link>` prefetching.
66
+
67
+ See the Next.js [View Transitions guide](https://nextjs.org/docs/app/guides/view-transitions) and [Prefetching guide](https://nextjs.org/docs/app/guides/prefetching).
68
+
69
+ ---
70
+
71
+ ## Programmatic Navigation
72
+
73
+ ```tsx
74
+ 'use client';
75
+
76
+ import { useRouter } from 'next/navigation';
77
+
78
+ function DetailButton({ href }: { href: string }) {
79
+ const router = useRouter();
80
+
81
+ return (
82
+ <button onClick={() => router.push(href, { transitionTypes: ['nav-forward'] })}>
83
+ Open
84
+ </button>
85
+ );
86
+ }
87
+ ```
88
+
89
+ The `transitionTypes` option adds the types inside the router's navigation Transition. Use `startTransition` + `addTransitionType` for non-navigation state updates, or as a fallback on Next.js versions without the router option.
90
+
91
+ ---
92
+
93
+ ## Server-Side Filtering with `router.replace`
94
+
95
+ For search/sort/filter that re-renders on the server (via URL params), use `startTransition` + `router.replace`. VTs activate because the state update is inside `startTransition`:
96
+
97
+ ```tsx
98
+ 'use client';
99
+
100
+ import { useRouter } from 'next/navigation';
101
+ import { startTransition } from 'react';
102
+
103
+ function SortControl() {
104
+ const router = useRouter();
105
+
106
+ function handleSort(sort: string) {
107
+ startTransition(() => {
108
+ router.replace(`?sort=${sort}`);
109
+ });
110
+ }
111
+
112
+ return <button onClick={() => handleSort('newest')}>Newest</button>;
113
+ }
114
+ ```
115
+
116
+ List items wrapped in `<ViewTransition key={item.id}>` will animate reorder. This is the server-component alternative to the client-side [Searchable Grid](patterns.md#searchable-grid-with-usedeferredvalue) pattern.
117
+
118
+ For immediate control feedback while the route commits, use `useOptimistic` for the button state but keep the animated list tied to the committed sort value. See [Exclude Elements with `useOptimistic`](patterns.md#exclude-elements-with-useoptimistic).
119
+
120
+ ---
121
+
122
+ ## Routing-Driven Tabs
123
+
124
+ The generalized sliding indicator ([Sliding Indicator](patterns.md#sliding-indicator-tabs)) driven by navigation instead of local state: tabs are `<Link>`s, `active` comes from the URL (a server prop), and `useOptimistic` slides the indicator instantly while the route commits. Key the mounted indicator to committed `active` so the bar lands where navigation actually settles.
125
+
126
+ ```tsx
127
+ 'use client';
128
+ import Link from 'next/link';
129
+ import { useOptimistic, useTransition, ViewTransition } from 'react';
130
+
131
+ export function Tabs({ tabs, active, indicatorName = 'tab-indicator' }) {
132
+ const [optimisticActive, setOptimisticActive] = useOptimistic(active);
133
+ const [, startTransition] = useTransition();
134
+ return (
135
+ <nav>
136
+ {tabs.map(t => (
137
+ <Link key={t.value} href={t.href} scroll={false}
138
+ aria-current={optimisticActive === t.value ? 'page' : undefined}
139
+ onNavigate={() => startTransition(() => setOptimisticActive(t.value))}>
140
+ <span>{t.label}</span>
141
+ {active === t.value && (
142
+ <ViewTransition name={indicatorName} share="tab-underline">
143
+ <span className="active-underline" aria-hidden />
144
+ </ViewTransition>
145
+ )}
146
+ </Link>
147
+ ))}
148
+ </nav>
149
+ );
150
+ }
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Two-Layer Pattern (Directional + Suspense)
156
+
157
+ Directional slides + Suspense reveals coexist because they fire at different moments. Place the directional VT in the **page component** (not layout):
158
+
159
+ ```tsx
160
+ <ViewTransition
161
+ enter={{ "nav-forward": "slide-from-right", default: "none" }}
162
+ exit={{ "nav-forward": "slide-to-left", default: "none" }}
163
+ default="none"
164
+ >
165
+ <div>
166
+ <Suspense fallback={<ViewTransition exit="slide-down"><Skeleton /></ViewTransition>}>
167
+ <ViewTransition enter="slide-up" default="none"><Content /></ViewTransition>
168
+ </Suspense>
169
+ </div>
170
+ </ViewTransition>
171
+ ```
172
+
173
+ ---
174
+
175
+ ## `loading.tsx` as Suspense Boundary
176
+
177
+ Next.js `loading.tsx` is an implicit `<Suspense>` boundary. Wrap the skeleton in `<ViewTransition exit="...">` in `loading.tsx`, and the content in `<ViewTransition enter="..." default="none">` in the page:
178
+
179
+ ```tsx
180
+ // loading.tsx
181
+ <ViewTransition exit="slide-down"><PhotoGridSkeleton /></ViewTransition>
182
+
183
+ // page.tsx
184
+ <ViewTransition enter="slide-up" default="none"><PhotoGrid photos={photos} /></ViewTransition>
185
+ ```
186
+
187
+ Same rules as explicit `<Suspense>`: use simple string props (not type maps) since Suspense reveals fire without transition types.
188
+
189
+ ---
190
+
191
+ ## Shared Elements Across Routes
192
+
193
+ ```tsx
194
+ // List page
195
+ {products.map((product) => (
196
+ <Link key={product.id} href={`/products/${product.id}`} transitionTypes={['nav-forward']}>
197
+ <ViewTransition name={`product-${product.id}`}>
198
+ <Image src={product.image} alt={product.name} width={400} height={300} />
199
+ </ViewTransition>
200
+ </Link>
201
+ ))}
202
+
203
+ // Detail page — same name
204
+ <ViewTransition name={`product-${product.id}`}>
205
+ <Image src={product.image} alt={product.name} width={800} height={600} />
206
+ </ViewTransition>
207
+ ```
208
+
209
+ If the pair's `share` is type-keyed (or classed via CSS that expects a type), every `<Link>` between the two views must carry the type via `transitionTypes` — a plain link click resolves the share map's `default`, and if that's `none` the morph silently never fires.
210
+
211
+ ---
212
+
213
+ ## Same-Route Dynamic Segment Transitions
214
+
215
+ When navigating between dynamic segments of the same route (e.g., `/collection/[slug]`), the router swaps subtrees keyed by the segment value rather than doing a plain unmount/mount — enter/exit don't fire reliably. Use `key` + `name` + `share`:
216
+
217
+ ```tsx
218
+ <Suspense fallback={<Skeleton />}>
219
+ <ViewTransition key={slug} name="collection-content" share="auto" default="none">
220
+ <Content slug={slug} />
221
+ </ViewTransition>
222
+ </Suspense>
223
+ ```
224
+
225
+ - `key={slug}` forces unmount/remount on change
226
+ - The stable `name` pairs the outgoing and incoming containers; `share="auto"` creates the crossfade
227
+ - VT inside `<Suspense>` (without keying Suspense) keeps old content visible during loading
228
+
229
+ ## Server Components
230
+
231
+ - `<ViewTransition>` works in both Server and Client Components
232
+ - `<Link transitionTypes>` works in Server Components — no `'use client'` needed
233
+ - `router.push(..., { transitionTypes })`, `addTransitionType`, and `startTransition` require Client Components
@@ -0,0 +1,274 @@
1
+ # Patterns and Guidelines
2
+
3
+ Use the official [React `<ViewTransition>` reference](https://react.dev/reference/react/ViewTransition) for API mechanics. This file collects reusable implementation patterns and failure modes from production apps.
4
+
5
+ ## Searchable Grid with `useDeferredValue`
6
+
7
+ `useDeferredValue` makes filter updates a transition, activating `<ViewTransition>`:
8
+
9
+ ```tsx
10
+ 'use client';
11
+
12
+ import { useDeferredValue, useState, ViewTransition, Suspense } from 'react';
13
+
14
+ export default function SearchableGrid({ itemsPromise }) {
15
+ const [search, setSearch] = useState('');
16
+ const deferredSearch = useDeferredValue(search);
17
+
18
+ return (
19
+ <>
20
+ <input value={search} onChange={(e) => setSearch(e.currentTarget.value)} />
21
+ <ViewTransition>
22
+ <Suspense fallback={<GridSkeleton />}>
23
+ <ItemGrid itemsPromise={itemsPromise} search={deferredSearch} />
24
+ </Suspense>
25
+ </ViewTransition>
26
+ </>
27
+ );
28
+ }
29
+ ```
30
+
31
+ Per-item `<ViewTransition name={...}>` inside a deferred list triggers cross-fades on every keystroke. Fix with `default="none"`:
32
+
33
+ ```tsx
34
+ {filteredItems.map(item => (
35
+ <ViewTransition key={item.id} name={`item-${item.id}`} share="morph" default="none">
36
+ <ItemCard item={item} />
37
+ </ViewTransition>
38
+ ))}
39
+ ```
40
+
41
+ ## Card Expand/Collapse with `startTransition`
42
+
43
+ Toggle between grid and detail view with shared element morph:
44
+
45
+ ```tsx
46
+ 'use client';
47
+
48
+ import { useState, useRef, startTransition, ViewTransition } from 'react';
49
+
50
+ export default function ItemGrid({ items }) {
51
+ const [expandedId, setExpandedId] = useState(null);
52
+ const scrollRef = useRef(0);
53
+
54
+ return expandedId ? (
55
+ <ViewTransition enter="slide-in" name={`item-${expandedId}`}>
56
+ <ItemDetail
57
+ item={items.find(i => i.id === expandedId)}
58
+ onClose={() => {
59
+ startTransition(() => {
60
+ setExpandedId(null);
61
+ setTimeout(() => window.scrollTo({ behavior: 'smooth', top: scrollRef.current }), 100);
62
+ });
63
+ }}
64
+ />
65
+ </ViewTransition>
66
+ ) : (
67
+ <div className="grid grid-cols-3 gap-4">
68
+ {items.map(item => (
69
+ <ViewTransition key={item.id} name={`item-${item.id}`}>
70
+ <ItemCard
71
+ item={item}
72
+ onSelect={() => {
73
+ scrollRef.current = window.scrollY;
74
+ startTransition(() => setExpandedId(item.id));
75
+ }}
76
+ />
77
+ </ViewTransition>
78
+ ))}
79
+ </div>
80
+ );
81
+ }
82
+ ```
83
+
84
+ ## Type-Safe Transition Helpers
85
+
86
+ Use `as const` arrays and derived types to prevent ID clashes:
87
+
88
+ ```tsx
89
+ const transitionTypes = ['default', 'transition-to-detail', 'transition-to-list'] as const;
90
+ const animationTypes = ['auto', 'none', 'animate-slide-from-left', 'animate-slide-from-right'] as const;
91
+
92
+ type TransitionType = (typeof transitionTypes)[number];
93
+ type AnimationType = (typeof animationTypes)[number];
94
+ type TransitionMap = { default: AnimationType } & Partial<Record<Exclude<TransitionType, 'default'>, AnimationType>>;
95
+
96
+ export function HorizontalTransition({ children, enter, exit }: {
97
+ children: React.ReactNode;
98
+ enter: TransitionMap;
99
+ exit: TransitionMap;
100
+ }) {
101
+ return <ViewTransition enter={enter} exit={exit}>{children}</ViewTransition>;
102
+ }
103
+ ```
104
+
105
+ ## Cross-Fade Without Remount
106
+
107
+ Omit `key` to trigger an update (cross-fade) instead of exit + enter. Avoids Suspense remount/refetch:
108
+
109
+ ```jsx
110
+ <ViewTransition>
111
+ <TabPanel tab={activeTab} />
112
+ </ViewTransition>
113
+ ```
114
+
115
+ Use `key` when content identity changes (state resets). Omit for cross-fades (tabs, panels, carousel).
116
+
117
+ ## Isolate Elements from Parent Animations
118
+
119
+ Pull an element out of the animated `root` snapshot by giving it its own `view-transition-name`. **`view-transition-name: none` is a no-op** — it's the CSS default, so the element stays in `root` (a common flicker bug). Use a real, unique name, then neutralize with `<ViewTransition default="none">` (no CSS) or CSS (needed for `z-index`/`display` control — see [css-recipes.md](css-recipes.md#persistent-element-isolation)).
120
+
121
+ - **Persistent chrome** (nav, sidebar, player bar): `<nav style={{ viewTransitionName: 'persistent-nav' }}>` + isolation CSS. `<ViewTransition default="none">` works too, but its auto-name can't take `z-index`/backdrop `display:none` — hand-name when you need those.
122
+ - **Floating elements** (popovers, menus): left open, they're captured in `root` and flicker on settle. Real name + isolation ([Floating Element Isolation](css-recipes.md#floating-element-isolation-popovers-menus-tooltips-control-clusters)). A static name is fine if only one is mounted (`unmountOnHide`); native top-layer (`popover`/`<dialog>`) settle-flicker is a browser limit.
123
+ - **Naming an interactive element has a cost:** named participants are skipped by hit-testing while a transition runs ([csswg#10930](https://github.com/w3c/csswg-drafts/issues/10930)) — clicks and hover fall through to whatever is beneath. Portal named popovers/menus; rendered inline in a clickable row, mid-transition clicks activate the row and read as outside-clicks that close the popover.
124
+ - **Third-party floating components** (toast libraries, portals you don't render): put the name on an always-mounted wrapper you own — `<div style={{ viewTransitionName: 'toaster' }} className="pointer-events-none fixed inset-0">`. Library containers often unmount when empty, so naming them directly leaves the group unpinned exactly when a toast appears mid-transition. Name a dialog's backdrop separately from its panel so each pins independently.
125
+
126
+ ## Suspense reveal flicker
127
+
128
+ An element rendered in **both** the fallback and the content flickers (opacity dip) on reveal — it fades against itself. Not a morph. **Fix: render it outside the `<Suspense>` boundary** (mount once, above it), or pin it with a `view-transition-name`.
129
+
130
+ ```jsx
131
+ <h1>{title}</h1>
132
+ <Suspense fallback={<BodySkeleton />}><Body /></Suspense>
133
+ ```
134
+
135
+ Don't put a manual `viewTransitionName` on the root DOM node inside `<ViewTransition>` — React's auto-name overrides it.
136
+
137
+ ## Sliding Indicator (tabs)
138
+
139
+ One shared-name indicator rendered under the **active** tab morphs between positions on change (slide the group, disable old/new — see [Sliding Indicator](css-recipes.md#sliding-indicator-tab-underline--segmented-pill)). Render it only under the active tab so exactly one element holds `indicatorName`; use a distinct `indicatorName` per tab strip. Trigger the state change inside `startTransition` so the move animates. Whatever owns `active` drives it — local state here, routing in Next (see [Routing-Driven Tabs](nextjs.md#routing-driven-tabs)).
140
+
141
+ ```tsx
142
+ import { useState, useTransition, ViewTransition } from 'react';
143
+
144
+ export function Tabs({ tabs, indicatorName = 'tab-indicator' }) {
145
+ const [active, setActive] = useState(tabs[0].value);
146
+ const [, startTransition] = useTransition();
147
+ return (
148
+ <nav>
149
+ {tabs.map(t => (
150
+ <button key={t.value} type="button"
151
+ aria-current={active === t.value ? 'page' : undefined}
152
+ onClick={() => startTransition(() => setActive(t.value))}>
153
+ <span>{t.label}</span>
154
+ {active === t.value && (
155
+ <ViewTransition name={indicatorName} share="tab-underline">
156
+ <span className="active-underline" aria-hidden />
157
+ </ViewTransition>
158
+ )}
159
+ </button>
160
+ ))}
161
+ </nav>
162
+ );
163
+ }
164
+ ```
165
+
166
+ Because the state change is a transition, if the newly-active tab renders suspending content the whole update — indicator **and** `aria-current` — waits for it to commit, and the strip feels dead on click. Give the controls an immediate value with `useOptimistic` (drive `aria-current` from it) so feedback is instant while the content streams. The routing variant ([Routing-Driven Tabs](nextjs.md#routing-driven-tabs)) does exactly this: optimistic `aria-current`, committed `active` for the bar.
167
+
168
+ ## Layout Displacement Morph
169
+
170
+ Only content inside an activated boundary animates position — everything else teleports to its new layout spot. When a list grows or shrinks, wrap the sibling content below it so it glides instead of jumping:
171
+
172
+ ```jsx
173
+ <FavoritesList /> {/* rows enter/exit */}
174
+ <ViewTransition> {/* bare: update enabled */}
175
+ <section>
176
+ <h2>You Might Also Like</h2>
177
+ <Recommendations />
178
+ </section>
179
+ </ViewTransition>
180
+ ```
181
+
182
+ The section — heading included — morphs as one group when rows above are added or removed. Nothing inside the section changed; the *displacement* is the update.
183
+
184
+ - React only measures boundaries that are direct children of nodes along the changed path — a VT buried under an extra wrapper element won't activate. Place the boundary as a direct sibling of the changing content.
185
+ - Sometimes the better fix is no morph at all: pad fixed-size lists to a constant slot count with invisible fillers so the grid never changes height and nothing below it moves.
186
+ - `default="none"` disables exactly this morph — it turns off `update`. Named/shared elements get `default="none"`; displaced siblings and keyed list items stay bare or set `update="auto"`.
187
+
188
+ ## Reusable Animated Collapse
189
+
190
+ ```jsx
191
+ function AnimatedCollapse({ open, children }) {
192
+ if (!open) return null;
193
+ return (
194
+ <ViewTransition enter="expand-in" exit="collapse-out">
195
+ {children}
196
+ </ViewTransition>
197
+ );
198
+ }
199
+
200
+ // Usage: toggle with startTransition
201
+ <button onClick={() => startTransition(() => setOpen(o => !o))}>Toggle</button>
202
+ <AnimatedCollapse open={open}><SectionContent /></AnimatedCollapse>
203
+ ```
204
+
205
+ ## Composing with Activity
206
+
207
+ `Activity` is orthogonal to view transitions: it preserves the state of a hidden subtree, `ViewTransition` animates it. Compose them for an in-page show/hide (drawer, panel, tab body) that keeps its scroll/form state while it animates in and out:
208
+
209
+ ```jsx
210
+ <Activity mode={isVisible ? 'visible' : 'hidden'}>
211
+ <ViewTransition enter="slide-in" exit="slide-out">
212
+ <Sidebar />
213
+ </ViewTransition>
214
+ </Activity>
215
+ ```
216
+
217
+ Only reach for Activity when there's state worth preserving — a stateless element (e.g. the sliding indicator above) gains nothing from it. In Next.js, layout-hosted chrome already persists across navigations without Activity (see [nextjs.md](nextjs.md#layout-level-viewtransition)).
218
+
219
+ ## Exclude Elements with `useOptimistic`
220
+
221
+ `useOptimistic` values update before the transition snapshot, excluding them from animation. Use for controls (labels); use committed state for animated content:
222
+
223
+ ```tsx
224
+ const [sort, setSort] = useState('newest');
225
+ const [optimisticSort, setOptimisticSort] = useOptimistic(sort);
226
+
227
+ function cycleSort() {
228
+ const nextSort = getNextSort(optimisticSort);
229
+ startTransition(() => {
230
+ setOptimisticSort(nextSort); // before snapshot — no animation
231
+ setSort(nextSort); // between snapshots — animates
232
+ });
233
+ }
234
+
235
+ <button>Sort: {LABELS[optimisticSort]}</button>
236
+ {items.sort(comparators[sort]).map(item => (
237
+ <ViewTransition key={item.id}><ItemCard item={item} /></ViewTransition>
238
+ ))}
239
+ ```
240
+
241
+ ---
242
+
243
+ ## View Transition Events
244
+
245
+ Imperative control via `onEnter`, `onExit`, `onUpdate`, `onShare`. Return a cleanup function to cancel your animation when the transition finishes. `onShare` takes precedence over `onEnter`/`onExit`.
246
+
247
+ ```jsx
248
+ <ViewTransition
249
+ onEnter={(instance, types) => {
250
+ const anim = instance.new.animate(
251
+ [{ transform: 'scale(0.8)', opacity: 0 }, { transform: 'scale(1)', opacity: 1 }],
252
+ { duration: 300, easing: 'ease-out' }
253
+ );
254
+ return () => anim.cancel();
255
+ }}
256
+ >
257
+ <Component />
258
+ </ViewTransition>
259
+ ```
260
+
261
+ The `instance` object: `instance.old`, `instance.new`, `instance.group`, `instance.imagePair`, `instance.name`.
262
+
263
+ The `types` array (second argument) lets you vary animation based on transition type.
264
+
265
+ ---
266
+
267
+ ## Animation Timing
268
+
269
+ | Interaction | Duration |
270
+ |------------|----------|
271
+ | Direct toggle (expand/collapse) | 100–200ms |
272
+ | Route transition (slide) | 150–250ms |
273
+ | Suspense reveal (skeleton → content) | 200–400ms |
274
+ | Shared element morph | 300–500ms |
@@ -0,0 +1,47 @@
1
+ # Troubleshooting
2
+
3
+ **VT not activating:** Ensure `<ViewTransition>` comes before any DOM node and the state update is inside `startTransition`. A raw `viewTransitionName` only isolates an element; it does not activate a React view transition.
4
+
5
+ **"Two ViewTransition components with the same name":** Names must be globally unique. Use IDs such as `name={`hero-${item.id}`}`. If a reusable component appears in multiple surfaces at once, move the name to the specific consumer or make it conditional.
6
+
7
+ **Unrelated content crossfades:** A bare VT uses the browser crossfade for every trigger. Set `default="none"` and opt in only to the triggers that boundary should handle.
8
+
9
+ **Scrolling hangs while a transition animates:** the `::view-transition` overlay is `position: fixed` and its snapshots don't scroll — a browser limitation, not fixable in React (skipping snaps to the end). Keep reveal durations short; for scroll-driven UI use gesture transitions (experimental `useSwipeTransition`, if available).
10
+
11
+ **Open popover flickers when a background transition settles:** it's captured in `root`. Give it a real `view-transition-name` + isolation (not `none`) — see [Isolate Elements from Parent Animations](patterns.md#isolate-elements-from-parent-animations).
12
+
13
+ **Popover closes or goes dead when clicked mid-transition:** named participants are skipped by hit-testing while a transition runs; clicks land on what's beneath and read as outside-clicks. Portal the popover (see [Isolate Elements from Parent Animations](patterns.md#isolate-elements-from-parent-animations)); brief dead clicks during the transition remain — that's the price of the name.
14
+
15
+ **Shared morph silently not firing:** `share` resolved to `none`. Either the VT has `default="none"` with no explicit `share` prop, or `share` is type-keyed and the navigation never adds the type — the link needs `transitionTypes` (or `addTransitionType` in the transition).
16
+
17
+ **Shared morph competes with a page fade:** A fading page exit dissolves the source while it is morphing. Remove that exit or use motion that preserves the shared element's continuity.
18
+
19
+ **An enter animation runs even though Suspense never showed its fallback:** The content-side VT became the topmost entering subtree during navigation. At that call site, add a host DOM element immediately outside `Suspense`. The host suppresses the nested enter during warm navigation but remains mounted so the VT can enter on a later fallback-to-content reveal. Keep the host outside `Suspense`, not inside the reusable crossfade; do nothing when a direct host already exists.
20
+
21
+ **Section below a list teleports instead of gliding:** it's outside any activated boundary, its VT has `default="none"` (which disables `update`), or it isn't an immediate sibling of the changing content. See [Layout Displacement Morph](patterns.md#layout-displacement-morph).
22
+
23
+ **`router.back()` and browser back/forward skip the directional slide:** traversals carry no transition types, so type-keyed maps resolve to `default` — untyped shared-element morphs still apply. Use `router.push()` for typed animations.
24
+
25
+ **`flushSync` skips animations:** Use `startTransition` instead.
26
+
27
+ **Only updates animate (no enter/exit):** Without `<Suspense>`, React treats swaps as updates. Conditionally render the VT itself, or wrap in `<Suspense>`.
28
+
29
+ **Suspense reveal does not animate:** Suspense resolves in a separate transition without navigation types. Use string `enter`/`exit` props rather than a type map.
30
+
31
+ **Layout VT prevents page VTs from animating:** Nested VTs skip their own enter/exit when they mount or unmount as one unit with a parent VT. Keep route boundaries in pages, not a layout wrapping `{children}`. React has experimental upstream `parentEnter`/`parentExit` work ([PR #36690](https://github.com/facebook/react/pull/36690)), but those props are not currently available in the Next.js client runtime; do not recommend them in a Next.js app unless the installed runtime and docs explicitly include them.
32
+
33
+ **Same-route content does not animate with `update`:** Nested VTs can own the mutation before an outer boundary sees it. For a real identity change, use `key` with a stable `name` and `share` instead.
34
+
35
+ **List reorder not animating with `useOptimistic`:** Optimistic values resolve before snapshot. Use committed state for list order.
36
+
37
+ **TS error "Property 'default' is missing":** Type-keyed objects require a `default` key.
38
+
39
+ **Hash fragments cause scroll jumps:** Navigate without hash; scroll programmatically after navigation.
40
+
41
+ **Backdrop-blur flickers:** Use the [Backdrop-Blur Workaround](css-recipes.md#backdrop-blur-workaround).
42
+
43
+ **`border-radius` lost during transitions:** Apply `border-radius` directly to the captured element.
44
+
45
+ **Skeleton controls slide away:** Give matching controls the same `viewTransitionName`.
46
+
47
+ **Batching:** Multiple updates during animation are batched. A→B→C→D becomes B→D.
@@ -0,0 +1,6 @@
1
+ # Notice
2
+
3
+ This skill comes from https://github.com/mattpocock/skills (`skills/engineering/code-review/SKILL.md`).
4
+ Licence: MIT (evidence: repository license, https://github.com/mattpocock/skills/blob/main/LICENSE, checked 2026-11-08).
5
+
6
+ Luci converted it to the Luci Skill Standard: SKILL.md metadata keys and luci.json. The instructions are unchanged.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: "code-review"
3
+ description: "Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to \\\"review since X\\\"."
4
+ license: "MIT"
5
+ metadata:
6
+ luci-category: "code-quality"
7
+ luci-author: "mattpocock"
8
+ luci-version: "1.0.0"
9
+ ---
10
+
11
+ Two-axis review of the diff between `HEAD` and a fixed point the user supplies:
12
+
13
+ - **Standards**: does the code conform to this repo's documented coding standards?
14
+ - **Spec**: does the code faithfully implement the originating issue / spec?
15
+
16
+ Both axes run as **parallel sub-agents** so they don't pollute each other's context, then this skill aggregates their findings. Start every sub-agent with a fresh context window.
17
+
18
+ The issue tracker should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
19
+
20
+ ## Process
21
+
22
+ ### 1. Pin the fixed point
23
+
24
+ Whatever the user said is the fixed point (a commit SHA, branch name, tag, `main`, `HEAD~5`, etc.). If they didn't specify one, ask for it.
25
+
26
+ Capture the diff command once: `git diff <fixed-point>...HEAD` (three-dot, so the comparison is against the merge-base). Also note the list of commits via `git log <fixed-point>..HEAD --oneline`.
27
+
28
+ Before going further, confirm the fixed point resolves (`git rev-parse <fixed-point>`) and the diff is non-empty. A bad ref or empty diff should fail here, not inside two parallel sub-agents.
29
+
30
+ ### 2. Identify the spec source
31
+
32
+ Look for the originating spec, in this order:
33
+
34
+ 1. Issue references in the commit messages (`#123`, `Closes #45`, GitLab `!67`, etc.), fetched via the workflow in the tracker doc.
35
+ 2. A path the user passed as an argument.
36
+ 3. A spec file under `docs/`, `specs/`, or `.scratch/` matching the branch name or feature.
37
+ 4. If nothing is found, ask the user where the spec is. If they say there isn't one, the **Spec** sub-agent will skip and report "no spec available".
38
+
39
+ ### 3. Identify the standards sources
40
+
41
+ Search the repo for every file that documents how code should be written. When `CODING_STANDARDS.md` or `CONTRIBUTING.md` exists, it must be on the list.
42
+
43
+ On top of whatever the repo documents, the Standards axis always carries the **smell baseline** below: a fixed set of Fowler code smells (_Refactoring_, ch.3) that applies even when a repo documents nothing. Two rules bind it:
44
+
45
+ - **The repo overrides.** A documented repo standard always wins; where it endorses something the baseline would flag, suppress the smell.
46
+ - **Always a judgement call.** Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation. Like any standard here, skip anything tooling already enforces.
47
+
48
+ Each smell reads *what it is* → *how to fix*; match it against the diff:
49
+
50
+ - **Mysterious Name**: a function, variable, or type whose name doesn't reveal what it does or holds. → rename it; if no honest name comes, the design's murky.
51
+ - **Duplicated Code**: the same logic shape appears in more than one hunk or file in the change. → extract the shared shape, call it from both.
52
+ - **Feature Envy**: a method that reaches into another object's data more than its own. → move the method onto the data it envies.
53
+ - **Data Clumps**: the same few fields or params keep travelling together (a type wanting to be born). → bundle them into one type, pass that.
54
+ - **Primitive Obsession**: a primitive or string standing in for a domain concept that deserves its own type. → give the concept its own small type.
55
+ - **Repeated Switches**: the same `switch`/`if`-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share.
56
+ - **Shotgun Surgery**: one logical change forces scattered edits across many files in the diff. → gather what changes together into one module.
57
+ - **Divergent Change**: one file or module is edited for several unrelated reasons. → split so each module changes for one reason.
58
+ - **Speculative Generality**: abstraction, parameters, or hooks added for needs the spec doesn't have. → delete it; inline back until a real need shows.
59
+ - **Message Chains**: long `a.b().c().d()` navigation the caller shouldn't depend on. → hide the walk behind one method on the first object.
60
+ - **Middle Man**: a class or function that mostly just delegates onward. → cut it, call the real target direct.
61
+ - **Refused Bequest**: a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.
62
+
63
+ ### 4. Spawn both sub-agents in parallel
64
+
65
+ Issue both sub-agent calls together, in the foreground, and aggregate the reports they return.
66
+
67
+ **Standards sub-agent prompt** should include:
68
+
69
+ - The full diff command and commit list.
70
+ - The list of standards-source files you found in step 3, **plus the smell baseline from step 3** pasted in full (the sub-agent has no other access to it).
71
+ - The brief: "Report, per file/hunk where relevant, (a) every place the diff violates a documented standard: cite the standard (file + the rule); and (b) any baseline smell you spot: name it and quote the hunk. Distinguish hard violations from judgement calls: documented-standard breaches can be hard, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words."
72
+
73
+ **Spec sub-agent prompt** should include:
74
+
75
+ - The diff command and commit list.
76
+ - The path or fetched contents of the spec.
77
+ - The brief: "Report: (a) requirements the spec asked for that are missing or partial; (b) behaviour in the diff that wasn't asked for (scope creep); (c) requirements that look implemented but where the implementation looks wrong. Quote the spec line for each finding. Under 400 words."
78
+
79
+ If the spec is missing, skip the Spec sub-agent and note this in the final report.
80
+
81
+ ### 5. Aggregate
82
+
83
+ Present the two reports under `## Standards` and `## Spec` headings, verbatim or lightly cleaned. Do **not** merge or rerank findings, because the two axes are deliberately separate (see _Why two axes_).
84
+
85
+ End with a one-line summary: total findings per axis, and the worst issue _within each axis_ (if any). Don't pick a single winner across axes: that's the reranking the separation exists to prevent.
86
+
87
+ ## Why two axes
88
+
89
+ A change can pass one axis and fail the other:
90
+
91
+ - Code that follows every standard but implements the wrong thing → **Standards pass, Spec fail.**
92
+ - Code that does exactly what the issue asked but breaks the project's conventions → **Spec pass, Standards fail.**
93
+
94
+ Reporting them separately stops one axis from masking the other.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Code Review"
3
+ short_description: "Review a diff on standards and spec"