", ...], - "accessibility_features": ["skip-link", "landmarks", ...], - "research_references": ["source URLs/insights"] - } - - ## 注意 - - Layout #{layout_id} must be STRUCTURALLY DIFFERENT from other IDs - - Structure section must match target_type (page vs component) - - Write file directly, no text output -` -``` - -### Step 2: Verify Layout Plans -```bash -# Verify files created -bash(ls {base_path}/prototypes/_templates/*.json | wc -l) # Should equal L×T - -# Validate JSON structure -Read({base_path}/prototypes/_templates/{target}-layout-{layout_id}.json) -``` - -**Output**: `L × T` layout plan JSON files - -## Phase 3: Token Conversion - -### Step 1: Convert JSON to CSS Variables -```bash -# Check jq dependency -bash(command -v jq >/dev/null 2>&1 || echo "ERROR: jq not found") - -# Convert each style's design-tokens.json to tokens.css -bash(cat {base_path}/style-consolidation/style-1/design-tokens.json | ~/.claude/scripts/convert_tokens_to_css.sh > tokens.css) -``` - -### Step 2: Extract Variable Names -```bash -# Read generated tokens.css -Read({base_path}/style-consolidation/style-1/tokens.css) - -# Extract CSS variable names (pattern: --variable-name:) -# Categorize: colors, typography, spacing, radius, shadows -``` - -**Output**: `S × tokens.css` files + extracted variable list - -## Phase 4: Template Generation (Agent) - -**Executor**: `Task(ui-design-agent)` × `L × T` tasks in parallel +**Executor**: `Task(ui-design-agent)` × `T × S` tasks in parallel ### Step 1: Launch Agent Tasks -For each `layout_id × target`: +```bash +bash(mkdir -p {base_path}/prototypes) +``` + +For each `target × style_id`: ```javascript Task(ui-design-agent): ` - [UI_LAYOUT_TEMPLATE_GENERATION] - 🚨 ONE target only: '{target}' (standalone, reusable) + [TARGET_STYLE_UI_GENERATION] + 🎯 ONE component: {target} × Style-{style_id} ({philosophy_name}) + Generate: {layout_variants} × 2 files (HTML + CSS per layout) - LAYOUT: {layout_id} | TARGET: {target} | TYPE: {target_type} + TARGET: {target} | TYPE: {target_type} | STYLE: {style_id}/{style_variants} BASE_PATH: {base_path} - ${--session ? "REQUIREMENTS: .workflow/WFS-{session}/.brainstorming/synthesis-specification.md" : ""} + DEVICE: {device_type} + ${design_attributes ? "DESIGN_ATTRIBUTES: " + JSON.stringify(design_attributes) : ""} - ## 参考 - - Layout plan: Read("{base_path}/prototypes/_templates/{target}-layout-{layout_id}.json") - - Design tokens: Read("{base_path}/style-consolidation/style-1/tokens.css") - Extract variables: --color-*, --font-*, --spacing-*, --border-radius-*, --shadow-* + ## Reference + - Layout inspiration: Read("{base_path}/prototypes/_inspirations/{target}-layout-ideas.txt") + - Design tokens: Read("{base_path}/style-consolidation/style-{style_id}/design-tokens.json") + Parse ALL token values (colors, typography, spacing, borders, shadows, breakpoints) + ${design_attributes ? "- Adapt DOM structure to: density, visual_weight, formality, organic_vs_geometric" : ""} - ## 生成 - 1. HTML: {base_path}/prototypes/_templates/{target}-layout-{layout_id}.html - - Complete HTML5 doc with and - - Body: Full structure (page) OR isolated element (component) - - Semantic:
,