@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,150 +1,164 @@
1
1
  ---
2
- name: "design-system-builder"
3
- displayName: "Design System Builder"
4
- description: "Create and review design system components: API design, token usage, theming, variants, and documentation"
5
- keywords:
6
- [
7
- "design system",
8
- "components",
9
- "component design",
10
- "tokens",
11
- "theming",
12
- "variants",
13
- "widget api",
14
- ]
2
+ name: design-system-builder
3
+ description: Build and maintain token-driven design systems with reusable components, semantic APIs, variant patterns, and theming support across frameworks.
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: cubis-foundry
7
+ version: "3.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
15
9
  ---
16
10
 
17
11
  # Design System Builder
18
12
 
19
- ## Overview
13
+ ## Purpose
20
14
 
21
- This power helps you create new design system components or update existing ones, ensuring consistent API design, proper token usage, theming support, and comprehensive documentation.
15
+ Guide the creation and maintenance of design systems the foundational layer of tokens, primitives, and components that ensure visual and behavioral consistency across an application.
22
16
 
23
17
  ## When to Use
24
18
 
25
- - Creating new One\* components
26
- - Updating existing One\* components
27
- - Reviewing component API design
28
- - Adding new variants to components
29
- - Ensuring token compliance in components
30
-
31
- ## Component Design Principles
32
-
33
- ### 1. Token-Based Styling
34
-
35
- ```dart
36
- // Don't hardcode values
37
- Container(
38
- padding: EdgeInsets.all(16),
39
- decoration: BoxDecoration(
40
- color: Color(0xFF123456),
41
- borderRadius: BorderRadius.circular(8),
42
- ),
43
- )
44
-
45
- // ✅ Use design tokens
46
- Container(
47
- padding: EdgeInsets.all(AppSpacing.lg), // Use your spacing tokens
48
- decoration: BoxDecoration(
49
- color: Theme.of(context).colorScheme.surface, // Use theme colors
50
- borderRadius: BorderRadius.circular(AppRadius.md), // Use radius tokens
51
- ),
52
- )
53
- ```
19
+ - Creating a new design system or component library from scratch
20
+ - Adding components to an existing design system
21
+ - Reviewing component APIs for consistency and composability
22
+ - Setting up design tokens (color, spacing, typography, motion)
23
+ - Building theming support (light/dark, brand variants)
24
+ - Auditing an existing system for token coverage or API drift
25
+
26
+ ## Instructions
27
+
28
+ ### Step 1 — Audit the Current State
29
+
30
+ Before building anything, understand what exists:
31
+
32
+ 1. Inventory existing components — list every reusable UI element
33
+ 2. Catalog design tokens — identify hardcoded values that should be tokens
34
+ 3. Check naming conventions — are components and tokens named consistently?
35
+ 4. Identify gaps — what's missing vs. what the product actually needs?
36
+
37
+ **DO**: Start from real product needs, not hypothetical components.
38
+ **DON'T**: Build components speculatively — every component must have at least 2 real use cases.
39
+
40
+ ### Step 2 — Define the Token Layer
41
+
42
+ Tokens are the single source of truth for all visual decisions.
43
+
44
+ #### Token Categories
54
45
 
55
- ### 2. Semantic API
56
-
57
- ```dart
58
- // ✅ Semantic, clear API
59
- class AppButton extends StatelessWidget {
60
- final String label;
61
- final VoidCallback? onPressed;
62
- final bool isLoading;
63
- final bool isDisabled;
64
- final Widget? leading;
65
- final Widget? trailing;
66
-
67
- // Named constructors for variants
68
- AppButton.primary({...});
69
- AppButton.secondary({...});
70
- AppButton.ghost({...});
71
- }
72
46
  ```
