Fannie Mae · Design systems

AI-Assisted Design Systems at Fannie Mae

Using Cursor, Claude Code, and Codex to bridge design intent, component architecture, governance, and implementation.

Role
Lead UX Designer
Focus
Design Systems • AI-Assisted Development • Enterprise UX
Tools
Figma • Cursor • Claude Code • Codex
Context
Fannie Mae

Examples shown in this case study are sanitized or reconstructed to protect proprietary Fannie Mae systems and implementation details.

I owned the design system and decided what was built. Engineering and the Director approved it. Engineering implemented it in production. Every component and screen shown is a reconstruction.

I owned the design system at Fannie Mae. I decided what belonged in it, designed and documented each component, published it with release notes, and handed it to developers, with engineering and the Director approving what shipped. I then used Cursor, Claude Code, and Codex to test a harder question: can AI coding agents keep production code faithful to design intent without weakening governance? They helped most when the design rules were explicit and a human stayed the reviewer. This case study shows the workflow, the components I built with it, and the places the agents got it wrong.

Owned
the design system, from decision to developer handoff
Explored
AI coding agents inside a governed design-system workflow
Tools
Figma, Cursor, Claude Code, Codex
Results
Qualitative outcomes below

01 · The problem

Design systems rarely break all at once. They drift.

As enterprise products grow, the same design decision can exist in several places: Figma, design specifications, design tokens, component code, application interfaces. Small inconsistencies accumulate:

  • A spacing value gets hardcoded.
  • A button gets recreated instead of reused.
  • A component state exists in Figma but not in implementation.
  • Accessibility behavior varies between implementations.
  • A new variant is introduced without becoming part of the governed system.

Can AI coding agents help a designer maintain consistency between design intent and production code while preserving design-system governance?

Drift between design intent and implementation
Text description

Two columns separated by a line labeled potential drift. Design intent: Figma, Foundations, Components, States, Interaction rules. Implementation: Tokens, Component code, Applications, Production. Examples across the line: spacing 16px in design becomes 17px in code; radius 4px becomes 5px; a focus state exists in design but not in code.

Representative example based on the design-system workflow.

02 · The goal

I used three AI coding tools to build, improve, and operationalize design-system components.

CursorClaude CodeCodex

This was not a comparison of tools. The objective was to understand how AI coding agents could participate in a governed design-system workflow.

  • translate design intent into reusable implementation
  • improve component consistency
  • identify design-system violations
  • create and extend reusable components
  • account for interaction states
  • improve accessibility
  • reduce unnecessary one-off implementations
  • assist with design-system maintenance
  • validate implementation against system rules
  • move approved components toward deployment

03 · What I owned · The system lifecycle

I owned the system from the first decision to the developer handoff.

  1. 01

    Decide

    Decided what belonged in the system and what did not.

    Produced · Approved by engineering and the Director.

  2. 02

    Design

    Designed components, variants, and states in Figma, using tokens.

    Produced · Figma components and variants.

  3. 03

    Document

    Wrote usage guidance, do/don't examples, accessibility notes, and state specifications, so developers did not need to ask me.

    Produced · Documentation pages.

  4. 04

    Publish

    Published components to the shared library.

    Produced · A shared component library.

  5. 05

    Release notes

    Wrote what changed, why, and what to do about it for each release.

    Produced · Release notes per release.

  6. 06

    Hand off

    Handed specifications, tokens, and behavior to developers, reviewed the build, and ran design QA before release.

    Produced · Reviewed, QA'd components.

AI coding tools entered this lifecycle at specific points. Section 05 shows where.

04 · From Figma system to explicit rules

Starting with the existing system.

The process started in Figma. I analyzed existing Fannie Mae design-system patterns and product interfaces rather than asking AI to invent a new visual language. The available material was Figma files, existing interface patterns, existing component usage, and screens and interaction states.

Production code, internal documentation, Storybook implementation, and proprietary token architecture are intentionally not reproduced in this public case study.

  1. Fannie Mae Figma system
  2. Pattern analysis
  3. Foundations
  4. Components
  5. States
  6. Explicit design-system rules
  • Color

  • Typography

  • Spacing

  • Radius

  • Borders

  • Elevation

  • Icons

Generic sanitized foundation examples · Representative example based on the design-system workflow.

Making the system machine-readable.

Before asking AI to implement a design system, I needed to make the design decisions explicit.

DESIGN_SYSTEM_RULES.md

# Design System Rules

SPACING
Only approved spacing values can be used.
Avoid arbitrary spacing values.

COLOR
Use semantic tokens.
Do not introduce raw color values inside components.

COMPONENTS
Reuse existing primitives before creating new components.

STATES
Interactive components must account for applicable:
Default, Hover, Focus, Pressed, Disabled, Loading, Error

ACCESSIBILITY
Focus states must remain visible.
Prefer semantic HTML.
Use ARIA where necessary.

