@caddis/cli 0.3.0 → 0.4.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 (244) hide show
  1. package/bundles/antigravity-plugin/agents/knowledge-transfer.md +17 -32
  2. package/bundles/antigravity-plugin/caddis_statusline.py +25 -3
  3. package/bundles/antigravity-plugin/guard_agy.py +41 -9
  4. package/bundles/antigravity-plugin/plugin.json +1 -1
  5. package/bundles/antigravity-plugin/scripts/caddis_inventory.py +73 -3
  6. package/bundles/antigravity-plugin/scripts/caddis_statusline.py +25 -3
  7. package/bundles/antigravity-plugin/scripts/check_doc_coverage.py +1 -1
  8. package/bundles/antigravity-plugin/scripts/claudster_config.py +0 -5
  9. package/bundles/antigravity-plugin/scripts/hook_log.py +1 -1
  10. package/bundles/antigravity-plugin/scripts/new-machine.ps1 +170 -0
  11. package/bundles/antigravity-plugin/scripts/oss_ask.py +1 -1
  12. package/bundles/antigravity-plugin/scripts/oss_model.py +10 -2
  13. package/bundles/antigravity-plugin/scripts/oss_review.py +1 -1
  14. package/bundles/antigravity-plugin/scripts/setup_project_ai.py +42 -10
  15. package/bundles/antigravity-plugin/session_end_agy.py +31 -6
  16. package/bundles/antigravity-plugin/skills/_registry.md +1 -0
  17. package/bundles/antigravity-plugin/skills/advisory-hub/SKILL.md +44 -0
  18. package/bundles/antigravity-plugin/skills/code-review/SKILL.md +11 -0
  19. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +21 -0
  20. package/bundles/antigravity-plugin/skills/gate-review/SKILL.md +11 -0
  21. package/bundles/antigravity-plugin/skills/implement/SKILL.md +36 -0
  22. package/bundles/antigravity-plugin/skills/safe-cleanup/SKILL.md +186 -0
  23. package/bundles/antigravity-plugin/skills/security-review/SKILL.md +9 -0
  24. package/bundles/antigravity-plugin/skills/validate-phase/SKILL.md +31 -0
  25. package/bundles/antigravity-plugin/warm_start_agy.py +96 -9
  26. package/bundles/antigravity-plugin-extras/plugin.json +1 -1
  27. package/bundles/antigravity-plugin-extras/skills/_registry.md +1 -0
  28. package/bundles/antigravity-plugin-extras/skills/safe-cleanup/SKILL.md +186 -0
  29. package/bundles/codex/.codex/config.toml.example +36 -0
  30. package/bundles/codex/.codex/skills/coding/api-design/SKILL.md +249 -0
  31. package/bundles/codex/.codex/skills/coding/backend-development/SKILL.md +305 -0
  32. package/bundles/codex/.codex/skills/coding/code-review/SKILL.md +140 -0
  33. package/bundles/codex/.codex/skills/coding/codebase-audit/SKILL.md +204 -0
  34. package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/SKILL.md +132 -0
  35. package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/scripts/perf_sweep.py +249 -0
  36. package/bundles/codex/.codex/skills/coding/error-handling/SKILL.md +260 -0
  37. package/bundles/codex/.codex/skills/coding/fastapi-dev/SKILL.md +300 -0
  38. package/bundles/codex/.codex/skills/coding/javascript-typescript/SKILL.md +142 -0
  39. package/bundles/codex/.codex/skills/coding/python/SKILL.md +388 -0
  40. package/bundles/codex/.codex/skills/coding/refactoring/SKILL.md +486 -0
  41. package/bundles/codex/.codex/skills/coding/security-review/SKILL.md +205 -0
  42. package/bundles/codex/.codex/skills/coding/sql/SKILL.md +321 -0
  43. package/bundles/codex/.codex/skills/data/database-design/SKILL.md +177 -0
  44. package/bundles/codex/.codex/skills/data/db-diagram/SKILL.md +148 -0
  45. package/bundles/codex/.codex/skills/data/db-diagram/scripts/sql_to_graph.py +1212 -0
  46. package/bundles/codex/.codex/skills/devops/ci-cd-pipeline/SKILL.md +315 -0
  47. package/bundles/codex/.codex/skills/devops/gh-cli/SKILL.md +195 -0
  48. package/bundles/codex/.codex/skills/devops/git-commit/SKILL.md +285 -0
  49. package/bundles/codex/.codex/skills/devops/safe-cleanup/SKILL.md +186 -0
  50. package/bundles/codex/.codex/skills/devops/using-git-worktrees/SKILL.md +217 -0
  51. package/bundles/codex/.codex/skills/devops/windows-deployment/SKILL.md +880 -0
  52. package/bundles/codex/.codex/skills/docs/code-documentation/SKILL.md +271 -0
  53. package/bundles/codex/.codex/skills/docs/explainer-doc/SKILL.md +97 -0
  54. package/bundles/codex/.codex/skills/docs/technical-writing/SKILL.md +286 -0
  55. package/bundles/codex/.codex/skills/docs/writing-plans/SKILL.md +387 -0
  56. package/bundles/codex/.codex/skills/frontend/css-architecture/SKILL.md +305 -0
  57. package/bundles/codex/.codex/skills/frontend/css-architecture/references/RESPONSIVE-DESIGN.md +604 -0
  58. package/bundles/codex/.codex/skills/frontend/frontend-design/SKILL.md +193 -0
  59. package/bundles/codex/.codex/skills/frontend/frontend-design/references/my-tech-stack.md +127 -0
  60. package/bundles/codex/.codex/skills/frontend/mockup/SKILL.md +242 -0
  61. package/bundles/codex/.codex/skills/frontend/react-best-practices/SKILL.md +269 -0
  62. package/bundles/codex/.codex/skills/frontend/react-dev/README.md +404 -0
  63. package/bundles/codex/.codex/skills/frontend/react-dev/SKILL.md +459 -0
  64. package/bundles/codex/.codex/skills/frontend/react-dev/examples/generic-components.md +579 -0
  65. package/bundles/codex/.codex/skills/frontend/react-dev/examples/server-components.md +579 -0
  66. package/bundles/codex/.codex/skills/frontend/react-dev/references/event-handlers.md +574 -0
  67. package/bundles/codex/.codex/skills/frontend/react-dev/references/hooks.md +456 -0
  68. package/bundles/codex/.codex/skills/frontend/react-dev/references/react-19-patterns.md +638 -0
  69. package/bundles/codex/.codex/skills/frontend/react-dev/references/react-router.md +1002 -0
  70. package/bundles/codex/.codex/skills/frontend/react-dev/references/tanstack-router.md +587 -0
  71. package/bundles/codex/.codex/skills/frontend/ui-review/SKILL.md +176 -0
  72. package/bundles/codex/.codex/skills/frontend/ui-review/references/framework-fixes.md +471 -0
  73. package/bundles/codex/.codex/skills/frontend/ui-review/references/visual-checklist.md +236 -0
  74. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/DESIGN_TOKENS.md +487 -0
  75. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/IMPLEMENTATION_GUIDE.md +177 -0
  76. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/SKILL.md +732 -0
  77. package/bundles/codex/.codex/skills/media/draw-io/SKILL.md +162 -0
  78. package/bundles/codex/.codex/skills/media/draw-io/references/aws-icons.md +677 -0
  79. package/bundles/codex/.codex/skills/media/draw-io/references/layout-guidelines.md +142 -0
  80. package/bundles/codex/.codex/skills/media/draw-io/references/troubleshooting.md +118 -0
  81. package/bundles/codex/.codex/skills/media/draw-io/references/workflows.md +103 -0
  82. package/bundles/codex/.codex/skills/media/draw-io/scripts/convert-drawio-to-png.sh +25 -0
  83. package/bundles/codex/.codex/skills/media/draw-io/scripts/find_aws_icon.py +79 -0
  84. package/bundles/codex/.codex/skills/media/mermaid-diagrams/SKILL.md +292 -0
  85. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/ENHANCEMENTS.md +264 -0
  86. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/MERMAID-SUMMARY.md +137 -0
  87. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/advanced-features.md +556 -0
  88. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/architecture-diagrams.md +192 -0
  89. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/c4-diagrams.md +410 -0
  90. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/class-diagrams.md +361 -0
  91. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/erd-diagrams.md +510 -0
  92. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/flowcharts.md +450 -0
  93. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/sequence-diagrams.md +394 -0
  94. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/troubleshooting.md +335 -0
  95. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/workflows.md +418 -0
  96. package/bundles/codex/.codex/skills/media/particle-art/SKILL.md +243 -0
  97. package/bundles/codex/.codex/skills/media/particle-art/references/canvas-utils.ts +171 -0
  98. package/bundles/codex/.codex/skills/media/particle-art/references/dot-field.template.tsx +203 -0
  99. package/bundles/codex/.codex/skills/media/particle-art/references/flow-field.template.tsx +263 -0
  100. package/bundles/codex/.codex/skills/media/particle-art/references/node-shape.template.tsx +261 -0
  101. package/bundles/codex/.codex/skills/media/particle-art/references/shape-sampler.ts +281 -0
  102. package/bundles/codex/.codex/skills/media/particle-art/references/stipple-morph.template.tsx +167 -0
  103. package/bundles/codex/.codex/skills/media/particle-art/references/stipple.template.tsx +175 -0
  104. package/bundles/codex/.codex/skills/media/particle-art/references/trail-ghost.template.tsx +266 -0
  105. package/bundles/codex/.codex/skills/media/particle-art/references/usage-examples.md +320 -0
  106. package/bundles/codex/.codex/skills/testing/playwright/API_REFERENCE.md +653 -0
  107. package/bundles/codex/.codex/skills/testing/playwright/SKILL.md +454 -0
  108. package/bundles/codex/.codex/skills/testing/playwright/lib/helpers.js +441 -0
  109. package/bundles/codex/.codex/skills/testing/playwright/package.json +26 -0
  110. package/bundles/codex/.codex/skills/testing/playwright/run.js +228 -0
  111. package/bundles/codex/.codex/skills/testing/tdd-workflow/SKILL.md +188 -0
  112. package/bundles/codex/.codex/skills/testing/test-strategy/SKILL.md +155 -0
  113. package/bundles/codex/.codex/skills/testing/webapp-testing/LICENSE.txt +202 -0
  114. package/bundles/codex/.codex/skills/testing/webapp-testing/SKILL.md +97 -0
  115. package/bundles/codex/.codex/skills/testing/webapp-testing/examples/console_logging.py +35 -0
  116. package/bundles/codex/.codex/skills/testing/webapp-testing/examples/element_discovery.py +40 -0
  117. package/bundles/codex/.codex/skills/testing/webapp-testing/examples/static_html_automation.py +33 -0
  118. package/bundles/codex/.codex/skills/testing/webapp-testing/scripts/with_server.py +106 -0
  119. package/bundles/codex/.codex/skills/workflow/advisory-hub/SKILL.md +227 -0
  120. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/context-template.md +214 -0
  121. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/hub-handbook.md +233 -0
  122. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/report-contract.md +94 -0
  123. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/succession.md +118 -0
  124. package/bundles/codex/.codex/skills/workflow/best-practices/SKILL.md +500 -0
  125. package/bundles/codex/.codex/skills/workflow/best-practices/agents/best-practices-referencer.md +263 -0
  126. package/bundles/codex/.codex/skills/workflow/best-practices/agents/codebase-context-builder.md +326 -0
  127. package/bundles/codex/.codex/skills/workflow/best-practices/agents/task-intent-analyzer.md +245 -0
  128. package/bundles/codex/.codex/skills/workflow/best-practices/references/anti-patterns.md +571 -0
  129. package/bundles/codex/.codex/skills/workflow/best-practices/references/before-after-examples.md +1114 -0
  130. package/bundles/codex/.codex/skills/workflow/best-practices/references/best-practices-guide.md +513 -0
  131. package/bundles/codex/.codex/skills/workflow/best-practices/references/common-workflows.md +692 -0
  132. package/bundles/codex/.codex/skills/workflow/best-practices/references/prompt-patterns.md +547 -0
  133. package/bundles/codex/.codex/skills/workflow/brainstorming/SKILL.md +57 -0
  134. package/bundles/codex/.codex/skills/workflow/context-curator/SKILL.md +157 -0
  135. package/bundles/codex/.codex/skills/workflow/golden-plan/SKILL.md +586 -0
  136. package/bundles/codex/.codex/skills/workflow/preflight/SKILL.md +440 -0
  137. package/bundles/codex/.codex/skills/workflow/skill-creator/LICENSE.txt +202 -0
  138. package/bundles/codex/.codex/skills/workflow/skill-creator/SKILL.md +491 -0
  139. package/bundles/codex/.codex/skills/workflow/skill-creator/agents/analyzer.md +274 -0
  140. package/bundles/codex/.codex/skills/workflow/skill-creator/agents/comparator.md +202 -0
  141. package/bundles/codex/.codex/skills/workflow/skill-creator/agents/grader.md +223 -0
  142. package/bundles/codex/.codex/skills/workflow/skill-creator/assets/eval_review.html +146 -0
  143. package/bundles/codex/.codex/skills/workflow/skill-creator/eval-viewer/generate_review.py +471 -0
  144. package/bundles/codex/.codex/skills/workflow/skill-creator/eval-viewer/viewer.html +1325 -0
  145. package/bundles/codex/.codex/skills/workflow/skill-creator/references/schemas.md +430 -0
  146. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/__init__.py +0 -0
  147. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/aggregate_benchmark.py +401 -0
  148. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/generate_report.py +326 -0
  149. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/improve_description.py +247 -0
  150. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/package_skill.py +136 -0
  151. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/quick_validate.py +103 -0
  152. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/run_eval.py +310 -0
  153. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/run_loop.py +328 -0
  154. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/utils.py +47 -0
  155. package/bundles/codex/AGENTS.md +146 -0
  156. package/bundles/manifest.json +4 -3
  157. package/dist/claude-deepseek.js +2 -2
  158. package/dist/claude-glm.js +2 -2
  159. package/dist/claude-oss.js +2 -2
  160. package/dist/cli.js +187 -56
  161. package/package.json +1 -1
  162. package/bundles/antigravity-plugin/scripts/dream_capture.py +0 -249
  163. package/bundles/antigravity-plugin/scripts/dream_memory.py +0 -438
  164. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +0 -93
  165. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  166. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  167. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +0 -93
  168. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  169. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +0 -93
  170. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  171. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  172. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +0 -93
  173. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  174. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  175. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  176. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +0 -93
  177. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  178. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +0 -93
  179. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  180. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +0 -94
  181. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  182. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  183. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +0 -93
  184. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  185. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +0 -93
  186. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  187. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  188. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +0 -93
  189. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  190. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  191. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  192. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  193. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  194. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  195. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  196. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  197. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +0 -93
  198. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  199. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  200. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  201. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +0 -93
  202. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  203. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  204. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +0 -93
  205. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  206. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  207. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  208. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-OFL.txt +0 -93
  209. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +0 -93
  210. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  211. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  212. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  213. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  214. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-OFL.txt +0 -93
  215. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  216. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  217. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +0 -93
  218. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  219. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +0 -93
  220. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  221. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  222. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +0 -93
  223. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  224. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  225. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +0 -93
  226. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +0 -93
  227. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  228. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  229. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +0 -93
  230. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  231. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +0 -93
  232. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  233. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  234. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +0 -93
  235. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  236. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +0 -93
  237. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  238. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  239. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  240. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  241. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +0 -93
  242. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  243. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +0 -93
  244. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
