@cubis/foundry 0.3.71 → 0.3.73

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 (276) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/dist/cli/core.js +9 -22
  3. package/dist/cli/core.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +13 -22
  6. package/workflows/powers/accessibility/POWER.md +83 -94
  7. package/workflows/powers/accessibility/SKILL.md +82 -94
  8. package/workflows/powers/agent-design/POWER.md +201 -0
  9. package/workflows/powers/agent-design/SKILL.md +198 -0
  10. package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
  11. package/workflows/powers/agent-design/references/skill-testing.md +164 -0
  12. package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
  13. package/workflows/powers/agentic-eval/POWER.md +62 -0
  14. package/workflows/powers/agentic-eval/SKILL.md +59 -0
  15. package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
  16. package/workflows/powers/api-designer/POWER.md +43 -71
  17. package/workflows/powers/api-designer/SKILL.md +43 -71
  18. package/workflows/powers/api-patterns/POWER.md +42 -56
  19. package/workflows/powers/api-patterns/SKILL.md +42 -57
  20. package/workflows/powers/architecture-designer/POWER.md +43 -60
  21. package/workflows/powers/architecture-designer/SKILL.md +43 -60
  22. package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
  23. package/workflows/powers/auth-architect/POWER.md +69 -0
  24. package/workflows/powers/auth-architect/SKILL.md +66 -0
  25. package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
  26. package/workflows/powers/behavioral-modes/POWER.md +100 -9
  27. package/workflows/powers/c-pro/POWER.md +105 -0
  28. package/workflows/powers/c-pro/SKILL.md +102 -0
  29. package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
  30. package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
  31. package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
  32. package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
  33. package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
  34. package/workflows/powers/changelog-generator/POWER.md +127 -63
  35. package/workflows/powers/changelog-generator/SKILL.md +126 -63
  36. package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
  37. package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
  38. package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
  39. package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
  40. package/workflows/powers/cli-developer/POWER.md +152 -95
  41. package/workflows/powers/cli-developer/SKILL.md +152 -95
  42. package/workflows/powers/cpp-pro/POWER.md +111 -0
  43. package/workflows/powers/cpp-pro/SKILL.md +108 -0
  44. package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
  45. package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
  46. package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
  47. package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
  48. package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
  49. package/workflows/powers/csharp-pro/POWER.md +47 -22
  50. package/workflows/powers/csharp-pro/SKILL.md +47 -22
  51. package/workflows/powers/dart-pro/POWER.md +68 -0
  52. package/workflows/powers/dart-pro/SKILL.md +65 -0
  53. package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
  54. package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
  55. package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
  56. package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
  57. package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
  58. package/workflows/powers/database-design/POWER.md +47 -33
  59. package/workflows/powers/database-design/SKILL.md +47 -33
  60. package/workflows/powers/database-optimizer/POWER.md +43 -64
  61. package/workflows/powers/database-optimizer/SKILL.md +43 -64
  62. package/workflows/powers/database-skills/POWER.md +59 -93
  63. package/workflows/powers/database-skills/SKILL.md +59 -93
  64. package/workflows/powers/debugging-strategies/POWER.md +69 -0
  65. package/workflows/powers/debugging-strategies/SKILL.md +66 -0
  66. package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
  67. package/workflows/powers/deep-research/POWER.md +67 -0
  68. package/workflows/powers/deep-research/SKILL.md +64 -0
  69. package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
  70. package/workflows/powers/design-system-builder/POWER.md +130 -116
  71. package/workflows/powers/design-system-builder/SKILL.md +130 -116
  72. package/workflows/powers/devops-engineer/POWER.md +120 -57
  73. package/workflows/powers/devops-engineer/SKILL.md +120 -57
  74. package/workflows/powers/docker-kubernetes/POWER.md +94 -0
  75. package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
  76. package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
  77. package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
  78. package/workflows/powers/documentation-templates/POWER.md +158 -127
  79. package/workflows/powers/documentation-templates/SKILL.md +158 -127
  80. package/workflows/powers/drizzle-expert/POWER.md +66 -0
  81. package/workflows/powers/drizzle-expert/SKILL.md +63 -0
  82. package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
  83. package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
  84. package/workflows/powers/error-ux-observability/POWER.md +144 -131
  85. package/workflows/powers/error-ux-observability/SKILL.md +143 -131
  86. package/workflows/powers/fastapi-expert/POWER.md +46 -60
  87. package/workflows/powers/fastapi-expert/SKILL.md +46 -60
  88. package/workflows/powers/firebase/POWER.md +65 -0
  89. package/workflows/powers/firebase/SKILL.md +62 -0
  90. package/workflows/powers/firebase/references/platform-routing.md +16 -0
  91. package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
  92. package/workflows/powers/flutter-design-system/POWER.md +63 -0
  93. package/workflows/powers/flutter-design-system/SKILL.md +60 -0
  94. package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
  95. package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
  96. package/workflows/powers/flutter-drift/POWER.md +65 -0
  97. package/workflows/powers/flutter-drift/SKILL.md +62 -0
  98. package/workflows/powers/flutter-drift/references/migrations.md +22 -0
  99. package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
  100. package/workflows/powers/flutter-feature/POWER.md +65 -0
  101. package/workflows/powers/flutter-feature/SKILL.md +62 -0
  102. package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
  103. package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
  104. package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
  105. package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
  106. package/workflows/powers/flutter-go-router/POWER.md +64 -0
  107. package/workflows/powers/flutter-go-router/SKILL.md +61 -0
  108. package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
  109. package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
  110. package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
  111. package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
  112. package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
  113. package/workflows/powers/flutter-repository/POWER.md +64 -0
  114. package/workflows/powers/flutter-repository/SKILL.md +61 -0
  115. package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
  116. package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
  117. package/workflows/powers/flutter-riverpod/POWER.md +70 -0
  118. package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
  119. package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
  120. package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
  121. package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
  122. package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
  123. package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
  124. package/workflows/powers/flutter-state-machine/POWER.md +62 -0
  125. package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
  126. package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
  127. package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
  128. package/workflows/powers/flutter-testing/POWER.md +64 -0
  129. package/workflows/powers/flutter-testing/SKILL.md +61 -0
  130. package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
  131. package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
  132. package/workflows/powers/frontend-code-review/POWER.md +137 -0
  133. package/workflows/powers/frontend-code-review/SKILL.md +134 -0
  134. package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
  135. package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
  136. package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
  137. package/workflows/powers/frontend-design/POWER.md +163 -362
  138. package/workflows/powers/frontend-design/SKILL.md +163 -362
  139. package/workflows/powers/game-development/POWER.md +57 -140
  140. package/workflows/powers/game-development/SKILL.md +57 -140
  141. package/workflows/powers/geo-fundamentals/POWER.md +64 -126
  142. package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
  143. package/workflows/powers/git-workflow/POWER.md +135 -0
  144. package/workflows/powers/git-workflow/SKILL.md +132 -0
  145. package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
  146. package/workflows/powers/golang-pro/POWER.md +46 -35
  147. package/workflows/powers/golang-pro/SKILL.md +46 -35
  148. package/workflows/powers/graphql-architect/POWER.md +44 -62
  149. package/workflows/powers/graphql-architect/SKILL.md +44 -62
  150. package/workflows/powers/i18n-localization/POWER.md +118 -103
  151. package/workflows/powers/i18n-localization/SKILL.md +118 -103
  152. package/workflows/powers/java-pro/POWER.md +47 -22
  153. package/workflows/powers/java-pro/SKILL.md +47 -22
  154. package/workflows/powers/javascript-pro/POWER.md +47 -34
  155. package/workflows/powers/javascript-pro/SKILL.md +47 -34
  156. package/workflows/powers/kotlin-pro/POWER.md +46 -23
  157. package/workflows/powers/kotlin-pro/SKILL.md +46 -23
  158. package/workflows/powers/legacy-modernizer/POWER.md +43 -60
  159. package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
  160. package/workflows/powers/mcp-builder/POWER.md +65 -0
  161. package/workflows/powers/mcp-builder/SKILL.md +62 -0
  162. package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
  163. package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
  164. package/workflows/powers/microservices-architect/POWER.md +43 -70
  165. package/workflows/powers/microservices-architect/SKILL.md +43 -70
  166. package/workflows/powers/mobile-design/POWER.md +110 -345
  167. package/workflows/powers/mobile-design/SKILL.md +110 -345
  168. package/workflows/powers/mongodb/POWER.md +67 -0
  169. package/workflows/powers/mongodb/SKILL.md +64 -0
  170. package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
  171. package/workflows/powers/mysql/POWER.md +67 -0
  172. package/workflows/powers/mysql/SKILL.md +64 -0
  173. package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
  174. package/workflows/powers/neki/POWER.md +67 -0
  175. package/workflows/powers/neki/SKILL.md +64 -0
  176. package/workflows/powers/neki/references/neki-checklist.md +18 -0
  177. package/workflows/powers/nestjs-expert/POWER.md +45 -91
  178. package/workflows/powers/nestjs-expert/SKILL.md +45 -91
  179. package/workflows/powers/nextjs-developer/POWER.md +51 -44
  180. package/workflows/powers/nextjs-developer/SKILL.md +51 -44
  181. package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
  182. package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
  183. package/workflows/powers/observability/POWER.md +109 -0
  184. package/workflows/powers/observability/SKILL.md +106 -0
  185. package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
  186. package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
  187. package/workflows/powers/openai-docs/POWER.md +61 -0
  188. package/workflows/powers/openai-docs/SKILL.md +58 -0
  189. package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
  190. package/workflows/powers/performance-profiling/POWER.md +61 -114
  191. package/workflows/powers/performance-profiling/SKILL.md +61 -114
  192. package/workflows/powers/php-pro/POWER.md +116 -0
  193. package/workflows/powers/php-pro/SKILL.md +113 -0
  194. package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
  195. package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
  196. package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
  197. package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
  198. package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
  199. package/workflows/powers/playwright-e2e/POWER.md +85 -0
  200. package/workflows/powers/playwright-e2e/SKILL.md +82 -0
  201. package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
  202. package/workflows/powers/postgres/POWER.md +67 -0
  203. package/workflows/powers/postgres/SKILL.md +64 -0
  204. package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
  205. package/workflows/powers/prompt-engineer/POWER.md +47 -30
  206. package/workflows/powers/prompt-engineer/SKILL.md +47 -30
  207. package/workflows/powers/python-pro/POWER.md +47 -36
  208. package/workflows/powers/python-pro/SKILL.md +47 -36
  209. package/workflows/powers/react-best-practices/POWER.md +56 -33
  210. package/workflows/powers/react-best-practices/SKILL.md +56 -33
  211. package/workflows/powers/react-expert/POWER.md +47 -37
  212. package/workflows/powers/react-expert/SKILL.md +47 -37
  213. package/workflows/powers/redis/POWER.md +67 -0
  214. package/workflows/powers/redis/SKILL.md +64 -0
  215. package/workflows/powers/redis/references/redis-checklist.md +19 -0
  216. package/workflows/powers/ruby-pro/POWER.md +118 -0
  217. package/workflows/powers/ruby-pro/SKILL.md +115 -0
  218. package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
  219. package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
  220. package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
  221. package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
  222. package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
  223. package/workflows/powers/rust-pro/POWER.md +45 -31
  224. package/workflows/powers/rust-pro/SKILL.md +45 -31
  225. package/workflows/powers/security-engineer/POWER.md +129 -0
  226. package/workflows/powers/security-engineer/SKILL.md +126 -0
  227. package/workflows/powers/seo-fundamentals/POWER.md +59 -102
  228. package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
  229. package/workflows/powers/serverless-patterns/POWER.md +171 -0
  230. package/workflows/powers/serverless-patterns/SKILL.md +168 -0
  231. package/workflows/powers/skill-creator/POWER.md +90 -0
  232. package/workflows/powers/skill-creator/SKILL.md +87 -0
  233. package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
  234. package/workflows/powers/skill-creator/references/schemas.md +430 -0
  235. package/workflows/powers/spec-miner/POWER.md +49 -57
  236. package/workflows/powers/spec-miner/SKILL.md +49 -57
  237. package/workflows/powers/sqlite/POWER.md +67 -0
  238. package/workflows/powers/sqlite/SKILL.md +64 -0
  239. package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
  240. package/workflows/powers/sre-engineer/POWER.md +123 -64
  241. package/workflows/powers/sre-engineer/SKILL.md +123 -64
  242. package/workflows/powers/static-analysis/POWER.md +121 -77
  243. package/workflows/powers/static-analysis/SKILL.md +121 -77
  244. package/workflows/powers/stripe-best-practices/POWER.md +140 -17
  245. package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
  246. package/workflows/powers/supabase/POWER.md +67 -0
  247. package/workflows/powers/supabase/SKILL.md +64 -0
  248. package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
  249. package/workflows/powers/swift-pro/POWER.md +118 -0
  250. package/workflows/powers/swift-pro/SKILL.md +115 -0
  251. package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
  252. package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
  253. package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
  254. package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
  255. package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
  256. package/workflows/powers/tailwind-patterns/POWER.md +71 -240
  257. package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
  258. package/workflows/powers/testing-patterns/POWER.md +155 -10
  259. package/workflows/powers/testing-patterns/SKILL.md +155 -10
  260. package/workflows/powers/typescript-pro/POWER.md +47 -38
  261. package/workflows/powers/typescript-pro/SKILL.md +47 -38
  262. package/workflows/powers/vitess/POWER.md +67 -0
  263. package/workflows/powers/vitess/SKILL.md +64 -0
  264. package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
  265. package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
  266. package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
  267. package/workflows/powers/web-perf/POWER.md +43 -170
  268. package/workflows/powers/web-perf/SKILL.md +43 -170
  269. package/workflows/powers/webapp-testing/POWER.md +43 -164
  270. package/workflows/powers/webapp-testing/SKILL.md +43 -164
  271. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +65 -42
  272. package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +8 -6
  273. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +65 -41
  274. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +8 -6
  275. package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +9 -8
  276. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +1 -1