VARIANTS
Do not create new component variants when an existing component
can support the requirement through composition.

Representative example based on the design-system workflow.

These rules turned design-system documentation from passive guidance into instructions that AI coding agents could reason against.

05 · The AI-assisted workflow

One path from design intent to deployment.

AI-assisted design-system pipeline
Text description

Designer, then Figma, then Design System Rules. These branch into three tools: Cursor (explore, modify, iterate), Claude Code (audit, reason, refactor) and Codex (implement, test, extend). They converge into Component Code, then Automated Validation of components and accessibility, then Human Review, then Approved Component, then Build, Test, Deploy, then Application.

Representative example based on the design-system workflow.
  • The tools were not given unrestricted authority. Human review remained the governance layer.
  • The objective was not simply to generate code. The workflow connected design decisions to implementation and carried approved components through validation toward deployment.

06 · How I used each tool

Three roles inside one governed workflow.

Cursor

Exploration + implementation environment

Representative tasks

  • · inspect component structure
  • · understand relationships between files
  • · modify components while viewing surrounding implementation
  • · trace reusable patterns
  • · iterate on component behavior
  • · review implementation in context

Strong when: working interactively inside the implementation and iterating quickly.

Claude Code

System analysis + refactoring

Representative tasks

  • · inspect broader component patterns
  • · identify inconsistent implementations
  • · reason about reusable architecture
  • · detect hardcoded values
  • · identify duplicate patterns
  • · check whether new components were actually necessary
  • · refactor toward established design-system rules

Strong when: reasoning across a larger system, auditing patterns, and considering refactoring opportunities.

Codex

Implementation + validation

Representative tasks

  • · implement well-defined component changes
  • · create component states
  • · extend variants
  • · generate tests
  • · fix design-system violations
  • · implement accessibility requirements
  • · update affected components while preserving unrelated behavior

Strong when: executing clearly scoped implementation and validation tasks.

The agents were collaborators inside the system, not the owners of the system.

TOOL CAPABILITY + QUALITY OF SYSTEM RULES + HUMAN JUDGMENT = USEFUL DESIGN-SYSTEM OUTPUT

The quality of the agent's output depended heavily on the quality of the system I gave it.

07 · Building the button system

Every variant and state, one governed architecture.

Variants
Primary, Secondary, Tertiary, Destructive
Sizes
Small, Medium, Large
States
Default, Hover, Focus, Pressed, Disabled, Loading

State matrix · Representative example based on the design-system workflow.

VariantDefaultHoverFocusPressedDisabled
PrimarySpecifiedSpecifiedSpecifiedSpecifiedSpecified
SecondarySpecifiedSpecifiedSpecifiedSpecifiedSpecified
TertiarySpecifiedSpecifiedSpecifiedSpecifiedSpecified
DestructiveSpecifiedSpecifiedSpecifiedSpecifiedSpecified
Button anatomy
Text description

Button anatomy: leading icon, button label, optional trailing icon. Annotated with semantic color, typography, spacing, radius, focus treatment, icon spacing and minimum target area.

Representative example based on the design-system workflow.
  1. Figma intent
  2. System rules
  3. AI implementation
  4. Validation
  5. Approved component

The challenge wasn't generating a blue button. The challenge was making sure every variant and state stayed part of the same governed component architecture.

Ungoverned

padding: 17px;
background: #006ABC;
border-radius: 5px;
Fail:arbitrary spacingFail:raw colorFail:unsupported radius

Design-system implementation

padding: var(--space-component-md);
background: var(--action-primary);
border-radius: var(--radius-control);
Pass:system spacingPass:semantic colorPass:supported radius

Representative sanitized examples, not official Fannie Mae tokens.

08 · Building the data table

Simple components test styling. Data tables test the system.

An enterprise data table reconstruction with column headers, sorting, filtering, search, row selection, bulk actions, status indicators, pagination, loading, empty and error states, and disabled or permission states. Columns: Name, Type, Owner, Status, Last Updated, Actions. All data is fictional.

DATA TABLE
├ Table
├ TableHeader
│  ├ HeaderCell
│  └ SortControl
├ TableBody
│  └ TableRow
│      ├ Checkbox
│      ├ Cell
│      ├ StatusBadge
│      └ ActionMenu
├ BulkActionBar
├ EmptyState
├ LoadingState
├ ErrorState
└ Pagination

This tested whether AI agents could work with component composition rather than simply reproduce a screenshot.

Sanitized reconstruction

09 · States are part of the system

Design-system fidelity isn't just visual fidelity. Behavioral states are part of the specification.

Button
Default → Hover → Focus → Pressed → Loading → Disabled
Input
Default → Hover → Focus → Filled → Error → Disabled → Read-only
Data table
Default, Loading, Empty, Error, Filtered, Rows selected, No permission

AI implementation

