<?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: Karthikeyan Sridhar</title>
    <description>The latest articles on DEV Community by Karthikeyan Sridhar (@karthikeyan_sridhar_ecc11).</description>
    <link>https://dev.to/karthikeyan_sridhar_ecc11</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%2F3867867%2Fd52ef7f1-e866-4cd1-b6ce-4206e77b4b3d.jpg</url>
      <title>DEV Community: Karthikeyan Sridhar</title>
      <link>https://dev.to/karthikeyan_sridhar_ecc11</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karthikeyan_sridhar_ecc11"/>
    <language>en</language>
    <item>
      <title>My AI agent guesses Design tokens repeatedly. MCP doesn't fix it either!</title>
      <dc:creator>Karthikeyan Sridhar</dc:creator>
      <pubDate>Wed, 08 Apr 2026 13:32:28 +0000</pubDate>
      <link>https://dev.to/karthikeyan_sridhar_ecc11/my-ai-agent-guesses-design-tokens-repeatedly-mcp-doesnt-fix-it-either-570m</link>
      <guid>https://dev.to/karthikeyan_sridhar_ecc11/my-ai-agent-guesses-design-tokens-repeatedly-mcp-doesnt-fix-it-either-570m</guid>
      <description>&lt;p&gt;&lt;strong&gt;I tried everything.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sharing design as screenshots, descriptions, MCP connections so the agent reads Figma directly.&lt;/p&gt;

&lt;p&gt;Same result every time. Tokens hardcoded as hex values.&lt;br&gt;
Visually everything looked good, but tokens completely sat outside the design system!&lt;/p&gt;

&lt;p&gt;After a lot of trail and error, I found that token names and color values lived in two different places in Figma's data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reason:&lt;/strong&gt;&lt;br&gt;
Figma's API separates node structure from variable definitions intentionally. Both reside in separate files. Node data from /files/{key}/nodes, variable data from /files/{key}/variables. Clean architecture in theory. Painful in practice for anyone building on top of it, which ended up in hardcoded value referenced by agent in first look via .JSON.&lt;/p&gt;

&lt;p&gt;MCP gave agent access to the file. Not understanding of the design.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;What actually worked: A structured spec file.&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Button  91×40px
└─ Content (flex row) · justify-center · gap 8px · p 10px 16px
   ├─ Icon  20×20px · token: color/icon/on-primary
   └─ Label 14px SemiBold · token: color/text/on-primary

Tokens: color/background/primary, color/text/on-primary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;along with Tailwind v4 u/theme{} block that injects token name before agent reads hexcode in .JSON file.&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@theme&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--color-background-primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;#6750A4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--spacing-button-py&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;         &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--spacing-button-px&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;         &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--radius-button&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;             &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Practically to generate this manually would take more time, that's were &lt;a href="https://www.figma.com/community/plugin/1612756059828219731" rel="noopener noreferrer"&gt;I built a figma plugin&lt;/a&gt; that could generate both these files per component which helped me to solve this design - development gap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q:&lt;/strong&gt; Curious to learn, is there anyone else hitting this with MCP workflows? How are you handling token fidelity?&lt;/p&gt;

&lt;h1&gt;
  
  
  figma #webdev #tailwindcss #AI
&lt;/h1&gt;

</description>
      <category>agents</category>
      <category>api</category>
      <category>design</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