@@ -1,194 +1,225 @@
1
1
  ---
2
2
  name: documentation-templates
3
- description: Documentation templates and structure guidelines. README, API docs, code comments, and AI-friendly documentation.
4
- allowed-tools: Read, Glob, Grep
3
+ description: Create API documentation, architecture decision records, runbooks, onboarding guides, and technical writing using proven templates and standards.
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: cubis-foundry
7
+ version: "3.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
5
9
  ---
6
10
 
7
11
  # Documentation Templates
8
12
 
9
- > Templates and structure guidelines for common documentation types.
13
+ ## Purpose
10
14
 
11
- ---
15
+ Provide templates and guidance for technical documentation: API docs, architecture decision records (ADRs), runbooks, README files, onboarding guides, and inline code documentation.
16
+
17
+ ## When to Use
18
+
19
+ - Writing or improving a project README
20
+ - Creating API documentation
21
+ - Recording architecture decisions (ADRs)
22
+ - Building operational runbooks
23
+ - Writing onboarding guides for new team members
24
+ - Documenting complex systems or workflows
12
25
 
13
- ## 1. README Structure
26
+ ## Instructions
14
27
 
15
- ### Essential Sections (Priority Order)
28
+ ### Step 1 Choose the Right Template
16
29
 
17
- | Section | Purpose |
18
- |---------|---------|
19
- | **Title + One-liner** | What is this? |
20
- | **Quick Start** | Running in <5 min |
21
- | **Features** | What can I do? |
22
- | **Configuration** | How to customize |
23
- | **API Reference** | Link to detailed docs |
24
- | **Contributing** | How to help |
25
- | **License** | Legal |
30
+ | Document Type | Audience | When |
31
+ | ---------------- | --------------------------------- | -------------------------- |
32
+ | README | New contributors, users | Every project |
33
+ | API docs | API consumers (internal/external) | Every API |
34
+ | ADR | Future developers | Every significant decision |
35
+ | Runbook | On-call engineers | Every production system |
36
+ | Onboarding guide | New team members | Every team |
37
+ | RFC / Design doc | Reviewers before implementation | Complex features |
26
38
 
