@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,160 @@
1
+ # GitHub Actions Patterns
2
+
3
+ ## Reusable workflow pattern
4
+
5
+ ```yaml
6
+ # .github/workflows/ci-shared.yml
7
+ name: Shared CI
8
+ on:
9
+ workflow_call:
10
+ inputs:
11
+ node-version:
12
+ required: false
13
+ type: string
14
+ default: "20"
15
+ working-directory:
16
+ required: false
17
+ type: string
18
+ default: "."
19
+ secrets:
20
+ NPM_TOKEN:
21
+ required: false
22
+
23
+ jobs:
24
+ build-and-test:
25
+ runs-on: ubuntu-latest
26
+ defaults:
27
+ run:
28
+ working-directory: ${{ inputs.working-directory }}
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: actions/setup-node@v4
32
+ with:
33
+ node-version: ${{ inputs.node-version }}
34
+ cache: "npm"
35
+ cache-dependency-path: "${{ inputs.working-directory }}/package-lock.json"
36
+ - run: npm ci
37
+ - run: npm test
38
+ ```
39
+
40
+ ## Composite action pattern
41
+
42
+ ```yaml
43
+ # .github/actions/setup-project/action.yml
44
+ name: Setup Project
45
+ description: Install dependencies and restore caches
46
+ inputs:
47
+ node-version:
48
+ required: false
49
+ default: "20"
50
+ runs:
51
+ using: composite
52
+ steps:
53
+ - uses: actions/setup-node@v4
54
+ with:
55
+ node-version: ${{ inputs.node-version }}
56
+ cache: "npm"
57
+ - run: npm ci
58
+ shell: bash
59
+ ```
60
+
61
+ ## Matrix strategy
62
+
63
+ ```yaml
64
+ jobs:
65
+ test:
66
+ strategy:
67
+ fail-fast: false
68
+ matrix:
69
+ os: [ubuntu-latest, windows-latest]
70
+ node: [18, 20, 22]
71
+ exclude:
72
+ - os: windows-latest
73
+ node: 18
74
+ runs-on: ${{ matrix.os }}
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+ - uses: actions/setup-node@v4
78
+ with:
79
+ node-version: ${{ matrix.node }}
80
+ - run: npm ci
81
+ - run: npm test
82
+ ```
83
+
84
+ ## Environment protection
85
+
86
+ ```yaml
87
+ jobs:
88
+ deploy-staging:
89
+ environment: staging
90
+ runs-on: ubuntu-latest
91
+ steps:
92
+ - run: echo "Deploying to staging"
93
+
94
+ deploy-production:
95
+ needs: deploy-staging
96
+ environment:
97
+ name: production
98
+ url: https://example.com
99
+ runs-on: ubuntu-latest
100
+ steps:
101
+ - run: echo "Deploying to production"
102
+ ```
103
+
104
+ Settings for the `production` environment:
105
+
106
+ - Required reviewers: 1+
107
+ - Wait timer: 5 minutes (optional)
108
+ - Deployment branches: `main` only
109
+ - Prevent self-review: enabled
110
+
111
+ ## Concurrency control
112
+
113
+ ```yaml
114
+ concurrency:
115
+ group: deploy-${{ github.ref }}
116
+ cancel-in-progress: false # false for deploy, true for CI
117
+ ```
118
+
119
+ - Use `cancel-in-progress: true` for CI checks — no reason to test outdated code.
120
+ - Use `cancel-in-progress: false` for deployments — cancelling mid-deploy is dangerous.
121
+
122
+ ## Monorepo path filtering
123
+
124
+ ```yaml
125
+ on:
126
+ push:
127
+ paths:
128
+ - "packages/api/**"
129
+ - "shared/**"
130
+ - "package-lock.json"
131
+ ```
132
+
133
+ - Filter on paths to skip unnecessary CI for unrelated changes.
134
+ - Always include shared code and lockfile paths.
135
+
136
+ ## Artifact passing between jobs
137
+
138
+ ```yaml
139
+ jobs:
140
+ build:
141
+ runs-on: ubuntu-latest
142
+ steps:
143
+ - uses: actions/checkout@v4
144
+ - run: npm ci && npm run build
145
+ - uses: actions/upload-artifact@v4
146
+ with:
147
+ name: build-output
148
+ path: dist/
149
+ retention-days: 7
150
+
151
+ deploy:
152
+ needs: build
153
+ runs-on: ubuntu-latest
154
+ steps:
155
+ - uses: actions/download-artifact@v4
156
+ with:
157
+ name: build-output
158
+ path: dist/
159
+ - run: echo "Deploy dist/"
160
+ ```
@@ -0,0 +1,57 @@
1
+ # Pipeline Security Checklist
2
+
3
+ ## Supply chain hardening
4
+
5
+ - [ ] Pin all GitHub Actions to full commit SHA, not version tags
6
+ - [ ] Audit third-party actions before adoption — read the source
7
+ - [ ] Prefer official actions (`actions/*`) and verified publishers
8
+ - [ ] Use Dependabot or Renovate to track action version updates
9
+ - [ ] Enable GitHub's dependency graph and secret scanning on the repository
10
+
11
+ ## Permissions
12
+
13
+ - [ ] Set top-level `permissions: read-all` or `permissions: {}` as default
14
+ - [ ] Grant write permissions per-job, not per-workflow
15
+ - [ ] Never use `permissions: write-all`
16
+ - [ ] Scope `GITHUB_TOKEN` to minimum required permissions per job
17
+ - [ ] Use separate service accounts for production deployments
18
+
19
+ ## Secrets management
20
+
21
+ - [ ] Store secrets in GitHub repository/organization secrets, not in workflow files
22
+ - [ ] Rotate secrets on a schedule (90 days recommended)
23
+ - [ ] Use environment-scoped secrets for production credentials
24
+ - [ ] Never echo, log, or expose secrets in workflow output
25
+ - [ ] Use OIDC (`id-token: write`) for cloud provider auth instead of long-lived credentials
26
+
27
+ ## Branch protection
28
+
29
+ - [ ] Require status checks before merge
30
+ - [ ] Require pull request reviews (1+ approver)
31
+ - [ ] Enforce signed commits on main/release branches
32
+ - [ ] Disable force push to protected branches
33
+ - [ ] Use merge queue to serialize deployments
34
+
35
+ ## Build provenance (SLSA)
36
+
37
+ - [ ] Generate SLSA provenance attestations for release artifacts
38
+ - [ ] Sign container images with cosign or Notation
39
+ - [ ] Publish SBOMs for distributed artifacts
40
+ - [ ] Use hermetic builds when possible — no network access during build step
41
+ - [ ] Tag release artifacts with the exact commit SHA
42
+
43
+ ## Audit trail
44
+
45
+ - [ ] Log all deployment events with actor, timestamp, commit, and environment
46
+ - [ ] Retain workflow logs for compliance period (minimum 90 days)
47
+ - [ ] Alert on failed production deployments
48
+ - [ ] Track who approved gated deployments
49
+ - [ ] Review workflow run permissions monthly
50
+
51
+ ## Self-hosted runner hardening
52
+
53
+ - [ ] Use ephemeral runners — do not reuse runner state between jobs
54
+ - [ ] Run self-hosted runners in isolated VMs or containers
55
+ - [ ] Do not run untrusted code (fork PRs) on self-hosted runners
56
+ - [ ] Keep runner software and OS packages updated
57
+ - [ ] Restrict network access from runners to required endpoints only
@@ -1,119 +1,176 @@
1
1
  ````markdown