47
+ ├── color/
48
+ │ ├── primitive/ (blue-500, gray-100 — raw palette)
49
+ │ ├── semantic/ (text-primary, surface-elevated — meaning-based)
50
+ │ └── component/ (button-bg, card-border — component-specific)
51
+ ├── spacing/ (space-1 through space-12, based on 4px or 8px grid)
52
+ ├── typography/ (font-family, font-size scale, line-height, font-weight)
53
+ ├── radius/ (radius-sm, radius-md, radius-lg, radius-full)
54
+ ├── shadow/ (shadow-sm, shadow-md, shadow-lg — elevation levels)
55
+ ├── motion/ (duration-fast, duration-normal, easing-default)
56
+ └── breakpoint/ (sm, md, lg, xl — responsive thresholds)
57
+ ```
58
+
59
+ **Rules**:
60
+ - Primitive tokens hold raw values (never use directly in components)
61
+ - Semantic tokens reference primitives and encode meaning
62
+ - Component tokens reference semantic tokens for local overrides
63
+ - Never hardcode values in components — always reference tokens
64
+
65
+ ### Step 3 — Design Component APIs
66
+
67
+ Every component should follow these API principles:
68
+
69
+ 1. **Predictable** — props follow consistent patterns across components
70
+ 2. **Composable** — small components combine into larger patterns
71
+ 3. **Constrained** — expose only the variants the system supports
72
+ 4. **Accessible** — ARIA, keyboard, and screen reader support built-in
73
+
74
+ #### Component Anatomy
73
75
 
74
- ### 3. Composition Over Configuration
75
-
76
- ```dart
77
- // ✅ Compose smaller components
78
- class AppCard extends StatelessWidget {
79
- final Widget child;
80
- final EdgeInsets? padding;
81
- final Color? backgroundColor;
82
-
83
- AppCard.elevated({...}) : this(
84
- padding: EdgeInsets.all(AppSpacing.lg),
85
- backgroundColor: Theme.of(context).colorScheme.surface,
86
- elevation: 2,
87
- );
88
- }
76
+ ```
77
+ ComponentName/
78
+ ├── index.{ts,tsx} (public API — exports only what consumers need)
79
+ ├── ComponentName.{tsx} (implementation)
80
+ ├── ComponentName.test.{tsx} (unit + interaction tests)
81
+ ├── ComponentName.stories.{tsx} (visual documentation)
82
+ ├── variants.ts (variant definitions — size, color, state)
83
+ └── tokens.ts (component-level token overrides)
89
84
  ```
90
85
 
91
- ## Component Checklist
86
+ #### Variant Pattern
92
87
 
93
- ### API Design
88
+ Use variants (not boolean flags) for visual options:
94
89
 
95
- - [ ] Semantic property names (label, errorText, leading, trailing)
96
- - [ ] Sensible defaults (minimal required params)
97
- - [ ] Named constructors for variants
98
- - [ ] Consistent with other design system components
90
+ ```
91
+ // DO: Constrained variants
92
+ <Button variant="primary" size="md" />
93
+ <Button variant="ghost" size="sm" />
99
94
 
100
- ### Token Usage
95
+ // DON'T: Boolean flag explosion
96
+ <Button primary large outlined rounded />
97
+ ```
101
98
 
102
- - [ ] No hardcoded colors (use theme colors or color tokens)
103
- - [ ] No hardcoded spacing (use spacing tokens)
104
- - [ ] No hardcoded typography (use text styles)
105
- - [ ] No hardcoded radius (use radius tokens)
99
+ ### Step 4 Build Theming Support
106
100
 
107
- ### Theming
101
+ Themes override semantic tokens without changing component logic.
108
102
 
109
- - [ ] Respects light/dark theme
110
- - [ ] Uses theme-aware colors (context.colors)
111
- - [ ] Adapts to platform (iOS/Android)
103
+ **Light/Dark**:
104
+ - Swap surface lightness, reduce chroma in dark mode
105
+ - Test contrast ratios in both themes
106
+ - Never use `color-scheme: dark` alone — define explicit token overrides
112
107
 
113
- ### Variants
108
+ **Brand Variants**:
109
+ - Override only the accent/brand color tokens
110
+ - Keep neutral palette, spacing, and typography consistent across brands
114
111
 
115
- - [ ] Variants defined as enums or named constructors
116
- - [ ] Each variant has clear use case
117
- - [ ] Variants share common base implementation
112
+ **Implementation**:
113
+ - CSS: Use CSS custom properties scoped to `[data-theme]` or `:root`
114
+ - JS frameworks: Use context/provider pattern for runtime theming
115
+ - Ensure tokens cascade correctly (component < semantic < primitive)
118
116
 
119
- ### Documentation
117
+ ### Step 5 — Document and Enforce
120
118
 
121
- - [ ] Doc comment explaining purpose
122
- - [ ] At least 2 usage examples
123
- - [ ] Migration notes from raw Flutter widgets
119
+ Every component needs:
124
120
 
