@cubis/foundry 0.3.70 → 0.3.72

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 (304) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cli/core.js +4 -18
  3. package/dist/cli/core.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +4 -18
  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/ask-questions-if-underspecified/SKILL.md +51 -3
  24. package/workflows/powers/auth-architect/POWER.md +69 -0
  25. package/workflows/powers/auth-architect/SKILL.md +66 -0
  26. package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
  27. package/workflows/powers/behavioral-modes/POWER.md +100 -9
  28. package/workflows/powers/behavioral-modes/SKILL.md +100 -9
  29. package/workflows/powers/c-pro/POWER.md +105 -0
  30. package/workflows/powers/c-pro/SKILL.md +102 -0
  31. package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
  32. package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
  33. package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
  34. package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
  35. package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
  36. package/workflows/powers/changelog-generator/POWER.md +127 -63
  37. package/workflows/powers/changelog-generator/SKILL.md +126 -63
  38. package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
  39. package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
  40. package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
  41. package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
  42. package/workflows/powers/cli-developer/POWER.md +152 -95
  43. package/workflows/powers/cli-developer/SKILL.md +152 -95
  44. package/workflows/powers/cpp-pro/POWER.md +111 -0
  45. package/workflows/powers/cpp-pro/SKILL.md +108 -0
  46. package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
  47. package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
  48. package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
  49. package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
  50. package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
  51. package/workflows/powers/csharp-pro/POWER.md +47 -22
  52. package/workflows/powers/csharp-pro/SKILL.md +47 -22
  53. package/workflows/powers/dart-pro/POWER.md +68 -0
  54. package/workflows/powers/dart-pro/SKILL.md +65 -0
  55. package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
  56. package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
  57. package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
  58. package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
  59. package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
  60. package/workflows/powers/database-design/POWER.md +47 -33
  61. package/workflows/powers/database-design/SKILL.md +47 -33
  62. package/workflows/powers/database-optimizer/POWER.md +43 -64
  63. package/workflows/powers/database-optimizer/SKILL.md +43 -64
  64. package/workflows/powers/database-skills/POWER.md +59 -93
  65. package/workflows/powers/database-skills/SKILL.md +59 -93
  66. package/workflows/powers/debugging-strategies/POWER.md +69 -0
  67. package/workflows/powers/debugging-strategies/SKILL.md +66 -0
  68. package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
  69. package/workflows/powers/deep-research/POWER.md +67 -0
  70. package/workflows/powers/deep-research/SKILL.md +64 -0
  71. package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
  72. package/workflows/powers/design-system-builder/POWER.md +130 -116
  73. package/workflows/powers/design-system-builder/SKILL.md +130 -116
  74. package/workflows/powers/devops-engineer/POWER.md +120 -57
  75. package/workflows/powers/devops-engineer/SKILL.md +120 -57
  76. package/workflows/powers/docker-kubernetes/POWER.md +94 -0
  77. package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
  78. package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
  79. package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
  80. package/workflows/powers/documentation-templates/POWER.md +158 -127
  81. package/workflows/powers/documentation-templates/SKILL.md +158 -127
  82. package/workflows/powers/drizzle-expert/POWER.md +66 -0
  83. package/workflows/powers/drizzle-expert/SKILL.md +63 -0
  84. package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
  85. package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
  86. package/workflows/powers/error-ux-observability/POWER.md +144 -131
  87. package/workflows/powers/error-ux-observability/SKILL.md +143 -131
  88. package/workflows/powers/fastapi-expert/POWER.md +46 -60
  89. package/workflows/powers/fastapi-expert/SKILL.md +46 -60
  90. package/workflows/powers/firebase/POWER.md +65 -0
  91. package/workflows/powers/firebase/SKILL.md +62 -0
  92. package/workflows/powers/firebase/references/platform-routing.md +16 -0
  93. package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
  94. package/workflows/powers/flutter-design-system/POWER.md +63 -0
  95. package/workflows/powers/flutter-design-system/SKILL.md +60 -0
  96. package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
  97. package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
  98. package/workflows/powers/flutter-drift/POWER.md +65 -0
  99. package/workflows/powers/flutter-drift/SKILL.md +62 -0
  100. package/workflows/powers/flutter-drift/references/migrations.md +22 -0
  101. package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
  102. package/workflows/powers/flutter-feature/POWER.md +65 -0
  103. package/workflows/powers/flutter-feature/SKILL.md +62 -0
  104. package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
  105. package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
  106. package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
  107. package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
  108. package/workflows/powers/flutter-go-router/POWER.md +64 -0
  109. package/workflows/powers/flutter-go-router/SKILL.md +61 -0
  110. package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
  111. package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
  112. package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
  113. package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
  114. package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
  115. package/workflows/powers/flutter-repository/POWER.md +64 -0
  116. package/workflows/powers/flutter-repository/SKILL.md +61 -0
  117. package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
  118. package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
  119. package/workflows/powers/flutter-riverpod/POWER.md +70 -0
  120. package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
  121. package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
  122. package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
  123. package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
  124. package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
  125. package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
  126. package/workflows/powers/flutter-state-machine/POWER.md +62 -0
  127. package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
  128. package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
  129. package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
  130. package/workflows/powers/flutter-testing/POWER.md +64 -0
  131. package/workflows/powers/flutter-testing/SKILL.md +61 -0
  132. package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
  133. package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
  134. package/workflows/powers/frontend-code-review/POWER.md +137 -0
  135. package/workflows/powers/frontend-code-review/SKILL.md +134 -0
  136. package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
  137. package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
  138. package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
  139. package/workflows/powers/frontend-design/POWER.md +163 -362
  140. package/workflows/powers/frontend-design/SKILL.md +163 -362
  141. package/workflows/powers/game-development/POWER.md +57 -140
  142. package/workflows/powers/game-development/SKILL.md +57 -140
  143. package/workflows/powers/geo-fundamentals/POWER.md +64 -126
  144. package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
  145. package/workflows/powers/git-workflow/POWER.md +135 -0
  146. package/workflows/powers/git-workflow/SKILL.md +132 -0
  147. package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
  148. package/workflows/powers/golang-pro/POWER.md +46 -35
  149. package/workflows/powers/golang-pro/SKILL.md +46 -35
  150. package/workflows/powers/graphql-architect/POWER.md +44 -62
  151. package/workflows/powers/graphql-architect/SKILL.md +44 -62
  152. package/workflows/powers/i18n-localization/POWER.md +118 -103
  153. package/workflows/powers/i18n-localization/SKILL.md +118 -103
  154. package/workflows/powers/java-pro/POWER.md +47 -22
  155. package/workflows/powers/java-pro/SKILL.md +47 -22
  156. package/workflows/powers/javascript-pro/POWER.md +47 -34
  157. package/workflows/powers/javascript-pro/SKILL.md +47 -34
  158. package/workflows/powers/kotlin-pro/POWER.md +46 -23
  159. package/workflows/powers/kotlin-pro/SKILL.md +46 -23
  160. package/workflows/powers/legacy-modernizer/POWER.md +43 -60
  161. package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
  162. package/workflows/powers/mcp-builder/POWER.md +65 -0
  163. package/workflows/powers/mcp-builder/SKILL.md +62 -0
  164. package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
  165. package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
  166. package/workflows/powers/microservices-architect/POWER.md +43 -70
  167. package/workflows/powers/microservices-architect/SKILL.md +43 -70
  168. package/workflows/powers/mobile-design/POWER.md +110 -345
  169. package/workflows/powers/mobile-design/SKILL.md +110 -345
  170. package/workflows/powers/mongodb/POWER.md +67 -0
  171. package/workflows/powers/mongodb/SKILL.md +64 -0
  172. package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
  173. package/workflows/powers/mysql/POWER.md +67 -0
  174. package/workflows/powers/mysql/SKILL.md +64 -0
  175. package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
  176. package/workflows/powers/neki/POWER.md +67 -0
  177. package/workflows/powers/neki/SKILL.md +64 -0
  178. package/workflows/powers/neki/references/neki-checklist.md +18 -0
  179. package/workflows/powers/nestjs-expert/POWER.md +45 -91
  180. package/workflows/powers/nestjs-expert/SKILL.md +45 -91
  181. package/workflows/powers/nextjs-developer/POWER.md +51 -44
  182. package/workflows/powers/nextjs-developer/SKILL.md +51 -44
  183. package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
  184. package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
  185. package/workflows/powers/observability/POWER.md +109 -0
  186. package/workflows/powers/observability/SKILL.md +106 -0
  187. package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
  188. package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
  189. package/workflows/powers/openai-docs/POWER.md +61 -0
  190. package/workflows/powers/openai-docs/SKILL.md +58 -0
  191. package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
  192. package/workflows/powers/performance-profiling/POWER.md +61 -114
  193. package/workflows/powers/performance-profiling/SKILL.md +61 -114
  194. package/workflows/powers/php-pro/POWER.md +116 -0
  195. package/workflows/powers/php-pro/SKILL.md +113 -0
  196. package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
  197. package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
  198. package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
  199. package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
  200. package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
  201. package/workflows/powers/playwright-e2e/POWER.md +85 -0
  202. package/workflows/powers/playwright-e2e/SKILL.md +82 -0
  203. package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
  204. package/workflows/powers/postgres/POWER.md +67 -0
  205. package/workflows/powers/postgres/SKILL.md +64 -0
  206. package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
  207. package/workflows/powers/prompt-engineer/POWER.md +47 -30
  208. package/workflows/powers/prompt-engineer/SKILL.md +47 -30
  209. package/workflows/powers/python-pro/POWER.md +47 -36
  210. package/workflows/powers/python-pro/SKILL.md +47 -36
  211. package/workflows/powers/react-best-practices/POWER.md +56 -33
  212. package/workflows/powers/react-best-practices/SKILL.md +56 -33
  213. package/workflows/powers/react-expert/POWER.md +47 -37
  214. package/workflows/powers/react-expert/SKILL.md +47 -37
  215. package/workflows/powers/redis/POWER.md +67 -0
  216. package/workflows/powers/redis/SKILL.md +64 -0
  217. package/workflows/powers/redis/references/redis-checklist.md +19 -0
  218. package/workflows/powers/ruby-pro/POWER.md +118 -0
  219. package/workflows/powers/ruby-pro/SKILL.md +115 -0
  220. package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
  221. package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
  222. package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
  223. package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
  224. package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
  225. package/workflows/powers/rust-pro/POWER.md +45 -31
  226. package/workflows/powers/rust-pro/SKILL.md +45 -31
  227. package/workflows/powers/security-engineer/POWER.md +129 -0
  228. package/workflows/powers/security-engineer/SKILL.md +126 -0
  229. package/workflows/powers/seo-fundamentals/POWER.md +59 -102
  230. package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
  231. package/workflows/powers/serverless-patterns/POWER.md +171 -0
  232. package/workflows/powers/serverless-patterns/SKILL.md +168 -0
  233. package/workflows/powers/skill-creator/POWER.md +90 -0
  234. package/workflows/powers/skill-creator/SKILL.md +87 -0
  235. package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
  236. package/workflows/powers/skill-creator/references/schemas.md +430 -0
  237. package/workflows/powers/spec-miner/POWER.md +49 -57
  238. package/workflows/powers/spec-miner/SKILL.md +49 -57
  239. package/workflows/powers/sqlite/POWER.md +67 -0
  240. package/workflows/powers/sqlite/SKILL.md +64 -0
  241. package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
  242. package/workflows/powers/sre-engineer/POWER.md +123 -64
  243. package/workflows/powers/sre-engineer/SKILL.md +123 -64
  244. package/workflows/powers/static-analysis/POWER.md +121 -77
  245. package/workflows/powers/static-analysis/SKILL.md +121 -77
  246. package/workflows/powers/stripe-best-practices/POWER.md +140 -17
  247. package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
  248. package/workflows/powers/supabase/POWER.md +67 -0
  249. package/workflows/powers/supabase/SKILL.md +64 -0
  250. package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
  251. package/workflows/powers/swift-pro/POWER.md +118 -0
  252. package/workflows/powers/swift-pro/SKILL.md +115 -0
  253. package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
  254. package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
  255. package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
  256. package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
  257. package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
  258. package/workflows/powers/tailwind-patterns/POWER.md +71 -240
  259. package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
  260. package/workflows/powers/testing-patterns/POWER.md +155 -10
  261. package/workflows/powers/testing-patterns/SKILL.md +155 -10
  262. package/workflows/powers/typescript-pro/POWER.md +47 -38
  263. package/workflows/powers/typescript-pro/SKILL.md +47 -38
  264. package/workflows/powers/vitess/POWER.md +67 -0
  265. package/workflows/powers/vitess/SKILL.md +64 -0
  266. package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
  267. package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
  268. package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
  269. package/workflows/powers/web-perf/POWER.md +43 -170
  270. package/workflows/powers/web-perf/SKILL.md +43 -170
  271. package/workflows/powers/webapp-testing/POWER.md +43 -164
  272. package/workflows/powers/webapp-testing/SKILL.md +43 -164
  273. package/workflows/skills/agent-design/SKILL.md +198 -0
  274. package/workflows/skills/agent-design/references/clarification-patterns.md +153 -0
  275. package/workflows/skills/agent-design/references/skill-testing.md +164 -0
  276. package/workflows/skills/agent-design/references/workflow-patterns.md +226 -0
  277. package/workflows/skills/deep-research/SKILL.md +25 -20
  278. package/workflows/skills/deep-research/references/multi-round-research-loop.md +73 -8
  279. package/workflows/skills/frontend-design/SKILL.md +37 -32
  280. package/workflows/skills/frontend-design/commands/brand.md +167 -0
  281. package/workflows/skills/frontend-design/references/brand-presets.md +228 -0
  282. package/workflows/skills/generated/skill-audit.json +11 -2
  283. package/workflows/skills/generated/skill-catalog.json +37 -5
  284. package/workflows/skills/skills_index.json +1 -1
  285. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/SKILL.md +198 -0
  286. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/references/clarification-patterns.md +153 -0
  287. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/references/skill-testing.md +164 -0
  288. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/references/workflow-patterns.md +226 -0
  289. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/SKILL.md +25 -20
  290. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/references/multi-round-research-loop.md +73 -8
  291. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/SKILL.md +37 -32
  292. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/commands/brand.md +167 -0
  293. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/references/brand-presets.md +228 -0
  294. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/skills_index.json +1 -1
  295. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/SKILL.md +197 -0
  296. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/references/clarification-patterns.md +153 -0
  297. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/references/skill-testing.md +164 -0
  298. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/references/workflow-patterns.md +226 -0
  299. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/SKILL.md +25 -20
  300. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/references/multi-round-research-loop.md +73 -8
  301. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/SKILL.md +37 -32
  302. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/commands/brand.md +167 -0
  303. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/references/brand-presets.md +228 -0
  304. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skills_index.json +1 -1
