claude-symphony 0.5.2 → 0.5.3
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/README.md +1 -1
- package/package.json +1 -1
- package/template/.claude/commands/moodboard.md +73 -7
- package/template/.claude/commands/pencil.md +181 -0
- package/template/.claude/commands/stitch.md +19 -11
- package/template/CLAUDE.md +6 -1
- package/template/config/mcp_fallbacks.jsonc +28 -4
- package/template/config/ui-ux.jsonc +146 -19
- package/template/stages/04-ui-ux/CLAUDE.md +110 -20
- package/template/stages/04-ui-ux/config.jsonc +27 -0
package/README.md
CHANGED
|
@@ -138,7 +138,7 @@ claude-symphony provides context management tools to help track and manage Claud
|
|
|
138
138
|
| **Pipeline** | `/status`, `/next`, `/handoff`, `/checkpoint`, `/context`, `/validate`, `/restore`, `/run-stage`, `/stages` |
|
|
139
139
|
| **Multi-AI** | `/collaborate`, `/synthesize`, `/benchmark`, `/fork`, `/gemini`, `/codex` |
|
|
140
140
|
| **Stage Shortcuts** | `/brainstorm`, `/research`, `/planning`, `/ui-ux`, `/tasks`, `/implement`, `/refactor`, `/qa`, `/test`, `/deploy` |
|
|
141
|
-
| **Requirements & Design** | `/epic`, `/refine`, `/moodboard`, `/stitch`
|
|
141
|
+
| **Requirements & Design** | `/epic`, `/refine`, `/moodboard`, `/moodboard generate`, `/pencil`, `/stitch` |
|
|
142
142
|
| **Agent** | `/arch-review`, `/qa-analyze` |
|
|
143
143
|
| **Configuration** | `/config`, `/goto`, `/init-project` |
|
|
144
144
|
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ Collect visual references and analyze them to generate design tokens and design
|
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
/moodboard # Start interactive moodboard flow
|
|
9
|
+
/moodboard generate # Generate moodboard from text description (Path B)
|
|
9
10
|
/moodboard add [category] # Add images to a category
|
|
10
11
|
/moodboard analyze # Run analysis on collected images
|
|
11
12
|
/moodboard feedback "..." # Provide feedback on analysis
|
|
@@ -59,8 +60,58 @@ Review collected images and run initial analysis.
|
|
|
59
60
|
|
|
60
61
|
---
|
|
61
62
|
|
|
63
|
+
## Dual-Path Workflow
|
|
64
|
+
|
|
65
|
+
The moodboard supports two paths based on your pre-start intake answers:
|
|
66
|
+
|
|
67
|
+
### Path A: Analyze Existing References
|
|
68
|
+
If you already have design references, use the standard interactive flow:
|
|
69
|
+
```
|
|
70
|
+
/moodboard # Collect and analyze existing images
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Path B: AI-Generated Moodboard
|
|
74
|
+
If you have no references, generate a moodboard from text descriptions:
|
|
75
|
+
```
|
|
76
|
+
/moodboard generate # Generate moodboard via AI
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
62
81
|
## Subcommands
|
|
63
82
|
|
|
83
|
+
### `/moodboard generate` (Path B: AI-Generated Moodboard)
|
|
84
|
+
|
|
85
|
+
Generate a moodboard from text descriptions when no existing references are available.
|
|
86
|
+
|
|
87
|
+
**Flow:**
|
|
88
|
+
1. **Description Collection** - Describe your desired visual style
|
|
89
|
+
2. **AI Generation** - Generate visual references using provider chain
|
|
90
|
+
3. **User Review** - Review and approve/reject generated references
|
|
91
|
+
4. **Token Extraction** - Extract design tokens from approved selections
|
|
92
|
+
|
|
93
|
+
**Generation Provider Priority:**
|
|
94
|
+
1. **Pencil.dev** (via Playwright/BrowserMCP) - Text-to-UI generation
|
|
95
|
+
2. **Stitch MCP** - Google Stitch text-to-UI fallback
|
|
96
|
+
3. **Claude Vision** - AI-described design concepts
|
|
97
|
+
|
|
98
|
+
**Example:**
|
|
99
|
+
```
|
|
100
|
+
/moodboard generate
|
|
101
|
+
> Describe your desired visual style:
|
|
102
|
+
> "Modern SaaS dashboard with dark theme, glassmorphism cards, and gradient accents"
|
|
103
|
+
|
|
104
|
+
Generating via Pencil.dev...
|
|
105
|
+
[Generated 3 style references]
|
|
106
|
+
|
|
107
|
+
Review:
|
|
108
|
+
1. [Dark glassmorphism variant] - love_it / tweak / different / discard
|
|
109
|
+
2. [Gradient accent variant] - love_it / tweak / different / discard
|
|
110
|
+
3. [Minimal dark variant] - love_it / tweak / different / discard
|
|
111
|
+
|
|
112
|
+
Extracting design tokens from approved selections...
|
|
113
|
+
```
|
|
114
|
+
|
|
64
115
|
### `/moodboard add [category]`
|
|
65
116
|
Add images to a specific category without going through full flow.
|
|
66
117
|
|
|
@@ -89,10 +140,11 @@ Run analysis on all collected images using configured provider.
|
|
|
89
140
|
- Component recommendations
|
|
90
141
|
- Spacing/rhythm analysis
|
|
91
142
|
|
|
92
|
-
**Analysis Providers:**
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
143
|
+
**Analysis Providers (priority order):**
|
|
144
|
+
1. `pencil_dev` - Pencil.dev browser-automated analysis (via Playwright/BrowserMCP)
|
|
145
|
+
2. `stitch` - Google Stitch MCP analysis
|
|
146
|
+
3. `figma_mcp` - Figma MCP for design token export
|
|
147
|
+
4. `claude_vision` - Claude's native vision capabilities
|
|
96
148
|
|
|
97
149
|
**Action:**
|
|
98
150
|
```bash
|
|
@@ -160,7 +212,21 @@ stages/04-ui-ux/inputs/moodboard/
|
|
|
160
212
|
|
|
161
213
|
## Analysis Flow
|
|
162
214
|
|
|
163
|
-
### Using
|
|
215
|
+
### Using Pencil.dev (Primary)
|
|
216
|
+
|
|
217
|
+
1. **Browser Launch**: Open Pencil.dev via Playwright (or BrowserMCP fallback)
|
|
218
|
+
2. **Image Upload**: Upload moodboard images for analysis
|
|
219
|
+
3. **AI Analysis**: Pencil.dev extracts design patterns
|
|
220
|
+
4. **Token Generation**: Color, typography, spacing, component tokens
|
|
221
|
+
|
|
222
|
+
### Using Stitch MCP (Fallback 1)
|
|
223
|
+
|
|
224
|
+
When Pencil.dev is unavailable:
|
|
225
|
+
1. **Design DNA Extraction**: Extract style tokens from images
|
|
226
|
+
2. **Pattern Analysis**: Identify layout and component patterns
|
|
227
|
+
3. **Export**: Generate design tokens
|
|
228
|
+
|
|
229
|
+
### Using Claude Vision (Fallback 3)
|
|
164
230
|
|
|
165
231
|
1. **Image Reading**: Claude reads all images in moodboard directories
|
|
166
232
|
2. **Color Extraction**: Identifies dominant and accent colors
|
|
@@ -168,7 +234,7 @@ stages/04-ui-ux/inputs/moodboard/
|
|
|
168
234
|
4. **Layout Patterns**: Identifies grid systems and spacing patterns
|
|
169
235
|
5. **Component Identification**: Suggests UI component patterns
|
|
170
236
|
|
|
171
|
-
### Using Figma MCP
|
|
237
|
+
### Using Figma MCP (Fallback 2)
|
|
172
238
|
|
|
173
239
|
When Figma links are provided:
|
|
174
240
|
1. **Variable Extraction**: Get design variables from Figma
|
|
@@ -242,7 +308,7 @@ Moodboard state is tracked in `state/progress.json`:
|
|
|
242
308
|
|
|
243
309
|
## Configuration
|
|
244
310
|
|
|
245
|
-
See `config/ui-ux.
|
|
311
|
+
See `config/ui-ux.jsonc` for detailed settings:
|
|
246
312
|
- Collection flow steps
|
|
247
313
|
- Analysis providers
|
|
248
314
|
- Feedback loop settings
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# /pencil - Pencil.dev Browser-Automated UI Generation & Analysis
|
|
2
|
+
|
|
3
|
+
Generate UI designs and analyze visual references using Pencil.dev via browser automation.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/pencil # Show status and connection check
|
|
9
|
+
/pencil generate "description" # Generate UI from text description
|
|
10
|
+
/pencil analyze path/to/image # Analyze image for design tokens
|
|
11
|
+
/pencil moodboard "description" # Generate moodboard from text description
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Commands
|
|
17
|
+
|
|
18
|
+
### `/pencil` (Status)
|
|
19
|
+
|
|
20
|
+
Check Pencil.dev accessibility and browser MCP status.
|
|
21
|
+
|
|
22
|
+
**Output:**
|
|
23
|
+
- Pencil.dev connection status
|
|
24
|
+
- Browser MCP availability (Playwright / BrowserMCP)
|
|
25
|
+
- Current fallback chain status
|
|
26
|
+
|
|
27
|
+
### `/pencil generate "description"`
|
|
28
|
+
|
|
29
|
+
Generate UI from a text description using Pencil.dev.
|
|
30
|
+
|
|
31
|
+
**Example:**
|
|
32
|
+
```
|
|
33
|
+
/pencil generate "A modern dashboard with sidebar navigation, user avatar, and analytics cards"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Process:**
|
|
37
|
+
1. Launch browser via Playwright (or BrowserMCP fallback)
|
|
38
|
+
2. Navigate to Pencil.dev
|
|
39
|
+
3. Input design description
|
|
40
|
+
4. Capture generated UI output
|
|
41
|
+
5. Save to `outputs/pencil_generated/`
|
|
42
|
+
|
|
43
|
+
**Output:**
|
|
44
|
+
- `outputs/pencil_generated/ui_[timestamp]/` - Generated UI screenshots and assets
|
|
45
|
+
|
|
46
|
+
### `/pencil analyze path/to/image`
|
|
47
|
+
|
|
48
|
+
Analyze an image or screenshot to extract design tokens and patterns.
|
|
49
|
+
|
|
50
|
+
**Example:**
|
|
51
|
+
```
|
|
52
|
+
/pencil analyze inputs/moodboard/ui-references/hero-section.png
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Extracts:**
|
|
56
|
+
- Color palette
|
|
57
|
+
- Typography patterns
|
|
58
|
+
- Layout structure
|
|
59
|
+
- Component identification
|
|
60
|
+
- Spacing rhythm
|
|
61
|
+
|
|
62
|
+
### `/pencil moodboard "description"`
|
|
63
|
+
|
|
64
|
+
Generate a moodboard from a text description (Path B workflow).
|
|
65
|
+
|
|
66
|
+
**Example:**
|
|
67
|
+
```
|
|
68
|
+
/pencil moodboard "Modern SaaS app with dark theme, glassmorphism, and gradient accents"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Process:**
|
|
72
|
+
1. Generate multiple style references via Pencil.dev
|
|
73
|
+
2. Present to user for review
|
|
74
|
+
3. Extract design tokens from approved selections
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Browser MCP Priority
|
|
79
|
+
|
|
80
|
+
Pencil.dev is accessed via browser automation. The priority order:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
1. Playwright MCP (primary)
|
|
84
|
+
- Full browser control
|
|
85
|
+
- Screenshot capture
|
|
86
|
+
- Element interaction
|
|
87
|
+
|
|
88
|
+
2. BrowserMCP (fallback)
|
|
89
|
+
- Alternative browser automation
|
|
90
|
+
- Used when Playwright is unavailable
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Browser Configuration
|
|
94
|
+
|
|
95
|
+
```jsonc
|
|
96
|
+
{
|
|
97
|
+
"browser_config": {
|
|
98
|
+
"primary": "playwright",
|
|
99
|
+
"fallback": "browsermcp",
|
|
100
|
+
"timeout_ms": 30000,
|
|
101
|
+
"retry_count": 2
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Fallback Chain
|
|
109
|
+
|
|
110
|
+
When Pencil.dev is unavailable or browser automation fails:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Pencil.dev (via Playwright)
|
|
114
|
+
|
|
|
115
|
+
+-- Playwright failed? --------> Pencil.dev (via BrowserMCP)
|
|
116
|
+
|
|
|
117
|
+
+-- BrowserMCP failed? --------> Stitch MCP (text-to-UI)
|
|
118
|
+
|
|
|
119
|
+
+-- Stitch unavailable? -------> Figma MCP (design tokens only)
|
|
120
|
+
|
|
|
121
|
+
+-- Figma unavailable? --------> Claude Vision (analysis only)
|
|
122
|
+
|
|
|
123
|
+
+-- All failed? ---------------> Manual wireframes (ASCII/Mermaid)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Fallback configuration: `config/mcp_fallbacks.jsonc`
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Integration with Moodboard Workflow
|
|
131
|
+
|
|
132
|
+
### Path A (Existing References)
|
|
133
|
+
```
|
|
134
|
+
/moodboard # Collect existing images
|
|
135
|
+
/pencil analyze ... # Analyze with Pencil.dev
|
|
136
|
+
/moodboard export # Export design tokens
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Path B (AI-Generated)
|
|
140
|
+
```
|
|
141
|
+
/pencil moodboard "..." # Generate moodboard via Pencil.dev
|
|
142
|
+
[User reviews and approves]
|
|
143
|
+
/moodboard export # Export design tokens
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Output Files
|
|
149
|
+
|
|
150
|
+
| File | Description |
|
|
151
|
+
|------|-------------|
|
|
152
|
+
| `outputs/pencil_generated/` | Generated UI files |
|
|
153
|
+
| `outputs/pencil_analysis/` | Analysis results |
|
|
154
|
+
| `outputs/design_dna.json` | Extracted Design DNA |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Configuration
|
|
159
|
+
|
|
160
|
+
See `config/ui-ux.jsonc` for settings:
|
|
161
|
+
- `moodboard.analysis_provider.providers.pencil_dev` - Provider configuration
|
|
162
|
+
- `moodboard.moodboard_workflow` - Dual-path workflow settings
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Troubleshooting
|
|
167
|
+
|
|
168
|
+
### "Pencil.dev not accessible"
|
|
169
|
+
- Check internet connection
|
|
170
|
+
- Verify https://pencil.dev is available
|
|
171
|
+
- Fallback will auto-activate (Stitch MCP)
|
|
172
|
+
|
|
173
|
+
### "Browser MCP not available"
|
|
174
|
+
- Ensure Playwright or BrowserMCP is configured
|
|
175
|
+
- Run: `claude mcp list` to check available browser MCPs
|
|
176
|
+
- Install Playwright: see MCP server setup docs
|
|
177
|
+
|
|
178
|
+
### "Browser automation timeout"
|
|
179
|
+
- Default timeout: 30 seconds
|
|
180
|
+
- Retries: 2 attempts before fallback
|
|
181
|
+
- If persistent, use `/stitch` as alternative
|
|
@@ -118,12 +118,16 @@ Display detailed quota usage and history.
|
|
|
118
118
|
|
|
119
119
|
## Workflow Integration
|
|
120
120
|
|
|
121
|
+
> **Note**: Stitch is the **2nd priority** UI generation tool. Pencil.dev is 1st priority.
|
|
122
|
+
> Stitch auto-activates when Pencil.dev is unavailable or fails.
|
|
123
|
+
|
|
121
124
|
Recommended workflow for Stage 04 (UI/UX):
|
|
122
125
|
|
|
123
126
|
```
|
|
124
|
-
1. /moodboard # Collect design references
|
|
125
|
-
2. /
|
|
126
|
-
|
|
127
|
+
1. /moodboard # Collect design references (or /moodboard generate)
|
|
128
|
+
2. /pencil analyze ... # Analyze with Pencil.dev (primary)
|
|
129
|
+
└─ If Pencil.dev fails:
|
|
130
|
+
3. /stitch dna # Extract Design DNA from moodboard (fallback)
|
|
127
131
|
4. /stitch generate "..." # Generate initial UI
|
|
128
132
|
5. /stitch variants 3 # Generate alternatives
|
|
129
133
|
6. [Select best variant]
|
|
@@ -170,18 +174,22 @@ At 80% usage, a warning is displayed. Consider:
|
|
|
170
174
|
|
|
171
175
|
## Fallback Chain
|
|
172
176
|
|
|
173
|
-
|
|
177
|
+
Full fallback chain (Stitch is 2nd priority):
|
|
174
178
|
|
|
175
179
|
```
|
|
176
|
-
|
|
177
|
-
│
|
|
178
|
-
├─ Quota exceeded? ──────▶ Figma MCP (design tokens only)
|
|
179
|
-
│
|
|
180
|
-
├─ API error? ──────────▶ Retry 2x, then Figma MCP
|
|
180
|
+
Pencil.dev (via Playwright) ◀── 1st Priority
|
|
181
181
|
│
|
|
182
|
-
├─
|
|
182
|
+
├─ Browser failed? ────────▶ Pencil.dev (via BrowserMCP)
|
|
183
183
|
│
|
|
184
|
-
└─ All failed?
|
|
184
|
+
└─ All browsers failed? ───▶ Stitch MCP ◀── 2nd Priority (this tool)
|
|
185
|
+
│
|
|
186
|
+
├─ Quota exceeded? ──────▶ Figma MCP (design tokens only)
|
|
187
|
+
│
|
|
188
|
+
├─ API error? ──────────▶ Retry 2x, then Figma MCP
|
|
189
|
+
│
|
|
190
|
+
├─ Figma unavailable? ──▶ Claude Vision (analysis only)
|
|
191
|
+
│
|
|
192
|
+
└─ All failed? ─────────▶ Manual wireframes (ASCII/Mermaid)
|
|
185
193
|
```
|
|
186
194
|
|
|
187
195
|
Fallback configuration: `config/mcp_fallbacks.jsonc`
|
package/template/CLAUDE.md
CHANGED
|
@@ -204,8 +204,13 @@ Visualizes context usage, tool activity, and todo progress in the statusline.
|
|
|
204
204
|
| `/refine` | Interactive requirements refinement (Epic → Feature → Task) |
|
|
205
205
|
| `/refine --validate` | Validate requirements against INVEST criteria |
|
|
206
206
|
| `/moodboard` | Collect design references and analyze design tokens |
|
|
207
|
+
| `/moodboard generate` | Generate moodboard from text description (Path B: no existing refs) |
|
|
207
208
|
| `/moodboard analyze` | Extract colors, fonts, styles from collected images |
|
|
208
209
|
| `/moodboard skip` | Skip moodboard collection (use AI-generated design) |
|
|
210
|
+
| `/pencil` | Show Pencil.dev status and connection check |
|
|
211
|
+
| `/pencil generate "..."` | Generate UI from text description via Pencil.dev |
|
|
212
|
+
| `/pencil analyze path` | Analyze image for design tokens via Pencil.dev |
|
|
213
|
+
| `/pencil moodboard "..."` | Generate moodboard from text description via Pencil.dev |
|
|
209
214
|
|
|
210
215
|
### Task Management & Sync Commands
|
|
211
216
|
| Command | Description |
|
|
@@ -428,7 +433,7 @@ Quick reference for frequently accessed files:
|
|
|
428
433
|
|-------|-------------|----------|-------|
|
|
429
434
|
| 02-research | Exa Search | Context7 | Use Exa for market data, Context7 for tech docs |
|
|
430
435
|
| 03-planning | Context7 | Exa Search | Architecture patterns, framework best practices |
|
|
431
|
-
| 04-ui-ux |
|
|
436
|
+
| 04-ui-ux | Pencil.dev (browser) | Stitch → Figma → Claude Vision | Pencil.dev primary for UI gen/analysis; Stitch fallback |
|
|
432
437
|
| 05-task-management | Notion | Markdown files | Falls back to local files if Notion not configured |
|
|
433
438
|
|
|
434
439
|
### Fallback Conditions
|
|
@@ -124,6 +124,22 @@
|
|
|
124
124
|
"notify_user": true
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
+
"pencil_dev": {
|
|
128
|
+
"primary": "playwright",
|
|
129
|
+
"fallbacks": ["browsermcp", "stitch", "figma-dev-mode", "claude_vision"],
|
|
130
|
+
"url": "https://pencil.dev",
|
|
131
|
+
"rules": {
|
|
132
|
+
"on_browser_failed": "use_fallback",
|
|
133
|
+
"on_timeout": "retry_then_fallback",
|
|
134
|
+
"retry_count": 2,
|
|
135
|
+
"retry_delay_ms": 2000,
|
|
136
|
+
"timeout_ms": 30000
|
|
137
|
+
},
|
|
138
|
+
"on_error": {
|
|
139
|
+
"action": "use_fallback_chain",
|
|
140
|
+
"message": "Pencil.dev browser automation failed. Falling back to {{FALLBACK_TOOL}}."
|
|
141
|
+
}
|
|
142
|
+
},
|
|
127
143
|
"figma": {
|
|
128
144
|
"primary": "figma-dev-mode",
|
|
129
145
|
"fallbacks": [],
|
|
@@ -176,16 +192,18 @@
|
|
|
176
192
|
"reason": "Architecture pattern/documentation search"
|
|
177
193
|
},
|
|
178
194
|
"04-ui-ux": {
|
|
179
|
-
"ui_generation": ["stitch", "figma-dev-mode", "claude_vision"],
|
|
195
|
+
"ui_generation": ["pencil_dev", "stitch", "figma-dev-mode", "claude_vision"],
|
|
196
|
+
"ui_analysis": ["pencil_dev", "stitch", "figma-dev-mode", "claude_vision"],
|
|
180
197
|
"browser": [
|
|
181
|
-
"
|
|
182
|
-
"
|
|
198
|
+
"playwright",
|
|
199
|
+
"browsermcp",
|
|
200
|
+
"figma-dev-mode"
|
|
183
201
|
],
|
|
184
202
|
"search": [
|
|
185
203
|
"exa",
|
|
186
204
|
"web_search"
|
|
187
205
|
],
|
|
188
|
-
"reason": "
|
|
206
|
+
"reason": "Pencil.dev for UI generation/analysis (1st), Stitch fallback, Figma for design tokens"
|
|
189
207
|
},
|
|
190
208
|
"06-implementation": {
|
|
191
209
|
"search": [
|
|
@@ -317,6 +335,12 @@
|
|
|
317
335
|
"on_failure": "warn",
|
|
318
336
|
"message": "codex-wrapper.sh not executable"
|
|
319
337
|
},
|
|
338
|
+
{
|
|
339
|
+
"name": "pencil_dev_access",
|
|
340
|
+
"command": "curl -s -o /dev/null -w '%{http_code}' https://pencil.dev | grep -q '200'",
|
|
341
|
+
"on_failure": "warn",
|
|
342
|
+
"message": "Pencil.dev not accessible. Stitch MCP will be used as fallback for UI generation."
|
|
343
|
+
},
|
|
320
344
|
{
|
|
321
345
|
"name": "stitch_mcp",
|
|
322
346
|
"command": "claude mcp list | grep -q stitch",
|
|
@@ -26,30 +26,32 @@
|
|
|
26
26
|
"analyze_spacing": true
|
|
27
27
|
},
|
|
28
28
|
"analysis_provider": {
|
|
29
|
-
|
|
30
|
-
"
|
|
29
|
+
// Priority: pencil_dev > stitch > figma_mcp > claude_vision
|
|
30
|
+
"primary": "pencil_dev",
|
|
31
|
+
"fallback_chain": ["stitch", "figma_mcp", "claude_vision"],
|
|
31
32
|
"providers": {
|
|
32
|
-
"
|
|
33
|
+
"pencil_dev": {
|
|
33
34
|
"enabled": true,
|
|
34
|
-
"description": "
|
|
35
|
+
"description": "Pencil.dev browser-automated UI generation and analysis",
|
|
36
|
+
"type": "browser_automated",
|
|
37
|
+
"url": "https://pencil.dev",
|
|
38
|
+
"browser_priority": ["playwright", "browsermcp"],
|
|
35
39
|
"capabilities": [
|
|
40
|
+
"text_to_ui",
|
|
41
|
+
"image_to_ui",
|
|
42
|
+
"ui_analysis",
|
|
36
43
|
"color_extraction",
|
|
37
44
|
"layout_analysis",
|
|
38
45
|
"component_identification",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"design_token_export",
|
|
49
|
-
"component_inspection",
|
|
50
|
-
"variable_extraction",
|
|
51
|
-
"code_generation"
|
|
52
|
-
]
|
|
46
|
+
"moodboard_generation",
|
|
47
|
+
"style_transfer"
|
|
48
|
+
],
|
|
49
|
+
"browser_config": {
|
|
50
|
+
"primary": "playwright",
|
|
51
|
+
"fallback": "browsermcp",
|
|
52
|
+
"timeout_ms": 30000,
|
|
53
|
+
"retry_count": 2
|
|
54
|
+
}
|
|
53
55
|
},
|
|
54
56
|
"stitch": {
|
|
55
57
|
"enabled": true,
|
|
@@ -66,6 +68,28 @@
|
|
|
66
68
|
"standard": { "description": "Production-ready UI", "quota_cost": 1 },
|
|
67
69
|
"experimental": { "description": "Cutting-edge features", "quota_cost": 1 }
|
|
68
70
|
}
|
|
71
|
+
},
|
|
72
|
+
"figma_mcp": {
|
|
73
|
+
"enabled": true,
|
|
74
|
+
"description": "Figma MCP server integration",
|
|
75
|
+
"capabilities": [
|
|
76
|
+
"design_token_export",
|
|
77
|
+
"component_inspection",
|
|
78
|
+
"variable_extraction",
|
|
79
|
+
"code_generation"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"claude_vision": {
|
|
83
|
+
"enabled": true,
|
|
84
|
+
"description": "Claude's native vision capabilities",
|
|
85
|
+
"capabilities": [
|
|
86
|
+
"color_extraction",
|
|
87
|
+
"layout_analysis",
|
|
88
|
+
"component_identification",
|
|
89
|
+
"typography_detection",
|
|
90
|
+
"spacing_analysis",
|
|
91
|
+
"accessibility_check"
|
|
92
|
+
]
|
|
69
93
|
}
|
|
70
94
|
}
|
|
71
95
|
},
|
|
@@ -305,15 +329,118 @@
|
|
|
305
329
|
"commands": {
|
|
306
330
|
"start": "/moodboard",
|
|
307
331
|
"add": "/moodboard add [category]",
|
|
332
|
+
"generate": "/moodboard generate",
|
|
308
333
|
"analyze": "/moodboard analyze",
|
|
309
334
|
"feedback": "/moodboard feedback",
|
|
310
335
|
"export": "/moodboard export",
|
|
311
336
|
"status": "/moodboard status"
|
|
337
|
+
},
|
|
338
|
+
"moodboard_workflow": {
|
|
339
|
+
"description": "Dual-path moodboard workflow based on user's existing assets",
|
|
340
|
+
"path_a": {
|
|
341
|
+
"id": "analyze_existing",
|
|
342
|
+
"name": "Analyze Existing Moodboard",
|
|
343
|
+
"trigger": "User has existing design references/images",
|
|
344
|
+
"steps": [
|
|
345
|
+
"collect_images",
|
|
346
|
+
"analyze_with_provider",
|
|
347
|
+
"extract_design_dna",
|
|
348
|
+
"generate_tokens",
|
|
349
|
+
"user_feedback",
|
|
350
|
+
"finalize"
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
"path_b": {
|
|
354
|
+
"id": "generate_new",
|
|
355
|
+
"name": "AI-Generated Moodboard",
|
|
356
|
+
"trigger": "User has no existing references",
|
|
357
|
+
"steps": [
|
|
358
|
+
"collect_text_description",
|
|
359
|
+
"generate_via_pencil_dev",
|
|
360
|
+
"user_review",
|
|
361
|
+
"extract_design_dna",
|
|
362
|
+
"generate_tokens",
|
|
363
|
+
"user_feedback",
|
|
364
|
+
"finalize"
|
|
365
|
+
],
|
|
366
|
+
"generation_provider_priority": ["pencil_dev", "stitch", "claude_vision"]
|
|
367
|
+
}
|
|
312
368
|
}
|
|
313
369
|
},
|
|
370
|
+
"pre_start_intake": {
|
|
371
|
+
"enabled": true,
|
|
372
|
+
"description": "Required pre-start questions before UI/UX work begins",
|
|
373
|
+
"required": true,
|
|
374
|
+
"questions": [
|
|
375
|
+
{
|
|
376
|
+
"id": "moodboard_available",
|
|
377
|
+
"question": "Do you have existing design references or moodboard images?",
|
|
378
|
+
"impact": "Determines workflow path (Path A: analyze existing vs Path B: AI-generate)",
|
|
379
|
+
"options": ["yes", "no"],
|
|
380
|
+
"branch": {
|
|
381
|
+
"yes": "moodboard_workflow.path_a",
|
|
382
|
+
"no": "moodboard_workflow.path_b"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"id": "brand_assets_available",
|
|
387
|
+
"question": "Do you have brand assets (logo, colors, fonts, brand guidelines)?",
|
|
388
|
+
"impact": "Determines Design DNA extraction source",
|
|
389
|
+
"options": ["yes", "no"],
|
|
390
|
+
"branch": {
|
|
391
|
+
"yes": "Collect into brand-assets/ directory",
|
|
392
|
+
"no": "AI will suggest brand elements"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"id": "target_platform",
|
|
397
|
+
"question": "What is your target platform?",
|
|
398
|
+
"impact": "Sets wireframe breakpoints and component design constraints",
|
|
399
|
+
"options": ["web", "mobile", "desktop", "responsive"],
|
|
400
|
+
"default": "responsive",
|
|
401
|
+
"breakpoint_presets": {
|
|
402
|
+
"web": ["desktop", "tablet"],
|
|
403
|
+
"mobile": ["mobile"],
|
|
404
|
+
"desktop": ["desktop"],
|
|
405
|
+
"responsive": ["mobile", "tablet", "desktop"]
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"id": "design_style",
|
|
410
|
+
"question": "What design style direction do you prefer?",
|
|
411
|
+
"impact": "Pre-sets style discovery or skips it if already decided",
|
|
412
|
+
"options": ["modern_minimal", "bold_colorful", "professional", "playful", "custom"],
|
|
413
|
+
"branch": {
|
|
414
|
+
"custom": "Proceed to style_discovery step",
|
|
415
|
+
"_other": "Skip style_discovery, apply preset"
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"id": "competitors_references",
|
|
420
|
+
"question": "Are there competitor apps or reference sites you want to analyze?",
|
|
421
|
+
"impact": "Determines whether competitor UI analysis is performed",
|
|
422
|
+
"options": ["yes", "no"],
|
|
423
|
+
"branch": {
|
|
424
|
+
"yes": "Collect URLs, analyze with Pencil.dev",
|
|
425
|
+
"no": "Skip competitor analysis"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"id": "design_tool_access",
|
|
430
|
+
"question": "Do you have access to Figma or other design tools?",
|
|
431
|
+
"impact": "Determines final export format",
|
|
432
|
+
"options": ["figma", "none"],
|
|
433
|
+
"branch": {
|
|
434
|
+
"figma": "Export as .fig + HTML/CSS",
|
|
435
|
+
"none": "Export as HTML/CSS only"
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
},
|
|
314
440
|
"stitch_integration": {
|
|
315
441
|
"enabled": true,
|
|
316
|
-
"auto_invoke_on_moodboard":
|
|
442
|
+
"auto_invoke_on_moodboard": false,
|
|
443
|
+
"auto_invoke_condition": "pencil_dev_failed",
|
|
317
444
|
"design_dna": {
|
|
318
445
|
"extract_on_start": true,
|
|
319
446
|
"source_directories": [
|
|
@@ -66,6 +66,35 @@ User interface and experience design stage
|
|
|
66
66
|
- `$STAGES_ROOT/03-planning/outputs/architecture.md`
|
|
67
67
|
- `$STAGES_ROOT/03-planning/HANDOFF.md`
|
|
68
68
|
|
|
69
|
+
## Pre-Start Intake (Required)
|
|
70
|
+
|
|
71
|
+
> ⚠️ **MANDATORY**: Before any UI/UX work, ask these 6 questions and record answers.
|
|
72
|
+
> Configuration: `config/ui-ux.jsonc` → `pre_start_intake`
|
|
73
|
+
|
|
74
|
+
### 6 Required Questions
|
|
75
|
+
|
|
76
|
+
| # | Question | Impact | Branch |
|
|
77
|
+
|---|----------|--------|--------|
|
|
78
|
+
| 1 | **무드보드 보유 여부** — 기존 디자인 레퍼런스/이미지가 있는가? | 전체 워크플로우 경로 결정 | 있음→Path A (분석), 없음→Path B (AI 생성) |
|
|
79
|
+
| 2 | **브랜드 에셋 보유** — 로고, 컬러, 폰트 등 브랜드 가이드라인이 있는가? | Design DNA 추출 소스 결정 | 있음→brand-assets/ 수집, 없음→AI 제안 |
|
|
80
|
+
| 3 | **타겟 플랫폼** — 웹/모바일/데스크톱/반응형? | 와이어프레임 브레이크포인트, 컴포넌트 설계 | 선택에 따라 breakpoint 프리셋 적용 |
|
|
81
|
+
| 4 | **디자인 스타일 방향** — 모던, 볼드, 프로, 플레이풀, 커스텀? | 무드보드 생성/분석 기준점 | style_discovery 단계 스킵 또는 사전 설정 |
|
|
82
|
+
| 5 | **경쟁사/레퍼런스** — 참고할 앱이나 경쟁사가 있는가? | 경쟁사 UI 분석 여부 | 있음→Pencil.dev로 분석, 없음→스킵 |
|
|
83
|
+
| 6 | **디자인 도구 접근성** — Figma 계정 등 외부 도구 보유? | 최종 export 포맷 결정 | Figma→.fig export, 없음→HTML/CSS 우선 |
|
|
84
|
+
|
|
85
|
+
### Intake Flow
|
|
86
|
+
```
|
|
87
|
+
1. Ask all 6 questions upfront
|
|
88
|
+
2. Record answers in state/progress.json under "ui_ux_intake"
|
|
89
|
+
3. Determine Path A or Path B based on Q1
|
|
90
|
+
4. Apply platform presets based on Q3
|
|
91
|
+
5. Pre-set style direction based on Q4
|
|
92
|
+
6. Configure export format based on Q6
|
|
93
|
+
7. THEN proceed to moodboard setup
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
69
98
|
## Prerequisites Before UI/UX Design
|
|
70
99
|
|
|
71
100
|
> ⚠️ **Important**: Verify previous stage deliverables before starting UI/UX design
|
|
@@ -78,28 +107,40 @@ User interface and experience design stage
|
|
|
78
107
|
| Stage 03 | `stages/03-planning/HANDOFF.md` | Stage 03 handoff reviewed |
|
|
79
108
|
| Stage 01 | `stages/01-brainstorm/outputs/requirements_analysis.md` | User needs identified |
|
|
80
109
|
|
|
81
|
-
### Moodboard Setup
|
|
82
|
-
Before proceeding with wireframe design:
|
|
110
|
+
### Moodboard Setup (Dual-Path)
|
|
83
111
|
|
|
84
|
-
|
|
85
|
-
2. **If Yes**: Collect URLs, images, color preferences via `/moodboard`
|
|
86
|
-
3. **If No**: Explicitly confirm AI-generated design is acceptable
|
|
112
|
+
Based on Pre-Start Intake Q1 answer:
|
|
87
113
|
|
|
114
|
+
#### Path A: Analyze Existing References (Q1 = "yes")
|
|
115
|
+
User has existing design references/images.
|
|
88
116
|
```bash
|
|
89
|
-
#
|
|
90
|
-
/moodboard # Start interactive moodboard flow
|
|
117
|
+
/moodboard # Start interactive collection flow
|
|
91
118
|
/moodboard add # Add design references directly
|
|
92
|
-
/moodboard
|
|
119
|
+
/moodboard analyze # Run analysis with provider chain
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### Path B: AI-Generated Moodboard (Q1 = "no")
|
|
123
|
+
User has no existing references — AI generates them.
|
|
124
|
+
```bash
|
|
125
|
+
/moodboard generate # Generate moodboard from text description
|
|
126
|
+
/pencil moodboard "..." # Generate via Pencil.dev directly
|
|
93
127
|
```
|
|
94
128
|
|
|
129
|
+
**Generation Provider Priority:**
|
|
130
|
+
1. Pencil.dev (via Playwright/BrowserMCP)
|
|
131
|
+
2. Stitch MCP
|
|
132
|
+
3. Claude Vision
|
|
133
|
+
|
|
95
134
|
### Validation Checkpoint
|
|
135
|
+
- [ ] Pre-Start Intake 6 questions answered
|
|
96
136
|
- [ ] Stage 03 HANDOFF.md reviewed
|
|
97
|
-
- [ ]
|
|
98
|
-
- [ ] Brand guidelines
|
|
137
|
+
- [ ] Moodboard path determined (Path A or Path B)
|
|
138
|
+
- [ ] Brand guidelines collected (if available, Q2)
|
|
139
|
+
- [ ] Platform breakpoints configured (Q3)
|
|
99
140
|
|
|
100
141
|
## Moodboard Analysis
|
|
101
142
|
|
|
102
|
-
> Configuration: `config/ui-ux.
|
|
143
|
+
> Configuration: `config/ui-ux.jsonc`
|
|
103
144
|
> Command: `/moodboard`
|
|
104
145
|
|
|
105
146
|
### Interactive Moodboard Collection (Recommended)
|
|
@@ -155,10 +196,12 @@ inputs/moodboard/
|
|
|
155
196
|
|
|
156
197
|
### Analysis Providers
|
|
157
198
|
|
|
158
|
-
| Provider | Capabilities |
|
|
159
|
-
|
|
160
|
-
| `
|
|
161
|
-
| `
|
|
199
|
+
| Priority | Provider | Capabilities |
|
|
200
|
+
|----------|----------|--------------|
|
|
201
|
+
| 1 | `pencil_dev` | Text-to-UI, image analysis, moodboard generation, style transfer |
|
|
202
|
+
| 2 | `stitch` | Text-to-UI, image-to-UI, Design DNA, Figma/HTML export |
|
|
203
|
+
| 3 | `figma_mcp` | Design token export, variable extraction, component inspection |
|
|
204
|
+
| 4 | `claude_vision` | Color extraction, layout analysis, component ID, accessibility |
|
|
162
205
|
|
|
163
206
|
### Feedback Loop
|
|
164
207
|
|
|
@@ -195,10 +238,56 @@ Generates:
|
|
|
195
238
|
|
|
196
239
|
**Note:** AI analyzes images using vision capabilities. Use `/moodboard analyze` to trigger analysis.
|
|
197
240
|
|
|
198
|
-
##
|
|
241
|
+
## Pencil.dev Integration (Primary)
|
|
242
|
+
|
|
243
|
+
> Configuration: `config/ui-ux.jsonc`
|
|
244
|
+
> Command: `/pencil`
|
|
245
|
+
|
|
246
|
+
### Overview
|
|
247
|
+
|
|
248
|
+
Pencil.dev is the **primary** UI generation and analysis tool, accessed via browser automation (Playwright or BrowserMCP).
|
|
249
|
+
|
|
250
|
+
### Capabilities
|
|
251
|
+
|
|
252
|
+
| Feature | Description |
|
|
253
|
+
|---------|-------------|
|
|
254
|
+
| Text→UI | Generate UI from text descriptions |
|
|
255
|
+
| Image Analysis | Analyze images for design tokens |
|
|
256
|
+
| Moodboard Generation | Generate visual references from descriptions |
|
|
257
|
+
| Style Transfer | Apply style patterns to new designs |
|
|
258
|
+
|
|
259
|
+
### Commands
|
|
260
|
+
|
|
261
|
+
| Command | Description |
|
|
262
|
+
|---------|-------------|
|
|
263
|
+
| `/pencil` | Show status and connection check |
|
|
264
|
+
| `/pencil generate "..."` | Generate UI from description |
|
|
265
|
+
| `/pencil analyze path` | Analyze image for design tokens |
|
|
266
|
+
| `/pencil moodboard "..."` | Generate moodboard from description |
|
|
267
|
+
|
|
268
|
+
### Browser Automation
|
|
269
|
+
|
|
270
|
+
Pencil.dev uses browser automation to interact with the web tool:
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
Playwright (primary) → BrowserMCP (fallback)
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
- **Playwright**: Full browser control, screenshot capture, element interaction
|
|
277
|
+
- **BrowserMCP**: Alternative browser automation when Playwright is unavailable
|
|
278
|
+
|
|
279
|
+
### Integration with Moodboard
|
|
280
|
+
|
|
281
|
+
- **Path A** (existing refs): `/pencil analyze` to analyze collected images
|
|
282
|
+
- **Path B** (no refs): `/pencil moodboard` to generate references from text
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Stitch MCP Integration (Fallback)
|
|
199
287
|
|
|
200
288
|
> Configuration: `config/ui-ux.jsonc`
|
|
201
289
|
> Command: `/stitch`
|
|
290
|
+
> **Note**: Stitch activates as fallback when Pencil.dev is unavailable
|
|
202
291
|
|
|
203
292
|
### Capabilities
|
|
204
293
|
|
|
@@ -234,12 +323,13 @@ Generates:
|
|
|
234
323
|
### Fallback Chain
|
|
235
324
|
|
|
236
325
|
```
|
|
237
|
-
Stitch → Figma MCP → Claude Vision → Manual Wireframes
|
|
326
|
+
Pencil.dev (Playwright) → Pencil.dev (BrowserMCP) → Stitch → Figma MCP → Claude Vision → Manual Wireframes
|
|
238
327
|
```
|
|
239
328
|
|
|
240
|
-
- **
|
|
241
|
-
- **
|
|
242
|
-
- **
|
|
329
|
+
- **Pencil.dev browser failed**: Fallback to Stitch MCP
|
|
330
|
+
- **Stitch quota exceeded**: Auto-fallback to Figma MCP
|
|
331
|
+
- **API error**: Retry 2x, then next fallback
|
|
332
|
+
- **All tools unavailable**: Claude Vision analysis + manual wireframes
|
|
243
333
|
|
|
244
334
|
### Best Practices
|
|
245
335
|
|
|
@@ -92,6 +92,33 @@
|
|
|
92
92
|
"Component list creation"
|
|
93
93
|
]
|
|
94
94
|
},
|
|
95
|
+
"tools": {
|
|
96
|
+
"moodboard_providers": {
|
|
97
|
+
"description": "UI generation and analysis provider priority for moodboard workflow",
|
|
98
|
+
"priority": ["pencil_dev", "stitch", "figma_mcp", "claude_vision"],
|
|
99
|
+
"pencil_dev": {
|
|
100
|
+
"type": "browser_automated",
|
|
101
|
+
"url": "https://pencil.dev",
|
|
102
|
+
"browser_priority": ["playwright", "browsermcp"],
|
|
103
|
+
"timeout_ms": 30000,
|
|
104
|
+
"retry_count": 2,
|
|
105
|
+
"capabilities": ["text_to_ui", "image_analysis", "moodboard_generation"]
|
|
106
|
+
},
|
|
107
|
+
"stitch": {
|
|
108
|
+
"type": "mcp",
|
|
109
|
+
"auto_invoke_condition": "pencil_dev_failed",
|
|
110
|
+
"capabilities": ["text_to_ui", "image_to_ui", "design_dna", "export"]
|
|
111
|
+
},
|
|
112
|
+
"figma_mcp": {
|
|
113
|
+
"type": "mcp",
|
|
114
|
+
"capabilities": ["design_token_export", "component_inspection"]
|
|
115
|
+
},
|
|
116
|
+
"claude_vision": {
|
|
117
|
+
"type": "native",
|
|
118
|
+
"capabilities": ["color_extraction", "layout_analysis", "component_id"]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
95
122
|
"transition": {
|
|
96
123
|
"next_stage": "05-task-management",
|
|
97
124
|
"prerequisites": [
|