mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
docs(ui-design): eliminate output-then-save ambiguity in workflow documentation
Clarified file writing patterns across UI design workflows to prevent confusion between "generate content as output then save" vs "direct write to file" approaches. Changes: - extract.md: Merged Phase 2 & 3 to unify style synthesis and file write operations * Updated phase title to emphasize direct file writing * Added explicit note about internal processing without context output * Consolidated parse-and-write step into single atomic operation - imitate-auto.md: Added clarifying comments for orchestrator file transformation * Documented that Phase 2 uses orchestrator-level read-process-write pattern * Explained this as performance optimization to bypass consolidate phase The entire UI design workflow now consistently follows clear file operation patterns with no ambiguous intermediate output steps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -170,7 +170,7 @@ Write({file_path: "{base_path}/style-extraction/design-space-analysis.json",
|
||||
REPORT: "💾 Saved design space analysis to design-space-analysis.json"
|
||||
```
|
||||
|
||||
### Phase 2: Variant-Specific Style Synthesis (Claude Native Analysis)
|
||||
### Phase 2: Variant-Specific Style Synthesis & Direct File Write
|
||||
|
||||
**Analysis Prompt Template**:
|
||||
```
|
||||
@@ -239,14 +239,17 @@ all colors in OKLCH format; complete token structures; semantic naming;
|
||||
WCAG AA accessibility (4.5:1 text, 3:1 UI)
|
||||
```
|
||||
|
||||
### Phase 3: Parse & Write Output
|
||||
|
||||
**Execution & File Write**:
|
||||
```bash
|
||||
style_cards_data = parse_json(claude_response)
|
||||
Write({file_path: "{base_path}/style-extraction/style-cards.json", content: style_cards_data})
|
||||
# Execute Claude Native Analysis (internal processing, no context output)
|
||||
style_cards_json = Claude_Native_Analysis(synthesis_prompt)
|
||||
|
||||
# Write directly to file
|
||||
Write({file_path: "{base_path}/style-extraction/style-cards.json", content: style_cards_json})
|
||||
REPORT: "💾 Saved {variants_count} style variants to style-cards.json"
|
||||
```
|
||||
|
||||
### Phase 4: Completion
|
||||
### Phase 3: Completion
|
||||
|
||||
```javascript
|
||||
TodoWrite({todos: [
|
||||
@@ -254,7 +257,7 @@ TodoWrite({todos: [
|
||||
{content: extraction_mode == "explore" ? "Analyze design space for maximum contrast" : "Skip design space analysis (imitate mode)", status: "completed", activeForm: extraction_mode == "explore" ? "Analyzing design space" : "Skipping analysis"},
|
||||
{content: extraction_mode == "explore" ? `Generate ${variants_count} divergent design directions` : "Prepare for high-fidelity extraction", status: "completed", activeForm: extraction_mode == "explore" ? "Generating directions" : "Preparing extraction"},
|
||||
{content: extraction_mode == "explore" ? "Save design space analysis for consolidation" : "Skip design space output", status: "completed", activeForm: extraction_mode == "explore" ? "Saving design space analysis" : "Skipping output"},
|
||||
{content: `Generate ${variants_count} ${extraction_mode == "explore" ? "contrasting" : "high-fidelity"} style variant${variants_count > 1 ? "s" : ""}`, status: "completed", activeForm: "Generating variants"}
|
||||
{content: `Generate and write ${variants_count} ${extraction_mode == "explore" ? "contrasting" : "high-fidelity"} style variant${variants_count > 1 ? "s" : ""} to file`, status: "completed", activeForm: "Generating and writing variants"}
|
||||
]});
|
||||
```
|
||||
|
||||
|
||||
@@ -267,6 +267,8 @@ SlashCommand(command) # → Phase 2
|
||||
```bash
|
||||
REPORT: "🚀 Phase 2: Fast token adaptation (bypassing consolidate)"
|
||||
|
||||
# Note: Orchestrator directly reads and transforms files here (not delegating to agent)
|
||||
# This is a performance optimization to bypass the full consolidate phase
|
||||
style_cards = Read({base_path}/style-extraction/style-cards.json)
|
||||
style_card = style_cards.style_cards[0]
|
||||
|
||||
@@ -274,7 +276,7 @@ design_tokens = style_card.proposed_tokens
|
||||
philosophy = style_card.design_philosophy
|
||||
style_name = style_card.name
|
||||
|
||||
# Write design-tokens.json directly
|
||||
# Write design-tokens.json directly (orchestrator-level file transformation)
|
||||
Write({base_path}/style-consolidation/style-1/design-tokens.json, JSON.stringify(design_tokens, null, 2))
|
||||
|
||||
# Create minimal style-guide.md
|
||||
|
||||
Reference in New Issue
Block a user