@@ -7,6 +7,7 @@ allowed-tools: Read, Glob, Grep
7
7
  # Behavioral Modes - Adaptive AI Operating Modes
8
8
 
9
9
  ## Purpose
10
+
10
11
  This skill defines distinct behavioral modes that optimize AI performance for specific tasks. Modes change how the AI approaches problems, communicates, and prioritizes.
11
12
 
12
13
  ---
@@ -18,6 +19,7 @@ This skill defines distinct behavioral modes that optimize AI performance for sp
18
19
  **When to use:** Early project planning, feature ideation, architecture decisions
19
20
 
20
21
  **Behavior:**
22
+
21
23
  - Ask clarifying questions before assumptions
22
24
  - Offer multiple alternatives (at least 3)
23
25
  - Think divergently - explore unconventional solutions
@@ -25,6 +27,7 @@ This skill defines distinct behavioral modes that optimize AI performance for sp
25
27
  - Use visual diagrams (mermaid) to explain concepts
26
28
 
27
29
  **Output style:**
30
+
28
31
  ```
29
32
  "Let's explore this together. Here are some approaches:
30
33
 
@@ -46,6 +49,7 @@ What resonates with you? Or should we explore a different direction?"
46
49
  **When to use:** Writing code, building features, executing plans
47
50
 
48
51
  **Behavior:**
52
+
49
53
  - **CRITICAL: Use `clean-code` skill standards** - concise, direct, no verbose explanations
50
54
  - Fast execution - minimize questions
51
55
  - Use established patterns and best practices
@@ -57,6 +61,7 @@ What resonates with you? Or should we explore a different direction?"
57
61
  - **NO RUSHING** - Quality > Speed. Read ALL references before coding.
58
62
 
59
63
  **Output style:**
64
+
60
65
  ```
