@slamb2k/mad-skills 2.0.49 → 2.0.51

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.49",
4
+ "version": "2.0.51",
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.49",
3
+ "version": "2.0.51",
4
4
  "description": "Claude Code skills collection — full lifecycle development tools",
5
5
  "type": "module",
6
6
  "repository": {
@@ -308,17 +308,23 @@ unknown). Platform detection and all CLI/REST commands are in
308
308
  1. Detect platform from `git remote get-url origin`
309
309
  2. **GitHub:** Check existing protection via `gh api`. If unprotected, ask via
310
310
  AskUserQuestion:
311
- - "Yes, require PR reviews (Recommended)" — require 1 approval, block force push
311
+ - "Yes, require PR reviews (team project — Recommended)" — require 1 approval, block force push + deletion
312
+ - "Yes, protect branch without review requirement (solo project)" — block force push + deletion, no reviewer gate so `/ship` squash-merges without `--admin`
312
313
  - "Skip" — leave unprotected
313
314
  3. **Azure DevOps:** Extract org/project from remote URL. Check existing
314
315
  policies via `az repos` CLI or REST fallback. If no minimum reviewer
315
- policy, ask via AskUserQuestion (same options as GitHub).
316
+ policy, ask via AskUserQuestion:
317
+ - "Yes, require PR reviews (team project — Recommended)" — 1 approver, creator votes do not count
318
+ - "Yes, PR required, author can self-approve (solo project)" — same approver policy but `creator-vote-counts=true` so the author's own vote satisfies the gate
319
+ - "Skip" — no policy applied
316
320
  4. **Unknown platform:** Skip and report.
317
321
 
