<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Amrutha Kollu</title>
    <description>The latest articles on DEV Community by Amrutha Kollu (@akollu72).</description>
    <link>https://dev.to/akollu72</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3953306%2Ff9c54a02-fb18-44ce-8477-916b75d41e00.jpeg</url>
      <title>DEV Community: Amrutha Kollu</title>
      <link>https://dev.to/akollu72</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akollu72"/>
    <language>en</language>
    <item>
      <title>Why AI Keeps Generating the Wrong Design Tokens and How I Fixed It with Figma's API</title>
      <dc:creator>Amrutha Kollu</dc:creator>
      <pubDate>Mon, 08 Jun 2026 18:18:46 +0000</pubDate>
      <link>https://dev.to/akollu72/why-ai-keeps-generating-the-wrong-design-tokens-and-how-i-fixed-it-with-figmas-api-17o4</link>
      <guid>https://dev.to/akollu72/why-ai-keeps-generating-the-wrong-design-tokens-and-how-i-fixed-it-with-figmas-api-17o4</guid>
      <description>&lt;p&gt;AI design system output is approximate by default. Wrong border radii, raw hex values, inconsistent tokens across 60 components. The fix isn't better prompts. Here's the structural change that made it exact using Figma's REST API.&lt;/p&gt;

&lt;p&gt;The fourth time I manually corrected the same border radius mistake in an AI-generated component, I stopped and asked why this kept happening.&lt;/p&gt;

&lt;p&gt;Not "what prompt would fix this?" The deeper question: why does every AI tool I tried get the structure right and the values wrong?&lt;/p&gt;

&lt;p&gt;The button was correct. The variants were there. The layout matched the Figma spec. But &lt;code&gt;borderRadius: 8&lt;/code&gt; when it should be &lt;code&gt;borderRadius: '8px'&lt;/code&gt;. A spacing gap of &lt;code&gt;8&lt;/code&gt; when the spec said &lt;code&gt;6&lt;/code&gt;. The color &lt;code&gt;#3B82F6&lt;/code&gt; sitting in the file where &lt;code&gt;semantic.button.primary&lt;/code&gt; should be.&lt;/p&gt;

&lt;p&gt;None of it wrong in a way that breaks the build. All of it wrong in a way that breaks the design system.&lt;/p&gt;

&lt;p&gt;After hitting this wall enough times, I realized the problem wasn't the AI. It was the question I was asking it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why AI keeps generating the wrong Figma design tokens
&lt;/h2&gt;

&lt;p&gt;When you give an AI tool a Figma screenshot and ask it to produce a component, it does something reasonable: it interprets what it sees.&lt;/p&gt;

&lt;p&gt;The structure, the layout, the hierarchy - it gets most of that right. What it cannot get right is the token mapping.&lt;/p&gt;

&lt;p&gt;The AI doesn't know your semantic token file. It doesn't know that &lt;code&gt;#3B82F6&lt;/code&gt; maps to &lt;code&gt;semantic.button.primary&lt;/code&gt; in your codebase. It doesn't know that your MUI setup multiplies numeric border radii by 4, which means &lt;code&gt;borderRadius: 8&lt;/code&gt; renders at &lt;code&gt;32px&lt;/code&gt; instead of &lt;code&gt;8px&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So it approximates. Here's what that looks like in practice:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What AI produces&lt;/th&gt;
&lt;th&gt;What the spec requires&lt;/th&gt;
&lt;th&gt;Why it's wrong&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;borderRadius: 8&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;borderRadius: '8px'&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;MUI multiplies numeric values by 4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;gap: 8&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gap: 6&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Spacing value not extracted from Figma&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;color: '#3B82F6'&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;semantic.button.primary&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Raw hex instead of semantic token&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fontSize: 14&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;variant="MD_Medium"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Typography token not resolved&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Across one component, these deviations are small. Across 60 components, they mean your design system exists in two versions: what the designer built and what the code implements.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This isn't a prompt engineering problem.&lt;/strong&gt; A better prompt doesn't tell the AI your semantic token file. The problem is structural, the input is wrong.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  How to fix AI design token generation: read Figma's API, not a screenshot
&lt;/h2&gt;

