@caddis/cli 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) 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/claudster_config.py +0 -5
  8. package/bundles/antigravity-plugin/scripts/hook_log.py +1 -1
  9. package/bundles/antigravity-plugin/scripts/new-machine.ps1 +170 -0
  10. package/bundles/antigravity-plugin/scripts/oss_ask.py +1 -1
  11. package/bundles/antigravity-plugin/scripts/oss_model.py +10 -2
  12. package/bundles/antigravity-plugin/scripts/oss_review.py +1 -1
  13. package/bundles/antigravity-plugin/scripts/setup_project_ai.py +9 -6
  14. package/bundles/antigravity-plugin/session_end_agy.py +31 -6
  15. package/bundles/antigravity-plugin/skills/advisory-hub/SKILL.md +44 -0
  16. package/bundles/antigravity-plugin/skills/code-review/SKILL.md +11 -0
  17. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +21 -0
  18. package/bundles/antigravity-plugin/skills/gate-review/SKILL.md +11 -0
  19. package/bundles/antigravity-plugin/skills/implement/SKILL.md +36 -0
  20. package/bundles/antigravity-plugin/skills/security-review/SKILL.md +9 -0
  21. package/bundles/antigravity-plugin/skills/validate-phase/SKILL.md +31 -0
  22. package/bundles/antigravity-plugin/warm_start_agy.py +96 -9
  23. package/bundles/antigravity-plugin-extras/plugin.json +1 -1
  24. package/bundles/codex/.codex/config.toml.example +36 -0
  25. package/bundles/codex/.codex/skills/coding/api-design/SKILL.md +249 -0
  26. package/bundles/codex/.codex/skills/coding/backend-development/SKILL.md +305 -0
  27. package/bundles/codex/.codex/skills/coding/code-review/SKILL.md +140 -0
  28. package/bundles/codex/.codex/skills/coding/codebase-audit/SKILL.md +204 -0
  29. package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/SKILL.md +132 -0
  30. package/bundles/codex/.codex/skills/coding/dashboard-perf-sweep/scripts/perf_sweep.py +249 -0
  31. package/bundles/codex/.codex/skills/coding/error-handling/SKILL.md +260 -0
  32. package/bundles/codex/.codex/skills/coding/fastapi-dev/SKILL.md +300 -0
  33. package/bundles/codex/.codex/skills/coding/javascript-typescript/SKILL.md +142 -0
  34. package/bundles/codex/.codex/skills/coding/python/SKILL.md +388 -0
  35. package/bundles/codex/.codex/skills/coding/refactoring/SKILL.md +486 -0
  36. package/bundles/codex/.codex/skills/coding/security-review/SKILL.md +205 -0
  37. package/bundles/codex/.codex/skills/coding/sql/SKILL.md +321 -0
  38. package/bundles/codex/.codex/skills/data/database-design/SKILL.md +177 -0
  39. package/bundles/codex/.codex/skills/data/db-diagram/SKILL.md +148 -0
  40. package/bundles/codex/.codex/skills/data/db-diagram/scripts/sql_to_graph.py +1212 -0
  41. package/bundles/codex/.codex/skills/devops/ci-cd-pipeline/SKILL.md +315 -0
  42. package/bundles/codex/.codex/skills/devops/gh-cli/SKILL.md +195 -0
  43. package/bundles/codex/.codex/skills/devops/git-commit/SKILL.md +285 -0
  44. package/bundles/codex/.codex/skills/devops/using-git-worktrees/SKILL.md +217 -0
  45. package/bundles/codex/.codex/skills/devops/windows-deployment/SKILL.md +880 -0
  46. package/bundles/codex/.codex/skills/docs/code-documentation/SKILL.md +271 -0
  47. package/bundles/codex/.codex/skills/docs/explainer-doc/SKILL.md +97 -0
  48. package/bundles/codex/.codex/skills/docs/technical-writing/SKILL.md +286 -0
  49. package/bundles/codex/.codex/skills/docs/writing-plans/SKILL.md +387 -0
  50. package/bundles/codex/.codex/skills/frontend/css-architecture/SKILL.md +305 -0
  51. package/bundles/codex/.codex/skills/frontend/css-architecture/references/RESPONSIVE-DESIGN.md +604 -0
  52. package/bundles/codex/.codex/skills/frontend/frontend-design/SKILL.md +193 -0
  53. package/bundles/codex/.codex/skills/frontend/frontend-design/references/my-tech-stack.md +127 -0
  54. package/bundles/codex/.codex/skills/frontend/mockup/SKILL.md +242 -0
  55. package/bundles/codex/.codex/skills/frontend/react-best-practices/SKILL.md +269 -0
  56. package/bundles/codex/.codex/skills/frontend/react-dev/README.md +404 -0
  57. package/bundles/codex/.codex/skills/frontend/react-dev/SKILL.md +459 -0
  58. package/bundles/codex/.codex/skills/frontend/react-dev/examples/generic-components.md +579 -0
  59. package/bundles/codex/.codex/skills/frontend/react-dev/examples/server-components.md +579 -0
  60. package/bundles/codex/.codex/skills/frontend/react-dev/references/event-handlers.md +574 -0
  61. package/bundles/codex/.codex/skills/frontend/react-dev/references/hooks.md +456 -0
  62. package/bundles/codex/.codex/skills/frontend/react-dev/references/react-19-patterns.md +638 -0
  63. package/bundles/codex/.codex/skills/frontend/react-dev/references/react-router.md +1002 -0
  64. package/bundles/codex/.codex/skills/frontend/react-dev/references/tanstack-router.md +587 -0
  65. package/bundles/codex/.codex/skills/frontend/ui-review/SKILL.md +176 -0
  66. package/bundles/codex/.codex/skills/frontend/ui-review/references/framework-fixes.md +471 -0
  67. package/bundles/codex/.codex/skills/frontend/ui-review/references/visual-checklist.md +236 -0
  68. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/DESIGN_TOKENS.md +487 -0
  69. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/IMPLEMENTATION_GUIDE.md +177 -0
  70. package/bundles/codex/.codex/skills/frontend/warm-editorial-ui/SKILL.md +732 -0
  71. package/bundles/codex/.codex/skills/media/draw-io/SKILL.md +162 -0
  72. package/bundles/codex/.codex/skills/media/draw-io/references/aws-icons.md +677 -0
  73. package/bundles/codex/.codex/skills/media/draw-io/references/layout-guidelines.md +142 -0
  74. package/bundles/codex/.codex/skills/media/draw-io/references/troubleshooting.md +118 -0
  75. package/bundles/codex/.codex/skills/media/draw-io/references/workflows.md +103 -0
  76. package/bundles/codex/.codex/skills/media/draw-io/scripts/convert-drawio-to-png.sh +25 -0
  77. package/bundles/codex/.codex/skills/media/draw-io/scripts/find_aws_icon.py +79 -0
  78. package/bundles/codex/.codex/skills/media/mermaid-diagrams/SKILL.md +292 -0
  79. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/ENHANCEMENTS.md +264 -0
  80. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/MERMAID-SUMMARY.md +137 -0
  81. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/advanced-features.md +556 -0
  82. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/architecture-diagrams.md +192 -0
  83. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/c4-diagrams.md +410 -0
  84. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/class-diagrams.md +361 -0
  85. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/erd-diagrams.md +510 -0
  86. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/flowcharts.md +450 -0
  87. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/sequence-diagrams.md +394 -0
  88. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/troubleshooting.md +335 -0
  89. package/bundles/codex/.codex/skills/media/mermaid-diagrams/references/workflows.md +418 -0
  90. package/bundles/codex/.codex/skills/media/particle-art/SKILL.md +243 -0
  91. package/bundles/codex/.codex/skills/media/particle-art/references/canvas-utils.ts +171 -0
  92. package/bundles/codex/.codex/skills/media/particle-art/references/dot-field.template.tsx +203 -0
  93. package/bundles/codex/.codex/skills/media/particle-art/references/flow-field.template.tsx +263 -0
  94. package/bundles/codex/.codex/skills/media/particle-art/references/node-shape.template.tsx +261 -0
  95. package/bundles/codex/.codex/skills/media/particle-art/references/shape-sampler.ts +281 -0
  96. package/bundles/codex/.codex/skills/media/particle-art/references/stipple-morph.template.tsx +167 -0
  97. package/bundles/codex/.codex/skills/media/particle-art/references/stipple.template.tsx +175 -0
  98. package/bundles/codex/.codex/skills/media/particle-art/references/trail-ghost.template.tsx +266 -0
  99. package/bundles/codex/.codex/skills/media/particle-art/references/usage-examples.md +320 -0
  100. package/bundles/codex/.codex/skills/testing/playwright/API_REFERENCE.md +653 -0
  101. package/bundles/codex/.codex/skills/testing/playwright/SKILL.md +454 -0
  102. package/bundles/codex/.codex/skills/testing/playwright/lib/helpers.js +441 -0
  103. package/bundles/codex/.codex/skills/testing/playwright/package.json +26 -0
  104. package/bundles/codex/.codex/skills/testing/playwright/run.js +228 -0
  105. package/bundles/codex/.codex/skills/testing/tdd-workflow/SKILL.md +188 -0
  106. package/bundles/codex/.codex/skills/testing/test-strategy/SKILL.md +155 -0
  107. package/bundles/codex/.codex/skills/testing/webapp-testing/LICENSE.txt +202 -0
  108. package/bundles/codex/.codex/skills/testing/webapp-testing/SKILL.md +97 -0
  109. package/bundles/codex/.codex/skills/testing/webapp-testing/examples/console_logging.py +35 -0
  110. package/bundles/codex/.codex/skills/testing/webapp-testing/examples/element_discovery.py +40 -0
  111. package/bundles/codex/.codex/skills/testing/webapp-testing/examples/static_html_automation.py +33 -0
  112. package/bundles/codex/.codex/skills/testing/webapp-testing/scripts/with_server.py +106 -0
  113. package/bundles/codex/.codex/skills/workflow/advisory-hub/SKILL.md +227 -0
  114. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/context-template.md +214 -0
  115. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/hub-handbook.md +233 -0
  116. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/report-contract.md +94 -0
  117. package/bundles/codex/.codex/skills/workflow/advisory-hub/reference/succession.md +118 -0
  118. package/bundles/codex/.codex/skills/workflow/best-practices/SKILL.md +500 -0
  119. package/bundles/codex/.codex/skills/workflow/best-practices/agents/best-practices-referencer.md +263 -0
  120. package/bundles/codex/.codex/skills/workflow/best-practices/agents/codebase-context-builder.md +326 -0
  121. package/bundles/codex/.codex/skills/workflow/best-practices/agents/task-intent-analyzer.md +245 -0
  122. package/bundles/codex/.codex/skills/workflow/best-practices/references/anti-patterns.md +571 -0
  123. package/bundles/codex/.codex/skills/workflow/best-practices/references/before-after-examples.md +1114 -0
  124. package/bundles/codex/.codex/skills/workflow/best-practices/references/best-practices-guide.md +513 -0
  125. package/bundles/codex/.codex/skills/workflow/best-practices/references/common-workflows.md +692 -0
  126. package/bundles/codex/.codex/skills/workflow/best-practices/references/prompt-patterns.md +547 -0
  127. package/bundles/codex/.codex/skills/workflow/brainstorming/SKILL.md +57 -0
  128. package/bundles/codex/.codex/skills/workflow/context-curator/SKILL.md +157 -0
  129. package/bundles/codex/.codex/skills/workflow/golden-plan/SKILL.md +586 -0
  130. package/bundles/codex/.codex/skills/workflow/preflight/SKILL.md +440 -0
  131. package/bundles/codex/.codex/skills/workflow/skill-creator/LICENSE.txt +202 -0
  132. package/bundles/codex/.codex/skills/workflow/skill-creator/SKILL.md +491 -0
  133. package/bundles/codex/.codex/skills/workflow/skill-creator/agents/analyzer.md +274 -0
  134. package/bundles/codex/.codex/skills/workflow/skill-creator/agents/comparator.md +202 -0
  135. package/bundles/codex/.codex/skills/workflow/skill-creator/agents/grader.md +223 -0
  136. package/bundles/codex/.codex/skills/workflow/skill-creator/assets/eval_review.html +146 -0
  137. package/bundles/codex/.codex/skills/workflow/skill-creator/eval-viewer/generate_review.py +471 -0
  138. package/bundles/codex/.codex/skills/workflow/skill-creator/eval-viewer/viewer.html +1325 -0
  139. package/bundles/codex/.codex/skills/workflow/skill-creator/references/schemas.md +430 -0
  140. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/__init__.py +0 -0
  141. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/aggregate_benchmark.py +401 -0
  142. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/generate_report.py +326 -0
  143. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/improve_description.py +247 -0
  144. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/package_skill.py +136 -0
  145. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/quick_validate.py +103 -0
  146. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/run_eval.py +310 -0
  147. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/run_loop.py +328 -0
  148. package/bundles/codex/.codex/skills/workflow/skill-creator/scripts/utils.py +47 -0
  149. package/bundles/codex/AGENTS.md +146 -0
  150. package/bundles/manifest.json +4 -3
  151. package/dist/claude-deepseek.js +2 -2
  152. package/dist/claude-glm.js +2 -2
  153. package/dist/claude-oss.js +2 -2
  154. package/dist/cli.js +187 -56
  155. package/package.json +1 -1
  156. package/bundles/antigravity-plugin/scripts/dream_capture.py +0 -249
  157. package/bundles/antigravity-plugin/scripts/dream_memory.py +0 -438
  158. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +0 -93
  159. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  160. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  161. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +0 -93
  162. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  163. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +0 -93
  164. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  165. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  166. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +0 -93
  167. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  168. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  169. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  170. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +0 -93
  171. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  172. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +0 -93
  173. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  174. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +0 -94
  175. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  176. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  177. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +0 -93
  178. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  179. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +0 -93
  180. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  181. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  182. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +0 -93
  183. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  184. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  185. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  186. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  187. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  188. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  189. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  190. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  191. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +0 -93
  192. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  193. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  194. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  195. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +0 -93
  196. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  197. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  198. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +0 -93
  199. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  200. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  201. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  202. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-OFL.txt +0 -93
  203. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +0 -93
  204. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  205. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  206. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  207. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  208. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-OFL.txt +0 -93
  209. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  210. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  211. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +0 -93
  212. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  213. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +0 -93
  214. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  215. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  216. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +0 -93
  217. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  218. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  219. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +0 -93
  220. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +0 -93
  221. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  222. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  223. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +0 -93
  224. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  225. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +0 -93
  226. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  227. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  228. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +0 -93
  229. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  230. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +0 -93
  231. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  232. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  233. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  234. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  235. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +0 -93
  236. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  237. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +0 -93
  238. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