2
2
  ---
3
3
  inclusion: manual
4
- name: "cli-developer"
5
- displayName: "CLI Developer"
6
- description: "Build intuitive, cross-platform CLI tools with argument parsing, interactive prompts, progress indicators, and shell completions across Node.js, Python, and Go"
7
- keywords:
8
- [
9
- "cli",
10
- "command-line",
11
- "terminal",
12
- "argument parsing",
13
- "shell completion",
14
- "interactive prompt",
15
- "progress bar",
16
- "commander",
17
- "click",
18
- "typer",
19
- "cobra",
20
- ]
4
+ name: cli-developer
5
+ description: Build command-line interfaces with argument parsing, subcommands, interactive prompts, terminal UX, output formatting, and cross-platform compatibility.
6
+ license: Apache-2.0
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "3.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
21
11
  ---
22
12
 
23
13
  # CLI Developer
24
14
 
25
- ## Overview
15
+ ## Purpose
26
16
 
27
- Senior CLI developer expertise for building fast, intuitive command-line tools across Node.js, Python, and Go ecosystems. Focus on <50ms startup time, comprehensive shell completions, and delightful developer UX.
17
+ Guide the design and implementation of command-line interfaces. Covers argument parsing, subcommand architecture, interactive prompts, terminal UX patterns, and cross-platform compatibility.
28
18
 
29
19
  ## When to Use
30
20
 
