Skip to content
Toolkit

3. Studio is the canonical design system; Cardsite consumes it

Date: 2026-08-01

Status

Accepted. Supersedes the implicit arrangement whereby web/DESIGN.md served as Cardsite's design specification.

Context

Cardsite carried its own design specification at web/DESIGN.md: 1,015 lines, headed version: alpha, name: Studio. It was a copy of the Studio design system taken at an early point and maintained separately thereafter. web/src/styles/tokens.css was a hand-transcription of that copy's token values.

The two diverged, silently, because nothing linked them:

ConcernCardsite forkStudio 1.1.0
Accent--primary, --on-primary--accent, --accent-ink
Surface--background, --background-edge--bg, --bg-edge
Ink--on-surface, --on-surface-2--text, --text-2
Border--outline, --outline-strong--border, --border-strong
Iconslucide-reactPhosphor
Class layernone (lk-* appeared twice repo-wide)lk-* throughout

Studio's values are generated from studio.tokens.json and validated by scripts/lint.mjs against its own written specification. The fork's values were typed by hand and validated by nothing. Improvements to Studio — new tokens, corrected contrast ratios, the dark theme rework — could not reach the application, and no build step or review would have reported that.

The audit (IMPLEMENTATION-AUDIT-R2) identified "Studio defines primitives but not flows" as a root cause. Validating that finding surfaced the larger one: the application was not consuming the design system at all. It was consuming a stale copy of one of its files.

Decision

Studio is vendored into this monorepo at studio/ and is canonical for tokens, components, layout, interaction patterns and voice. Cardsite consumes it as a workspace dependency.

  1. Token values live in studio/tokens/studio.tokens.json and nowhere else. apps/web/src/styles/tokens.css is a bridge: it imports the generated token file and declares one-directional aliases from the app's legacy names to Studio's. The alias block is a migration surface, not an API, and retires as call sites move.
  2. When Cardsite needs a component Studio lacks, it is designed, built and documented in studio/, then consumed. It is not built in the app "for now."
  3. CI fails when generated Studio output is stale relative to its sources. Regeneration is not optional and cannot be skipped quietly.

Consequences

Good. One place to change a value. Improvements reach the app by default rather than by transcription. Studio's own linter now covers what the app renders. The forked specification is archived rather than maintained, so there is no second document to disagree with the first.

Costs. The app still carries roughly 4,600 lines of its own component CSS beside Studio's; only the resource layer is imported today. Convergence is incremental and tracked in ROADMAP.md. Until it completes, two component vocabularies coexist — which is a smaller problem than two token vocabularies, but is a real one.

Rejected: publishing Studio to a registry and depending on a version. It would decouple the release cycles, but the fork happened because Studio was a separate artifact that had to be pulled deliberately. Vendoring makes drift visible in a diff. Revisit when a second product consumes Studio.

Source: docs/decisions/0003-studio-as-canonical-design-system.md

Library