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
@@ -27,30 +27,13 @@ Three modes of validation:
27
27
 
28
28
  All contract files live in `specs/contracts/` and use YAML:
29
29
 
30
- ```
31
- specs/contracts/
32
- ├── users.schema.yaml # API response schema
33
- ├── i18n-keys.yaml # Key-set comparison
34
- ├── migration-output.yaml # Data shape contract
35
- └── README.md # Local conventions
36
- ```
30
+ See [REFERENCE.md](REFERENCE.md) for examples.
37
31
 
38
32
  ### 1. API Response Contracts (`--schema`)
39
33
 
40
34
  Define expected API response shapes and validate live endpoints against them:
41
35
 
42
- ```yaml
43
- # specs/contracts/users.schema.yaml
44
- endpoint: /api/users
45
- method: GET
46
- schema:
47
- type: object
48
- required: [id, name, email]
49
- properties:
50
- id: { type: number }
51
- name: { type: string }
52
- email: { type: string, format: email }
53
- ```
36
+ See [REFERENCE.md](REFERENCE.md) for examples.
54
37
 
55
38
  Usage:
56
39
 
@@ -64,52 +47,21 @@ validate-contracts --schema specs/contracts/users.schema.yaml --url https://api.
64
47
 
65
48
  Assert that two data sources share a consistent set of keys:
66
49
 
67
- ```yaml
68
- # specs/contracts/i18n-keys.yaml
69
- sources:
70
- reference: src/frontend/locales/en.json
71
- target: src/backend/messages/en.json
72
- mode: subset # all target keys must exist in reference
73
- ```
50
+ See [REFERENCE.md](REFERENCE.md) for examples.
74
51
 
75
52
  Usage:
76
53
 
77
- ```bash
78
- validate-contracts --key-set specs/contracts/i18n-keys.yaml
79
- # → missing: 2 keys in reference not found in target: ['settings.privacy', 'help.faq']
80
- # → added: 1 key in target not in reference: ['deprecated.field']
81
- # → exit 1 (divergence)
82
- ```
54
+ See [REFERENCE.md](REFERENCE.md) for examples.
83
55
 
84
56
  ### 3. Data Shape Contracts (`--shape`)
85
57
 
86
58
  Validate that a data file matches expected column types and constraints:
87
59
 
88
- ```yaml
89
- # specs/contracts/migration-output.yaml
90
- file: data/users-export.json
91
- format: json
92
- fields:
93
- - name: user_id
94
- type: number
95
- required: true
96
- - name: full_name
97
- type: string
98
- required: true
99
- - name: created_at
100
- type: string
101
- format: date-time
102
- required: false
103
- ```
60
+ See [REFERENCE.md](REFERENCE.md) for examples.
104
61
 
105
62
  Usage:
106
63
 
107
- ```bash
108
- validate-contracts --shape specs/contracts/migration-output.yaml
109
- # → PASS: 3/3 fields validated, 5000 rows OK
110
- # → WARN: field 'full_name' has 12 null values (0.24%)
111
- # → FAIL: field 'user_id' has 3 rows with type string (expected number)
112
- ```
64
+ See [REFERENCE.md](REFERENCE.md) for examples.
113
65
 
114
66
  ## Process
115
67
 
@@ -157,12 +109,172 @@ bash scripts/validate-contracts.sh <contract-file>
157
109
  # → All pass → ready to deploy
