All sessions

Session 01 · Source of Truth

Code Is the Source

Design truth now lives in code. Figma, documentation and AI agents are all readers of it, and that changes what a designer's job is.

2 min read4 sections
Contents+

The story

This autumn we ran a simple audit: list every component the product actually ships, then find each one in Figma.

More than a dozen weren't there. Not out of date, just missing: built in code because a feature needed them, and never drawn back into the file that was supposed to be the source of truth. Many of the ones that were there had empty descriptions. Questions about components were already being answered from code.

The honest conclusion wasn't that anyone had been careless. It was that the rule was wrong. Truth had already moved into code, and we were spending real effort pretending it hadn't. So instead of chasing Figma back into authority, we made the move official.

The shift

For years the working rule was simple: Figma is the source of truth. Design decided, code followed, and every gap between the two was a translation error to chase down after release.

Now the order runs the other way. A change to a token or component starts as a merge request against versioned packages, and every other surface picks it up from there.

01 · Hierarchy

Where truth lives

When two places disagree, someone has to win. We made the order explicit: the code packages first, then the machine-readable rule records generated from them, then the documentation feeds that agents query. Anything lower in the order that disagrees with something higher is wrong by definition. No meeting required.

Three sources in order: code packages first, then rule records generated from them, then the documentation feed agents query. When two disagree, the higher one wins.01Code packagestokens and components02Rule recordsgenerated, machine-readable03Docs feedwhat agents queryhigher wins
Figure 1 — Where truth livesDraft diagram

02 · Direction

The one-way mirror

Component frames in Figma are now generated from code and labelled as mirrors. The rule for people and agents alike is blunt: if a mirror looks wrong, the fix goes upstream into the package, and the mirror regenerates. That one rule ended the slow, two-way reconciliation that used to follow every release.

“Never edit code to match Figma.”
Changes flow one way, out from the code packages to the Figma mirror, the docs site and AI agents. The old path where Figma edits were copied back into code is retired.edits copied back · retiredCodepackagesFigmamirrorDocs siterenders packagesAI agentsread docs feed
Figure 2 — The one-way mirrorDraft diagram

03 · Nuance

Where Figma still leads

This isn't a story about leaving Figma. It's still where brand art, illustration, imagery and early exploration happen, and those assets flow from Figma into the docs site. The shift is narrower and more useful: for anything the product renders as a component or token, code decides. For anything that starts as a picture, Figma does.

Two lanes. For components and tokens, code is the source and Figma, the docs site and agents read from it. For brand art and imagery, Figma is the source and the docs site, campaigns and product art read from it.Components & tokens · code decidesCodeFigma mirrorDocs siteAI agentsBrand art & imagery · Figma decidesFigmaDocs siteCampaignsProduct art
Figure 3 — Where Figma still leadsDraft diagram

04 · Verification

Parity as a check

A source of truth only helps if you can prove the copies match. A read-only parity script walks every surface, from the packages and component docs to the Figma snapshot, the documentation site and the rule records, and reports what's missing or out of date. Gaps become a list someone can work through, not a surprise a customer finds.

$ parity check

ComponentPackageDocsFigma mirrorRules
Button✓✓✓✓
Text field✓✓✓✓
Data table✓✓Missing✓
Toast✓Out of date✓✓
Date picker✓✓Missing✓

5 components checked · 3 gaps · 0 conflicts

Figure 4 — Parity as a checkExample output

Then & now

What changed

  1. ThenFigma is the authority for components, tokens and rules.

    NowVersioned code packages are. Figma reads from them.

  2. ThenContext resolves back into Figma as refined intent.

    NowContext resolves into code and rule records, then flows out.

  3. ThenTokens are managed as Figma variables and plugins.

    NowTokens ship as a package. Figma variables are checked against it.

  4. ThenParity is hoped for and audited by hand.

    NowParity is a script that runs on every change.

In practice

  1. 01

    Write down the order. Decide which source wins when two disagree, and put that rule where both people and agents will read it.

  2. 02

    Make sync one-way. Generate design mirrors from code and label them, so nobody fixes the wrong copy.

  3. 03

    Automate the comparison. Even a simple script that lists components missing from docs or design beats a quarterly audit.

© 2026 Joshua Piller. All rights reserved.