&lt;p&gt;The insight that fixed this for me: design system components have two completely different kinds of decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deterministic decisions&lt;/strong&gt; have exact correct answers already defined somewhere like the token for this fill, the typography variant for this size/weight combination, the exact spacing value. These are not judgment calls. They have right answers that live in your Figma file and your token file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Judgment decisions&lt;/strong&gt; require actual design thinking where which variant is the default, how the component behaves in edge cases. These genuinely benefit from AI reasoning.&lt;/p&gt;

&lt;p&gt;The mistake I kept making was asking AI to handle both at once. Once I separated them, everything changed.&lt;/p&gt;

&lt;p&gt;Instead of giving the AI a screenshot to interpret, I started reading Figma's REST API directly. The API returns exact values, fills as precise hex codes, typography as specific size/weight/line-height combinations, spacing as pixel measurements. No interpretation. Exact data.&lt;/p&gt;

&lt;p&gt;Here's what the fixed pipeline looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Step 1: Read exact values from Figma REST API (not a screenshot)&lt;/span&gt;
figment scan &lt;span class="nt"&gt;--node&lt;/span&gt; 87YQbb7f33GYUHSOogYGjH:397:23320

&lt;span class="c"&gt;# Output: token patch with classified fills&lt;/span&gt;
✓  semantic.button.primary  &lt;span class="c"&gt;#3B82F6  reachable&lt;/span&gt;
✓  semantic.surface.pressed  &lt;span class="c"&gt;#1E3A5F  reachable&lt;/span&gt;
⚠  spacing.gap  8px  → resolves to tokens.space.2

&lt;span class="c"&gt;# Step 2: Deterministic resolvers run before AI sees anything&lt;/span&gt;
&lt;span class="c"&gt;# Typography: 14px/500 → MD_Medium&lt;/span&gt;
&lt;span class="c"&gt;# Corner radius: 8 → '8px' (MUI string literal)&lt;/span&gt;
&lt;span class="c"&gt;# Gap: 8px → tokens.space.2&lt;/span&gt;

&lt;span class="c"&gt;# Step 3: AI generates from facts, not interpretations&lt;/span&gt;
figment generate &lt;span class="nt"&gt;--name&lt;/span&gt; Badge &lt;span class="nt"&gt;--node&lt;/span&gt; 87YQbb7f33GYUHSOogYGjH:397:23320
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prompt no longer says &lt;em&gt;"generate a button component based on this design."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It says &lt;em&gt;"generate a button component where the background is &lt;code&gt;semantic.button.primary&lt;/code&gt;, the corner radius is &lt;code&gt;'8px'&lt;/code&gt; as a string literal, the gap is &lt;code&gt;tokens.space.2&lt;/code&gt;, and the typography variant is &lt;code&gt;MD_Medium&lt;/code&gt;."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The AI received facts. It produced code from them. It never had to guess at a token name because I had already resolved every single one before the model saw anything.&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem generation doesn't solve: design system drift in CI
&lt;/h2&gt;

&lt;p&gt;Getting values correct at generation time is necessary. I learned it's not sufficient.&lt;/p&gt;

&lt;p&gt;One month in, a developer renamed a token in a PR that looked completely unrelated. The rename was correct and it was a necessary cleanup. What nobody checked, including me, was which components used the old name. During the design review, the designer flagged that three buttons in production no longer matched the Figma spec. Not dramatically. Just slightly off.&lt;/p&gt;

&lt;p&gt;That's the thing about design system drift. It's invisible until someone looks closely enough to notice.&lt;/p&gt;

&lt;p&gt;The fix I landed on: a verification script that runs on every pull request. It fetches the live Figma data for each component, re-runs the same deterministic extractors I used at generation time, and compares the results against the current component source.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Runs on every pull request automatically&lt;/span&gt;
npm run verify-figma &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--component&lt;/span&gt; Badge &lt;span class="nt"&gt;--node&lt;/span&gt; 87YQbb7f33GYUHSOogYGjH:397:23320

