@jhm1909/ag-kit 0.1.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 (320) hide show
  1. package/.agent/ARCHITECTURE.md +189 -0
  2. package/.agent/known-registries.json +181 -0
  3. package/.agent/mcp_config.json +19 -0
  4. package/.agent/rules/clean-code.md +107 -0
  5. package/.agent/rules/documents.md +177 -0
  6. package/.agent/rules/git-workflow.md +68 -0
  7. package/.agent/rules/nano-banana.md +46 -0
  8. package/.agent/rules/research.md +35 -0
  9. package/.agent/rules/skill-loading.md +100 -0
  10. package/.agent/rules/skill-suggestion.md +47 -0
  11. package/.agent/rules/testing.md +52 -0
  12. package/.agent/rules/workflow-advisor.md +108 -0
  13. package/.agent/rules/workflow-skill-convention.md +127 -0
  14. package/.agent/skills/ai-engineer/SKILL.md +824 -0
  15. package/.agent/skills/ai-engineer/references/agentic-patterns.md +329 -0
  16. package/.agent/skills/ai-engineer/references/evaluation.md +493 -0
  17. package/.agent/skills/ai-engineer/references/llm.md +490 -0
  18. package/.agent/skills/ai-engineer/references/rag-advanced.md +444 -0
  19. package/.agent/skills/ai-engineer/references/serving-optimization.md +531 -0
  20. package/.agent/skills/ai-engineer/vector-db/README.md +137 -0
  21. package/.agent/skills/app-builder/SKILL.md +75 -0
  22. package/.agent/skills/app-builder/agent-coordination.md +71 -0
  23. package/.agent/skills/app-builder/feature-building.md +53 -0
  24. package/.agent/skills/app-builder/project-detection.md +34 -0
  25. package/.agent/skills/app-builder/scaffolding.md +118 -0
  26. package/.agent/skills/app-builder/tech-stack.md +41 -0
  27. package/.agent/skills/app-builder/templates/SKILL.md +39 -0
  28. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  29. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  30. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  31. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  32. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  33. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  34. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  35. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
  36. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
  37. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
  38. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
  39. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  40. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
  41. package/.agent/skills/backend-developer/SKILL.md +763 -0
  42. package/.agent/skills/backend-developer/references/general-patterns.md +65 -0
  43. package/.agent/skills/backend-developer/references/go-echo.md +68 -0
  44. package/.agent/skills/backend-developer/references/go-gin.md +76 -0
  45. package/.agent/skills/backend-developer/references/java-springboot.md +83 -0
  46. package/.agent/skills/backend-developer/references/node-express.md +64 -0
  47. package/.agent/skills/backend-developer/references/node-nestjs.md +69 -0
  48. package/.agent/skills/backend-developer/references/python-django.md +67 -0
  49. package/.agent/skills/backend-developer/references/python-fastapi.md +80 -0
  50. package/.agent/skills/blockchain-engineer/SKILL.md +975 -0
  51. package/.agent/skills/blockchain-engineer/references/deployment.md +28 -0
  52. package/.agent/skills/blockchain-engineer/references/evm.md +14 -0
  53. package/.agent/skills/blockchain-engineer/references/mechanisms.md +32 -0
  54. package/.agent/skills/blockchain-engineer/references/solidity.md +32 -0
  55. package/.agent/skills/business-analysis/SKILL.md +85 -0
  56. package/.agent/skills/business-analysis/references/best-practices/diagrams.md +141 -0
  57. package/.agent/skills/business-analysis/references/domains/ai-agent.md +94 -0
  58. package/.agent/skills/business-analysis/references/domains/blockchain-dapp.md +86 -0
  59. package/.agent/skills/business-analysis/references/domains/ecommerce.md +77 -0
  60. package/.agent/skills/business-analysis/references/domains/education.md +42 -0
  61. package/.agent/skills/business-analysis/references/domains/fintech.md +44 -0
  62. package/.agent/skills/business-analysis/references/domains/fnb.md +82 -0
  63. package/.agent/skills/business-analysis/references/domains/healthtech.md +44 -0
  64. package/.agent/skills/business-analysis/references/domains/internal-tools.md +38 -0
  65. package/.agent/skills/business-analysis/references/domains/marketplace.md +52 -0
  66. package/.agent/skills/business-analysis/references/domains/saas.md +36 -0
  67. package/.agent/skills/business-analysis/references/workflows/collaboration.md +41 -0
  68. package/.agent/skills/business-analysis/scripts/verify_mermaid.py +86 -0
  69. package/.agent/skills/business-analysis/templates/brd.md +46 -0
  70. package/.agent/skills/business-analysis/templates/change-request.md +41 -0
  71. package/.agent/skills/business-analysis/templates/prd-functional.md +38 -0
  72. package/.agent/skills/business-analysis/templates/use-case.md +40 -0
  73. package/.agent/skills/business-analysis/templates/user-story-detailed.md +36 -0
  74. package/.agent/skills/code-review/SKILL.md +113 -0
  75. package/.agent/skills/code-review/references/code-review-reception.md +209 -0
  76. package/.agent/skills/code-review/references/differential_review.md +59 -0
  77. package/.agent/skills/code-review/references/requesting-code-review.md +105 -0
  78. package/.agent/skills/code-review/references/spec_compliance.md +43 -0
  79. package/.agent/skills/code-review/references/verification-before-completion.md +139 -0
  80. package/.agent/skills/context-engineering/SKILL.md +68 -0
  81. package/.agent/skills/context-engineering/references/context-compression.md +84 -0
  82. package/.agent/skills/context-engineering/references/context-degradation.md +93 -0
  83. package/.agent/skills/context-engineering/references/context-fundamentals.md +75 -0
  84. package/.agent/skills/context-engineering/references/context-optimization.md +82 -0
  85. package/.agent/skills/context-engineering/references/evaluation.md +89 -0
  86. package/.agent/skills/context-engineering/references/memory-systems.md +88 -0
  87. package/.agent/skills/context-engineering/references/multi-agent-patterns.md +90 -0
  88. package/.agent/skills/context-engineering/references/project-development.md +97 -0
  89. package/.agent/skills/context-engineering/references/tool-design.md +86 -0
  90. package/.agent/skills/debugging/SKILL.md +60 -0
  91. package/.agent/skills/debugging/references/defense-in-depth.md +130 -0
  92. package/.agent/skills/debugging/references/root-cause-tracing.md +177 -0
  93. package/.agent/skills/debugging/references/systematic-debugging.md +295 -0
  94. package/.agent/skills/debugging/references/verification-before-completion.md +142 -0
  95. package/.agent/skills/designer/SKILL.md +159 -0
  96. package/.agent/skills/designer/concepts/apple-glass.md +48 -0
  97. package/.agent/skills/designer/concepts/aurora-gradients.md +26 -0
  98. package/.agent/skills/designer/concepts/bento-grids.md +14 -0
  99. package/.agent/skills/designer/concepts/claymorphism.md +27 -0
  100. package/.agent/skills/designer/concepts/neo-brutalism.md +32 -0
  101. package/.agent/skills/designer/data/app-interface.csv +31 -0
  102. package/.agent/skills/designer/data/charts.csv +26 -0
  103. package/.agent/skills/designer/data/colors.csv +162 -0
  104. package/.agent/skills/designer/data/design.csv +1776 -0
  105. package/.agent/skills/designer/data/icons.csv +106 -0
  106. package/.agent/skills/designer/data/landing.csv +35 -0
  107. package/.agent/skills/designer/data/products.csv +162 -0
  108. package/.agent/skills/designer/data/react-performance.csv +45 -0
  109. package/.agent/skills/designer/data/styles.csv +85 -0
  110. package/.agent/skills/designer/data/typography.csv +74 -0
  111. package/.agent/skills/designer/data/ui-reasoning.csv +162 -0
  112. package/.agent/skills/designer/data/ux-guidelines.csv +100 -0
  113. package/.agent/skills/designer/references/accessibility.md +172 -0
  114. package/.agent/skills/designer/references/branding.md +88 -0
  115. package/.agent/skills/designer/references/color-theory.md +139 -0
  116. package/.agent/skills/designer/references/creation.md +118 -0
  117. package/.agent/skills/designer/references/design-systems.md +219 -0
  118. package/.agent/skills/designer/references/frontend_design_aesthetics.md +57 -0
  119. package/.agent/skills/designer/references/layout.md +200 -0
  120. package/.agent/skills/designer/references/motion.md +92 -0
  121. package/.agent/skills/designer/references/review.md +100 -0
  122. package/.agent/skills/designer/references/trends.md +209 -0
  123. package/.agent/skills/designer/references/typography.md +190 -0
  124. package/.agent/skills/designer/scripts/remove_background.py +135 -0
  125. package/.agent/skills/designer/scripts/ui-search/__pycache__/core.cpython-314.pyc +0 -0
  126. package/.agent/skills/designer/scripts/ui-search/__pycache__/design_system.cpython-314.pyc +0 -0
  127. package/.agent/skills/designer/scripts/ui-search/core.py +217 -0
  128. package/.agent/skills/designer/scripts/ui-search/design_system.py +1067 -0
  129. package/.agent/skills/designer/scripts/ui-search/search.py +114 -0
  130. package/.agent/skills/designer/templates/design-motion-spec.md +30 -0
  131. package/.agent/skills/devops-engineer/SKILL.md +90 -0
  132. package/.agent/skills/devops-engineer/docker-compose/README.md +47 -0
  133. package/.agent/skills/devops-engineer/references/ci-cd-pipelines.md +76 -0
  134. package/.agent/skills/devops-engineer/references/cloud-providers.md +57 -0
  135. package/.agent/skills/devops-engineer/references/codebase-normalization.md +104 -0
  136. package/.agent/skills/devops-engineer/references/container-orchestration.md +69 -0
  137. package/.agent/skills/devops-engineer/references/iac-tools.md +63 -0
  138. package/.agent/skills/devops-engineer/references/observability-security.md +45 -0
  139. package/.agent/skills/devops-engineer/references/vercel-supabase.md +17 -0
  140. package/.agent/skills/devops-engineer/templates/release-notes.md +8 -0
  141. package/.agent/skills/frontend-developer/SKILL.md +125 -0
  142. package/.agent/skills/frontend-developer/react-nextjs/README.md +90 -0
  143. package/.agent/skills/frontend-developer/references/angular.md +52 -0
  144. package/.agent/skills/frontend-developer/references/composition_patterns.md +60 -0
  145. package/.agent/skills/frontend-developer/references/core-performance.md +68 -0
  146. package/.agent/skills/frontend-developer/references/modern-signals.md +43 -0
  147. package/.agent/skills/frontend-developer/references/react_performance_rules.md +55 -0
  148. package/.agent/skills/frontend-developer/references/vue-nuxt.md +55 -0
  149. package/.agent/skills/frontend-developer/scripts/validate_compliance.py +65 -0
  150. package/.agent/skills/frontend-developer/threejs/README.md +89 -0
  151. package/.agent/skills/frontend-developer/threejs/animation.md +552 -0
  152. package/.agent/skills/frontend-developer/threejs/fundamentals.md +488 -0
  153. package/.agent/skills/frontend-developer/threejs/geometry.md +548 -0
  154. package/.agent/skills/frontend-developer/threejs/interaction.md +660 -0
  155. package/.agent/skills/frontend-developer/threejs/lighting.md +481 -0
  156. package/.agent/skills/frontend-developer/threejs/loaders.md +623 -0
  157. package/.agent/skills/frontend-developer/threejs/materials.md +520 -0
  158. package/.agent/skills/frontend-developer/threejs/postprocessing.md +602 -0
  159. package/.agent/skills/frontend-developer/threejs/router.json +181 -0
  160. package/.agent/skills/frontend-developer/threejs/shaders.md +642 -0
  161. package/.agent/skills/frontend-developer/threejs/textures.md +628 -0
  162. package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
  163. package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
  164. package/.agent/skills/game-development/SKILL.md +167 -0
  165. package/.agent/skills/game-development/game-art/SKILL.md +185 -0
  166. package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
  167. package/.agent/skills/game-development/game-design/SKILL.md +129 -0
  168. package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
  169. package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
  170. package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
  171. package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
  172. package/.agent/skills/game-development/web-games/SKILL.md +150 -0
  173. package/.agent/skills/lead-architect/SKILL.md +85 -0
  174. package/.agent/skills/lead-architect/references/application-architecture.md +70 -0
  175. package/.agent/skills/lead-architect/references/infrastructure.md +51 -0
  176. package/.agent/skills/lead-architect/references/process.md +42 -0
  177. package/.agent/skills/lead-architect/references/system-architecture.md +62 -0
  178. package/.agent/skills/lead-architect/references/web-fullstack.md +82 -0
  179. package/.agent/skills/lead-architect/templates/adr.md +62 -0
  180. package/.agent/skills/lead-architect/templates/rfc.md +46 -0
  181. package/.agent/skills/lead-architect/templates/sdd.md +62 -0
  182. package/.agent/skills/lead-architect/templates/technical-spec.md +61 -0
  183. package/.agent/skills/marketer/SKILL.md +66 -0
  184. package/.agent/skills/marketer/remotion-best-practices/SKILL.md +58 -0
  185. package/.agent/skills/marketer/remotion-best-practices/rules/3d.md +86 -0
  186. package/.agent/skills/marketer/remotion-best-practices/rules/animations.md +29 -0
  187. package/.agent/skills/marketer/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
  188. package/.agent/skills/marketer/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
  189. package/.agent/skills/marketer/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
  190. package/.agent/skills/marketer/remotion-best-practices/rules/assets.md +78 -0
  191. package/.agent/skills/marketer/remotion-best-practices/rules/audio.md +172 -0
  192. package/.agent/skills/marketer/remotion-best-practices/rules/calculate-metadata.md +104 -0
  193. package/.agent/skills/marketer/remotion-best-practices/rules/can-decode.md +75 -0
  194. package/.agent/skills/marketer/remotion-best-practices/rules/charts.md +58 -0
  195. package/.agent/skills/marketer/remotion-best-practices/rules/compositions.md +146 -0
  196. package/.agent/skills/marketer/remotion-best-practices/rules/display-captions.md +126 -0
  197. package/.agent/skills/marketer/remotion-best-practices/rules/extract-frames.md +229 -0
  198. package/.agent/skills/marketer/remotion-best-practices/rules/fonts.md +152 -0
  199. package/.agent/skills/marketer/remotion-best-practices/rules/get-audio-duration.md +58 -0
  200. package/.agent/skills/marketer/remotion-best-practices/rules/get-video-dimensions.md +68 -0
  201. package/.agent/skills/marketer/remotion-best-practices/rules/get-video-duration.md +58 -0
  202. package/.agent/skills/marketer/remotion-best-practices/rules/gifs.md +138 -0
  203. package/.agent/skills/marketer/remotion-best-practices/rules/images.md +130 -0
  204. package/.agent/skills/marketer/remotion-best-practices/rules/import-srt-captions.md +67 -0
  205. package/.agent/skills/marketer/remotion-best-practices/rules/lottie.md +68 -0
  206. package/.agent/skills/marketer/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
  207. package/.agent/skills/marketer/remotion-best-practices/rules/measuring-text.md +143 -0
  208. package/.agent/skills/marketer/remotion-best-practices/rules/sequencing.md +106 -0
  209. package/.agent/skills/marketer/remotion-best-practices/rules/tailwind.md +11 -0
  210. package/.agent/skills/marketer/remotion-best-practices/rules/text-animations.md +20 -0
  211. package/.agent/skills/marketer/remotion-best-practices/rules/timing.md +179 -0
  212. package/.agent/skills/marketer/remotion-best-practices/rules/transcribe-captions.md +19 -0
  213. package/.agent/skills/marketer/remotion-best-practices/rules/transitions.md +122 -0
  214. package/.agent/skills/marketer/remotion-best-practices/rules/trimming.md +53 -0
  215. package/.agent/skills/marketer/remotion-best-practices/rules/videos.md +171 -0
  216. package/.agent/skills/mcp-builder/SKILL.md +76 -0
  217. package/.agent/skills/mcp-builder/references/evaluation.md +602 -0
  218. package/.agent/skills/mcp-builder/references/mcp_best_practices.md +249 -0
  219. package/.agent/skills/mcp-builder/references/node_mcp_server.md +970 -0
  220. package/.agent/skills/mcp-builder/references/python_mcp_server.md +719 -0
  221. package/.agent/skills/mobile-developer/SKILL.md +83 -0
  222. package/.agent/skills/mobile-developer/api-routes/SKILL.md +389 -0
  223. package/.agent/skills/mobile-developer/building-ui/SKILL.md +335 -0
  224. package/.agent/skills/mobile-developer/building-ui/references/animations.md +220 -0
  225. package/.agent/skills/mobile-developer/building-ui/references/controls.md +270 -0
  226. package/.agent/skills/mobile-developer/building-ui/references/form-sheet.md +227 -0
  227. package/.agent/skills/mobile-developer/building-ui/references/gradients.md +106 -0
  228. package/.agent/skills/mobile-developer/building-ui/references/icons.md +213 -0
  229. package/.agent/skills/mobile-developer/building-ui/references/media.md +198 -0
  230. package/.agent/skills/mobile-developer/building-ui/references/route-structure.md +229 -0
  231. package/.agent/skills/mobile-developer/building-ui/references/search.md +248 -0
  232. package/.agent/skills/mobile-developer/building-ui/references/storage.md +121 -0
  233. package/.agent/skills/mobile-developer/building-ui/references/tabs.md +368 -0
  234. package/.agent/skills/mobile-developer/building-ui/references/visual-effects.md +197 -0
  235. package/.agent/skills/mobile-developer/building-ui/references/webgpu-three.md +605 -0
  236. package/.agent/skills/mobile-developer/cicd-workflows/SKILL.md +107 -0
  237. package/.agent/skills/mobile-developer/cicd-workflows/scripts/fetch.js +109 -0
  238. package/.agent/skills/mobile-developer/cicd-workflows/scripts/package.json +11 -0
  239. package/.agent/skills/mobile-developer/cicd-workflows/scripts/validate.js +84 -0
  240. package/.agent/skills/mobile-developer/data-fetching/SKILL.md +508 -0
  241. package/.agent/skills/mobile-developer/deployment/SKILL.md +207 -0
  242. package/.agent/skills/mobile-developer/deployment/references/app-store-metadata.md +479 -0
  243. package/.agent/skills/mobile-developer/deployment/references/ios-app-store.md +355 -0
  244. package/.agent/skills/mobile-developer/deployment/references/play-store.md +246 -0
  245. package/.agent/skills/mobile-developer/deployment/references/testflight.md +58 -0
  246. package/.agent/skills/mobile-developer/deployment/references/workflows.md +200 -0
  247. package/.agent/skills/mobile-developer/dev-client/SKILL.md +181 -0
  248. package/.agent/skills/mobile-developer/tailwind-setup/SKILL.md +501 -0
  249. package/.agent/skills/mobile-developer/upgrading-expo/SKILL.md +116 -0
  250. package/.agent/skills/mobile-developer/upgrading-expo/references/new-architecture.md +79 -0
  251. package/.agent/skills/mobile-developer/upgrading-expo/references/react-19.md +79 -0
  252. package/.agent/skills/mobile-developer/upgrading-expo/references/react-compiler.md +59 -0
  253. package/.agent/skills/mobile-developer/use-dom/SKILL.md +434 -0
  254. package/.agent/skills/modern-python/SKILL.md +122 -0
  255. package/.agent/skills/project-manager/SKILL.md +110 -0
  256. package/.agent/skills/project-manager/references/ba-collaboration.md +62 -0
  257. package/.agent/skills/project-manager/references/discovery_process.md +52 -0
  258. package/.agent/skills/project-manager/references/jobs_to_be_done.md +51 -0
  259. package/.agent/skills/project-manager/references/prd_development.md +52 -0
  260. package/.agent/skills/project-manager/references/rules-guide.md +55 -0
  261. package/.agent/skills/project-manager/references/skill-creation.md +98 -0
  262. package/.agent/skills/project-manager/references/strategic-frameworks.md +62 -0
  263. package/.agent/skills/project-manager/references/task-decomposition.md +194 -0
  264. package/.agent/skills/project-manager/references/workflows-guide.md +44 -0
  265. package/.agent/skills/project-manager/router.json +160 -0
  266. package/.agent/skills/project-manager/scripts/compare_skill.py +177 -0
  267. package/.agent/skills/project-manager/scripts/encoding_utils.py +36 -0
  268. package/.agent/skills/project-manager/scripts/init_skill.py +190 -0
  269. package/.agent/skills/project-manager/scripts/quick_validate.py +123 -0
  270. package/.agent/skills/project-manager/templates/pm-strategy-one-pager.md +6 -0
  271. package/.agent/skills/project-manager/templates/prd-strategic.md +38 -0
  272. package/.agent/skills/project-manager/templates/skill-questionnaire.md +118 -0
  273. package/.agent/skills/project-manager/templates/user-story-simple.md +14 -0
  274. package/.agent/skills/prompt-engineer/SKILL.md +319 -0
  275. package/.agent/skills/prompt-engineer/skill-creator/README.md +47 -0
  276. package/.agent/skills/qa-tester/SKILL.md +142 -0
  277. package/.agent/skills/qa-tester/assets/README.md +8 -0
  278. package/.agent/skills/qa-tester/references/accessibility_testing.md +35 -0
  279. package/.agent/skills/qa-tester/references/agent_browser.md +38 -0
  280. package/.agent/skills/qa-tester/references/automation/api_testing.md +23 -0
  281. package/.agent/skills/qa-tester/references/automation/best_practices.md +14 -0
  282. package/.agent/skills/qa-tester/references/automation/jest_vitest.md +26 -0
  283. package/.agent/skills/qa-tester/references/automation/playwright.md +30 -0
  284. package/.agent/skills/qa-tester/references/e2e_testing.md +46 -0
  285. package/.agent/skills/qa-tester/references/integration_testing.md +39 -0
  286. package/.agent/skills/qa-tester/references/performance_testing.md +44 -0
  287. package/.agent/skills/qa-tester/references/property_based_testing.md +44 -0
  288. package/.agent/skills/qa-tester/references/security_audit.md +53 -0
  289. package/.agent/skills/qa-tester/references/security_testing.md +30 -0
  290. package/.agent/skills/qa-tester/references/sharp_edges.md +49 -0
  291. package/.agent/skills/qa-tester/references/static_analysis.md +52 -0
  292. package/.agent/skills/qa-tester/references/supply_chain_audit.md +54 -0
  293. package/.agent/skills/qa-tester/references/test_case_standards.md +96 -0
  294. package/.agent/skills/qa-tester/references/test_report_template.md +32 -0
  295. package/.agent/skills/qa-tester/references/unit_testing.md +50 -0
  296. package/.agent/skills/qa-tester/references/visual_testing.md +32 -0
  297. package/.agent/skills/qa-tester/templates/uat-plan.md +34 -0
  298. package/.agent/skills/research-first/SKILL.md +118 -0
  299. package/.agent/skills-manifest.json +264 -0
  300. package/.agent/workflows/absorb.md +176 -0
  301. package/.agent/workflows/bootstrap.md +91 -0
  302. package/.agent/workflows/brainstorm.md +168 -0
  303. package/.agent/workflows/break-tasks.md +77 -0
  304. package/.agent/workflows/commit.md +349 -0
  305. package/.agent/workflows/custom-behavior.md +64 -0
  306. package/.agent/workflows/debug.md +65 -0
  307. package/.agent/workflows/development.md +49 -0
  308. package/.agent/workflows/documentation.md +221 -0
  309. package/.agent/workflows/gen-tests.md +53 -0
  310. package/.agent/workflows/guide.md +196 -0
  311. package/.agent/workflows/implement-feature.md +182 -0
  312. package/.agent/workflows/install-skill.md +193 -0
  313. package/.agent/workflows/qa.md +54 -0
  314. package/.agent/workflows/ui-ux-design.md +108 -0
  315. package/LICENSE +21 -0
  316. package/README.md +258 -0
  317. package/cli/index.js +345 -0
  318. package/cli/migrate-skills.js +113 -0
  319. package/cli/verify.js +291 -0
  320. package/package.json +49 -0
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: vr-ar
3
+ description: VR/AR development principles. Comfort, interaction, performance requirements.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep
5
+ ---
6
+
7
+ # VR/AR Development
8
+
9
+ > Immersive experience principles.
10
+
11
+ ---
12
+
13
+ ## 1. Platform Selection
14
+
15
+ ### VR Platforms
16
+
17
+ | Platform | Use Case |
18
+ |----------|----------|
19
+ | **Quest** | Standalone, wireless |
20
+ | **PCVR** | High fidelity |
21
+ | **PSVR** | Console market |
22
+ | **WebXR** | Browser-based |
23
+
24
+ ### AR Platforms
25
+
26
+ | Platform | Use Case |
27
+ |----------|----------|
28
+ | **ARKit** | iOS devices |
29
+ | **ARCore** | Android devices |
30
+ | **WebXR** | Browser AR |
31
+ | **HoloLens** | Enterprise |
32
+
33
+ ---
34
+
35
+ ## 2. Comfort Principles
36
+
37
+ ### Motion Sickness Prevention
38
+
39
+ | Cause | Solution |
40
+ |-------|----------|
41
+ | **Locomotion** | Teleport, snap turn |
42
+ | **Low FPS** | Maintain 90 FPS |
43
+ | **Camera shake** | Avoid or minimize |
44
+ | **Rapid acceleration** | Gradual movement |
45
+
46
+ ### Comfort Settings
47
+
48
+ - Vignette during movement
49
+ - Snap vs smooth turning
50
+ - Seated vs standing modes
51
+ - Height calibration
52
+
53
+ ---
54
+
55
+ ## 3. Performance Requirements
56
+
57
+ ### Target Metrics
58
+
59
+ | Platform | FPS | Resolution |
60
+ |----------|-----|------------|
61
+ | Quest 2 | 72-90 | 1832x1920 |
62
+ | Quest 3 | 90-120 | 2064x2208 |
63
+ | PCVR | 90 | 2160x2160+ |
64
+ | PSVR2 | 90-120 | 2000x2040 |
65
+
66
+ ### Frame Budget
67
+
68
+ - VR requires consistent frame times
69
+ - Single dropped frame = visible judder
70
+ - 90 FPS = 11.11ms budget
71
+
72
+ ---
73
+
74
+ ## 4. Interaction Principles
75
+
76
+ ### Controller Interaction
77
+
78
+ | Type | Use |
79
+ |------|-----|
80
+ | **Point + click** | UI, distant objects |
81
+ | **Grab** | Manipulation |
82
+ | **Gesture** | Magic, special actions |
83
+ | **Physical** | Throwing, swinging |
84
+
85
+ ### Hand Tracking
86
+
87
+ - More immersive but less precise
88
+ - Good for: social, casual
89
+ - Challenging for: action, precision
90
+
91
+ ---
92
+
93
+ ## 5. Spatial Design
94
+
95
+ ### World Scale
96
+
97
+ - 1 unit = 1 meter (critical)
98
+ - Objects must feel right size
99
+ - Test with real measurements
100
+
101
+ ### Depth Cues
102
+
103
+ | Cue | Importance |
104
+ |-----|------------|
105
+ | Stereo | Primary depth |
106
+ | Motion parallax | Secondary |
107
+ | Shadows | Grounding |
108
+ | Occlusion | Layering |
109
+
110
+ ---
111
+
112
+ ## 6. Anti-Patterns
113
+
114
+ | ❌ Don't | ✅ Do |
115
+ |----------|-------|
116
+ | Move camera without player | Player controls camera |
117
+ | Drop below 90 FPS | Maintain frame rate |
118
+ | Use tiny UI text | Large, readable text |
119
+ | Ignore arm length | Scale to player reach |
120
+
121
+ ---
122
+
123
+ > **Remember:** Comfort is not optional. Sick players don't play.
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: web-games
3
+ description: Web browser game development principles. Framework selection, WebGPU, optimization, PWA.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep
5
+ ---
6
+
7
+ # Web Browser Game Development
8
+
9
+ > Framework selection and browser-specific principles.
10
+
11
+ ---
12
+
13
+ ## 1. Framework Selection
14
+
15
+ ### Decision Tree
16
+
17
+ ```
18
+ What type of game?
19
+
20
+ ├── 2D Game
21
+ │ ├── Full game engine features? → Phaser
22
+ │ └── Raw rendering power? → PixiJS
23
+
24
+ ├── 3D Game
25
+ │ ├── Full engine (physics, XR)? → Babylon.js
26
+ │ └── Rendering focused? → Three.js
27
+
28
+ └── Hybrid / Canvas
29
+ └── Custom → Raw Canvas/WebGL
30
+ ```
31
+
32
+ ### Comparison (2025)
33
+
34
+ | Framework | Type | Best For |
35
+ |-----------|------|----------|
36
+ | **Phaser 4** | 2D | Full game features |
37
+ | **PixiJS 8** | 2D | Rendering, UI |
38
+ | **Three.js** | 3D | Visualizations, lightweight |
39
+ | **Babylon.js 7** | 3D | Full engine, XR |
40
+
41
+ ---
42
+
43
+ ## 2. WebGPU Adoption
44
+
45
+ ### Browser Support (2025)
46
+
47
+ | Browser | Support |
48
+ |---------|---------|
49
+ | Chrome | ✅ Since v113 |
50
+ | Edge | ✅ Since v113 |
51
+ | Firefox | ✅ Since v131 |
52
+ | Safari | ✅ Since 18.0 |
53
+ | **Total** | **~73%** global |
54
+
55
+ ### Decision
56
+
57
+ - **New projects**: Use WebGPU with WebGL fallback
58
+ - **Legacy support**: Start with WebGL
59
+ - **Feature detection**: Check `navigator.gpu`
60
+
61
+ ---
62
+
63
+ ## 3. Performance Principles
64
+
65
+ ### Browser Constraints
66
+
67
+ | Constraint | Strategy |
68
+ |------------|----------|
69
+ | No local file access | Asset bundling, CDN |
70
+ | Tab throttling | Pause when hidden |
71
+ | Mobile data limits | Compress assets |
72
+ | Audio autoplay | Require user interaction |
73
+
74
+ ### Optimization Priority
75
+
76
+ 1. **Asset compression** - KTX2, Draco, WebP
77
+ 2. **Lazy loading** - Load on demand
78
+ 3. **Object pooling** - Avoid GC
79
+ 4. **Draw call batching** - Reduce state changes
80
+ 5. **Web Workers** - Offload heavy computation
81
+
82
+ ---
83
+
84
+ ## 4. Asset Strategy
85
+
86
+ ### Compression Formats
87
+
88
+ | Type | Format |
89
+ |------|--------|
90
+ | Textures | KTX2 + Basis Universal |
91
+ | Audio | WebM/Opus (fallback: MP3) |
92
+ | 3D Models | glTF + Draco/Meshopt |
93
+
94
+ ### Loading Strategy
95
+
96
+ | Phase | Load |
97
+ |-------|------|
98
+ | Startup | Core assets, <2MB |
99
+ | Gameplay | Stream on demand |
100
+ | Background | Prefetch next level |
101
+
102
+ ---
103
+
104
+ ## 5. PWA for Games
105
+
106
+ ### Benefits
107
+
108
+ - Offline play
109
+ - Install to home screen
110
+ - Full screen mode
111
+ - Push notifications
112
+
113
+ ### Requirements
114
+
115
+ - Service worker for caching
116
+ - Web app manifest
117
+ - HTTPS
118
+
119
+ ---
120
+
121
+ ## 6. Audio Handling
122
+
123
+ ### Browser Requirements
124
+
125
+ - Audio context requires user interaction
126
+ - Create AudioContext on first click/tap
127
+ - Resume context if suspended
128
+
129
+ ### Best Practices
130
+
131
+ - Use Web Audio API
132
+ - Pool audio sources
133
+ - Preload common sounds
134
+ - Compress with WebM/Opus
135
+
136
+ ---
137
+
138
+ ## 7. Anti-Patterns
139
+
140
+ | ❌ Don't | ✅ Do |
141
+ |----------|-------|
142
+ | Load all assets upfront | Progressive loading |
143
+ | Ignore tab visibility | Pause when hidden |
144
+ | Block on audio load | Lazy load audio |
145
+ | Skip compression | Compress everything |
146
+ | Assume fast connection | Handle slow networks |
147
+
148
+ ---
149
+
150
+ > **Remember:** Browser is the most accessible platform. Respect its constraints.
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: lead-architect
3
+ description: >
4
+ High-stakes technical decisions, system design, cloud infrastructure. Use for Microservices/Monolith, ADRs, RFCs, and scalability.
5
+ license: MIT
6
+ compatibility: Claude Code, Cursor, Gemini CLI, GitHub Copilot
7
+ metadata:
8
+ author: jhm1909
9
+ version: "2.0.0"
10
+ domain: infra
11
+ estimated_tokens: 4800
12
+ ---
13
+
14
+ # Lead Architect
15
+
16
+ Architectural guidance for high-scale, distributed systems.
17
+
18
+ ## Knowledge Graph
19
+
20
+ - **extends**: []
21
+ - **requires**: []
22
+ - **suggests**: [[devops-engineer]], [[backend-developer]], [[ai-engineer]]
23
+ - **conflicts**: []
24
+ - **enhances**: [[project-manager]] (technical specs)
25
+ - **moc**: [[infrastructure-moc]]
26
+
27
+ ## Core Philosophy
28
+
29
+ 1. **Collaboration** — Work with user to design best solution
30
+ 2. **Maintainability First** — Clean code above all, then Security, Scalability, Speed
31
+ 3. **Ask, Don't Assume** — Clarifying questions before decisions
32
+ 4. **Simplicity Wins** — Complexity is technical debt
33
+
34
+ ## Decision Framework
35
+
36
+ ### Phase 1: Context & Discovery
37
+ - Expected scale? (RPS, Data Volume)
38
+ - Constraint priorities? (Cost vs Speed vs Reliability)
39
+ - Legacy systems to integrate?
40
+ - Team familiarity with tech?
41
+
42
+ ### Phase 2: Options Analysis
43
+ - **Option A**: Industry Standard (Safe)
44
+ - **Option B**: Cutting Edge (High Risk/Reward)
45
+ - **Option C**: Good Enough (Fastest Time to Market)
46
+
47
+ ### Phase 3: Decision & Documentation
48
+ - ADR for important decisions
49
+ - RFC for major changes
50
+ - SDD for overall system design
51
+
52
+ ## Architecture Domains
53
+
54
+ | Domain | Focus |
55
+ |:-------|:------|
56
+ | **Application** | Modular Monolith, Clean Arch, DDD |
57
+ | **System** | Microservices, Composable, Scaling |
58
+ | **Infrastructure** | Cloud Native, K8s, Serverless |
59
+ | **Security** | Zero Trust, Auth patterns |
60
+
61
+ ## References
62
+
63
+ - `application-architecture.md` — Modular Monolith, DDD
64
+ - `system-architecture.md` — Microservices, Scaling, AI/RAG
65
+ - `infrastructure.md` — Cloud Native, IaC, Security
66
+ - `process.md` — DevOps, DORA metrics
67
+
68
+ ## Templates
69
+
70
+ | Template | Purpose |
71
+ |:---------|:--------|
72
+ | `adr.md` | Architecture Decision Record |
73
+ | `rfc.md` | Request for Comments |
74
+ | `sdd.md` | System Design Document |
75
+ | `technical-spec.md` | Technical Specification |
76
+
77
+ ## Related Skills
78
+
79
+ - [[devops-engineer]] — Implementation partner
80
+ - [[backend-developer]] — API architecture
81
+ - [[project-manager]] — Project coordination
82
+
83
+ ---
84
+
85
+ *Part of [[infrastructure-moc]] | High-level technical authority*
@@ -0,0 +1,70 @@
1
+ # Application Architecture Guide
2
+
3
+ This guide defines the standards for structuring applications, managing state, and ensuring code quality.
4
+
5
+ ## Architectural Patterns
6
+
7
+ ### 1. Modular Monolith (Default for New Projects)
8
+
9
+ Start here before considering microservices.
10
+
11
+ - **Structure**: Group code by **Domain Feature**, not by technical layer (e.g., `features/cart` vs `components/Button`).
12
+ - **Boundaries**: Modules should interact via public APIs (explicit interfaces), preventing spaghetti dependencies.
13
+ - **Database**: Logical separation of tables (e.g., schemas) per module is recommended.
14
+
15
+ ### 2. Hexagonal / Clean Architecture (Domain-Centric)
16
+
17
+ Use for complex core logic that must be independent of frameworks.
18
+
19
+ - **Domain Layer**: Pure business logic (Entities, Value Objects). No external dependencies.
20
+ - **Application Layer**: Use Cases / Interactors. Orchestrates domain objects.
21
+ - **Adapters Layer (Input/Output)**: Controllers, API Resolvers, Database Repositories, External Clients.
22
+ - **Dependency Rule**: Dependencies only point **inward**. Inner layers know nothing of outer layers.
23
+
24
+ ### 3. Domain-Driven Design (DDD)
25
+
26
+ Use for complex domains with rich behavior.
27
+
28
+ - **Ubiquitous Language**: Code terminology must match business language exactly.
29
+ - **Bounded Contexts**: Define explicit boundaries where a specific model applies.
30
+ - **Entities vs. Value Objects**: Entities have identity; Value Objects are defined by their attributes and are immutable.
31
+ - **Aggregates**: Cluster of objects treated as a unit for data changes.
32
+
33
+ ## State Management
34
+
35
+ ### Server-Side State
36
+
37
+ - **Source of Truth**: The database is the primary source of truth.
38
+ - **Caching**: Use aggressively but invalidate intelligently (swr, revalidation tags).
39
+ - **Optimistic UI**: Update UI immediately, rollback on failure.
40
+
41
+ ### Local State (Client)
42
+
43
+ - **Ephemerality**: Keep state as close to where it's used as possible. Avoid global state for local concerns.
44
+ - **URL as State**: Store filters, pagination, and selection in the URL query params whenever possible for shareability.
45
+
46
+ ### Event Sourcing (Advanced)
47
+
48
+ - Store _changes_ (events), not just current state.
49
+ - Essential for audit trails and complex temporal logic.
50
+ - **CQRS**: Segregate Command (Write) and Query (Read) responsibilities for performance.
51
+
52
+ ## Code Quality Standards
53
+
54
+ ### Principles
55
+
56
+ 1. **SOLID**:
57
+ - **S**ingle Responsibility: One reason to change.
58
+ - **O**pen/Closed: Open for extension, closed for modification.
59
+ - **L**iskov Substitution: Subtypes must be substitutable for base types.
60
+ - **I**nterface Segregation: Many specific interfaces are better than one general-purpose interface.
61
+ - **D**ependency Inversion: Depend on abstractions, not concretions.
62
+ 2. **DRY (Don't Repeat Yourself)**: Abstract common logic, but beware of "hasty abstraction".
63
+ 3. **YAGNI (You Aren't Gonna Need It)**: Don't build for hypothetical future requirements. Implement what is needed _now_.
64
+ 4. **KISS (Keep It Simple, Stupid)**: Complexity is a liability.
65
+
66
+ ### Implementation
67
+
68
+ - **Type Safety**: Strict typing (TypeScript) is non-negotiable for enterprise stability.
69
+ - **Testing**: "Pyramid" approach - many Unit tests, fewer Integration tests, few E2E tests.
70
+ - **Error Handling**: Fail fast, handle gracefully. Use Result types or Monads over throwing exceptions for expected errors.
@@ -0,0 +1,51 @@
1
+ # Infrastructure Guide
2
+
3
+ This guide defines the standards for cloud-native infrastructure, security, and observability.
4
+
5
+ ## Cloud Native Patterns
6
+
7
+ ### Container Orchestration (Kubernetes)
8
+
9
+ - **Immutable Infrastructure**: Never patch running servers. Build new images and replace.
10
+ - **Sidecar Pattern**: Attach auxiliary tasks (logging, proxy, auth) to a main container (e.g., Envoy).
11
+ - **Operator Pattern**: Codify operational knowledge to automate application lifecycle management.
12
+
13
+ ### Serverless
14
+
15
+ - **FaaS (Function as a Service)**: AWS Lambda, Google Cloud Functions.
16
+ - _Best for_: Event-driven workloads, "glue" code, sporadic traffic.
17
+ - **Serverless Containers**: AWS Fargate, Google Cloud Run.
18
+ - _Best for_: HTTP services, existing containerized apps, easier developer experience.
19
+
20
+ ## Infrastructure as Code (IaC)
21
+
22
+ - **Declarative vs. Imperative**: "What I want" (Terraform/K8s manifests) vs. "How to do it" (Shell scripts). Always prefer **Declarative**.
23
+ - **GitOps**: Git repository as the single source of truth for infrastructure state (e.g., ArgoCD).
24
+ - **Tools**:
25
+ - **Terraform/OpenTofu**: Industry standard, vast provider ecosystem.
26
+ - **Pulumi**: Use programming languages (TS/Python) for infrastructure. Good for complex logic.
27
+ - **Crossplane**: Manage cloud resources using Kubernetes APIs.
28
+
29
+ ## Security (Zero Trust)
30
+
31
+ - **Principles**:
32
+ - **Verify Explicitly**: Authenticate and authorize every request based on all data points (identity, location, device health).
33
+ - **Least Privilege**: JIT/JEA (Just-In-Time/Just-Enough-Administration). Limit access to only what is needed.
34
+ - **Assume Breach**: Design assuming an attacker is already inside the network. Use micro-segmentation.
35
+ - **IAM (Identity & Access Management)**: Centralize identity (OIDC, SAML). Avoid long-lived keys; use short-lived tokens/roles.
36
+
37
+ ## Observability
38
+
39
+ Move beyond "Monitoring" (is it up?) to "Observability" (why is it broken?).
40
+
41
+ ### The Pillars (MELT)
42
+
43
+ 1. **Metrics**: Aggregates, counts, gauges. (Prometheus/Grafana). "What is happening?"
44
+ 2. **Events**: Discrete changes. Deployments, scaling events, alerts.
45
+ 3. **Logs**: Structured text records. (ELK, Loki). "Details of distinct events."
46
+ 4. **Traces**: Lifecycle of a request across services. (Jaeger, Zipkin, OpenTelemetry). "Where is the latency?"
47
+
48
+ ### OpenTelemetry (OTel)
49
+
50
+ - Standardize instrumentation. Avoid vendor lock-in for data collection.
51
+ - Use OTel collectors to route telemetry data to backend analysis tools.
@@ -0,0 +1,42 @@
1
+ # Engineering Process Guide
2
+
3
+ This guide defines the workflows, metrics, and quality gates for high-performing engineering teams.
4
+
5
+ ## DevOps & Delivery
6
+
7
+ ### Continuous Integration (CI)
8
+
9
+ - **Pipeline as Code**: Define pipelines in YAML (GitHub Actions, GitLab CI).
10
+ - **Fast Feedback**: Unit tests and linters should run on every commit. Total CI time < 10 mins.
11
+ - **Trunk-Based Development**: Merge small, frequent changes to `main`. Avoid long-lived feature branches which delay integration pain.
12
+
13
+ ### Continuous Deployment (CD)
14
+
15
+ - **Blue-Green Deployment**: Two identical environments. Switch traffic from Blue (old) to Green (new) instantly. Easy rollback.
16
+ - **Canary Release**: Roll out to small % of users first. Monitor metrics. Ramp up if healthy.
17
+ - **Feature Flags**: Decouple deployment from release. Deploy code behind a flag, toggle it on for users later.
18
+
19
+ ## Metrics (DORA)
20
+
21
+ Optimize for the "Elite" cluster of DevOps Research and Assessment (DORA) metrics:
22
+
23
+ 1. **Deployment Frequency**: How often do we deploy? (Elite: On-demand / Multiple times per day).
24
+ 2. **Lead Time for Changes**: Time from commit to running in production. (Elite: < 1 hour).
25
+ 3. **Change Failure Rate**: % of deployments causing failure in production. (Elite: < 5%).
26
+ 4. **Time to Restore Service**: Time to recover from a failure. (Elite: < 1 hour).
27
+
28
+ ## Code Review Standards
29
+
30
+ ### Philosophy
31
+
32
+ - **Shared Ownership**: The reviewer is just as responsible for the code quality as the author.
33
+ - **Trust but Verify**: Trust the author's intent, verify the implementation details.
34
+ - **Blocking vs. Non-blocking**: Differentiate between "Must Fix" (bugs, spec violation) and "Nitpick" (style, minor pref).
35
+
36
+ ### Checklist
37
+
38
+ 1. **Correctness**: Does it do what it says? Are edge cases handled?
39
+ 2. **Test Coverage**: Are there tests? Do they actually test the logic or just coverage?
40
+ 3. **Readability**: Is the variable naming clear? Is the complexity necessary?
41
+ 4. **Security/Performance**: Any obvious SQL injection, N+1 queries, or exposed secrets?
42
+ 5. **Architecture**: Does this fit the agreed-upon pattern? (e.g., Domain logic leaking into Controllers).
@@ -0,0 +1,62 @@
1
+ # System Architecture Guide
2
+
3
+ This guide covers high-level system design, scalability, reliability, and modern integration patterns.
4
+
5
+ ## Architectural Styles
6
+
7
+ ### 1. Microservices
8
+
9
+ - **When to use**: Multiple teams working independently, conflicting scalability requirements, diverse tech stacks needed.
10
+ - **Trade-offs**: Increases operational complexity (deployment, observability, networking). Solves organizational scaling problems more than technical ones.
11
+ - **Anti-Pattern**: Distributed Monolith (tight coupling, shared databases).
12
+
13
+ ### 2. Composable Architecture (PBCs)
14
+
15
+ - **Packaged Business Capabilities (PBCs)**: Independent, interchangeable software components.
16
+ - **API-First**: Everything is exposed via an API.
17
+ - **Headless**: Decouple frontend (head) from backend logic.
18
+ - **Benefits**: Rapid adaptation, vendor independence, "best-of-breed" selection.
19
+
20
+ ## Scalability Patterns
21
+
22
+ ### Database Scaling
23
+
24
+ - **Sharding (Horizontal Partitioning)**: Distribute data across multiple nodes based on a shard key (e.g., UserID).
25
+ - **Read Replicas**: Offload read traffic to replicas; writes go to primary.
26
+ - **Caching Strategy**:
27
+ - **Aside (Lazy Loading)**: App checks cache -> DB -> Updates cache.
28
+ - **Write-Through**: App updates cache and DB simultaneously.
29
+ - **CDN**: Cache static assets and compute at the edge.
30
+
31
+ ### Compute Scaling
32
+
33
+ - **Load Balancing**:
34
+ - **L4 (Transport)**: IP/Port based. Fast, simple.
35
+ - **L7 (Application)**: HTTP/Path based. Smart routing, SSL termination.
36
+ - **Auto-scaling**: Trigger based on CPU, Memory, or Request Count metrics.
37
+
38
+ ## Reliability & Resilience
39
+
40
+ - **Circuit Breaker**: Detect failures and stop sending requests to a failing service to prevent cascading failure.
41
+ - **Bulkhead**: Isolate resources (thread pools, connections) so one failing component doesn't bring down the whole system.
42
+ - **Retry with Exponential Backoff**: Retry transient failures with increasing wait times.
43
+ - **CAP Theorem**: Understand the trade-off: in a Partitioned network, you must choose Consistency or Availability.
44
+ - _CP_: Banking systems.
45
+ - _AP_: Social media feeds.
46
+
47
+ ## Modern AI Integration
48
+
49
+ ### RAG (Retrieval-Augmented Generation) Architecture
50
+
51
+ - **Vector Database**: Store embeddings for semantic search (e.g., Pinecone, pgvector).
52
+ - **Ingestion Pipeline**: Chunking strategies, embedding generation, metadata tagging.
53
+ - **Retrieval**: Hybrid search (Keyword + Semantic) + Re-ranking for precision.
54
+
55
+ ### AI Agent Architectures
56
+
57
+ - **Tool Use**: Expose deterministic APIs for agents to call.
58
+ - **Memory**: Short-term (Conversation History) vs. Long-term (Vector Store/Entity Graph).
59
+ - **Orchestration**:
60
+ - **ReAct**: Reason + Act loop.
61
+ - **Router**: Classify intent and route to specialized agent.
62
+ - **Multi-Agent**: Collaborative solving (e.g., Researcher + Writer + Reviewer).
@@ -0,0 +1,82 @@
1
+ # Architecture: Web Fullstack (Next.js & Supabase)
2
+
3
+ This guide defines the architectural standards for modern fullstack web applications using the Next.js App Router and Supabase/Postgres ecosystem.
4
+
5
+ ## 1. High-Level Strategy
6
+
7
+ - **Server-First**: Leverage React Server Components (RSC) to reduce client bundle size and access data directly.
8
+ - **Edge-Ready**: Design API routes and middleware to run on Edge runtimes for low latency where possible.
9
+ - **Type Safety**: End-to-end type safety from Database (Supabase) to Backend (Actions) to Frontend (Components).
10
+
11
+ ## 2. Project Structure (Monorepo)
12
+
13
+ We use a Turborepo-style structure to separate concerns and enable code sharing.
14
+
15
+ ```text
16
+ .
17
+ ├── apps/
18
+ │ ├── web/ # Main Next.js Application
19
+ │ │ ├── app/ # App Router (Routes & Layouts)
20
+ │ │ ├── components/ # Local components specific to this app
21
+ │ │ ├── lib/ # App-specific utilities
22
+ │ │ └── middleware.ts # Edge middleware (Auth, Rewrites)
23
+ │ └── docs/ # Documentation site (if separate)
24
+ └── packages/
25
+ ├── ui/ # Shared UI Component Library (Shadcn/UI)
26
+ ├── database/ # Database schema, migrations, and typed client
27
+ ├── eslint-config/ # Shared linting rules
28
+ └── typescript-config/ # Shared tsconfig
29
+ ```
30
+
31
+ ## 3. Core Patterns
32
+
33
+ ### 3.1 Component Architecture (RSC vs Client)
34
+
35
+ - **Default to Server**: All components are RSC by default. Fetch data here.
36
+ - **Leaf Client Components**: Push `use client` down the tree. Ideally, only interactive buttons/forms are client-side.
37
+ - **Composition**: Pass Client Components as `children` to Server Components to avoid "waterfalls" of client-side JavaScript.
38
+
39
+ ### 3.2 Data Fetching & Caching
40
+
41
+ - **Fetch in Components**: Fetch data directly in RSCs where it is needed. Next.js dedupes requests automatically.
42
+ - **Server Actions**: Use Server Actions for **Mutations** (POST/PUT/DELETE).
43
+ - Always validate input with **Zod** schema.
44
+ - Return standard `Result<T, E>` objects, not bare data or errors.
45
+ - **Revalidation**: Use `revalidateTag` for granular cache invalidation after mutations.
46
+
47
+ ### 3.3 Database Access (Supabase/Postgres)
48
+
49
+ - **Schema Schema**:
50
+ - `public`: Tables exposed via API (if using PostgREST).
51
+ - `private` / `auth`: Internal schemas.
52
+ - **RLS (Row Level Security)**: **MANDATORY**. Never disable RLS. Write policies that rely on `auth.uid()`.
53
+ - **Data Access Layer**:
54
+ - Do NOT call DB directly from UI components.
55
+ - Create a clean Data Access Layer (DAL) in `@package/database` or `apps/web/lib/db`.
56
+ - Example: `getUserProfile(userId)` rather than `supabase.from('profiles').select()...` inline.
57
+
58
+ ## 4. State Management
59
+
60
+ - **Server State**: React Query (TanStack Query) is generally _not_ needed if using App Router deep integration, but useful if you have complex client-side polling/caching needs.
61
+ - **URL State**: The URL is the single source of truth for sharable state (search params, filters, active tabs).
62
+ - **Global Client State**: Use **Zustand** only for truly global, non-server state (e.g., Sidebar open/close, Audio player status). Use React Context for compound components.
63
+
64
+ ## 5. Security & Performance
65
+
66
+ ### Security
67
+
68
+ - **Middleware**: Handle Authentication (Session Validation) and Authorization (Role Checks) in `middleware.ts` to protect routes at the edge.
69
+ - **Validation**: Every Server Action must start with `inputSchema.parse(data)`.
70
+ - **CSP**: Content Security Policy headers should be configured (careful with nonces for streaming).
71
+
72
+ ### Performance (Core Web Vitals)
73
+
74
+ - **LCP (Largest Contentful Paint)**: Preload critical images, use `next/font`.
75
+ - **CLS (Cumulative Layout Shift)**: explicit width/height for media, skeletons for checking states.
76
+ - **Streaming**: Use `<Suspense>` boundaries to wrap slow data fetches. Let the shell load instantly.
77
+
78
+ ## 6. Development Workflow
79
+
80
+ 1. **Migration**: Modify schema in `packages/database` -> `supabase db diff` -> `supabase db push`.
81
+ 2. **Type Gen**: Run `supabase gen types` to update TypeScript definitions.
82
+ 3. **Implementation**: Build RSC -> Connect to DAL -> Add Server Action for interactivity.