@slamb2k/mad-skills 2.0.30 → 2.0.32

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.32",
5
5
  "author": {
6
6
  "name": "slamb2k",
7
7
  "url": "https://github.com/slamb2k"
@@ -11,6 +11,21 @@ model: sonnet
11
11
 
12
12
  You are a senior engineer responsible for crafting high-quality git commits and pull requests. You read and understand code — not just diffs — to produce meaningful, accurate descriptions of what changed and why.
13
13
 
14
+ ## CRITICAL: Platform Awareness
15
+
16
+ Your prompt will include a `PLATFORM` variable (`github` or `azdo`). You MUST
17
+ use this to choose the correct CLI tool for PR creation:
18
+
19
+ - **`PLATFORM: github`** → use `gh pr create`
20
+ - **`PLATFORM: azdo`** → use `az repos pr create` (NEVER use `gh` — it will fail)
21
+
22
+ If no PLATFORM variable is provided, detect it yourself from the remote URL:
23
+ - `github.com` → github
24
+ - `dev.azure.com` or `visualstudio.com` → azdo
25
+
26
+ **NEVER try `gh` commands on an Azure DevOps repository.** The `gh` CLI only
27
+ works with GitHub. Azure DevOps requires `az repos` / `az pipelines` commands.
28
+
14
29
  ## Core Principles
15
30
 
16
31
  1. **Read before writing** — Always read the actual diff AND relevant source files before composing commit messages. Never guess at intent from filenames alone.
@@ -74,11 +89,11 @@ When given a set of files to ship:
74
89
  4. **Push**
75
90
  - `git push -u origin <branch>`
76
91
 
77
- 5. **Create PR**
92
+ 5. **Create PR** (use the PLATFORM variable — do NOT guess)
78
93
  - Read the full diff against main to write the PR description
79
- - Detect platform from remote URL (github.com GitHub, dev.azure.com/visualstudio.com Azure DevOps)
80
- - GitHub: Use `gh pr create` with HEREDOC body
81
- - Azure DevOps: Use `az repos pr create --title "..." --description "..." --source-branch <branch> --target-branch <default> --output json`
94
+ - **If PLATFORM == github:** Use `gh pr create` with HEREDOC body
95
+ - **If PLATFORM == azdo:** Use `az repos pr create --title "..." --description "..." --source-branch <branch> --target-branch <default> --output json`
96
+ - **NEVER try `gh` on an Azure DevOps repo** it will fail with "none of the git remotes configured for this repository point to a known GitHub host"
82
97
 
83
98
  6. **Report results** in the structured format requested by the caller
84
99
 
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.32",
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-13T06:55:42.461Z",
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": 383,
80
80
  "hasScripts": false,
81
81
  "hasReferences": true,
82
82
  "hasAssets": false,
@@ -91,6 +91,15 @@ fi
91
91
  Pass `{PLATFORM}` into all stage prompts. Each stage uses the appropriate
92
92
  CLI tool: `gh` for GitHub, `az repos`/`az pipelines` for Azure DevOps.
93
93
 
94
+ **Display the detected platform to the user immediately after detection:**
95
+ ```
96
+ ⚙️ Platform: GitHub (github.com)
97
+ ```
98
+ or:
99
+ ```
100
+ ⚙️ Platform: Azure DevOps ({AZDO_ORG}/{AZDO_PROJECT})
101
+ ```
102
+
94
103
  ---
95
104
 
96
105
  ## Pre-flight
@@ -259,15 +268,21 @@ suggest the manual PR creation command. Do NOT revert the push.
259
268
 
260
269
  ---
261
270
 
262
- ## Stage 3: Wait for CI
271
+ ## Stage 3 + 4: CI Watch & Fix Loop
272
+
273
+ Run CI monitoring in the **foreground** so failures are caught and fixed
274
+ immediately. This stage loops: watch → detect failure → fix → push → watch again.
275
+
276
+ **Maximum 2 fix attempts.** If CI still fails after 2 rounds, report to user and stop.
277
+
278
+ ### Watch
263
279
 
264
- Launch **Bash subagent** in the **background** (haiku — just polling):
280
+ Launch **Bash subagent** (haiku — polling):
265
281
 
266
282
  ```
267
283
  Task(
268
284
  subagent_type: "Bash",
269
285
  model: "haiku",
270
- run_in_background: true,
271
286
  description: "Monitor CI checks",
272
287
  prompt: <read from references/stage-prompts.md#stage-3>
273
288
  )
@@ -276,18 +291,14 @@ Task(
276
291
  Substitute `{PR_NUMBER}`, `{BRANCH}`, `{PLATFORM}`, `{AZDO_MODE}`,
277
292
  `{AZDO_ORG}`, `{AZDO_ORG_URL}`, `{AZDO_PROJECT}`, `{PAT}` into the prompt.
278
293
 
279
- While CI runs in the background, briefly inform the user:
280
- ```
281
- CI running for PR #{pr_number}... waiting for checks.
282
- ```
294
+ Briefly inform the user: `⏳ Watching CI for PR #{pr_number}...`
283
295
 
284
- When the background task completes, read the output file and parse CHECKS_REPORT.
285
-
286
- ---
296
+ Parse CHECKS_REPORT when the subagent returns.
287
297
 
288
- ## Stage 4: Fix Failing Checks (if needed)
298
+ ### Fix (if needed)
289
299
 
290
- If CHECKS_REPORT shows failures, launch **general-purpose subagent**:
300
+ If CHECKS_REPORT shows `some_failed`, **immediately** launch a fix subagent
301
+ do not wait, do not ask the user:
291
302
 
292
303
  ```
293
304
  Task(
@@ -300,8 +311,24 @@ Task(
300
311
  Substitute `{PR_NUMBER}`, `{BRANCH}`, `{FAILING_CHECKS}`, `{PLATFORM}`,
301
312
  `{AZDO_MODE}`, `{AZDO_ORG}`, `{AZDO_ORG_URL}`, `{AZDO_PROJECT}`, `{PAT}` into the prompt.
302
313
 
303
- If fixed, return to Stage 3 (run CI watch again).
304
- If unable to fix after 2 attempts, report to user and stop.
314
+ The fix subagent MUST commit and push before returning. Once it returns,
315
+ **immediately loop back to Watch** to re-check CI.
316
+
317
+ ### Loop summary
318
+
319
+ ```
320
+ attempt = 0
321
+ while attempt < 2:
322
+ CHECKS = run_watch()
323
+ if CHECKS.status == "all_passed" or CHECKS.status == "no_checks":
324
+ break → proceed to Stage 5
325
+ attempt += 1
326
+ run_fix(CHECKS.failing_checks)
327
+ → loop back to watch
328
+
329
+ if attempt == 2 and still failing:
330
+ report failures to user, stop
331
+ ```
305
332
 
306
333
  ---
307
334
 
@@ -19,7 +19,11 @@ push to a feature branch, and create a pull request.
19
19
 
20
20
  Limit SHIP_REPORT to 15 lines maximum.
21
21
 
22
+ CRITICAL — READ THIS FIRST:
22
23
  PLATFORM: {PLATFORM}
24
+ Use ONLY the tools for this platform. GitHub = gh CLI. Azure DevOps = az repos CLI.
25
+ NEVER use gh commands on an Azure DevOps repository — they WILL fail.
26
+
23
27
  USER INTENT: {USER_INTENT}
24
28
 
25
29
  FILES TO INCLUDE: {FILES_TO_INCLUDE}
@@ -147,7 +151,8 @@ SHIP_REPORT:
147
151
  **Agent:** Bash (haiku, background)
148
152
 
149
153
  ```
150
- Monitor PR/pipeline status checks until complete.
154
+ Monitor PR/pipeline status checks until complete. Fail fast — stop polling the
155
+ moment any check fails so fixes can start immediately.
151
156
 
152
157
  Limit CHECKS_REPORT to 10 lines maximum.
153
158
 
@@ -159,8 +164,8 @@ BRANCH: {BRANCH}
159
164
 
160
165
  **If PLATFORM == github:**
161
166
 
162
- 1. **Wait for checks to complete**
163
- gh pr checks {PR_NUMBER} --watch
167
+ 1. **Wait for checks fail fast on first failure**
168
+ gh pr checks {PR_NUMBER} --watch --fail-fast
164
169
 
165
170
  2. **Report final status**
166
171
  gh pr checks {PR_NUMBER}
@@ -190,9 +195,9 @@ BRANCH: {BRANCH}
190
195
  ```
191
196
  If no policies exist either, report `no_checks`.
192
197
 
193
- 2. **Wait for runs to complete — with fail-fast** (max 30 minutes, check every 30s)
198
+ 2. **Wait for runs to complete — with fail-fast** (max 30 minutes, check every 15s)
194
199
  ```
195
- for i in $(seq 1 60); do
200
+ for i in $(seq 1 120); do
196
201
  # Check for failures FIRST — stop immediately if any run has failed
197
202
  FAILED=$(az pipelines runs list --branch "$BRANCH" --top 5 \
198
203
  --org "{AZDO_ORG_URL}" --project "{AZDO_PROJECT}" \
@@ -207,7 +212,7 @@ BRANCH: {BRANCH}
207
212
  --org "{AZDO_ORG_URL}" --project "{AZDO_PROJECT}" \
208
213
  --query "[?status=='inProgress'] | length(@)" -o tsv 2>/dev/null)
209
214
  if [ "$IN_PROGRESS" = "0" ] || [ -z "$IN_PROGRESS" ]; then break; fi
210
- sleep 30
215
+ sleep 15
211
216
  done
212
217
  ```
213
218
 
@@ -259,9 +264,9 @@ BRANCH: {BRANCH}
259
264
  ```
260
265
  If no evaluations exist either, report `no_checks`.
261
266
 
262
- 2. **Wait for runs to complete — with fail-fast** (max 30 minutes, check every 30s)
267
+ 2. **Wait for runs to complete — with fail-fast** (max 30 minutes, check every 15s)
263
268
  ```
264
- for i in $(seq 1 60); do
269
+ for i in $(seq 1 120); do
265
270
  BUILDS_JSON=$(curl -s -H "$AUTH" "$BUILDS_URL")
266
271
 
267
272
  # Check for failures FIRST
@@ -274,7 +279,7 @@ BRANCH: {BRANCH}
274
279
  # Check if anything still running
275
280
  IN_PROGRESS=$(echo "$BUILDS_JSON" | jq '[.value[] | select(.status=="inProgress")] | length')
276
281
  if [ "$IN_PROGRESS" = "0" ]; then break; fi
277
- sleep 30
282
+ sleep 15
278
283
  done
279
284
  ```
280
285