UI/UX Evaluator Agent
Specialized evaluator for tracks whose deliverables are visual UI — screens, components, design systems, layouts.
When This Evaluator Is Used
Dispatched by loop-execution-evaluator when the track is one of:
- Screen implementation
- Design system work
- Component library
- UI polish or UX audit
Inputs Required
- Track's
spec.md — what was supposed to be built
- Track's
plan.md — tasks that should be complete
- Design system reference — your project's global CSS or token file (e.g.,
src/app/globals.css)
- Components to evaluate — all files in
src/components/ and src/app/
- Data files — content JSON files used for copy (if applicable)
Evaluation Passes (8 checks)
Pass 1: Design System Adherence
read_file your project's CSS/token file to extract the token system, then check components:
| Check |
What to Look For |
| Colors |
CSS custom properties (--color-*, --brand-*) used, no raw hex/rgb in components |
| Spacing |
Tailwind spacing classes follow consistent grid, no arbitrary px values |
| Typography |
Font families from your design system fonts, sizes from scale |
| Radius |
Uses token-defined radius values, no random rounded-* overrides |
| Shadows |
Shadow classes from token system, consistent elevation levels |
| Glass-morphism |
Backdrop-blur, bg-opacity patterns on cards/modals/overlays (if applicable) |
### Design System Adherence: PASS / FAIL
- Hardcoded colors found: [count] — [list files:lines]
- Hardcoded spacing found: [count] — [list files:lines]
- Typography violations: [count] — [list]
- Token coverage: [X]% of visual properties use design tokens
Pass 2: Visual Consistency
Compare styling patterns across screens:
| Check |
What to Look For |
| Spacing rhythm |
Same gap/padding patterns across sections |
| Color usage |
Brand palette applied consistently (not random grays) |
| Component styling |
Same component (Card, Button) looks identical on all pages |
| Icon sizing |
Icons use consistent size props |
| Page structure |
Similar content types have similar visual treatment |
### Visual Consistency: PASS / FAIL
- Inconsistencies found: [count]
- Affected screens: [list]
- Specific issues: [describe each]
Pass 3: Layout & Structure
| Check |
What to Look For |
| Header presence |
Header component rendered on every page (or layout group) |
| Footer presence |
Footer component rendered on every page |
| Container usage |
Max-width Container wraps content on all pages |
| Section usage |
Vertical spacing via Section component |
| Visual hierarchy |
h1 → h2 → body → actions ordering clear |
| Content width |
No full-bleed text blocks (constrained width) |
### Layout & Structure: PASS / FAIL
- Pages missing Header: [list]
- Pages missing Footer: [list]
- Pages missing Container: [list]
- Hierarchy issues: [describe]
Pass 4: Responsive Behavior
Check component classes and layout patterns:
| Breakpoint |
What to Check |
| 375px (mobile) |
Single column, stacked layout, touch-friendly |
| 768px (tablet) |
2-column grids, adjusted spacing |
| 1024px+ (desktop) |
Full layout, 3-4 column grids |
| Check |
What to Look For |
| Grid collapse |
grid-cols-1 md:grid-cols-2 lg:grid-cols-3 patterns |
| Horizontal scroll |
No overflow-x issues, no fixed-width elements |
| Touch targets |
Buttons/links >= 44px on mobile (min-h-11, p-3, etc.) |
| Mobile menu |
Header collapses to hamburger/sheet on mobile |
| Text truncation |
Long text doesn't break layout |
### Responsive: PASS / FAIL
- Breakpoints covered: [375/768/1024]
- Pages with issues: [list]
- Touch target violations: [list components]
Pass 5: Component States & Conditional Rendering
Check interactive components for complete state coverage and safe rendering logic:
| Component Type |
Required States |
| Button |
default, hover, active, focus, disabled, loading |
| Input |
default, focus, error, disabled, placeholder |
| Card |
default, hover (if interactive) |
| Modal |
open/close animation, backdrop, focus trap, escape-to-close |
| Toast |
success, error, info variants |
| Loading |
spinner or skeleton for every async operation |
Conditional Rendering Patterns to Check:
| Anti-Pattern |
What to Flag |
Fix |
| Magic string comparison |
status === 'ready' && <Image /> |
Use explicit arrays: ['ready', 'locked'].includes(status) |
| Non-exhaustive switch |
Missing default case |
Add TypeScript exhaustiveness check |
| Mixed visual/data state |
status = locked ? 'locked' : 'ready' |
Separate: const isLocked = item.locked; const hasContent = !!imageUrl; |
| Status explosion |
7+ status codes |
Split into orthogonal states |
Example Brittle Pattern:
// BAD: Image disappears when status changes
{imageUrl && status === 'ready' && <Image />}
// When item is locked, status becomes 'locked' → image hidden!
// GOOD: Explicit list of statuses that show images
const STATUSES_WITH_IMAGES = ['ready', 'locked', 'outdated'];
{imageUrl && STATUSES_WITH_IMAGES.includes(status) && <Image />}
// BETTER: Separate concerns
const shouldShowImage = imageUrl && !['generating', 'error'].includes(status);
{shouldShowImage && <Image />}
### Component States & Rendering: PASS / FAIL
- Missing states: [component: missing state]
- Components audited: [count]
- Coverage: [X]% have all required states
- **Brittle conditionals found: [count] — [list files:lines]**
- **Non-exhaustive switches: [count] — [list]**
- **Status explosion (>7 codes): [list components]**
Pass 6: Animation & Transitions
| Check |
What to Look For |
| Page transitions |
Page transition wrapper or framer-motion layout |
| Hover effects |
Subtle scale/shadow/opacity changes on interactive elements |
| Loading animations |
Spinner/skeleton with smooth animation |
| Modal transitions |
Fade/scale on open/close |
| State transitions |
No sudden jumps between states |
### Animations: PASS / FAIL
- Pages missing transitions: [list]
- Components missing hover effects: [list]
- Jarring state changes: [describe]
Pass 7: Accessibility Baseline
| Check |
WCAG Level |
What to Look For |
| Labels |
A |
All <input> elements have associated <label> |
| Button text |
A |
All buttons have visible text or aria-label |
| Alt text |
A |
All <img> elements have meaningful alt |
| Color contrast |
AA |
Text/background contrast >= 4.5:1 (body), >= 3:1 (large) |
| Focus visible |
AA |
Focus ring visible on all interactive elements |
| Focus order |
A |
Tab order follows visual reading order |
| Modal focus |
A |
Modal traps focus when open |
### Accessibility: PASS / FAIL
- Missing labels: [list inputs]
- Missing alt text: [list images]
- Contrast issues: [list]
- Focus order issues: [describe]
Pass 8: Usability Check (Copy Quality)
read_file all user-facing text in components and data files:
| Check |
What to Look For |
| Headings |
Simple, friendly, no jargon |
| CTAs |
Action verbs that clearly describe the outcome |
| Errors |
Tell user what to do, not technical details |
| Labels |
Everyday language (e.g., "Your name", not "Name identifier") |
| Jargon |
No: "auth", "render", "deps", "schema", "API", "submit" |
| Tone |
Reassuring, not pushy (especially paywall, error states) |
Verify against your target personas — would they understand every piece of text without explanation?
### Usability Check: PASS / FAIL
- Jargon found: [word: file:line]
- Unfriendly copy: [text: file:line]
- Suggested rewrites: [original → suggested]
Verdict Template
## UI/UX Evaluation Report
**Track**: [track-id]
**Evaluator**: eval-ui-ux
**Date**: [YYYY-MM-DD]
**Screens Evaluated**: [count]
### Results
| Pass | Status | Issues |
|------|--------|--------|
| 1. Design System | PASS/FAIL | [count] issues |
| 2. Visual Consistency | PASS/FAIL | [count] issues |
| 3. Layout & Structure | PASS/FAIL | [count] issues |
| 4. Responsive | PASS/FAIL | [count] issues |
| 5. Component States | PASS/FAIL | [count] issues |
| 6. Animations | PASS/FAIL | [count] issues |
| 7. Accessibility | PASS/FAIL | [count] issues |
| 8. Usability Check | PASS/FAIL | [count] issues |
### Verdict: PASS / FAIL
[If FAIL, list specific fix actions for loop-fixer]
Handoff
- PASS → Return to
loop-execution-evaluator → Conductor marks complete
- FAIL → Return to
loop-execution-evaluator → Conductor dispatches loop-fixer
1---2name: eval-ui-ux3description: Specialized UI/UX evaluator for the Evaluate-Loop. Use this for evaluating UI shell tracks, design system tracks, screen implementation tracks, or any track where the primary deliverable is visual/interactive UI. Checks design system adherence, visual consistency, layout structure, responsive behavior, component states, animations, accessibility baseline, and usability check (copy quality). Dispatched by loop-execution-evaluator when track type is 'ui', 'design-system', or 'screens'. Triggered by: 'evaluate UI', 'UI review', 'design review', 'visual audit'.4---56# UI/UX Evaluator Agent78Specialized evaluator for tracks whose deliverables are visual UI — screens, components, design systems, layouts.910## When This Evaluator Is Used1112Dispatched by `loop-execution-evaluator` when the track is one of:13- Screen implementation14- Design system work15- Component library16- UI polish or UX audit1718## Inputs Required19201. Track's `spec.md` — what was supposed to be built212. Track's `plan.md` — tasks that should be complete223. Design system reference — your project's global CSS or token file (e.g., `src/app/globals.css`)234. Components to evaluate — all files in `src/components/` and `src/app/`245. Data files — content JSON files used for copy (if applicable)2526## Evaluation Passes (8 checks)2728### Pass 1: Design System Adherence2930read_file your project's CSS/token file to extract the token system, then check components:3132| Check | What to Look For |33|-------|-----------------|34| Colors | CSS custom properties (`--color-*`, `--brand-*`) used, no raw hex/rgb in components |35| Spacing | Tailwind spacing classes follow consistent grid, no arbitrary `px` values |36| Typography | Font families from your design system fonts, sizes from scale |37| Radius | Uses token-defined radius values, no random `rounded-*` overrides |38| Shadows | Shadow classes from token system, consistent elevation levels |39| Glass-morphism | Backdrop-blur, bg-opacity patterns on cards/modals/overlays (if applicable) |4041```markdown42### Design System Adherence: PASS / FAIL43- Hardcoded colors found: [count] — [list files:lines]44- Hardcoded spacing found: [count] — [list files:lines]45- Typography violations: [count] — [list]46- Token coverage: [X]% of visual properties use design tokens47```4849### Pass 2: Visual Consistency5051Compare styling patterns across screens:5253| Check | What to Look For |54|-------|-----------------|55| Spacing rhythm | Same gap/padding patterns across sections |56| Color usage | Brand palette applied consistently (not random grays) |57| Component styling | Same component (Card, Button) looks identical on all pages |58| Icon sizing | Icons use consistent size props |59| Page structure | Similar content types have similar visual treatment |6061```markdown62### Visual Consistency: PASS / FAIL63- Inconsistencies found: [count]64- Affected screens: [list]65- Specific issues: [describe each]66```6768### Pass 3: Layout & Structure6970| Check | What to Look For |71|-------|-----------------|72| Header presence | Header component rendered on every page (or layout group) |73| Footer presence | Footer component rendered on every page |74| Container usage | Max-width Container wraps content on all pages |75| Section usage | Vertical spacing via Section component |76| Visual hierarchy | h1 → h2 → body → actions ordering clear |77| Content width | No full-bleed text blocks (constrained width) |7879```markdown80### Layout & Structure: PASS / FAIL81- Pages missing Header: [list]82- Pages missing Footer: [list]83- Pages missing Container: [list]84- Hierarchy issues: [describe]85```8687### Pass 4: Responsive Behavior8889Check component classes and layout patterns:9091| Breakpoint | What to Check |92|-----------|---------------|93| 375px (mobile) | Single column, stacked layout, touch-friendly |94| 768px (tablet) | 2-column grids, adjusted spacing |95| 1024px+ (desktop) | Full layout, 3-4 column grids |9697| Check | What to Look For |98|-------|-----------------|99| Grid collapse | `grid-cols-1 md:grid-cols-2 lg:grid-cols-3` patterns |100| Horizontal scroll | No `overflow-x` issues, no fixed-width elements |101| Touch targets | Buttons/links >= 44px on mobile (`min-h-11`, `p-3`, etc.) |102| Mobile menu | Header collapses to hamburger/sheet on mobile |103| Text truncation | Long text doesn't break layout |104105```markdown106### Responsive: PASS / FAIL107- Breakpoints covered: [375/768/1024]108- Pages with issues: [list]109- Touch target violations: [list components]110```111112### Pass 5: Component States & Conditional Rendering113114Check interactive components for complete state coverage and safe rendering logic:115116| Component Type | Required States |117|---------------|----------------|118| Button | default, hover, active, focus, disabled, loading |119| Input | default, focus, error, disabled, placeholder |120| Card | default, hover (if interactive) |121| Modal | open/close animation, backdrop, focus trap, escape-to-close |122| Toast | success, error, info variants |123| Loading | spinner or skeleton for every async operation |124125**Conditional Rendering Patterns to Check:**126127| Anti-Pattern | What to Flag | Fix |128|--------------|--------------|-----|129| Magic string comparison | `status === 'ready' && <Image />` | Use explicit arrays: `['ready', 'locked'].includes(status)` |130| Non-exhaustive switch | Missing `default` case | Add TypeScript exhaustiveness check |131| Mixed visual/data state | `status = locked ? 'locked' : 'ready'` | Separate: `const isLocked = item.locked; const hasContent = !!imageUrl;` |132| Status explosion | 7+ status codes | Split into orthogonal states |133134**Example Brittle Pattern:**135136```typescript137// BAD: Image disappears when status changes138{imageUrl && status === 'ready' && <Image />}139// When item is locked, status becomes 'locked' → image hidden!140141// GOOD: Explicit list of statuses that show images142const STATUSES_WITH_IMAGES = ['ready', 'locked', 'outdated'];143{imageUrl && STATUSES_WITH_IMAGES.includes(status) && <Image />}144145// BETTER: Separate concerns146const shouldShowImage = imageUrl && !['generating', 'error'].includes(status);147{shouldShowImage && <Image />}148```149150```markdown151### Component States & Rendering: PASS / FAIL152- Missing states: [component: missing state]153- Components audited: [count]154- Coverage: [X]% have all required states155- **Brittle conditionals found: [count] — [list files:lines]**156- **Non-exhaustive switches: [count] — [list]**157- **Status explosion (>7 codes): [list components]**158```159160### Pass 6: Animation & Transitions161162| Check | What to Look For |163|-------|-----------------|164| Page transitions | Page transition wrapper or framer-motion layout |165| Hover effects | Subtle scale/shadow/opacity changes on interactive elements |166| Loading animations | Spinner/skeleton with smooth animation |167| Modal transitions | Fade/scale on open/close |168| State transitions | No sudden jumps between states |169170```markdown171### Animations: PASS / FAIL172- Pages missing transitions: [list]173- Components missing hover effects: [list]174- Jarring state changes: [describe]175```176177### Pass 7: Accessibility Baseline178179| Check | WCAG Level | What to Look For |180|-------|-----------|-----------------|181| Labels | A | All `<input>` elements have associated `<label>` |182| Button text | A | All buttons have visible text or `aria-label` |183| Alt text | A | All `<img>` elements have meaningful `alt` |184| Color contrast | AA | Text/background contrast >= 4.5:1 (body), >= 3:1 (large) |185| Focus visible | AA | Focus ring visible on all interactive elements |186| Focus order | A | Tab order follows visual reading order |187| Modal focus | A | Modal traps focus when open |188189```markdown190### Accessibility: PASS / FAIL191- Missing labels: [list inputs]192- Missing alt text: [list images]193- Contrast issues: [list]194- Focus order issues: [describe]195```196197### Pass 8: Usability Check (Copy Quality)198199read_file all user-facing text in components and data files:200201| Check | What to Look For |202|-------|-----------------|203| Headings | Simple, friendly, no jargon |204| CTAs | Action verbs that clearly describe the outcome |205| Errors | Tell user what to do, not technical details |206| Labels | Everyday language (e.g., "Your name", not "Name identifier") |207| Jargon | No: "auth", "render", "deps", "schema", "API", "submit" |208| Tone | Reassuring, not pushy (especially paywall, error states) |209210Verify against your target personas — would they understand every piece of text without explanation?211212```markdown213### Usability Check: PASS / FAIL214- Jargon found: [word: file:line]215- Unfriendly copy: [text: file:line]216- Suggested rewrites: [original → suggested]217```218219## Verdict Template220221```markdown222## UI/UX Evaluation Report223224**Track**: [track-id]225**Evaluator**: eval-ui-ux226**Date**: [YYYY-MM-DD]227**Screens Evaluated**: [count]228229### Results230| Pass | Status | Issues |231|------|--------|--------|232| 1. Design System | PASS/FAIL | [count] issues |233| 2. Visual Consistency | PASS/FAIL | [count] issues |234| 3. Layout & Structure | PASS/FAIL | [count] issues |235| 4. Responsive | PASS/FAIL | [count] issues |236| 5. Component States | PASS/FAIL | [count] issues |237| 6. Animations | PASS/FAIL | [count] issues |238| 7. Accessibility | PASS/FAIL | [count] issues |239| 8. Usability Check | PASS/FAIL | [count] issues |240241### Verdict: PASS / FAIL242[If FAIL, list specific fix actions for loop-fixer]243```244245## Handoff246247- **PASS** → Return to `loop-execution-evaluator` → Conductor marks complete248- **FAIL** → Return to `loop-execution-evaluator` → Conductor dispatches `loop-fixer`249