125
- ### Testing
121
+ 1. **API docs** — props table with types, defaults, and descriptions
122
+ 2. **Usage examples** — at least one "do" and one "don't"
123
+ 3. **Visual examples** — rendered variants (Storybook or equivalent)
124
+ 4. **Accessibility notes** — keyboard behavior, ARIA attributes, screen reader output
126
125
 
127
- - [ ] Widget test for each variant
128
- - [ ] Test disabled/loading states
129
- - [ ] Test accessibility (semantic labels)
130
- - [ ] Consider golden tests for visual regression
126
+ **Enforcement**:
127
+ - Lint rules preventing hardcoded values (e.g., no raw hex colors)
128
+ - Visual regression tests for all component variants
129
+ - Bundle size tracking per component
130
+ - Prop type validation / TypeScript strict mode
131
+
132
+ ### Step 6 — Keep the System Small
133
+
134
+ **Rules for growth**:
135
+ - A component must have ≥ 2 real use cases before extraction
136
+ - Prefer composition over new components — combine existing primitives first
137
+ - Regularly audit for unused or redundant components
138
+ - Remove components that lost their second use case
131
139
 
132
140
  ## Output Format
133
141
 
134
- When creating/reviewing a component:
142
+ When creating or reviewing design system work, structure responses as:
143
+
144
+ 1. **Token audit** — what's hardcoded vs. tokenized
145
+ 2. **Component API** — props, variants, composition points
146
+ 3. **Theme compatibility** — does it work in light/dark/brand contexts?
147
+ 4. **Code** — implementation with token references, accessibility, tests
148
+ 5. **Migration notes** — how to adopt without breaking existing usage
149
+
150
+ ## References
151
+
152
+ - [references/token-architecture.md](references/token-architecture.md) — token naming, layering, and CSS custom property patterns
153
+ - [references/component-api-checklist.md](references/component-api-checklist.md) — API review checklist for new components
154
+ - [references/theming-patterns.md](references/theming-patterns.md) — light/dark and brand theming implementation
135
155
 
136
- 1. **Component Spec** (purpose, variants, API)
137
- 2. **Token Usage** (which tokens are used)
138
- 3. **Implementation Notes** (composition, theming)
139
- 4. **Examples** (2+ usage snippets)
140
- 5. **Tests** (widget tests + golden ideas)
141
- 6. **Migration Notes** (how to replace old widgets)
156
+ ## Examples
142
157
 
143
- ## Steering Files
158
+ **User**: "Create a Button component for our design system"
144
159
 
145
- - `component_api_guidelines.md` - API design best practices
160
+ **Response approach**: Define variants (primary, secondary, ghost, danger), sizes (sm, md, lg), states (default, hover, active, disabled, loading). Use tokens for all visual properties. Include ARIA attributes, keyboard handling, and loading state. Show usage examples with composition (Button + Icon, ButtonGroup).
146
161
 
147
- ## Templates
162
+ **User**: "Audit our design system tokens"
148
163
 
149
- - `one_component_skeleton` - Component template
150
- - `component_widget_test` - Widget test template
164
+ **Response approach**: Scan codebase for hardcoded values. Categorize them (color, spacing, typography, shadow, radius). Propose token names following the naming convention. Show before/after migration for each category.
@@ -1,85 +1,148 @@
1
1
  ````markdown
2
2
  ---
3
3
  inclusion: manual
4
- name: "devops-engineer"
5
- description: "Use when setting up CI/CD pipelines, containerizing applications, or managing infrastructure as code. Invoke for pipelines, Docker, Kubernetes, cloud platforms, GitOps."
4
+ name: devops-engineer
5
+ description: Design CI/CD pipelines, infrastructure-as-code, monitoring, deployment strategies, and incident response procedures for reliable software delivery.
6
+ license: Apache-2.0
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "3.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
6
11
  ---
7
12
 
8
-
9
13
  # DevOps Engineer
10
14
 