31
- - Building CLI tools and terminal applications
32
- - Implementing argument parsing and subcommands
33
- - Creating interactive prompts and forms
34
- - Adding progress bars and spinners
35
- - Implementing shell completions (bash, zsh, fish)
36
- - Optimizing CLI performance and startup time
37
- - Designing command hierarchies and flag conventions
21
+ - Building a new CLI tool from scratch
22
+ - Adding subcommands or flags to an existing CLI
23
+ - Implementing interactive prompts and wizards
24
+ - Designing CLI output formats (tables, JSON, progress bars)
25
+ - Making CLIs cross-platform (Windows, macOS, Linux)
26
+ - Reviewing CLI usability and documentation
38
27
 
39
- ## Core Workflow
28
+ ## Instructions
40
29
 
41
- 1. Analyze UXidentify user workflows, command hierarchy, common tasks
42
- 2. Design commands — plan subcommands, flags, arguments, configuration
43
- 3. Implement — build with appropriate CLI framework for the language
44
- 4. Polish — add completions, help text, error messages, progress indicators
45
- 5. Test — cross-platform testing, performance benchmarks
30
+ ### Step 1Design the Command Structure
46
31
 
47
- ## Quick Reference
32
+ **Naming conventions**:
48
33
 
49
- ### Framework Selection
34
+ - Use verb-noun pattern for commands: `create project`, `list users`, `delete cache`
35
+ - Short flags for common options: `-v` (verbose), `-q` (quiet), `-f` (force)
36
+ - Long flags for clarity: `--output`, `--format`, `--dry-run`
37
+ - Positional arguments for required inputs: `mycli deploy <environment>`
50
38
 
51
- | Language | Recommended | Alternative |
52
- | -------- | ------------- | --------------- |
53
- | Node.js | Commander.js | Yargs, oclif |
54
- | Python | Typer | Click, argparse |
55
- | Go | Cobra + Viper | urfave/cli |
56
-
57
- ### Command Structure
39
+ **Subcommand architecture**:
58
40
 
59
41
  ```
60
- mycli # Root command
61
- ├── init [options] # Simple command
42
+ mycli
43
+ ├── init (one-time setup)
62
44
  ├── config
63
- │ ├── get <key> # Nested subcommand
45
+ │ ├── get <key>
64
46
  │ ├── set <key> <value>
65
47
  │ └── list
66
- ├── deploy [environment] # Command with args
67
- │ ├── --dry-run # Flag
68
- │ ├── --force
69
- │ └── --config <file> # Option with value
70
- └── plugins
71
- ├── install <name>
72
- ├── list
73
- └── remove <name>
48
+ ├── project
49
+ │ ├── create <name>
50
+ │ ├── list
51
+ │ └── delete <id>
52
+ └── deploy <env> (positional argument)
74
53
  ```
75
54
 