✓  Typography    &lt;span class="nv"&gt;variant&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"MD_Medium"&lt;/span&gt;         PASS
✓  Spacing       gap: tokens.space.2         PASS  
✓  Colors        no raw hex values           PASS
✓  Border-radius &lt;span class="s1"&gt;'8px'&lt;/span&gt; string literal        PASS
Exit code: 0 — no drift detected
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If anything has drifted from the Figma spec, the script fails. The pull request doesn't merge.&lt;/p&gt;

&lt;p&gt;The design system no longer depends on the memory of whoever is reviewing the PR. It depends on the Figma file, verified continuously on every merge.&lt;/p&gt;




&lt;h2&gt;
  
  
  What production-ready AI-generated components actually look like
&lt;/h2&gt;

&lt;p&gt;When you put these two things together - deterministic pre-resolution and CI drift detection, the output is structurally different from what most AI tools produce.&lt;/p&gt;

&lt;p&gt;Every generated component includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Zero raw hex values — every color is a semantic token&lt;/li&gt;
&lt;li&gt;✅ Correct border radii — string literals where MUI requires them&lt;/li&gt;
&lt;li&gt;✅ A &lt;code&gt;.figment.json&lt;/code&gt; spec file recording exact Figma values at generation time&lt;/li&gt;
&lt;li&gt;✅ A spec-lock test suite running against the current source on every CI build&lt;/li&gt;
&lt;li&gt;✅ An overrides file documenting every intentional deviation with written justification&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach shipped more than &lt;strong&gt;60 components with 3,077 tests in 35 business days&lt;/strong&gt; against an original estimate of 120 engineer-days. The reason cleanup time dropped to near zero was the pre-resolution step. There was nothing to fix because the values had never been wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why the constraint-first pattern works for any AI code generation
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AI output is approximate by default. Making it exact requires constraining what AI is allowed to decide.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I've come to think of this as a general principle, not just a design system trick. Any workflow where AI generates code that needs to be production-correct, not just production-close, benefits from the same structure.&lt;/p&gt;

&lt;p&gt;Resolve the deterministic parts upstream. Delegate the judgment parts to the model. Scan the output for violations before writing any file. Verify against the source of truth on every pull request.&lt;/p&gt;

&lt;p&gt;Most teams skip the constraints because they seem like overhead. Then they wonder why every AI-generated component needs a round of manual cleanup before it's usable.&lt;/p&gt;

&lt;p&gt;That cleanup is the cost of asking AI to make decisions it was never designed to make well. Once I stopped asking AI those questions, it stopped giving me wrong answers.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;By &lt;a href="https://linkedin.com/in/amrutha-kollu" rel="noopener noreferrer"&gt;Amrutha Kollu&lt;/a&gt;, Software Engineer.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Part 1: &lt;a href="https://dev.to/akollu72/how-we-shipped-60-design-system-components-in-5-weeks-using-figma-as-the-single-source-of-truth-1lkc"&gt;How I Shipped 60 Design System Components in 5 Weeks Using Figma as the Single Source of Truth&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>figma</category>
      <category>ai</category>
      <category>designsystem</category>
      <category>claude</category>
    </item>
    <item>
      <title>How I Shipped more than 60 Design System Components in 5 Weeks Using Figma as the Single Source of Truth</title>
      <dc:creator>Amrutha Kollu</dc:creator>
      <pubDate>Tue, 26 May 2026 23:26:59 +0000</pubDate>
      <link>https://dev.to/akollu72/how-we-shipped-60-design-system-components-in-5-weeks-using-figma-as-the-single-source-of-truth-1lkc</link>
      <guid>https://dev.to/akollu72/how-we-shipped-60-design-system-components-in-5-weeks-using-figma-as-the-single-source-of-truth-1lkc</guid>
      <description>&lt;p&gt;We estimated 120 engineer-days. We shipped in 35 days with 3,077 tests and zero raw hex values. Here's the pipeline I built to make Figma the literal source of truth for our codebase.&lt;/p&gt;

&lt;p&gt;All front-end developers are familiar with that pain.&lt;/p&gt;

&lt;p&gt;A designer drops a Figma file. It is pixel-perfect. All interaction states are included. Next, you launch your editor and the translation process starts.&lt;/p&gt;

&lt;p&gt;You squint at 2 screens. What's the gray color of that? Which is 8 pixels and which is 12? What is the font weight for this font? MD_Medium, MD_SemiBold?&lt;/p&gt;

