Case study · Design system · 2026 · Client under NDA

Building a design system as the single source of truth

A design system for a company building safety-critical software had grown for years without tokens, and parts of it lived only in code. In three months I made Figma the single source of truth, with a workflow straight into code, ready for AI-supported development.

Role
Freelance UX consultant, set up the foundation of the design system with the team
Team
3 developers, a UI designer (brand), a UX lead (requirements)
Duration
3 months, plus a follow-up
Tools
Figma, Figma MCP, Claude, GitHub, my own Figma plugin, a custom-made Storybook
Proof
Live demo of the rebuild, the client work is under NDA
One source, every surface. Re-alias the semantic tokens in Figma, and the component tokens in code follow. Token names from the rebuild. A simplified sketch of the workflow, shown with my rebuild.

Challenge

A design system for safety-critical software had grown for years without tokens. Parts of it lived only in code, Figma was out of date, and every handover meant translating between two sources. At the same time, the company was moving toward AI-supported development, and AI needs a clean base to work from.

Impact

  • 6030Core components, all maintained in Figma
  • 440+Tokens in three tiers, the raw values locked
  • 40–50 %Less handover time team estimate
  • 1Source for design, development, marketing and AI

Collaboration

I set up the foundation of the design system with the team: three developers, a UI designer for the brand and a UX lead for the requirements. I was the single point of contact between brand, UX lead and development, so every question got a single answer.

Context

Complete on paper, but nobody could trust it

The system covered almost every case. Years of special requests had made it hard to use. Each problem below links to the decision that solved it.

  1. Legacy Years of special cases Many components were built once, for a single device or use case. → Merge instead of delete
  2. No tokens A loose color scheme Values were typed in by hand. → Three token tiers
  3. Two truths Code vs. Figma Parts only existed in code. Figma was out of date. → Figma as the single source

At the same time, the company was moving toward AI-supported development. Without a clean base, AI has nothing reliable to work from.

Hypothesis. One source of truth raises efficiency, improves coordination and simplifies QA, and it meets the criteria for an AI workflow, because Claude needs a fixed set of rules to work at quality.

How we measured it. The goal was better internal processes, not a customer metric. Instead of KPIs, we set requirements that every component had to meet, checked in part by the token QA. So far, the only figure is handover time, estimated by the team.

What made it hard

The people were harder than the tooling

Accessibility vs. brand. Marketing uses the system too, so WCAG AA was a target. That meant adjusting brand colors. I made the case with concrete examples, and the brand side agreed.

Developers and habits. Moving the source from code to Figma changed routines. Most developers were positively surprised and now call it a productivity gain.

Decision 1 · Source of truth

From code as the truth to Figma as the single source

"Which one is right, Figma or the code?"

Problem. Code was the de facto truth, but only developers could read it. Every handover meant translating between two sources.

Approach. We made Figma the core and let everything else read from it. Claude structures the tokens going in and runs a token QA on the components coming out. Then developers review the code in GitHub, adjust and approve it, and send it back to Figma. Every approved push updates the internal Storybook.

Result

Design, development, marketing and AI work from one system. Nobody copies a value by hand.

Figma Single source of truth Primitives locked
Claude Structures the token base
Token Bridge Tokens to GitHub in one commit
Figma MCP Reads components, token QA with Claude
GitHub Developers review and approve
Internal Storybook Updates on every approved push
Marketing Uses Figma and the Storybook
Figma at the core. The tools that feed it sit close, the teams that use it further out.

Decision 2 · Token architecture

From a loose color scheme to three locked token tiers

"How do we change a brand color without breaking anything?"

Approach. I followed Material Design's token model, a structure everyone on the team understood at once, and built the token base from zero with the UI designer. Primitive tokens hold the raw values, semantic tokens name their purpose, component tokens apply them to one component.

The lock. Primitive tokens are hidden from Figma users and not available to AI agents. Everyone works with semantic and component tokens only, so nobody binds a raw value by accident.

The buttonWhat developers use ButtonButton / Primary
Color Radius Padding
~200Component tokens button/primary/bg/default button/radius button/padding-xbutton/padding-y People and AI
140+Semantic tokens color/action/primary/bg/default radius/control space/inset/mdspace/inset/sm People and AI
100+Primitive tokensthe foundation purple/600#5F2CFF radius/md8 px space/16 · space/816 × 8 px Locked for AI agents and people

Simplified view: one variant, three properties. The full button uses more tokens for its states, text color and focus ring, 21 in the rebuild alone.

Built from the ground up. Primitive tokens are the locked foundation, semantic tokens give each value a role, component tokens apply it to the button. Hover a token to follow its line, or switch the variant: only the color changes. The arrows show what each line defines on the button.

Result

440+ tokens: 100+ primitive, 140+ semantic and about 200 component tokens. A brand color or a whole theme now changes in one place.

Decision 3 · The audit

From deleting special components to merging them