27
- ### README Template
39
+ ### Step 2 — README Template
28
40
 
29
41
  ```markdown
30
42
  # Project Name
31
43
 
32
- Brief one-line description.
44
+ One-line description of what this project does.
33
45
 
34
46
  ## Quick Start
35
47
 
36
- [Minimum steps to run]
48
+ \`\`\`bash
49
+ npm install
50
+ npm run dev
51
+ \`\`\`
37
52
 
38
53
  ## Features
39
54
 
40
- - Feature 1
41
- - Feature 2
55
+ - Feature 1: brief description
56
+ - Feature 2: brief description
42
57
 
43
- ## Configuration
58
+ ## Architecture
44
59
 
45
- | Variable | Description | Default |
46
- |----------|-------------|---------|
47
- | PORT | Server port | 3000 |
60
+ Brief overview or link to architecture docs.
48
61
 
49
- ## Documentation
62
+ ## Development
50
63
 
51
- - [API Reference](./docs/api.md)
52
- - [Architecture](./docs/architecture.md)
64
+ ### Prerequisites
53
65
 
54
- ## License
66
+ - Node.js >= 20
67
+ - PostgreSQL >= 15
55
68
 
56
- MIT
57
- ```
69
+ ### Setup
58
70
 
59
- ---
71
+ Step-by-step local development setup.
60
72
 
