@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,87 +1,146 @@
1
1
  ---
2
2
  name: sre-engineer
3
- description: Use when defining SLIs/SLOs, managing error budgets, or building reliable systems at scale. Invoke for incident management, chaos engineering, toil reduction, capacity planning.
4
- license: MIT
3
+ description: Apply site reliability engineering practices including SLOs, error budgets, capacity planning, chaos engineering, and incident management for production systems.
4
+ license: Apache-2.0
5
5
  metadata:
6
- author: https://github.com/Jeffallan
7
- version: "1.0.0"
8
- domain: devops
9
- triggers: SRE, site reliability, SLO, SLI, error budget, incident management, chaos engineering, toil reduction, on-call, MTTR
10
- role: specialist
11
- scope: implementation
12
- output-format: code
13
- related-skills: devops-engineer, cloud-architect, kubernetes-specialist
6
+ author: cubis-foundry
7
+ version: "3.0"
8
+ compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
14
9
  ---
15
10
 
16
11
  # SRE Engineer
17
12
 
18
- Senior Site Reliability Engineer with expertise in building highly reliable, scalable systems through SLI/SLO management, error budgets, capacity planning, and automation.
13
+ ## Purpose
19
14
 
20
- ## Role Definition
15
+ Apply Site Reliability Engineering practices to build and maintain reliable production systems. Define service level objectives, manage error budgets, plan capacity, and establish operational excellence.
21
16
 
22
- You are a senior SRE with 10+ years of experience building and maintaining production systems at scale. You specialize in defining meaningful SLOs, managing error budgets, reducing toil through automation, and building resilient systems. Your focus is on sustainable reliability that enables feature velocity.
17
+ ## When to Use
23
18
 
24
- ## When to Use This Skill
19
+ - Defining SLOs, SLIs, and SLAs for a new or existing service
20
+ - Managing error budgets and reliability trade-offs
21
+ - Capacity planning and scaling decisions
22
+ - Designing for graceful degradation and resilience
23
+ - Conducting chaos engineering experiments
24
+ - Building on-call procedures and runbooks
25
+ - Postmortem analysis and reliability improvements
25
26
 
26
- - Defining SLIs/SLOs and error budgets
27
- - Implementing reliability monitoring and alerting
28
- - Reducing operational toil through automation
29
- - Designing chaos engineering experiments
30
- - Managing incidents and postmortems
31
- - Building capacity planning models
32
- - Establishing on-call practices
27
+ ## Instructions
33
28
 
34
- ## Core Workflow
29
+ ### Step 1 — Define Service Level Indicators (SLIs)
35
30
 
36
- 1. **Assess reliability** - Review architecture, SLOs, incidents, toil levels
37
- 2. **Define SLOs** - Identify meaningful SLIs and set appropriate targets
38
- 3. **Implement monitoring** - Build golden signal dashboards and alerting
39
- 4. **Automate toil** - Identify repetitive tasks and build automation
40
- 5. **Test resilience** - Design and execute chaos experiments
31
+ SLIs are the metrics that matter to users:
41
32
 
42
- ## Reference Guide
33
+ | SLI Category | Measures | Example |
34
+ | ------------ | ------------------------------- | ---------------------------------------- |
35
+ | Availability | System is accepting requests | Successful requests / total requests |
36
+ | Latency | Response time for good requests | p99 < 300ms |
37
+ | Throughput | System handles expected load | Requests/sec at peak without degradation |
38
+ | Correctness | Responses are accurate | Successful data validations / total |
39
+ | Freshness | Data is up to date | Time since last successful sync < 1 min |
43
40
 
44
- Load detailed guidance based on context:
41
+ **Choose 3–5 SLIs per service** — too many dilutes focus.
45
42
 
46
- | Topic | Reference | Load When |
47
- |-------|-----------|-----------|
48
- | SLO/SLI | `references/slo-sli-management.md` | Defining SLOs, calculating error budgets |
49
- | Error Budgets | `references/error-budget-policy.md` | Managing budgets, burn rates, policies |
50
- | Monitoring | `references/monitoring-alerting.md` | Golden signals, alert design, dashboards |
51
- | Automation | `references/automation-toil.md` | Toil reduction, automation patterns |
52
- | Incidents | `references/incident-chaos.md` | Incident response, chaos engineering |
43
+ ### Step 2 Set Service Level Objectives (SLOs)
53
44
 