"Which of these 60 do we really need?"

Tension. Many components had been built for one device or one use case. Deleting them would break real screens. Keeping them all would keep the chaos.

Approach. Many components had been created directly in code, often with very similar patterns. The team ranked every component by value: how often it was used and how often its pattern repeated. I guided the process and gave feedback. Similar components became a variant of one component or were replaced by one that fits the pattern. Unused components went. Where a real need was missing, a new component was built.

Goal. Work with fewer components and extend them wisely.

Result

30 standardized core components, all maintained in Figma. Nothing lives only in code anymore.

Before
60 components became 30. Many special components merged into one flexible component for several use cases.

Decision 4 · Tooling

From a Figma Enterprise upgrade to my own plugin

"Do we need Figma Enterprise for this?"

Tension. Figma's Variables API needs an Enterprise plan, and the client considered upgrading. I advised against it: most Enterprise features didn't fit their use case.

Approach. I built a Figma plugin instead. It imports token structures defined with Claude and exports all tokens to GitHub in one commit. Missing references are reported on import, which doubles as a naming check.

Result

No Enterprise license needed. Tokens reach the repository in one click.

From Claude to GitHub in three steps. A simplified sketch from the rebuild; the plugin labels are German, as in the real plugin.

The system

How design and code stay in sync

This is how tokens and components moved between design and code at the client. Two checks keep it clean: a token QA before any code exists, and a developer review before anything goes back to Figma.

The token QA checks the tokens before code exists. The developer review checks the code, and what they approve flows back into Figma.

Token QA before code

Every component had to meet the same requirements, for example:

  • Semantics everywhere. Every value points to a semantic or component token.
  • No hard-coded values and no foreign token structures.
  • Spacing by group. Each component group has its allowed paddings, so a button can never get space/inset/lg.
  • Primitives are locked for AI. Claude may use them only through semantic tokens, never change or bind them directly.
  • WCAG AA. Every component meets WCAG AA.

The token QA checks the token rules. The agent reports back what breaks a rule and what needs fixing. Every component runs through the same four steps before it becomes code.

  1. Read

    See what every layer is bound to

    Claude reads the component via the Figma MCP. A screenshot shows how it looks, the MCP shows what every layer is bound to.

    Figma design panel for Button Primary Default: padding 16 and 8, gap 4 and corner radius 8 bound to variables, fill button/primary/bg/default, text button/primary/fg.
  2. Compare

    Flag what does not belong

    Foreign tokens, mixed-up tokens, hard-coded values and paddings outside their group are flagged, with a note on what to fix. Example: the first read of the Sign-up Card in the rebuild.

  3. Fix in Figma

    Correct it at the source

    Errors are fixed in Figma, never patched in code. Every value points to a semantic token again.

    Figma Variables panel, collection Semantic: color/action/primary/bg default, hover, pressed and disabled, each shown as an alias pill of a purple or neutral primitive.
  4. Read again

    A clean second read, then code

    Only a component that comes back clean becomes code. Figma and code then share the same tokens and states.

    Left: the Sign-up Card component set exported from Figma with four states. Right: the same card built in code, in its default state.

Result

Token QA is now a fixed step before any code is written. In the rebuild, the first read found four problems, the second came back clean.

Try it in the rebuild

The client work is under NDA, so I rebuilt the workflow with my own design system, with a Storybook-style demo you can click through. This page uses it too. The one difference: in the rebuild, Claude turns the Figma MCP output into HTML and CSS instead of React and Tailwind.

Results

Live since 2026, and hired again

The system went live in 2026. It is a technical foundation, so end users do not see it directly yet. The gains so far show in how design and development work together.

The follow-up

The client hired me again. For security reasons, not everyone should need an external design tool, so I defined, tested and built an internal Storybook with Claude: tokens, components, guidelines and copy-ready code, usable without Figma or GitHub. It updates itself from the repository.

AI and me

Where Claude helped, and where I stepped in

  • Tools. Claude structured the token base and ran the token QA. The Figma MCP read every component and what each layer was bound to.
  • What it delivered. Token structures to import, QA reports, and component code as a reference.
  • What I corrected. The first QA read of the Sign-up Card found tokens from a foreign library, mixed-up tokens and typed-in values. I fixed them in Figma, never in code. In the rebuild I translated the React and Tailwind reference into HTML and CSS, e.g. Figma's inside stroke became an inset box shadow, so inputs keep their 36 px height.
  • Without AI. The audit. The team ranked every component by use and repeated patterns, because that needed people who knew the real screens.

What I would do differently

The first rounds were bumpy. We started building before the components were properly prioritized, and had to go back and do our homework. Next time, the ranking comes first and the building second.

What I learned. Claude only builds reliable code from a clean, bound system. Agree on naming before you scale, because renaming after an import creates duplicates.

Ask me about the merge decisions or the internal Storybook. I'm happy to show both.

Let's talk

More of my work