318
- If user accepts, apply using the procedures in
319
- `references/branch-protection-steps.md`.
322
+ Apply the variant matching the user's choice using the procedures in
323
+ `references/branch-protection-steps.md` (see "Apply protection — team
324
+ project" vs "Apply protection — solo project" for each platform).
320
325
 
321
- Include result in the final report under a "🔒 Branch protection" section.
326
+ Include result in the final report under a "🔒 Branch protection" section,
327
+ labelled with the chosen variant (team / solo / skipped).
322
328
 
323
329
  ---
324
330
 
@@ -53,4 +53,24 @@ These defaults apply to all projects. Override in a project-level CLAUDE.md.
53
53
  - When a workflow fails mid-execution, preserve intermediate outputs
54
54
  - Verify output format before chaining into another tool or step
55
55
 
56
+ ## Commit Discipline
57
+
58
+ Reinforces Claude Code's built-in "only commit when explicitly asked" rule.
59
+ Restated here because LLMs drift on implicit system-prompt rules under
60
+ long-session pressure.
61
+
62
+ - **Do not commit, push, create PRs, or merge unless the user explicitly
63
+ asks.** A feature request ("can you add X") is an edit request, not a
64
+ ship request. Make the edits, run validate/lint/tests, then stop and
65
+ ask before any `git commit`, `git push`, `gh pr create`, or merge
66
+ operation.
67
+ - **Skill invocation is the explicit authorization.** `/ship`, `/build`,
68
+ `/commit`, and similar skills constitute consent to commit as part of
69
+ their defined flow. Running their **component scripts** manually
70
+ (`merge.sh`, `ci-watch.sh`, `sync.sh`) is **not** — those are skill
71
+ internals, not a substitute for the skill.
72
+ - **When shipping is warranted, invoke the skill.** Don't run individual
73
+ scripts to emulate `/ship` — the skill sequences stages correctly and
74
+ catches the errors piecemeal execution reintroduces.
75
+
56
76
  END TEMPLATE
@@ -30,7 +30,10 @@ gh api repos/{owner}/{repo}/branches/{default_branch}/protection
30
30
  ```
31
31
  404 = unprotected.
32
32
 
33
- ### Apply protection
33
+ ### Apply protection — team project (reviewer gate)
34
+
35
+ Requires 1 approving review before merge. Use when multiple humans work on
36
+ the repo.
34
37
 
35
38
  ```bash
36
39
  gh api repos/{owner}/{repo}/branches/{default_branch}/protection \
@@ -42,6 +45,34 @@ gh api repos/{owner}/{repo}/branches/{default_branch}/protection \
42
45
  -F allow_deletions=false
43
46
  ```
44
47
 
48
+ ### Apply protection — solo project (no reviewer gate)
49
+
50
+ Keeps force-push and deletion prevention but drops the reviewer
51
+ requirement. Use when you are the only contributor — this is what makes
52
+ `/ship` squash-merge succeed without `gh pr merge --admin`.
53
+
54
+ The only difference from the team variant is the absence of
55
+ `-f required_pull_request_reviews=...`:
56
+
57
+ ```bash
58
+ gh api repos/{owner}/{repo}/branches/{default_branch}/protection \
59
+ -X PUT \
60
+ -f enforce_admins=false \
61
+ -f restrictions=null \
62
+ -f required_status_checks=null \
63
+ -F allow_force_pushes=false \
64
+ -F allow_deletions=false
65
+ ```
66
+
67
+ **Migrating an existing team-project repo to solo:** if a reviewer policy
68
+ is already in place, remove just that sub-rule without tearing down the
69
+ rest of the protection:
70
+
71
+ ```bash
72
+ gh api --method DELETE \
73
+ repos/{owner}/{repo}/branches/{default_branch}/protection/required_pull_request_reviews
74
+ ```
75
+
45
76
  ---
46
77
 
47
78
  ## Azure DevOps
@@ -94,7 +125,10 @@ curl -s -H "$AUTH" \
94
125
  | jq "[.value[] | select(.settings.scope[]?.refName == \"refs/heads/$default_branch\" and .settings.scope[]?.repositoryId == \"$REPO_ID\")]"
95
126
  ```
96
127
 
97
- ### Create minimum reviewer policy
128
+ ### Create minimum reviewer policy — team project (reviewer gate)
129
+
130
+ Use when multiple humans review each other's PRs. The PR author's own
131
+ vote does not count toward the minimum approver count.
98
132
 
99
133
  **CLI:**
100
134
  ```bash
@@ -133,3 +167,24 @@ curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \
133
167
  }
134
168
  }"
135
169
  ```
170
+
171
+ ### Create minimum reviewer policy — solo project (author self-approve)
172
+
173
+ Use when you are the only contributor. A PR is still required before
174
+ merge, but `--creator-vote-counts true` means the author's own vote
175
+ satisfies the 1-approver gate — no second human needed.
176
+
177
+ **CLI:**
178
+ ```bash
179
+ az repos policy approver-count create \
180
+ --org "$AZDO_ORG_URL" --project "$AZDO_PROJECT" \
181
+ --repository-id "$REPO_ID" --branch "$default_branch" \
182
+ --minimum-approver-count 1 \
183
+ --creator-vote-counts true \
184
+ --allow-downvotes false \
185
+ --reset-on-source-push true \
186
+ --blocking true --enabled true
187
+ ```
188
+
189
+ **REST fallback:** same body as the team variant, but with
190
+ `"creatorVoteCounts": true`.
@@ -3,11 +3,14 @@
3
3
  Template for the generated project CLAUDE.md. The Phase 4 agent substitutes
4
4
  `{VARIABLE}` placeholders and writes to the project root.
5
5
 
6
- `{UNIVERSAL_PRINCIPLES}` is populated with the Question & Assumption
7
- Accountability section when install_level is "project" AND those sections
8
- are not already present in `~/.claude/CLAUDE.md`. Left empty when
9
- install_level is "global" (principles are in the global config instead)
10
- or when the sections would be redundant with existing global content.
6
+ `{UNIVERSAL_PRINCIPLES}` is populated with universal behavioral rules
7
+ (currently: Question & Assumption Accountability and Commit Discipline)
8
+ when install_level is "project" AND those sections are not already present
9
+ in `~/.claude/CLAUDE.md`. Left empty when install_level is "global"
10
+ (principles are in the global config instead) or when the sections would
11
+ be redundant with existing global content. Redundancy is checked
12
+ section-by-section — each section that already exists in global is
13
+ skipped individually rather than dropping the whole substitution.
11
14
 
12
15
  ---
13
16
 
@@ -164,6 +164,8 @@ skills-based workflow while preserving all other content.
164
164
  project CLAUDE.md. Add to SCAFFOLD_REPORT.skipped_redundant.
165
165
  - If global contains "## Universal Operating Principles" → SKIP that
166
166
  section in project CLAUDE.md. Add to SCAFFOLD_REPORT.skipped_redundant.
167
+ - If global contains "## Commit Discipline" → SKIP that section in
168
+ project CLAUDE.md. Add to SCAFFOLD_REPORT.skipped_redundant.
167
169
  - For any sections NOT found in global, substitute {UNIVERSAL_PRINCIPLES}
168
170
  in the project CLAUDE.md template with only the non-redundant sections
169
171
  from the Universal Principles Content below.
@@ -205,6 +207,26 @@ decision must be explicitly recorded and revisited.
205
207
  - At the start of new work, check for outstanding items from previous sessions
206
208
  - Never close a task with unacknowledged open questions
207
209
 
210
+ ## Commit Discipline
211
+
212
+ Reinforces Claude Code's built-in "only commit when explicitly asked" rule.
213
+ Restated here because LLMs drift on implicit system-prompt rules under
214
+ long-session pressure.
215
+
216
+ - **Do not commit, push, create PRs, or merge unless the user explicitly
217
+ asks.** A feature request ("can you add X") is an edit request, not a
218
+ ship request. Make the edits, run validate/lint/tests, then stop and
219
+ ask before any `git commit`, `git push`, `gh pr create`, or merge
220
+ operation.
221
+ - **Skill invocation is the explicit authorization.** `/ship`, `/build`,
222
+ `/commit`, and similar skills constitute consent to commit as part of
223
+ their defined flow. Running their **component scripts** manually
224
+ (`merge.sh`, `ci-watch.sh`, `sync.sh`) is **not** — those are skill
225
+ internals, not a substitute for the skill.
226
+ - **When shipping is warranted, invoke the skill.** Don't run individual
227
+ scripts to emulate `/ship` — the skill sequences stages correctly and
228
+ catches the errors piecemeal execution reintroduces.
229
+
208
230
  ## Output Format
209
231
 
210
232
  SCAFFOLD_REPORT:
@@ -1,12 +1,12 @@
1
1
  {
2
- "generated": "2026-04-20T02:26:55.864Z",
2
+ "generated": "2026-04-20T03:16:08.071Z",
3
3
  "count": 11,
4
4
  "skills": [
5
5
  {
6
6
  "name": "brace",
7
7
  "directory": "brace",
8
8
  "description": "'Initialize any project directory with a standard scaffold for AI-assisted development. Creates specs/ and context/ directories, a project CLAUDE.md with development workflow and guardrails, .gitignore, and branch protection. Recommends claude-mem for persistent memory. Idempotent — safe to run on existing projects. Triggers: \"init project\", \"setup brace\", \"brace\", \"initialize\", \"bootstrap\", \"scaffold\".'",
9
- "lines": 424,
9
+ "lines": 430,
10
10
  "hasScripts": false,
11
11
  "hasReferences": true,
12
12
  "hasAssets": true,