&lt;p&gt;The questions are brief. The answers are extremely important. The farther away you are from the Figma file, the more the component deviates from the original idea.&lt;/p&gt;

&lt;p&gt;This is not something resulting from carelessness. It's a structural issue; Figma and code are two very distinct ways of representing the same truth, and every time a new engineer has to re-translate the specification by eye.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cost in real numbers
&lt;/h2&gt;

&lt;p&gt;Our design system had more than 60 components to implement. The effort estimate was conservatively estimated at 4-5 engineer days per component.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's about 120 engineer-days including design drift at each turn.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The typical failure pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Day 1: engineer reads the Figma spec, guesses what names to give the tokens.&lt;/li&gt;
&lt;li&gt;Day 2-3: component is written by hand&lt;/li&gt;
&lt;li&gt;Day 3: QA feedback and it is noted that it is the incorrect color or spacing.&lt;/li&gt;
&lt;li&gt;Day 4: fixes and review&lt;/li&gt;
&lt;li&gt;Day 5: tests (if time permits)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After one week, the component continues to drift. The source of truth was a Figma file that was not programmed into the engineer, but looked at.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built Figment
&lt;/h2&gt;

&lt;p&gt;The insight was simple: It was not that engineers failed to be good at reading Figma files. &lt;strong&gt;The issue was that they had to read them all&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If it was possible for Figma to talk directly to the codebase, without a human being being an error-prone layer in between?&lt;/p&gt;

&lt;p&gt;That became Figment.&lt;/p&gt;

&lt;p&gt;The aim was to never take away the human judgment. It does not need to be automated for designers to make decisions regarding hierarchy, intent and emphasis. But the mechanical aspects of the translation, like the exact hex value of a token, the exact measurement of a gap, what font variant equals a particular weight — those answers are there in the Figma file already.&lt;/p&gt;

&lt;p&gt;It didn't make any sense for a human to be making the sixty re-answers to the fiftieth time for sixty components.&lt;/p&gt;

&lt;h2&gt;
  
  
  One of the initial limitations
&lt;/h2&gt;

&lt;p&gt;Every generated component had to use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Semantic design tokens (not raw hex values)&lt;/li&gt;
&lt;li&gt;MUI sx props (not external stylesheets)&lt;/li&gt;
&lt;li&gt;TypeScript strict mode&lt;/li&gt;
&lt;li&gt;A Storybook story for every meaningful Figma variant&lt;/li&gt;
&lt;li&gt;Spec-lock tests capable of catching drift in CI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Figment was not built to produce a starting point for an engineer to clean up. It was built to produce code ready for review and ready to ship on the same day.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Figment works: a three-stage pipeline
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Stage 1: Token reconnaissance
&lt;/h3&gt;

&lt;p&gt;Design tokens that are used by the component must exist in the codebase before the component generates them. Stage 1 retrieves the Figma fills for the target node, compares them to the existing token file, and prints a patch that can be pasted to the token file to include the missing tokens.&lt;br&gt;
One Figma API call. Thirty seconds. No room for ambiguity.&lt;/p&gt;
&lt;h3&gt;
  
  
  Stage 2: Token authoring (where all that is necessary is a human touch)
&lt;/h3&gt;

&lt;p&gt;The engineer checks the proposed additions of tokens and adds them to the appropriate semantic group. This is a deliberate manual step as there are design intentions and intents to the token that cannot be captured by automation.&lt;br&gt;
The system's state is indicated by a color called surface.pressed, which the hex value doesn't convey.&lt;/p&gt;
&lt;h3&gt;
  
  
  Stage 3: Deterministic component generation
&lt;/h3&gt;