54
- ## Constraints
45
+ SLOs are targets for SLIs:
55
46
 
56
- ### MUST DO
57
- - Define quantitative SLOs (e.g., 99.9% availability)
58
- - Calculate error budgets from SLO targets
59
- - Monitor golden signals (latency, traffic, errors, saturation)
60
- - Write blameless postmortems for all incidents
61
- - Measure toil and track reduction progress
62
- - Automate repetitive operational tasks
63
- - Test failure scenarios with chaos engineering
64
- - Balance reliability with feature velocity
47
+ ```
48
+ Availability SLO: 99.9% of requests succeed (43.8 min downtime/month)
49
+ Latency SLO: 99% of requests complete in < 200ms
50
+ ```
65
51
 
66
- ### MUST NOT DO
67
- - Set SLOs without user impact justification
68
- - Alert on symptoms without actionable runbooks
69
- - Tolerate >50% toil without automation plan
70
- - Skip postmortems or assign blame
71
- - Implement manual processes for recurring tasks
72
- - Deploy without capacity planning
73
- - Ignore error budget exhaustion
74
- - Build systems that can't degrade gracefully
52
+ **SLO calibration**:
53
+ | Target | Monthly Downtime | Error Budget |
54
+ |--------|-----------------|--------------|
55
+ | 99.0% | 7.3 hours | 1% of requests can fail |
56
+ | 99.9% | 43.8 minutes | 0.1% of requests can fail |
57
+ | 99.95% | 21.9 minutes | 0.05% of requests can fail |
58
+ | 99.99% | 4.3 minutes | 0.01% of requests can fail |
75
59
 
76
- ## Output Templates
60
+ **Rules**:
77
61
 
78
- When implementing SRE practices, provide:
79
- 1. SLO definitions with SLI measurements and targets
80
- 2. Monitoring/alerting configuration (Prometheus, etc.)
81
- 3. Automation scripts (Python, Go, Terraform)
82
- 4. Runbooks with clear remediation steps
83
- 5. Brief explanation of reliability impact
62
+ - SLO must be achievable with current architecture
63
+ - SLO must be measurable with existing instrumentation
64
+ - SLO should be tighter than the SLA (contract with users)
65
+ - Start conservative, tighten as reliability improves
84
66
 
85
- ## Knowledge Reference
67
+ ### Step 3 — Manage Error Budgets
86
68
 
87
- SLO/SLI design, error budgets, golden signals (latency/traffic/errors/saturation), Prometheus/Grafana, chaos engineering (Chaos Monkey, Gremlin), toil reduction, incident management, blameless postmortems, capacity planning, on-call best practices
69
+ Error budget = 100% SLO target
70
+
71
+ **When budget is healthy** (> 50% remaining):
72
+
73
+ - Ship features aggressively
74
+ - Run chaos experiments
75
+ - Take on technical debt reduction
76
+
77
+ **When budget is burning** (< 25% remaining):
78
+
79
+ - Slow down feature releases
80
+ - Prioritize reliability work
81
+ - Increase review rigor
82
+
83
+ **When budget is exhausted** (0%):
84
+
85
+ - Freeze non-critical changes
86
+ - All engineering effort on reliability
87
+ - Root cause analysis on budget-burning incidents
88
+
89
+ ### Step 4 — Design for Resilience
90
+
91
+ **Failure modes and mitigations**:
92
+
93
+ | Failure | Mitigation |
94
+ | --------------------- | ------------------------------------------------------- |
95
+ | Single instance crash | Multiple replicas, health checks, auto-restart |
96
+ | Dependency timeout | Circuit breakers, timeouts, fallback responses |
97
+ | Traffic spike | Auto-scaling, rate limiting, load shedding |
98
+ | Data center outage | Multi-region deployment, DNS failover |
99
+ | Data corruption | Immutable audit logs, point-in-time recovery, checksums |
100
+ | Cascading failure | Bulkheads, retry budgets, backpressure |
101
+
102
+ **Graceful degradation**:
103
+
104
+ - Serve cached/stale data when the database is slow
105
+ - Disable non-critical features under load
106
+ - Return partial results instead of failing completely
107
+ - Queue work for later processing when at capacity
108
+
109
+ ### Step 5 — Operational Readiness
110
+
111
+ **Production readiness checklist**:
112
+
113
+ - [ ] SLOs defined and dashboarded
114
+ - [ ] Alerting on SLO burn rate (not just raw metrics)
115
+ - [ ] Runbooks for every alert
116
+ - [ ] On-call rotation established
117
+ - [ ] Rollback procedure documented and tested
118
+ - [ ] Disaster recovery plan tested within last quarter
119
+ - [ ] Dependency failures handled (circuit breakers, timeouts)
120
+ - [ ] Load testing performed at 2x expected peak
121
+
122
+ ## Output Format
123
+
124
+ ```
125
+ ## Reliability Assessment
126
+ [current state and risk level]
127
+
128
+ ## SLO Definitions
129
+ [SLI → SLO mappings with error budgets]
130
+
131
+ ## Recommendations
132
+ [priority-ordered reliability improvements]
133
+
134
+ ## Operational Procedures
135
+ [runbooks, on-call procedures, escalation paths]
136
+ ```
137
+
138
+ ## Examples
139
+
140
+ **User**: "Define SLOs for our payment processing API"
141
+
142
+ **Response approach**: High-reliability target (99.99% availability for financial operations). SLIs: availability, latency (p99 < 500ms), correctness (transaction accuracy). Error budget: 4.3 min/month. Alerting on 1-hour burn rate. Circuit breaker on downstream payment provider.
143
+
144
+ **User**: "Our service keeps going down during traffic spikes"
145
+
146
+ **Response approach**: Analyze the failure mode (OOM? connection pool exhaustion? cold starts?). Recommend auto-scaling with pre-warming, rate limiting per client, load shedding for non-critical endpoints. Define SLO for acceptable degradation under load.
@@ -2,115 +2,159 @@
2
2
  ---