61
66
  [Code block]
62
67
 
@@ -64,6 +69,7 @@ What resonates with you? Or should we explore a different direction?"
64
69
  ```
65
70
 
66
71
  **NOT:**
72
+
67
73
  ```
68
74
  "Building [feature]...
69
75
 
@@ -83,6 +89,7 @@ Run `npm run dev` to test."
83
89
  **When to use:** Fixing bugs, troubleshooting errors, investigating issues
84
90
 
85
91
  **Behavior:**
92
+
86
93
  - Ask for error messages and reproduction steps
87
94
  - Think systematically - check logs, trace data flow
88
95
  - Form hypothesis → test → verify
@@ -90,6 +97,7 @@ Run `npm run dev` to test."
90
97
  - Prevent future occurrences
91
98
 
92
99
  **Output style:**
100
+
93
101
  ```
94
102
  "Investigating...
95
103
 
@@ -106,6 +114,7 @@ Run `npm run dev` to test."
106
114
  **When to use:** Code review, architecture review, security audit
107
115
 
108
116
  **Behavior:**
117
+
109
118
  - Be thorough but constructive
110
119
  - Categorize by severity (Critical/High/Medium/Low)
111
120
  - Explain the "why" behind suggestions
@@ -113,6 +122,7 @@ Run `npm run dev` to test."
113
122
  - Acknowledge what's done well
114
123
 
115
124
  **Output style:**
125
+
116
126
  ```
