@slamb2k/mad-skills 2.0.43 → 2.0.45
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/plugin.json +1 -1
- package/hooks/lib/state.cjs +30 -1
- package/hooks/session-guard.cjs +24 -1
- package/package.json +1 -1
- package/skills/build/SKILL.md +25 -7
- package/skills/manifest.json +2 -2
- package/skills/speccy/SKILL.md +19 -19
package/hooks/lib/state.cjs
CHANGED
|
@@ -70,4 +70,33 @@ function savePrefs(projectDir, prefs) {
|
|
|
70
70
|
writeFileSync(prefsPath(projectDir), JSON.stringify(prefs, null, 2));
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
// ─── pending build marker ─────────────────────────────────────────────
|
|
74
|
+
|
|
75
|
+
function pendingBuildPath(projectDir) {
|
|
76
|
+
return join(STATE_DIR, `${projectKey(projectDir)}-pending-build.json`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function savePendingBuild(projectDir, specPath) {
|
|
80
|
+
ensureDir();
|
|
81
|
+
writeFileSync(pendingBuildPath(projectDir), JSON.stringify({
|
|
82
|
+
specPath,
|
|
83
|
+
projectDir,
|
|
84
|
+
timestamp: Date.now(),
|
|
85
|
+
}, null, 2));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function loadPendingBuild(projectDir) {
|
|
89
|
+
const path = pendingBuildPath(projectDir);
|
|
90
|
+
if (!existsSync(path)) return null;
|
|
91
|
+
try {
|
|
92
|
+
return JSON.parse(readFileSync(path, 'utf-8'));
|
|
93
|
+
} catch {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function clearPendingBuild(projectDir) {
|
|
99
|
+
try { unlinkSync(pendingBuildPath(projectDir)); } catch { /* noop */ }
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
module.exports = { save, load, clear, isRecentlyChecked, loadPrefs, savePrefs, savePendingBuild, loadPendingBuild, clearPendingBuild };
|
package/hooks/session-guard.cjs
CHANGED
|
@@ -80,7 +80,10 @@ function check() {
|
|
|
80
80
|
// 3) Staleness evaluation
|
|
81
81
|
checkStaleness(PROJECT_DIR, CLAUDE_MD, gitRoot, output);
|
|
82
82
|
|
|
83
|
-
// 4)
|
|
83
|
+
// 4) Pending build check
|
|
84
|
+
checkPendingBuild(PROJECT_DIR, output);
|
|
85
|
+
|
|
86
|
+
// 5) Staleness summary
|
|
84
87
|
if (output.score >= config.staleness.threshold) {
|
|
85
88
|
output.blank();
|
|
86
89
|
output.add(`[SESSION GUARD] \u26A0\uFE0F CLAUDE.md appears STALE (score: ${output.score}/${config.staleness.threshold})`);
|
|
@@ -231,6 +234,26 @@ function checkRig(projectDir, output) {
|
|
|
231
234
|
);
|
|
232
235
|
}
|
|
233
236
|
|
|
237
|
+
// ─── pending build check ──────────────────────────────────────────────
|
|
238
|
+
|
|
239
|
+
function checkPendingBuild(projectDir, output) {
|
|
240
|
+
const pending = state.loadPendingBuild(projectDir);
|
|
241
|
+
if (!pending) return;
|
|
242
|
+
|
|
243
|
+
const specPath = pending.specPath;
|
|
244
|
+
const specExists = existsSync(join(projectDir, specPath));
|
|
245
|
+
|
|
246
|
+
if (!specExists) {
|
|
247
|
+
// Spec file was deleted — clean up stale marker
|
|
248
|
+
state.clearPendingBuild(projectDir);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
output.blank();
|
|
253
|
+
output.add(`[SESSION GUARD] 📋 Pending spec ready for build: ${specPath}`);
|
|
254
|
+
output.add(`[SESSION GUARD] → Run: /build ${specPath}`);
|
|
255
|
+
}
|
|
256
|
+
|
|
234
257
|
// ─── helpers ───────────────────────────────────────────────────────────
|
|
235
258
|
|
|
236
259
|
function emit(output) {
|
package/package.json
CHANGED
package/skills/build/SKILL.md
CHANGED
|
@@ -102,16 +102,31 @@ For each row, in order:
|
|
|
102
102
|
4. After all checks: summarize what's available and what's degraded
|
|
103
103
|
|
|
104
104
|
1. Capture **PLAN** (the user's argument) and **FLAGS**
|
|
105
|
-
2. **
|
|
105
|
+
2. **Clear pending-build marker** — if a marker was left by `/speccy`, clear it:
|
|
106
|
+
```bash
|
|
107
|
+
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/slamb2k}"
|
|
108
|
+
node -e "require('$PLUGIN_ROOT/hooks/lib/state.cjs').clearPendingBuild(process.cwd())"
|
|
109
|
+
```
|
|
110
|
+
3. **Load project context** — invoke `/prime` to load domain-specific context
|
|
106
111
|
(CLAUDE.md, specs, memory). If /prime is unavailable, fall back to
|
|
107
112
|
manually scanning CLAUDE.md and specs/ directory.
|
|
108
|
-
|
|
113
|
+
4. Detect project type using `references/project-detection.md` to populate
|
|
109
114
|
**PROJECT_CONFIG** (language, test_runner, test_setup)
|
|
110
|
-
|
|
115
|
+
5. **Create task list** — ALWAYS create tasks upfront for all stages using
|
|
116
|
+
`TaskCreate`. This provides visible progress tracking throughout the build:
|
|
117
|
+
- Task: "Stage 1: Explore codebase"
|
|
118
|
+
- Task: "Stage 2: Clarifying questions" (if not `--skip-questions`)
|
|
119
|
+
- Task: "Stage 3: Architecture design"
|
|
120
|
+
- Task: "Stage 4: Implementation"
|
|
121
|
+
- Task: "Stage 5: Code review" (if not `--skip-review`)
|
|
122
|
+
- Task: "Stage 7: Verify"
|
|
123
|
+
- Task: "Stage 9: Ship" (if not `--no-ship`)
|
|
124
|
+
Mark each task `in_progress` when starting and `completed` when done.
|
|
125
|
+
6. Check for outstanding items from previous work:
|
|
111
126
|
- Query persistent tasks via `TaskList` for incomplete items
|
|
112
127
|
- Search CLAUDE.md for a "Known Issues" or "Open Questions" section
|
|
113
128
|
- Search memory (if available) for recent unresolved items
|
|
114
|
-
|
|
129
|
+
7. If outstanding items found, present via AskUserQuestion:
|
|
115
130
|
```
|
|
116
131
|
"Found {count} outstanding items from previous work:"
|
|
117
132
|
{numbered list with summary of each}
|
|
@@ -226,10 +241,13 @@ If rejected, incorporate feedback and re-run.
|
|
|
226
241
|
|
|
227
242
|
## Stage 4: Implementation
|
|
228
243
|
|
|
229
|
-
If
|
|
230
|
-
|
|
244
|
+
If ARCH_REPORT identifies independent `parallel_groups`, launch **multiple
|
|
245
|
+
general-purpose subagents in parallel** — one per group. Do NOT wait for
|
|
246
|
+
`--parallel-impl` flag; parallel execution is the **default** when the
|
|
247
|
+
architecture supports it. The flag is retained only as an explicit override.
|
|
231
248
|
|
|
232
|
-
|
|
249
|
+
If the architecture has no independent groups, launch **one general-purpose
|
|
250
|
+
subagent**:
|
|
233
251
|
|
|
234
252
|
```
|
|
235
253
|
Task(
|
package/skills/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generated": "2026-03-
|
|
2
|
+
"generated": "2026-03-24T21:58:11.133Z",
|
|
3
3
|
"count": 10,
|
|
4
4
|
"skills": [
|
|
5
5
|
{
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"name": "build",
|
|
17
17
|
"directory": "build",
|
|
18
18
|
"description": "Context-isolated feature development pipeline. Takes a detailed design/plan as argument and executes the full feature-dev lifecycle (explore, question, architect, implement, review, ship) inside subagents so the primary conversation stays compact. Use when you have a well-defined plan and want autonomous execution with minimal context window consumption.",
|
|
19
|
-
"lines":
|
|
19
|
+
"lines": 456,
|
|
20
20
|
"hasScripts": false,
|
|
21
21
|
"hasReferences": true,
|
|
22
22
|
"hasAssets": false,
|
package/skills/speccy/SKILL.md
CHANGED
|
@@ -232,28 +232,28 @@ After the spec is created, report to the user:
|
|
|
232
232
|
└─────────────────────────────────────────────────
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
-
Then **
|
|
235
|
+
Then write a **pending-build marker** so the next session knows about this spec:
|
|
236
236
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
- "Done" — stop here, no build
|
|
237
|
+
```bash
|
|
238
|
+
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/slamb2k}"
|
|
239
|
+
node -e "require('$PLUGIN_ROOT/hooks/lib/state.cjs').savePendingBuild(process.cwd(), '{spec file path}')"
|
|
240
|
+
```
|
|
242
241
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
```
|
|
248
|
-
`/build` reads the spec file via Plan Resolution and executes the full
|
|
249
|
-
pipeline. **Do not** attempt to implement the spec yourself — always
|
|
250
|
-
delegate to `/build`.
|
|
242
|
+
This marker is picked up by the session-guard hook on the next session start
|
|
243
|
+
(including after `/clear`), which surfaces the build command automatically.
|
|
244
|
+
|
|
245
|
+
Then display the build command:
|
|
251
246
|
|
|
252
|
-
If the user selects **"Review first"** or **"Done"**, stop and display:
|
|
253
247
|
```
|
|
254
|
-
⚡ To
|
|
248
|
+
⚡ To implement, run: /build {spec file path}
|
|
249
|
+
(You can /clear first — the spec is saved and the next session will remind you)
|
|
255
250
|
```
|
|
256
251
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
252
|
+
The spec file persists on disk, so the user can `/clear` the conversation
|
|
253
|
+
to free context before running `/build`. This is the recommended flow for
|
|
254
|
+
large specs — clearing context gives `/build` maximum working room.
|
|
255
|
+
|
|
256
|
+
**IMPORTANT:** After generating the spec, STOP. Do NOT enter plan mode,
|
|
257
|
+
do NOT start implementing directly, do NOT invoke `/build` yourself, and
|
|
258
|
+
do NOT offer to execute the plan. The spec file is the handoff artifact —
|
|
259
|
+
the user controls when and how to invoke `/build`.
|