Skip to main content
reopt Handbook
reopt Handbook
Design Systems for the AI Era

Foundation

Token ArchitectureComponent SpecBuilt-in Accessibility

AI Workflow

Prompt InterfaceDESIGN.md InterfaceAgentic Design Quality ControlWorkflow StrategiesAI-Based Design System EvolutionContext Injection

User Experience

Consistency PatternsInteraction DesignForms and Data Input

Next Interfaces

Agent UI ProtocolsGenerative UISpatial and Multimodal Interfaces

Practice

Execution PlaybookMigration StrategyGovernance and CollaborationCase Studies

Operations

Verification ChecklistUpdate Log
Handbook›Design Systems for the AI Era›Agentic Design Quality Control
한국어English

Agentic Design Quality Control

Control generic AI UI tendencies with context, critique loops, and evaluation gates.

Key takeaways

  • Generic AI UI (hero sections, nested cards, weak density) is usually a context and evaluation problem, not just a model limitation.
  • Counter typical biases by stating the product surface type, defining card rules, providing semantic color roles, and requiring responsive checks.
  • Feed a context stack of DESIGN.md, component specs, token docs, example screens, and a review checklist before generation.
  • Run a critique loop with a concrete rubric covering surface fit, component reuse, token discipline, density, accessibility, and visual restraint.
  • Use a Playwright screenshot loop so evaluation inspects pixels at desktop and mobile widths, since code can type-check while the layout still overflows.

When Codex, Claude Code, or similar agents build UI, they often drift toward generic screens: oversized hero sections, decorative cards, gradients, weak hierarchy, and inconsistent spacing. This is not a model problem alone. It is usually a context and evaluation problem.

Typical AI UI Biases

BiasSymptomControl
Marketing defaultEvery app starts with a heroState the product surface type.
Card overloadCards inside cards, decorative panelsDefine card usage rules.
One-note paletteSame hue everywhereProvide semantic color roles.
Weak densityTool UIs become landing pagesProvide dashboard and workflow examples.
Text overflowButtons and cards break on mobileRequire responsive screenshot checks.

Context Stack

  1. DESIGN.md: product feel and visual philosophy.
  2. Component specs: props, states, variants, slots.
  3. Token docs: semantic values and forbidden raw values.
  4. Example screens: approved density, hierarchy, and responsive behavior.
  5. Review checklist: screenshot, accessibility, layout, and text-fit checks.

Critique Loop

Generate -> screenshot -> critique against DESIGN.md -> revise -> run checks -> summarize evidence

The important part is the critique rubric. Do not ask only "make it better." Ask the agent to check surface type, hierarchy, density, token usage, mobile layout, and forbidden visual patterns.

Review Rubric

Use a small, repeatable rubric so agent revisions do not become subjective polishing.

DimensionPass condition
Surface fitThe screen matches the actual product surface type.
Component reuseExisting primitives and composites are used before new UI is created.
Token disciplineColors, spacing, radius, typography, and motion come from approved tokens.
DensityInformation density matches the user workflow and viewport.
AccessibilityLabels, focus, keyboard behavior, and contrast are not deferred.
ResponsivenessLong labels, tables, buttons, and controls fit at target breakpoints.
Visual restraintDecorative elements serve the task instead of filling space.
EvidenceThe agent reports commands, screenshots, and remaining assumptions.

Playwright Screenshot Loop

For meaningful UI changes, the evaluation loop should inspect pixels, not only code.

1. Start the dev server.
2. Open the changed route at desktop width.
3. Capture screenshot and console errors.
4. Repeat at a narrow mobile width.
5. Check text fit, overlapping elements, focus states, and empty/loading/error states.
6. Revise until the screenshots satisfy the rubric.

The screenshot loop is especially important for AI output because the code can type-check while the interface still has overflowing labels, broken density, or a marketing layout where an operational tool was requested.

Agent Instruction Template

Before editing UI:
- Read DESIGN.md and the relevant component specs.
- Identify the product surface type and density target.
- Use existing components and semantic tokens.
- Do not invent variants, decorative wrappers, or raw style values.

After editing UI:
- Run the relevant typecheck or lint command.
- Capture desktop and mobile screenshots.
- Compare the result against the review rubric.
- Report remaining assumptions and missing design-system coverage.

Acceptance Criteria

  • Uses existing components and tokens.
  • Matches the surface type: tool, dashboard, docs, marketing page, or game.
  • Has no text overflow at target breakpoints.
  • Has visible focus and accessible labels.
  • Has screenshot evidence for UI changes.

Related docs

DESIGN.md Interface

A top-level design document for brand mood, visual rules, and layout philosophy.

Consistency Patterns

System design for visual and structural consistency in AI-generated UI.

DESIGN.md Interface

A top-level design document for brand mood, visual rules, and layout philosophy.

Workflow Strategies

Compare design-to-code, code-to-design, and bidirectional AI workflows.

On this page

Typical AI UI BiasesContext StackCritique LoopReview RubricPlaywright Screenshot LoopAgent Instruction TemplateAcceptance Criteria