@slamb2k/mad-skills 2.0.30 → 2.0.31

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mad-skills",
3
3
  "description": "AI-assisted planning, development and governance tools",
4
- "version": "2.0.30",
4
+ "version": "2.0.31",
5
5
  "author": {
6
6
  "name": "slamb2k",
7
7
  "url": "https://github.com/slamb2k"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slamb2k/mad-skills",
3
- "version": "2.0.30",
3
+ "version": "2.0.31",
4
4
  "description": "Claude Code skills collection — full lifecycle development tools",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "generated": "2026-03-12T17:16:55.117Z",
2
+ "generated": "2026-03-13T00:14:06.892Z",
3
3
  "count": 10,
4
4
  "skills": [
5
5
  {
@@ -76,7 +76,7 @@
76
76
  "name": "ship",
77
77
  "directory": "ship",
78
78
  "description": "\"Ship changes through the full PR lifecycle. Use after completing feature work to commit, push, create PR, wait for checks, and merge. Handles the entire workflow: syncs with main, creates feature branch if needed, groups commits logically with semantic messages, creates detailed PR, monitors CI, fixes issues, squash merges, and cleans up. Invoke when work is ready to ship.\"",
79
- "lines": 356,
79
+ "lines": 374,
80
80
  "hasScripts": false,
81
81
  "hasReferences": true,
82
82
  "hasAssets": false,
@@ -259,15 +259,21 @@ suggest the manual PR creation command. Do NOT revert the push.
259
259
 
260
260
  ---
261
261
 
262
- ## Stage 3: Wait for CI
262
+ ## Stage 3 + 4: CI Watch & Fix Loop
263
263
 
264
- Launch **Bash subagent** in the **background** (haiku just polling):
264
+ Run CI monitoring in the **foreground** so failures are caught and fixed
265
+ immediately. This stage loops: watch → detect failure → fix → push → watch again.
266
+
267
+ **Maximum 2 fix attempts.** If CI still fails after 2 rounds, report to user and stop.
268
+
269
+ ### Watch
270
+
271
+ Launch **Bash subagent** (haiku — polling):
265
272
 
266
273
  ```
267
274
  Task(
268
275
  subagent_type: "Bash",
269
276
  model: "haiku",
270
- run_in_background: true,
271
277
  description: "Monitor CI checks",
272
278
  prompt: <read from references/stage-prompts.md#stage-3>
273
279
  )
@@ -276,18 +282,14 @@ Task(
276
282
  Substitute `{PR_NUMBER}`, `{BRANCH}`, `{PLATFORM}`, `{AZDO_MODE}`,
277
283
  `{AZDO_ORG}`, `{AZDO_ORG_URL}`, `{AZDO_PROJECT}`, `{PAT}` into the prompt.
278
284
 
279
- While CI runs in the background, briefly inform the user:
280
- ```
281
- CI running for PR #{pr_number}... waiting for checks.
282
- ```
285
+ Briefly inform the user: `⏳ Watching CI for PR #{pr_number}...`
283
286
 
284
- When the background task completes, read the output file and parse CHECKS_REPORT.
287
+ Parse CHECKS_REPORT when the subagent returns.
285
288
 
286
- ---
289
+ ### Fix (if needed)
287
290
 
288
- ## Stage 4: Fix Failing Checks (if needed)
289
-
290
- If CHECKS_REPORT shows failures, launch **general-purpose subagent**:
291
+ If CHECKS_REPORT shows `some_failed`, **immediately** launch a fix subagent —
292
+ do not wait, do not ask the user:
291
293
 
292
294
  ```
293
295
  Task(
@@ -300,8 +302,24 @@ Task(
300
302
  Substitute `{PR_NUMBER}`, `{BRANCH}`, `{FAILING_CHECKS}`, `{PLATFORM}`,
301
303
  `{AZDO_MODE}`, `{AZDO_ORG}`, `{AZDO_ORG_URL}`, `{AZDO_PROJECT}`, `{PAT}` into the prompt.
302
304
 
303
- If fixed, return to Stage 3 (run CI watch again).
304
- If unable to fix after 2 attempts, report to user and stop.
305
+ The fix subagent MUST commit and push before returning. Once it returns,
306
+ **immediately loop back to Watch** to re-check CI.
307
+
308
+ ### Loop summary
309
+
310
+ ```
311
+ attempt = 0
312
+ while attempt < 2:
313
+ CHECKS = run_watch()
314
+ if CHECKS.status == "all_passed" or CHECKS.status == "no_checks":
315
+ break → proceed to Stage 5
316
+ attempt += 1
317
+ run_fix(CHECKS.failing_checks)
318
+ → loop back to watch
319
+
320
+ if attempt == 2 and still failing:
321
+ report failures to user, stop
322
+ ```
305
323
 
306
324
  ---
307
325
 
@@ -147,7 +147,8 @@ SHIP_REPORT:
147
147
  **Agent:** Bash (haiku, background)
148
148
 
149
149
  ```
150
- Monitor PR/pipeline status checks until complete.
150
+ Monitor PR/pipeline status checks until complete. Fail fast — stop polling the
151
+ moment any check fails so fixes can start immediately.
151
152
 
152
153
  Limit CHECKS_REPORT to 10 lines maximum.
153
154
 
@@ -159,8 +160,8 @@ BRANCH: {BRANCH}
159
160
 
160
161
  **If PLATFORM == github:**
161
162
 
162
- 1. **Wait for checks to complete**
163
- gh pr checks {PR_NUMBER} --watch
163
+ 1. **Wait for checks fail fast on first failure**
164
+ gh pr checks {PR_NUMBER} --watch --fail-fast
164
165
 
165
166
  2. **Report final status**
166
167
  gh pr checks {PR_NUMBER}
@@ -190,9 +191,9 @@ BRANCH: {BRANCH}
190
191
  ```
191
192
  If no policies exist either, report `no_checks`.
192
193
 
193
- 2. **Wait for runs to complete — with fail-fast** (max 30 minutes, check every 30s)
194
+ 2. **Wait for runs to complete — with fail-fast** (max 30 minutes, check every 15s)
194
195
  ```
195
- for i in $(seq 1 60); do
196
+ for i in $(seq 1 120); do
196
197
  # Check for failures FIRST — stop immediately if any run has failed
197
198
  FAILED=$(az pipelines runs list --branch "$BRANCH" --top 5 \
198
199
  --org "{AZDO_ORG_URL}" --project "{AZDO_PROJECT}" \
@@ -207,7 +208,7 @@ BRANCH: {BRANCH}
207
208
  --org "{AZDO_ORG_URL}" --project "{AZDO_PROJECT}" \
208
209
  --query "[?status=='inProgress'] | length(@)" -o tsv 2>/dev/null)
209
210
  if [ "$IN_PROGRESS" = "0" ] || [ -z "$IN_PROGRESS" ]; then break; fi
210
- sleep 30
211
+ sleep 15
211
212
  done
212
213
  ```
213
214
 
@@ -259,9 +260,9 @@ BRANCH: {BRANCH}
259
260
  ```
260
261
  If no evaluations exist either, report `no_checks`.
261
262
 
262
- 2. **Wait for runs to complete — with fail-fast** (max 30 minutes, check every 30s)
263
+ 2. **Wait for runs to complete — with fail-fast** (max 30 minutes, check every 15s)
263
264
  ```
264
- for i in $(seq 1 60); do
265
+ for i in $(seq 1 120); do
265
266
  BUILDS_JSON=$(curl -s -H "$AUTH" "$BUILDS_URL")
266
267
 
267
268
  # Check for failures FIRST
@@ -274,7 +275,7 @@ BRANCH: {BRANCH}
274
275
  # Check if anything still running
275
276
  IN_PROGRESS=$(echo "$BUILDS_JSON" | jq '[.value[] | select(.status=="inProgress")] | length')
276
277
  if [ "$IN_PROGRESS" = "0" ]; then break; fi
277
- sleep 30
278
+ sleep 15
278
279
  done
279
280
  ```
280
281