The three collections
The Tina-DS Figma file contains three variable collections that map directly to the token tiers inpackages/tokens/src/.
How the collections cross-reference
The collections are not independent — they are wired together using Figma’sVARIABLE_ALIAS mechanism, which mirrors the {reference} syntax in your DTCG token files:
- Semantic variables point to Primitive variables.
action.primaryin the Semantic collection resolves tocolor.blue.6in the Primitives collection — the same reference written insemantic-light.json. - Component variables point to Semantic variables.
button.bg.defaultin the Components collection resolves toaction.primaryin the Semantic collection — the same reference written inbutton.json.
Switching modes
The Semantic collection has two modes: Light and Dark. Switch the collection’s mode in a Figma frame and every paint on every component inside that frame reflows — because every component variable traces back through a semantic variable, and the semantic variable resolves differently in each mode. You do not need to retheme individual components. Change the mode once at the frame level, and the entire screen updates.How component frames are bound
Every frame on the components board is bound to Component-tier variables. There are no hardcoded hex values anywhere in the file:- Hover state on a Button →
button/bg/hover - Focus ring on a Button →
button/border/focus - Background on a filled Badge →
badge/bg/success(for the success intent)
specs/<component>/tokens.json.
The spec board
Alongside the components board, the Figma file contains a spec board. The actual YAML frontmatter fromspecs/button/index.md sits next to a live Button component, with the agentic-spec validate output showing all five gates green. This is how the contract works: open the spec board, glance left at the YAML, glance right at the rendered component, and you know immediately whether they match.
Why this matters for drift detection
Figma and code use the same closed contract. Each Component-tier variable in Figma matches an entry inspecs/<component>/tokens.json. Each Semantic variable matches an entry in semantic-light.json or semantic-dark.json. Each Primitive variable matches an entry in primitives.json.
Because the mapping is explicit and mechanical, drift between Figma and code is something you can lint — not something you discover in a design review six weeks later.