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