61
- ## 2. API Documentation Structure
73
+ ### Testing
62
74
 
63
- ### Per-Endpoint Template
75
+ How to run tests.
64
76
 
65
- ```markdown
66
- ## GET /users/:id
77
+ ### Deployment
78
+
79
+ How to deploy (or link to deployment docs).
67
80
 
68
- Get a user by ID.
81
+ ## Contributing
69
82
 
70
- **Parameters:**
71
- | Name | Type | Required | Description |
72
- |------|------|----------|-------------|
73
- | id | string | Yes | User ID |
83
+ Link to CONTRIBUTING.md or brief guidelines.
74
84
 
75
- **Response:**
76
- - 200: User object
77
- - 404: User not found
85
+ ## License
78
86
 
79
- **Example:**
80
- [Request and response example]
87
+ MIT (or appropriate license)
81
88
  ```
82
89
 
83
- ---
90
+ ### Step 3 — Architecture Decision Record (ADR)
84
91
 
85
- ## 3. Code Comment Guidelines
86
-
87
- ### JSDoc/TSDoc Template
88
-
89
- ```typescript
90
- /**
91
- * Brief description of what the function does.
92
- *
93
- * @param paramName - Description of parameter
94
- * @returns Description of return value
95
- * @throws ErrorType - When this error occurs
96
- *
97
- * @example
98
- * const result = functionName(input);
99
- */
100
- ```
92
+ ```markdown
93
+ # ADR-001: Use PostgreSQL for primary datastore
101
94
 
102
- ### When to Comment
95
+ ## Status
103
96
 
104
- | Comment | Don't Comment |
105
- |-----------|-----------------|
106
- | Why (business logic) | What (obvious) |
107
- | Complex algorithms | Every line |
108
- | Non-obvious behavior | Self-explanatory code |
109
- | API contracts | Implementation details |
97
+ Accepted | Proposed | Deprecated | Superseded by ADR-xxx
110
98
 
111
- ---
99
+ ## Context
112
100
 
113
- ## 4. Changelog Template (Keep a Changelog)
101
+ What is the problem? What constraints exist?
114
102
 
115
- ```markdown
116
- # Changelog
117
-
118
- ## [Unreleased]
119
- ### Added
120
- - New feature
121
-
122
- ## [1.0.0] - 2025-01-01
123
- ### Added
124
- - Initial release
125
- ### Changed
126
- - Updated dependency
127
- ### Fixed
128
- - Bug fix
103
+ ## Decision
104
+
105
+ What did we decide and why?
106
+
107
+ ## Consequences
108
+
109
+ What are the trade-offs? What becomes easier/harder?
110
+
111
+ ## Alternatives Considered
112
+
113
+ What else did we evaluate and why did we reject it?
129
114
  ```
130
115
 
131
- ---
116
+ **Rules**:
132
117
 
133
- ## 5. Architecture Decision Record (ADR)
118
+ - ADRs are immutable supersede, don't edit
119
+ - Number sequentially (ADR-001, ADR-002)
120
+ - Title should be a decision, not a question
121
+ - Keep it short (1-2 pages max)
122
+
123
+ ### Step 4 — Runbook Template
134
124
 
135
125
  ```markdown