&lt;p&gt;This is where Figment differs from having an AI create a component from a Figma screenshot. Figment uses Claude via the Anthropic API for the generation step, but the key is what happens before Claude ever sees the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All values that can be exactly determined are fixed in advance of any data reaching the Claude (via the Anthropic API):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The typography is solved by the algorithm: 12px + weight 500 = MD_Medium, line-height 16px. Injected as facts, not suggestions.&lt;/li&gt;
&lt;li&gt;The spacing and icon sizes are directly retrieved from Figma's bounding box data. Exact pixels (not rounded up).&lt;/li&gt;
&lt;li&gt;If all variant dimensions are parsed, then a required coverage block is appended to the input coverage to ensure no interaction state is lost, otherwise the variant coverage is determined.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The output is scanned for forbidden patterns after generating and before writing to disk.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Raw hex values → rejected&lt;/li&gt;
&lt;li&gt;Numeric border radius with no other modifiers (such as blur or drop shadow) → accepted, but multiplied by 4 (MUI)&lt;/li&gt;
&lt;li&gt;Missing token imports → rejected
There is a problem with the order of the focus rings' shadows.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A file is written only if it passes all the checks. No silent failures.&lt;/p&gt;
&lt;h2&gt;
  
  
  What a single run produces
&lt;/h2&gt;

&lt;p&gt;Figment creates 3 files when it is called. Not a scaffold. Not at the beginning. A full, reviewed, PR ready package:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The component file&lt;/strong&gt; containing semantic tokens, MUI &lt;code&gt;sx&lt;/code&gt; props and type strict mode&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Storybook story&lt;/strong&gt; for each meaningful Figma variant.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A spec-lock test&lt;/strong&gt; to store all the tokens and spacing values for CI checking&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All three products are produced simultaneously, all are checked simultaneously and all are sent simultaneously. An engineer's task is to check that it is correct and not rewrite.&lt;/p&gt;
&lt;h2&gt;
  
  
  Handling intentional deviations from Figma
&lt;/h2&gt;

&lt;p&gt;Not all of a specification should be taken verbatim and pasted into the code. In some cases, the designer may define typography that is applicable to a child component. A spacing value sometimes is more a layout frame artefact than it is a rule for the component itself.&lt;/p&gt;

&lt;p&gt;Figment does this using a file called &lt;code&gt;figment.overrides.json&lt;/code&gt; that is located with each component. Any deliberate deviation from Figma is documented on a written basis with a justification. Nothing is undocumented. An exact Figma value that is used as a basis for the generated code is recorded in a separate &lt;code&gt;figment.spec.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This means that each part has its own origin: what it was said in the Figma file, what it will do differently, and why. A response of 6 months later to "why doesn't this meet the Figma spec?" should not be based on someone's memory, but rather the file.&lt;/p&gt;
&lt;h2&gt;
  
  
  Automated drift detection in CI with verify-figma
&lt;/h2&gt;

&lt;p&gt;Generating a correct component is one problem. &lt;strong&gt;Keeping it correct as the codebase evolves is a separate problem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A token renamed by a future engineer. A spacing value adjusted without checking Figma. A color swapped in a hurry. These changes silently erode a design system until the code no longer matches the spec.&lt;/p&gt;

&lt;p&gt;Figment addresses this with &lt;code&gt;verify-figma&lt;/code&gt;, a script that runs on every pull request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run verify-figma &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--component&lt;/span&gt; Badge &lt;span class="nt"&gt;--live&lt;/span&gt; &lt;span class="nt"&gt;--figma-node&lt;/span&gt; 397:23320

Typography    12px / weight 500  &lt;span class="nv"&gt;variant&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"MD_Medium"&lt;/span&gt;  PASS
Spacing       gap &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"Icon + Label"&lt;/span&gt;  6px              PASS
Colors        raw hex  No raw hex values               PASS
Border-radius 6 checks  PASS | 6 passed, 0 warnings, 0 errors
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Six checks. Zero warnings. Zero errors. Verified live against the Figma file in thirty seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pull requests that introduce drift do not merge.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The design system does not rely on the memory or diligence of the people maintaining it. It relies on the Figma file, verified continuously by the pipeline that created it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The parallel review workflow that made 5 weeks possible
&lt;/h2&gt;

&lt;p&gt;The pipeline was only half of what made this work. The other half was the process design.&lt;/p&gt;

