Token consumers
KDS Token Consumers Registry
*ource of truth*for every Koder Stack component consuming design tokens emitted by
tools/design-gen→dist/tokens/+ livekds.koder.dev/api/v1/tokens.json.Opened: 2026
0524 (ticketmeta/docs/stack#130, kevolve designgen plan-only round)
Why this registry exists
The KDS tokens.json/tokens.* artifacts are consumed by multiple downstream components. Silent drift between a consumer's pinned version and KDS canonical risks:
- Compile failures when a token gets renamed/removed
- Visual regressions when a token's value shifts
- Cross-product inconsistency when one consumer is months behind
This registry tracks every consumer + their format + version pin so drift is visible.
Current consumers (20260524)
| Component | Format | Source | Version pin | Last sync | Owner |
|---|---|---|---|---|---|
engines/sdk/koder_kit |
Dart consts | dist/tokens/tokens.dart + lib/src/motion/motion_tokens.dart |
rolling-latest | 2026 |
KDS team |
engines/sdk/koder_web_kit |
CSS vars | dist/tokens/tokens.css (vendored into assets/css/) |
rolling-latest | 2026 |
KDS team |
engines/sdk/koder-design-lsp |
runtime fetch | kds.koder.dev/api/v1/tokens.json (24h TTL cache) |
runtime | n/a (live) | LSP team |
Figma sync (ticket #157) |
JSON export | dist/tokens/tokens.json |
snapshot per deploy | deploy-time | Figma sync owner |
dist/tokens/tokens.scss |
SCSS vars | direct copy | rolling | n/a (build artifact) | KDS team |
dist/tokens/tokens.kt |
Kotlin consts | direct copy | rolling | n/a (build artifact) | KDS team |
dist/tokens/tokens.swift |
Swift consts | direct copy | rolling | n/a (build artifact) | KDS team |
dist/tokens/tokens.d.ts |
TypeScript types | direct copy | rolling | n/a (build artifact) | KDS team |
Planned consumers (tickets open)
| Component | Format | Tracking ticket | Status |
|---|---|---|---|
| Rust components (kodec, klink, kdb-next admin UI) | dist/tokens/tokens.rs |
tools/design-gen#103 |
pending |
| AI agents (live query) | MCP tools/list_tokens |
tools/design-gen#117 |
pending (RFC needed) |
Adding a new consumer
When adding a new component that consumes KDS tokens:
- *ick the right format*— DartTSetc. for compiled languages;
live
/api/v1/tokens.jsonfor runtime introspection (LSPs, agents);tokens.jsonsnapshot for tools that need an immutable artifact per release (Figma sync pattern). - *hoose a pin model*
- *olling-latest*— consumer rebuilds against current
dist/tokens/on every CI run; cleanest for in-monorepo components - *napshot per deploy*— consumer pins to a specific commit's
tokens.json; needed for out
ofmonorepo or vendored consumers - *untime*— consumer fetches live from
kds.koder.dev/api/v1/with TTL cache; right model for LSPs, AI agents, dashboards
- *olling-latest*— consumer rebuilds against current
- *dd a row to this registry*with all 6 columns filled
- *ross-link*in your component's README and
koder.toml - If you need a format not yet emitted (e.g. Python), open a ticket
in
tools/design-gen#10Xrequesting the new exporter
Drift policy
- *olling consumers*— drift impossible; CI fails on rename/removal
- *napshot consumers*— pin should not exceed 30 days behind
canonical (alertsdashboard TBD per `toolsdesign-gen#108` companion)
- *untime consumers*— TTL ≤ 24h; cache-hit metrics tracked per
engines/sdk/koder-design-lsp#004
Related specs / tickets
meta/docs/stack/specs/themes/verge.kmd— token vocabularymeta/docs/stack/specs/themes/ui-style.kmd— preset variationstools/design-gen/internal/tokens/extract.go— emittermeta/docs/stack#129— KDS public API spec (covers/api/v1/tokens.json)tools/design-gen#103— Rust exportertools/design-gen#108— Cache-Control headerstools/design-gen#117— MCP server (alternative live query path)