bigpowers 2.34.1 → 2.35.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.
Files changed (48) hide show
  1. package/.pi/package.json +2 -2
  2. package/.pi/prompts/deploy.md +53 -28
  3. package/.pi/prompts/develop-tdd.md +5 -80
  4. package/.pi/prompts/migrate-spec.md +273 -197
  5. package/.pi/prompts/publish-package.md +125 -67
  6. package/.pi/prompts/release-branch.md +85 -69
  7. package/.pi/prompts/security-review.md +323 -0
  8. package/.pi/prompts/smoke-test.md +98 -58
  9. package/.pi/prompts/using-bigpowers.md +2 -2
  10. package/.pi/prompts/validate-contracts.md +169 -54
  11. package/.pi/prompts/wire-ci.md +147 -89
  12. package/.pi/skills/deploy/SKILL.md +53 -28
  13. package/.pi/skills/develop-tdd/SKILL.md +5 -80
  14. package/.pi/skills/migrate-spec/SKILL.md +273 -197
  15. package/.pi/skills/publish-package/SKILL.md +125 -67
  16. package/.pi/skills/release-branch/SKILL.md +85 -69
  17. package/.pi/skills/security-review/SKILL.md +324 -0
  18. package/.pi/skills/smoke-test/SKILL.md +98 -58
  19. package/.pi/skills/using-bigpowers/SKILL.md +2 -2
  20. package/.pi/skills/validate-contracts/SKILL.md +169 -54
  21. package/.pi/skills/wire-ci/SKILL.md +147 -89
  22. package/CHANGELOG.md +14 -0
  23. package/README.md +4 -4
  24. package/SKILL-INDEX.md +2 -2
  25. package/deploy/REFERENCE.md +82 -0
  26. package/deploy/SKILL.md +3 -63
  27. package/develop-tdd/SKILL.md +5 -80
  28. package/migrate-spec/REFERENCE.md +268 -0
  29. package/migrate-spec/SKILL.md +5 -199
  30. package/package.json +2 -2
  31. package/publish-package/REFERENCE.md +239 -0
  32. package/publish-package/SKILL.md +8 -192
  33. package/release-branch/REFERENCE.md +83 -0
  34. package/release-branch/SKILL.md +2 -69
  35. package/scripts/generate-reference-tables.sh +1 -0
  36. package/scripts/sync-skills.sh +4 -1
  37. package/security-review/REFERENCE-confidence-rubric.md +85 -0
  38. package/security-review/REFERENCE-false-positives.md +68 -0
  39. package/security-review/REFERENCE-vuln-categories.md +103 -0
  40. package/security-review/SKILL.md +63 -0
  41. package/skills-lock.json +14 -9
  42. package/smoke-test/REFERENCE.md +162 -0
  43. package/smoke-test/SKILL.md +5 -130
  44. package/using-bigpowers/SKILL.md +2 -2
  45. package/validate-contracts/REFERENCE.md +183 -0
  46. package/validate-contracts/SKILL.md +6 -77
  47. package/wire-ci/REFERENCE.md +257 -0
  48. package/wire-ci/SKILL.md +8 -210
package/wire-ci/SKILL.md CHANGED
@@ -42,128 +42,25 @@ If no manifest is found, prompt the user to specify the type or pass `--type <ru
42
42
  Create `.github/workflows/ci.yaml` with standard steps derived from the project type and its manifest:
43
43
 
44
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
- ```
45
+ See [REFERENCE.md](REFERENCE.md)
62
46
 
63
47
  **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
- ```
48
+ See [REFERENCE.md](REFERENCE.md)
82
49
 
83
50
  **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
- ```
51
+ See [REFERENCE.md](REFERENCE.md)
102
52
 
103
53
  **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
- ```
54
+ See [REFERENCE.md](REFERENCE.md)
120
55
 
121
56
  **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
- ```
57
+ See [REFERENCE.md](REFERENCE.md)
134
58
 
135
59
  ### 3. Generate release workflow (if semantic-release detected)
136
60
 
137
61
  If the project has semantic-release configured (in `package.json`, `.releaserc`, or `release.config.js`), also generate `.github/workflows/release.yaml`:
138
62
 
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
- ```
63
+ See [REFERENCE.md](REFERENCE.md)
167
64
 
168
65
  > **NPM_TOKEN is required** for publishing to npm. Without it, semantic-release will fail at the publish step. See `--validate` to check this.
169
66
 
@@ -171,45 +68,7 @@ jobs:
171
68
 
172
69
  Run `wire-ci --validate` to check all generated workflow files:
173
70
 
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
- ```
71
+ See [REFERENCE.md](REFERENCE.md)
213
72
 
214
73
  **Exit codes:**
215
74
  - `0` — all checks pass (no errors)
@@ -220,20 +79,7 @@ done
220
79
 
221
80
  Attempt to run the generated workflows locally to catch errors before push:
222
81
 
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
- ```
82
+ See [REFERENCE.md](REFERENCE.md)
237
83
 
238
84
  > **act** runs workflows in a local Docker environment — the most accurate pre-push validation.
239
85
  > **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.
@@ -252,54 +98,6 @@ Add the following to the project's documentation or CLAUDE.md after setup:
252
98
  | `act` not found | Docker not running or act not installed | `brew install act` / `docker ps` to verify Docker |
253
99
  | Hardcoded Node version stale | `.nvmrc` exists but workflow uses hardcoded version | Use `node-version-file: .nvmrc` instead |
254
100
 
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
101
  ## Verify
304
102
 
305
103
  → verify: `test -f wire-ci/SKILL.md && echo "OK: skill file exists" || echo "FAIL: no skill file"`