158
110
  ```
159
111
 
112
+ ---
113
+
114
+ # Validate Contracts — Reference
115
+
116
+ ## Integration
117
+
118
+ - **Pre-deploy gate:** The `deploy` skill runs `validate-contracts` before smoke-test.
119
+ - **CI pipeline:** JSON Lines output is CI-friendly; pipe to `jq` for assertions.
120
+ - **Pre-migration:** Run `validate-contracts --shape` before consuming migration output.
121
+
122
+
123
+ ---
124
+
125
+ ## Configuration
126
+
127
+ | Variable | Default | Description |
128
+ |----------|---------|-------------|
129
+ | `CONTRACTS_DIR` | `specs/contracts/` | Directory containing contract YAML files |
130
+ | `VALIDATE_ALL` | `false` | If true, run all contracts in the directory |
131
+ | `STRICT_MODE` | `false` | Treat warnings as failures |
132
+ | `OUTPUT_FORMAT` | `text` | `text` or `json` |
133
+
134
+
135
+ ---
136
+
137
+ ## Verification
138
+
139
+ → verify: `test -f validate-contracts/SKILL.md && grep -q 'name: validate-contracts' validate-contracts/SKILL.md && echo OK`
140
+ → verify: `grep -qi 'specs/contracts\|JSON Schema\|key.set\|data.shape' validate-contracts/SKILL.md && echo OK`
141
+ → verify: `grep -ci 'divergence\|missing key\|type mismatch\|diff\|conforms\|column' validate-contracts/SKILL.md | awk '{if($1>=3) print "OK"; else print "FAIL"}'`
142
+ → verify: `grep -ci 'JSON Lines\|machine.parse\|CI\|deploy.*gate\|pre.deploy' validate-contracts/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`
143
+ → verify: `grep -q 'validate-contracts' SKILL-INDEX.md && echo OK`
144
+
145
+ ---
146
+
147
+ ## Reference block 1
148
+
149
+ ```yaml
150
+ # specs/contracts/users.schema.yaml
151
+ endpoint: /api/users
152
+ method: GET
153
+ schema:
154
+ type: object
155
+ required: [id, name, email]
156
+ properties:
157
+ id: { type: number }
158
+ name: { type: string }
159
+ email: { type: string, format: email }
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Reference block 2
165
+
166
+ ```yaml
167
+ # specs/contracts/migration-output.yaml
168
+ file: data/users-export.json
169
+ format: json
170
+ fields:
171
+ - name: user_id
172
+ type: number
173
+ required: true
174
+ - name: full_name
175
+ type: string
176
+ required: true
177
+ - name: created_at
178
+ type: string
179
+ format: date-time
180
+ required: false
181
+ ```
182
+
183
+ ---
184
+
185
+ ## Example 1
186
+
187
+ ```
188
+ specs/contracts/
189
+ ├── users.schema.yaml # API response schema
190
+ ├── i18n-keys.yaml # Key-set comparison
191
+ ├── migration-output.yaml # Data shape contract
192
+ └── README.md # Local conventions
193
+ ```
194
+
195
+ ---
196
+
197
+ ## Example 2
198
+
199
+ ```yaml
200
+ # specs/contracts/users.schema.yaml
201
+ endpoint: /api/users
202
+ method: GET
203
+ schema:
204
+ type: object
205
+ required: [id, name, email]
206
+ properties:
207
+ id: { type: number }
208
+ name: { type: string }
209
+ email: { type: string, format: email }
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Example 3
215
+
216
+ ```yaml
217
+ # specs/contracts/i18n-keys.yaml
218
+ sources:
219
+ reference: src/frontend/locales/en.json
220
+ target: src/backend/messages/en.json
221
+ mode: subset # all target keys must exist in reference
222
+ ```
223
+
224
+ ---
225
+
226
+ ## Example 4
227
+
228
+ ```bash
229
+ validate-contracts --key-set specs/contracts/i18n-keys.yaml
230
+ # → missing: 2 keys in reference not found in target: ['settings.privacy', 'help.faq']
231
+ # → added: 1 key in target not in reference: ['deprecated.field']
232
+ # → exit 1 (divergence)
233
+ ```
234
+
235
+ ---
236
+
237
+ ## Example 5
238
+
239
+ ```yaml
240
+ # specs/contracts/migration-output.yaml
241
+ file: data/users-export.json
242
+ format: json
243
+ fields:
244
+ - name: user_id
245
+ type: number
246
+ required: true
247
+ - name: full_name
248
+ type: string
249
+ required: true
250
+ - name: created_at
251
+ type: string
252
+ format: date-time
253
+ required: false
254
+ ```
255
+
256
+ ---
257
+
258
+ ## Example 6
259
+
260
+ ```bash
261
+ validate-contracts --shape specs/contracts/migration-output.yaml
262
+ # → PASS: 3/3 fields validated, 5000 rows OK
263
+ # → WARN: field 'full_name' has 12 null values (0.24%)
264
+ # → FAIL: field 'user_id' has 3 rows with type string (expected number)
265
+ ```
266
+
267
+ ---
268
+
160
269
  ## Integration
161
270
 
162
271
  - **Pre-deploy gate:** The `deploy` skill runs `validate-contracts` before smoke-test.
163
272
  - **CI pipeline:** JSON Lines output is CI-friendly; pipe to `jq` for assertions.
164
273
  - **Pre-migration:** Run `validate-contracts --shape` before consuming migration output.
165
274
 
275
+
276
+ ---
277
+
166
278
  ## Configuration
167
279
 
168
280
  | Variable | Default | Description |
@@ -172,6 +284,9 @@ bash scripts/validate-contracts.sh <contract-file>
172
284
  | `STRICT_MODE` | `false` | Treat warnings as failures |
173
285
  | `OUTPUT_FORMAT` | `text` | `text` or `json` |
174
286
 
287
+
288
+ ---
289
+
175
290
  ## Verification
176
291
 
177
292
  → verify: `test -f validate-contracts/SKILL.md && grep -q 'name: validate-contracts' validate-contracts/SKILL.md && echo OK`
@@ -41,6 +41,131 @@ If no manifest is found, prompt the user to specify the type or pass `--type <ru
41
41
  Create `.github/workflows/ci.yaml` with standard steps derived from the project type and its manifest:
42
42
 
43
43
  **Rust template (`Cargo.toml`):**
44
+ See [REFERENCE.md](REFERENCE.md)
45
+
46
+ **Node template (`package.json`):**
47
+ See [REFERENCE.md](REFERENCE.md)
48
+
49
+ **Python template (`setup.py` / `pyproject.toml`):**
50
+ See [REFERENCE.md](REFERENCE.md)
51
+
52
+ **Go template (`go.mod`):**
53
+ See [REFERENCE.md](REFERENCE.md)
54
+
55
+ **C/C++ template (`CMakeLists.txt`):**
56
+ See [REFERENCE.md](REFERENCE.md)
57
+
58
+ ### 3. Generate release workflow (if semantic-release detected)
59
+
60
+ If the project has semantic-release configured (in `package.json`, `.releaserc`, or `release.config.js`), also generate `.github/workflows/release.yaml`:
61
+
62
+ See [REFERENCE.md](REFERENCE.md)
63
+
64
+ > **NPM_TOKEN is required** for publishing to npm. Without it, semantic-release will fail at the publish step. See `--validate` to check this.
65
+
66
+ ### 4. Validate workflows (`--validate`)
67
+
68
+ Run `wire-ci --validate` to check all generated workflow files:
69
+
70
+ See [REFERENCE.md](REFERENCE.md)
71
+
72
+ **Exit codes:**
73
+ - `0` — all checks pass (no errors)
74
+ - `1` — YAML syntax errors found
75
+ - `2` — validation warnings only (missing permissions, secrets, etc.)
76
+
77
+ ### 5. Dry-run workflows (`--dry-run`)
78
+
79
+ Attempt to run the generated workflows locally to catch errors before push:
80
+
81
+ See [REFERENCE.md](REFERENCE.md)
82
+
83
+ > **act** runs workflows in a local Docker environment — the most accurate pre-push validation.
84
+ > **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.
85
+
86
+ ### 6. Document common CI failure patterns
87
+
88
+ Add the following to the project's documentation or CLAUDE.md after setup:
89
+
90
+ | Failure | Cause | Fix |
91
+ |---------|-------|-----|
92
+ | `npm publish` fails | `NPM_TOKEN` not set as repo secret | Add `NPM_TOKEN` to GitHub repo secrets |
93
+ | `semantic-release` fails on push | Missing `permissions: contents: write` | Add `permissions: contents: write` to release job |
94
+ | `cargo publish` auth fail | `CARGO_REGISTRY_TOKEN` not set | Add token to `~/.cargo/config.toml` or env |
95
+ | `go vet` fails | Go version mismatch | Match `go.mod` `go` directive with setup-go version |
96
+ | `cargo clippy` errors | New lints in Rust nightly | `cargo clippy --fix` or allow specific lints |
97
+ | `act` not found | Docker not running or act not installed | `brew install act` / `docker ps` to verify Docker |
98
+ | Hardcoded Node version stale | `.nvmrc` exists but workflow uses hardcoded version | Use `node-version-file: .nvmrc` instead |
99
+
100
+ ## Verify
101
+
102
+ → verify: `test -f wire-ci/SKILL.md && echo "OK: skill file exists" || echo "FAIL: no skill file"`
103
+ → verify: `grep -q "name: wire-ci" wire-ci/SKILL.md && echo "OK: frontmatter" || echo "FAIL: frontmatter"`
104
+ → verify: `grep -ci "template\|workflow\|validate\|dry.run" wire-ci/SKILL.md | awk '{if($1>=3) print "OK: semantics"; else print "FAIL: missing"}'`
105
+ → verify: `grep -q "wire-ci" SKILL-INDEX.md && echo "OK: in SKILL-INDEX" || echo "FAIL: not indexed"`
106
+
107
+ ---
108
+
109
+ # Wire Ci — Reference
110
+
111
+ ## Examples
112
+
113
+ ### Create CI for a Rust project
114
+
115
+ ```bash
116
+ # Detect from Cargo.toml, generate workflows
117
+ wire-ci
118
+
119
+ # Validate generated workflows
120
+ wire-ci --validate
121
+
122
+ # Run locally with act
123
+ wire-ci --dry-run
124
+ ```
125
+
126
+ ### Create CI for a Node project with semantic-release
127
+
128
+ ```bash
129
+ wire-ci
130
+ wire-ci --validate
131
+ # Expect warning: "npm publish step found but no NPM_TOKEN in secrets"
132
+ # Fix: add NPM_TOKEN to repo secrets
133
+ ```
134
+
135
+ ### Validate existing workflows (no generation)
136
+
137
+ ```bash
138
+ wire-ci --validate --check-only
139
+ ```
140
+
141
+
142
+ ---
143
+
144
+ ## Options
145
+
146
+ | Flag | Description |
147
+ |------|-------------|
148
+ | `--validate` | Check YAML syntax, permissions, secrets, common pitfalls |
149
+ | `--dry-run` | Run workflows locally via `act` or dispatch via `gh` |
150
+ | `--check-only` | Only validate, do not generate new files |
151
+ | `--type <type>` | Force project type (skip auto-detection) |
152
+ | `--force` | Overwrite existing workflow files |
153
+ | `--no-release` | Skip release workflow generation even if semantic-release detected |
154
+
155
+
156
+ ---
157
+
158
+ ## Integration with build-epic
159
+
160
+ When `wire-ci` is used as part of `build-epic`:
161
+
162
+ 1. **During develop-tdd**: If the task modifies `.github/workflows/`, run `wire-ci --validate` as a CI dry-run sub-step
163
+ 2. **During release-branch**: After push, run `gh run list --limit 1 --branch main --json status,conclusion` to verify CI passes
164
+
165
+ ---
166
+
167
+ ## Reference block 1
168
+
44
169
  ```yaml
45
170
  name: CI
46
171
  on: [push, pull_request]
@@ -59,7 +184,10 @@ jobs:
59
184
  - run: cargo build --release
60
185
  ```
