@slamb2k/mad-skills 2.0.7 → 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 +11 -5
- package/.claude-plugin/plugin.json +9 -7
- package/README.md +101 -25
- package/hooks/hooks.json +18 -0
- package/hooks/session-guard-prompt.sh +59 -0
- package/hooks/session-guard.sh +155 -151
- package/package.json +2 -7
- package/skills/brace/SKILL.md +240 -14
- 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 +292 -13
- package/skills/distil/SKILL.md +258 -7
- package/skills/manifest.json +26 -16
- package/skills/prime/SKILL.md +76 -8
- package/skills/rig/SKILL.md +165 -7
- package/skills/ship/SKILL.md +190 -19
- 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 +175 -17
- package/commands/brace.md +0 -9
- package/commands/build.md +0 -9
- package/commands/distil.md +0 -9
- package/commands/prime.md +0 -9
- package/commands/rig.md +0 -9
- package/commands/ship.md +0 -9
- package/commands/sync.md +0 -9
- 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 -482
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
# Build Instructions
|
|
2
|
-
|
|
3
|
-
Execute a detailed design/plan through the full feature-dev lifecycle with
|
|
4
|
-
maximum context isolation. Every heavy stage runs in a subagent so the primary
|
|
5
|
-
conversation only accumulates structured reports.
|
|
6
|
-
|
|
7
|
-
Stage prompts: `references/stage-prompts.md`
|
|
8
|
-
Report budgets: `references/report-contracts.md`
|
|
9
|
-
Agent selection: `references/architecture-notes.md`
|
|
10
|
-
Project detection: `references/project-detection.md`
|
|
11
|
-
|
|
12
|
-
## Flags
|
|
13
|
-
|
|
14
|
-
Parse optional flags from the request:
|
|
15
|
-
- `--skip-questions`: Skip Stage 2 (clarifying questions)
|
|
16
|
-
- `--skip-review`: Skip Stage 5 (code review)
|
|
17
|
-
- `--no-ship`: Stop after Stage 8 docs update
|
|
18
|
-
- `--parallel-impl`: Split implementation into parallel agents when independent
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Pre-flight
|
|
23
|
-
|
|
24
|
-
Before starting, check all dependencies in this table:
|
|
25
|
-
|
|
26
|
-
| Dependency | Type | Check | Required | Resolution | Detail |
|
|
27
|
-
|-----------|------|-------|----------|------------|--------|
|
|
28
|
-
| ship | skill | `.claude/skills/ship/SKILL.md` | yes | stop | Install with: npx @slamb2k/mad-skills --skill ship |
|
|
29
|
-
| feature-dev:code-explorer | agent | — | no | fallback | Uses general-purpose agent |
|
|
30
|
-
| feature-dev:code-architect | agent | — | no | fallback | Uses general-purpose agent |
|
|
31
|
-
| feature-dev:code-reviewer | agent | — | no | fallback | Uses general-purpose agent |
|
|
32
|
-
|
|
33
|
-
For each row, in order:
|
|
34
|
-
1. Run the Check command (for cli/npm) or test file existence (for agent/skill)
|
|
35
|
-
2. If found: continue silently
|
|
36
|
-
3. If missing: apply Resolution strategy
|
|
37
|
-
- **stop**: notify user with Detail, halt execution
|
|
38
|
-
- **url**: notify user with Detail (install link), halt execution
|
|
39
|
-
- **install**: notify user, run the command in Detail, continue if successful
|
|
40
|
-
- **ask**: notify user, offer to run command in Detail, continue either way (or halt if required)
|
|
41
|
-
- **fallback**: notify user with Detail, continue with degraded behavior
|
|
42
|
-
4. After all checks: summarize what's available and what's degraded
|
|
43
|
-
|
|
44
|
-
1. Capture **PLAN** (the user's argument) and **FLAGS**
|
|
45
|
-
2. Detect project type using `references/project-detection.md` to populate
|
|
46
|
-
**PROJECT_CONFIG** (language, test_runner, test_setup)
|
|
47
|
-
3. Check for outstanding questions from previous work:
|
|
48
|
-
- Search CLAUDE.md for a "Known Issues" or "Open Questions" section
|
|
49
|
-
- Search `goals/` for files containing "open_question" or "unresolved"
|
|
50
|
-
- Search memory (if available) for recent items of type "task" or
|
|
51
|
-
"open_question" that are unresolved
|
|
52
|
-
- Check for `DEBRIEF_ITEMS` in any recent build logs
|
|
53
|
-
4. If outstanding items found, present via AskUserQuestion:
|
|
54
|
-
```
|
|
55
|
-
"Found {count} outstanding items from previous work:"
|
|
56
|
-
{numbered list with summary of each}
|
|
57
|
-
"Address any of these before starting the build?"
|
|
58
|
-
```
|
|
59
|
-
Options:
|
|
60
|
-
- **"Yes, let me choose which ones"** → present each; options:
|
|
61
|
-
"Incorporate into this build" / "Skip for now" / "Explain more"
|
|
62
|
-
Items marked "incorporate" get appended to the PLAN as additional
|
|
63
|
-
requirements for Stage 1 to explore.
|
|
64
|
-
- **"No, proceed with the build"** → continue normally
|
|
65
|
-
5. Create a task list tracking all stages
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Stage 1: Explore
|
|
70
|
-
|
|
71
|
-
Launch **feature-dev:code-explorer** (fallback: general-purpose):
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
Task(
|
|
75
|
-
subagent_type: "feature-dev:code-explorer",
|
|
76
|
-
description: "Explore codebase for build plan",
|
|
77
|
-
prompt: <read from references/stage-prompts.md#stage-1>
|
|
78
|
-
)
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Substitute `{PLAN}` into the prompt.
|
|
82
|
-
Parse EXPLORE_REPORT. Extract `questions` for Stage 2.
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Stage 2: Clarifying Questions
|
|
87
|
-
|
|
88
|
-
**Skip if `--skip-questions` or no questions found.**
|
|
89
|
-
|
|
90
|
-
Runs on the **primary thread** (requires user interaction).
|
|
91
|
-
|
|
92
|
-
1. Review EXPLORE_REPORT `questions` and `potential_issues`
|
|
93
|
-
2. Present questions to user via AskUserQuestion
|
|
94
|
-
3. Store answers as CLARIFICATIONS
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Stage 3: Architecture Design
|
|
99
|
-
|
|
100
|
-
Launch **feature-dev:code-architect** (fallback: general-purpose):
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
Task(
|
|
104
|
-
subagent_type: "feature-dev:code-architect",
|
|
105
|
-
description: "Design implementation architecture",
|
|
106
|
-
prompt: <read from references/stage-prompts.md#stage-3>
|
|
107
|
-
)
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Substitute `{PLAN}`, `{EXPLORE_REPORT}`, `{CLARIFICATIONS}`.
|
|
111
|
-
Parse ARCH_REPORT. Present `approach_summary` to user for confirmation.
|
|
112
|
-
|
|
113
|
-
If rejected, incorporate feedback and re-run.
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Stage 4: Implementation
|
|
118
|
-
|
|
119
|
-
If `--parallel-impl` and ARCH_REPORT has independent `parallel_groups`,
|
|
120
|
-
launch **multiple general-purpose subagents in parallel**.
|
|
121
|
-
|
|
122
|
-
Otherwise launch **one general-purpose subagent**:
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
Task(
|
|
126
|
-
subagent_type: "general-purpose",
|
|
127
|
-
description: "Implement plan",
|
|
128
|
-
prompt: <read from references/stage-prompts.md#stage-4>
|
|
129
|
-
)
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Substitute `{PLAN}`, `{ARCH_REPORT}`, conventions, `{PROJECT_CONFIG.test_runner}`.
|
|
133
|
-
Parse IMPL_REPORT(s). If any failed, assess retry or abort.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## Stage 5: Code Review
|
|
138
|
-
|
|
139
|
-
**Skip if `--skip-review`.**
|
|
140
|
-
|
|
141
|
-
Launch **3 feature-dev:code-reviewer subagents in parallel** (fallback: general-purpose):
|
|
142
|
-
|
|
143
|
-
1. Simplicity & DRY
|
|
144
|
-
2. Bugs & Correctness
|
|
145
|
-
3. Conventions & Integration
|
|
146
|
-
|
|
147
|
-
Prompts in `references/stage-prompts.md#stage-5`.
|
|
148
|
-
|
|
149
|
-
Consolidate reports. Present **only critical and high severity findings**.
|
|
150
|
-
Ask: "Fix these now, or proceed as-is?"
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## Stage 6: Fix Review Findings
|
|
155
|
-
|
|
156
|
-
**Only if Stage 5 found issues AND user wants them fixed.**
|
|
157
|
-
|
|
158
|
-
Launch **general-purpose subagent**:
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
Task(
|
|
162
|
-
subagent_type: "general-purpose",
|
|
163
|
-
description: "Fix review findings",
|
|
164
|
-
prompt: <read from references/stage-prompts.md#stage-6>
|
|
165
|
-
)
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## Stage 7: Verify
|
|
171
|
-
|
|
172
|
-
Launch **Bash subagent** (haiku):
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
Task(
|
|
176
|
-
subagent_type: "Bash",
|
|
177
|
-
model: "haiku",
|
|
178
|
-
description: "Run verification tests",
|
|
179
|
-
prompt: <read from references/stage-prompts.md#stage-7>
|
|
180
|
-
)
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Substitute `{PROJECT_CONFIG.test_runner}` and `{PROJECT_CONFIG.test_setup}`.
|
|
184
|
-
|
|
185
|
-
If tests fail:
|
|
186
|
-
- First failure: launch general-purpose agent to fix, retry
|
|
187
|
-
- Second failure: report to user and stop
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Stage 8: Update Progress Documentation
|
|
192
|
-
|
|
193
|
-
**Skip if EXPLORE_REPORT has no `source_docs`.**
|
|
194
|
-
|
|
195
|
-
Launch **general-purpose subagent**:
|
|
196
|
-
|
|
197
|
-
```
|
|
198
|
-
Task(
|
|
199
|
-
subagent_type: "general-purpose",
|
|
200
|
-
description: "Update progress documentation",
|
|
201
|
-
prompt: <read from references/stage-prompts.md#stage-8>
|
|
202
|
-
)
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
**If `--no-ship`: Stop here and present final summary.**
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## Stage 9: Ship
|
|
210
|
-
|
|
211
|
-
Invoke the `/ship` skill:
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
/ship {approach_summary from ARCH_REPORT}. Files: {files from IMPL_REPORT}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## Stage 10: Debrief
|
|
220
|
-
|
|
221
|
-
**Always runs** on the primary thread (requires user interaction).
|
|
222
|
-
|
|
223
|
-
1. Scan all stage reports for unresolved items:
|
|
224
|
-
- EXPLORE_REPORT: `potential_issues` not addressed by implementation
|
|
225
|
-
- ARCH_REPORT: `risks` with deferred mitigations
|
|
226
|
-
- REVIEW_REPORT: `medium`/`low` findings not fixed in Stage 6
|
|
227
|
-
- TEST_REPORT: warnings, skipped tests, flaky results
|
|
228
|
-
- DOCS_REPORT: `docs_skipped` items
|
|
229
|
-
- IMPL_REPORT: `issues_encountered` that were worked around
|
|
230
|
-
|
|
231
|
-
2. Compile into DEBRIEF_ITEMS (see `references/stage-prompts.md#stage-10`).
|
|
232
|
-
Categorise each as: unresolved_risk, deferred_fix, open_question,
|
|
233
|
-
assumption, or tech_debt.
|
|
234
|
-
|
|
235
|
-
3. **If no items found, skip to Final Report.**
|
|
236
|
-
|
|
237
|
-
4. Present numbered summary via AskUserQuestion grouped by category.
|
|
238
|
-
Each item shows: `[category] summary (effort)`.
|
|
239
|
-
|
|
240
|
-
Options:
|
|
241
|
-
- **"Fix now"** → create a task list of resolution activities for
|
|
242
|
-
each item; present for user confirmation, then work through them
|
|
243
|
-
- **"Create goals for future sessions"** → write goal files to `goals/`
|
|
244
|
-
(if GOTCHA structure exists) or append to CLAUDE.md as Known Issues
|
|
245
|
-
- **"Note and continue"** → acknowledge items without formal tracking;
|
|
246
|
-
log to memory (if exists) or as source file comments. No further action.
|
|
247
|
-
- **"Let me choose per item"** → present each individually with full
|
|
248
|
-
description, evidence, and impact. Options per item:
|
|
249
|
-
"Fix now" / "Add to goals" / "Explain more" / "Note and continue".
|
|
250
|
-
"Explain more" reads source files cited in evidence, provides
|
|
251
|
-
expanded context, then re-presents the item for decision.
|
|
252
|
-
|
|
253
|
-
5. After resolution, include debrief summary in the Final Report.
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Final Report
|
|
258
|
-
|
|
259
|
-
```
|
|
260
|
-
Build complete
|
|
261
|
-
|
|
262
|
-
Plan: {first line of PLAN}
|
|
263
|
-
Approach: {approach_summary}
|
|
264
|
-
|
|
265
|
-
Files modified: {count}
|
|
266
|
-
Files created: {count}
|
|
267
|
-
Tests: {passed}/{total}
|
|
268
|
-
|
|
269
|
-
Docs updated: {count or "none"}
|
|
270
|
-
|
|
271
|
-
PR: {pr_url} (merged at {merge_commit})
|
|
272
|
-
|
|
273
|
-
Key decisions:
|
|
274
|
-
- {decision 1}
|
|
275
|
-
- {decision 2}
|
|
276
|
-
|
|
277
|
-
Review findings addressed: {count fixed} / {count found}
|
|
278
|
-
|
|
279
|
-
Debrief: {count resolved} / {count surfaced} items addressed
|
|
280
|
-
{list of items created as goals or tasks, if any}
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
If any stage failed, report the failure point and what was accomplished.
|
|
284
|
-
|
|
285
|
-
---
|
|
286
|
-
|
|
287
|
-
## Rollback
|
|
288
|
-
|
|
289
|
-
If implementation succeeds but later stages fail:
|
|
290
|
-
- Tests fail: fix agent attempts repair, then reports to user
|
|
291
|
-
- Review critical: user decides fix or proceed
|
|
292
|
-
- Ship fails: code is still committed locally; user can manually push
|
|
293
|
-
- Never silently revert completed implementation work
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
# Distil Instructions
|
|
2
|
-
|
|
3
|
-
Generate multiple unique, creative web interface designs for any website or
|
|
4
|
-
web application. The primary agent acts as a thin orchestrator — all heavy
|
|
5
|
-
reading and file creation is delegated to subagents to protect the primary
|
|
6
|
-
context window.
|
|
7
|
-
|
|
8
|
-
## Arguments
|
|
9
|
-
|
|
10
|
-
Parse the following from the skill invocation:
|
|
11
|
-
- **count** (required): Number of designs to create (e.g., 5)
|
|
12
|
-
- **--spec** (optional): Path to a file containing site specification
|
|
13
|
-
- **--url** (optional): URL to existing site to review for context
|
|
14
|
-
- **--port** (required): Port for the Vite dev server
|
|
15
|
-
- **--favorites** (optional): Comma-separated list of design numbers for iteration mode
|
|
16
|
-
|
|
17
|
-
### Examples
|
|
18
|
-
```
|
|
19
|
-
/distil 5 --spec ./site-spec.md --port 5173
|
|
20
|
-
/distil 3 --favorites 2,4 --port 5173
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
If `--favorites` is provided, follow `references/iteration-mode.md` instead
|
|
24
|
-
of the steps below.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Pre-flight
|
|
29
|
-
|
|
30
|
-
Before starting, check all dependencies in this table:
|
|
31
|
-
|
|
32
|
-
| Dependency | Type | Check | Required | Resolution | Detail |
|
|
33
|
-
|-----------|------|-------|----------|------------|--------|
|
|
34
|
-
| npm | cli | `npm --version` | yes | stop | https://bun.sh or use npm |
|
|
35
|
-
| bencium-innovative-ux-designer | skill | `~/.claude/skills/bencium-innovative-ux-designer/SKILL.md` | no | ask | `npx skills add bencium/bencium-claude-code-design-skill@bencium-innovative-ux-designer -g -y` |
|
|
36
|
-
| web-animation-design | skill | `~/.claude/skills/web-animation-design/SKILL.md` | no | ask | `npx skills add connorads/dotfiles@web-animation-design -g -y` |
|
|
37
|
-
| design-system | skill | `~/.claude/skills/design-system/SKILL.md` | no | ask | `npx skills add lobbi-docs/claude@design-system -g -y` |
|
|
38
|
-
|
|
39
|
-
For each row, in order:
|
|
40
|
-
1. Run the Check command (for cli/npm) or test file existence (for agent/skill)
|
|
41
|
-
2. If found: continue silently
|
|
42
|
-
3. If missing: apply Resolution strategy
|
|
43
|
-
- **stop**: notify user with Detail, halt execution
|
|
44
|
-
- **url**: notify user with Detail (install link), halt execution
|
|
45
|
-
- **install**: notify user, run the command in Detail, continue if successful
|
|
46
|
-
- **ask**: notify user, offer to run command in Detail, continue either way (or halt if required)
|
|
47
|
-
- **fallback**: notify user with Detail, continue with degraded behavior
|
|
48
|
-
4. After all checks: summarize what's available and what's degraded
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Site Specification
|
|
53
|
-
|
|
54
|
-
The specification can be provided via:
|
|
55
|
-
|
|
56
|
-
1. **--spec flag**: Read the file at the provided path
|
|
57
|
-
2. **Pasted text**: Check conversation for a description of the site
|
|
58
|
-
3. **--url flag**: Use WebFetch to analyze an existing site
|
|
59
|
-
|
|
60
|
-
**If no specification is found, ask the user before proceeding.**
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Step 1: Load Site Specification
|
|
65
|
-
|
|
66
|
-
Parse and store the site context for use when generating each design.
|
|
67
|
-
This is the only file the primary agent reads directly (specs are typically small).
|
|
68
|
-
|
|
69
|
-
## Step 2: Reconnaissance (launch in parallel)
|
|
70
|
-
|
|
71
|
-
Launch two subagents **in parallel** to gather context without bloating
|
|
72
|
-
the primary agent.
|
|
73
|
-
|
|
74
|
-
### 2a: Verify Design Skills
|
|
75
|
-
|
|
76
|
-
Design skill availability is checked in the Pre-flight section above.
|
|
77
|
-
Use the results from pre-flight to populate SKILL_REPORT:
|
|
78
|
-
- For each design skill: name, installed (yes/no)
|
|
79
|
-
- If any skill was missing and the user declined to install, note it as unavailable
|
|
80
|
-
|
|
81
|
-
### 2b: Scan Existing Project
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
Task(
|
|
85
|
-
subagent_type: "Explore",
|
|
86
|
-
model: "haiku",
|
|
87
|
-
description: "Scan existing design project",
|
|
88
|
-
prompt: "Check if src/designs/ directory exists. If it does:
|
|
89
|
-
1. List all DesignN.tsx files (glob for src/designs/Design*.tsx)
|
|
90
|
-
2. For each file, read ONLY the first 10 lines to extract the
|
|
91
|
-
metadata comment (style name, key traits)
|
|
92
|
-
3. Determine the highest design number
|
|
93
|
-
Return PROJECT_REPORT (max 20 lines):
|
|
94
|
-
- project_exists: true/false
|
|
95
|
-
- package_manager: detected from lockfile (bun.lockb/pnpm-lock/yarn.lock/package-lock)
|
|
96
|
-
- design_count: N
|
|
97
|
-
- highest_number: N
|
|
98
|
-
- designs: list of (number, style_name) pairs
|
|
99
|
-
If no src/designs/ directory, return project_exists: false."
|
|
100
|
-
)
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Parse Recon Results
|
|
104
|
-
|
|
105
|
-
From SKILL_REPORT: Gate on missing skills before proceeding.
|
|
106
|
-
From PROJECT_REPORT:
|
|
107
|
-
- If `project_exists`: set `START_INDEX = highest_number + 1`, skip Step 3
|
|
108
|
-
- If not: set `START_INDEX = 1`, proceed to Step 3
|
|
109
|
-
|
|
110
|
-
## Step 3: Initialize Project
|
|
111
|
-
|
|
112
|
-
**Skip this step if an existing project was detected in Step 2b.**
|
|
113
|
-
|
|
114
|
-
Launch **Bash subagent** (haiku) to set up the project:
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
Task(
|
|
118
|
-
subagent_type: "Bash",
|
|
119
|
-
model: "haiku",
|
|
120
|
-
description: "Initialize distil project",
|
|
121
|
-
prompt: "Follow the project setup instructions:
|
|
122
|
-
1. Detect package manager (bun -> pnpm -> yarn -> npm)
|
|
123
|
-
2. Create Vite React-TS project
|
|
124
|
-
3. Install dependencies: tailwindcss, postcss, autoprefixer,
|
|
125
|
-
react-router-dom, lucide-react
|
|
126
|
-
4. Configure Tailwind (content paths, index.css directives)
|
|
127
|
-
5. Copy {skill_dir}/assets/DesignNav.tsx to src/components/DesignNav.tsx
|
|
128
|
-
Return SETUP_REPORT (max 10 lines): status, package_manager, errors."
|
|
129
|
-
)
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Parse SETUP_REPORT. If setup fails, fall back through the package manager
|
|
133
|
-
chain (bun -> pnpm -> yarn -> npm).
|
|
134
|
-
|
|
135
|
-
## Step 4: Create Designs via Subagent
|
|
136
|
-
|
|
137
|
-
Launch a **general-purpose subagent** to create all new designs.
|
|
138
|
-
|
|
139
|
-
**CRITICAL**: The subagent reads skill files and design guides directly.
|
|
140
|
-
Do NOT read them in the primary agent — pass file paths only.
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
Task(
|
|
144
|
-
subagent_type: "general-purpose",
|
|
145
|
-
description: "Create design variations",
|
|
146
|
-
prompt: "
|
|
147
|
-
You are creating {COUNT} new web design variations for a distil project.
|
|
148
|
-
|
|
149
|
-
## Site Specification
|
|
150
|
-
{SITE_SPEC from Step 1}
|
|
151
|
-
|
|
152
|
-
## Design Knowledge — Read These Files
|
|
153
|
-
Load design principles and the 50+ style catalog from these skill files:
|
|
154
|
-
- ~/.claude/skills/bencium-innovative-ux-designer/SKILL.md
|
|
155
|
-
- ~/.claude/skills/bencium-innovative-ux-designer/MOTION-SPEC.md
|
|
156
|
-
- ~/.claude/skills/web-animation-design/SKILL.md
|
|
157
|
-
- ~/.claude/skills/design-system/SKILL.md
|
|
158
|
-
- ~/.claude/skills/design-system/references/style-guide.md
|
|
159
|
-
|
|
160
|
-
Also read the project design guide:
|
|
161
|
-
- {skill_dir}/references/design-guide.md
|
|
162
|
-
|
|
163
|
-
## Existing Designs (avoid these styles)
|
|
164
|
-
{Compact list from PROJECT_REPORT: number + style_name pairs,
|
|
165
|
-
or 'None — fresh project'}
|
|
166
|
-
|
|
167
|
-
## Task
|
|
168
|
-
Create designs numbered {START_INDEX} through {START_INDEX + COUNT - 1}.
|
|
169
|
-
|
|
170
|
-
For each design, create `src/designs/Design{N}.tsx`:
|
|
171
|
-
- Pick a DISTINCT style from the 50+ style catalog in the design-system skill
|
|
172
|
-
- Do NOT reuse styles already used by existing designs
|
|
173
|
-
- Apply the site specification to all content and sections
|
|
174
|
-
- Follow anti-AI-slop rules strictly (no Inter, no default blue, no cookie-cutter layouts)
|
|
175
|
-
- Include purposeful animations with proper easing
|
|
176
|
-
- Each design must be self-contained in a single file
|
|
177
|
-
- Import and render DesignNav from '../components/DesignNav'
|
|
178
|
-
|
|
179
|
-
After creating all designs, update:
|
|
180
|
-
1. `src/App.tsx` — Add import and route for EVERY design (existing + new)
|
|
181
|
-
2. Each design file's DesignNav `designs` array — Include ALL designs (existing + new)
|
|
182
|
-
|
|
183
|
-
## Design File Requirements
|
|
184
|
-
Each design file must have:
|
|
185
|
-
- A metadata comment at the top: style name, key visual traits, color palette
|
|
186
|
-
- Import DesignNav from '../components/DesignNav'
|
|
187
|
-
- A `designs` array listing ALL designs (existing + new) with id and name
|
|
188
|
-
- ALL sections from the site specification with realistic content
|
|
189
|
-
- Custom color palette (not default Tailwind)
|
|
190
|
-
- Animations with proper easing (ease-out for entrances, ease-in-out for movement)
|
|
191
|
-
- Responsive layout (mobile-first)
|
|
192
|
-
- Lucide React icons for iconography
|
|
193
|
-
|
|
194
|
-
## App.tsx Requirements
|
|
195
|
-
The App.tsx must:
|
|
196
|
-
- Import ALL design components (existing + new)
|
|
197
|
-
- Have a route for each: <Route path='/{N}' element={<DesignN />} />
|
|
198
|
-
- Default route redirects to /1
|
|
199
|
-
|
|
200
|
-
Return DESIGN_REPORT (max 30 lines):
|
|
201
|
-
- List each design created: number, style name, key visual traits
|
|
202
|
-
- Total design count (existing + new)
|
|
203
|
-
- Files created and modified
|
|
204
|
-
- Any issues encountered
|
|
205
|
-
"
|
|
206
|
-
)
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Parse DESIGN_REPORT. If any design failed, report the error and offer retry.
|
|
210
|
-
|
|
211
|
-
## Step 5: Start Dev Server
|
|
212
|
-
|
|
213
|
-
Launch as a **background Bash** to avoid blocking the primary agent:
|
|
214
|
-
|
|
215
|
-
```
|
|
216
|
-
Task(
|
|
217
|
-
subagent_type: "Bash",
|
|
218
|
-
run_in_background: true,
|
|
219
|
-
description: "Start Vite dev server",
|
|
220
|
-
prompt: "{package_manager} run dev --port {PORT}"
|
|
221
|
-
)
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
If the dev server is already running, HMR should pick up the new files
|
|
225
|
-
automatically — skip this step.
|
|
226
|
-
|
|
227
|
-
## Step 6: Present Designs
|
|
228
|
-
|
|
229
|
-
Inform the user:
|
|
230
|
-
- Dev server is running at `http://localhost:{PORT}`
|
|
231
|
-
- Each design is available at `/1`, `/2`, `/3`, etc.
|
|
232
|
-
- Briefly describe each design's unique approach (from DESIGN_REPORT)
|
|
233
|
-
- Note which designs are new vs existing (if appending)
|
|
234
|
-
- Remind they can iterate with `--favorites` to refine preferred designs
|
|
235
|
-
|
|
236
|
-
## Context Protection Summary
|
|
237
|
-
|
|
238
|
-
| Step | Agent | Model | Why |
|
|
239
|
-
|---|---|---|---|
|
|
240
|
-
| 1: Load spec | Primary | — | Small file, needed for subagent prompt |
|
|
241
|
-
| 2a: Skill check | Explore | haiku | Avoids reading 2000+ lines of skill content |
|
|
242
|
-
| 2b: Project scan | Explore | haiku | Avoids reading existing design files |
|
|
243
|
-
| 3: Init project | Bash | haiku | Shell commands only |
|
|
244
|
-
| 4: Create designs | general-purpose | default | Heavy lifting: reads skills, writes files |
|
|
245
|
-
| 5: Dev server | Bash (background) | — | Non-blocking, no output in primary |
|
|
246
|
-
| 6: Present | Primary | — | User-facing, uses compact DESIGN_REPORT |
|
|
247
|
-
|
|
248
|
-
## Troubleshooting
|
|
249
|
-
|
|
250
|
-
- If package manager commands fail, try the next in the fallback chain
|
|
251
|
-
- If port is in use, suggest killing the process or using a different port
|
|
252
|
-
- If design imports fail, check file naming consistency
|
|
253
|
-
- If no site spec is found, always ask the user before proceeding
|
|
254
|
-
- If a design skill is missing, offer to install it before proceeding
|
|
255
|
-
- If the subagent fails, check error details and retry with adjusted parameters
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# Prime Instructions
|
|
2
|
-
|
|
3
|
-
Load project context to inform agent decisions. Raw file contents stay in a
|
|
4
|
-
subagent — the primary thread only sees a structured PRIME_REPORT.
|
|
5
|
-
|
|
6
|
-
## Step 1: Parse Arguments
|
|
7
|
-
|
|
8
|
-
Extract domain hints from the request (comma-separated). Valid domains are
|
|
9
|
-
listed in `references/domains.md`. If no domain specified, load core context only.
|
|
10
|
-
|
|
11
|
-
## Step 2: Load Context via Subagent
|
|
12
|
-
|
|
13
|
-
Launch a **general-purpose subagent** to read files and build the report:
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
Task(
|
|
17
|
-
subagent_type: "general-purpose",
|
|
18
|
-
description: "Load and summarise project context",
|
|
19
|
-
prompt: <see below>
|
|
20
|
-
)
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### Subagent Prompt
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
Load project context and return a structured summary. Raw file contents must
|
|
27
|
-
NOT appear in the report — summarise only.
|
|
28
|
-
|
|
29
|
-
Limit PRIME_REPORT to 30 lines maximum.
|
|
30
|
-
|
|
31
|
-
## Core Files (always load)
|
|
32
|
-
|
|
33
|
-
1. CLAUDE.md — System handbook, operating procedures
|
|
34
|
-
2. goals/manifest.md — Phase status, available goals, project roadmap
|
|
35
|
-
3. tools/manifest.md — Available tools and their locations
|
|
36
|
-
|
|
37
|
-
If CLAUDE.md is missing, record as NOT FOUND and continue.
|
|
38
|
-
|
|
39
|
-
## Domain Files
|
|
40
|
-
|
|
41
|
-
{For each requested domain, list files from references/domains.md}
|
|
42
|
-
|
|
43
|
-
For each file:
|
|
44
|
-
- If it exists: read and summarise (2-3 lines max per domain)
|
|
45
|
-
- If it doesn't exist: record as NOT FOUND and continue
|
|
46
|
-
|
|
47
|
-
## Output Format
|
|
48
|
-
|
|
49
|
-
PRIME_REPORT:
|
|
50
|
-
- core_files_loaded: {count}/{total}
|
|
51
|
-
- missing_files: {list or "none"}
|
|
52
|
-
- domains_loaded: {list}
|
|
53
|
-
- per_domain_summary:
|
|
54
|
-
- {domain}: {2-3 line summary}
|
|
55
|
-
- branch: {current branch from git branch --show-current}
|
|
56
|
-
- ready_for: {inferred from loaded context}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Step 3: Present Summary
|
|
60
|
-
|
|
61
|
-
Parse PRIME_REPORT and present a clean summary to the user:
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
Context loaded:
|
|
65
|
-
- Core: {status from core_files_loaded}
|
|
66
|
-
- {Domain}: {summary from per_domain_summary}
|
|
67
|
-
|
|
68
|
-
Current branch: {branch}
|
|
69
|
-
Ready to assist with: {ready_for}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
If CLAUDE.md was missing, warn the user and note that only domain context
|
|
73
|
-
was loaded.
|