3
3
  inclusion: manual
4
4
  name: static-analysis
5
- description: Runs CodeQL-based static security analysis (database build, query pack selection, and SARIF results) for vulnerability discovery and audits. Not for custom QL authoring or CI/CD setup.
6
- allowed-tools:
7
- - Bash
8
- - Read
9
- - Write
10
- - Glob
11
- - Grep
12
- - AskUserQuestion
13
- - Task
14
- - TaskCreate
15
- - TaskList
16
- - TaskUpdate
5
+ description: Configure and use static analysis tools including linters, formatters, type checkers, and custom rules to enforce code quality and consistency.
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
- # CodeQL Analysis
13
+ # Static Analysis
20
14
 
21
- Supported languages: Python, JavaScript/TypeScript, Go, Java/Kotlin, C/C++, C#, Ruby, Swift.
15
+ ## Purpose
22
16
 
23
- **Skill resources:** Reference files and templates are located at `{baseDir}/references/` and `{baseDir}/workflows/`. Use `{baseDir}` to resolve paths to these files at runtime.
17
+ Guide the setup and use of static analysis tools — linters, formatters, type checkers, and custom rules to catch bugs early, enforce conventions, and maintain code quality automatically.
24
18
 
25
- ## Quick Start
19
+ ## When to Use
26
20
 
27
- For the common case ("scan this codebase for vulnerabilities"):
21
+ - Setting up linting and formatting for a new project
22
+ - Configuring ESLint, Prettier, Biome, or equivalent tools
23
+ - Writing custom lint rules for team conventions
24
+ - Fixing lint errors or understanding why a rule exists
25
+ - Integrating static analysis into CI/CD
26
+ - Choosing between competing tools
28
27
 
29
- ```bash
30
- # 1. Verify CodeQL is installed
31
- command -v codeql >/dev/null 2>&1 && codeql --version || echo "NOT INSTALLED"
28
+ ## Instructions
32
29
 
33
- # 2. Check for existing database
34
- ls -dt codeql_*.db 2>/dev/null | head -1
35
- ```
30
+ ### Step 1 Choose the Right Tools
36
31
 
37
- Then execute the full pipeline: **build database → create data extensions → run analysis** using the workflows below.
32
+ | Language | Linter | Formatter | Type Checker |
33
+ | ------------- | ------------- | --------------- | ------------------ |
34
+ | TypeScript/JS | ESLint, Biome | Prettier, Biome | TypeScript (`tsc`) |
35
+ | Python | Ruff, Flake8 | Black, Ruff | mypy, pyright |
36
+ | Go | golangci-lint | gofmt | Go compiler |
37
+ | Rust | Clippy | rustfmt | Rust compiler |
38
38
 
39
- ## When to Use
39
+ **Recommended approach**:
40
40
 