11
- ## Overview
15
+ ## Purpose
16
+
17
+ Guide DevOps practices including CI/CD pipeline design, infrastructure-as-code, deployment strategies, monitoring, and incident response. Bridge development and operations for reliable, automated delivery.
18
+
19
+ ## When to Use
20
+
21
+ - Setting up or improving CI/CD pipelines
22
+ - Designing deployment strategies (blue-green, canary, rolling)
23
+ - Writing infrastructure-as-code (Terraform, Pulumi, CloudFormation)
24
+ - Configuring monitoring, alerting, and observability
25
+ - Building incident response procedures
26
+ - Containerizing applications (Docker, Kubernetes)
27
+
28
+ ## Instructions
29
+
30
+ ### Step 1 — CI/CD Pipeline Design
31
+
32
+ **Pipeline stages** (in order):
33
+
34
+ 1. **Lint & Format** — static analysis, code formatting (fastest feedback)
35
+ 2. **Unit Tests** — isolated logic tests (< 5 min target)
36
+ 3. **Build** — compile, bundle, generate artifacts
37
+ 4. **Integration Tests** — API, database, service boundary tests
38
+ 5. **Security Scan** — dependency audit, SAST, secret scanning
39
+ 6. **Deploy to Staging** — automated deployment to pre-production
40
+ 7. **E2E / Smoke Tests** — critical path verification on staging
41
+ 8. **Deploy to Production** — automated or gated release
42
+
43
+ **Principles**:
44
+
45
+ - Fail fast — put the quickest checks first
46
+ - Parallelize independent stages
47
+ - Cache dependencies between runs (node_modules, Docker layers)
48
+ - Every merge to main should be deployable
49
+ - Never skip tests to "move faster"
50
+
51
+ ### Step 2 — Deployment Strategies
52
+
53
+ | Strategy | Risk | Rollback Speed | When to Use |
54
+ | ------------- | -------- | ------------------- | ----------------------------------------------- |
55
+ | Rolling | Low | Medium | Default for most services |
56
+ | Blue-Green | Low | Instant (switch) | Stateless services, zero-downtime required |
57
+ | Canary | Very Low | Fast (route change) | High-traffic services, gradual confidence |
58
+ | Feature Flags | Very Low | Instant (toggle) | Decoupling deploy from release |
59
+ | Recreate | High | Slow (redeploy) | Only when breaking changes require full restart |
60
+
61
+ **Rollback plan**: Every deployment must have a documented rollback path that takes < 5 minutes.
62
+
63
+ ### Step 3 — Infrastructure as Code
64
+
65
+ **Principles**:
66
+
67
+ - All infrastructure defined in version-controlled code
68
+ - Environments are reproducible from code alone
69
+ - No manual changes to production (drift = risk)
70
+ - Use modules/components for reusable infrastructure patterns
71
+ - Plan before apply — review changes before executing
72
+
73
+ **Structure**:
74
+
75
+ ```
76
+ infrastructure/
77
+ ├── modules/ (reusable components)
78
+ │ ├── networking/
79
+ │ ├── compute/
80
+ │ └── database/
81
+ ├── environments/
82
+ │ ├── staging/
83
+ │ └── production/
84
+ └── shared/ (DNS, IAM, secrets)
85
+ ```
12
86
 
13
- Senior DevOps engineer specializing in CI/CD pipelines, infrastructure as code, and deployment automation.
87
+ ### Step 4 Monitoring & Alerting
14
88
 
15
- ## Role Definition
89
+ **Four Golden Signals** (monitor these for every service):
16
90
 
17
- You are a senior DevOps engineer with 10+ years of experience. You operate with three perspectives:
91
+ | Signal | Measures | Example Metric |
92
+ | ---------- | ---------------------- | ------------------------------ |
93
+ | Latency | Time to serve requests | p50, p95, p99 response time |
94
+ | Traffic | Demand on the system | Requests per second |
95
+ | Errors | Failed requests | Error rate (5xx / total) |
96
+ | Saturation | Resource utilization | CPU, memory, disk, connections |
18
97
 
19
- - **Build Hat**: Automating build, test, and packaging
20
- - **Deploy Hat**: Orchestrating deployments across environments
21
- - **Ops Hat**: Ensuring reliability, monitoring, and incident response
98
+ **Alerting rules**:
22
99
 
23
- ## When to Use This Skill
100
+ - Alert on symptoms (high error rate), not causes (high CPU)
101
+ - Every alert must be actionable — if no one needs to act, it's noise
102
+ - Use severity levels: critical (page), warning (ticket), info (dashboard)
103
+ - Include runbook link in every alert
24
104
 
25
- - Setting up CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins)
26
- - Containerizing applications (Docker, Docker Compose)
27
- - Kubernetes deployments and configurations
28
- - Infrastructure as code (Terraform, Pulumi)
29
- - Cloud platform configuration (AWS, GCP, Azure)
30
- - Deployment strategies (blue-green, canary, rolling)
31
- - Building internal developer platforms and self-service tools
32
- - Incident response, on-call, and production troubleshooting
33
- - Release automation and artifact management
105
+ ### Step 5 Incident Response
34
106
 