136
- # ADR-001: [Title]
126
+ # Runbook: [System/Alert Name]
137
127
 
138
- ## Status
139
- Accepted / Deprecated / Superseded
128
+ ## Overview
140
129
 
141
- ## Context
142
- Why are we making this decision?
130
+ What this system does and why it matters.
143
131
 
144
- ## Decision
145
- What did we decide?
132
+ ## Alerts
146
133
 
147
- ## Consequences
148
- What are the trade-offs?
149
- ```
134
+ | Alert | Severity | Meaning |
135
+ | --------------- | -------- | ------------------------- |
136
+ | high_error_rate | Critical | Error rate > 5% for 5 min |
137
+ | high_latency | Warning | p95 > 2s for 10 min |
150
138
 
151
- ---
139
+ ## Diagnosis Steps
152
140
 
153
- ## 6. AI-Friendly Documentation (2025)
141
+ 1. Check dashboards: [link]
142
+ 2. Check logs: `kubectl logs -l app=service-name --tail=100`
143
+ 3. Check dependencies: [list of upstream services]
154
144
 
155
- ### llms.txt Template
145
+ ## Common Fixes
156
146
 
157
- For AI crawlers and agents:
147
+ ### High error rate
158
148
 
159
- ```markdown
160
- # Project Name
161
- > One-line objective.
149
+ 1. Check recent deployments: `git log --since="2 hours ago"`
150
+ 2. If recent deploy caused it: rollback with `./deploy rollback`
151
+ 3. If not deployment-related: check database connections
152
+
153
+ ### High latency
154
+
155
+ 1. Check database slow query log
156
+ 2. Check connection pool saturation
157
+ 3. Scale up if under heavy load: `kubectl scale --replicas=5`
162
158
 
