Problem
The default token architecture is a chain: primitive to semantic to component. It looks tidy in diagrams. It collapses under theme-switching because the runtime can't unwind the indirection at the component layer.
What I did
Diagnosed the failure at the architecture layer, not the implementation layer. FORK: primitives are the foundation. Semantic and component both reference primitives directly. They never reference each other.
How AI was constrained
I embedded the FORK rule at the system-prompt level across all AI agents, so any violation gets flagged before output reaches production. The constraint travels with every spec, and AI doesn't get to decide whether to enforce it. The architecture makes violation impossible.
Where human judgment mattered
I diagnosed the failure pattern, not the AI, and the canonical documentation was mine. I embedded the FORK constraint into every spec's Token Contract section so violations get caught structurally rather than by hoping AI remembers the rule. AI executes the constraint, but the human designed it and enforces it.
Relevant detail
Applied across Button (dual semantic + component, FORK-correct), Data Table, Audit Log, and every spec going forward. Detach rate went from 40% to 0.3% across 8 products, with 94k+ tokens in production and 369 Figma files scanned bimonthly.
Detach Rate by Product (Before → After FORK)
Identified the failure at architecture layer. Chain indirection collapses under theme-switching. Not an implementation bug.
Primitives are foundation. Semantic and component both reference primitives directly. They never reference each other.
Constraint embedded in AI agent system prompts. Any violation flagged before output reaches production.
Resolved across Button, Data Table, Audit Log, and every spec going forward. 94k+ tokens in production. 369 Figma files scanned bimonthly.
Get in touch