Back
Storybook documentation of the Button component: live preview and props table, with the Molecules and Atoms navigation
Design system
AI
Work-in-progress

Implementing an AI-based component production workflow

Corum's products, the connected investor space and the CAPPS Middle-Office tool, share one design system. As both products grew, the gap widened between the components designed in Figma and the ones actually coded, documented in Storybook.


The goal: evolve the design system toward an AI-assisted workflow, where a component goes from its Figma specification to a coded, documented and reviewed component with far less manual back-and-forth.

As Product Designer, I structure the component specifications, define the conventions shared by design and code (naming, props, variants, states) and set up the workflow with the front-end team, from the Figma library to Storybook.

  • Components documented in Storybook: [X] (atoms, molecules and library components)
  • Team: [X] front-end developers, 1 product designer
  • Duration: [X] months, ongoing
Challenge

Keeping design and code in sync

Every new component, or every new variant of an existing one, meant a long cycle: specification in Figma, handoff, implementation, review, then documentation. Variants drifted, states were missing in code and the documentation lagged behind.

Workflow

From Figma to production, assisted by AI

Figma stays the visual source of truth. Once a component is approved there, the designer codes it, with an AI assistant writing the React, and never has to touch git directly: two commands handle branches and pull requests. A developer then reviews the pull request before anything is merged into main, the only published branch.

Who actsDesignerAI assistantAutomatedDeveloper
Phase 1

Prepare

From an approved design to a briefed AI
  1. 1

    Approved design

    The component is finalized and approved in Figma, the visual source of truth.

    Designer
  2. 2

    /start-feature

    Pulls the latest main and creates a branch named after the component.

    Automated
  3. 3

    Brief the AI

    Share the Figma link and ask it to extract attributes, styles and props.

    DesignerAI assistant
Phase 2

Build & check

The AI writes the React, the designer checks it
  1. 4

    Check in Storybook

    Review the first version state by state, variant by variant.

    AI assistantDesigner
  2. 5

    Iterate

    Ask for fixes until the component matches Figma.

    DesignerAI assistant
  3. 6

    Review the props

    Check the final list: names, types and what each prop is for.

    Designer

Checking and iterating loop until the coded component matches Figma.

Phase 3

Ship

Nothing reaches main without a developer review
  1. 7

    /create-pr

    Builds, commits, pushes and opens the pull request.

    Automated
  2. 8

    Developer review

    Developers get the PR link and a short recap, then review the code.

    DesignerDeveloper
  3. 9

    Merge into main

    The only published branch: the component is live in the library.

    Developer

Guardrails

The AI follows a shared rules file, and the pipeline adds its own safety nets, so speed never comes at the cost of consistency or security.

What the AI must do

  • Use existing design tokens only, never a hard-coded color or spacing
  • Check that the component doesn't already exist
  • Classify it as an atom, a molecule or an organism
  • Check accessibility: labels, contrast, keyboard
  • Stop and ask when a token, an icon or an accessibility answer is missing

Security

  • No new dependency without human approval
  • Pinned dependency versions
  • Automated security and code-quality scans on every pull request
  • Secrets stay on the local machine, never in git

One API, shared by design and code

The Button illustrates the conventions applied to every component. Its appearance is driven by two axes, hierarchy (primary by default) and semantic (main by default), combined with a size, a state, optional leading and trailing icons, an icon-only mode, and disabled, loading and inverse options. The same names are used in Figma variants and in the component props.

Delivery

A living, documented component library

Each component ships with its documentation page in Storybook: a live preview, the props table with controls, a playground, and matrices that show every combination of hierarchy, semantic and state at a glance, so nothing is left untested.

Button documentation page: live preview and props table (hierarchy, semantic, size, state, icons, disabled, loading, inverse)
Button documentation: live preview and props table with controls

What we learned

  • List every boolean and its default value explicitly in the brief.
  • Have the AI read the Figma properties panel, not just the visual rendering.
  • Name the existing components it should reuse.
  • One feature per component at a time: a second branch before the first pull request is merged means conflicts.
  • Restarting a feature resets the local copy to main, so check everything before submitting.
  • A functional disabled state is a real boolean prop, not a value of a visual variant in Figma.
KPIs

Measuring the new workflow

Since its launch, the workflow has already produced 30 components of the design system, each one coded by a designer and reviewed by a developer.

30

Components created with the workflow

Next steps

Keeping Figma and code consistent over time

A design system audit tool

The next step is an audit tool that compares the Figma library with the coded components, to check that both stay consistent as the design system evolves: the same components, variants and props on each side, and any drift flagged before it reaches the products.