Case Study 04 / 05 · System Thinking · Design Engineering

FORK

The chain broke. The fork holds. 94k tokens in production.

Canonical · Enforced ongoing·Production canonical level·0.3% detach rate

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.

40% → 0.3%Detach rate reduction
94k+Tokens in production
369Figma files scanned

Detach Rate by Product (Before → After FORK)

Before
40%
After
0.3%
Products
8/8
Specs adopted
All new
Diagnosis

Identified the failure at architecture layer. Chain indirection collapses under theme-switching. Not an implementation bug.

FORK Architecture

Primitives are foundation. Semantic and component both reference primitives directly. They never reference each other.

AI Enforcement

Constraint embedded in AI agent system prompts. Any violation flagged before output reaches production.

Scale

Resolved across Button, Data Table, Audit Log, and every spec going forward. 94k+ tokens in production. 369 Figma files scanned bimonthly.

TokensArchitectureScaleFORK

Get in touch

For detailed case studies, reach out.

hello@tinasingh.app