brand-to-tokens
The brand→token derivation — the first consumer demand that closes the
ADR-061 §8 deferral. Takes a confirmed brand-identity
constraint set and produces a DTCG .tokens.json source of truth, then
hands it to the design-tokens toolchain to emit
CSS vars + Tailwind. The same .tokens.json is the export that pack-ai-image
brand-asset generation and the greenfield scaffold seed consume (B → A;
contract: brand-token-consumption).
Known contradiction — the filename this skill authors is not the one the resolver reads
Recorded, not resolved. This skill's prose says to author .tokens.json,
and the only resolver in the tree reads tokens.json — BRAND_TOKEN_PATHS
searches tokens.json, assets/tokens.json, resources/tokens.json and
agents/settings/brand/tokens.json , none of them
dot-prefixed. A consumer
following this skill literally therefore produces a file nothing loads.
The authoring name is a consumer-visible decision and is deliberately not
changed here. What closes the gap in the meantime is
agent-config brand:status, which reports which of the four paths holds a file
— and separately flags a dot-prefixed .tokens.json, which is exactly the file
a reader of this skill would plausibly have created.
Moved here from brand-source-of-truth
on 2026-09-09: it is a note about this skill, and its 6 lines in a standing rule
were paid for on every subagent spawn. The substitution funded that rule's
artifact-versus-brand pointer, per the council verdict on
blocker: standing-payload-headroom.
When to use
- A confirmed brand identity (colour story, type story, spacing) needs to become
a maintained token system.
- A consumer asks to "turn the brand into tokens / CSS variables / a theme."
- Before pack-ai-image brand-asset generation or a greenfield scaffold needs the
.tokens.json export.
Procedure
Take the confirmed brand-identity constraint set — colour story (roles +
values), type story (heading/body classes), spacing/radius intent. If a
consumer brand profile already registers values, those win
(brand-source-of-truth).
Author .tokens.json on the design-tokens 3-layer DTCG model
($value / $type): brand palette → primitive.color.*; brand roles
(primary, accent, surface, destructive) → semantic.color.* referencing the
primitives; per-widget needs → component.*. Add dark.semantic.* overrides.
Type tokens come from typography-system
stage-2 (archetype → pairing-filter), added under the typography section.
Generate CSS vars + Tailwind through the toolchain:
./scripts-run <skills-root>/design-tokens/scripts/tokens generate \
--config .tokens.json -o assets/design-tokens.css
./scripts-run <skills-root>/design-tokens/scripts/tokens generate \
--config .tokens.json --format tailwind
Validate — ./scripts-run <skills-root>/design-tokens/scripts/tokens validate --dir src/ until clean (exit 0 is the evidence); convert
hardcoded values to var(--token).
Export the deck templates — emit the locked-variable brand deck
templates from templates/ — marp-brand-deck.md.example
(copy to .md to use) and reveal-brand-deck.yaml — substituting the brand
variables from .tokens.json. No render engine is owned (decision 7); the
templates feed the user's own deck tool.
Publish .tokens.json as the source of truth other surfaces read
(pack-ai-image generation, greenfield scaffold) per the consumption contract.
Output format
.tokens.json — DTCG 3-layer (primitive → semantic → component) + dark.semantic + typography, every value {$value, $type}.
- Generated
design-tokens.css + the Tailwind theme.extend snippet.
validate evidence — exit 0, or the token_violation findings handed to polish.
- The exported brand deck templates (Marp + reveal) with brand variables locked from the tokens.
Gotcha
.tokens.json is the single source — never hand-edit the generated CSS or a
consumer-side copy. pack-ai-image generation and the greenfield scaffold read
this file; a hand-edited downstream copy silently drifts from the brand.
- Derive, do not invent. Every token traces to a brand-identity decision or
the consumer's existing brand; a value with no brand provenance is off-brand
(
brand-consistency will flag it).
- Deck templates lock brand variables — never inline a raw hex/font in a
template; reference the token so the deck stays on-brand when tokens change.
Do NOT
- Do NOT generate marks or assets here — this skill emits tokens + templates;
logo-generation / brand-asset-generation
generate the marks from the tokens (B → A, never inverted).
- Do NOT hand-edit generated CSS —
.tokens.json is the source.
- Do NOT let components reference primitives directly — semantic layer between.
- Do NOT own a slide-render engine — export validated templates only (decision 7).
See also
design-canon.md § Colour references — culturally-situated palettes + a11y-contrast grounding when deriving brand colour tokens.
brand-identity — supplies the constraint set this skill derives tokens from.
design-tokens — the DTCG toolchain that emits CSS/Tailwind from .tokens.json.
typography-system — brand-aware stage-2 supplies the type tokens.
brand-token-consumption — the read contract pack-ai-image and greenfield scaffold consume.
brand-consistency — validates emitted artifacts against this token source of truth.
1---2name: brand-to-tokens3description: Turn a confirmed brand identity into a DTCG .tokens.json source of truth — emit CSS vars + Tailwind via design-tokens, export locked brand deck templates.4---56# brand-to-tokens78> The brand→token derivation — the **first consumer demand** that closes the9> ADR-061 §8 deferral. Takes a confirmed [`brand-identity`](../brand-identity/SKILL.md)10> constraint set and produces a DTCG `.tokens.json` **source of truth**, then11> hands it to the [`design-tokens`](../design-tokens/SKILL.md) toolchain to emit12> CSS vars + Tailwind. The same `.tokens.json` is the export that pack-ai-image13> brand-asset generation and the greenfield scaffold seed consume (B → A;14> contract: [`brand-token-consumption`](../../../docs/contracts/brand-token-consumption.md)).1516## Known contradiction — the filename this skill authors is not the one the resolver reads1718**Recorded, not resolved.** This skill's prose says to author `.tokens.json`,19and the only resolver in the tree reads `tokens.json` — `BRAND_TOKEN_PATHS`20searches `tokens.json`, `assets/tokens.json`, `resources/tokens.json` and21`agents/settings/brand/tokens.json` <!-- ref-ignore -->, none of them22dot-prefixed. A consumer23following this skill literally therefore produces a file nothing loads.2425The authoring name is a consumer-visible decision and is deliberately not26changed here. What closes the gap in the meantime is27`agent-config brand:status`, which reports which of the four paths holds a file28— and separately flags a dot-prefixed `.tokens.json`, which is exactly the file29a reader of this skill would plausibly have created.3031Moved here from [`brand-source-of-truth`](../../rules/brand-source-of-truth.md)32on 2026-09-09: it is a note about this skill, and its 6 lines in a standing rule33were paid for on every subagent spawn. The substitution funded that rule's34artifact-versus-brand pointer, per the council verdict on35`blocker: standing-payload-headroom`.3637## When to use3839- A confirmed brand identity (colour story, type story, spacing) needs to become40 a maintained token system.41- A consumer asks to "turn the brand into tokens / CSS variables / a theme."42- Before pack-ai-image brand-asset generation or a greenfield scaffold needs the43 `.tokens.json` export.4445## Procedure46471. **Take the confirmed brand-identity constraint set** — colour story (roles +48 values), type story (heading/body classes), spacing/radius intent. If a49 consumer brand profile already registers values, those win50 ([`brand-source-of-truth`](../../rules/brand-source-of-truth.md)).512. **Author `.tokens.json`** on the `design-tokens` 3-layer DTCG model52 (`$value` / `$type`): brand palette → `primitive.color.*`; brand roles53 (primary, accent, surface, destructive) → `semantic.color.*` referencing the54 primitives; per-widget needs → `component.*`. Add `dark.semantic.*` overrides.55 Type tokens come from [`typography-system`](../typography-system/SKILL.md)56 stage-2 (archetype → pairing-filter), added under the `typography` section.573. **Generate** CSS vars + Tailwind through the toolchain:5859 ```bash60 ./scripts-run <skills-root>/design-tokens/scripts/tokens generate \61 --config .tokens.json -o assets/design-tokens.css62 ./scripts-run <skills-root>/design-tokens/scripts/tokens generate \63 --config .tokens.json --format tailwind64 ```65664. **Validate** — `./scripts-run <skills-root>/design-tokens/scripts/tokens67 validate --dir src/` until clean (exit 0 is the evidence); convert68 hardcoded values to `var(--token)`.695. **Export the deck templates** — emit the locked-variable brand deck70 templates from [`templates/`](templates/) — `marp-brand-deck.md.example`71 (copy to `.md` to use) and `reveal-brand-deck.yaml` — substituting the brand72 variables from `.tokens.json`. No render engine is owned (decision 7); the73 templates feed the user's own deck tool.746. **Publish `.tokens.json`** as the source of truth other surfaces read75 (pack-ai-image generation, greenfield scaffold) per the consumption contract.7677## Output format78791. `.tokens.json` — DTCG 3-layer (primitive → semantic → component) + `dark.semantic` + `typography`, every value `{$value, $type}`.802. Generated `design-tokens.css` + the Tailwind `theme.extend` snippet.813. `validate` evidence — exit 0, or the `token_violation` findings handed to polish.824. The exported brand deck templates (Marp + reveal) with brand variables locked from the tokens.8384## Gotcha8586- **`.tokens.json` is the single source — never hand-edit the generated CSS or a87 consumer-side copy.** pack-ai-image generation and the greenfield scaffold read88 this file; a hand-edited downstream copy silently drifts from the brand.89- **Derive, do not invent.** Every token traces to a brand-identity decision or90 the consumer's existing brand; a value with no brand provenance is off-brand91 ([`brand-consistency`](../../rules/brand-consistency.md) will flag it).92- Deck templates **lock** brand variables — never inline a raw hex/font in a93 template; reference the token so the deck stays on-brand when tokens change.9495## Do NOT9697- Do NOT generate marks or assets here — this skill emits tokens + templates;98 [`logo-generation`](../logo-generation/SKILL.md) / `brand-asset-generation`99 generate the marks from the tokens (B → A, never inverted).100- Do NOT hand-edit generated CSS — `.tokens.json` is the source.101- Do NOT let components reference primitives directly — semantic layer between.102- Do NOT own a slide-render engine — export validated templates only (decision 7).103104## See also105106- [`design-canon.md`](../../../docs/guidelines/design-canon.md) § Colour references — culturally-situated palettes + a11y-contrast grounding when deriving brand colour tokens.107- [`brand-identity`](../brand-identity/SKILL.md) — supplies the constraint set this skill derives tokens from.108- [`design-tokens`](../design-tokens/SKILL.md) — the DTCG toolchain that emits CSS/Tailwind from `.tokens.json`.109- [`typography-system`](../typography-system/SKILL.md) — brand-aware stage-2 supplies the type tokens.110- [`brand-token-consumption`](../../../docs/contracts/brand-token-consumption.md) — the read contract pack-ai-image and greenfield scaffold consume.111- [`brand-consistency`](../../rules/brand-consistency.md) — validates emitted artifacts against this token source of truth.