61
186
 
62
- **Node template (`package.json`):**
187
+ ---
188
+
189
+ ## Reference block 2
190
+
63
191
  ```yaml
64
192
  name: CI
65
193
  on: [push, pull_request]
@@ -79,7 +207,10 @@ jobs:
79
207
  - run: npm run build 2>/dev/null || true
80
208
  ```
81
209
 
82
- **Python template (`setup.py` / `pyproject.toml`):**
210
+ ---
211
+
212
+ ## Reference block 3
213
+
83
214
  ```yaml
84
215
  name: CI
85
216
  on: [push, pull_request]
@@ -99,7 +230,10 @@ jobs:
99
230
  - run: pytest
100
231
  ```
101
232
 
102
- **Go template (`go.mod`):**
233
+ ---
234
+
235
+ ## Reference block 4
236
+
103
237
  ```yaml
104
238
  name: CI
105
239
  on: [push, pull_request]
@@ -117,7 +251,10 @@ jobs:
117
251
  - run: go build ./...
118
252
  ```
119
253
 
120
- **C/C++ template (`CMakeLists.txt`):**
254
+ ---
255
+
256
+ ## Reference block 5
257
+
121
258
  ```yaml
122
259
  name: CI
123
260
  on: [push, pull_request]
@@ -131,9 +268,9 @@ jobs:
131
268
  - run: ctest --test-dir build
132
269
  ```
