Skip to content

Commit 201bad8

Browse files
author
catlog22
committed
feat: add UI design exploration phase with prototype generation and review process
1 parent cbeb211 commit 201bad8

4 files changed

Lines changed: 385 additions & 4 deletions

File tree

.claude/commands/workflow/brainstorm-with-file.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ When `--yes` or `-y`: Auto-confirm decisions, use recommended roles, balanced ex
4040
| 3 | Updated `brainstorm.md` | Round 3-6 refinement cycles |
4141
| 4 | `synthesis.json` | Final synthesis with top ideas, recommendations |
4242
| 4 | Final `brainstorm.md` | Complete thought evolution with conclusions |
43+
| 4.5 | `brainstorm-dashboard.html` | Interactive visualization of synthesis results |
4344

4445
## Output Structure
4546

@@ -49,6 +50,7 @@ When `--yes` or `-y`: Auto-confirm decisions, use recommended roles, balanced ex
4950
├── exploration-codebase.json # Phase 2: Codebase context
5051
├── perspectives.json # Phase 2: Multi-CLI findings
5152
├── synthesis.json # Phase 4: Final synthesis
53+
├── brainstorm-dashboard.html # Phase 4.5: Interactive visualization
5254
└── ideas/ # Phase 3: Individual idea deep-dives
5355
├── idea-1.md
5456
├── idea-2.md
@@ -434,6 +436,64 @@ CONSTRAINTS: Don't force incompatible ideas together
434436

