Documents

Machine-readable token data for tooling and AI agents, plus how the foundation stays in sync with Figma.

Endpoints

This site serves the resolved token data, not just the human pages:

  • /tokens.json — flat resolved manifest. Look a token up by name: tokens["Background/primary"].modes → value per mode, plus its cssVar.
  • /tokens.css — every token as a CSS custom property.
  • /graph.json — the raw Figma variable graph (ids, aliases, modes).
  • /unresolved.json — tokens whose aliases dead-end in an external library (flagged, never guessed).
  • /llms.txt — discovery + resolution instructions for agents.

For AI agents

Resolve a component's token by name against /tokens.json; use its cssVar in code, or the per-mode value. If a token is external: true or absent, flag it — never invent a value.

curl -s https://sj-foundation-docs.vercel.app/tokens.json \
  | jq '.tokens["Background/primary"].modes'
# { "Light": "#ffffff", "Dark": "#111111" }

Refreshing from Figma

When the 24K_Foundations Figma file changes, regenerate — this is not automatic:

pnpm tokens   # merge Figma chunks -> data/tokens.json -> regenerate CSS + manifest

Then review dist/unresolved.json, bump the @dtux/tokens version, and publish. Pushing to main redeploys this site and its endpoints.