133
270
 
134
- ### 3. Generate release workflow (if semantic-release detected)
271
+ ---
135
272
 
136
- If the project has semantic-release configured (in `package.json`, `.releaserc`, or `release.config.js`), also generate `.github/workflows/release.yaml`:
273
+ ## Reference block 6
137
274
 
138
275
  ```yaml
139
276
  name: Release
@@ -164,11 +301,9 @@ jobs:
164
301
  NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
165
302
  ```
166
303
 
167
- > **NPM_TOKEN is required** for publishing to npm. Without it, semantic-release will fail at the publish step. See `--validate` to check this.
304
+ ---
168
305
 
169
- ### 4. Validate workflows (`--validate`)
170
-
171
- Run `wire-ci --validate` to check all generated workflow files:
306
+ ## Reference block 7
172
307
 
173
308
  ```bash
174
309
  # Validate YAML syntax
@@ -210,14 +345,9 @@ for f in .github/workflows/*.yaml; do
210
345
  done
211
346
  ```
212
347
 
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`)
348
+ ---
219
349
 
220
- Attempt to run the generated workflows locally to catch errors before push:
350
+ ## Reference block 8
221
351
 
222
352
  ```bash
223
353
  # Option A: Use act (recommended)
@@ -233,75 +363,3 @@ else
233
363
  echo " Install gh CLI for remote dry-run"
234
364
  fi
235
365
  ```
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"`
@@ -88,6 +88,53 @@ exit 1
88
88
 
89
89
  After invoking the deploy command, poll for completion:
90
90
 