435437
2. **Final brainstorm.md Update**: Executive summary, top ideas ranked, primary recommendation with rationale, alternative approaches, parked ideas, key insights, session statistics (rounds, ideas generated/survived, duration), and finalize the `## Artifact Index` with relative links to all produced files (exploration-codebase.json, perspectives.json, synthesis.json, each ideas/*.md)
436438

439+
#### Phase 4.5: Brainstorm Dashboard Visualization
440+
441+
**Trigger**: `synthesis.json` exists, `top_ideas.length >= 2`, not `--yes` mode.
442+
443+
Generate a self-contained `brainstorm-dashboard.html` in the session folder:
444+
445+
```javascript
446+
const synthesis = JSON.parse(Read(`${sessionFolder}/synthesis.json`))
447+
448+
if (synthesis.top_ideas?.length >= 2 && !autoYes) {
449+
// Generate brainstorm-dashboard.html with:
450+
// 1. Idea Cards Grid — each idea as a card with:
451+
// - Title, description, source_perspective badge
452+
// - Score / Novelty / Feasibility rating bars
453+
// - Strengths list, challenges list
454+
// 2. Perspective Comparison — 3-column layout:
455+
// - Creative (Gemini) | Pragmatic (Claude) | Systematic (Agent)
456+
// - Ideas grouped by source perspective
457+
// 3. Evolution Timeline — round-by-round progression:
458+
// - Each round as a timeline node
459+
// - Ideas introduced, merged, parked per round
460+
// 4. Key Insights — callout cards with icons
461+
// 5. Recommendations — primary highlighted, alternatives listed
462+
463+
// Design tokens (self-contained, dark theme):
464+
const tokens = {
465+
'--bg-primary': '#0d1117',
466+
'--bg-card': '#161b22',
467+
'--border': '#30363d',
468+
'--text-primary': '#c9d1d9',
469+
'--text-secondary': '#7d8590',
470+
'--color-green': '#3fb950',
471+
'--color-blue': '#58a6ff',
472+
'--color-purple': '#d2a8ff',
473+
'--color-yellow': '#d29922',
474+
'--color-red': '#f85149',
475+
'--font-sans': 'system-ui, -apple-system, sans-serif',
476+
'--font-mono': 'ui-monospace, monospace'
477+
}
478+
479+
Write(`${sessionFolder}/brainstorm-dashboard.html`, generateDashboardHTML(synthesis, tokens))
480+
481+
// Inform user
482+
Tell user: "Brainstorm dashboard generated. Open in browser to review:"
483+
Tell user: `${sessionFolder}/brainstorm-dashboard.html`
484+
}
485+
```
486+
487+
**HTML Requirements**:
488+
- Fully self-contained (inline CSS/JS, no external dependencies)
489+
- Dark theme with CSS custom properties
490+
- Responsive grid layout (adapts to viewport)
491+
- Score bars rendered as inline CSS width percentages
492+
- Perspective badges color-coded (Creative=purple, Pragmatic=blue, Systematic=green)
493+
- Collapsible sections for details
494+
495+
**Skip**: If only 1 top idea or `--yes` mode, skip dashboard generation.
496+
437497
3. **MANDATORY GATE: Next Step Selection** — workflow MUST NOT end without executing this step.
438498
439499
**TodoWrite**: Update `phase-4``"completed"`, `next-step``"in_progress"`

.claude/skills/brainstorm/SKILL.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ Seven-phase interactive workflow: Context collection → Topic analysis → Role
9595
#### Phase 3: Parallel Role Analysis
9696
Ref: phases/03-role-analysis.md
9797

98-
Execute role analysis for EACH selected role in parallel.
98+
Execute role analysis for EACH selected role in parallel (excluding ui-designer, which runs sequentially in Phase 3.5).
9999

100100
**Input**: selected_roles[] from Phase 2, session_id, guidance-specification.md
101101
**Output**: {role}/analysis*.md for each role
102102

103-
**Parallel Execution**: Launch N role-analysis calls simultaneously (one message with multiple Skill invokes). Each role with `--skip-questions` flag.
103+
**Parallel Execution**: Launch N role-analysis calls simultaneously (one message with multiple Skill invokes). Each role with `--skip-questions` flag. **Note**: ui-designer is excluded from this parallel batch — it runs in Phase 3.5 with access to all text-role analyses.
104104

105105
For ui-designer: append `--style-skill {package}` if provided.
106106

@@ -116,6 +116,20 @@ For ui-designer: append `--style-skill {package}` if provided.
116116

117117
**TodoWrite**: Attach N parallel sub-tasks, execute concurrently, collapse on completion.
118118

119+
#### Phase 3.5: UI Design Exploration
120+
Ref: phases/03a-ui-design-exploration.md
121+
122+
Sequential phase after text-role analyses complete. Generates tangible UI artifacts (HTML prototypes, ASCII mockups, or API sketches) based on project type detection.
123+
124+
**Input**: all role analyses from Phase 3 (read-only), guidance-specification.md, style_skill (optional)
125+
**Output**: `html-prototypes/` or `ascii-mockups/` or `api-sketches/` directory with feature-index.json
126+
127+
**Skip Conditions**: project type is library/service, no ui-designer in selected_roles, `--yes` mode without `--ui-explore`
128+
129+
**Optional Review**: If 2+ prototypes and not `--yes`, load `Ref: ~/.ccw/workflows/brainstorm-visualize.md` for multi-round interactive review with intelligent grouping.
130+
131+
**TodoWrite**: Attach single task with sub-tasks (Detection → Generate → Validate → Review → Feedback), collapse on completion.
132+
119133
#### Phase 4: Synthesis Integration
120134
Ref: phases/04-synthesis.md
121135

@@ -149,6 +163,7 @@ Execute role analysis for ONE specified role with optional interactive context g
149163
| 1 | [phases/01-mode-routing.md](phases/01-mode-routing.md) | Parameter parsing, mode detection, interactive routing | Both modes |
150164
| 2 | [phases/02-artifacts.md](phases/02-artifacts.md) | Interactive framework generation (7 phases) | Auto mode only |
151165
| 3 | [phases/03-role-analysis.md](phases/03-role-analysis.md) | Role-specific analysis generation | Both modes |
166+
| 3.5 | [phases/03a-ui-design-exploration.md](phases/03a-ui-design-exploration.md) | UI prototype generation and review | Auto mode only |
152167
| 4 | [phases/04-synthesis.md](phases/04-synthesis.md) | Cross-role synthesis and feature specs | Auto mode only |
153168

154169
## Core Rules
@@ -243,6 +258,11 @@ Phase 3:
243258
style_skill (for ui-designer)
244259
Output: {role}/analysis*.md (N files, immutable after this point)
245260
261+
Phase 3.5:
262+
Input: all analysis*.md (read-only), guidance-specification.md, style_skill
263+
Output: html-prototypes/ OR ascii-mockups/ OR api-sketches/
264+
feature-index.json, review_decisions (optional)
265+
246266
Phase 4:
247267
Input: session_id, all analysis files (read-only)
248268
Output: feature-specs/F-{id}-{slug}.md
@@ -261,9 +281,13 @@ Initial → Phase 1 Mode Routing (completed)
261281
→ Execute sequentially
262282
→ Sub-tasks COLLAPSED
263283
→ Phase 3 Parallel Role Analysis (in_progress)
264-
→ N role sub-tasks ATTACHED simultaneously
284+
→ N role sub-tasks ATTACHED simultaneously (excluding ui-designer)
265285
→ Execute concurrently
266286
→ Sub-tasks COLLAPSED
287+
→ Phase 3.5 UI Design Exploration (in_progress)
288+
→ Sub-tasks: Detection → Generate → Validate → Review → Feedback
289+
→ Execute sequentially
290+
→ Sub-tasks COLLAPSED
267291
→ Phase 4 Synthesis (in_progress)
268292
→ 8 sub-tasks ATTACHED
269293
→ Execute sequentially
@@ -289,6 +313,7 @@ Initial → Phase 1 Mode Routing (completed)
289313
{"content": "Phase 1: Mode detection and parameter parsing", "status": "in_progress", "activeForm": "Detecting mode"},
290314
{"content": "Phase 2: Interactive Framework Generation", "status": "pending", "activeForm": "Generating framework"},
291315
{"content": "Phase 3: Parallel Role Analysis", "status": "pending", "activeForm": "Executing parallel analysis"},
316+
{"content": "Phase 3.5: UI Design Exploration", "status": "pending", "activeForm": "Generating UI prototypes"},
292317
{"content": "Phase 4: Synthesis Integration", "status": "pending", "activeForm": "Executing synthesis"}
293318
]
294319
```
@@ -353,6 +378,14 @@ Initial → Phase 1 Mode Routing (completed)
353378
│ └── system-architect-template.md # System architect analysis template
354379
├── agents/
355380
│ └── role-analysis-reviewer-agent.md # Role analysis validation agent
381+
├── html-prototypes/ # Phase 3.5 (web/mobile/desktop-gui)
382+
│ ├── README.md # Prototype summary
383+
│ ├── feature-index.json # File-to-feature mapping
384+
│ └── {feature-slug}.html # Self-contained prototypes
385+
├── ascii-mockups/ # Phase 3.5 (cli projects)
386+
│ └── {feature-slug}.md
387+
├── api-sketches/ # Phase 3.5 (library/service projects)
388+
│ └── {feature-slug}.md
356389
├── {role}/ # Role analyses (IMMUTABLE after Phase 3)
357390
│ ├── {role}-context.md # Interactive Q&A responses
358391
│ ├── analysis.md # Main/index document

.claude/skills/brainstorm/phases/03-role-analysis.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ When called from auto mode, launch N role-analysis calls simultaneously:
3333

3434
```javascript
3535
// Single message with multiple Skill invokes for parallelism
36-
// For each selected role:
36+
// For each selected role EXCLUDING ui-designer:
37+
// ui-designer handled in Phase 3.5 (sequential, after text roles)
3738
Skill(skill="brainstorm", args="{role-name} --session {session-id} --skip-questions")
3839

3940
// For ui-designer with style-skill:

0 commit comments

Comments
 (0)