163
- ## Core Files
164
- - [src/index.ts]: Main entry
165
- - [src/api/]: API routes
166
- - [docs/]: Documentation
159
+ ## Escalation
167
160
 
168
- ## Key Concepts
169
- - Concept 1: Brief explanation
170
- - Concept 2: Brief explanation
161
+ - L1: On-call engineer (PagerDuty)
162
+ - L2: Service owner (@team-backend)
163
+ - L3: Infrastructure team (@team-infra)
171
164
  ```
172
165
 
173
- ### MCP-Ready Documentation
166
+ ### Step 5 — API Documentation
174
167
 
175
- For RAG indexing:
176
- - Clear H1-H3 hierarchy
177
- - JSON/YAML examples for data structures
178
- - Mermaid diagrams for flows
179
- - Self-contained sections
168
+ **Document every endpoint with**:
180
169
 
181
- ---
170
+ ```markdown
171
+ ## POST /api/users
172
+
173
+ Create a new user account.
174
+
175
+ ### Request
176
+
177
+ **Headers**:
178
+ | Header | Required | Description |
179
+ |--------|----------|-------------|
180
+ | Authorization | Yes | Bearer token |
181
+ | Content-Type | Yes | application/json |
182
+
183
+ **Body**:
184
+ | Field | Type | Required | Description |
185
+ |-------|------|----------|-------------|
186
+ | email | string | Yes | Valid email address |
187
+ | name | string | Yes | Full name (2-100 chars) |
188
+ | role | string | No | "user" (default) or "admin" |
189
+
190
+ **Example**:
191
+ \`\`\`json
192
+ { "email": "alice@example.com", "name": "Alice Smith" }
193
+ \`\`\`
194
+
195
+ ### Response
196
+
197
+ **201 Created**:
198
+ \`\`\`json
199
+ { "id": "usr_abc123", "email": "alice@example.com", "name": "Alice Smith", "role": "user" }
200
+ \`\`\`
201
+
202
+ **400 Bad Request**:
203
+ \`\`\`json
204
+ { "error": { "code": "VALIDATION_ERROR", "message": "Email already registered" } }
205
+ \`\`\`
206
+
207
+ **401 Unauthorized**:
208
+ \`\`\`json
209
+ { "error": { "code": "UNAUTHORIZED", "message": "Invalid or expired token" } }
210
+ \`\`\`
211
+ ```
182
212
 
183
- ## 7. Structure Principles
213
+ ## Output Format
184
214
 
185
- | Principle | Why |
186
- |-----------|-----|
187
- | **Scannable** | Headers, lists, tables |
188
- | **Examples first** | Show, don't just tell |
189
- | **Progressive detail** | Simple → Complex |
190
- | **Up to date** | Outdated = misleading |
215
+ Use the appropriate template from above, filled in with project-specific details. Always include examples with realistic (not lorem ipsum) content.
191
216
 
192
- ---
217
+ ## Examples
218
+
219
+ **User**: "Write a README for our API project"
220
+
221
+ **Response approach**: Use the README template. Fill in actual project details. Include quick start with real commands. Link to API docs. Add architecture overview if the system has multiple components.
222
+
223
+ **User**: "We need to document why we chose MongoDB over PostgreSQL"
193
224
 
