@slamb2k/mad-skills 2.0.6 → 2.0.8
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.
- package/.claude-plugin/marketplace.json +30 -0
- package/.claude-plugin/plugin.json +18 -0
- package/README.md +101 -25
- package/agents/ship-analyzer.md +91 -0
- package/hooks/hooks.json +18 -0
- package/hooks/session-guard-prompt.sh +59 -0
- package/hooks/session-guard.sh +406 -0
- package/package.json +6 -7
- package/skills/brace/SKILL.md +243 -17
- package/skills/brace/assets/gitignore-template +0 -3
- package/skills/brace/references/phase-prompts.md +37 -0
- package/skills/brace/references/report-template.md +5 -1
- package/skills/build/SKILL.md +295 -16
- package/skills/distil/SKILL.md +261 -10
- package/skills/manifest.json +26 -16
- package/skills/prime/SKILL.md +79 -11
- package/skills/rig/SKILL.md +168 -10
- package/skills/ship/SKILL.md +193 -22
- package/skills/speccy/SKILL.md +165 -0
- package/skills/speccy/references/interview-guide.md +96 -0
- package/skills/speccy/tests/evals.json +34 -0
- package/skills/sync/SKILL.md +178 -20
- package/skills/brace/instructions.md +0 -229
- package/skills/build/instructions.md +0 -293
- package/skills/distil/instructions.md +0 -255
- package/skills/prime/instructions.md +0 -73
- package/skills/rig/instructions.md +0 -162
- package/skills/ship/instructions.md +0 -192
- package/skills/sync/instructions.md +0 -178
- package/src/cli.js +0 -419
package/skills/brace/SKILL.md
CHANGED
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brace
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Context, Hard prompts, Args), BRACE build methodology, and a project
|
|
7
|
-
CLAUDE.md. Recommends claude-mem for persistent memory. Idempotent — safe
|
|
8
|
-
to run on existing projects. Triggers: "init gotcha", "setup brace", "brace",
|
|
9
|
-
"initialize framework", "bootstrap gotcha".
|
|
10
|
-
argument-hint: [--no-brace] [--force]
|
|
3
|
+
description: 'Initialize any project directory with the GOTCHA/BRACE framework for agentic AI systems. Creates the 6-layer structure (Goals, Orchestration, Tools, Context, Hard prompts, Args), BRACE build methodology, and a project CLAUDE.md. Recommends claude-mem for persistent memory. Idempotent — safe to run on existing projects. Triggers: "init gotcha", "setup brace", "brace", "initialize framework", "bootstrap gotcha".'
|
|
4
|
+
argument-hint: "[--no-brace] [--force]"
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion
|
|
11
6
|
---
|
|
12
7
|
|
|
13
8
|
# Brace - GOTCHA/BRACE Framework Bootstrap
|
|
14
9
|
|
|
15
10
|
When this skill is invoked, IMMEDIATELY output the banner below before doing anything else.
|
|
16
|
-
Pick ONE tagline at random — vary your choice each time
|
|
11
|
+
Pick ONE tagline at random — vary your choice each time.
|
|
12
|
+
CRITICAL: Reproduce the banner EXACTLY character-for-character. The first line of the art has 4 leading spaces — you MUST preserve them.
|
|
17
13
|
|
|
18
14
|
```
|
|
19
15
|
{tagline}
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
⠀ ██╗██████╗ ██████╗ █████╗ ██████╗███████╗
|
|
22
18
|
██╔╝██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔════╝
|
|
23
19
|
██╔╝ ██████╔╝██████╔╝███████║██║ █████╗
|
|
24
20
|
██╔╝ ██╔══██╗██╔══██╗██╔══██║██║ ██╔══╝
|
|
25
21
|
██╔╝ ██████╔╝██║ ██║██║ ██║╚██████╗███████╗
|
|
26
22
|
╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚══════╝
|
|
27
|
-
|
|
28
23
|
```
|
|
29
24
|
|
|
30
25
|
Taglines:
|
|
@@ -37,15 +32,246 @@ Taglines:
|
|
|
37
32
|
- Structural integrity confirmed!
|
|
38
33
|
- Brace for impact!
|
|
39
34
|
|
|
40
|
-
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
Initialize any project directory with the GOTCHA/BRACE framework. Idempotent —
|
|
38
|
+
safe to re-run on existing projects. Content templates and subagent prompts
|
|
39
|
+
are in `references/`.
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
**Key principle:** Scan first, present plan, get approval, then act.
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
Phase prompts: `references/phase-prompts.md`
|
|
44
|
+
Scaffold manifest: `references/scaffold-manifest.md`
|
|
45
|
+
Report format: `references/report-template.md`
|
|
46
|
+
|
|
47
|
+
---
|
|
47
48
|
|
|
48
49
|
## Flags
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
Parse optional flags from the request:
|
|
52
|
+
- `--no-brace` — Skip BRACE build methodology (goals/build_app.md)
|
|
51
53
|
- `--force` — Overwrite existing files without prompting
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Pre-flight
|
|
58
|
+
|
|
59
|
+
Before starting, check all dependencies in this table:
|
|
60
|
+
|
|
61
|
+
| Dependency | Type | Check | Required | Resolution | Detail |
|
|
62
|
+
|-----------|------|-------|----------|------------|--------|
|
|
63
|
+
| claude-mem | plugin | — | no | ask | `claude plugin install claude-mem` |
|
|
64
|
+
|
|
65
|
+
For each row, in order:
|
|
66
|
+
1. Run the Check command (for cli/npm) or test file existence (for agent/skill)
|
|
67
|
+
2. If found: continue silently
|
|
68
|
+
3. If missing: apply Resolution strategy
|
|
69
|
+
- **stop**: notify user with Detail, halt execution
|
|
70
|
+
- **url**: notify user with Detail (install link), halt execution
|
|
71
|
+
- **install**: notify user, run the command in Detail, continue if successful
|
|
72
|
+
- **ask**: notify user, offer to run command in Detail, continue either way (or halt if required)
|
|
73
|
+
- **fallback**: notify user with Detail, continue with degraded behavior
|
|
74
|
+
4. After all checks: summarize what's available and what's degraded
|
|
75
|
+
|
|
76
|
+
1. Capture **FLAGS** from the user's request
|
|
77
|
+
2. Create a task list tracking all 5 phases
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Phase 1: Directory Scan
|
|
82
|
+
|
|
83
|
+
Launch **Bash** subagent (**haiku**):
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Task(
|
|
87
|
+
subagent_type: "Bash",
|
|
88
|
+
model: "haiku",
|
|
89
|
+
description: "Scan directory for existing GOTCHA structure",
|
|
90
|
+
prompt: <read from references/phase-prompts.md#phase-1>
|
|
91
|
+
)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Parse SCAN_REPORT. Extract:
|
|
95
|
+
- `directory_name` (used as default project name)
|
|
96
|
+
- `existing_dirs` / `missing_dirs`
|
|
97
|
+
- `existing_files` / `missing_files`
|
|
98
|
+
- `has_claude_md` / `has_gitignore`
|
|
99
|
+
- `has_atlas` (legacy ATLAS naming detected)
|
|
100
|
+
- `has_forge` (legacy FORGE naming detected)
|
|
101
|
+
- `has_legacy_memory` (old tools/memory system detected)
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Phase 1b: Legacy Upgrade Detection
|
|
106
|
+
|
|
107
|
+
**Skip if none of `has_atlas`, `has_forge`, or `has_legacy_memory` is true.**
|
|
108
|
+
|
|
109
|
+
Build a description of what was found:
|
|
110
|
+
- If `has_atlas` or `has_forge`: "Legacy ATLAS/FORGE naming detected"
|
|
111
|
+
- If `has_legacy_memory`: "Legacy memory system (tools/memory/, memory/) detected"
|
|
112
|
+
|
|
113
|
+
Ask the user via AskUserQuestion:
|
|
114
|
+
|
|
115
|
+
Question: "Legacy components detected: {description}. Upgrade and clean up?"
|
|
116
|
+
Options:
|
|
117
|
+
- "Yes, upgrade all" — Replace legacy naming with BRACE and remove old memory system
|
|
118
|
+
- "No, leave as-is" — Keep existing naming and memory system
|
|
119
|
+
|
|
120
|
+
Store result as `upgrade_legacy: true|false` in USER_CONFIG.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Phase 2: Project Inquiry
|
|
125
|
+
|
|
126
|
+
**Runs on primary thread** (user interaction required).
|
|
127
|
+
|
|
128
|
+
1. Derive default project name from SCAN_REPORT `directory_name`
|
|
129
|
+
2. Present via AskUserQuestion:
|
|
130
|
+
|
|
131
|
+
Question: "What to include in GOTCHA setup?"
|
|
132
|
+
Options:
|
|
133
|
+
- "Full GOTCHA + BRACE (Recommended)"
|
|
134
|
+
- "GOTCHA structure only (no BRACE methodology)"
|
|
135
|
+
- "Cancel"
|
|
136
|
+
|
|
137
|
+
3. If not cancelled, ask for project description (one sentence) via
|
|
138
|
+
AskUserQuestion with free text.
|
|
139
|
+
|
|
140
|
+
4. Ask installation level via AskUserQuestion:
|
|
141
|
+
|
|
142
|
+
Question: "Where should global preferences and universal principles go?"
|
|
143
|
+
Options:
|
|
144
|
+
- "Both — global + project (Recommended)" → portable AND global coverage
|
|
145
|
+
- "Global (~/.claude/CLAUDE.md) only" → applies to all projects
|
|
146
|
+
- "Project level only" → self-contained, portable
|
|
147
|
+
|
|
148
|
+
5. Store as USER_CONFIG:
|
|
149
|
+
- project_name: from directory name or user override
|
|
150
|
+
- description: from user input
|
|
151
|
+
- include_brace: true/false (based on selection and `--no-brace`)
|
|
152
|
+
- install_level: "both" | "global" | "project"
|
|
153
|
+
|
|
154
|
+
**If cancelled, stop here.**
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Phase 3: Present Plan & Approve
|
|
159
|
+
|
|
160
|
+
Build the ACTION_PLAN from SCAN_REPORT + USER_CONFIG + FLAGS.
|
|
161
|
+
|
|
162
|
+
For each item in `references/scaffold-manifest.md`:
|
|
163
|
+
- If component not selected in USER_CONFIG → status: "not selected"
|
|
164
|
+
- If item already exists (from SCAN_REPORT) and no `--force` → status: "skip"
|
|
165
|
+
- If item exists and `--force` → status: "overwrite"
|
|
166
|
+
- If CLAUDE.md exists → status: "merge" (append GOTCHA section)
|
|
167
|
+
- If .gitignore exists → status: "merge" (append missing entries)
|
|
168
|
+
- Otherwise → status: "create"
|
|
169
|
+
|
|
170
|
+
If `upgrade_legacy` is true in USER_CONFIG, set status "upgrade" for:
|
|
171
|
+
- CLAUDE.md (replaces "merge" or "skip" — upgrade takes priority)
|
|
172
|
+
- goals/build_app.md (replaces "skip")
|
|
173
|
+
- goals/manifest.md (replaces "skip")
|
|
174
|
+
|
|
175
|
+
If `upgrade_legacy` is true AND `has_legacy_memory` is true, additionally:
|
|
176
|
+
- `tools/memory/` → status: "remove"
|
|
177
|
+
- `memory/` → status: "remove"
|
|
178
|
+
- CLAUDE.md also gets memory section replacement (handled alongside upgrade)
|
|
179
|
+
- `tools/manifest.md` → status: "cleanup" (remove memory tool rows)
|
|
180
|
+
- `.gitignore` → status: "cleanup" (remove memory/*.npy entry)
|
|
181
|
+
|
|
182
|
+
Present plan summary to user via AskUserQuestion:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
GOTCHA Framework Setup for: {project_name}
|
|
186
|
+
|
|
187
|
+
Will create: {list of items with status "create"}
|
|
188
|
+
Will merge: {list of items with status "merge"}
|
|
189
|
+
Will upgrade: {list of items with status "upgrade" — legacy → BRACE}
|
|
190
|
+
Will remove: {list of items with status "remove" — legacy memory system}
|
|
191
|
+
Will clean: {list of items with status "cleanup" — remove legacy references}
|
|
192
|
+
Will skip: {count} existing items
|
|
193
|
+
Not selected: {count} items
|
|
194
|
+
Global config: {install_level description}
|
|
195
|
+
|
|
196
|
+
Proceed?
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Options: "Yes, proceed" / "Cancel"
|
|
200
|
+
|
|
201
|
+
**If cancelled, stop here.**
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Phase 4: Scaffold Structure
|
|
206
|
+
|
|
207
|
+
Launch **general-purpose** subagent:
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
Task(
|
|
211
|
+
subagent_type: "general-purpose",
|
|
212
|
+
description: "Create GOTCHA framework structure",
|
|
213
|
+
prompt: <read from references/phase-prompts.md#phase-4>
|
|
214
|
+
)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Before sending the prompt, substitute these variables:
|
|
218
|
+
- `{ACTION_PLAN}` — the action plan from Phase 3
|
|
219
|
+
- `{PROJECT_NAME}` — from USER_CONFIG
|
|
220
|
+
- `{PROJECT_DESCRIPTION}` — from USER_CONFIG
|
|
221
|
+
- `{INSTALL_LEVEL}` — from USER_CONFIG ("both", "global", or "project")
|
|
222
|
+
- `{CLAUDE_MD_TEMPLATE}` — read from `references/claude-md-template.md`
|
|
223
|
+
(the section between BEGIN TEMPLATE and END TEMPLATE)
|
|
224
|
+
- `{GITIGNORE_CONTENT}` — read from `assets/gitignore-template`
|
|
225
|
+
- `{GOALS_MANIFEST}` — read from `references/scaffold-manifest.md`
|
|
226
|
+
(the goals/manifest.md content block)
|
|
227
|
+
- `{TOOLS_MANIFEST}` — read from `references/scaffold-manifest.md`
|
|
228
|
+
(the tools/manifest.md content block)
|
|
229
|
+
- `{BRACE_WORKFLOW}` — read from `references/brace-workflow.md`
|
|
230
|
+
(the section after the header, used for goals/build_app.md)
|
|
231
|
+
- `{GLOBAL_PREFERENCES_CONTENT}` — read from `assets/global-preferences-template.md`
|
|
232
|
+
(the section between BEGIN TEMPLATE and END TEMPLATE)
|
|
233
|
+
|
|
234
|
+
Parse SCAFFOLD_REPORT. If status is "failed", report to user and stop.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Phase 5: Verification & Report
|
|
239
|
+
|
|
240
|
+
Launch **Bash** subagent (**haiku**):
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
Task(
|
|
244
|
+
subagent_type: "Bash",
|
|
245
|
+
model: "haiku",
|
|
246
|
+
description: "Verify GOTCHA structure",
|
|
247
|
+
prompt: <read from references/phase-prompts.md#phase-5>
|
|
248
|
+
)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Parse VERIFY_REPORT. Present the final summary using the format in
|
|
252
|
+
`references/report-template.md`.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Idempotency Rules
|
|
257
|
+
|
|
258
|
+
- **Skip** directories and files that already exist (unless `--force`)
|
|
259
|
+
- **Merge** CLAUDE.md: append GOTCHA section if file exists but lacks it
|
|
260
|
+
- **Merge** .gitignore: append missing entries only
|
|
261
|
+
- **Never delete** user content
|
|
262
|
+
- **Never overwrite** without `--force` or explicit user approval
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Error Handling
|
|
267
|
+
|
|
268
|
+
Standard escalation pattern:
|
|
269
|
+
1. If retryable (permission issue after mkdir): retry once
|
|
270
|
+
2. If persistent: report to user with specific error
|
|
271
|
+
3. Offer: skip and continue / abort
|
|
272
|
+
4. Never silently swallow errors
|
|
273
|
+
|
|
274
|
+
Common issues:
|
|
275
|
+
- Permission denied → report, suggest checking directory permissions
|
|
276
|
+
- CLAUDE.md merge conflict → show both versions, let user choose
|
|
277
|
+
- Directory is read-only → abort with clear message
|
|
@@ -47,6 +47,12 @@ Limit your SCAN_REPORT to 20 lines maximum.
|
|
|
47
47
|
fi
|
|
48
48
|
done
|
|
49
49
|
|
|
50
|
+
7. Check for legacy memory system:
|
|
51
|
+
legacy_memory=false
|
|
52
|
+
if [ -d "tools/memory" ] || [ -f "memory/MEMORY.md" ]; then
|
|
53
|
+
legacy_memory=true
|
|
54
|
+
fi
|
|
55
|
+
|
|
50
56
|
## Output Format
|
|
51
57
|
|
|
52
58
|
SCAN_REPORT:
|
|
@@ -60,6 +66,7 @@ SCAN_REPORT:
|
|
|
60
66
|
has_gitignore: true|false
|
|
61
67
|
has_atlas: true|false
|
|
62
68
|
has_forge: true|false
|
|
69
|
+
has_legacy_memory: true|false
|
|
63
70
|
```
|
|
64
71
|
|
|
65
72
|
---
|
|
@@ -114,6 +121,25 @@ legacy methodology references with BRACE equivalents while preserving all other
|
|
|
114
121
|
- **goals/build_app.md:** Replace the entire file with the BRACE workflow content below.
|
|
115
122
|
- **goals/manifest.md:** Replace "ATLAS" or "FORGE" with "BRACE" in the description column.
|
|
116
123
|
|
|
124
|
+
### For "remove" items (legacy memory cleanup):
|
|
125
|
+
|
|
126
|
+
1. Before deleting `memory/MEMORY.md`, check if it contains a "## Key Decisions"
|
|
127
|
+
section. If so, extract that section content into `preserved_content` for the
|
|
128
|
+
SCAFFOLD_REPORT so the user can relocate it.
|
|
129
|
+
2. Remove `tools/memory/` — use `git rm -r tools/memory` if tracked, otherwise `rm -rf tools/memory`
|
|
130
|
+
3. Remove `memory/` — use `git rm -r memory` if tracked, otherwise `rm -rf memory`
|
|
131
|
+
|
|
132
|
+
### For "cleanup" items (legacy memory references):
|
|
133
|
+
|
|
134
|
+
- **tools/manifest.md:** Remove any rows referencing `memory/` tools (e.g. search, embed, store scripts)
|
|
135
|
+
- **.gitignore:** Remove the `memory/*.npy` line and its `# Memory embeddings cache` comment if present
|
|
136
|
+
- **CLAUDE.md:** If a `## Memory System` section exists, replace it with:
|
|
137
|
+
```
|
|
138
|
+
## Memory
|
|
139
|
+
This project uses claude-mem for persistent cross-session memory.
|
|
140
|
+
```
|
|
141
|
+
Also remove `tools/memory/` and `memory/` from any directory tree listings in CLAUDE.md.
|
|
142
|
+
|
|
117
143
|
### Global preferences (conditional)
|
|
118
144
|
|
|
119
145
|
If INSTALL_LEVEL is "global" or "both":
|
|
@@ -178,6 +204,9 @@ SCAFFOLD_REPORT:
|
|
|
178
204
|
created: [list of files/dirs created]
|
|
179
205
|
merged: [list of files merged]
|
|
180
206
|
upgraded: [list of files upgraded to BRACE]
|
|
207
|
+
removed: [list of legacy items removed]
|
|
208
|
+
cleaned: [list of files cleaned of legacy references]
|
|
209
|
+
preserved_content: [any key decisions extracted from memory/MEMORY.md, or empty]
|
|
181
210
|
skipped: [list of items skipped]
|
|
182
211
|
global_updated: true|false|skipped
|
|
183
212
|
errors: [any errors encountered]
|
|
@@ -216,6 +245,13 @@ Limit your VERIFY_REPORT to 15 lines maximum.
|
|
|
216
245
|
done
|
|
217
246
|
echo "gitignore entries: $entries/2"
|
|
218
247
|
|
|
248
|
+
5. If legacy memory cleanup was performed, verify removal:
|
|
249
|
+
if [ -d "tools/memory" ]; then echo "legacy: tools/memory still exists"; fi
|
|
250
|
+
if [ -d "memory" ]; then echo "legacy: memory/ still exists"; fi
|
|
251
|
+
if [ -f "CLAUDE.md" ] && grep -q "tools/memory" CLAUDE.md; then
|
|
252
|
+
echo "legacy: CLAUDE.md still references tools/memory"
|
|
253
|
+
fi
|
|
254
|
+
|
|
219
255
|
## Output Format
|
|
220
256
|
|
|
221
257
|
VERIFY_REPORT:
|
|
@@ -224,5 +260,6 @@ VERIFY_REPORT:
|
|
|
224
260
|
files_verified: {count}/{expected}
|
|
225
261
|
claude_md_has_gotcha: true|false
|
|
226
262
|
gitignore_entries: {count}/{expected}
|
|
263
|
+
legacy_memory_cleaned: true|false|not_applicable
|
|
227
264
|
issues: [any problems found]
|
|
228
265
|
```
|
|
@@ -25,6 +25,10 @@ Brace Complete!
|
|
|
25
25
|
{status} goals/build_app.md
|
|
26
26
|
{status} tools/manifest.md
|
|
27
27
|
|
|
28
|
+
Removed: (only if legacy memory was cleaned up)
|
|
29
|
+
{status} tools/memory/ Legacy memory scripts
|
|
30
|
+
{status} memory/ Legacy memory directory
|
|
31
|
+
|
|
28
32
|
Notes:
|
|
29
33
|
{any warnings or skipped items}
|
|
30
34
|
|
|
@@ -35,4 +39,4 @@ Brace Complete!
|
|
|
35
39
|
4. Start building with the BRACE methodology
|
|
36
40
|
```
|
|
37
41
|
|
|
38
|
-
Status indicators: [created] [exists] [merged] [upgraded] [skipped] [failed]
|
|
42
|
+
Status indicators: [created] [exists] [merged] [upgraded] [removed] [skipped] [failed]
|