Enterprise Design Token System
& AI Guardrails

Design Systems Architecture — W3C Tokens — Figma Plugin — AI Workflows

An end-to-end design systems architecture built to close the gap between Figma, frontend code, and AI-assisted development—combining a 3-tier W3C token taxonomy, Style Dictionary v4 build pipeline, custom TypeScript Figma audit plugin, and deterministic LLM coding guardrails.

Role
Design Systems Architect & Builder (Solo IC)
Timeline
2025 – 2026
Scope
Token Architecture, Governance Tooling, AI Guardrails
Stack
Figma Variables, TypeScript, Style Dictionary v4, Cursor, Claude
.01 / The Problem

Design systems rarely fail from a lack of components. They fail in the gap between Figma and code.

After four years scaling design system governance across 14 enterprise AIOps products at Broadcom, I saw the same structural bottlenecks repeat across large product organizations—now accelerated by teams adopting AI coding assistants.

01 / ARCHITECTURE

Flat tokens break under real-world complexity

Hardcoded hex values or single-layer Figma variables collapse the moment a product introduces dark mode, high-contrast accessibility modes, or multi-product theming.

02 / HANDOFF DRIFT

Manual specs go stale within a sprint

Engineers lose time inspecting raw Figma layers for padding, focus rings, and interactive states—while manually maintained redlines quickly drift from shipped components.

03 / AI CODE GENERATION

AI coding tools hallucinate off-system UI

Without explicit token constraints inside the repository, tools like Cursor and Claude Code default to raw hex codes and arbitrary spacing values that bypass the design system entirely.

04 / GOVERNANCE OVERHEAD

Manual policing doesn't scale

Design systems leads burn cycles auditing detached instances and inconsistent naming conventions by hand instead of solving higher-leverage product architecture problems.

.02 / System Architecture

Four Connected Layers: From Design Intent to Constrained Code

Rather than building another rigid 400-component UI kit, I designed and built the underlying governance infrastructure that keeps an existing multi-product system aligned across Figma, frontend repositories, and AI-assisted workflows.

1. 3-Tier W3C Token Taxonomy & Style Dictionary v4 Pipeline

Structured a canonical tokens.json architecture following the W3C Design Tokens format—separating Primitive (raw values), Semantic (contextual roles like surface, action, and focus), and Component tiers, mapped for Light/Dark modes and WCAG 2.2 AA contrast ratios. Paired with a Style Dictionary v4 build pipeline to compile a single source of truth into CSS custom properties and TypeScript constants.

tokens.json W3C Format • Primitive → Semantic → Component
{
  "color": {
    "primitive": {
      "cobalt": {
        "600": { "$type": "color", "$value": "#1d4ed8" }
      }
    },
    "semantic": {
      "action": {
        "primary": {
          "$value": "{color.primitive.cobalt.600}",
          "$extensions": { "wcagContrast": "6.7:1 AA" }
        }
      }
    },
    "component": {
      "button": {
        "bg-default": { "$value": "{color.semantic.action.primary}" }
      }
    }
  }
}

2. Custom TypeScript Figma Spec & Governance Plugin

Engineered a TypeScript Figma plugin to automate two repetitive design-ops tasks: wrapping core components (Button, Form Input, Modal) in standardized engineering handoff frames, and scanning Figma pages to flag detached instances, unbound color/spacing styles, and missing focus/state definitions before developer handoff.

figma-audit.log TypeScript Plugin • Automated Audit Output
$ figma-governance-audit --page="Core Components"

✓ [Button/Primary]    12/12 variables bound to semantic tier
✓ [Input/TextField]   Spec frame generated (states: 5)
✓ [Modal/Dialog]      Focus trap & elevation tokens valid
⚠ [Card/Pricing]      1 detached instance detected (node 418:92)
→ Exported governance report to /audit/brownfield-scorecard.json

3. Deterministic AI Coding Guardrails (.cursorrules & CLAUDE.md)

Created drop-in repository instruction files that bind AI coding assistants directly to the compiled semantic token dictionary. Instead of fixing off-brand AI-generated UI during PR review, the rules instruct agents to resolve tokens upfront and flag unbound styling before code is merged.

.cursorrules / CLAUDE.md LLM Guardrail Spec • Strict Token Enforcement
## Design System Token Rules (MANDATORY)
1. NEVER emit raw hex codes (#fff), rgb(), or arbitrary
   utility values (e.g., bg-[#1d4ed8], p-[13px]).
2. Query `dist/tokens.css` or `@ds/tokens` before writing UI.
3. Map all interactive surfaces to semantic tiers:
   - Surfaces  -> var(--ds-surface-canvas | elevated)
   - Actions   -> var(--ds-action-primary | subtle)
   - Focus     -> var(--ds-border-focus-ring) [3px offset]
4. Flag PRs containing unbound spacing or typography values.

4. Brownfield Governance & Contribution Framework

Documented practical adoption workflows—including a brownfield UI audit scorecard, token naming decision trees, and design-to-engineering PR review checklists—modeled on the realities of modernizing legacy enterprise suites rather than greenfield startups.

.03 / Key Architecture Decisions & Tradeoffs

Designing for Engineer Adoption, Not Theoretical Purity

  • Why 3 token tiers—and stopping there: Two-tier systems (primitive + semantic) break down when component-level overrides are needed across dense enterprise tables and modals, while four-plus tiers slow down onboarding. Capping the model at Primitive → Semantic → Component kept aliases traceable for both designers and frontend engineers.
  • Shifting governance upstream into IDE rules: Manual design reviews catch UI drift too late in the sprint. Encoding semantic token rules directly into .cursorrules and CLAUDE.md moves design standards into the developer's active workflow—reducing friction rather than adding another gate.
  • Infrastructure over a bloated component kit: Most mature product teams already have components in production; their pain is inconsistency, theming debt, and handoff drift. Anchoring on token pipelines, audit tooling, and reference spec templates makes the framework adaptable to brownfield codebases.

Live Technical Walkthrough Available

I'm happy to walk through the live Figma variable architecture, TypeScript plugin code, Style Dictionary build pipeline, and AI-assisted prototyping workflow during an interview.

Broadcom Enterprise UX

Go Back Home

See My Process