117
127
  ## Code Review: [file/feature]
118
128
 
@@ -133,6 +143,7 @@ Run `npm run dev` to test."
133
143
  **When to use:** Explaining concepts, documentation, onboarding
134
144
 
135
145
  **Behavior:**
146
+
136
147
  - Explain from fundamentals
137
148
  - Use analogies and examples
138
149
  - Progress from simple to complex
@@ -140,6 +151,7 @@ Run `npm run dev` to test."
140
151
  - Check understanding
141
152
 
142
153
  **Output style:**
154
+
143
155
  ```
144
156
  ## Understanding [Concept]
145
157
 
@@ -163,6 +175,7 @@ Run `npm run dev` to test."
163
175
  **When to use:** Production deployment, final polish, release preparation
164
176
 
165
177
  **Behavior:**
178
+
166
179
  - Focus on stability over features
167
180
  - Check for missing error handling
168
181
  - Verify environment configs
@@ -170,6 +183,7 @@ Run `npm run dev` to test."
170
183
  - Create deployment checklist
171
184
 
172
185
  **Output style:**
186
+
173
187
  ```
174
188
  ## Pre-Ship Checklist
175
189
 
@@ -195,35 +209,111 @@ Run `npm run dev` to test."
195
209
 
196
210
  The AI should automatically detect the appropriate mode based on:
197
211
 
