# Design Iteration Workflow ## Overview A structured 4-stage workflow for creating and iterating on UI designs. This process ensures thoughtful design decisions with user approval at each stage. ## Quick Reference **Stages**: Layout → Theme → Animation → Implementation **Approval**: Required between each stage **Output**: Single HTML file per design iteration **Location**: `design_iterations/` folder --- ## When to Use This Workflow ### Delegate to OpenFrontendSpecialist When: **✅ STRONGLY RECOMMENDED** to delegate for: - **New UI/UX design work** - Landing pages, dashboards, app interfaces - **Design system creation** - Component libraries, theme systems, style guides - **Complex layouts** - Multi-column grids, responsive designs, intricate structures - **Visual polish** - Animations, transitions, micro-interactions - **Brand-focused work** - Marketing pages, product showcases, hero sections - **Accessibility-critical UI** - Forms, navigation, interactive components **Why delegate?** - OpenFrontendSpecialist follows the 4-stage design workflow (Layout → Theme → Animation → Implementation) - Ensures thoughtful design decisions with approval gates - Produces polished, accessible, production-ready UI - Handles responsive design, OKLCH colors, semantic HTML - Creates single-file HTML prototypes for quick iteration ### Execute Directly When: **⚠️ Simple cases only**: - Minor text/content updates to existing UI - Small CSS tweaks (colors, spacing, fonts) - Adding simple utility classes - Updating existing component props - Bug fixes in existing UI code ### Delegation Pattern ```javascript // For UI design work task( subagent_type="OpenFrontendSpecialist", description="Design {feature} UI", prompt="Design a {feature} following the 4-stage workflow: Requirements: - {requirement 1} - {requirement 2} Context: {what this UI is for} Follow the design iteration workflow: 1. Layout (ASCII wireframe) 2. Theme (design system, colors) 3. Animation (micro-interactions) 4. Implementation (single HTML file) Request approval between each stage." ) ``` ### Example Scenarios | Scenario | Action | Why | |----------|--------|-----| | "Create a landing page for our SaaS product" | ✅ Delegate to OpenFrontendSpecialist | Complex UI design, needs 4-stage workflow | | "Design a user dashboard with charts" | ✅ Delegate to OpenFrontendSpecialist | Complex layout, visual design, interactions | | "Build a component library with our brand" | ✅ Delegate to OpenFrontendSpecialist | Design system work, requires theme expertise | | "Fix button color from blue to green" | ⚠️ Execute directly | Simple CSS change | | "Update hero text content" | ⚠️ Execute directly | Content update only | --- ## Design Plan File (MANDATORY) **CRITICAL**: Before starting any design work, create a persistent design plan file. **Location**: `.tmp/design-plans/{project-name}-{feature-name}.md` **Purpose**: - Preserve design decisions across stages - Allow user to review and edit the plan - Maintain context for subagent calls - Track design evolution and iterations **When to Create**: - BEFORE Stage 1 (Layout Design) - After understanding user requirements - Before any design work begins **Template**: ```markdown --- project: {project-name} feature: {feature-name} created: {ISO timestamp} updated: {ISO timestamp} status: in_progress current_stage: layout --- # Design Plan: {Feature Name} ## User Requirements {What the user asked for - verbatim or close paraphrase} ## Design Goals - {goal 1} - {goal 2} - {goal 3} ## Target Audience {Who will use this UI} ## Technical Constraints - Framework: {Next.js, React, etc.} - Responsive: {Yes/No} - Accessibility: {WCAG level} - Browser support: {Modern, IE11+, etc.} --- ## Stage 1: Layout Design ### Status - [ ] Layout planned - [ ] ASCII wireframe created - [ ] User approved ### Layout Structure {ASCII wireframe will be added here} ### Component Breakdown {Component list will be added here} ### User Feedback {User comments and requested changes} --- ## Stage 2: Theme Design ### Status - [ ] Design system selected - [ ] Color palette chosen - [ ] Typography defined - [ ] User approved ### Theme Details {Theme specifications will be added here} ### User Feedback {User comments and requested changes} --- ## Stage 3: Animation Design ### Status - [ ] Micro-interactions defined - [ ] Animation timing set - [ ] User approved ### Animation Details {Animation specifications will be added here} ### User Feedback {User comments and requested changes} --- ## Stage 4: Implementation ### Status - [ ] HTML structure complete - [ ] CSS applied - [ ] Animations implemented - [ ] User approved ### Output Files - HTML: {file path} - CSS: {file path} - Assets: {file paths} ### User Feedback {Final comments and requested changes} --- ## Design Evolution ### Iteration 1 - Date: {timestamp} - Changes: {what changed} - Reason: {why it changed} ### Iteration 2 - Date: {timestamp} - Changes: {what changed} - Reason: {why it changed} ``` **Workflow Integration**: 1. **Create plan file** → Write to `.tmp/design-plans/{name}.md` 2. **Each stage** → Update plan file with decisions and user feedback 3. **User approval** → Edit plan file with approved decisions 4. **User requests changes** → Edit plan file with feedback, iterate 5. **Subagent calls** → Pass plan file path for context preservation 6. **Completion** → Plan file contains full design history **Benefits**: - ✅ Context preserved across subagent calls - ✅ User can review and edit plan directly - ✅ Design decisions documented - ✅ Easy to iterate and refine - ✅ Full design history tracked --- ## Workflow Stages ### Stage 0: Create Design Plan (MANDATORY FIRST STEP) **Purpose**: Create persistent plan file before any design work **Process**: 1. Understand user requirements 2. Identify design goals and constraints 3. Create plan file at `.tmp/design-plans/{project-name}-{feature-name}.md` 4. Populate with user requirements and goals 5. Present plan file location to user 6. Proceed to Stage 1 **Deliverable**: Design plan file created and initialized **Example**: ``` ✅ Design plan created: .tmp/design-plans/saas-landing-page.md You can review and edit this file at any time. All design decisions will be tracked here. Ready to proceed to Stage 1 (Layout Design)? ``` **Approval Gate**: "Plan file created. Ready to start layout design?" --- ### Stage 1: Layout Design **Purpose**: Define the structure and component hierarchy before visual design **Process**: 1. Read design plan file from `.tmp/design-plans/{name}.md` 2. Analyze user requirements from plan 3. Identify core UI components 4. Plan layout structure and responsive behavior 5. Create ASCII wireframe 6. **Update plan file** with layout structure and component breakdown 7. Present to user for approval 8. **Update plan file** with user feedback and approval status **Deliverable**: - ASCII wireframe with component breakdown - Updated plan file with Stage 1 complete **Example Output**: ``` ## Core UI Components **Header Area** - Logo/brand (Top left) - Navigation menu (Top center) - User actions (Top right) **Main Content Area** - Hero section (Full width) - Feature cards (3-column grid on desktop, stack on mobile) - Call-to-action (Centered) **Footer** - Links (4-column grid) - Social icons (Centered) - Copyright (Bottom) ## Layout Structure Desktop (1024px+): ┌─────────────────────────────────────────────────┐ │ [Logo] Navigation [User Menu] │ ├─────────────────────────────────────────────────┤ │ │ │ HERO SECTION │ │ (Full width, centered text) │ │ │ ├─────────────────────────────────────────────────┤ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ │ Card 1 │ │ Card 2 │ │ Card 3 │ │ │ │ │ │ │ │ │ │ │ └─────────┘ └─────────┘ └─────────┘ │ ├─────────────────────────────────────────────────┤ │ [Call to Action] │ ├─────────────────────────────────────────────────┤ │ Links Links Links Social │ │ Copyright │ └─────────────────────────────────────────────────┘ Mobile (< 768px): ┌─────────────────┐ │ ☰ Logo [👤] │ ├─────────────────┤ │ │ │ HERO SECTION │ │ │ ├─────────────────┤ │ ┌───────────┐ │ │ │ Card 1 │ │ │ └───────────┘ │ │ ┌───────────┐ │ │ │ Card 2 │ │ │ └───────────┘ │ │ ┌───────────┐ │ │ │ Card 3 │ │ │ └───────────┘ │ ├─────────────────┤ │ [CTA] │ ├─────────────────┤ │ Links │ │ Social │ │ Copyright │ └─────────────────┘ ``` **Approval Gate**: "Would you like to proceed with this layout or need modifications?" --- ### Stage 2: Theme Design **Purpose**: Define colors, typography, spacing, and visual style **Process**: 1. Read design plan file from `.tmp/design-plans/{name}.md` 2. Review approved layout from Stage 1 3. Choose design system (neo-brutalism, modern dark, custom) 4. Select color palette (avoid Bootstrap blue unless requested) 5. Choose typography (Google Fonts) 6. Define spacing and shadows 7. Generate theme CSS file 8. **Update plan file** with theme specifications 9. Present theme to user for approval 10. **Update plan file** with user feedback and approval status **Deliverable**: - CSS theme file saved to `design_iterations/theme_N.css` - Updated plan file with Stage 2 complete **Theme Selection Criteria**: | Style | Use When | Avoid When | |-------|----------|------------| | Neo-Brutalism | Creative/artistic projects, retro aesthetic | Enterprise apps, accessibility-critical | | Modern Dark | SaaS, developer tools, professional dashboards | Playful consumer apps | | Custom | Specific brand requirements | Time-constrained projects | **Example Output**: ``` ## Theme Design: Modern Professional **Style Reference**: Vercel/Linear aesthetic **Color Palette**: Monochromatic with accent **Typography**: Inter (UI) + JetBrains Mono (code) **Spacing**: 4px base unit **Shadows**: Subtle, soft elevation **Theme File**: design_iterations/theme_1.css Key Design Decisions: - Primary: Neutral gray for professional feel - Accent: Subtle blue for interactive elements - Radius: 0.625rem for modern, friendly feel - Shadows: Soft, minimal elevation - Fonts: System-like for familiarity ``` **File Naming**: `theme_1.css`, `theme_2.css`, etc. **Approval Gate**: "Does this theme match your vision, or would you like adjustments?" --- ### Stage 3: Animation Design **Purpose**: Define micro-interactions and transitions **Process**: 1. Read design plan file from `.tmp/design-plans/{name}.md` 2. Review approved theme from Stage 2 3. Identify key interactions (hover, click, scroll) 4. Define animation timing and easing 5. Plan loading states and transitions 6. Document animations using micro-syntax 7. **Update plan file** with animation specifications 8. Present animation plan to user for approval 9. **Update plan file** with user feedback and approval status **Deliverable**: - Animation specification in micro-syntax format - Updated plan file with Stage 3 complete **Example Output**: ``` ## Animation Design: Smooth & Professional ### Button Interactions hover: 200ms ease-out [Y0→-2, shadow↗] press: 100ms ease-in [S1→0.95] ripple: 400ms ease-out [S0→2, α1→0] ### Card Interactions cardHover: 300ms ease-out [Y0→-4, shadow↗] cardClick: 200ms ease-out [S1→1.02] ### Page Transitions pageEnter: 300ms ease-out [α0→1, Y+20→0] pageExit: 200ms ease-in [α1→0] ### Loading States spinner: 1000ms ∞ linear [R360°] skeleton: 2000ms ∞ [bg: muted↔accent] ### Micro-Interactions inputFocus: 200ms ease-out [S1→1.01, ring] linkHover: 250ms ease-out [underline 0→100%] **Philosophy**: Subtle, purposeful animations that enhance UX without distraction **Performance**: All animations use transform/opacity for 60fps **Accessibility**: Respects prefers-reduced-motion ``` **Approval Gate**: "Are these animations appropriate for your design, or should we adjust?" --- ### Stage 4: Implementation **Purpose**: Generate complete HTML file with all components **Process**: 1. Read design plan file from `.tmp/design-plans/{name}.md` 2. Review all approved decisions from Stages 1-3 3. Build individual UI components 4. Integrate theme CSS 5. Add animations and interactions 6. Combine into single HTML file 7. Test responsive behavior 8. Save to design_iterations folder 9. **Update plan file** with output file paths 10. Present to user for review 11. **Update plan file** with user feedback and final approval status **Deliverable**: - Complete HTML file with embedded or linked CSS - Updated plan file with Stage 4 complete and all output files documented **File Organization**: ``` design_iterations/ ├── theme_1.css # Theme file from Stage 2 ├── dashboard_1.html # Initial design ├── dashboard_1_1.html # First iteration ├── dashboard_1_2.html # Second iteration ├── chat_ui_1.html # Different design └── chat_ui_1_1.html # Iteration of chat UI ``` **Naming Conventions**: | Type | Format | Example | |------|--------|---------| | Initial design | `{name}_1.html` | `table_1.html` | | First iteration | `{name}_1_1.html` | `table_1_1.html` | | Second iteration | `{name}_1_2.html` | `table_1_2.html` | | New design | `{name}_2.html` | `table_2.html` | **Implementation Checklist**: ```html