<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[FigSpecs]]></title><description><![CDATA[FigSpecs generates component specs, anatomy diagrams, accessibility audits, Tailwind v4 @theme blocks, JSON, CSS, and a component.rules.md file your AI agent can read directly — all from a single Figma component. No copy-paste. No manual docs.]]></description><link>https://designtocodehashnodedev.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/69d65b20707c1ce7683b42be/3a7e2cdc-7dc4-4234-952d-1985a6b42849.png</url><title>FigSpecs</title><link>https://designtocodehashnodedev.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 20 Sep 2026 22:37:41 GMT</lastBuildDate><atom:link href="https://designtocodehashnodedev.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Your AI agent can't read your design tokens? That's a real handoff problem!]]></title><description><![CDATA[I’ve tried every way to get an AI agent to implement a Figma component correctly.
Screenshots. Descriptions. Figma links. MCP connections that give the agent direct file access.
Same result every time]]></description><link>https://designtocodehashnodedev.hashnode.dev/your-ai-agent-can-t-read-your-design-tokens-that-s-a-real-handoff-problem</link><guid isPermaLink="true">https://designtocodehashnodedev.hashnode.dev/your-ai-agent-can-t-read-your-design-tokens-that-s-a-real-handoff-problem</guid><category><![CDATA[figma]]></category><category><![CDATA[Design Systems]]></category><category><![CDATA[AI]]></category><category><![CDATA[Best Figma Plugins]]></category><category><![CDATA[Tailwind CSS]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[figma plugin]]></category><category><![CDATA[mcp]]></category><category><![CDATA[claude.ai]]></category><dc:creator><![CDATA[Karthikeyan Sridhar]]></dc:creator><pubDate>Wed, 08 Apr 2026 14:38:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69d65b20707c1ce7683b42be/bf0be3ce-dcd6-4f4b-a620-83839862abb6.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>I’ve tried every way to get an AI agent to implement a Figma component correctly.</strong></p>
<p>Screenshots. Descriptions. Figma links. MCP connections that give the agent direct file access.</p>
<p>Same result every time. Layout approximately right. Spacing close. Colors in the ballpark. <strong>But tokens hardcoded as hex values.</strong> <strong>Padding as magic numbers.</strong> A component that works visually but sits completely outside the design system.</p>
<blockquote>
<p>I kept blaming the model. The model was never the problem.</p>
</blockquote>
<h3>What’s actually happening:</h3>
<p><em><strong>When you share a screenshot:</strong></em> The agent is doing visual inference. <br />Intelligent guessing.</p>
<p><em><strong>When you write a description:</strong></em> You’re doing the translation manually, losing fidelity at every step.</p>
<p>**<em>When you connect via MCP, and this is the one that surprises people:</em><br />**Your agent gets the raw Figma node tree. Layer names, positions, properties. But token names would be missing and agent would read hexacode value. Layout intent isn’t surfaced cleanly with details. <strong>The agent reads raw JSON and guesses</strong>.</p>
<h3><strong>What it means technically:</strong></h3>
<p>When Figma exposes a node via MCP or the REST API, the data looks something like this:</p>
<pre><code class="language-json">{
  "name": "Button",
  "fills": [
    {
      "type": "SOLID",
      "color": { "r": 0.404, "g": 0.314, "b": 0.643 },
      "boundVariables": {
        "color": {
          "type": "VARIABLE_ALIAS",
          "id": "VariableID:123:456"
        }
      }
    }
  ]
}
</code></pre>
<h3><strong>Notice what’s missing</strong></h3>
<p>The token name <code>color/background/primary</code> isn't in this object. What's there is a <strong>variable ID. A</strong> reference pointer like <code>VariableID:123:456</code>. To get the actual token name, agent have to make a second API call to resolve that ID against the file's variable collection.</p>
<p>An AI agent reading this raw JSON sees:</p>
<ul>
<li><p>A fill color: <code>r: 0.404, g: 0.314, b: 0.643</code> converts to <code>#6750A4</code></p>
</li>
<li><p>A variable reference ID doesn’t automatically resolve</p>
</li>
</ul>
<p><strong>So it uses the hex value. Because that’s what is immediately readable.</strong></p>
<blockquote>
<p>MCP gives your agent <em>access</em> to the file. Not <em>understanding</em> of the design. The gap isn’t the model. It’s the input format.</p>
</blockquote>
<h3><strong>What the agent actually needs:</strong></h3>
<blockquote>
<p>Not a screenshot. Not a description. Not a raw node tree.</p>
</blockquote>
<p>A structured, semantic spec file. Where every piece of information the agent needs is explicit, labelled, and machine-readable.</p>
<p>Here’s what that looks like in practice. This is the <a href="http://component.rules.md"><code>component.rules.md</code></a> FigSpecs generates directly from a Figma component:</p>
<pre><code class="language-markdown">## Component Structure
&gt; Hierarchical layout annotation