198
- | Trigger | Mode |
199
- |---------|------|
200
- | "what if", "ideas", "options" | BRAINSTORM |
201
- | "build", "create", "add" | IMPLEMENT |
202
- | "not working", "error", "bug" | DEBUG |
203
- | "review", "check", "audit" | REVIEW |
204
- | "explain", "how does", "learn" | TEACH |
205
- | "deploy", "release", "production" | SHIP |
212
+ | Trigger | Mode |
213
+ | ---------------------------------------------- | ------------------- |
214
+ | "what if", "ideas", "options" | BRAINSTORM |
215
+ | "build", "create", "add" | IMPLEMENT |
216
+ | "not working", "error", "bug" | DEBUG |
217
+ | "review", "check", "audit" | REVIEW |
218
+ | "explain", "how does", "learn" | TEACH |
219
+ | "deploy", "release", "production" | SHIP |
220
+ | "iterate", "refine quality", "not good enough" | EVALUATOR-OPTIMIZER |
221
+
222
+ ---
223
+
224
+ ## Workflow Patterns
225
+
226
+ Three patterns govern how modes combine across multiple agents or steps. Use the simplest pattern that solves the problem — add complexity only when it measurably improves results.
227
+
228
+ ### 1. Sequential (default)
229
+
230
+ Use when tasks have dependencies — each step needs the previous step's output.
231
+
232
+ ```
233
+ [BRAINSTORM] → [IMPLEMENT] → [REVIEW] → [SHIP]
234
+ ```
235
+
236
+ Best for: multi-stage features, draft-review-polish cycles, data pipelines.
237
+
238
+ ### 2. Parallel
239
+
240
+ Use when tasks are independent and doing them one at a time is too slow.
241
+
242
+ ```
243
+ [security REVIEW + performance REVIEW + quality REVIEW] → synthesize
244
+ ```
245
+
246
+ Best for: code review across multiple dimensions, parallel analysis. Requires a clear aggregation strategy before starting.
247
+
248
+ ### 3. Evaluator-Optimizer (new)
249
+
250
+ Use when first-draft quality consistently falls short and quality is measurable.
251
+
252
+ ```
253
+ [IMPLEMENT] → [REVIEW with criteria] → pass? → done
254
+ ↓ fail
255
+ feedback → [IMPLEMENT again]
256
+ ```
257
+
258
+ **When to use:**
259
+
260
+ - Technical docs, customer communications, SQL queries against specific standards
261
+ - Any output where the gap between first attempt and required quality is significant
262
+ - When you have clear, checkable criteria (not just "make it better")
263
+
264
+ **When NOT to use:**
265
+
266
+ - First-attempt quality is already acceptable
267
+ - Criteria are too subjective for consistent AI evaluation
268
+ - Real-time use cases needing immediate responses
269
+ - Deterministic validators exist (linters, schema validators) — use those instead
270
+
271
+ **Implementation:**
272
+
273
+ ```
274
+ ## Generator
275
+ Task: [what to create]
276
+ Constraints: [specific, measurable requirements — these become eval criteria]
277
+
278
+ ## Evaluator
279
+ Criteria:
280
+ 1. [Criterion A] — Pass/Fail + specific failure note
281
+ 2. [Criterion B] — Pass/Fail + specific failure note
282
+
283
+ Output JSON: { "pass": bool, "failures": ["..."], "revision_note": "..." }
284
+
285
+ Max iterations: 3 ← always set a ceiling
286
+ Stop when: all criteria pass OR max iterations reached
287
+ ```
206
288
 
207
289
  ---
208
290
 
209
- ## Multi-Agent Collaboration Patterns (2025)
291
+ ## Multi-Agent Collaboration Patterns
210
292
 
211
293
  Modern architectures optimized for agent-to-agent collaboration:
212
294
 
213
295
  ### 1. 🔭 EXPLORE Mode
296
+
214
297
  **Role:** Discovery and Analysis (Explorer Agent)
215
298
  **Behavior:** Socratic questioning, deep-dive code reading, dependency mapping.
216
299
  **Output:** `discovery-report.json`, architectural visualization.
217
300
 
218
301
  ### 2. 🗺️ PLAN-EXECUTE-CRITIC (PEC)
302
+
219
303
  Cyclic mode transitions for high-complexity tasks:
304
+
220
305
  1. **Planner:** Decomposes the task into atomic steps (`task.md`).
221
306
  2. **Executor:** Performs the actual coding (`IMPLEMENT`).
222
307
  3. **Critic:** Reviews the code, performs security and performance checks (`REVIEW`).
223
308
 
224
309
  ### 3. 🧠 MENTAL MODEL SYNC
310
+
225
311
  Behavior for creating and loading "Mental Model" summaries to preserve context between sessions.
226
312
 
313
+ ### 4. 🔄 EVALUATOR-OPTIMIZER
314
+
315
+ Paired agents in an iterative quality loop: Generator produces, Evaluator scores against criteria, Generator refines. Set max iteration ceiling before starting.
316
+
227
317
  ---
228
318
 
229
319
  ## Combining Modes
@@ -239,4 +329,5 @@ Users can explicitly request a mode:
239
329
  /implement the user profile page
240
330
  /debug why login fails
241
331
  /review this pull request