Submit

Keyboard focus: no visible indicator

Pass:Visual matchFail:System compliance

Corrected

Submit

Keyboard focus: visible ring, 3:1 contrast

Pass:Visual matchPass:System compliance

Representative example based on the design-system workflow.

10 · Design-system auditing

Agents surfaced violations. They didn't decide them.

Representative audit categories

  • Hardcoded colors
  • Arbitrary spacing
  • Unsupported variants
  • Duplicate components
  • Missing interaction states
  • Accessibility issues
  • Token inconsistencies

Component: ActionButton

Potential issues detected

  • Fail:Raw color value
  • Fail:Unsupported spacing
  • Fail:Missing focus state
  • Fail:Similar existing primitive detected
  1. AI recommendation
  2. Designer review
  3. Accept / Modify / Reject

AI detection was not treated as design-system authority. Every recommendation was evaluated against design intent, accessibility requirements, component architecture, and product context.

11 · Accessibility as a system requirement

Accessibility was encoded into the rules, not left to final QA.

Keyboard navigation through a data-table row
Text description

A data-table row navigated by keyboard: Tab moves to the row checkbox (accessible name 'Select Policy review A'), then to the sort control (announces 'sorted ascending'), then to the action menu. Focus is always visible. Selection state and errors are announced as text, not color.

Representative example based on the design-system workflow.
  • Keyboard navigation
  • Visible focus
  • Semantic controls
  • Accessible names
  • Sorting announcements
  • Selection state
  • Error communication

DESIGN + SYSTEM RULES + AI IMPLEMENTATION + AUTOMATED CHECKS + HUMAN VALIDATION

12 · Feedback loop and governance

Implementation became feedback for design.

Once implementation became part of the workflow, the design system was no longer a one-way Figma-to-code handoff. Implementation exposed gaps in the system itself: missing states, ambiguous variants, token gaps, accessibility requirements, unnecessary component duplication, unclear usage rules.

Two-way feedback
Text description

Figma flows to Code. Code flows to Design-system learning, which flows back to Figma.

Representative example based on the design-system workflow.

AI could change the implementation. It couldn't change the system's intent.

Governance model
Text description

Designer defines intent. Design system defines constraints. AI agent explores, audits and implements. Automated validation checks predictable rules. Designer and engineering review evaluates judgment calls. Approved system change is approved by engineering and the Director.

Representative example based on the design-system workflow.

AI accelerated execution, but governance remained human. The designer still determined:

  • what belongs in the system
  • when a variant is justified
  • whether two patterns should be consolidated
  • how components should behave
  • what accessibility means in context
  • when implementation revealed a design problem

13 · Where AI failed

The agents got it wrong in predictable ways.

  1. Failure 01

    AI created a new component where an existing primitive could have been composed.

    Response: Rejected and reused the existing component.

  2. Failure 02

    AI reproduced visual appearance but missed an interaction state.

    Response: Updated the specification and implementation.

  3. Failure 03

    AI introduced arbitrary styling values.

    Response: Replaced them with system tokens.

  4. Failure 04

    AI produced technically valid accessibility markup but overcomplicated the interaction.

    Response: Simplified the implementation using semantic HTML and clearer behavior.

  5. Failure 05

    AI interpreted visual similarity as functional equivalence.

    Response: Human review restored product intent.

AI was very good at following explicit rules. Ambiguous design intent still required human judgment.

14 · What changed

Measured and qualitative change.

Measured outcomes will appear here once each figure's source is confirmed.

Before

  • Design intent distributed across Figma and individual implementation decisions.
  • Repeated translation between design and engineering.
  • Potential for one-off component implementations.
  • Component states easy to overlook.
  • Design-system compliance dependent heavily on individual knowledge.

After

  • Design-system rules made explicit.
  • Reusable component architecture reinforced.
  • AI-assisted implementation accelerated repetitive work.
  • Component states became part of the implementation contract.
  • Design-system violations could be surfaced earlier.
  • Accessibility became part of component definition.
  • Implementation feedback could improve the design system itself.

15 · The bigger insight

AI makes design-system rules executable.

Traditional design-system documentation asks humans to remember the rules. AI-assisted workflows create an opportunity for those rules to take part directly in implementation.

  • Instead of documentation saying “Use approved spacing values,” the workflow can detect arbitrary spacing.
  • Instead of “Reuse existing components,” an agent can inspect the repository before proposing another component.
  • Instead of “Remember accessibility,” accessibility requirements can be part of the implementation contract.

But AI does not determine what the design system should mean. That remains a design and organizational responsibility.

The opportunity is not just reducing time to handoff. It's reducing the translation layer between design intent and production systems.

By combining design-system thinking with Cursor, Claude Code, and Codex, I explored a workflow where designers can participate deeper in implementation while maintaining the governance, accessibility, consistency, and product intent that make a design system valuable.