194
- > **Remember:** Templates are starting points. Adapt to your project's needs.
225
+ **Response approach**: Use the ADR template. Document the context (data model flexibility needs), decision (MongoDB for document storage), consequences (eventual consistency trade-off), and alternatives considered (PostgreSQL with JSONB).
@@ -0,0 +1,66 @@
1
+ ````markdown
2
+ ---
3
+ inclusion: manual
4
+ name: drizzle-expert
5
+ description: "Use when the task is specifically Drizzle ORM or drizzle-kit: schema-as-code, typed SQL, relations, migrations, config, runtime pairing, or TypeScript database access-layer decisions across Postgres, SQLite/libSQL, Neon, or Supabase."
6
+ license: MIT
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "1.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
11
+ ---
12
+
13
+ # Drizzle Expert
14
+
15
+ ## Purpose
16
+
17
+ You are the narrow specialist for Drizzle ORM and drizzle-kit in TypeScript database stacks.
18
+
19
+ Your job is to keep schema-as-code, typed query ergonomics, migration safety, and runtime pairing decisions explicit without replacing the underlying engine specialist.
20
+
21
+ ## When to Use
22
+
23
+ - Drizzle schema files, relations, migrations, or drizzle-kit config are primary.
24
+ - The real decision is Drizzle vs raw SQL or another ORM/query-builder posture.
25
+ - The task depends on TypeScript-first database access patterns, typed queries, or edge or serverless runtime pairing.
26
+ - The engine is Postgres, SQLite/libSQL, Neon, or Supabase and the access layer matters as much as the engine.
27
+
28
+ ## Instructions
29
+
30
+ ### STANDARD OPERATING PROCEDURE (SOP)
31
+
32
+ 1. Confirm the engine, runtime, migration path, and current Drizzle version or config shape.
33
+ 2. Separate access-layer concerns from engine concerns and load the engine or platform skill when needed.
34
+ 3. Check schema layout, relations, naming, and generated SQL implications before changing query code.
35
+ 4. Keep migration order, rollback posture, and deployment safety explicit.
36
+ 5. Verify how Drizzle pairs with the target runtime, pooling strategy, and serverless or edge constraints.
37
+
38
+ ### Constraints
39
+
40
+ - Do not answer plain engine questions without also loading the matching engine or platform skill.
41
+ - Do not blur Drizzle concerns into generic TypeScript or generic Postgres advice.
42
+ - Do not recommend generated migrations, relation helpers, or runtime adapters without checking the deployment model.
43
+ - Do not hide migration risk behind ORM abstraction.
44
+
45
+ ## Output Format
46
+
47
+ Provide implementation guidance, code examples, and configuration as appropriate to the task.
48
+
49
+ ## References
50
+
51
+ Load on demand. Do not preload all reference files.
52
+
53
+ | File | Load when |
54
+ | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
55
+ | `references/schema-and-migration-playbook.md` | You need the Drizzle-specific checklist for schema layout, relations, migrations, and rollout safety. |
56
+ | `references/runtime-pairing-matrix.md` | You need the runtime and engine pairing rules for Postgres, Supabase, SQLite/libSQL, Neon, or serverless deployment. |
57
+
58
+ ## Scripts
59
+
60
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
61
+
62
+ ## Examples
63
+
64
+ - "Help me with drizzle expert best practices in this project"
65
+ - "Review my drizzle expert implementation for issues"
66
+ ````
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: drizzle-expert
3
+ description: "Use when the task is specifically Drizzle ORM or drizzle-kit: schema-as-code, typed SQL, relations, migrations, config, runtime pairing, or TypeScript database access-layer decisions across Postgres, SQLite/libSQL, Neon, or Supabase."
4
+ license: MIT
5
+ metadata:
6
+ author: cubis-foundry
7
+ version: "1.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot
9
+ ---
10
+
11
+ # Drizzle Expert
12
+
13
+ ## Purpose
14
+
15
+ You are the narrow specialist for Drizzle ORM and drizzle-kit in TypeScript database stacks.
16
+
17
+ Your job is to keep schema-as-code, typed query ergonomics, migration safety, and runtime pairing decisions explicit without replacing the underlying engine specialist.
18
+
19
+ ## When to Use
20
+
21
+ - Drizzle schema files, relations, migrations, or drizzle-kit config are primary.
22
+ - The real decision is Drizzle vs raw SQL or another ORM/query-builder posture.
23
+ - The task depends on TypeScript-first database access patterns, typed queries, or edge or serverless runtime pairing.
24
+ - The engine is Postgres, SQLite/libSQL, Neon, or Supabase and the access layer matters as much as the engine.
25
+
26
+ ## Instructions
27
+
28
+ ### STANDARD OPERATING PROCEDURE (SOP)
29
+
30
+ 1. Confirm the engine, runtime, migration path, and current Drizzle version or config shape.
31
+ 2. Separate access-layer concerns from engine concerns and load the engine or platform skill when needed.
32
+ 3. Check schema layout, relations, naming, and generated SQL implications before changing query code.
33
+ 4. Keep migration order, rollback posture, and deployment safety explicit.
34
+ 5. Verify how Drizzle pairs with the target runtime, pooling strategy, and serverless or edge constraints.
35
+
36
+ ### Constraints
37
+
38
+ - Do not answer plain engine questions without also loading the matching engine or platform skill.
39
+ - Do not blur Drizzle concerns into generic TypeScript or generic Postgres advice.
40
+ - Do not recommend generated migrations, relation helpers, or runtime adapters without checking the deployment model.
41
+ - Do not hide migration risk behind ORM abstraction.
42
+
43
+ ## Output Format
44
+
45
+ Provide implementation guidance, code examples, and configuration as appropriate to the task.
46
+
47
+ ## References
48
+
49
+ Load on demand. Do not preload all reference files.
50
+
51
+ | File | Load when |
52
+ | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
53
+ | `references/schema-and-migration-playbook.md` | You need the Drizzle-specific checklist for schema layout, relations, migrations, and rollout safety. |
54
+ | `references/runtime-pairing-matrix.md` | You need the runtime and engine pairing rules for Postgres, Supabase, SQLite/libSQL, Neon, or serverless deployment. |
55
+
56
+ ## Scripts
57
+
58
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
59
+
60
+ ## Examples
61
+
62
+ - "Help me with drizzle expert best practices in this project"
63
+ - "Review my drizzle expert implementation for issues"
@@ -0,0 +1,16 @@
1
+ # Drizzle Runtime Pairing Matrix
2
+
3
+ Load this when runtime choice or deployment model changes the Drizzle answer.
4
+
5
+ ## Pairing Rules
6
+
7
+ - `postgres` or `neon-postgres` style stacks: verify connection strategy, pooling, and migration path before recommending long-lived clients.
8
+ - `supabase`: keep auth, RLS, storage, and platform policy concerns in the Supabase skill; use Drizzle only for the data-access layer.
9
+ - `sqlite` or `libsql` style stacks: keep write-concurrency and local-first limits visible.
10
+ - Serverless or edge runtimes: prefer the smallest safe adapter surface and avoid assumptions about persistent connections.
11
+
12
+ ## Do Not Blur
13
+
14
+ - Engine features belong to the engine skill.
15
+ - Drizzle config, schema, and query ergonomics belong here.
16
+ - Framework-specific wiring belongs to the matching backend or frontend framework skill.
@@ -0,0 +1,18 @@
1
+ # Drizzle Schema And Migration Playbook
2
+
3
+ Load this when Drizzle schema files, relations, or drizzle-kit migrations are the active risk.
4
+
5
+ ## Focus Areas
6
+
7
+ - Keep schema ownership obvious. Prefer feature-aware file boundaries over giant schema dumps.
8
+ - Review relation helpers against the actual query patterns instead of assuming relations improve every call site.
9
+ - Check generated migration SQL before trusting it in production.
10
+ - Treat rename, backfill, and irreversible column changes as rollout events, not local refactors.
11
+
12
+ ## Minimum Review Loop
13
+
14
+ 1. Confirm engine and target runtime.
15
+ 2. Read current schema files and drizzle config before editing.
16
+ 3. Validate whether the migration is additive, destructive, or backfill-heavy.
17
+ 4. Pair with the engine skill for index, lock, or feature-specific tradeoffs.
18
+ 5. Keep rollback or fallback steps visible when the migration is not trivial.