Field Notes
Approaches

Approaches

When to use the full layered architecture vs flat tokens.

Two Approaches

The token system can be implemented in two distinct ways:

ApproachLayersToken countBest for
Layered4 (Primitive → Semantic → Slot → Resolver)300+Enterprise, multi-brand, large teams
Flat1 (CSS custom properties)~50LLM-mediated, small teams, prototypes

Decision Guide

FactorLayeredFlat
Team sizeLarge, multiple contributorsSmall, or solo with AI
Theme switchingAutomatic via alias cascadeManual or AI-managed
DebuggingFollow alias chainsDirect value inspection
Build pipelineRequired (design tool → transform → CSS)None
Multi-brandSwap primitive layerDuplicate or runtime switch
LLM understandingNeeds context about layersReads values directly

The LLM Context Argument

Traditional design token layers evolved to encode relationships that machines couldn't understand. Each layer provides context about how a value should be used.

With LLM-mediated workflows, the LLM provides this context from naming and usage patterns. The intermediate layers become less necessary because:

  • "Change the brand color" → LLM knows which variables are brand-related
  • "Make buttons darker on hover" → LLM understands state relationships
  • The alias chain that encoded these relationships is now redundant

This doesn't make layered architecture wrong — it makes flat architecture viable in contexts where it wasn't before.

On this page