76
- ### Exit Codes
77
-
78
- | Code | Meaning |
79
- | ---- | ----------------- |
80
- | 0 | Success |
81
- | 1 | General error |
82
- | 2 | Invalid arguments |
83
- | 77 | Permission denied |
84
- | 127 | Not found |
85
- | 130 | Ctrl+C (SIGINT) |
86
-
87
- ## Constraints
88
-
89
- ### MUST DO
90
-
91
- - Keep startup time under 50ms
92
- - Provide clear, actionable error messages
93
- - Support `--help` and `--version` flags
94
- - Use consistent flag naming conventions
95
- - Handle SIGINT (Ctrl+C) gracefully
96
- - Validate user input early
97
- - Support both interactive and non-interactive modes
98
- - Test on Windows, macOS, and Linux
99
-
100
- ### MUST NOT DO
101
-
102
- - Block on synchronous I/O unnecessarily
103
- - Print to stdout if output will be piped
104
- - Use colors when output is not a TTY
105
- - Break existing command signatures (breaking changes)
106
- - Require interactive input in CI/CD environments
107
- - Hardcode paths or platform-specific logic
108
- - Ship without shell completions
109
-
110
- ## Steering Files
111
-
112
- | File | Load When |
113
- | -------------------- | ------------------------------------------------------------ |
114
- | `design-patterns.md` | Command hierarchy, flags, config layers, plugin architecture |
115
- | `node-cli.md` | Commander, Yargs, Inquirer, Chalk, Ora |
116
- | `python-cli.md` | Typer, Click, argparse, Rich, questionary |
117
- | `go-cli.md` | Cobra, Viper, Bubble Tea, progress bars |
118
- | `ux-patterns.md` | Progress indicators, colors, help text, error messages |
55
+ **Rules**:
56
+
57
+ - Every command has `--help` (automatic with good parsers)
58
+ - Support `--version` at the root level
59
+ - Common flags go on the root command, specific flags on subcommands
60
+ - Use `--dry-run` for destructive operations
61
+
62
+ ### Step 2 Implement Argument Parsing
63
+
64
+ **Choose the right parser**:
65
+ | Language | Recommended |
66
+ |----------|-------------|
67
+ | Node.js | Commander, yargs, citty |
68
+ | Python | Click, Typer |
69
+ | Go | Cobra, urfave/cli |
70
+ | Rust | Clap |
71
+
72
+ **Validation**:
73
+
74
+ - Validate early, fail with clear error messages
75
+ - Show the closest valid option on typos (did-you-mean)
76
+ - Report all validation errors at once, not one at a time
77
+
78
+ ### Step 3 — Design Terminal UX
79
+
80
+ **Output hierarchy**:
81
+
82
+ 1. Primary output goes to stdout (pipeable)
83
+ 2. Status messages go to stderr (logs, progress)
84
+ 3. Errors go to stderr with non-zero exit code
85
+
86
+ **Formatting**:
87
+
88
+ - Default: human-readable (tables, colors, emoji)
89
+ - `--json`: machine-parseable JSON output
90
+ - `--quiet`: errors only, minimal output
91
+ - Detect TTY: disable colors and interactivity when piped
92
+
93
+ **Progress feedback**:
94
+
95
+ - Spinner for short operations (< 10s)
96
+ - Progress bar for operations with known total
97
+ - Log lines for multi-step operations (✓ Step 1... Step 2...)
98
+
99
+ **Colors** (use sparingly):
100
+
101
+ - Green: success
102
+ - Red: error
103
+ - Yellow: warning
104
+ - Blue/cyan: information
105
+ - Dim/gray: secondary information
106
+ - Always support `NO_COLOR` environment variable
107
+
108
+ ### Step 4 — Interactive Prompts
109
+
110
+ **When to prompt**:
111
+
112
+ - Missing required information not provided as flags
113
+ - Confirmation before destructive operations
114
+ - Multi-step wizards for complex setup
115
+
116
+ **Prompt types**:
117
+ | Type | When |
118
+ |------|------|
119
+ | Text input | Free-form strings (names, paths) |
120
+ | Password | Secrets (mask input) |
121
+ | Select | Single choice from a list |
122
+ | Multi-select | Multiple choices from a list |
123
+ | Confirm | Yes/no decision |
124
+
125
+ **Rules**:
126
+
127
+ - Show defaults in brackets: `Port [3000]:`
128
+ - Allow non-interactive mode via flags (CI environments)
129
+ - Validate input inline and let the user retry
130
+ - Support Ctrl+C graceful cancellation
131
+
132
+ ### Step 5 — Error Handling & Exit Codes
133
+
134
+ **Exit codes**:
135
+ | Code | Meaning |
136
+ |------|---------|
137
+ | 0 | Success |
138
+ | 1 | General error |
139
+ | 2 | Misuse / invalid arguments |
140
+ | 126 | Permission denied |
141
+ | 127 | Command not found |
142
+ | 130 | Terminated by Ctrl+C (SIGINT) |
143
+
144
+ **Error messages**:
145
+
146
+ ```
147
+ Error: Could not connect to database at localhost:5432
148
+ Cause: Connection refused
149
+ Fix: Ensure PostgreSQL is running: `pg_ctl start`
150
+ ```
151
+
152
+ Include: what failed, why, and how to fix.
153
+
154
+ ## Output Format
155
+
156
+ ```
157
+ ## CLI Architecture
158
+ [command structure and flag design]
159
+
160
+ ## Implementation
161
+ [code with argument parsing and command handlers]
162
+
163
+ ## UX Considerations
164
+ [output formatting, interactivity, error handling]
165
+ ```
166
+
167
+ ## Examples
168
+
169
+ **User**: "Build a CLI for managing our API deployments"
170
+
171
+ **Response approach**: Design subcommand structure (deploy, rollback, status, logs). Implement with Commander/Click/Cobra. Add deploy confirmation prompt, progress bar for upload, JSON output for CI. Handle rollback with `--to-version` flag.
172
+
173
+ **User**: "Our CLI has bad error messages — users don't know what went wrong"
174
+
175
+ **Response approach**: Audit error handling. Add context to every error (what, why, fix). Implement did-you-mean for typos. Add `--verbose` flag for debug output. Ensure proper exit codes for scripting.
119
176
  ````