bigpowers 2.7.4 → 2.8.0

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/.pi/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.7.4",
4
- "description": "62 skills — 61 agent skills for spec-driven, test-first software development by solo developers",
3
+ "version": "2.8.0",
4
+ "description": "63 skills — 61 agent skills for spec-driven, test-first software development by solo developers",
5
5
  "keywords": [
6
6
  "pi-package"
7
7
  ],
@@ -0,0 +1,307 @@
1
+ ---
2
+ description: "CI pipeline setup with pre-built templates and local validation. Generates GitHub Actions workflows, validates YAML syntax and permissions, supports dry-run via act/gh. The CI equivalent of wire-observability."
3
+ ---
4
+
5
+
6
+ # Wire CI
7
+
8
+ > **HARD GATE** — Do not ship a project without CI. Run this skill before first merge to main or when adding CI to an existing project.
9
+ >
10
+ > **HARD GATE** — CI that is untestable locally will break every cycle. Always run `--validate` after generating workflows and `--dry-run` before pushing.
11
+
12
+ Generate, validate, and test CI workflows. Detects your project type, produces platform-appropriate GitHub Actions configurations, and provides local verification to catch auth, permissions, and syntax issues before they reach CI.
13
+
14
+ ## What this sets up
15
+
16
+ 1. **CI workflow** — `.github/workflows/ci.yaml` with test, lint, typecheck, build steps
17
+ 2. **Release workflow** — `.github/workflows/release.yaml` with semantic-release (if applicable)
18
+ 3. **`--validate` mode** — checks YAML syntax, workflow permissions, required secrets, and common pitfalls
19
+ 4. **`--dry-run` mode** — runs workflows locally via `act` or `gh workflow run` to prove correctness before push
20
+ 5. **Failure pattern documentation** — common CI failure categories and their fixes
21
+
22
+ ## Process
23
+
24
+ ### 1. Detect project type
25
+
26
+ Read the project root for manifest files to determine which template to use:
27
+
28
+ | Manifest | Type | Template |
29
+ |----------|------|----------|
30
+ | `Cargo.toml` | Rust | Rust CI: test, clippy, fmt, build |
31
+ | `package.json` | Node | Node CI: test, lint, typecheck, build |
32
+ | `setup.py` / `pyproject.toml` | Python | Python CI: pytest, ruff/mypy/flake8, build |
33
+ | `go.mod` | Go | Go CI: test, vet, staticcheck, build |
34
+ | `CMakeLists.txt` | C/C++ | C/C++ CI: cmake build, ctest |
35
+ | Multiple detected | Polyglot | Combined workflows or error if ambiguous |
36
+
37
+ If no manifest is found, prompt the user to specify the type or pass `--type <rust|node|python|go|cpp>`.
38
+
39
+ ### 2. Generate CI workflow
40
+
41
+ Create `.github/workflows/ci.yaml` with standard steps derived from the project type and its manifest:
42
+
43
+ **Rust template (`Cargo.toml`):**
44
+ ```yaml
45
+ name: CI
46
+ on: [push, pull_request]
47
+ jobs:
48
+ test:
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+ - uses: actions-rust/toolchain@v1
53
+ with:
54
+ toolchain: stable
55
+ components: clippy, rustfmt
56
+ - run: cargo fmt --all -- --check
57
+ - run: cargo clippy -- -D warnings
58
+ - run: cargo test
59
+ - run: cargo build --release
60
+ ```
61
+
62
+ **Node template (`package.json`):**
63
+ ```yaml
64
+ name: CI
65
+ on: [push, pull_request]
66
+ jobs:
67
+ test:
68
+ runs-on: ubuntu-latest
69
+ steps:
70
+ - uses: actions/checkout@v4
71
+ - uses: actions/setup-node@v4
72
+ with:
73
+ node-version: 20
74
+ cache: npm
75
+ - run: npm ci
76
+ - run: npm test
77
+ - run: npm run lint 2>/dev/null || true
78
+ - run: npm run typecheck 2>/dev/null || true
79
+ - run: npm run build 2>/dev/null || true
80
+ ```
81
+
82
+ **Python template (`setup.py` / `pyproject.toml`):**
83
+ ```yaml
84
+ name: CI
85
+ on: [push, pull_request]
86
+ jobs:
87
+ test:
88
+ runs-on: ubuntu-latest
89
+ steps:
90
+ - uses: actions/checkout@v4
91
+ - uses: actions/setup-python@v5
92
+ with:
93
+ python-version: "3.12"
94
+ cache: pip
95
+ - run: pip install -e ".[dev]" || pip install -e .
96
+ - run: pip install pytest ruff mypy
97
+ - run: ruff check .
98
+ - run: mypy . 2>/dev/null || true
99
+ - run: pytest
100
+ ```
101
+
102
+ **Go template (`go.mod`):**
103
+ ```yaml
104
+ name: CI
105
+ on: [push, pull_request]
106
+ jobs:
107
+ test:
108
+ runs-on: ubuntu-latest
109
+ steps:
110
+ - uses: actions/checkout@v4
111
+ - uses: actions/setup-go@v5
112
+ with:
113
+ go-version: stable
114
+ cache: true
115
+ - run: go vet ./...
116
+ - run: go test ./...
117
+ - run: go build ./...
118
+ ```
119
+
120
+ **C/C++ template (`CMakeLists.txt`):**
121
+ ```yaml
122
+ name: CI
123
+ on: [push, pull_request]
124
+ jobs:
125
+ test:
126
+ runs-on: ubuntu-latest
127
+ steps:
128
+ - uses: actions/checkout@v4
129
+ - run: cmake -B build
130
+ - run: cmake --build build
131
+ - run: ctest --test-dir build
132
+ ```
133
+
134
+ ### 3. Generate release workflow (if semantic-release detected)
135
+
136
+ If the project has semantic-release configured (in `package.json`, `.releaserc`, or `release.config.js`), also generate `.github/workflows/release.yaml`:
137
+
138
+ ```yaml
139
+ name: Release
140
+ on:
141
+ push:
142
+ branches: [main]
143
+ jobs:
144
+ release:
145
+ runs-on: ubuntu-latest
146
+ permissions:
147
+ contents: write
148
+ issues: write
149
+ pull-requests: write
150
+ id-token: write
151
+ steps:
152
+ - uses: actions/checkout@v4
153
+ with:
154
+ fetch-depth: 0
155
+ - uses: actions/setup-node@v4
156
+ with:
157
+ node-version: 20
158
+ cache: npm
159
+ - run: npm ci
160
+ - run: npm run build 2>/dev/null || true
161
+ - run: npx semantic-release
162
+ env:
163
+ GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
164
+ NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
165
+ ```
166
+
167
+ > **NPM_TOKEN is required** for publishing to npm. Without it, semantic-release will fail at the publish step. See `--validate` to check this.
168
+
169
+ ### 4. Validate workflows (`--validate`)
170
+
171
+ Run `wire-ci --validate` to check all generated workflow files:
172
+
173
+ ```bash
174
+ # Validate YAML syntax
175
+ for f in .github/workflows/*.yaml; do
176
+ python3 -c "import yaml; yaml.safe_load(open('$f'))" || echo "FAIL: $f has YAML syntax errors"
177
+ done
178
+
179
+ # Check permissions block presence
180
+ for f in .github/workflows/*.yaml; do
181
+ if grep -q "permissions:" "$f"; then
182
+ echo "OK: $f has permissions block"
183
+ else
184
+ echo "WARNING: $f missing permissions block — add one for security"
185
+ fi
186
+ done
187
+
188
+ # Check for npm publish without NPM_TOKEN
189
+ for f in .github/workflows/*.yaml; do
190
+ if grep -q "npm publish\|npx semantic-release" "$f"; then
191
+ if ! grep -q "NPM_TOKEN" "$f"; then
192
+ echo "WARNING: $f has npm publish/semantic-release but no NPM_TOKEN secret"
193
+ fi
194
+ fi
195
+ done
196
+
197
+ # Check for hardcoded Node versions
198
+ for f in .github/workflows/*.yaml; do
199
+ if grep -q "node-version: [0-9]" "$f" && grep -qv "node-version-file\|\.nvmrc" "$f"; then
200
+ echo "NOTE: $f has hardcoded Node version — consider using .nvmrc instead"
201
+ fi
202
+ done
203
+
204
+ # Check for common secrets reference errors
205
+ for f in .github/workflows/*.yaml; do
206
+ # Secrets referencing something that doesn't exist in the workflow
207
+ grep -oP 'secrets\.\w+' "$f" | sort -u | while read -r secret; do
208
+ echo "REF: $f references $secret"
209
+ done
210
+ done
211
+ ```
212
+
213
+ **Exit codes:**
214
+ - `0` — all checks pass (no errors)
215
+ - `1` — YAML syntax errors found
216
+ - `2` — validation warnings only (missing permissions, secrets, etc.)
217
+
218
+ ### 5. Dry-run workflows (`--dry-run`)
219
+
220
+ Attempt to run the generated workflows locally to catch errors before push:
221
+
222
+ ```bash
223
+ # Option A: Use act (recommended)
224
+ if command -v act &>/dev/null; then
225
+ act push --dry-run
226
+ echo "OK: act dry-run completed"
227
+ elif command -v gh &>/dev/null; then
228
+ # Option B: Use gh workflow run (remote test, no local docker)
229
+ gh workflow run ci.yaml --ref "$(git branch --show-current)"
230
+ echo "OK: CI workflow dispatched. Check status: gh run list"
231
+ else
232
+ echo "NOTE: Install act (https://github.com/nektos/act) for full local dry-run"
233
+ echo " Install gh CLI for remote dry-run"
234
+ fi
235
+ ```
236
+
237
+ > **act** runs workflows in a local Docker environment — the most accurate pre-push validation.
238
+ > **gh workflow run** sends the workflow to GitHub but doesn't execute locally — useful for checking YAML parsing but not for testing the actual steps.
239
+
240
+ ### 6. Document common CI failure patterns
241
+
242
+ Add the following to the project's documentation or CLAUDE.md after setup:
243
+
244
+ | Failure | Cause | Fix |
245
+ |---------|-------|-----|
246
+ | `npm publish` fails | `NPM_TOKEN` not set as repo secret | Add `NPM_TOKEN` to GitHub repo secrets |
247
+ | `semantic-release` fails on push | Missing `permissions: contents: write` | Add `permissions: contents: write` to release job |
248
+ | `cargo publish` auth fail | `CARGO_REGISTRY_TOKEN` not set | Add token to `~/.cargo/config.toml` or env |
249
+ | `go vet` fails | Go version mismatch | Match `go.mod` `go` directive with setup-go version |
250
+ | `cargo clippy` errors | New lints in Rust nightly | `cargo clippy --fix` or allow specific lints |
251
+ | `act` not found | Docker not running or act not installed | `brew install act` / `docker ps` to verify Docker |
252
+ | Hardcoded Node version stale | `.nvmrc` exists but workflow uses hardcoded version | Use `node-version-file: .nvmrc` instead |
253
+
254
+ ## Examples
255
+
256
+ ### Create CI for a Rust project
257
+
258
+ ```bash
259
+ # Detect from Cargo.toml, generate workflows
260
+ wire-ci
261
+
262
+ # Validate generated workflows
263
+ wire-ci --validate
264
+
265
+ # Run locally with act
266
+ wire-ci --dry-run
267
+ ```
268
+
269
+ ### Create CI for a Node project with semantic-release
270
+
271
+ ```bash
272
+ wire-ci
273
+ wire-ci --validate
274
+ # Expect warning: "npm publish step found but no NPM_TOKEN in secrets"
275
+ # Fix: add NPM_TOKEN to repo secrets
276
+ ```
277
+
278
+ ### Validate existing workflows (no generation)
279
+
280
+ ```bash
281
+ wire-ci --validate --check-only
282
+ ```
283
+
284
+ ## Options
285
+
286
+ | Flag | Description |
287
+ |------|-------------|
288
+ | `--validate` | Check YAML syntax, permissions, secrets, common pitfalls |
289
+ | `--dry-run` | Run workflows locally via `act` or dispatch via `gh` |
290
+ | `--check-only` | Only validate, do not generate new files |
291
+ | `--type <type>` | Force project type (skip auto-detection) |
292
+ | `--force` | Overwrite existing workflow files |
293
+ | `--no-release` | Skip release workflow generation even if semantic-release detected |
294
+
295
+ ## Integration with build-epic
296
+
297
+ When `wire-ci` is used as part of `build-epic`:
298
+
299
+ 1. **During develop-tdd**: If the task modifies `.github/workflows/`, run `wire-ci --validate` as a CI dry-run sub-step
300
+ 2. **During release-branch**: After push, run `gh run list --limit 1 --branch main --json status,conclusion` to verify CI passes
301
+
302
+ ## Verify
303
+
304
+ → verify: `test -f wire-ci/SKILL.md && echo "OK: skill file exists" || echo "FAIL: no skill file"`
305
+ → verify: `grep -q "name: wire-ci" wire-ci/SKILL.md && echo "OK: frontmatter" || echo "FAIL: frontmatter"`
306
+ → verify: `grep -ci "template\|workflow\|validate\|dry.run" wire-ci/SKILL.md | awk '{if($1>=3) print "OK: semantics"; else print "FAIL: missing"}'`
307
+ → verify: `grep -q "wire-ci" SKILL-INDEX.md && echo "OK: in SKILL-INDEX" || echo "FAIL: not indexed"`
@@ -0,0 +1,309 @@
1
+ ---
2
+ name: wire-ci
3
+ description: "\"CI pipeline setup with pre-built templates and local validation. Generates GitHub Actions workflows, validates YAML syntax and permissions, supports dry-run via act/gh. The CI equivalent of wire-observability.\""
4
+ model: sonnet
5
+ ---
6
+
7
+
8
+ # Wire CI
9
+
10
+ > **HARD GATE** — Do not ship a project without CI. Run this skill before first merge to main or when adding CI to an existing project.
11
+ >
12
+ > **HARD GATE** — CI that is untestable locally will break every cycle. Always run `--validate` after generating workflows and `--dry-run` before pushing.
13
+
14
+ Generate, validate, and test CI workflows. Detects your project type, produces platform-appropriate GitHub Actions configurations, and provides local verification to catch auth, permissions, and syntax issues before they reach CI.
15
+
16
+ ## What this sets up
17
+
18
+ 1. **CI workflow** — `.github/workflows/ci.yaml` with test, lint, typecheck, build steps
19
+ 2. **Release workflow** — `.github/workflows/release.yaml` with semantic-release (if applicable)
20
+ 3. **`--validate` mode** — checks YAML syntax, workflow permissions, required secrets, and common pitfalls
21
+ 4. **`--dry-run` mode** — runs workflows locally via `act` or `gh workflow run` to prove correctness before push
22
+ 5. **Failure pattern documentation** — common CI failure categories and their fixes
23
+
24
+ ## Process
25
+
26
+ ### 1. Detect project type
27
+
28
+ Read the project root for manifest files to determine which template to use:
29
+
30
+ | Manifest | Type | Template |
31
+ |----------|------|----------|
32
+ | `Cargo.toml` | Rust | Rust CI: test, clippy, fmt, build |
33
+ | `package.json` | Node | Node CI: test, lint, typecheck, build |
34
+ | `setup.py` / `pyproject.toml` | Python | Python CI: pytest, ruff/mypy/flake8, build |
35
+ | `go.mod` | Go | Go CI: test, vet, staticcheck, build |
36
+ | `CMakeLists.txt` | C/C++ | C/C++ CI: cmake build, ctest |
37
+ | Multiple detected | Polyglot | Combined workflows or error if ambiguous |
38
+
39
+ If no manifest is found, prompt the user to specify the type or pass `--type <rust|node|python|go|cpp>`.
40
+
41
+ ### 2. Generate CI workflow
42
+
43
+ Create `.github/workflows/ci.yaml` with standard steps derived from the project type and its manifest:
44
+
45
+ **Rust template (`Cargo.toml`):**
46
+ ```yaml
47
+ name: CI
48
+ on: [push, pull_request]
49
+ jobs:
50
+ test:
51
+ runs-on: ubuntu-latest
52
+ steps:
53
+ - uses: actions/checkout@v4
54
+ - uses: actions-rust/toolchain@v1
55
+ with:
56
+ toolchain: stable
57
+ components: clippy, rustfmt
58
+ - run: cargo fmt --all -- --check
59
+ - run: cargo clippy -- -D warnings
60
+ - run: cargo test
61
+ - run: cargo build --release
62
+ ```
63
+
64
+ **Node template (`package.json`):**
65
+ ```yaml
66
+ name: CI
67
+ on: [push, pull_request]
68
+ jobs:
69
+ test:
70
+ runs-on: ubuntu-latest
71
+ steps:
72
+ - uses: actions/checkout@v4
73
+ - uses: actions/setup-node@v4
74
+ with:
75
+ node-version: 20
76
+ cache: npm
77
+ - run: npm ci
78
+ - run: npm test
79
+ - run: npm run lint 2>/dev/null || true
80
+ - run: npm run typecheck 2>/dev/null || true
81
+ - run: npm run build 2>/dev/null || true
82
+ ```
83
+
84
+ **Python template (`setup.py` / `pyproject.toml`):**
85
+ ```yaml
86
+ name: CI
87
+ on: [push, pull_request]
88
+ jobs:
89
+ test:
90
+ runs-on: ubuntu-latest
91
+ steps:
92
+ - uses: actions/checkout@v4
93
+ - uses: actions/setup-python@v5
94
+ with:
95
+ python-version: "3.12"
96
+ cache: pip
97
+ - run: pip install -e ".[dev]" || pip install -e .
98
+ - run: pip install pytest ruff mypy
99
+ - run: ruff check .
100
+ - run: mypy . 2>/dev/null || true
101
+ - run: pytest
102
+ ```
103
+
104
+ **Go template (`go.mod`):**
105
+ ```yaml
106
+ name: CI
107
+ on: [push, pull_request]
108
+ jobs:
109
+ test:
110
+ runs-on: ubuntu-latest
111
+ steps:
112
+ - uses: actions/checkout@v4
113
+ - uses: actions/setup-go@v5
114
+ with:
115
+ go-version: stable
116
+ cache: true
117
+ - run: go vet ./...
118
+ - run: go test ./...
119
+ - run: go build ./...
120
+ ```
121
+
122
+ **C/C++ template (`CMakeLists.txt`):**
123
+ ```yaml
124
+ name: CI
125
+ on: [push, pull_request]
126
+ jobs:
127
+ test:
128
+ runs-on: ubuntu-latest
129
+ steps:
130
+ - uses: actions/checkout@v4
131
+ - run: cmake -B build
132
+ - run: cmake --build build
133
+ - run: ctest --test-dir build
134
+ ```
135
+
136
+ ### 3. Generate release workflow (if semantic-release detected)
137
+
138
+ If the project has semantic-release configured (in `package.json`, `.releaserc`, or `release.config.js`), also generate `.github/workflows/release.yaml`:
139
+
140
+ ```yaml
141
+ name: Release
142
+ on:
143
+ push:
144
+ branches: [main]
145
+ jobs:
146
+ release:
147
+ runs-on: ubuntu-latest
148
+ permissions:
149
+ contents: write
150
+ issues: write
151
+ pull-requests: write
152
+ id-token: write
153
+ steps:
154
+ - uses: actions/checkout@v4
155
+ with:
156
+ fetch-depth: 0
157
+ - uses: actions/setup-node@v4
158
+ with:
159
+ node-version: 20
160
+ cache: npm
161
+ - run: npm ci
162
+ - run: npm run build 2>/dev/null || true
163
+ - run: npx semantic-release
164
+ env:
165
+ GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
166
+ NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
167
+ ```
168
+
169
+ > **NPM_TOKEN is required** for publishing to npm. Without it, semantic-release will fail at the publish step. See `--validate` to check this.
170
+
171
+ ### 4. Validate workflows (`--validate`)
172
+
173
+ Run `wire-ci --validate` to check all generated workflow files:
174
+
175
+ ```bash
176
+ # Validate YAML syntax
177
+ for f in .github/workflows/*.yaml; do
178
+ python3 -c "import yaml; yaml.safe_load(open('$f'))" || echo "FAIL: $f has YAML syntax errors"
179
+ done
180
+
181
+ # Check permissions block presence
182
+ for f in .github/workflows/*.yaml; do
183
+ if grep -q "permissions:" "$f"; then
184
+ echo "OK: $f has permissions block"
185
+ else
186
+ echo "WARNING: $f missing permissions block — add one for security"
187
+ fi
188
+ done
189
+
190
+ # Check for npm publish without NPM_TOKEN
191
+ for f in .github/workflows/*.yaml; do
192
+ if grep -q "npm publish\|npx semantic-release" "$f"; then
193
+ if ! grep -q "NPM_TOKEN" "$f"; then
194
+ echo "WARNING: $f has npm publish/semantic-release but no NPM_TOKEN secret"
195
+ fi
196
+ fi
197
+ done
198
+
199
+ # Check for hardcoded Node versions
200
+ for f in .github/workflows/*.yaml; do
201
+ if grep -q "node-version: [0-9]" "$f" && grep -qv "node-version-file\|\.nvmrc" "$f"; then
202
+ echo "NOTE: $f has hardcoded Node version — consider using .nvmrc instead"
203
+ fi
204
+ done
205
+
206
+ # Check for common secrets reference errors
207
+ for f in .github/workflows/*.yaml; do
208
+ # Secrets referencing something that doesn't exist in the workflow
209
+ grep -oP 'secrets\.\w+' "$f" | sort -u | while read -r secret; do
210
+ echo "REF: $f references $secret"
211
+ done
212
+ done
213
+ ```
214
+
215
+ **Exit codes:**
216
+ - `0` — all checks pass (no errors)
217
+ - `1` — YAML syntax errors found
218
+ - `2` — validation warnings only (missing permissions, secrets, etc.)
219
+
220
+ ### 5. Dry-run workflows (`--dry-run`)
221
+
222
+ Attempt to run the generated workflows locally to catch errors before push:
223
+
224
+ ```bash
225
+ # Option A: Use act (recommended)
226
+ if command -v act &>/dev/null; then
227
+ act push --dry-run
228
+ echo "OK: act dry-run completed"
229
+ elif command -v gh &>/dev/null; then
230
+ # Option B: Use gh workflow run (remote test, no local docker)
231
+ gh workflow run ci.yaml --ref "$(git branch --show-current)"
232
+ echo "OK: CI workflow dispatched. Check status: gh run list"
233
+ else
234
+ echo "NOTE: Install act (https://github.com/nektos/act) for full local dry-run"
235
+ echo " Install gh CLI for remote dry-run"
236
+ fi
237
+ ```
238
+
239
+ > **act** runs workflows in a local Docker environment — the most accurate pre-push validation.
240
+ > **gh workflow run** sends the workflow to GitHub but doesn't execute locally — useful for checking YAML parsing but not for testing the actual steps.
241
+
242
+ ### 6. Document common CI failure patterns
243
+
244
+ Add the following to the project's documentation or CLAUDE.md after setup:
245
+
246
+ | Failure | Cause | Fix |
247
+ |---------|-------|-----|
248
+ | `npm publish` fails | `NPM_TOKEN` not set as repo secret | Add `NPM_TOKEN` to GitHub repo secrets |
249
+ | `semantic-release` fails on push | Missing `permissions: contents: write` | Add `permissions: contents: write` to release job |
250
+ | `cargo publish` auth fail | `CARGO_REGISTRY_TOKEN` not set | Add token to `~/.cargo/config.toml` or env |
251
+ | `go vet` fails | Go version mismatch | Match `go.mod` `go` directive with setup-go version |
252
+ | `cargo clippy` errors | New lints in Rust nightly | `cargo clippy --fix` or allow specific lints |
253
+ | `act` not found | Docker not running or act not installed | `brew install act` / `docker ps` to verify Docker |
254
+ | Hardcoded Node version stale | `.nvmrc` exists but workflow uses hardcoded version | Use `node-version-file: .nvmrc` instead |
255
+
256
+ ## Examples
257
+
258
+ ### Create CI for a Rust project
259
+
260
+ ```bash
261
+ # Detect from Cargo.toml, generate workflows
262
+ wire-ci
263
+
264
+ # Validate generated workflows
265
+ wire-ci --validate
266
+
267
+ # Run locally with act
268
+ wire-ci --dry-run
269
+ ```
270
+
271
+ ### Create CI for a Node project with semantic-release
272
+
273
+ ```bash
274
+ wire-ci
275
+ wire-ci --validate
276
+ # Expect warning: "npm publish step found but no NPM_TOKEN in secrets"
277
+ # Fix: add NPM_TOKEN to repo secrets
278
+ ```
279
+
280
+ ### Validate existing workflows (no generation)
281
+
282
+ ```bash
283
+ wire-ci --validate --check-only
284
+ ```
285
+
286
+ ## Options
287
+
288
+ | Flag | Description |
289
+ |------|-------------|
290
+ | `--validate` | Check YAML syntax, permissions, secrets, common pitfalls |
291
+ | `--dry-run` | Run workflows locally via `act` or dispatch via `gh` |
292
+ | `--check-only` | Only validate, do not generate new files |
293
+ | `--type <type>` | Force project type (skip auto-detection) |
294
+ | `--force` | Overwrite existing workflow files |
295
+ | `--no-release` | Skip release workflow generation even if semantic-release detected |
296
+
297
+ ## Integration with build-epic
298
+
299
+ When `wire-ci` is used as part of `build-epic`:
300
+
301
+ 1. **During develop-tdd**: If the task modifies `.github/workflows/`, run `wire-ci --validate` as a CI dry-run sub-step
302
+ 2. **During release-branch**: After push, run `gh run list --limit 1 --branch main --json status,conclusion` to verify CI passes
303
+
304
+ ## Verify
305
+
306
+ → verify: `test -f wire-ci/SKILL.md && echo "OK: skill file exists" || echo "FAIL: no skill file"`
307
+ → verify: `grep -q "name: wire-ci" wire-ci/SKILL.md && echo "OK: frontmatter" || echo "FAIL: frontmatter"`
308
+ → verify: `grep -ci "template\|workflow\|validate\|dry.run" wire-ci/SKILL.md | awk '{if($1>=3) print "OK: semantics"; else print "FAIL: missing"}'`
309
+ → verify: `grep -q "wire-ci" SKILL-INDEX.md && echo "OK: in SKILL-INDEX" || echo "FAIL: not indexed"`
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.8.0](https://github.com/danielvm-git/bigpowers/compare/v2.7.5...v2.8.0) (2026-06-20)
2
+
3
+
4
+ ### Features
5
+
6
+ * **skills:** add wire-ci CI pipeline skill ([7196579](https://github.com/danielvm-git/bigpowers/commit/71965799376ec894f48a957626455142beb5080b))
7
+
8
+ ## [2.7.5](https://github.com/danielvm-git/bigpowers/compare/v2.7.4...v2.7.5) (2026-06-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **ci:** force LC_ALL=C sort in sync-skills.sh for cross-platform determinism ([9997855](https://github.com/danielvm-git/bigpowers/commit/99978552bba91c371d836b7292bc1e6ae5ecadcb))
14
+
1
15
  ## [2.7.4](https://github.com/danielvm-git/bigpowers/compare/v2.7.3...v2.7.4) (2026-06-20)
2
16
 
3
17
 
package/SKILL-INDEX.md CHANGED
@@ -3,8 +3,8 @@
3
3
  > **DO NOT EDIT** — This file is auto-generated by `scripts/generate-skill-index.sh`.
4
4
  > Edit `SKILL.md` source files or `skills-lock.json` instead. Run `bash scripts/sync-skills.sh` to regenerate.
5
5
 
6
- **Generated:** 2026-06-20T19:29:29Z
7
- **Skills:** 62
6
+ **Generated:** 2026-06-20T21:22:23Z
7
+ **Skills:** 63
8
8
 
9
9
  ---
10
10
 
@@ -15,11 +15,11 @@
15
15
  | Discover | 6 | `elaborate-spec, map-codebase, research-first, search-skills, survey-context, using-bigpowers` |
16
16
  | Design | 7 | `deepen-architecture, define-language, define-success, design-interface, grill-me, grill-with-docs, model-domain` |
17
17
  | Plan | 9 | `assess-impact, change-request, plan-refactor, plan-release, plan-work, run-planning, scope-work, seed-conventions, slice-tasks` |
18
- | Build | 12 | `align-grid, build-epic, craft-skill, develop-tdd, execute-plan, guard-git, hook-commits, kickoff-branch, orchestrate-project, setup-environment, spike-prototype, wire-observability` |
18
+ | Build | 13 | `align-grid, build-epic, craft-skill, develop-tdd, execute-plan, guard-git, hook-commits, kickoff-branch, orchestrate-project, setup-environment, spike-prototype, wire-ci, wire-observability` |
19
19
  | Verify | 12 | `audit-code, diagnose-root, enforce-first, fix-bug, inspect-quality, investigate-bug, request-review, respond-review, run-evals, trace-requirement, validate-fix, verify-work` |
20
20
  | Release | 2 | `commit-message, release-branch` |
21
21
  | Sustain | 13 | `compose-workflow, delegate-task, dispatch-agents, edit-document, evolve-skill, migrate-spec, organize-workspace, reset-baseline, session-state, simulate-agents, stocktake-skills, terse-mode, write-document` |
22
- | **TOTAL** | **61** | |
22
+ | **TOTAL** | **62** | |
23
23
 
24
24
  ---
25
25
 
@@ -60,36 +60,37 @@
60
60
  | 31 | Build | `orchestrate-project` | Meta-skill that enforces the 6-phase core loop (discover → elaborate → plan | ✅ Active |
61
61
  | 32 | Build | `setup-environment` | Pre-install dependencies and configure tools before development work begins. Use | ✅ Active |
62
62
  | 33 | Build | `spike-prototype` | Throw-away prototype for unknown problem spaces. Output is learning notes in spe | ✅ Active |
63
- | 34 | Build | `wire-observability` | Add structured JSON logging, observability commands, and idempotent setup script | ✅ Active |
64
- | 35 | Verify | `audit-code` | Self-review checklist for the coding agent to run before dispatching a reviewer. | ✅ Active |
65
- | 36 | Verify | `diagnose-root` | Run 4-phase root cause analysis reproduce, isolate, hypothesize, verify. Use | ✅ Active |
66
- | 37 | Verify | `enforce-first` | Apply the F.I.R.S.T test quality rubric (Fast, Independent, Repeatable, Self-Val | ✅ Active |
67
- | 38 | Verify | `fix-bug` | Bug fix orchestrator active_flow fix_bug; reads specs/bugs/BUG-*.md; chains | ✅ Active |
68
- | 39 | Verify | `inspect-quality` | Interactive QA session where user reports bugs or issues conversationally, and t | ✅ Active |
69
- | 40 | Verify | `investigate-bug` | Investigate a bug or issue by exploring the codebase to find root cause, then wr | ✅ Active |
70
- | 41 | Verify | `request-review` | Dispatch a fresh reviewer agent with a clean context to critique the code after | ✅ Active |
71
- | 42 | Verify | `respond-review` | Act on a reviewer agent's feedback systematically categorize findings, apply | ✅ Active |
72
- | 43 | Verify | `run-evals` | Eval-Driven Development define capability and regression evals before buildi | ✅ Active |
73
- | 44 | Verify | `trace-requirement` | Link story IDs from specs/release-plan.yaml + epic capsule directories to the im | ✅ Active |
74
- | 45 | Verify | `validate-fix` | Prove a fix works before declaring done re-run the failing test, run the ful | ✅ Active |
75
- | 46 | Verify | `verify-work` | Multi-phase UAT gatecold-start smoke, build, typecheck, lint, tests, step-b | ✅ Active |
76
- | 47 | Release | `commit-message` | Reviews working-tree changes, then drafts a Conventional Commits title/body and | ✅ Active |
77
- | 48 | Release | `release-branch` | Make the merge/PR/keep/discard decision for a feature branch, verify coverage ga | ✅ Active |
78
- | 49 | Sustain | `compose-workflow` | Chain multiple bigpowers skills into a custom workflow recipe saved in specs/. U | ✅ Active |
79
- | 50 | Sustain | `delegate-task` | Delegate one complex task to a single subagent, review its work in two stages be | ✅ Active |
80
- | 51 | Sustain | `dispatch-agents` | Dispatch multiple subagents in parallel on independent tasks. No waiting between | ✅ Active |
81
- | 52 | Sustain | `edit-document` | Edit and improve documents by restructuring sections, improving clarity, and tig | ✅ Active |
82
- | 53 | Sustain | `evolve-skill` | Benchmark-gated skill evolution consume bigpowers-benchmark report, propose | ✅ Active |
83
- | 54 | Sustain | `migrate-spec` | Detect GSD, spec-kit, or BMAD spec artifacts and transform them into bigpowers Y | ✅ Active |
84
- | 55 | Sustain | `organize-workspace` | Scans the active workspace for disposable artifacts—logs, caches, stale build | ✅ Active |
85
- | 56 | Sustain | `reset-baseline` | Restore the project to a known clean state between agent runs or experiments. Us | ✅ Active |
86
- | 57 | Sustain | `session-state` | Track implementation decisions and progress in specs/state.yaml to prevent conte | ✅ Active |
87
- | 58 | Sustain | `simulate-agents` | Run Mock User and Auditor agents against a feature in fresh contexts before huma | ✅ Active |
88
- | 59 | Sustain | `stocktake-skills` | Sequential subagent batch audit of the bigpowers skill catalog Quick Scan (c | ✅ Active |
89
- | 60 | Sustain | `terse-mode` | Fallback ultra-compressed communication mode. Cuts token usage ~75% by dropping | ✅ Active |
90
- | 61 | Sustain | `write-document` | Write, organize, and sync high-integrity technical documents using the BMAD meth | ✅ Active |
91
-
92
- **Total: 61 active skills.**
63
+ | 34 | Build | `wire-ci` | "CI pipeline setup with pre-built templates and local validation. Generates GitH | ✅ Active |
64
+ | 35 | Build | `wire-observability` | Add structured JSON logging, observability commands, and idempotent setup script | ✅ Active |
65
+ | 36 | Verify | `audit-code` | Self-review checklist for the coding agent to run before dispatching a reviewer. | ✅ Active |
66
+ | 37 | Verify | `diagnose-root` | Run 4-phase root cause analysis reproduce, isolate, hypothesize, verify. Use | ✅ Active |
67
+ | 38 | Verify | `enforce-first` | Apply the F.I.R.S.T test quality rubric (Fast, Independent, Repeatable, Self-Val | ✅ Active |
68
+ | 39 | Verify | `fix-bug` | Bug fix orchestrator active_flow fix_bug; reads specs/bugs/BUG-*.md; chains | ✅ Active |
69
+ | 40 | Verify | `inspect-quality` | Interactive QA session where user reports bugs or issues conversationally, and t | ✅ Active |
70
+ | 41 | Verify | `investigate-bug` | Investigate a bug or issue by exploring the codebase to find root cause, then wr | ✅ Active |
71
+ | 42 | Verify | `request-review` | Dispatch a fresh reviewer agent with a clean context to critique the code after | ✅ Active |
72
+ | 43 | Verify | `respond-review` | Act on a reviewer agent's feedback systematically categorize findings, apply | ✅ Active |
73
+ | 44 | Verify | `run-evals` | Eval-Driven Development define capability and regression evals before buildi | ✅ Active |
74
+ | 45 | Verify | `trace-requirement` | Link story IDs from specs/release-plan.yaml + epic capsule directories to the im | ✅ Active |
75
+ | 46 | Verify | `validate-fix` | Prove a fix works before declaring done re-run the failing test, run the ful | ✅ Active |
76
+ | 47 | Verify | `verify-work` | Multi-phase UAT gate — cold-start smoke, build, typecheck, lint, tests, step-b | ✅ Active |
77
+ | 48 | Release | `commit-message` | Reviews working-tree changes, then drafts a Conventional Commits title/body and | ✅ Active |
78
+ | 49 | Release | `release-branch` | Make the merge/PR/keep/discard decision for a feature branch, verify coverage ga | ✅ Active |
79
+ | 50 | Sustain | `compose-workflow` | Chain multiple bigpowers skills into a custom workflow recipe saved in specs/. U | ✅ Active |
80
+ | 51 | Sustain | `delegate-task` | Delegate one complex task to a single subagent, review its work in two stages be | ✅ Active |
81
+ | 52 | Sustain | `dispatch-agents` | Dispatch multiple subagents in parallel on independent tasks. No waiting between | ✅ Active |
82
+ | 53 | Sustain | `edit-document` | Edit and improve documents by restructuring sections, improving clarity, and tig | ✅ Active |
83
+ | 54 | Sustain | `evolve-skill` | Benchmark-gated skill evolution consume bigpowers-benchmark report, propose | ✅ Active |
84
+ | 55 | Sustain | `migrate-spec` | Detect GSD, spec-kit, or BMAD spec artifacts and transform them into bigpowers Y | ✅ Active |
85
+ | 56 | Sustain | `organize-workspace` | Scans the active workspace for disposable artifacts—logs, caches, stale build | ✅ Active |
86
+ | 57 | Sustain | `reset-baseline` | Restore the project to a known clean state between agent runs or experiments. Us | ✅ Active |
87
+ | 58 | Sustain | `session-state` | Track implementation decisions and progress in specs/state.yaml to prevent conte | ✅ Active |
88
+ | 59 | Sustain | `simulate-agents` | Run Mock User and Auditor agents against a feature in fresh contexts before huma | ✅ Active |
89
+ | 60 | Sustain | `stocktake-skills` | Sequential subagent batch audit of the bigpowers skill catalog — Quick Scan (c | ✅ Active |
90
+ | 61 | Sustain | `terse-mode` | Fallback ultra-compressed communication mode. Cuts token usage ~75% by dropping | ✅ Active |
91
+ | 62 | Sustain | `write-document` | Write, organize, and sync high-integrity technical documents using the BMAD meth | ✅ Active |
92
+
93
+ **Total: 62 active skills.**
93
94
 
94
95
  ---
95
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.7.4",
3
+ "version": "2.8.0",
4
4
  "description": "61 agent skills for spec-driven, test-first software development by solo developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -50,6 +50,7 @@ PHASE_MAP=(
50
50
  [craft-skill]="Build"
51
51
  [setup-environment]="Build"
52
52
  [wire-observability]="Build"
53
+ [wire-ci]="Build"
53
54
  [align-grid]="Build"
54
55
  [orchestrate-project]="Build"
55
56
  [guard-git]="Build"
@@ -48,7 +48,7 @@ for skill_dir in "$REPO_ROOT"/*/; do
48
48
  # Strip frontmatter from SKILL.md (content between second --- and EOF)
49
49
  body=$(awk '/^---/{f++; next} f>=2{print}' "$skill_md")
50
50
 
51
- for extra_md in $(find "$skill_dir" -maxdepth 1 -name "*.md" ! -name "SKILL.md" | sort); do
51
+ for extra_md in $(find "$skill_dir" -maxdepth 1 -name "*.md" ! -name "SKILL.md" | LC_ALL=C sort); do
52
52
  body="$body"$'\n\n'"---"$'\n\n'"$(cat "$extra_md")"
53
53
  done
54
54
 
package/skills-lock.json CHANGED
@@ -301,6 +301,11 @@
301
301
  "sha256": "3213e18d4bde52f2",
302
302
  "path": "visual-dashboard/SKILL.md"
303
303
  },
304
+ "wire-ci": {
305
+ "description": "\"CI pipeline setup with pre-built templates and local validation. Generates GitHub Actions workflows, validates YAML syntax and permissions, supports dry-run via act/gh. The CI equivalent of wire-observability.\"",
306
+ "sha256": "dcbf6e1516f6b355",
307
+ "path": "wire-ci/SKILL.md"
308
+ },
304
309
  "wire-observability": {
305
310
  "description": "Add structured JSON logging, observability commands, and idempotent setup scripts to a project. Use when a project needs production-readiness instrumentation, when user wants structured logging, or as a production-readiness gate at any phase of development.",
306
311
  "sha256": "01e751c37dab47b3",
@@ -0,0 +1,308 @@
1
+ ---
2
+ name: wire-ci
3
+ description: "CI pipeline setup with pre-built templates and local validation. Generates GitHub Actions workflows, validates YAML syntax and permissions, supports dry-run via act/gh. The CI equivalent of wire-observability."
4
+ model: sonnet
5
+ ---
6
+
7
+ # Wire CI
8
+
9
+ > **HARD GATE** — Do not ship a project without CI. Run this skill before first merge to main or when adding CI to an existing project.
10
+ >
11
+ > **HARD GATE** — CI that is untestable locally will break every cycle. Always run `--validate` after generating workflows and `--dry-run` before pushing.
12
+
13
+ Generate, validate, and test CI workflows. Detects your project type, produces platform-appropriate GitHub Actions configurations, and provides local verification to catch auth, permissions, and syntax issues before they reach CI.
14
+
15
+ ## What this sets up
16
+
17
+ 1. **CI workflow** — `.github/workflows/ci.yaml` with test, lint, typecheck, build steps
18
+ 2. **Release workflow** — `.github/workflows/release.yaml` with semantic-release (if applicable)
19
+ 3. **`--validate` mode** — checks YAML syntax, workflow permissions, required secrets, and common pitfalls
20
+ 4. **`--dry-run` mode** — runs workflows locally via `act` or `gh workflow run` to prove correctness before push
21
+ 5. **Failure pattern documentation** — common CI failure categories and their fixes
22
+
23
+ ## Process
24
+
25
+ ### 1. Detect project type
26
+
27
+ Read the project root for manifest files to determine which template to use:
28
+
29
+ | Manifest | Type | Template |
30
+ |----------|------|----------|
31
+ | `Cargo.toml` | Rust | Rust CI: test, clippy, fmt, build |
32
+ | `package.json` | Node | Node CI: test, lint, typecheck, build |
33
+ | `setup.py` / `pyproject.toml` | Python | Python CI: pytest, ruff/mypy/flake8, build |
34
+ | `go.mod` | Go | Go CI: test, vet, staticcheck, build |
35
+ | `CMakeLists.txt` | C/C++ | C/C++ CI: cmake build, ctest |
36
+ | Multiple detected | Polyglot | Combined workflows or error if ambiguous |
37
+
38
+ If no manifest is found, prompt the user to specify the type or pass `--type <rust|node|python|go|cpp>`.
39
+
40
+ ### 2. Generate CI workflow
41
+
42
+ Create `.github/workflows/ci.yaml` with standard steps derived from the project type and its manifest:
43
+
44
+ **Rust template (`Cargo.toml`):**
45
+ ```yaml
46
+ name: CI
47
+ on: [push, pull_request]
48
+ jobs:
49
+ test:
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: actions-rust/toolchain@v1
54
+ with:
55
+ toolchain: stable
56
+ components: clippy, rustfmt
57
+ - run: cargo fmt --all -- --check
58
+ - run: cargo clippy -- -D warnings
59
+ - run: cargo test
60
+ - run: cargo build --release
61
+ ```
62
+
63
+ **Node template (`package.json`):**
64
+ ```yaml
65
+ name: CI
66
+ on: [push, pull_request]
67
+ jobs:
68
+ test:
69
+ runs-on: ubuntu-latest
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+ - uses: actions/setup-node@v4
73
+ with:
74
+ node-version: 20
75
+ cache: npm
76
+ - run: npm ci
77
+ - run: npm test
78
+ - run: npm run lint 2>/dev/null || true
79
+ - run: npm run typecheck 2>/dev/null || true
80
+ - run: npm run build 2>/dev/null || true
81
+ ```
82
+
83
+ **Python template (`setup.py` / `pyproject.toml`):**
84
+ ```yaml
85
+ name: CI
86
+ on: [push, pull_request]
87
+ jobs:
88
+ test:
89
+ runs-on: ubuntu-latest
90
+ steps:
91
+ - uses: actions/checkout@v4
92
+ - uses: actions/setup-python@v5
93
+ with:
94
+ python-version: "3.12"
95
+ cache: pip
96
+ - run: pip install -e ".[dev]" || pip install -e .
97
+ - run: pip install pytest ruff mypy
98
+ - run: ruff check .
99
+ - run: mypy . 2>/dev/null || true
100
+ - run: pytest
101
+ ```
102
+
103
+ **Go template (`go.mod`):**
104
+ ```yaml
105
+ name: CI
106
+ on: [push, pull_request]
107
+ jobs:
108
+ test:
109
+ runs-on: ubuntu-latest
110
+ steps:
111
+ - uses: actions/checkout@v4
112
+ - uses: actions/setup-go@v5
113
+ with:
114
+ go-version: stable
115
+ cache: true
116
+ - run: go vet ./...
117
+ - run: go test ./...
118
+ - run: go build ./...
119
+ ```
120
+
121
+ **C/C++ template (`CMakeLists.txt`):**
122
+ ```yaml
123
+ name: CI
124
+ on: [push, pull_request]
125
+ jobs:
126
+ test:
127
+ runs-on: ubuntu-latest
128
+ steps:
129
+ - uses: actions/checkout@v4
130
+ - run: cmake -B build
131
+ - run: cmake --build build
132
+ - run: ctest --test-dir build
133
+ ```
134
+
135
+ ### 3. Generate release workflow (if semantic-release detected)
136
+
137
+ If the project has semantic-release configured (in `package.json`, `.releaserc`, or `release.config.js`), also generate `.github/workflows/release.yaml`:
138
+
139
+ ```yaml
140
+ name: Release
141
+ on:
142
+ push:
143
+ branches: [main]
144
+ jobs:
145
+ release:
146
+ runs-on: ubuntu-latest
147
+ permissions:
148
+ contents: write
149
+ issues: write
150
+ pull-requests: write
151
+ id-token: write
152
+ steps:
153
+ - uses: actions/checkout@v4
154
+ with:
155
+ fetch-depth: 0
156
+ - uses: actions/setup-node@v4
157
+ with:
158
+ node-version: 20
159
+ cache: npm
160
+ - run: npm ci
161
+ - run: npm run build 2>/dev/null || true
162
+ - run: npx semantic-release
163
+ env:
164
+ GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
165
+ NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
166
+ ```
167
+
168
+ > **NPM_TOKEN is required** for publishing to npm. Without it, semantic-release will fail at the publish step. See `--validate` to check this.
169
+
170
+ ### 4. Validate workflows (`--validate`)
171
+
172
+ Run `wire-ci --validate` to check all generated workflow files:
173
+
174
+ ```bash
175
+ # Validate YAML syntax
176
+ for f in .github/workflows/*.yaml; do
177
+ python3 -c "import yaml; yaml.safe_load(open('$f'))" || echo "FAIL: $f has YAML syntax errors"
178
+ done
179
+
180
+ # Check permissions block presence
181
+ for f in .github/workflows/*.yaml; do
182
+ if grep -q "permissions:" "$f"; then
183
+ echo "OK: $f has permissions block"
184
+ else
185
+ echo "WARNING: $f missing permissions block — add one for security"
186
+ fi
187
+ done
188
+
189
+ # Check for npm publish without NPM_TOKEN
190
+ for f in .github/workflows/*.yaml; do
191
+ if grep -q "npm publish\|npx semantic-release" "$f"; then
192
+ if ! grep -q "NPM_TOKEN" "$f"; then
193
+ echo "WARNING: $f has npm publish/semantic-release but no NPM_TOKEN secret"
194
+ fi
195
+ fi
196
+ done
197
+
198
+ # Check for hardcoded Node versions
199
+ for f in .github/workflows/*.yaml; do
200
+ if grep -q "node-version: [0-9]" "$f" && grep -qv "node-version-file\|\.nvmrc" "$f"; then
201
+ echo "NOTE: $f has hardcoded Node version — consider using .nvmrc instead"
202
+ fi
203
+ done
204
+
205
+ # Check for common secrets reference errors
206
+ for f in .github/workflows/*.yaml; do
207
+ # Secrets referencing something that doesn't exist in the workflow
208
+ grep -oP 'secrets\.\w+' "$f" | sort -u | while read -r secret; do
209
+ echo "REF: $f references $secret"
210
+ done
211
+ done
212
+ ```
213
+
214
+ **Exit codes:**
215
+ - `0` — all checks pass (no errors)
216
+ - `1` — YAML syntax errors found
217
+ - `2` — validation warnings only (missing permissions, secrets, etc.)
218
+
219
+ ### 5. Dry-run workflows (`--dry-run`)
220
+
221
+ Attempt to run the generated workflows locally to catch errors before push:
222
+
223
+ ```bash
224
+ # Option A: Use act (recommended)
225
+ if command -v act &>/dev/null; then
226
+ act push --dry-run
227
+ echo "OK: act dry-run completed"
228
+ elif command -v gh &>/dev/null; then
229
+ # Option B: Use gh workflow run (remote test, no local docker)
230
+ gh workflow run ci.yaml --ref "$(git branch --show-current)"
231
+ echo "OK: CI workflow dispatched. Check status: gh run list"
232
+ else
233
+ echo "NOTE: Install act (https://github.com/nektos/act) for full local dry-run"
234
+ echo " Install gh CLI for remote dry-run"
235
+ fi
236
+ ```
237
+
238
+ > **act** runs workflows in a local Docker environment — the most accurate pre-push validation.
239
+ > **gh workflow run** sends the workflow to GitHub but doesn't execute locally — useful for checking YAML parsing but not for testing the actual steps.
240
+
241
+ ### 6. Document common CI failure patterns
242
+
243
+ Add the following to the project's documentation or CLAUDE.md after setup:
244
+
245
+ | Failure | Cause | Fix |
246
+ |---------|-------|-----|
247
+ | `npm publish` fails | `NPM_TOKEN` not set as repo secret | Add `NPM_TOKEN` to GitHub repo secrets |
248
+ | `semantic-release` fails on push | Missing `permissions: contents: write` | Add `permissions: contents: write` to release job |
249
+ | `cargo publish` auth fail | `CARGO_REGISTRY_TOKEN` not set | Add token to `~/.cargo/config.toml` or env |
250
+ | `go vet` fails | Go version mismatch | Match `go.mod` `go` directive with setup-go version |
251
+ | `cargo clippy` errors | New lints in Rust nightly | `cargo clippy --fix` or allow specific lints |
252
+ | `act` not found | Docker not running or act not installed | `brew install act` / `docker ps` to verify Docker |
253
+ | Hardcoded Node version stale | `.nvmrc` exists but workflow uses hardcoded version | Use `node-version-file: .nvmrc` instead |
254
+
255
+ ## Examples
256
+
257
+ ### Create CI for a Rust project
258
+
259
+ ```bash
260
+ # Detect from Cargo.toml, generate workflows
261
+ wire-ci
262
+
263
+ # Validate generated workflows
264
+ wire-ci --validate
265
+
266
+ # Run locally with act
267
+ wire-ci --dry-run
268
+ ```
269
+
270
+ ### Create CI for a Node project with semantic-release
271
+
272
+ ```bash
273
+ wire-ci
274
+ wire-ci --validate
275
+ # Expect warning: "npm publish step found but no NPM_TOKEN in secrets"
276
+ # Fix: add NPM_TOKEN to repo secrets
277
+ ```
278
+
279
+ ### Validate existing workflows (no generation)
280
+
281
+ ```bash
282
+ wire-ci --validate --check-only
283
+ ```
284
+
285
+ ## Options
286
+
287
+ | Flag | Description |
288
+ |------|-------------|
289
+ | `--validate` | Check YAML syntax, permissions, secrets, common pitfalls |
290
+ | `--dry-run` | Run workflows locally via `act` or dispatch via `gh` |
291
+ | `--check-only` | Only validate, do not generate new files |
292
+ | `--type <type>` | Force project type (skip auto-detection) |
293
+ | `--force` | Overwrite existing workflow files |
294
+ | `--no-release` | Skip release workflow generation even if semantic-release detected |
295
+
296
+ ## Integration with build-epic
297
+
298
+ When `wire-ci` is used as part of `build-epic`:
299
+
300
+ 1. **During develop-tdd**: If the task modifies `.github/workflows/`, run `wire-ci --validate` as a CI dry-run sub-step
301
+ 2. **During release-branch**: After push, run `gh run list --limit 1 --branch main --json status,conclusion` to verify CI passes
302
+
303
+ ## Verify
304
+
305
+ → verify: `test -f wire-ci/SKILL.md && echo "OK: skill file exists" || echo "FAIL: no skill file"`
306
+ → verify: `grep -q "name: wire-ci" wire-ci/SKILL.md && echo "OK: frontmatter" || echo "FAIL: frontmatter"`
307
+ → verify: `grep -ci "template\|workflow\|validate\|dry.run" wire-ci/SKILL.md | awk '{if($1>=3) print "OK: semantics"; else print "FAIL: missing"}'`
308
+ → verify: `grep -q "wire-ci" SKILL-INDEX.md && echo "OK: in SKILL-INDEX" || echo "FAIL: not indexed"`