# Design Engineering Execution Plan ## Context & Problem Statement **Team:** 2 designers, 8 engineers (B2B SaaS web app) **Core Problem:** Shipping slowly because UI polish and edge states get missed, leading to rework cycles. **Goal:** Reduce rework and increase visual/interaction consistency. **Constraints:** Accessibility (WCAG 2.1 AA minimum) is required; need initial measurable impact within 4 weeks. --- ## Root Cause Analysis Before jumping to solutions, the rework and inconsistency issues likely stem from several interrelated causes: 1. **No single source of truth for UI.** Designers produce mockups, engineers interpret them differently, and there is no shared component library enforcing constraints. 2. **Edge states not designed upfront.** Happy-path mockups are handed off without loading, empty, error, partial-data, and permission-denied states being specified. 3. **Accessibility treated as afterthought.** A11y issues are caught in QA or by customers, causing rework. 4. **Review bottleneck.** 2 designers cannot review 8 engineers' output in real time, so polish issues slip through. 5. **No shared language for "done."** Engineers and designers have different definitions of what constitutes a finished UI. --- ## Execution Plan Overview The plan is organized into three workstreams across four weeks, with a phased rollout: | Week | Focus | Key Deliverable | |------|-------|-----------------| | 1 | Foundation & Audit | Component inventory, edge-state checklist, shared definition of done | | 2 | Build Core System | Token system, 10 core components, accessibility baseline | | 3 | Integrate & Adopt | Storybook deployment, PR workflow, first feature shipped with new system | | 4 | Harden & Measure | Full coverage of top flows, metrics dashboard, retrospective | --- ## Week 1: Foundation & Audit ### 1.1 UI Component Inventory (Days 1-2) **Owner:** 1 designer + 1 engineer (pair) Audit the existing application and catalog every distinct UI element: - Buttons (primary, secondary, tertiary, destructive, icon-only) - Form inputs (text, select, multiselect, date picker, file upload) - Feedback elements (toasts, banners, modals, inline errors) - Navigation (sidebar, tabs, breadcrumbs, pagination) - Data display (tables, cards, stat widgets, avatars, badges) - Layout primitives (containers, grids, spacers, dividers) **Output:** A spreadsheet or Notion database with columns: Component Name, Current Variants, Inconsistencies Found, Frequency of Use, Accessibility Issues Noted. Prioritize the top 10 most-used components for Week 2 buildout. ### 1.2 Edge State Checklist (Days 2-3) **Owner:** 1 designer Create a canonical checklist of states every screen/component must address before being considered "designed." At minimum: - **Empty state** - First use, no data yet - **Loading state** - Skeleton or spinner while data fetches - **Error state** - API failure, timeout, 403/404 - **Partial data** - Some fields missing or null - **Overflow** - Long text, many items, large numbers - **Permission-denied** - User lacks access - **Offline / degraded** - Network interruption (if applicable) - **Responsive breakpoints** - Mobile, tablet, desktop - **Keyboard navigation** - Tab order, focus rings, escape-to-close - **Screen reader** - Labels, roles, live regions **Output:** A markdown checklist template that designers attach to every spec and engineers reference in PR self-review. ### 1.3 Definition of Done (Day 3) **Owner:** Whole team (1-hour meeting) Agree on a shared "UI Definition of Done" that a feature must satisfy before it can be merged: 1. All edge states from the checklist are implemented. 2. Component uses the shared design tokens (or documents why not). 3. Passes axe-core automated accessibility scan with zero critical/serious violations. 4. Keyboard navigable (Tab, Enter, Escape, Arrow keys where appropriate). 5. Tested at 200% browser zoom without layout breakage. 6. Designer has approved the implementation (async screenshot review or Storybook link). 7. No hardcoded colors, font sizes, or spacing values outside the token system. ### 1.4 Tooling Setup (Days 3-5) **Owner:** 1 engineer - Initialize a shared component library package (e.g., `@company/ui`), even if it starts nearly empty. - Set up Storybook with: - Accessibility addon (`@storybook/addon-a11y`) running axe-core on every story. - Viewport addon for responsive testing. - Dark mode toggle (if applicable). - Set up a CI step that runs `axe-core` on Storybook stories and fails the build on critical violations. - Configure a Chromatic or Percy account for visual regression testing (even a free tier is fine to start). --- ## Week 2: Build Core System ### 2.1 Design Token System (Days 1-2) **Owner:** 1 designer + 1 engineer Define and implement a token system covering: **Color tokens:** ``` --color-primary-500: #2563EB; --color-primary-600: #1D4ED8; /* hover */ --color-primary-700: #1E40AF; /* active */ --color-neutral-50 through --color-neutral-900 --color-success-500, --color-warning-500, --color-error-500 --color-focus-ring: #2563EB; /* 3:1 contrast minimum against background */ ``` **Spacing scale:** ``` --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px; ``` **Typography scale:** ``` --text-xs: 12px / 16px --text-sm: 14px / 20px --text-base: 16px / 24px --text-lg: 18px / 28px --text-xl: 20px / 28px --text-2xl: 24px / 32px ``` **Other tokens:** border-radius (sm/md/lg/full), shadow (sm/md/lg), transition durations, z-index scale. All colors must meet WCAG 2.1 AA contrast ratios (4.5:1 for normal text, 3:1 for large text and UI components). **Output:** A CSS custom properties file (or Tailwind config extension) plus a Figma style library synced to the same values. ### 2.2 Core Component Library (Days 2-5) **Owner:** 2 engineers (pair programming), 1 designer reviewing Build the top 10 prioritized components from the Week 1 audit. Each component must include: **Accessibility requirements per component type:** | Component | A11y Requirements | |-----------|-------------------| | Button | `role="button"`, visible focus ring, `aria-disabled` not just `disabled`, loading state announced | | TextInput | Associated `