ZEROlobby
22/22 strict⌘Kvisitor
skip to main
ADR-035
skin
——:——:——zcovenant · audit
token graph· tokens.graph.json · 279 nodes · 20 categories · 11 edges

every token is a node; every reference is an edge

the brand publishes tokens.json as the source of truth. the build emits four artefacts: tokens.css, tokens.ts/js, dtcg.json (W3C DTCG v1.0), and tokens.graph.json — the explicit dependency graph. the graph captures every node (279 entries), every category (20 buckets), and every cross-reference (11 edges). it's the machine-readable answer to "what does this token mean and what does it depend on?"

00 · liveclick any node · see its value, swatch, and edges · the same payload an MCP client receives

walk the graph yourself

token graph · live· 279 nodes · 11 edges · 20 categories59 shown
nodes · colorclick a node · see neighbors and value
01 · schemazero.tokens.graph.v1 · two record types · pinned

the graph format · documented, then enforced

plate · A · node + edge shapecanonical
metric
token-graph
unit
nodes
window
static · build artifact
agg
count
source
packages/tokens/build/graph.mjs
fresh
2026-05-14T18:07:28.915Z
typefielddescription
nodeid dotted-path identifier · e.g. color.amber
type inferred kind · color · string · ref · number · …
value the literal value (hex, oklch, scalar, var() reference)
category top-level bucket from tokens.json
path array of segments before flattening · used for nested categories
edgefrom source node id · the referencing token
to target node id · the referenced token
kind relationship kind · today only css-var-ref
why a graph and not a flat list
a flat list answers "what tokens exist?" the graph also answers "what depends on amber?" and "if I change --font-mono, what re-renders?" downstream tools (Tokens Studio, Style Dictionary v4, custom inspectors) can walk the edges instead of re-parsing the source. the CI gate keeps node count drift inside ±5%.
02 · totalslive numbers from tokens.graph.json

counts that the build actually emitted

plate · B · nodesceiling 243
279
115% of the per-category budget total
plate · C · categoriescanonical 17–19
20
17 ADR-009 + 2 metadata buckets (version · license)
plate · D · edgescross-references
11
today: typography family aliases. growth is opt-in per ADR.
03 · categoriesper-category counts · sorted descending

where the tokens live

plate · E · category distribution20 buckets
metric
token-graph
unit
nodes
window
static · build artifact
agg
count
source
GRAPH.categories
fresh
2026-05-14T18:07:28.915Z
  1. color59
  2. material59
  3. motion20
  4. space19
  5. fontSize17
  6. opacity13
  7. z12
  8. radius10
  9. shadow10
  10. lineHeight9
  11. fontWeight9
  12. type7
  13. breakpoint7
  14. blur7
  15. letterSpacing6
  16. layout6
  17. hair4
  18. gradient3
  19. version1
  20. license1
04 · sample12 representative nodes · including the two brand colors

what a node looks like

plate · F · representative nodes6 of 279
metric
token-graph
unit
nodes
window
static · build artifact
agg
count
source
GRAPH.nodes filtered by id
fresh
2026-05-14T18:07:28.915Z
idtypevaluecategory
color.ink.0color#0a0907color
color.bone.1color#e2d7bbcolor
space.4dimension16space
lineHeight.bodystring1.55lineHeight
motion.breathdimension1200msmotion
breakpoint.mddimension768pxbreakpoint
05 · mcpzero://tokens/graph · the same graph is queryable by every coding agent

the graph is the brand's dependency contract

how this surfaces in the MCP server
@zero/mcp-server exposes zero://tokens/graphas a JSON resource. an agent reading it gets the same payload this page renders. the CI gate (scripts/check-token-graph.mjs) validates schema, drift bounds, and category coverage on every commit. the graph is non-decorative: it's how downstream tools discover the brand's dependencies without re-parsing source files.
plate · G · provenancelive
metric
token-graph
unit
nodes
window
static · build artifact
agg
count
source
packages/tokens/dist/tokens.graph.json
fresh
2026-05-14T18:07:28.915Z
fieldvalue
$schema zero.tokens.graph.v1
generatedAt 2026-05-14T18:07:28.915Z
source packages/tokens/tokens.json + skins/*.contract.json
version 1.0.0
file packages/tokens/dist/tokens.graph.json
graph livemcp-queryable◆ tg001a