@@ -0,0 +1,387 @@
1
+ ---
2
+ name: writing-plans
3
+ context: fork
4
+ description: Use when you have a spec or requirements for a multi-step task, before touching code
5
+ ---
6
+
7
+ # Writing Plans
8
+
9
+ ## Overview
10
+
11
+ Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
12
+
13
+ Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
14
+
15
+ **Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
16
+
17
+ **Context:** This should be run in a dedicated worktree (created by brainstorming skill).
18
+
19
+ > **Prefer `/caddis:feature-plan`.** It is the canonical planning entry point and produces a plan
20
+ > the harness can resume, track and gate. This skill remains for free-form planning prose.
21
+
22
+ **Save plans to:** `.caddis/plans/YYYY-MM-DD-<feature-name>.md`
23
+
24
+ **Document metadata:** Before creating or updating a plan, apply `.github/instructions/document-frontmatter.instructions.md`. The YAML frontmatter block must be the first content in the file. New plans require `Original Author`, `Creation Date`, and `Creating Model`; revised plans must preserve those fields and add or update `Last Author`, `Last Updated`, and `Last Model Used`.
25
+
26
+ ## Bite-Sized Task Granularity
27
+
28
+ **Each step is one action (2-5 minutes):**
29
+ - "Write the failing test" - step
30
+ - "Run it to make sure it fails" - step
31
+ - "Implement the minimal code to make the test pass" - step
32
+ - "Run the tests and make sure they pass" - step
33
+ - "Commit" - step
34
+
35
+ ## Plan Document Header
36
+
37
+ **Every plan MUST start with this header (YAML frontmatter first, then title):**
38
+
39
+ ```markdown
40
+ ---
41
+ chain_id: <chain_id>
42
+ type: plan
43
+ status: current
44
+ approval: pending
45
+ Original Author: <active author or agent name>
46
+ Creation Date: <YYYY-MM-DDTHH:MM:SSZ>
47
+ Creating Model: <exact runtime model identifier or display name>
48
+ ---
49
+
50
+ # [Feature Name] Implementation Plan
51
+
52
+ > **For the implementing agent:** Follow this plan task-by-task, executing each step sequentially.
53
+
54
+ **Goal:** [One sentence describing what this builds]
55
+
56
+ **Architecture:** [2-3 sentences about approach]
57
+
58
+ **Tech Stack:** [Key technologies/libraries]
59
+
60
+ ---
61
+ ```
62
+
63
+ > ⚠️ The YAML frontmatter block (`---` delimiters) is required for Orchestrator artefact contract validation. Do NOT use blockquote-style metadata (`> **approval:** pending`) — it will not be parsed.
64
+ > Preserve the original metadata fields on later edits, and add or update `Last Author`, `Last Updated`, and `Last Model Used` when the plan is revised. Use full ISO 8601 UTC timestamps for `Creation Date` and `Last Updated`.
65
+
66
+ ## Task Structure
67
+
68
+ ```markdown
69
+ ### Task N: [Component Name]
70
+
71
+ **Files:**
72
+ - Create: `exact/path/to/file.py`
73
+ - Modify: `exact/path/to/existing.py:123-145`
74
+ - Test: `tests/exact/path/to/test.py`
75
+
76
+ **Step 1: Write the failing test**
77
+
78
+ ```python
79
+ def test_specific_behavior():
80
+ result = function(input)
81
+ assert result == expected
82
+ ```
83
+
84
+ **Step 2: Run test to verify it fails**
85
+
86
+ Run: `pytest tests/path/test.py::test_name -v`
87
+ Expected: FAIL with "function not defined"
88
+
89
+ **Step 3: Write minimal implementation**
90
+
91
+ ```python
92
+ def function(input):
93
+ return expected
94
+ ```
95
+
96
+ **Step 4: Run test to verify it passes**
97
+
98
+ Run: `pytest tests/path/test.py::test_name -v`
99
+ Expected: PASS
100
+
101
+ **Step 5: Commit**
102
+
103
+ ```bash
104
+ git add tests/path/test.py src/path/file.py
105
+ git commit -m "feat: add specific feature"
106
+ ```
107
+ ```
108
+
109
+ ## Manual Execution Protocol
110
+
111
+ **Every plan MUST include a Manual Execution Protocol section** at the top (after header, before phases). This tells the user exactly how to run each phase session:
112
+
113
+ ```markdown
114
+ ## Manual Execution Protocol
115
+
116
+ For each phase below, follow this workflow:
117
+
118
+ 1. **Open** a new chat session with the agent specified in the phase header
119
+ 2. **Load skills** listed in the phase's "Skills to load" section
120
+ 3. **Attach files** listed in the phase's "Files to attach" section
121
+ 4. **Paste** the self-contained Phase Prompt into the chat
122
+ 5. **Validate** using the phase's Validation Checklist — every item must pass
123
+ 6. **Get green light** before moving to the next phase
124
+
125
+ **Drift rule:** If you find bugs introduced by Phase N, fix them in the SAME session
126
+ before starting Phase N+1. Never carry implementation debt forward between phases.
127
+
128
+ **Dependency sequencing rule:** Write phases in execution order \u2014 every phase's dependencies must appear before that phase in the plan. If Phase 3 requires output from Phase 4, reorder before writing. No forward dependencies.
129
+ ```
130
+
131
+ ## Phase 0 — Context & Decisions
132
+
133
+ **Every multi-phase plan MUST include a Phase 0** before the implementation phases. Phase 0 is not an implementation phase — it is a ground-truth inventory that prevents agents from making assumptions.
134
+
135
+ Phase 0 contains four mandatory tables:
136
+
137
+ ### Technology Decision Table
138
+
139
+ ```markdown
140
+ ### Technology Decisions
141
+
142
+ | Decision | Choice | Rationale |
143
+ |----------|--------|-----------|
144
+ | Charting library | Recharts | Tree-shakeable, React-native, typed API |
145
+ | Animation | Framer Motion | AnimatePresence for tab transitions, spring physics |
146
+ | State management | Zustand | Lightweight, no boilerplate, devtools support |
147
+ | ... | ... | ... |
148
+ ```
149
+
150
+ Every technology choice that is NOT already in `project-config.md` must appear here with a rationale.
151
+
152
+ ### Data Parity / Availability Matrix
153
+
154
+ ```markdown
155
+ ### Data Availability
156
+
157
+ | Feature / Tab | Data Field | Available? | Strategy |
158
+ |---------------|-----------|------------|----------|
159
+ | Executive Overview | `ceoInsight` | ✅ Full | Live API |
160
+ | Product Deep-Dive | `satisfactionScores` | ❌ Empty `{}` | Show empty state: "Coming in future release" |
161
+ | Geography | `byGeography` | ⚠️ Partial (was present May-Oct) | Show empty state with explanation |
162
+ | ... | ... | ... | ... |
163
+ ```
164
+
165
+ For any data field that may be empty, partial, or absent: document the exact empty state message text.
166
+
167
+ ### Existing Scaffold Audit
168
+
169
+ ```markdown
170
+ ### Existing Scaffold — DO NOT Recreate
171
+
172
+ | File | Purpose | Current State |
173
+ |------|---------|---------------|
174
+ | `frontend/src/api/client.ts` | API client with JWT auth | ✅ Working — build on top |
175
+ | `frontend/src/types/nps.ts` | 30+ TypeScript interfaces | ✅ Working — import, don't recreate |
176
+ | `frontend/src/components/layout/AppShell.tsx` | App shell | ⚠️ Cold zinc theme — needs warm overhaul |
177
+ | ... | ... | ... |
178
+ ```
179
+
180
+ The "Current State" column tells agents what exists and whether to modify or leave it alone.
181
+
182
+ ### Dependency Split
183
+
184
+ ```markdown
185
+ ### Dependencies
186
+
187
+ **Already installed** (DO NOT reinstall):
188
+ - react, react-dom, typescript, vite
189
+ - @tanstack/react-query, @tanstack/react-router
190
+ - tailwindcss, zustand
191
+
192
+ **Not yet installed** (install in Phase 1):
193
+ - recharts, framer-motion, leaflet, react-leaflet
194
+ - d3-force, d3-scale
195
+ ```
196
+
197
+ ## Enhanced Per-Phase Template
198
+
199
+ **Every implementation phase MUST use this structure.** The sections OUTSIDE the prompt block are for the user (what to prepare before opening a session). The prompt block is for the agent (what to paste into the session).
200
+
201
+ ```markdown
202
+ ## Phase N — {Name}
203
+
204
+ **Agent:** `@{agent-name}`
205
+ **Objective:** {One sentence describing what this phase builds}
206
+
207
+ ### Skills to load
208
+
209
+ - `.github/skills/{path}/SKILL.md` — {why}
210
+ - `.github/skills/{path}/SKILL.md` — {why}
211
+
212
+ ### Instructions to follow
213
+
214
+ - `.github/instructions/{name}.instructions.md`
215
+ - `.github/instructions/{name}.instructions.md`
216
+
217
+ ### Files to attach
218
+
219
+ - `path/to/file.ext` — {why this file is needed}
220
+ - `path/to/file.ext` (from Phase N-1)
221
+ - `.caddis/plans/{this-plan}.md` (this file)
222
+
223
+ ### Phase Prompt
224
+
225
+ \`\`\`
226
+ {Self-contained prompt — copy-paste ready. 30-60 lines.
227
+ References plan sections for detail. Does NOT duplicate code blocks.
228
+ Includes PRINCIPLES, SKILLS TO READ, IMPORTANT warnings, and numbered deliverable list.}
229
+ \`\`\`
230
+
231
+ ### What to build
232
+
233
+ #### N.1 {Deliverable Name}
234
+
235
+ **File:** `exact/path/to/file.ext`
236
+
237
+ {Component interface / function signature}
238
+
239
+ **Data binding:**
240
+ - Uses `data.field.path` for {purpose}
241
+ - Uses `data.other.field` for {purpose}
242
+
243
+ **Behavior:**
244
+ - {Specific interactive behavior}
245
+ - {Animation spec with exact values}
246
+
247
+ **Empty state:** When `data.field` is `{}` or `[]`:
248
+ > "{Exact message text to display}"
249
+
250
+ **IMPORTANT:** {Trap-specific warning — e.g., "DO NOT recreate api/client.ts",
251
+ "field uses snake_case in BOTH API and TS types — no transformation needed"}
252
+
253
+ #### N.2 {Next Deliverable}
254
+ ...
255
+
256
+ ### Validation Checklist — Phase N complete when
257
+
258
+ - [ ] `npm run build` succeeds (or equivalent build command)
259
+ - [ ] {Specific behavioral criterion — e.g., "KpiFlipCard flip animation works independently on each card"}
260
+ - [ ] {Data binding criterion — e.g., "NpsSummaryTable renders 5 rows with correct data from surveys + trend"}
261
+ - [ ] {Visual criterion — e.g., "Dark mode: all components render correctly with soft dark tokens"}
262
+ - [ ] {Integration criterion — e.g., "Row click switches to Tab 2 and scrolls to chart"}
263
+ - [ ] Zero hardcoded data — all from props/hooks
264
+ - [ ] Zero hardcoded colors — all from CSS vars or constants
265
+ ```
266
+
267
+ ### Key rules for the "What to build" subsections
268
+
269
+ 1. **Data binding is mandatory for UI components.** Every component spec must list the exact JSON field paths it consumes (e.g., `surveys.{product}.nps`, `trend.historicalNPS.byProduct.{product}`). This eliminates the #1 implementer failure mode: guessing which field to bind.
270
+
271
+ 2. **Empty state specs are mandatory.** For every data field that might be empty, specify the exact message text. Do NOT say "show appropriate empty state" — write the message.
272
+
273
+ 3. **IMPORTANT warnings for traps.** If a file already exists and must NOT be recreated, say so. If a field uses unexpected casing (snake_case where camelCase is expected), warn explicitly. These prevent the most common implementation errors.
274
+
275
+ 4. **Complete code blocks when the component is foundational.** For theme files, config files, utility functions, and CSS — include the full source code in the plan. For application components — specify interface, behavior, and data binding; let the agent write the implementation.
276
+
277
+ ## Remember
278
+ - Exact file paths always
279
+ - Complete code in plan (not "add validation")
280
+ - Exact commands with expected output
281
+ - Reference relevant skills with @ syntax
282
+ - DRY, YAGNI, TDD, frequent commits
283
+ - **Every phase MUST end with a numbered exit gate task** (e.g., "Task N.X: Exit Gate") that includes pass/fail checks, commit message format, and an explicit "STOP — do not proceed to next phase" instruction
284
+ - **Every phase/step must specify the executing agent and include a ready-to-use prompt with `═══ PROMPT START` / `═══ PROMPT END` markers**
285
+ - **Use 4-backtick fences (`` ```` ``) for the outer prompt block** so nested code blocks render correctly
286
+ - **After writing all phases, run the Cross-Reference Audit against ALL source documents**
287
+ - **Every plan MUST include a Manual Execution Protocol and Phase 0 — Context & Decisions**
288
+ - **Every UI phase MUST include data binding specs (exact JSON paths) per component**
289
+ - **Every data field that might be empty MUST have an explicit empty state message**
290
+ - **Drift rule: fix bugs from Phase N before starting Phase N+1**
291
+
292
+ ## Cross-Reference Audit
293
+
294
+ **Run this AFTER all phases are written, BEFORE finalizing the plan.**
295
+
296
+ Walk through every FR, NFR, risk, and design decision from ALL input documents. For each, verify it maps to a specific, actionable plan step. Output a traceability matrix:
297
+
298
+ ```markdown
299
+ ## Source Document Traceability
300
+
301
+ | Requirement | Source | Plan Phase/Step | Status |
302
+ |-------------|--------|-----------------|--------|
303
+ | FR-101 | PRD §3.1 | Phase 1, Step 2 | ✅ Covered |
304
+ | NFR-208 | PRD §4.2 | Phase 5, Step 1 | ✅ Covered |
305
+ | Risk-003 | Arch §9 | Phase 3, Step 3 | ✅ Covered |
306
+ | ALT-002 | Arch §7.4 | N/A | ⚠️ Out of Scope — rationale: deferred to v2 |
307
+ ```
308
+
309
+ **Rules:**
310
+ - A requirement without a plan step → add a step or mark "Out of Scope" with rationale
311
+ - A cited section reference (§N) → verify the section number matches the actual document
312
+ - Zero-tolerance: no unmapped requirements in a finalized plan
313
+
314
+ ## Agent & Prompt Assignment
315
+
316
+ **Every phase/step MUST include a ready-to-use prompt block.** This is non-negotiable because plans are executed across multiple sessions by different agents.
317
+
318
+ ### Prompt Block Template
319
+
320
+ > **CRITICAL**: Use 4-backtick fences (` ```` `) for the outer prompt block so nested code blocks (yaml, python, etc.) inside the prompt render correctly. Add `═══ PROMPT START` and `═══ PROMPT END` markers so users can clearly see where to copy from/to.
321
+
322
+ ```markdown
323
+ ### Ready-to-Use Prompt (Phase N — Step M)
324
+
325
+ > **How to use:** Copy the prompt block below (between ═══ START and ═══ END markers) into a new chat session. **Include all code blocks** — they're context for the agent, not for you to apply manually.
326
+ > **Agent:** `@{agent-name}` (see `.github/agents/{agent-name}.agent.md`)
327
+ > **Skills to load:** `.github/skills/{skill-path}/SKILL.md`
328
+ > **Instructions (auto-applied):** `{instruction1}.instructions.md`, `{instruction2}.instructions.md`
329
+ > **Project config:** `.github/project-config.md` (profile: `{profile}`)
330
+
331
+ > ═══ PROMPT START — Copy everything between START and END into a new chat ═══
332
+
333
+ \`\`\`\`
334
+ {One-sentence task description}
335
+
336
+ **Agent context:** You are the `@{agent-name}` agent. Load `.github/project-config.md` before starting.
337
+
338
+ **Read these files FIRST (in order):**
339
+ 1. `.caddis/plans/{plan-file}.md` — **THIS PLAN** — read "Phase N — Step M"
340
+ 2. {Architecture/PRD doc} — {specific sections}
341
+ 3. {Target file(s)} — current state
342
+
343
+ **What to do:**
344
+ - {Actionable instruction 1}
345
+ - {Actionable instruction 2}
346
+
347
+ **Acceptance criteria:**
348
+ - {Testable criterion 1}
349
+ - {Testable criterion 2}
350
+
351
+ **Scope boundary:**
352
+ - Exit gate: Task N.X (the last task in this phase)
353
+ - Do NOT proceed to Phase N+1 after the exit gate passes
354
+ - Do NOT offer additional work beyond the exit gate tasks
355
+ - Commit with: `feat({feature}): Phase N — {description}` and STOP
356
+ \`\`\`\`
357
+
358
+ > ═══ PROMPT END ═══════════════════════════════════════════════════════════
359
+ ```
360
+
361
+ ### Agent Selection Guide
362
+
363
+ | Task Type | Agent | Agent File |
364
+ |-----------|-------|------------|
365
+ | Models, services, logic | `@implement` | `implement.agent.md` |
366
+ | Streamlit UI, components | `@streamlit-developer` | `streamlit-developer.agent.md` |
367
+ | Tests, fixtures | `@tester` | `tester.agent.md` |
368
+ | SQL queries, schema | `@sql-expert` | `sql-expert.agent.md` |
369
+ | Docs, README | `@docs` | `docs.agent.md` |
370
+ | Code review | `@code-review` | `code-review.agent.md` |
371
+
372
+ ## Execution Handoff
373
+
374
+ After saving the plan, offer execution choice:
375
+
376
+ **"Plan complete and saved to `.caddis/plans/<filename>.md`. Two execution options:**
377
+
378
+ **1. This session** — I implement each task sequentially, reviewing between tasks
379
+
380
+ **2. Separate session** — Open a new session with the `@implement` agent and provide the plan path
381
+
382
+ **Which approach?"**
383
+
384
+ **If separate session chosen:**
385
+ - Guide them to open new session
386
+ - Reference the `@implement` agent (`.github/agents/implement.agent.md`)
387
+ - Provide the plan file path for the implementing agent to read
@@ -0,0 +1,305 @@
1
+ ---
2
+ name: css-architecture
3
+ description: CSS architecture, design token strategy, Tailwind conventions, CSS Modules, container queries, dark mode, responsive patterns, and animation architecture. Use for design token naming, CSS custom properties, Tailwind config, container queries, dark mode implementation, fluid typography, or CSS animation decisions. Complements frontend-design (what to achieve) with how to implement it.
4
+ ---
5
+
6
+ # CSS Architecture Skill
7
+
8
+ How to implement what `frontend-design` specifies. Covers design token strategy, Tailwind conventions, responsive patterns, dark mode, and animation architecture.
9
+
10
+ ## 1. Design Token Strategy — CSS Custom Properties
11
+
12
+ ### Hierarchy (global → component)
13
+ ```css
14
+ /* Layer 1: Primitive tokens (raw values) */
15
+ :root {
16
+ --color-slate-900: #0f172a;
17
+ --color-slate-100: #f1f5f9;
18
+ --color-amber-500: #f59e0b;
19
+ --space-4: 1rem;
20
+ --space-8: 2rem;
21
+ --radius-md: 0.5rem;
22
+ --font-sans: 'Inter Variable', system-ui, sans-serif;
23
+
24
+ /* Layer 2: Semantic tokens (intent) */
25
+ --color-bg: var(--color-slate-900);
26
+ --color-surface: hsl(220 15% 12%);
27
+ --color-text: var(--color-slate-100);
28
+ --color-accent: var(--color-amber-500);
29
+ --color-border: hsl(220 15% 20%);
30
+
31
+ /* Layer 3: Component tokens */
32
+ --button-bg: var(--color-accent);
33
+ --button-text: var(--color-slate-900);
34
+ --card-padding: var(--space-8);
35
+ }
36
+ ```
37
+
38
+ ### Naming Conventions
39
+ - Primitive: `--color-{hue}-{shade}`, `--space-{n}`, `--radius-{size}`
40
+ - Semantic: `--color-{role}` (bg, surface, text, accent, border, error, success)
41
+ - Component: `--{component}-{property}` (button-bg, card-radius)
42
+ - Never skip semantic layer — primitives must not be used directly in components.
43
+
44
+ ## 2. Tailwind Conventions
45
+
46
+ ### v3 Config (`tailwind.config.ts`)
47
+ ```ts
48
+ import type { Config } from 'tailwindcss'
49
+ import { fontFamily } from 'tailwindcss/defaultTheme'
50
+
51
+ const config: Config = {
52
+ content: ['./src/**/*.{ts,tsx,mdx}'],
53
+ darkMode: 'class', // or 'media'
54
+ theme: {
55
+ extend: {
56
+ colors: {
57
+ // Map to CSS custom properties so tokens work everywhere
58
+ bg: 'hsl(var(--color-bg) / <alpha-value>)',
59
+ surface: 'hsl(var(--color-surface) / <alpha-value>)',
60
+ accent: 'hsl(var(--color-accent) / <alpha-value>)',
61
+ border: 'hsl(var(--color-border) / <alpha-value>)',
62
+ },
63
+ fontFamily: {
64
+ sans: ['var(--font-sans)', ...fontFamily.sans],
65
+ display: ['var(--font-display)', ...fontFamily.serif],
66
+ },
67
+ borderRadius: { DEFAULT: 'var(--radius-md)' },
68
+ animation: {
69
+ 'fade-up': 'fadeUp 0.4s ease-out',
70
+ 'fade-in': 'fadeIn 0.3s ease-out',
71
+ },
72
+ keyframes: {
73
+ fadeUp: { from: { opacity: '0', transform: 'translateY(12px)' }, to: { opacity: '1', transform: 'none' } },
74
+ fadeIn: { from: { opacity: '0' }, to: { opacity: '1' } },
75
+ },
76
+ },
77
+ },
78
+ plugins: [
79
+ require('@tailwindcss/typography'),
80
+ require('@tailwindcss/container-queries'),
81
+ ],
82
+ }
83
+ export default config
84
+ ```
85
+
86
+ ### v4 Config (CSS-first)
87
+ ```css
88
+ /* globals.css — Tailwind v4 uses @theme, no tailwind.config.ts */
89
+ @import "tailwindcss";
90
+
91
+ @theme {
92
+ --color-accent: oklch(75% 0.18 85);
93
+ --font-sans: 'Inter Variable', system-ui, sans-serif;
94
+ --radius-default: 0.5rem;
95
+ }
96
+ ```
97
+
98
+ ### `@apply` Rules
99
+ - Use `@apply` sparingly — only for repeated utility combos in shared components (`btn`, `card`).
100
+ - Prefer component classes over `@apply` in large components — Tailwind utility classes in JSX are more readable.
101
+ - Never `@apply` responsive or state variants (`hover:`, `md:`) — those are JSX-only.
102
+
103
+ ## 3. CSS Modules vs Tailwind — Decision Criteria
104
+
105
+ | Use Tailwind | Use CSS Modules |
106
+ |---|---|
107
+ | UI components, layouts, spacing | Complex animations with `@keyframes` that need JS access |
108
+ | Responsive design | Component styles that conflict with Tailwind's reset |
109
+ | Dark mode | Styles requiring CSS `calc()` with token math |
110
+ | One-off utility combos | Legacy codebases with existing `.module.css` patterns |
111
+ | New projects | Server-rendered styles that must avoid className hydration |
112
+
113
+ **Hybrid**: Tailwind for layout/spacing/color, CSS Modules for complex animation or context-dependent logic.
114
+
115
+ ## 4. Container Queries
116
+
117
+ Responsive based on parent container width, not viewport.
118
+
119
+ ```tsx
120
+ // tailwind.config.ts: add @tailwindcss/container-queries plugin
121
+ // Install: pnpm add -D @tailwindcss/container-queries
122
+
123
+ export function Card({ children }: { children: React.ReactNode }) {
124
+ return (
125
+ // Mark the container
126
+ <div className="@container rounded-lg bg-surface p-6">
127
+ <div className="grid @sm:grid-cols-2 @lg:grid-cols-3 gap-4">
128
+ {children}
129
+ </div>
130
+ </div>
131
+ )
132
+ }
133
+ ```
134
+
135
+ ```css
136
+ /* Pure CSS container queries */
137
+ .card { container-type: inline-size; }
138
+
139
+ @container (min-width: 400px) {
140
+ .card-body { display: grid; grid-template-columns: 1fr 1fr; }
141
+ }
142
+ ```
143
+
144
+ **Use container queries when**: a component is used in multiple layout contexts (sidebar vs main vs modal) and needs different layouts in each.
145
+
146
+ ## 5. Dark Mode
147
+
148
+ ### Class Toggle (recommended for app control)
149
+ ```tsx
150
+ // Toggle on <html> element
151
+ document.documentElement.classList.toggle('dark')
152
+
153
+ // Tailwind: darkMode: 'class' in config
154
+ // CSS: dark: prefix on utilities
155
+ <div className="bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100">
156
+ ```
157
+
158
+ ### CSS Custom Property Token Switching
159
+ ```css
160
+ :root {
161
+ --color-bg: hsl(0 0% 100%);
162
+ --color-text: hsl(220 15% 10%);
163
+ --color-accent: hsl(220 90% 55%);
164
+ }
165
+
166
+ .dark {
167
+ --color-bg: hsl(220 15% 8%);
168
+ --color-text: hsl(220 10% 90%);
169
+ --color-accent: hsl(220 90% 65%);
170
+ }
171
+
172
+ /* With prefers-color-scheme fallback */
173
+ @media (prefers-color-scheme: dark) {
174
+ :root:not(.light) {
175
+ --color-bg: hsl(220 15% 8%);
176
+ --color-text: hsl(220 10% 90%);
177
+ }
178
+ }
179
+ ```
180
+
181
+ ## 6. Responsive Patterns — Mobile-First
182
+
183
+ ```tsx
184
+ // Mobile-first: base = mobile, md: = tablet, lg+ = desktop
185
+ <div className="
186
+ flex flex-col gap-4 /* mobile */
187
+ md:flex-row md:gap-6 /* tablet */
188
+ lg:gap-8 /* desktop */
189
+ ">
190
+ ```
191
+
192
+ ### Fluid Typography with `clamp()`
193
+ ```css
194
+ /* Min, preferred (viewport-relative), max */
195
+ .hero-heading {
196
+ font-size: clamp(2rem, 5vw + 1rem, 5rem);
197
+ line-height: clamp(1.1, 1.2, 1.3);
198
+ }
199
+
200
+ /* In Tailwind (custom utility) */
201
+ /* tailwind.config.ts > theme.extend.fontSize */
202
+ 'fluid-xl': 'clamp(1.5rem, 3vw + 0.5rem, 2.5rem)',
203
+ ```
204
+
205
+ ### Breakpoint Tokens
206
+ ```ts
207
+ // Consistent with Tailwind defaults
208
+ const breakpoints = { sm: '640px', md: '768px', lg: '1024px', xl: '1280px', '2xl': '1536px' }
209
+ ```
210
+
211
+ ## 7. Animation Architecture
212
+
213
+ ### Decision Matrix
214
+ | Use Case | Solution |
215
+ |---|---|
216
+ | Simple enter/exit | CSS `@keyframes` + `transition` |
217
+ | Complex sequences / orchestrated | Framer Motion |
218
+ | Physics-based spring | Framer Motion `spring` |
219
+ | Hover/focus micro-interactions | CSS `transition` (no JS cost) |
220
+ | Scroll-driven | CSS `@scroll-timeline` or Framer `useInView` |
221
+ | Page transitions | Framer `AnimatePresence` |
222
+
223
+ ### CSS Transitions
224
+ ```css
225
+ /* ✅ GPU-accelerated properties only */
226
+ .card {
227
+ transition: transform 200ms ease-out, opacity 200ms ease-out,
228
+ box-shadow 200ms ease-out;
229
+ }
230
+ .card:hover {
231
+ transform: translateY(-2px);
232
+ box-shadow: 0 8px 32px hsl(0 0% 0% / 0.15);
233
+ }
234
+ ```
235
+
236
+ ### `@keyframes` Structure
237
+ ```css
238
+ @keyframes slideIn {
239
+ from { opacity: 0; transform: translateX(-16px); }
240
+ to { opacity: 1; transform: none; }
241
+ }
242
+
243
+ /* Apply with animation shorthand */
244
+ .panel { animation: slideIn 300ms ease-out both; }
245
+ ```
246
+
247
+ ### `prefers-reduced-motion` — Non-Negotiable
248
+ ```css
249
+ /* Global reset for reduced motion */
250
+ @media (prefers-reduced-motion: reduce) {
251
+ *, *::before, *::after {
252
+ animation-duration: 0.01ms !important;
253
+ animation-iteration-count: 1 !important;
254
+ transition-duration: 0.01ms !important;
255
+ }
256
+ }
257
+ ```
258
+
259
+ ## 8. Anti-Patterns
260
+
261
+ | Anti-Pattern | Problem | Fix |
262
+ |---|---|---|
263
+ | `!important` | Specificity wars, hard to override | Refactor selector or use CSS layers (`@layer`) |
264
+ | Specificity wars | `.sidebar .card .button {}` | BEM naming or CSS Modules scoping |
265
+ | Magic numbers z-index (`z-[9999]`) | Unpredictable stacking | Named z-index tokens in config |
266
+ | Inline style overrides | Bypasses design system | Add utility class or extend Tailwind theme |
267
+ | Animating layout properties | Reflow on every frame | Animate `transform` + `opacity` only |
268
+ | `@apply` for large blocks | Reduces readability benefit of Tailwind | Component extraction instead |
269
+ | Global selector bleed in CSS Modules | `.module.css` affects non-module elements | Scope all selectors with `:local()` or class names |
270
+
271
+ ## 9. Z-Index Layer System
272
+
273
+ ```ts
274
+ // tailwind.config.ts
275
+ extend: {
276
+ zIndex: {
277
+ base: '0',
278
+ above: '10',
279
+ dropdown: '100',
280
+ sticky: '200',
281
+ overlay: '300',
282
+ modal: '400',
283
+ toast: '500',
284
+ tooltip: '600',
285
+ }
286
+ }
287
+ ```
288
+
289
+ ```tsx
290
+ // Use named z-index in JSX
291
+ <div className="z-modal">…</div>
292
+ ```
293
+
294
+ ## 10. Checklist
295
+
296
+ - [ ] CSS custom properties defined at 3 layers (primitive → semantic → component)
297
+ - [ ] No primitive tokens used directly in component styles
298
+ - [ ] Tailwind version confirmed before writing config
299
+ - [ ] `@apply` used only for repeated utility combos, not state variants
300
+ - [ ] Container queries used for multi-context components
301
+ - [ ] Dark mode uses token switching (not duplicated utility classes)
302
+ - [ ] All animations respect `prefers-reduced-motion`
303
+ - [ ] Fluid typography with `clamp()` for hero/heading text
304
+ - [ ] Z-index uses named tokens, not inline integers
305
+ - [ ] No `!important` in component styles