41
- - Scanning a codebase for security vulnerabilities with deep data flow analysis
42
- - Building a CodeQL database from source code (with build capability for compiled languages)
43
- - Finding complex vulnerabilities that require interprocedural taint tracking or AST/CFG analysis
44
- - Performing comprehensive security audits with multiple query packs
41
+ - Biome for TypeScript/JS projects (replaces ESLint + Prettier, faster)
42
+ - Ruff for Python (replaces Flake8 + Black + isort, faster)
43
+ - Use the language's official formatter when available
45
44
 
46
- ## When NOT to Use
45
+ ### Step 2 Configure Incrementally
47
46
 
48
- - **Writing custom queries** - Use a dedicated query development skill
49
- - **CI/CD integration** - Use GitHub Actions documentation directly
50
- - **Quick pattern searches** - Use Semgrep or grep for speed
51
- - **No build capability** for compiled languages - Consider Semgrep instead
52
- - **Single-file or lightweight analysis** - Semgrep is faster for simple pattern matching
47
+ **Start strict, relax as needed**:
53
48
 
54
- ## Rationalizations to Reject
49
+ 1. Start with recommended preset (`"extends": ["recommended"]`)
50
+ 2. Enable formatting rules (consistent style, no debates)
51
+ 3. Enable correctness rules (actual bugs: unused vars, unreachable code)
52
+ 4. Enable performance rules (avoidable perf issues)
53
+ 5. Add custom rules specific to your team after the baseline is stable
55
54
 
56
- These shortcuts lead to missed findings. Do not accept them:
55
+ **Don't**:
57
56
 
58
- - **"security-extended is enough"** - It is the baseline. Always check if Trail of Bits packs and Community Packs are available for the language. They catch categories `security-extended` misses entirely.
59
- - **"The database built, so it's good"** - A database that builds does not mean it extracted well. Always run Step 4 (quality assessment) and check file counts against expected source files. A cached build produces zero useful extraction.
60
- - **"Data extensions aren't needed for standard frameworks"** - Even Django/Spring apps have custom wrappers around ORM calls, request parsing, or shell execution that CodeQL does not model. Skipping the extensions workflow means missing vulnerabilities in project-specific code.
61
- - **"build-mode=none is fine for compiled languages"** - It produces severely incomplete analysis. No interprocedural data flow through compiled code is traced. Only use as an absolute last resort and clearly flag the limitation.
62
- - **"No findings means the code is secure"** - Zero findings can indicate poor database quality, missing models, or wrong query packs. Investigate before reporting clean results.
63
- - **"I'll just run the default suite"** - The default suite varies by how CodeQL is invoked. Always explicitly specify the suite (e.g., `security-extended`) so results are reproducible.
57
+ - Enable everything at once on an existing codebase
58
+ - Disable rules because they're "annoying" without understanding them
59
+ - Use `// eslint-disable` without a comment explaining why
64
60
 
65
- ---
61
+ ### Step 3 — Key Rules by Category
66
62
 
67
- ## Workflow Selection
63
+ **Correctness** (catch bugs):
68
64
 
69
- This skill has three workflows:
65
+ - No unused variables/imports
66
+ - No unreachable code
67
+ - No implicit type coercion in comparisons
68
+ - No floating promises (unhandled async)
69
+ - No shadowed variables in nested scopes
70
70
 
71
- | Workflow | Purpose |
72
- |----------|---------|
73
- | [build-database](workflows/build-database.md) | Create CodeQL database using 3 build methods in sequence |
74
- | [create-data-extensions](workflows/create-data-extensions.md) | Detect or generate data extension models for project APIs |
75
- | [run-analysis](workflows/run-analysis.md) | Select rulesets, execute queries, process results |
71
+ **Consistency** (enforce style):
76
72
 
73
+ - Consistent naming conventions (camelCase, PascalCase, SCREAMING_SNAKE)
74
+ - Consistent import ordering
75
+ - Consistent quote style and semicolons
76
+ - Consistent use of `const` vs `let`
77
77
 
78
- ### Auto-Detection Logic
78
+ **Security** (prevent vulnerabilities):
79
79
 
80
- **If user explicitly specifies** what to do (e.g., "build a database", "run analysis"), execute that workflow.
80
+ - No `eval()` or `Function()` constructor
81
+ - No `innerHTML` assignments (XSS risk)
82
+ - No hardcoded secrets or credentials
83
+ - No `any` type in TypeScript (use `unknown` for unknown types)
81
84
 