35
- ## Core Workflow
107
+ **Incident lifecycle**:
36
108
 
37
- 1. **Assess** - Understand application, environments, requirements
38
- 2. **Design** - Pipeline structure, deployment strategy
39
- 3. **Implement** - IaC, Dockerfiles, CI/CD configs
40
- 4. **Deploy** - Roll out with verification
41
- 5. **Monitor** - Set up observability, alerts
109
+ 1. **Detect** monitoring alerts or user reports
110
+ 2. **Respond** acknowledge, assess severity, assemble responders
111
+ 3. **Mitigate** stop the bleeding (rollback, feature flag, scale up)
112
+ 4. **Resolve** fix root cause
113
+ 5. **Review** blameless postmortem within 48 hours
42
114
 
43
- ## Available Steering Files
115
+ **Postmortem template**:
44
116
 
45
- Load detailed guidance on-demand:
117
+ - What happened? (timeline)
118
+ - What was the impact? (users affected, duration)
119
+ - What was the root cause?
120
+ - What prevented earlier detection?
121
+ - Action items (with owners and deadlines)
46
122
 
47
- | Topic | Reference | Load When |
48
- | -------------- | ----------------------------------- | -------------------------------------------------------------- |
49
- | GitHub Actions | `references/github-actions.md` | Setting up CI/CD pipelines, GitHub workflows |
50
- | Docker | `references/docker-patterns.md` | Containerizing applications, writing Dockerfiles |
51
- | Kubernetes | `references/kubernetes.md` | K8s deployments, services, ingress, pods |
52
- | Terraform | `references/terraform-iac.md` | Infrastructure as code, AWS/GCP provisioning |
53
- | Deployment | `references/deployment-strategies.md` | Blue-green, canary, rolling updates, rollback |
54
- | Platform | `references/platform-engineering.md` | Self-service infra, developer portals, golden paths, Backstage |
55
- | Release | `references/release-automation.md` | Artifact management, feature flags, multi-platform CI/CD |
56
- | Incidents | `references/incident-response.md` | Production outages, on-call, MTTR, postmortems, runbooks |
123
+ ## Output Format
57
124
 
58
- ## Constraints
125
+ ```
126
+ ## DevOps Recommendation
127
+ [approach and reasoning]
59
128
 
60
- ### MUST DO
129
+ ## Implementation
130
+ [configuration files, scripts, or pipeline definitions]
61
131
 
62
- - Use infrastructure as code (never manual changes)
63
- - Implement health checks and readiness probes
64
- - Store secrets in secret managers (not env files)
65
- - Enable container scanning in CI/CD
66
- - Document rollback procedures
67
- - Use GitOps for Kubernetes (ArgoCD, Flux)
132
+ ## Monitoring
133
+ [what to monitor and alert on]
68
134
 
69
- ### MUST NOT DO
135
+ ## Rollback Plan
136
+ [how to revert if something goes wrong]
137
+ ```
70
138
 
71
- - Deploy to production without explicit approval
72
- - Store secrets in code or CI/CD variables
73
- - Skip staging environment testing
74
- - Ignore resource limits in containers
75
- - Use `latest` tag in production
76
- - Deploy on Fridays without monitoring
139
+ ## Examples
77
140
 
78
- ## Output Templates
141
+ **User**: "Set up a GitHub Actions CI/CD pipeline for our Node.js API"
79
142
 
80
- Provide: CI/CD pipeline config, Dockerfile, K8s/Terraform files, deployment verification, rollback procedure
143
+ **Response approach**: Multi-stage pipeline: lint test build → deploy. Cache node_modules. Run security audit. Deploy to staging on PR merge, production on release tag. Include health check after deploy.
81
144
 
82
- ## Knowledge Reference
145
+ **User**: "We need to deploy without downtime"
83
146
 
84
- GitHub Actions, GitLab CI, Jenkins, CircleCI, Docker, Kubernetes, Helm, ArgoCD, Flux, Terraform, Pulumi, Crossplane, AWS/GCP/Azure, Prometheus, Grafana, PagerDuty, Backstage, LaunchDarkly, Flagger
147
+ **Response approach**: Recommend blue-green or rolling deployment based on architecture. Show Kubernetes rolling update config or load balancer switch pattern. Include health check probes and rollback trigger.
85
148
  ````