91
+ See [REFERENCE.md](REFERENCE.md)
92
+
93
+ Use exponential backoff for retries on transient failures:
94
+
95
+ See [REFERENCE.md](REFERENCE.md)
96
+
97
+ ### 6. Baseline smoke test
98
+
99
+ See [REFERENCE.md](REFERENCE.md)
100
+
101
+ For comprehensive health-checking, chain to the `smoke-test` skill:
102
+
103
+ ```bash
104
+ # After deploy success
105
+ bash scripts/run-smoke.sh "$DEPLOY_URL"
106
+ ```
107
+
108
+ ---
109
+
110
+ # Deploy — Reference
111
+
112
+ ## Configuration
113
+
114
+ | Variable | Default | Description |
115
+ |----------|---------|-------------|
116
+ | `ARTIFACT_DIR` | `dist` | Build output directory |
117
+ | `DEPLOY_URL` | *(required)* | Live URL for smoke test |
118
+ | `DEPLOY_TIMEOUT` | `300` | Max wait for deploy completion (seconds) |
119
+ | `DEPLOY_POLL_INTERVAL` | `30` | Polling interval (seconds) |
120
+ | `RETRY_MAX` | `3` | Max deploy retry attempts |
121
+ | `BUILD_COMMAND` | *(auto-detect)* | Override build command |
122
+
123
+
124
+ ---
125
+
126
+ ## Verification
127
+
128
+ → verify: `test -f deploy/SKILL.md && grep -q 'name: deploy' deploy/SKILL.md && echo OK`
129
+ → verify: `grep -qi 'build\|artifact\|deploy\|smoke' deploy/SKILL.md && echo OK`
130
+ → verify: `grep -ci 'package.json\|Cargo.toml\|Makefile\|manifest' deploy/SKILL.md | awk '{if($1>=1) print "OK"; else print "FAIL"}'`
131
+ → verify: `grep -ci 'timeout\|poll\|status\|retry\|backoff' deploy/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`
132
+ → verify: `grep -q 'curl.*DEPLOY_URL\|smoke\|health' deploy/SKILL.md && echo OK`
133
+
134
+ ---
135
+
136
+ ## Reference block 1
137
+
91
138
  ```bash
92
139
  DEPLOY_TIMEOUT="${DEPLOY_TIMEOUT:-300}" # seconds (default 5 minutes)
93
140
  DEPLOY_POLL_INTERVAL="${DEPLOY_POLL_INTERVAL:-30}" # seconds
@@ -110,7 +157,9 @@ while true; do
110
157
  done
111
158
  ```
112
159
 
113
- Use exponential backoff for retries on transient failures:
160
+ ---
161
+
162
+ ## Reference block 2
114
163
 
115
164
  ```bash
116
165
  RETRY_MAX="${RETRY_MAX:-3}"
@@ -127,7 +176,9 @@ for attempt in $(seq 1 "$RETRY_MAX"); do
127
176
  done
128
177
  ```
129
178
 
130
- ### 6. Baseline smoke test
179
+ ---
180
+
181
+ ## Reference block 3
131
182
 
132
183
  ```bash
133
184
  DEPLOY_URL="${DEPLOY_URL:?DEPLOY_URL must be set}"
@@ -138,29 +189,3 @@ else
138
189
  exit 1
139
190
  fi
140
191
  ```
141
-
142
- For comprehensive health-checking, chain to the `smoke-test` skill:
143
-
144
- ```bash
145
- # After deploy success
146
- bash scripts/run-smoke.sh "$DEPLOY_URL"
147
- ```
148
-
149
- ## Configuration
150
-
151
- | Variable | Default | Description |
152
- |----------|---------|-------------|
153
- | `ARTIFACT_DIR` | `dist` | Build output directory |
154
- | `DEPLOY_URL` | *(required)* | Live URL for smoke test |
155
- | `DEPLOY_TIMEOUT` | `300` | Max wait for deploy completion (seconds) |
156
- | `DEPLOY_POLL_INTERVAL` | `30` | Polling interval (seconds) |
157
- | `RETRY_MAX` | `3` | Max deploy retry attempts |
158
- | `BUILD_COMMAND` | *(auto-detect)* | Override build command |
159
-
160
- ## Verification
161
-
162
- → verify: `test -f deploy/SKILL.md && grep -q 'name: deploy' deploy/SKILL.md && echo OK`
163
- → verify: `grep -qi 'build\|artifact\|deploy\|smoke' deploy/SKILL.md && echo OK`
164
- → verify: `grep -ci 'package.json\|Cargo.toml\|Makefile\|manifest' deploy/SKILL.md | awk '{if($1>=1) print "OK"; else print "FAIL"}'`
165
- → verify: `grep -ci 'timeout\|poll\|status\|retry\|backoff' deploy/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`
166
- → verify: `grep -q 'curl.*DEPLOY_URL\|smoke\|health' deploy/SKILL.md && echo OK`