@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
@@ -0,0 +1,67 @@
1
+ ````markdown
2
+ ---
3
+ inclusion: manual
4
+ name: deep-research
5
+ description: "Use when a task needs multi-round research rather than a quick lookup: iterative search, gap finding, corroboration across sources, contradiction handling, evidence-led synthesis before planning or implementation. Also use when the user asks for 'deep research', 'latest info', or 'how does X compare to Y publicly'."
6
+ license: MIT
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "1.1"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
11
+ ---
12
+
13
+ # Deep Research
14
+
15
+ ## Purpose
16
+
17
+ You are the specialist for iterative evidence gathering and synthesis.
18
+
19
+ Your job is to find what is missing, not just summarize the first page of results. Stop when remaining uncertainty is low-impact or explicitly reported to the user.
20
+
21
+ ## When to Use
22
+
23
+ - The task needs deep web or repo research before planning or implementation
24
+ - The first-pass answer is incomplete, contradictory, or likely stale
25
+ - The user explicitly asks for research, latest information, or public-repo comparison
26
+ - Claims are contested or the topic changes fast (AI tooling, frameworks, protocols)
27
+
28
+ ## Instructions
29
+
30
+ ### STANDARD OPERATING PROCEDURE (SOP)
31
+
32
+ 1. Define the narrowest possible form of the question and what would count as enough evidence.
33
+ 2. Run a first pass and identify gaps, contradictions, and missing facts.
34
+ 3. Search specifically for the missing facts, stronger sources, or counterexamples.
35
+ 4. Rank sources by directness (primary > secondary > tertiary), recency, and authority.
36
+ 5. Separate **sourced facts**, **informed inference**, and **unresolved gaps** in the output.
37
+ 6. Apply the sub-agent reader test for substantial research deliverables — pass the synthesis to a fresh context to verify it's self-contained.
38
+
39
+ ### Constraints
40
+
41
+ - Do not stop at one source when the claim is unstable or contested.
42
+ - Do not present inference as sourced fact.
43
+ - Do not turn research into implementation before the evidence is good enough.
44
+ - Do not bloat the final answer with low-signal citations.
45
+
46
+ ## Output Format
47
+
48
+ Structure clearly as:
49
+
50
+ - **Key findings** — the answer, directly stated
51
+ - **Evidence** — sourced facts with citations ranked by confidence
52
+ - **Inference** — what follows logically from the evidence (labeled as inference)
53
+ - **Open questions** — what remains unresolved and why it matters
54
+
55
+ ## References
56
+
57
+ | File | Load when |
58
+ | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
59
+ | `references/multi-round-research-loop.md` | You need the full iterative loop: search, corroboration, contradiction handling, evidence table, sub-agent reader test, stop rules, and failure mode guide. |
60
+
61
+ ## Examples
62
+
63
+ - "Research how Anthropic structures their agent skills — compare to what CBX does"
64
+ - "What's the latest on evaluator-optimizer patterns in production agent systems?"
65
+ - "Deep research on OKLCH vs HSL for design systems — what do practitioners actually use?"
66
+ - "Find counterexamples to the claim that parallel agents always improve speed"
67
+ ````
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: deep-research
3
+ description: "Use when a task needs multi-round research rather than a quick lookup: iterative search, gap finding, corroboration across sources, contradiction handling, evidence-led synthesis before planning or implementation. Also use when the user asks for 'deep research', 'latest info', or 'how does X compare to Y publicly'."
4
+ license: MIT
5
+ metadata:
6
+ author: cubis-foundry
7
+ version: "1.1"
8
+ compatibility: Claude Code, Codex, GitHub Copilot
9
+ ---
10
+
11
+ # Deep Research
12
+
13
+ ## Purpose
14
+
15
+ You are the specialist for iterative evidence gathering and synthesis.
16
+
17
+ Your job is to find what is missing, not just summarize the first page of results. Stop when remaining uncertainty is low-impact or explicitly reported to the user.
18
+
19
+ ## When to Use
20
+
21
+ - The task needs deep web or repo research before planning or implementation
22
+ - The first-pass answer is incomplete, contradictory, or likely stale
23
+ - The user explicitly asks for research, latest information, or public-repo comparison
24
+ - Claims are contested or the topic changes fast (AI tooling, frameworks, protocols)
25
+
26
+ ## Instructions
27
+
28
+ ### STANDARD OPERATING PROCEDURE (SOP)
29
+
30
+ 1. Define the narrowest possible form of the question and what would count as enough evidence.
31
+ 2. Run a first pass and identify gaps, contradictions, and missing facts.
32
+ 3. Search specifically for the missing facts, stronger sources, or counterexamples.
33
+ 4. Rank sources by directness (primary > secondary > tertiary), recency, and authority.
34
+ 5. Separate **sourced facts**, **informed inference**, and **unresolved gaps** in the output.
35
+ 6. Apply the sub-agent reader test for substantial research deliverables — pass the synthesis to a fresh context to verify it's self-contained.
36
+
37
+ ### Constraints
38
+
39
+ - Do not stop at one source when the claim is unstable or contested.
40
+ - Do not present inference as sourced fact.
41
+ - Do not turn research into implementation before the evidence is good enough.
42
+ - Do not bloat the final answer with low-signal citations.
43
+
44
+ ## Output Format
45
+
46
+ Structure clearly as:
47
+
48
+ - **Key findings** — the answer, directly stated
49
+ - **Evidence** — sourced facts with citations ranked by confidence
50
+ - **Inference** — what follows logically from the evidence (labeled as inference)
51
+ - **Open questions** — what remains unresolved and why it matters
52
+
53
+ ## References
54
+
55
+ | File | Load when |
56
+ | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
57
+ | `references/multi-round-research-loop.md` | You need the full iterative loop: search, corroboration, contradiction handling, evidence table, sub-agent reader test, stop rules, and failure mode guide. |
58
+
59
+ ## Examples
60
+
61
+ - "Research how Anthropic structures their agent skills — compare to what CBX does"
62
+ - "What's the latest on evaluator-optimizer patterns in production agent systems?"
63
+ - "Deep research on OKLCH vs HSL for design systems — what do practitioners actually use?"
64
+ - "Find counterexamples to the claim that parallel agents always improve speed"
@@ -0,0 +1,80 @@
1
+ # Multi-Round Research Loop
2
+
3
+ Load this when the research task is broad, unstable, contested, or likely to have conflicting public sources — or when the user explicitly asks for deep or latest research.
4
+
5
+ ## The Core Principle
6
+
7
+ Your job is to find what is _missing_, not just summarize the first page of results. Stop when remaining uncertainty is low-impact or explicitly reported back to the user.
8
+
9
+ ---
10
+
11
+ ## The Loop
12
+
13
+ ### Round 1: Define and search broadly
14
+
15
+ 1. **Narrow the question** — State the most specific version of what you're trying to find. Vague questions produce vague results.
16
+ 2. **Search** — Run initial queries across the most likely sources (official docs, engineering blogs, GitHub repos, research papers as appropriate).
17
+ 3. **Record gaps** — What did this pass _not_ answer? What's contradictory? What's suspiciously absent?
18
+
19
+ ### Round 2: Target the gaps
20
+
21
+ 4. **Search directly for the missing facts** — Use specific, targeted queries (not broad topic queries). Prefer: official docs > primary source blog > authoritative community reference > general article.
22
+ 5. **Search for contradictions** — If two sources disagree, search specifically for why. Age, version differences, and context often explain it.
23
+ 6. **Seek counterexamples** — Actively search for "X doesn't work", "X is wrong", "problems with X" — not just confirmation.
24
+
25
+ ### Round 3: Corroborate and synthesize
26
+
27
+ 7. **Cross-verify** unstable claims against at least one independent source.
28
+ 8. **Rank sources** by directness (primary > secondary > tertiary), recency (newer > older for fast-moving topics), and authority (official > community > anecdotal).
29
+ 9. **Write the evidence table** — Track what you found, not just conclusions:
30
+
31
+ | Fact | Source | Confidence | Open question |
32
+ | ------- | ------------ | ------------------- | ------------------------ |
33
+ | [Claim] | [URL or doc] | High / Medium / Low | [What's still uncertain] |
34
+
35
+ ---
36
+
37
+ ## Stop Rule
38
+
39
+ Stop when:
40
+
41
+ - Remaining uncertainty is low-impact (won't change the recommendation)
42
+ - OR the question is genuinely unresolvable from public sources (report this explicitly)
43
+ - OR you've completed 3 rounds without new signal (diminishing returns — report what's known and what's not)
44
+
45
+ Do NOT stop after one source when the claim is unstable, contested, or from a secondary source.
46
+
47
+ ---
48
+
49
+ ## Output Format
50
+
51
+ Separate clearly:
52
+
53
+ - **Sourced facts** — you have direct evidence
54
+ - **Informed inference** — logically follows from evidence but not directly stated
55
+ - **Unresolved gaps** — you searched and didn't find it; note what's unknown
56
+
57
+ Do not present inference as fact. Do not present absence of evidence as evidence of absence.
58
+
59
+ ---
60
+
61
+ ## Common Research Failure Modes
62
+
63
+ | Failure | Fix |
64
+ | ------------------------------------- | -------------------------------------------------- |
65
+ | Stopping at first result | Check at least 2-3 sources for any unstable claim |
66
+ | Only finding confirmation | Actively search for counterexamples and criticisms |
67
+ | Treating recent = correct | Cross-check recency with authority and context |
68
+ | Vague queries returning vague results | Restate the question as a specific, narrow query |
69
+ | Reporting uncertainty as fact | Use "inference" or "unknown" tags explicitly |
70
+ | Burying the answer in context | Lead with the finding; evidence follows |
71
+
72
+ ---
73
+
74
+ ## Sub-Agent Reader Test
75
+
76
+ After completing research, if the output will be used by another agent or handed to a human without context:
77
+
78
+ - Pass the research summary to a fresh sub-agent with no conversation history
79
+ - Ask: "What is the main finding?", "What is still uncertain?", "What sources support the key claims?"
80
+ - If the fresh reader gets it wrong, the synthesis has context bleed — revise before delivery
@@ -1,153 +1,167 @@
1
1
  ````markdown
2
2
  ---
3
3
  inclusion: manual
4
- name: "design-system-builder"
5
- displayName: "Design System Builder"
6
- description: "Create and review design system components: API design, token usage, theming, variants, and documentation"
7
- keywords:
8
- [
9
- "design system",
10
- "components",
11
- "component design",
12
- "tokens",
13
- "theming",
14
- "variants",
15
- "widget api",
16
- ]
4
+ name: design-system-builder
5
+ description: Build and maintain token-driven design systems with reusable components, semantic APIs, variant patterns, and theming support across frameworks.
6
+ license: Apache-2.0
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "3.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
17
11
  ---
18
12
 
19
13
  # Design System Builder
20
14
 
21
- ## Overview
15
+ ## Purpose
22
16
 
23
- 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.
17
+ 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.
24
18
 
25
19
  ## When to Use
26
20
 
27
- - Creating new One\* components
28
- - Updating existing One\* components
29
- - Reviewing component API design
30
- - Adding new variants to components
31
- - Ensuring token compliance in components
32
-
33
- ## Component Design Principles
34
-
35
- ### 1. Token-Based Styling
36
-
37
- ```dart
38
- // Don't hardcode values
39
- Container(
40
- padding: EdgeInsets.all(16),
41
- decoration: BoxDecoration(
42
- color: Color(0xFF123456),
43
- borderRadius: BorderRadius.circular(8),
44
- ),
45
- )
46
-
47
- // ✅ Use design tokens
48
- Container(
49
- padding: EdgeInsets.all(AppSpacing.lg), // Use your spacing tokens
50
- decoration: BoxDecoration(
51
- color: Theme.of(context).colorScheme.surface, // Use theme colors
52
- borderRadius: BorderRadius.circular(AppRadius.md), // Use radius tokens
53
- ),
54
- )
55
- ```
21
+ - Creating a new design system or component library from scratch
22
+ - Adding components to an existing design system
23
+ - Reviewing component APIs for consistency and composability
24
+ - Setting up design tokens (color, spacing, typography, motion)
25
+ - Building theming support (light/dark, brand variants)
26
+ - Auditing an existing system for token coverage or API drift
27
+
28
+ ## Instructions
29
+
30
+ ### Step 1 — Audit the Current State
31
+
32
+ Before building anything, understand what exists:
33
+
34
+ 1. Inventory existing components — list every reusable UI element
35
+ 2. Catalog design tokens — identify hardcoded values that should be tokens
36
+ 3. Check naming conventions — are components and tokens named consistently?
37
+ 4. Identify gaps — what's missing vs. what the product actually needs?
38
+
39
+ **DO**: Start from real product needs, not hypothetical components.
40
+ **DON'T**: Build components speculatively — every component must have at least 2 real use cases.
41
+
42
+ ### Step 2 — Define the Token Layer
43
+
44
+ Tokens are the single source of truth for all visual decisions.
45
+
46
+ #### Token Categories
56
47
 
57
- ### 2. Semantic API
58
-
59
- ```dart
60
- // ✅ Semantic, clear API
61
- class AppButton extends StatelessWidget {
62
- final String label;
63
- final VoidCallback? onPressed;
64
- final bool isLoading;
65
- final bool isDisabled;
66
- final Widget? leading;
67
- final Widget? trailing;
68
-
69
- // Named constructors for variants
70
- AppButton.primary({...});
71
- AppButton.secondary({...});
72
- AppButton.ghost({...});
73
- }
74
48
  ```
49
+ ├── color/
50
+ │ ├── primitive/ (blue-500, gray-100 — raw palette)
51
+ │ ├── semantic/ (text-primary, surface-elevated — meaning-based)
52
+ │ └── component/ (button-bg, card-border — component-specific)
53
+ ├── spacing/ (space-1 through space-12, based on 4px or 8px grid)
54
+ ├── typography/ (font-family, font-size scale, line-height, font-weight)
55
+ ├── radius/ (radius-sm, radius-md, radius-lg, radius-full)
56
+ ├── shadow/ (shadow-sm, shadow-md, shadow-lg — elevation levels)
57
+ ├── motion/ (duration-fast, duration-normal, easing-default)
58
+ └── breakpoint/ (sm, md, lg, xl — responsive thresholds)
59
+ ```
60
+
61
+ **Rules**:
62
+ - Primitive tokens hold raw values (never use directly in components)
63
+ - Semantic tokens reference primitives and encode meaning
64
+ - Component tokens reference semantic tokens for local overrides
65
+ - Never hardcode values in components — always reference tokens
66
+
67
+ ### Step 3 — Design Component APIs
68
+
69
+ Every component should follow these API principles:
70
+
71
+ 1. **Predictable** — props follow consistent patterns across components
72
+ 2. **Composable** — small components combine into larger patterns
73
+ 3. **Constrained** — expose only the variants the system supports
74
+ 4. **Accessible** — ARIA, keyboard, and screen reader support built-in
75
+
76
+ #### Component Anatomy
75
77
 
76
- ### 3. Composition Over Configuration
77
-
78
- ```dart
79
- // ✅ Compose smaller components
80
- class AppCard extends StatelessWidget {
81
- final Widget child;
82
- final EdgeInsets? padding;
83
- final Color? backgroundColor;
84
-
85
- AppCard.elevated({...}) : this(
86
- padding: EdgeInsets.all(AppSpacing.lg),
87
- backgroundColor: Theme.of(context).colorScheme.surface,
88
- elevation: 2,
89
- );
90
- }
78
+ ```
79
+ ComponentName/
80
+ ├── index.{ts,tsx} (public API — exports only what consumers need)
81
+ ├── ComponentName.{tsx} (implementation)
82
+ ├── ComponentName.test.{tsx} (unit + interaction tests)
83
+ ├── ComponentName.stories.{tsx} (visual documentation)
84
+ ├── variants.ts (variant definitions — size, color, state)
85
+ └── tokens.ts (component-level token overrides)
91
86
  ```
92
87
 
93
- ## Component Checklist
88
+ #### Variant Pattern
94
89
 
95
- ### API Design
90
+ Use variants (not boolean flags) for visual options:
96
91
 
97
- - [ ] Semantic property names (label, errorText, leading, trailing)
98
- - [ ] Sensible defaults (minimal required params)
99
- - [ ] Named constructors for variants
100
- - [ ] Consistent with other design system components
92
+ ```
93
+ // DO: Constrained variants
94
+ <Button variant="primary" size="md" />
95
+ <Button variant="ghost" size="sm" />
101
96
 
102
- ### Token Usage
97
+ // DON'T: Boolean flag explosion
98
+ <Button primary large outlined rounded />
99
+ ```
103
100
 
104
- - [ ] No hardcoded colors (use theme colors or color tokens)
105
- - [ ] No hardcoded spacing (use spacing tokens)
106
- - [ ] No hardcoded typography (use text styles)
107
- - [ ] No hardcoded radius (use radius tokens)
101
+ ### Step 4 Build Theming Support
108
102
 
109
- ### Theming
103
+ Themes override semantic tokens without changing component logic.
110
104
 
111
- - [ ] Respects light/dark theme
112
- - [ ] Uses theme-aware colors (context.colors)
113
- - [ ] Adapts to platform (iOS/Android)
105
+ **Light/Dark**:
106
+ - Swap surface lightness, reduce chroma in dark mode
107
+ - Test contrast ratios in both themes
108
+ - Never use `color-scheme: dark` alone — define explicit token overrides
114
109
 
115
- ### Variants
110
+ **Brand Variants**:
111
+ - Override only the accent/brand color tokens
112
+ - Keep neutral palette, spacing, and typography consistent across brands
116
113
 
117
- - [ ] Variants defined as enums or named constructors
118
- - [ ] Each variant has clear use case
119
- - [ ] Variants share common base implementation
114
+ **Implementation**:
115
+ - CSS: Use CSS custom properties scoped to `[data-theme]` or `:root`
116
+ - JS frameworks: Use context/provider pattern for runtime theming
117
+ - Ensure tokens cascade correctly (component < semantic < primitive)
120
118
 
121
- ### Documentation
119
+ ### Step 5 — Document and Enforce
122
120
 
123
- - [ ] Doc comment explaining purpose
124
- - [ ] At least 2 usage examples
125
- - [ ] Migration notes from raw Flutter widgets
121
+ Every component needs:
126
122
 
127
- ### Testing
123
+ 1. **API docs** — props table with types, defaults, and descriptions
124
+ 2. **Usage examples** — at least one "do" and one "don't"
125
+ 3. **Visual examples** — rendered variants (Storybook or equivalent)
126
+ 4. **Accessibility notes** — keyboard behavior, ARIA attributes, screen reader output
128
127
 
129
- - [ ] Widget test for each variant
130
- - [ ] Test disabled/loading states
131
- - [ ] Test accessibility (semantic labels)
132
- - [ ] Consider golden tests for visual regression
128
+ **Enforcement**:
129
+ - Lint rules preventing hardcoded values (e.g., no raw hex colors)
130
+ - Visual regression tests for all component variants
131
+ - Bundle size tracking per component
132
+ - Prop type validation / TypeScript strict mode
133
+
134
+ ### Step 6 — Keep the System Small
135
+
136
+ **Rules for growth**:
137
+ - A component must have ≥ 2 real use cases before extraction
138
+ - Prefer composition over new components — combine existing primitives first
139
+ - Regularly audit for unused or redundant components
140
+ - Remove components that lost their second use case
133
141
 
134
142
  ## Output Format
135
143
 
136
- When creating/reviewing a component:
144
+ When creating or reviewing design system work, structure responses as:
145
+
146
+ 1. **Token audit** — what's hardcoded vs. tokenized
147
+ 2. **Component API** — props, variants, composition points
148
+ 3. **Theme compatibility** — does it work in light/dark/brand contexts?
149
+ 4. **Code** — implementation with token references, accessibility, tests
150
+ 5. **Migration notes** — how to adopt without breaking existing usage
151
+
152
+ ## References
153
+
154
+ - [references/token-architecture.md](references/token-architecture.md) — token naming, layering, and CSS custom property patterns
155
+ - [references/component-api-checklist.md](references/component-api-checklist.md) — API review checklist for new components
156
+ - [references/theming-patterns.md](references/theming-patterns.md) — light/dark and brand theming implementation
137
157
 
138
- 1. **Component Spec** (purpose, variants, API)
139
- 2. **Token Usage** (which tokens are used)
140
- 3. **Implementation Notes** (composition, theming)
141
- 4. **Examples** (2+ usage snippets)
142
- 5. **Tests** (widget tests + golden ideas)
143
- 6. **Migration Notes** (how to replace old widgets)
158
+ ## Examples
144
159
 
145
- ## Steering Files
160
+ **User**: "Create a Button component for our design system"
146
161
 
147
- - `component_api_guidelines.md` - API design best practices
162
+ **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).
148
163
 
149
- ## Templates
164
+ **User**: "Audit our design system tokens"
150
165
 
151
- - `one_component_skeleton` - Component template
152
- - `component_widget_test` - Widget test template
166
+ **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.
153
167
  ````