&lt;p&gt;Building a design system means satisfying two reviewers: a designer checking visuals and an engineer checking code. Most teams run these sequentially. Three sequential waits per component.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We collapsed them into one:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run the Figment pipeline for the target component&lt;/li&gt;
&lt;li&gt;Deploy to Storybook via Chromatic and send the designer a link&lt;/li&gt;
&lt;li&gt;Simultaneously, raise a PR for engineer code review&lt;/li&gt;
&lt;li&gt;While both reviews are in flight, start the next component&lt;/li&gt;
&lt;li&gt;When feedback arrives from both, address it completely&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Designer review and engineer review happen concurrently, not consecutively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We shipped 7 components in a single day using this workflow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The bottleneck stopped being the build. It became the review queue trying to keep up.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bottleneck nobody expected
&lt;/h2&gt;

&lt;p&gt;It was not all smooth. Early in the implementation, pull request reviews from the engineer arrived slowly. Components were being generated and deployed. The pipeline was working. But the reviews were not keeping pace with the output.&lt;/p&gt;

&lt;p&gt;This is a well-known failure mode on small teams: one person's output rate exceeds another's review rate, and work accumulates in the queue. Components that sit in review for two weeks get feedback in a different mental context than when they were built. Addressing that feedback takes more effort than it should.&lt;/p&gt;

&lt;p&gt;Then something shifted. When the engineer's review cadence aligned with the generation rate, the entire dynamic changed. Two people in synchrony: one generating components and running visual review, one reviewing code, both running at the same pace. Components that had been stacking up began shipping daily.&lt;/p&gt;

&lt;p&gt;That is the part no tooling can automate. The pipeline can generate at any speed. The workflow can parallelize reviews. But the human rhythm of a team working in sync is what turned a good system into a fast one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The results
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Before Figment&lt;/th&gt;
&lt;th&gt;After Figment&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Time per component&lt;/td&gt;
&lt;td&gt;4-5 engineer-days&lt;/td&gt;
&lt;td&gt;Less than 1 day&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total for 60 components&lt;/td&gt;
&lt;td&gt;~120 engineer-days (est.)&lt;/td&gt;
&lt;td&gt;35 business days&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tests&lt;/td&gt;
&lt;td&gt;Written if time allowed&lt;/td&gt;
&lt;td&gt;3,077 (every component)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Raw hex values&lt;/td&gt;
&lt;td&gt;Common&lt;/td&gt;
&lt;td&gt;Zero&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Design drift&lt;/td&gt;
&lt;td&gt;Discovered weeks later&lt;/td&gt;
&lt;td&gt;Caught on every PR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every component has a matching Figma node ID recorded in its source. Every token choice is auditable back to the Figma file. Every intentional deviation from the spec is documented with a written justification in &lt;code&gt;figment.overrides.json&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI alone doesn't solve this problem
&lt;/h2&gt;

&lt;p&gt;I tried using AI tools to generate components from Figma before building Figment. The output was always close but never exact.&lt;/p&gt;

&lt;p&gt;The reason: AI tools interpret Figma like a screenshot. They see the design visually and approximate what they see. A 12px font becomes 14px. A 6px gap becomes 8px. A border radius of 6 becomes 8 because MUI multiplies by 4 and the AI doesn't know that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figment reads Figma like a database.&lt;/strong&gt; It uses node IDs to extract exact values from the Figma API. No interpretation. No approximation. Then it resolves every deterministic value algorithmically before claude sees any data.&lt;/p&gt;

&lt;p&gt;That is the difference between "close enough" and "correct."&lt;/p&gt;

&lt;h2&gt;
  
  
  What this changed
&lt;/h2&gt;

&lt;p&gt;Before Figment, implementing a component took 4-5 engineer-days. After, the same work took less than a day, with tests included.&lt;/p&gt;

&lt;p&gt;The human effort shifted from production to judgment which is precisely where human effort belongs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A human translating a specification at four in the afternoon makes different choices than the same human on a Tuesday morning. Figment makes the same choices every time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;60 components. 3,077 tests. Zero raw hex values. 5 weeks. One source of truth.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built by &lt;a href="https://linkedin.com/in/amrutha-kollu" rel="noopener noreferrer"&gt;Amrutha Kollu&lt;/a&gt;, Software Engineer.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>designsystem</category>
      <category>react</category>
      <category>typescript</category>
      <category>figma</category>
    </item>
  </channel>
</rss>