332
+ /iterate [target quality bar] ← triggers evaluator-optimizer
242
333
  ```
@@ -0,0 +1,105 @@
1
+ ````markdown
2
+ ---
3
+ inclusion: manual
4
+ name: c-pro
5
+ description: "Use for modern C23-era systems and embedded engineering with memory safety discipline, build reproducibility, and low-level debugging awareness."
6
+ license: MIT
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "2.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot
11
+ ---
12
+
13
+ # C Pro
14
+
15
+ ## Purpose
16
+
17
+ Use for modern C23-era systems and embedded engineering with memory safety discipline, build reproducibility, and low-level debugging awareness.
18
+
19
+ ## When to Use
20
+
21
+ - Writing or refactoring C systems, embedded, or low-level runtime code.
22
+ - Tightening memory ownership, ABI boundaries, and build hygiene.
23
+ - Debugging undefined behavior, portability, or toolchain-sensitive code.
24
+
25
+ ## Instructions
26
+
27
+ 1. Confirm platform, compiler, and ABI constraints before writing code.
28
+ 2. Make ownership, lifetime, and error handling explicit at every interface.
29
+ 3. Prefer simple control flow over macro-heavy indirection.
30
+ 4. Validate assumptions with warnings, sanitizers, or focused repros.
31
+ 5. Keep portability and deterministic builds in view throughout the change.
32
+
33
+ ### Baseline standards
34
+
35
+ - Compile with `-Wall -Wextra -Werror` (or equivalent) in CI. Treat warnings as defects.
36
+ - Enable sanitizers (`-fsanitize=address,undefined`) in debug and test builds.
37
+ - Use `static` for file-scoped functions and variables. Minimize public symbols.
38
+ - Declare `const` by default. Mutable state must be justified.
39
+ - Keep headers self-contained: every `.h` must compile on its own.
40
+ - Prefer fixed-width integers (`uint32_t`, `int64_t`) over bare `int` for data structures and protocols.
41
+
42
+ ### Memory safety discipline
43
+
44
+ - Every allocation must have a single, clear owner and a documented free path.
45
+ - Prefer stack allocation and arena allocators over scattered `malloc`/`free`.
46
+ - Initialize all variables at declaration. Never rely on implicit zero-initialization.
47
+ - Bounds-check array and buffer access at trust boundaries (user input, file I/O, network).
48
+ - Use `memset`/`memcpy` with explicit size — never assume buffer sizes from context.
49
+ - After `free`, set pointer to `NULL` to catch use-after-free during debugging.
50
+
51
+ ### Build reproducibility
52
+
53
+ - Pin compiler version and flags in the build system. Builds must produce identical output across machines.
54
+ - Prefer CMake, Meson, or a Makefile with explicit dependency tracking over ad-hoc scripts.
55
+ - Declare all external dependencies with exact versions. Avoid system-installed headers for portable projects.
56
+ - Run CI on at least two compilers (GCC + Clang) and two platforms where applicable.
57
+ - Enable Link-Time Optimization (LTO) for release builds but verify correctness with sanitizers first.
58
+
59
+ ### Debugging and diagnostics
60
+
61
+ - Compile debug builds with `-g -O0` for accurate stack traces and variable inspection.
62
+ - Use AddressSanitizer for memory errors, UndefinedBehaviorSanitizer for UB, and ThreadSanitizer for data races.
63
+ - Add `assert()` for invariants that must never be violated — strip in release builds.
64
+ - Prefer structured error codes with context over errno alone. Return error structs from functions that can fail.
65
+ - When debugging crashes: reproduce with sanitizers first, then gdb/lldb with watchpoints.
66
+
67
+ ### Performance
68
+
69
+ - Profile with `perf`, `Instruments`, or `gprof` before micro-optimizing. Measure, don't guess.
70
+ - Prefer cache-friendly data layouts (arrays of structs vs. structs of arrays depending on access pattern).
71
+ - Minimize heap allocations in hot paths. Pre-allocate where the upper bound is known.
72
+ - Avoid premature inline — let the compiler decide, then verify with benchmarks.
73
+
74
+ ### Constraints
75
+
76
+ - Avoid `void*` casts without size tracking — type-unsafe and bug-prone.
77
+ - Avoid variable-length arrays (VLAs) in production code — stack overflow risk.
78
+ - Avoid macro-heavy logic that hides control flow (`goto` cleanup patterns are acceptable when simple).
79
+ - Avoid ignoring compiler warnings — every warning is a potential bug.
80
+ - Avoid global mutable state without synchronization.
81
+ - Avoid relying on implementation-defined or undefined behavior for correctness.
82
+
83
+ ## Output Format
84
+
85
+ Provide implementation guidance, code examples, and configuration as appropriate to the task.
86
+
87
+ ## References
88
+
89
+ | File | Load when |
90
+ | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
91
+ | `references/memory-safety-and-build-checklist.md` | Memory ownership patterns, sanitizer configuration, build system hygiene, or ABI boundary review is needed. |
92
+ | `references/common-ub-and-portability.md` | Undefined behavior patterns, implementation-defined traps, or cross-platform portability decisions are needed. |
93
+ | `references/build-systems-and-toolchains.md` | CMake/Meson setup, cross-compilation, CI matrix configuration, or toolchain pinning is needed. |
94
+ | `references/posix-and-platform-apis.md` | POSIX system calls, file I/O, signal handling, or platform abstraction layer design is needed. |
95
+ | `references/debugging-with-sanitizers.md` | AddressSanitizer, UBSan, ThreadSanitizer configuration, or crash diagnosis workflow is needed. |
96
+
97
+ ## Scripts
98
+
99
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
100
+
101
+ ## Examples
102
+
103
+ - "Help me with c pro best practices in this project"
104
+ - "Review my c pro implementation for issues"
105
+ ````
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: c-pro
3
+ description: "Use for modern C23-era systems and embedded engineering with memory safety discipline, build reproducibility, and low-level debugging awareness."
4
+ license: MIT
5
+ metadata:
6
+ author: cubis-foundry
7
+ version: "2.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot
9
+ ---
10
+
11
+ # C Pro
12
+
13
+ ## Purpose
14
+
15
+ Use for modern C23-era systems and embedded engineering with memory safety discipline, build reproducibility, and low-level debugging awareness.
16
+
17
+ ## When to Use
18
+
19
+ - Writing or refactoring C systems, embedded, or low-level runtime code.
20
+ - Tightening memory ownership, ABI boundaries, and build hygiene.
21
+ - Debugging undefined behavior, portability, or toolchain-sensitive code.
22
+
23
+ ## Instructions
24
+
25
+ 1. Confirm platform, compiler, and ABI constraints before writing code.
26
+ 2. Make ownership, lifetime, and error handling explicit at every interface.
27
+ 3. Prefer simple control flow over macro-heavy indirection.
28
+ 4. Validate assumptions with warnings, sanitizers, or focused repros.
29
+ 5. Keep portability and deterministic builds in view throughout the change.
30
+
31
+ ### Baseline standards
32
+
33
+ - Compile with `-Wall -Wextra -Werror` (or equivalent) in CI. Treat warnings as defects.
34
+ - Enable sanitizers (`-fsanitize=address,undefined`) in debug and test builds.
35
+ - Use `static` for file-scoped functions and variables. Minimize public symbols.
36
+ - Declare `const` by default. Mutable state must be justified.
37
+ - Keep headers self-contained: every `.h` must compile on its own.
38
+ - Prefer fixed-width integers (`uint32_t`, `int64_t`) over bare `int` for data structures and protocols.
39
+
40
+ ### Memory safety discipline
41
+
42
+ - Every allocation must have a single, clear owner and a documented free path.
43
+ - Prefer stack allocation and arena allocators over scattered `malloc`/`free`.
44
+ - Initialize all variables at declaration. Never rely on implicit zero-initialization.
45
+ - Bounds-check array and buffer access at trust boundaries (user input, file I/O, network).
46
+ - Use `memset`/`memcpy` with explicit size — never assume buffer sizes from context.
47
+ - After `free`, set pointer to `NULL` to catch use-after-free during debugging.
48
+
49
+ ### Build reproducibility
50
+
51
+ - Pin compiler version and flags in the build system. Builds must produce identical output across machines.
52
+ - Prefer CMake, Meson, or a Makefile with explicit dependency tracking over ad-hoc scripts.
53
+ - Declare all external dependencies with exact versions. Avoid system-installed headers for portable projects.
54
+ - Run CI on at least two compilers (GCC + Clang) and two platforms where applicable.
55
+ - Enable Link-Time Optimization (LTO) for release builds but verify correctness with sanitizers first.
56
+
57
+ ### Debugging and diagnostics
58
+
59
+ - Compile debug builds with `-g -O0` for accurate stack traces and variable inspection.
60
+ - Use AddressSanitizer for memory errors, UndefinedBehaviorSanitizer for UB, and ThreadSanitizer for data races.
61
+ - Add `assert()` for invariants that must never be violated — strip in release builds.
62
+ - Prefer structured error codes with context over errno alone. Return error structs from functions that can fail.
63
+ - When debugging crashes: reproduce with sanitizers first, then gdb/lldb with watchpoints.
64
+
65
+ ### Performance
66
+
67
+ - Profile with `perf`, `Instruments`, or `gprof` before micro-optimizing. Measure, don't guess.
68
+ - Prefer cache-friendly data layouts (arrays of structs vs. structs of arrays depending on access pattern).
69
+ - Minimize heap allocations in hot paths. Pre-allocate where the upper bound is known.
70
+ - Avoid premature inline — let the compiler decide, then verify with benchmarks.
71
+
72
+ ### Constraints
73
+
74
+ - Avoid `void*` casts without size tracking — type-unsafe and bug-prone.
75
+ - Avoid variable-length arrays (VLAs) in production code — stack overflow risk.
76
+ - Avoid macro-heavy logic that hides control flow (`goto` cleanup patterns are acceptable when simple).
77
+ - Avoid ignoring compiler warnings — every warning is a potential bug.
78
+ - Avoid global mutable state without synchronization.
79
+ - Avoid relying on implementation-defined or undefined behavior for correctness.
80
+
81
+ ## Output Format
82
+
83
+ Provide implementation guidance, code examples, and configuration as appropriate to the task.
84
+
85
+ ## References
86
+
87
+ | File | Load when |
88
+ | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
89
+ | `references/memory-safety-and-build-checklist.md` | Memory ownership patterns, sanitizer configuration, build system hygiene, or ABI boundary review is needed. |
90
+ | `references/common-ub-and-portability.md` | Undefined behavior patterns, implementation-defined traps, or cross-platform portability decisions are needed. |
91
+ | `references/build-systems-and-toolchains.md` | CMake/Meson setup, cross-compilation, CI matrix configuration, or toolchain pinning is needed. |
92
+ | `references/posix-and-platform-apis.md` | POSIX system calls, file I/O, signal handling, or platform abstraction layer design is needed. |
93
+ | `references/debugging-with-sanitizers.md` | AddressSanitizer, UBSan, ThreadSanitizer configuration, or crash diagnosis workflow is needed. |
94
+
95
+ ## Scripts
96
+
97
+ No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
98
+
99
+ ## Examples
100
+
101
+ - "Help me with c pro best practices in this project"
102
+ - "Review my c pro implementation for issues"
@@ -0,0 +1,148 @@
1
+ # Build Systems and Toolchains
2
+
3
+ ## CMake Modern Practices
4
+
5
+ ```cmake
6
+ # CMakeLists.txt — modern CMake (3.21+)
7
+ cmake_minimum_required(VERSION 3.21)
8
+ project(mylib VERSION 1.0.0 LANGUAGES C)
9
+
10
+ # Set C standard project-wide
11
+ set(CMAKE_C_STANDARD 23)
12
+ set(CMAKE_C_STANDARD_REQUIRED ON)
13
+ set(CMAKE_C_EXTENSIONS OFF) # disable GNU extensions for portability
14
+
15
+ # Library target
16
+ add_library(mylib
17
+ src/core.c
18
+ src/parser.c
19
+ src/util.c
20
+ )
21
+
22
+ target_include_directories(mylib
23
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
24
+ PRIVATE src/
25
+ )
26
+
27
+ # Compiler warnings as errors
28
+ target_compile_options(mylib PRIVATE
29
+ $<$<C_COMPILER_ID:GNU,Clang>:-Wall -Wextra -Wpedantic -Werror>
30
+ $<$<C_COMPILER_ID:MSVC>:/W4 /WX>
31
+ )
32
+
33
+ # Sanitizers for debug builds
34
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
35
+ target_compile_options(mylib PRIVATE -fsanitize=address,undefined -fno-omit-frame-pointer)
36
+ target_link_options(mylib PRIVATE -fsanitize=address,undefined)
37
+ endif()
38
+
39
+ # Tests
40
+ enable_testing()
41
+ add_executable(test_core tests/test_core.c)
42
+ target_link_libraries(test_core PRIVATE mylib)
43
+ add_test(NAME test_core COMMAND test_core)
44
+
45
+ # Install rules
46
+ install(TARGETS mylib EXPORT mylibTargets)
47
+ install(DIRECTORY include/ DESTINATION include)
48
+ ```
49
+
50
+ ## Meson Build System
51
+
52
+ ```meson
53
+ # meson.build — lightweight alternative to CMake
54
+ project('mylib', 'c',
55
+ version: '1.0.0',
56
+ default_options: ['c_std=c23', 'warning_level=3', 'werror=true']
57
+ )
58
+
59
+ src = files('src/core.c', 'src/parser.c', 'src/util.c')
60
+ inc = include_directories('include')
61
+
62
+ mylib = library('mylib', src, include_directories: inc)
63
+ mylib_dep = declare_dependency(link_with: mylib, include_directories: inc)
64
+
65
+ # Tests
66
+ test_core = executable('test_core', 'tests/test_core.c', dependencies: mylib_dep)
67
+ test('core', test_core)
68
+ ```
69
+
70
+ ## Cross-Compilation
71
+
72
+ ```cmake
73
+ # toolchain-arm.cmake — cross-compile for ARM
74
+ set(CMAKE_SYSTEM_NAME Linux)
75
+ set(CMAKE_SYSTEM_PROCESSOR arm)
76
+
77
+ set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
78
+ set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
79
+
80
+ set(CMAKE_FIND_ROOT_PATH /usr/arm-linux-gnueabihf)
81
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
82
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
83
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
84
+ ```
85
+
86
+ ```bash
87
+ # Build with cross-compilation toolchain
88
+ cmake -B build-arm -DCMAKE_TOOLCHAIN_FILE=toolchain-arm.cmake
89
+ cmake --build build-arm
90
+ ```
91
+
92
+ ## CI Matrix Configuration
93
+
94
+ ```yaml
95
+ # GitHub Actions — multi-compiler, multi-platform
96
+ jobs:
97
+ build:
98
+ strategy:
99
+ matrix:
100
+ os: [ubuntu-latest, macos-latest]
101
+ compiler: [gcc-13, clang-17]
102
+ runs-on: ${{ matrix.os }}
103
+ steps:
104
+ - uses: actions/checkout@v4
105
+ - name: Configure
106
+ run: |
107
+ cmake -B build \
108
+ -DCMAKE_C_COMPILER=${{ matrix.compiler }} \
109
+ -DCMAKE_BUILD_TYPE=Debug
110
+ - name: Build
111
+ run: cmake --build build
112
+ - name: Test
113
+ run: ctest --test-dir build --output-on-failure
114
+ - name: Sanitizer build
115
+ run: |
116
+ cmake -B build-san \
117
+ -DCMAKE_C_COMPILER=${{ matrix.compiler }} \
118
+ -DCMAKE_BUILD_TYPE=Debug \
119
+ -DENABLE_SANITIZERS=ON
120
+ cmake --build build-san
121
+ ctest --test-dir build-san
122
+ ```
123
+
124
+ ## Dependency Management
125
+
126
+ ```cmake
127
+ # FetchContent for pinned dependencies
128
+ include(FetchContent)
129
+
130
+ FetchContent_Declare(cjson
131
+ GIT_REPOSITORY https://github.com/DaveGamble/cJSON.git
132
+ GIT_TAG v1.7.17 # pin exact version
133
+ )
134
+ FetchContent_MakeAvailable(cjson)
135
+ target_link_libraries(mylib PRIVATE cjson)
136
+
137
+ # vcpkg for larger dependency sets
138
+ # Install: cmake -B build -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
139
+ ```
140
+
141
+ ## Reproducible Builds Checklist
142
+
143
+ 1. Pin compiler version in CI (e.g., `gcc-13`, not `gcc`).
144
+ 2. Pin all external dependencies to exact versions or commit hashes.
145
+ 3. Use deterministic build flags (`-frandom-seed=`, `-ffile-prefix-map=`).
146
+ 4. Commit `CMakePresets.json` or equivalent for consistent local/CI builds.
147
+ 5. Disable compiler plugins and extensions that vary by environment.
148
+ 6. Verify with two independent builds and `diffoscope` or binary hash comparison.