@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.
- package/CHANGELOG.md +23 -2
- package/dist/cli/core.js +9 -22
- package/dist/cli/core.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +13 -22
- package/workflows/powers/accessibility/POWER.md +83 -94
- package/workflows/powers/accessibility/SKILL.md +82 -94
- package/workflows/powers/agent-design/POWER.md +201 -0
- package/workflows/powers/agent-design/SKILL.md +198 -0
- package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/powers/agent-design/references/skill-testing.md +164 -0
- package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/powers/agentic-eval/POWER.md +62 -0
- package/workflows/powers/agentic-eval/SKILL.md +59 -0
- package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
- package/workflows/powers/api-designer/POWER.md +43 -71
- package/workflows/powers/api-designer/SKILL.md +43 -71
- package/workflows/powers/api-patterns/POWER.md +42 -56
- package/workflows/powers/api-patterns/SKILL.md +42 -57
- package/workflows/powers/architecture-designer/POWER.md +43 -60
- package/workflows/powers/architecture-designer/SKILL.md +43 -60
- package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
- package/workflows/powers/auth-architect/POWER.md +69 -0
- package/workflows/powers/auth-architect/SKILL.md +66 -0
- package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
- package/workflows/powers/behavioral-modes/POWER.md +100 -9
- package/workflows/powers/c-pro/POWER.md +105 -0
- package/workflows/powers/c-pro/SKILL.md +102 -0
- package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
- package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
- package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
- package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
- package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
- package/workflows/powers/changelog-generator/POWER.md +127 -63
- package/workflows/powers/changelog-generator/SKILL.md +126 -63
- package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
- package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
- package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
- package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
- package/workflows/powers/cli-developer/POWER.md +152 -95
- package/workflows/powers/cli-developer/SKILL.md +152 -95
- package/workflows/powers/cpp-pro/POWER.md +111 -0
- package/workflows/powers/cpp-pro/SKILL.md +108 -0
- package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
- package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
- package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
- package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
- package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
- package/workflows/powers/csharp-pro/POWER.md +47 -22
- package/workflows/powers/csharp-pro/SKILL.md +47 -22
- package/workflows/powers/dart-pro/POWER.md +68 -0
- package/workflows/powers/dart-pro/SKILL.md +65 -0
- package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
- package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
- package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
- package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
- package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
- package/workflows/powers/database-design/POWER.md +47 -33
- package/workflows/powers/database-design/SKILL.md +47 -33
- package/workflows/powers/database-optimizer/POWER.md +43 -64
- package/workflows/powers/database-optimizer/SKILL.md +43 -64
- package/workflows/powers/database-skills/POWER.md +59 -93
- package/workflows/powers/database-skills/SKILL.md +59 -93
- package/workflows/powers/debugging-strategies/POWER.md +69 -0
- package/workflows/powers/debugging-strategies/SKILL.md +66 -0
- package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
- package/workflows/powers/deep-research/POWER.md +67 -0
- package/workflows/powers/deep-research/SKILL.md +64 -0
- package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
- package/workflows/powers/design-system-builder/POWER.md +130 -116
- package/workflows/powers/design-system-builder/SKILL.md +130 -116
- package/workflows/powers/devops-engineer/POWER.md +120 -57
- package/workflows/powers/devops-engineer/SKILL.md +120 -57
- package/workflows/powers/docker-kubernetes/POWER.md +94 -0
- package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
- package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
- package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
- package/workflows/powers/documentation-templates/POWER.md +158 -127
- package/workflows/powers/documentation-templates/SKILL.md +158 -127
- package/workflows/powers/drizzle-expert/POWER.md +66 -0
- package/workflows/powers/drizzle-expert/SKILL.md +63 -0
- package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
- package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
- package/workflows/powers/error-ux-observability/POWER.md +144 -131
- package/workflows/powers/error-ux-observability/SKILL.md +143 -131
- package/workflows/powers/fastapi-expert/POWER.md +46 -60
- package/workflows/powers/fastapi-expert/SKILL.md +46 -60
- package/workflows/powers/firebase/POWER.md +65 -0
- package/workflows/powers/firebase/SKILL.md +62 -0
- package/workflows/powers/firebase/references/platform-routing.md +16 -0
- package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
- package/workflows/powers/flutter-design-system/POWER.md +63 -0
- package/workflows/powers/flutter-design-system/SKILL.md +60 -0
- package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
- package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
- package/workflows/powers/flutter-drift/POWER.md +65 -0
- package/workflows/powers/flutter-drift/SKILL.md +62 -0
- package/workflows/powers/flutter-drift/references/migrations.md +22 -0
- package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
- package/workflows/powers/flutter-feature/POWER.md +65 -0
- package/workflows/powers/flutter-feature/SKILL.md +62 -0
- package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
- package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
- package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
- package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
- package/workflows/powers/flutter-go-router/POWER.md +64 -0
- package/workflows/powers/flutter-go-router/SKILL.md +61 -0
- package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
- package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
- package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
- package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
- package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
- package/workflows/powers/flutter-repository/POWER.md +64 -0
- package/workflows/powers/flutter-repository/SKILL.md +61 -0
- package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
- package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
- package/workflows/powers/flutter-riverpod/POWER.md +70 -0
- package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
- package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
- package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
- package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
- package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
- package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
- package/workflows/powers/flutter-state-machine/POWER.md +62 -0
- package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
- package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
- package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
- package/workflows/powers/flutter-testing/POWER.md +64 -0
- package/workflows/powers/flutter-testing/SKILL.md +61 -0
- package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
- package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
- package/workflows/powers/frontend-code-review/POWER.md +137 -0
- package/workflows/powers/frontend-code-review/SKILL.md +134 -0
- package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
- package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
- package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
- package/workflows/powers/frontend-design/POWER.md +163 -362
- package/workflows/powers/frontend-design/SKILL.md +163 -362
- package/workflows/powers/game-development/POWER.md +57 -140
- package/workflows/powers/game-development/SKILL.md +57 -140
- package/workflows/powers/geo-fundamentals/POWER.md +64 -126
- package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
- package/workflows/powers/git-workflow/POWER.md +135 -0
- package/workflows/powers/git-workflow/SKILL.md +132 -0
- package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
- package/workflows/powers/golang-pro/POWER.md +46 -35
- package/workflows/powers/golang-pro/SKILL.md +46 -35
- package/workflows/powers/graphql-architect/POWER.md +44 -62
- package/workflows/powers/graphql-architect/SKILL.md +44 -62
- package/workflows/powers/i18n-localization/POWER.md +118 -103
- package/workflows/powers/i18n-localization/SKILL.md +118 -103
- package/workflows/powers/java-pro/POWER.md +47 -22
- package/workflows/powers/java-pro/SKILL.md +47 -22
- package/workflows/powers/javascript-pro/POWER.md +47 -34
- package/workflows/powers/javascript-pro/SKILL.md +47 -34
- package/workflows/powers/kotlin-pro/POWER.md +46 -23
- package/workflows/powers/kotlin-pro/SKILL.md +46 -23
- package/workflows/powers/legacy-modernizer/POWER.md +43 -60
- package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
- package/workflows/powers/mcp-builder/POWER.md +65 -0
- package/workflows/powers/mcp-builder/SKILL.md +62 -0
- package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
- package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
- package/workflows/powers/microservices-architect/POWER.md +43 -70
- package/workflows/powers/microservices-architect/SKILL.md +43 -70
- package/workflows/powers/mobile-design/POWER.md +110 -345
- package/workflows/powers/mobile-design/SKILL.md +110 -345
- package/workflows/powers/mongodb/POWER.md +67 -0
- package/workflows/powers/mongodb/SKILL.md +64 -0
- package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
- package/workflows/powers/mysql/POWER.md +67 -0
- package/workflows/powers/mysql/SKILL.md +64 -0
- package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
- package/workflows/powers/neki/POWER.md +67 -0
- package/workflows/powers/neki/SKILL.md +64 -0
- package/workflows/powers/neki/references/neki-checklist.md +18 -0
- package/workflows/powers/nestjs-expert/POWER.md +45 -91
- package/workflows/powers/nestjs-expert/SKILL.md +45 -91
- package/workflows/powers/nextjs-developer/POWER.md +51 -44
- package/workflows/powers/nextjs-developer/SKILL.md +51 -44
- package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
- package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
- package/workflows/powers/observability/POWER.md +109 -0
- package/workflows/powers/observability/SKILL.md +106 -0
- package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
- package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
- package/workflows/powers/openai-docs/POWER.md +61 -0
- package/workflows/powers/openai-docs/SKILL.md +58 -0
- package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
- package/workflows/powers/performance-profiling/POWER.md +61 -114
- package/workflows/powers/performance-profiling/SKILL.md +61 -114
- package/workflows/powers/php-pro/POWER.md +116 -0
- package/workflows/powers/php-pro/SKILL.md +113 -0
- package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
- package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
- package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
- package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
- package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
- package/workflows/powers/playwright-e2e/POWER.md +85 -0
- package/workflows/powers/playwright-e2e/SKILL.md +82 -0
- package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
- package/workflows/powers/postgres/POWER.md +67 -0
- package/workflows/powers/postgres/SKILL.md +64 -0
- package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
- package/workflows/powers/prompt-engineer/POWER.md +47 -30
- package/workflows/powers/prompt-engineer/SKILL.md +47 -30
- package/workflows/powers/python-pro/POWER.md +47 -36
- package/workflows/powers/python-pro/SKILL.md +47 -36
- package/workflows/powers/react-best-practices/POWER.md +56 -33
- package/workflows/powers/react-best-practices/SKILL.md +56 -33
- package/workflows/powers/react-expert/POWER.md +47 -37
- package/workflows/powers/react-expert/SKILL.md +47 -37
- package/workflows/powers/redis/POWER.md +67 -0
- package/workflows/powers/redis/SKILL.md +64 -0
- package/workflows/powers/redis/references/redis-checklist.md +19 -0
- package/workflows/powers/ruby-pro/POWER.md +118 -0
- package/workflows/powers/ruby-pro/SKILL.md +115 -0
- package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
- package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
- package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
- package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
- package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
- package/workflows/powers/rust-pro/POWER.md +45 -31
- package/workflows/powers/rust-pro/SKILL.md +45 -31
- package/workflows/powers/security-engineer/POWER.md +129 -0
- package/workflows/powers/security-engineer/SKILL.md +126 -0
- package/workflows/powers/seo-fundamentals/POWER.md +59 -102
- package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
- package/workflows/powers/serverless-patterns/POWER.md +171 -0
- package/workflows/powers/serverless-patterns/SKILL.md +168 -0
- package/workflows/powers/skill-creator/POWER.md +90 -0
- package/workflows/powers/skill-creator/SKILL.md +87 -0
- package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
- package/workflows/powers/skill-creator/references/schemas.md +430 -0
- package/workflows/powers/spec-miner/POWER.md +49 -57
- package/workflows/powers/spec-miner/SKILL.md +49 -57
- package/workflows/powers/sqlite/POWER.md +67 -0
- package/workflows/powers/sqlite/SKILL.md +64 -0
- package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
- package/workflows/powers/sre-engineer/POWER.md +123 -64
- package/workflows/powers/sre-engineer/SKILL.md +123 -64
- package/workflows/powers/static-analysis/POWER.md +121 -77
- package/workflows/powers/static-analysis/SKILL.md +121 -77
- package/workflows/powers/stripe-best-practices/POWER.md +140 -17
- package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
- package/workflows/powers/supabase/POWER.md +67 -0
- package/workflows/powers/supabase/SKILL.md +64 -0
- package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
- package/workflows/powers/swift-pro/POWER.md +118 -0
- package/workflows/powers/swift-pro/SKILL.md +115 -0
- package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
- package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
- package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
- package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
- package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
- package/workflows/powers/tailwind-patterns/POWER.md +71 -240
- package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
- package/workflows/powers/testing-patterns/POWER.md +155 -10
- package/workflows/powers/testing-patterns/SKILL.md +155 -10
- package/workflows/powers/typescript-pro/POWER.md +47 -38
- package/workflows/powers/typescript-pro/SKILL.md +47 -38
- package/workflows/powers/vitess/POWER.md +67 -0
- package/workflows/powers/vitess/SKILL.md +64 -0
- package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
- package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
- package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
- package/workflows/powers/web-perf/POWER.md +43 -170
- package/workflows/powers/web-perf/SKILL.md +43 -170
- package/workflows/powers/webapp-testing/POWER.md +43 -164
- package/workflows/powers/webapp-testing/SKILL.md +43 -164
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +65 -42
- package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +8 -6
- package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +65 -41
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +8 -6
- package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +9 -8
- 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:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
##
|
|
15
|
+
## Purpose
|
|
26
16
|
|
|
27
|
-
|
|
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
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
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
|
-
##
|
|
28
|
+
## Instructions
|
|
40
29
|
|
|
41
|
-
|
|
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 1 — Design the Command Structure
|
|
46
31
|
|
|
47
|
-
|
|
32
|
+
**Naming conventions**:
|
|
48
33
|
|
|
49
|
-
|
|
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
|
-
|
|
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
|
|
61
|
-
├── init
|
|
42
|
+
mycli
|
|
43
|
+
├── init (one-time setup)
|
|
62
44
|
├── config
|
|
63
|
-
│ ├── get <key>
|
|
45
|
+
│ ├── get <key>
|
|
64
46
|
│ ├── set <key> <value>
|
|
65
47
|
│ └── list
|
|
66
|
-
├──
|
|
67
|
-
│ ├──
|
|
68
|
-
│ ├──
|
|
69
|
-
│ └──
|
|
70
|
-
└──
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
````
|