### Button  `91 × 40px`

- **Content** (flex row) · justify-center · items-center
  · gap 8px · padding 10px 16px · rounded 20px · `fill × fixed`
  - **Icon** (icon) · `20 × 20px`
    · tokens: color/icon/on-primary
  - **Label** (text) · 14px SemiBold
    · color: color/text/on-primary

## Design Tokens
- `color/background/primary`
- `color/text/on-primary`
- `color/icon/on-primary`

## Accessibility Requirements
- [ ] Touch target 44×44px minimum
- [ ] aria-label="Button" · role="button"
- [ ] VoiceOver: "Button, button"
</code></pre>
<h3>Notice what's here:</h3>
<p>Token paths, not hex values. color/background/primary carries semantic meaning. #6750A4 carries none. Your agent can't know if that hex is a brand color, a state, or a one-off. The token name tells it exactly what the value represents.</p>
<ol>
<li><p>Layout intent, not coordinates. flex row · justify-center · items-center · gap 8px is implementable. A screenshot of a button is a puzzle.</p>
</li>
<li><p>Sizing mode. Whether a layer is fixed, hug, or fill changes how a component behaves in a real layout. A screenshot only shows the static result.</p>
</li>
<li><p>Accessibility baked in. ARIA roles, Voiceover announcements, touch targets - your agent implements these correctly by default instead of skipping them entirely. Drop this file into your Cursor, Claude Code, Lovable, or v0 session. The first-pass component quality changes immediately 🏆.</p>
</li>
</ol>
<h3><strong>Plus a Tailwind v4 @theme {} block</strong></h3>
<p>This is for building the component — the actual CSS variables ready to use in code. It answers <em>“what values do I use?”</em> Your developer drops this into the project and starts executing.</p>
<pre><code class="language-css">@theme {
  /* Colors &amp; Tokens */
  --color-background-primary:     /* resolve: color/background/primary */;
  --color-text-on-primary:        #FFFFFF;
  --color-icon-on-primary:        #FFFFFF;

  /* Spacing */
  --spacing-button-content-py:    10px;
  --spacing-button-content-px:    16px;
  --spacing-button-content-gap:   8px;

  /* Border Radius */
  --radius-button-content:        20px;

  /* Typography */
  --text-button-label:            14px;
  --font-weight-button-label:     600;
}
</code></pre>
<h3>👋Quick context:</h3>
<p><a href="http://component.rules.md"><code>component.rules.md</code></a> is the <strong>blueprint</strong> — it tells agent what to build &amp; why.</p>
<p><code>tailwind-v4.css</code> is the <strong>materials list</strong> — it gives the developer the exact values to build with.</p>
<p><strong>One without the other leaves a gap</strong>. The blueprint without materials still requires manual value lookup. The materials without the blueprint gives you values with no context on how to use them.</p>
<p>Together they give your AI agent everything it needs to go from Figma component to working code in one pass.</p>
<h3>The bottleneck was never the model</h3>
<p>We’d been treating the AI as the problem. <strong>The actual bottleneck was upstream</strong> at the point where design information gets converted into something an agent can reason about.</p>
<p>The data exists in Figma. Tokens are a solved problem. The gap is the pipeline between them.</p>
<p>I used <a href="https://www.figma.com/community/plugin/1612756059828219731/figspecs"><strong>FigSpecs — A figma plugin</strong></a> that helped me create <a href="http://component.rules.md"><strong>component.rules.md</strong></a> &amp; <strong>Tailwind v4.css</strong> files that acted as pipeline giving AI Agent a better context.</p>
<p>If you prefer to try out: <a href="https://www.figma.com/community/plugin/1612756059828219731/figspecs">Here’s link</a>.</p>
<hr />
<p><em><strong>Q</strong></em><em>: Using MCP or AI-assisted workflows for component development? <br />What’s your current input format? Have you found something that gets token fidelity right on the first pass? or what do you think about my approach? <br />Curious to know</em> 🤞</p>
]]></content:encoded></item></channel></rss>