@@ -0,0 +1,418 @@
1
+ # Mermaid Diagram Workflows
2
+
3
+ Step-by-step examples for common diagramming tasks.
4
+
5
+ ## Workflow 1: Document a New API Endpoint
6
+
7
+ **When:** You've built a new API endpoint and need to document the flow for frontend developers.
8
+
9
+ **Steps:**
10
+
11
+ 1. **Choose diagram type:** Sequence diagram (shows temporal interactions)
12
+
13
+ 2. **Identify participants:**
14
+ ```mermaid
15
+ sequenceDiagram
16
+ participant Client
17
+ participant API
18
+ participant Database
19
+ ```
20
+
21
+ 3. **Add the happy path:**
22
+ ```mermaid
23
+ sequenceDiagram
24
+ participant Client
25
+ participant API
26
+ participant Database
27
+
28
+ Client->>API: POST /users
29
+ API->>Database: INSERT user
30
+ Database-->>API: Return user_id
31
+ API-->>Client: 201 Created + user object
32
+ ```
33
+
34
+ 4. **Add error handling:**
35
+ ```mermaid
36
+ sequenceDiagram
37
+ participant Client
38
+ participant API
39
+ participant Database
40
+
41
+ Client->>API: POST /users
42
+ API->>API: Validate input
43
+ alt Valid input
44
+ API->>Database: INSERT user
45
+ Database-->>API: Return user_id
46
+ API-->>Client: 201 Created + user object
47
+ else Invalid input
48
+ API-->>Client: 400 Bad Request + errors
49
+ else Duplicate email
50
+ Database-->>API: Constraint violation
51
+ API-->>Client: 409 Conflict
52
+ end
53
+ ```
54
+
55
+ 5. **Add notes for clarification:**
56
+ ```mermaid
57
+ sequenceDiagram
58
+ participant Client
59
+ participant API
60
+ participant Database
61
+
62
+ Note over Client,Database: User Registration Flow
63
+
64
+ Client->>API: POST /users
65
+ Note right of API: Validates email format,<br/>password strength
66
+
67
+ alt Valid input
68
+ API->>Database: INSERT user
69
+ Database-->>API: Return user_id
70
+ Note left of Database: Email must be unique
71
+ API-->>Client: 201 Created + user object
72
+ else Invalid input
73
+ API-->>Client: 400 Bad Request
74
+ end
75
+ ```
76
+
77
+ ## Workflow 2: Design a Database Schema
78
+
79
+ **When:** You're planning a new feature that needs new tables.
80
+
81
+ **Steps:**
82
+
83
+ 1. **Identify core entities:**
84
+ ```mermaid
85
+ erDiagram
86
+ USER
87
+ ORDER
88
+ PRODUCT
89
+ ```
90
+
91
+ 2. **Define relationships:**
92
+ ```mermaid
93
+ erDiagram
94
+ USER ||--o{ ORDER : places
95
+ ORDER ||--|{ LINE_ITEM : contains
96
+ PRODUCT ||--o{ LINE_ITEM : includes
97
+ ```
98
+
99
+ 3. **Add attributes:**
100
+ ```mermaid
101
+ erDiagram
102
+ USER ||--o{ ORDER : places
103
+ ORDER ||--|{ LINE_ITEM : contains
104
+ PRODUCT ||--o{ LINE_ITEM : includes
105
+
106
+ USER {
107
+ int id PK
108
+ string email UK
109
+ string name
110
+ datetime created_at
111
+ }
112
+
113
+ ORDER {
114
+ int id PK
115
+ int user_id FK
116
+ string status
117
+ decimal total
118
+ datetime created_at
119
+ }
120
+
121
+ PRODUCT {
122
+ int id PK
123
+ string name
124
+ string sku UK
125
+ decimal price
126
+ }
127
+
128
+ LINE_ITEM {
129
+ int id PK
130
+ int order_id FK
131
+ int product_id FK
132
+ int quantity
133
+ decimal price
134
+ }
135
+ ```
136
+
137
+ 4. **Validate design:**
138
+ - Check all foreign keys have corresponding primary keys
139
+ - Verify cardinality matches business rules
140
+ - Ensure unique constraints are marked (UK)
141
+
142
+ ## Workflow 3: Model a Domain (DDD)
143
+
144
+ **When:** You're implementing a new feature using Domain-Driven Design.
145
+
146
+ **Steps:**
147
+
148
+ 1. **Start with aggregates:**
149
+ ```mermaid
150
+ classDiagram
151
+ class Order
152
+ class LineItem
153
+ class Product
154
+ ```
155
+
156
+ 2. **Add relationships:**
157
+ ```mermaid
158
+ classDiagram
159
+ Order *-- LineItem : contains
160
+ LineItem --> Product : references
161
+ ```
162
+
163
+ 3. **Define entities with properties:**
164
+ ```mermaid
165
+ classDiagram
166
+ Order *-- LineItem
167
+ LineItem --> Product
168
+
169
+ class Order {
170
+ +OrderId id
171
+ +CustomerId customerId
172
+ +OrderStatus status
173
+ +Money total
174
+ +addItem(Product, quantity)
175
+ +calculateTotal()
176
+ +submit()
177
+ }
178
+
179
+ class LineItem {
180
+ +ProductId productId
181
+ +int quantity
182
+ +Money price
183
+ +updateQuantity(int)
184
+ }
185
+
186
+ class Product {
187
+ +ProductId id
188
+ +string name
189
+ +Money price
190
+ +bool inStock()
191
+ }
192
+ ```
193
+
194
+ 4. **Add value objects and enums:**
195
+ ```mermaid
196
+ classDiagram
197
+ Order *-- LineItem
198
+ Order --> OrderStatus
199
+ Order --> Money
200
+ LineItem --> Product
201
+ LineItem --> Money
202
+
203
+ class Order {
204
+ +OrderId id
205
+ +CustomerId customerId
206
+ +OrderStatus status
207
+ +Money total
208
+ }
209
+
210
+ class OrderStatus {
211
+ <<enumeration>>
212
+ DRAFT
213
+ SUBMITTED
214
+ PAID
215
+ SHIPPED
216
+ DELIVERED
217
+ CANCELLED
218
+ }
219
+
220
+ class Money {
221
+ <<value object>>
222
+ +decimal amount
223
+ +Currency currency
224
+ +add(Money)
225
+ }
226
+ ```
227
+
228
+ ## Workflow 4: Map a User Journey
229
+
230
+ **When:** You're planning a new feature and need to visualize the user experience.
231
+
232
+ **Steps:**
233
+
234
+ 1. **Define start and end points:**
235
+ ```mermaid
236
+ flowchart TD
237
+ Start([User lands on checkout])
238
+ End([Order confirmed])
239
+ ```
240
+
241
+ 2. **Add main path:**
242
+ ```mermaid
243
+ flowchart TD
244
+ Start([User lands on checkout]) --> Review[Review cart]
245
+ Review --> Payment[Enter payment]
246
+ Payment --> Confirm[Confirm order]
247
+ Confirm --> End([Order confirmed])
248
+ ```
249
+
250
+ 3. **Add decision points:**
251
+ ```mermaid
252
+ flowchart TD
253
+ Start([User lands on checkout]) --> Review[Review cart]
254
+ Review --> HasItems{Cart has items?}
255
+ HasItems -->|Yes| Payment[Enter payment]
256
+ HasItems -->|No| Empty[Show empty cart]
257
+ Payment --> Valid{Payment valid?}
258
+ Valid -->|Yes| Confirm[Confirm order]
259
+ Valid -->|No| Error[Show error]
260
+ Error --> Payment
261
+ Confirm --> End([Order confirmed])
262
+ ```
263
+
264
+ 4. **Add alternative flows:**
265
+ ```mermaid
266
+ flowchart TD
267
+ Start([User lands on checkout]) --> Auth{Logged in?}
268
+ Auth -->|No| Login[Login/Register]
269
+ Auth -->|Yes| Review[Review cart]
270
+ Login --> Review
271
+
272
+ Review --> HasItems{Cart has items?}
273
+ HasItems -->|Yes| Address{Has address?}
274
+ HasItems -->|No| Empty[Empty cart message]
275
+
276
+ Address -->|Yes| Payment[Enter payment]
277
+ Address -->|No| AddAddress[Add shipping address]
278
+ AddAddress --> Payment
279
+
280
+ Payment --> Valid{Payment valid?}
281
+ Valid -->|Yes| Confirm[Confirm order]
282
+ Valid -->|No| PaymentError[Show error]
283
+ PaymentError --> Payment
284
+
285
+ Confirm --> End([Order confirmed])
286
+ ```
287
+
288
+ ## Workflow 5: Document System Architecture
289
+
290
+ **When:** You need to show how your system components interact.
291
+
292
+ **Steps:**
293
+
294
+ 1. **Create context diagram (external view):**
295
+ ```mermaid
296
+ C4Context
297
+ title System Context - E-commerce Platform
298
+
299
+ Person(customer, "Customer", "Shops for products")
300
+ System(ecommerce, "E-commerce System", "Web application")
301
+ System_Ext(payment, "Payment Gateway", "Stripe")
302
+ System_Ext(email, "Email Service", "SendGrid")
303
+ System_Ext(shipping, "Shipping Provider", "FedEx API")
304
+
305
+ Rel(customer, ecommerce, "Browses and purchases")
306
+ Rel(ecommerce, payment, "Processes payments")
307
+ Rel(ecommerce, email, "Sends notifications")
308
+ Rel(ecommerce, shipping, "Creates shipments")
309
+ ```
310
+
311
+ 2. **Create container diagram (components):**
312
+ ```mermaid
313
+ C4Container
314
+ title Container Diagram - E-commerce System
315
+
316
+ Person(customer, "Customer")
317
+
318
+ Container_Boundary(c1, "E-commerce System") {
319
+ Container(web, "Web Application", "React", "SPA")
320
+ Container(api, "API", "Node.js", "REST API")
321
+ ContainerDb(db, "Database", "PostgreSQL", "Product, order data")
322
+ Container(worker, "Background Worker", "Node.js", "Processes async tasks")
323
+ ContainerQueue(queue, "Message Queue", "RabbitMQ")
324
+ }
325
+
326
+ System_Ext(payment, "Payment Gateway")
327
+
328
+ Rel(customer, web, "Uses", "HTTPS")
329
+ Rel(web, api, "Calls", "HTTPS/JSON")
330
+ Rel(api, db, "Reads/Writes")
331
+ Rel(api, queue, "Publishes messages")
332
+ Rel(worker, queue, "Subscribes to messages")
333
+ Rel(api, payment, "Processes payments", "HTTPS")
334
+ ```
335
+
336
+ 3. **Create component diagram (internal structure):**
337
+ ```mermaid
338
+ C4Component
339
+ title Component Diagram - API
340
+
341
+ Container_Boundary(api, "API") {
342
+ Component(controller, "Order Controller", "Express", "Handles HTTP requests")
343
+ Component(service, "Order Service", "TypeScript", "Business logic")
344
+ Component(repo, "Order Repository", "TypeORM", "Data access")
345
+ }
346
+
347
+ ContainerDb(db, "Database")
348
+ ContainerQueue(queue, "Message Queue")
349
+
350
+ Rel(controller, service, "Uses")
351
+ Rel(service, repo, "Uses")
352
+ Rel(repo, db, "Reads/Writes", "SQL")
353
+ Rel(service, queue, "Publishes events")
354
+ ```
355
+
356
+ ## Workflow 6: Plan a Refactoring
357
+
358
+ **When:** You want to document before/after states for a refactoring effort.
359
+
360
+ **Steps:**
361
+
362
+ 1. **Document current state:**
363
+ ```mermaid
364
+ classDiagram
365
+ class OrderController {
366
+ +createOrder(req, res)
367
+ +validatePayment()
368
+ +sendEmail()
369
+ +updateInventory()
370
+ }
371
+
372
+ note for OrderController "Controller doing too much:<br/>- Payment validation<br/>- Email sending<br/>- Inventory management"
373
+ ```
374
+
375
+ 2. **Design target state:**
376
+ ```mermaid
377
+ classDiagram
378
+ OrderController --> OrderService
379
+ OrderService --> PaymentService
380
+ OrderService --> EmailService
381
+ OrderService --> InventoryService
382
+
383
+ class OrderController {
384
+ +createOrder(req, res)
385
+ }
386
+
387
+ class OrderService {
388
+ +processOrder(orderData)
389
+ }
390
+
391
+ class PaymentService {
392
+ +validatePayment(paymentInfo)
393
+ }
394
+
395
+ class EmailService {
396
+ +sendOrderConfirmation(order)
397
+ }
398
+
399
+ class InventoryService {
400
+ +reserveItems(lineItems)
401
+ }
402
+ ```
403
+
404
+ 3. **Create migration steps:**
405
+ - Extract PaymentService
406
+ - Extract EmailService
407
+ - Extract InventoryService
408
+ - Refactor OrderController to use OrderService
409
+
410
+ ## Tips for Effective Workflows
411
+
412
+ 1. **Start with the big picture** - Context before details
413
+ 2. **Iterate incrementally** - Add complexity gradually
414
+ 3. **Validate at each step** - Test syntax at [mermaid.live](https://mermaid.live)
415
+ 4. **Use consistent naming** - Match code/database names
416
+ 5. **Add explanatory notes** - Clarify non-obvious parts
417
+ 6. **Version control** - Commit diagrams with related code changes
418
+ 7. **Update regularly** - Keep diagrams current as code evolves
@@ -0,0 +1,243 @@
1
+ ---
2
+ name: particle-art
3
+ version: 1.0.0
4
+ description: Generate animated particle art React/Next.js components — zero dependencies, spring physics, CSS-variable theming, DPR-correct canvas, mouse interaction. Use when the user wants animated hero art, a living logo, a branded initial or monogram, a constellation background, or any "particles that form a shape". Triggers on "particle animation", "node network", "animated letter/logo/initials", "living letter", "morphing particles", "constellation", "neural net art", "dot field", "stipple portrait", "halftone animation", "ASCII art animation", "background art for my site", or "art that reacts to mouse". Covers — text/initials → spring-node letter; preset patterns (constellation, helix, spiral, DNA, hex-grid, wave, infinity); custom SVG paths; custom polygon points; Unicode halftone stipple; Gaussian dot field with sparks; SVG circuit traces; hybrid combos. Outputs a complete, self-contained, copy-paste-ready React component. Prefer this over p5.js (zero-dep, React-native, TypeScript), tsParticles (richer spring physics, CSS-var theming), Three.js (lightweight, no WebGL).
5
+ ---
6
+
7
+ # Particle Art Generator
8
+
9
+ Produces animated React components using one of four rendering styles, each themeable via CSS custom properties and interactive via mouse. Zero npm dependencies — pure canvas and SVG.
10
+
11
+ ## Reference Files (read when needed)
12
+
13
+ | File | Read when |
14
+ |------|-----------|
15
+ | `references/canvas-utils.ts` | Starting any canvas-based component (DPR setup, theme colours, RAF loop) |
16
+ | `references/shape-sampler.ts` | Building target points for any shape — text, presets, SVG path, polygon |
17
+ | `references/node-shape.template.tsx` | Generating a **spring-node** component (repel/attract interaction) |
18
+ | `references/stipple.template.tsx` | Generating a **stipple** (Unicode halftone, static cloud) component |
19
+ | `references/stipple-morph.template.tsx` | Generating a **stipple-morph** component (halftone cloud → letter on hover) |
20
+ | `references/dot-field.template.tsx` | Generating a **dot-field** component |
21
+ | `references/trail-ghost.template.tsx` | Generating a **trail-ghost** component (spring-morph + phosphorescent trails) |
22
+ | `references/flow-field.template.tsx` | Generating a **flow-field** component (value-noise currents + letter assembly) |
23
+ | `references/usage-examples.md` | Checking finished examples before delivering |
24
+
25
+ ---
26
+
27
+ ## Step 0 — Gather Requirements
28
+
29
+ Ask (or infer from context) these five things before writing any code:
30
+
31
+ 1. **Shape** — What should the particles form?
32
+ - Text / initials: `"j"`, `"JS"`, `"AI"`, `"hello"`, any Unicode char or emoji
33
+ - Preset: `constellation` `helix` `spiral` `dna` `hexgrid` `wave` `infinity`
34
+ - Custom: SVG `d` path string, or `[x,y]` polygon coordinate array
35
+ - Abstract: no fixed shape (ambient cloud)
36
+
37
+ 2. **Style** — Which rendering engine?
38
+ - `spring-nodes` — canvas nodes spring to shape + ambient network (best for letters/logos, repel interaction)
39
+ - `morph-nodes` — nodes scatter in idle, coalesce into letter/shape on hover (best for "appear on demand")
40
+ - `stipple` — animated Unicode character halftone static cloud (best for atmospheric dot portraits)
41
+ - `stipple-morph` — halftone cloud that resolves into a letter/shape on hover (best for atmospheric + interactive)
42
+ - `dot-field` — Gaussian canvas dot cloud with sparks (best for cosmic/diffuse feel)
43
+ - `trail-ghost` — spring-morph nodes with phosphorescent trailing smears (best for ethereal/ghostly feel)
44
+ - `flow-field` — value-noise particle currents, assembles into letter on hover (best for organic/fluid feel)
45
+ - `circuit` — SVG grid traces with traveling pulses (best for tech/infrastructure feel)
46
+ - `hybrid` — spring-nodes foreground + dot-field background (most dramatic)
47
+
48
+ 3. **Size** — `sm` (240px) · `md` (300px) · `lg` (380px) · `xl` (480px) · or a number
49
+
50
+ 4. **Colors** — `theme-vars` (default, CSS custom props) · `[primary, secondary]` hex pair · `monochrome`
51
+
52
+ 5. **Interaction** — `repel` (default) · `attract` · `orbit` · `none`
53
+
54
+ If the user hasn't stated a style, recommend `spring-nodes` for text/initials, `dot-field` for abstract, `stipple` for atmospheric, `circuit` for technical backgrounds.
55
+
56
+ ---
57
+
58
+ ## Step 1 — Select and Read Reference Files
59
+
60
+ Read the canvas-utils and the template that matches the chosen style. Always read canvas-utils first — it has the DPR setup and theme colour helpers used by all canvas components.
61
+
62
+ For shape types:
63
+ - **text / initials / preset / polygon / SVG path** → read `shape-sampler.ts` for the correct `sampleShape()` call
64
+ - **abstract** → skip shape-sampler; use ambient-only config in the node-shape template
65
+
66
+ ---
67
+
68
+ ## Step 2 — Build the Component
69
+
70
+ ### Naming Convention
71
+ ```
72
+ <Subject><Style>Art.tsx
73
+ // Examples:
74
+ JSpringArt.tsx // letter "j", spring-nodes
75
+ ConstellationArt.tsx // preset constellation
76
+ HeroNodeArt.tsx // abstract spring-nodes for a hero section
77
+ ```
78
+
79
+ ### File Structure
80
+ ```tsx
81
+ "use client";
82
+ // 1. Imports (React only — no external deps)
83
+ // 2. Constants (physics params, sizing)
84
+ // 3. Shape builder function (calls sampleShape or defines points inline)
85
+ // 4. Component (useEffect → canvas setup → RAF loop → cleanup)
86
+ // 5. Export
87
+ ```
88
+
89
+ ### Physics Parameters by Use-Case
90
+
91
+ | Use-case | spring | friction | drift | linkDist | ambientN |
92
+ |----------|--------|----------|-------|----------|----------|
93
+ | Single letter | 0.036 | 0.88 | 0.06 | 72 | 14 |
94
+ | Short word (2-4 chars) | 0.030 | 0.90 | 0.04 | 60 | 8 |
95
+ | Long word / phrase | 0.025 | 0.92 | 0.03 | 50 | 4 |
96
+ | Abstract / no shape | — | 0.985 | — | 82 | all |
97
+ | Constellation preset | 0.012 | 0.94 | 0.05 | 90 | 6 |
98
+
99
+ ### Node Count Guidelines
100
+
101
+ | Shape | Recommended node count |
102
+ |-------|----------------------|
103
+ | Single letter (j, A) | 22–30 letter + 14–18 ambient |
104
+ | Two letters (JS, AI) | 35–45 letter + 12 ambient |
105
+ | Word ≤6 chars | 50–70 letter + 8 ambient |
106
+ | Preset shape | 28–40 |
107
+ | Abstract cloud | 32–48 ambient only |
108
+
109
+ ---
110
+
111
+ ## Step 3 — Adapt for the Project's Theme System
112
+
113
+ ### CSS-Variable Theming (default, always prefer this)
114
+ ```ts
115
+ // Read in the RAF loop — auto-updates on theme change
116
+ function themeRgb(v: string): [number, number, number] {
117
+ const ch = getComputedStyle(document.documentElement)
118
+ .getPropertyValue(v).trim().split(/\s+/).map(Number);
119
+ return [ch[0], ch[1], ch[2]];
120
+ }
121
+ // Usage: themeRgb("--accent-strong") → [79, 209, 197]
122
+ ```
123
+
124
+ Standard variable names (work with Tailwind CSS-variable setups):
125
+ - `--accent-strong` — primary / brightest nodes, tittle glow
126
+ - `--accent-soft` — secondary / lines and ambient nodes
127
+ - `--fg` — foreground text colour (fallback for monochrome)
128
+ - `--bg` — background (for any fill-behind effects)
129
+
130
+ If the project uses different variable names, ask the user or check `globals.css`.
131
+
132
+ ### Hex / Custom Colors
133
+ ```ts
134
+ function hexToRgb(hex: string): [number, number, number] {
135
+ const n = parseInt(hex.replace('#',''), 16);
136
+ return [(n >> 16) & 255, (n >> 8) & 255, n & 255];
137
+ }
138
+ // Hard-code in the RAF loop instead of reading CSS vars
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Step 4 — Interaction Modes
144
+
145
+ ### Repel (default)
146
+ ```ts
147
+ const mdx = p.x - mx, mdy = p.y - my;
148
+ const md = Math.sqrt(mdx*mdx + mdy*mdy);
149
+ if (md < REPEL_R && md > 0) {
150
+ const f = ((REPEL_R - md) / REPEL_R) * REPEL_F;
151
+ p.vx += (mdx / md) * f;
152
+ p.vy += (mdy / md) * f;
153
+ }
154
+ ```
155
+
156
+ ### Attract
157
+ ```ts
158
+ // Same but subtract instead of add
159
+ p.vx -= (mdx / md) * f;
160
+ p.vy -= (mdy / md) * f;
161
+ ```
162
+
163
+ ### Orbit
164
+ ```ts
165
+ // Apply tangential force (perpendicular to cursor vector)
166
+ p.vx += (-mdy / md) * f * 0.6;
167
+ p.vy += ( mdx / md) * f * 0.6;
168
+ ```
169
+
170
+ ### Spring-back (always apply for letter nodes)
171
+ ```ts
172
+ p.vx += (p.tx - p.x) * SPRING;
173
+ p.vy += (p.ty - p.y) * SPRING;
174
+ p.vx *= FRICTION;
175
+ p.vy *= FRICTION;
176
+ ```
177
+
178
+ ---
179
+
180
+ ## Step 5 — Accessibility & Performance
181
+
182
+ Always include:
183
+ ```tsx
184
+ <canvas aria-hidden="true" /> // decorative, not content
185
+ ```
186
+
187
+ Reduced-motion support — draw a static frame then return; never return before drawing:
188
+ ```ts
189
+ const reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
190
+ // ... build pts, set up canvas, build mouse listeners ...
191
+ if (reduced) {
192
+ // Snap shape nodes to their targets and draw one static frame
193
+ pts.forEach(p => { if (p.isShape) { p.x = p.tx; p.y = p.ty; } });
194
+ tick(); // draw once
195
+ cancelAnimationFrame(raf); // immediately cancel the RAF tick queued inside
196
+ return;
197
+ }
198
+ // Full animation loop starts here
199
+ ```
200
+ ⚠️ Never `return` before drawing for canvas components — that leaves the canvas blank, which is worse than any animation.
201
+
202
+ Performance rules:
203
+ - Read `getComputedStyle` **inside** the RAF loop (theme changes auto-apply, ~0.02ms/call)
204
+ - Use `devicePixelRatio` for crisp retina rendering (see canvas-utils)
205
+ - Clean up with `cancelAnimationFrame` and remove event listeners in the return callback
206
+ - Cap velocity: `if (spd > MAX_SPEED) { vx *= MAX_SPEED/spd; vy *= MAX_SPEED/spd; }`
207
+
208
+ ---
209
+
210
+ ## Step 6 — Deliver
211
+
212
+ Output the complete component file, then show the import + usage:
213
+
214
+ ```tsx
215
+ // Usage in any React/Next.js component:
216
+ import { MyArt } from "@/components/art/MyArt";
217
+
218
+ // In JSX:
219
+ <MyArt size={360} />
220
+
221
+ // For Next.js App Router pages — component already has "use client"
222
+ // For hero sections — wrap in a hidden-on-mobile div:
223
+ <div className="hidden lg:flex items-center justify-center">
224
+ <MyArt size={360} />
225
+ </div>
226
+ ```
227
+
228
+ ---
229
+
230
+ ## Quality Checklist
231
+
232
+ Before delivering, verify:
233
+ - [ ] `"use client"` at the top
234
+ - [ ] Canvas size set with `devicePixelRatio` scaling (from canvas-utils)
235
+ - [ ] `cancelAnimationFrame` + `removeEventListener` in useEffect cleanup
236
+ - [ ] `aria-hidden="true"` on the canvas/container
237
+ - [ ] `themeRgb()` reads CSS vars inside RAF loop (not outside)
238
+ - [ ] Mouse leaves handled (`mouseleave` resets to off-screen coords)
239
+ - [ ] Velocity capped to `MAX_SPEED`
240
+ - [ ] For letter nodes: spring force applied + damped FRICTION (not AMBIENT_FRICTION)
241
+ - [ ] TypeScript types — no `any`, interfaces for Pt/Dot/Spark
242
+ - [ ] Prefers-reduced-motion check
243
+ - [ ] Component is self-contained (no imports beyond React)