@slamb2k/mad-skills 2.0.44 → 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 +10 -5
- package/skills/manifest.json +3 -3
- package/skills/speccy/SKILL.md +11 -0
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,12 +102,17 @@ 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
|
|
111
116
|
`TaskCreate`. This provides visible progress tracking throughout the build:
|
|
112
117
|
- Task: "Stage 1: Explore codebase"
|
|
113
118
|
- Task: "Stage 2: Clarifying questions" (if not `--skip-questions`)
|
|
@@ -117,11 +122,11 @@ For each row, in order:
|
|
|
117
122
|
- Task: "Stage 7: Verify"
|
|
118
123
|
- Task: "Stage 9: Ship" (if not `--no-ship`)
|
|
119
124
|
Mark each task `in_progress` when starting and `completed` when done.
|
|
120
|
-
|
|
125
|
+
6. Check for outstanding items from previous work:
|
|
121
126
|
- Query persistent tasks via `TaskList` for incomplete items
|
|
122
127
|
- Search CLAUDE.md for a "Known Issues" or "Open Questions" section
|
|
123
128
|
- Search memory (if available) for recent unresolved items
|
|
124
|
-
|
|
129
|
+
7. If outstanding items found, present via AskUserQuestion:
|
|
125
130
|
```
|
|
126
131
|
"Found {count} outstanding items from previous work:"
|
|
127
132
|
{numbered list with summary of each}
|
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,
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"name": "speccy",
|
|
87
87
|
"directory": "speccy",
|
|
88
88
|
"description": "Deep-dive interview skill for creating comprehensive specifications. Reviews existing code and docs, then interviews the user through multiple rounds of targeted questions covering technical implementation, UI/UX, concerns, and tradeoffs. Produces a structured spec in specs/. Use when starting a new feature, system, or major change that needs a spec.",
|
|
89
|
-
"lines":
|
|
89
|
+
"lines": 260,
|
|
90
90
|
"hasScripts": false,
|
|
91
91
|
"hasReferences": true,
|
|
92
92
|
"hasAssets": false,
|
package/skills/speccy/SKILL.md
CHANGED
|
@@ -232,10 +232,21 @@ After the spec is created, report to the user:
|
|
|
232
232
|
└─────────────────────────────────────────────────
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
+
Then write a **pending-build marker** so the next session knows about this spec:
|
|
236
|
+
|
|
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
|
+
```
|
|
241
|
+
|
|
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
|
+
|
|
235
245
|
Then display the build command:
|
|
236
246
|
|
|
237
247
|
```
|
|
238
248
|
⚡ To implement, run: /build {spec file path}
|
|
249
|
+
(You can /clear first — the spec is saved and the next session will remind you)
|
|
239
250
|
```
|
|
240
251
|
|
|
241
252
|
The spec file persists on disk, so the user can `/clear` the conversation
|