Field Notes
Constraints

Constraints & Rules

Guardrails for working with the token system.

Core Rules

RuleRationale
Never invent token names — use existing tokensMaintains traceability to the design system source
Never hardcode color/spacing valuesBreaks theming and consistency
Use semantic tokens in components, not primitivesPrimitives bypass theme switching
Primitives only when defining new semanticsSemantics reference primitives via var()
Import primitives before semantics in CSSSemantics depend on primitive var() declarations
Never edit auto-generated token filesOverwritten on next build; use extension files for manual tokens

Component Development

  • All values from CSS custom properties — no hardcoded values
  • Token resolution via a resolver service for dimensional variation
  • Semantic tokens only in component styles

Composition Rules

See Composition Checklist for the full decision framework.

Key guardrails:

  1. Sentiment is content-driven — confirm intent before assigning
  2. Emphasis reflects criticality — not aesthetics
  3. Only declared sentiments are valid
  4. State is never set manually
  5. Sentiment flows down; emphasis does not
  6. Never set emphasis on a container

On this page