82
- **Default pipeline for "test", "scan", "analyze", or similar:** Execute all three workflows sequentially: build → extensions → analysis. The create-data-extensions step is critical for finding vulnerabilities in projects with custom frameworks or annotations that CodeQL doesn't model by default.
85
+ **Performance** (avoid waste):
83
86
 
84
- ```bash
85
- # Check if database exists
86
- DB=$(ls -dt codeql_*.db 2>/dev/null | head -1)
87
- if [ -n "$DB" ] && codeql resolve database -- "$DB" >/dev/null 2>&1; then
88
- echo "DATABASE EXISTS ($DB) - can run analysis"
89
- else
90
- echo "NO DATABASE - need to build first"
91
- fi
92
- ```
87
+ - No unnecessary re-renders (React-specific)
88
+ - No synchronous file operations in async contexts
89
+ - No `console.log` in production code
90
+
91
+ ### Step 4 Integrate into Workflow
92
+
93
+ **Local development**:
94
+
95
+ - Editor integration (real-time feedback as you type)
96
+ - Format on save
97
+ - Pre-commit hook (lint-staged + husky or lefthook)
98
+
99
+ **CI/CD**:
100
+
101
+ - Run lint check on every PR
102
+ - Fail the build on lint errors (not warnings — fix or disable)
103
+ - Cache lint results between runs
93
104
 
94
- | Condition | Action |
95
- |-----------|--------|
96
- | No database exists | Execute build → extensions → analysis (full pipeline) |
97
- | Database exists, no extensions | Execute extensions → analysis |
98
- | Database exists, extensions exist | Ask user: run analysis on existing DB, or rebuild? |
99
- | User says "just run analysis" or "skip extensions" | Run analysis only |
105
+ **Migration strategy** (existing codebase):
100
106
 
107
+ - Fix auto-fixable issues in one PR (formatting, import order)
108
+ - Enable new rules as warnings first, then promote to errors
109
+ - Fix rules incrementally by directory, not all at once
101
110
 
102
- ### Decision Prompt
111
+ ### Step 5 — Write Custom Rules
103
112
 
104
- If unclear, ask user:
113
+ When team conventions aren't covered by existing rules:
105
114
 
115
+ **ESLint custom rule example** (no importing from internal paths):
116
+
117
+ ```javascript
118
+ module.exports = {
119
+ meta: {
120
+ type: "problem",
121
+ messages: { noInternal: "Do not import from internal modules" },
122
+ },
123
+ create(context) {
124
+ return {
125
+ ImportDeclaration(node) {
126
+ if (node.source.value.includes("/internal/")) {
127
+ context.report({ node, messageId: "noInternal" });
128
+ }
129
+ },
130
+ };
131
+ },
132
+ };
106
133
  ```
107
- I can help with CodeQL analysis. What would you like to do?
108
134
 
109
- 1. **Full scan (Recommended)** - Build database, create extensions, then run analysis
110
- 2. **Build database** - Create a new CodeQL database from this codebase
111
- 3. **Create data extensions** - Generate custom source/sink models for project APIs
112
- 4. **Run analysis** - Run security queries on existing database
135
+ ## Output Format
136
+
137
+ ```
138
+ ## Tool Configuration
139
+ [config files and settings]
140
+
141
+ ## Rules Enabled
142
+ [categorized list of rules with rationale]
143
+
144
+ ## CI Integration
145
+ [pipeline step definition]
113
146
 
114
- [If database exists: "I found an existing database at <DB_NAME>"]
147
+ ## Migration Plan
148
+ [how to adopt incrementally on existing code]
115
149
  ```
150
+
151
+ ## Examples
152
+
153
+ **User**: "Set up ESLint and Prettier for our TypeScript React project"
154
+
155
+ **Response approach**: Recommend Biome as modern alternative. If staying with ESLint: configure with typescript-eslint, eslint-plugin-react, prettier integration. Show config file, ignore patterns, and pre-commit hook setup.
156
+
157
+ **User**: "We have 5000 lint errors — how do we fix this?"
158
+
159
+ **Response approach**: Auto-fix formatting issues first (one big PR). Establish baseline with current errors suppressed. Enable rules as warnings. Fix incrementally by directory. Add CI check that blocks new violations.
116
160
  ````