Brand guidelines as code are more than guidelines in Git
A conventional brand guide explains how a brand should appear and communicate. Storing it in a repository adds history, review, and distribution, but doesn't make every statement precise enough for software or coding agents. A rule such as "use the accent sparingly" still needs a scope, semantic role, and intended consumer before an implementation can apply it consistently.
A token file solves a different problem. It can hold exact values, but it can't explain every compositional rule, prohibited treatment, asset restriction, or product behavior. A valid export proves that structured data exists. It doesn't prove that the current application loads it, maps it to the intended component property, or renders it correctly.
For every important decision, an operational brand-as-code system can answer five questions: What approved source established it? Which artifact carries it? Which project maps it? Which component or surface consumes it? What observation would show that it worked?
Do not appoint a source by convenience
DESIGN.md, a token file, generated CSS, and an agent skill may contain overlapping facts. Calling each one the source of truth leaves the team with several competing sources. Assign authority to each decision, then label the other representations as generated, mapped, or reviewed copies.
A workable system keeps four layers separate. They may live in one repository and share the same small maintenance team, but they answer different questions. One layer shouldn't inherit authority from another without an explicit rule.
| Layer | Owns | Does not prove | |
|---|---|---|---|
| Brand strategy and voice | Brand strategy and voice | Positioning, audience, verbal principles, exclusions, and strategic decision rules. | That a visual token, component, or product implements those decisions. |
| Portable visual system | Portable visual system | Semantic color roles, typography roles, spacing foundations, layout intent, motifs, assets, modes, and usage constraints. | That a framework mapping or rendered interface is current. |
| Generated delivery artifacts | Generated delivery artifacts | Representations such as DESIGN.md, DTCG, Tailwind mappings, shadcn registry items, CSS, and agent resources. | That an output is authoritative, installed, mapped, or adopted. |
| Application behavior and runtime state | Application behavior and runtime state | Component structure, supported states, responsive behavior, permissions, content rules, and product-specific exceptions. | That upstream identity decisions were delivered or mapped correctly. |
This separation tells you where to fix a mismatch. If an approved accent role is wrong, change the portable decision. If the source is right but the Tailwind output is stale, regenerate the output. If the project maps the right token to the wrong property, fix the mapping. When everything is correct until one component applies a local override, correct the component or record a bounded exception.
Inventory decisions before choosing formats
Start with the decisions the system must preserve, not the files you want to generate. Record provenance and approval alongside the visual content. Otherwise, an obsolete deck, a current kit, and an experimental screenshot can look equally authoritative to an agent.
- Source identity, revision, approval state, decision owner, implementation owner, scope, and exclusions.
- Semantic light and dark roles, including foreground relationships and interaction roles.
- Typography roles, approved families, available weights, fallbacks, and unresolved loading policy.
- Spacing foundations, layout rules, responsive conditions, density decisions, motifs, and deliberate exceptions.
- Logos, imagery, icons, asset identities, usage restrictions, and replacement rules.
- Component-specific states, application-owned behavior, open conflicts, missing decisions, and retest triggers.
Don't fill a field merely because a framework expects a value. A missing dark-mode decision differs from a dark-mode value intentionally matching light mode. The first is unresolved. Recording that distinction stops a developer, generator, or agent from turning personal preference into apparent brand policy.
Use explicit field states
Use a small vocabulary such as approved, conditional, unresolved, not applicable, and superseded. Empty strings and vague comments are hard to validate and easy to mistake for completed decisions.
Copy the brand-as-code manifest
This manifest is a control record, not another design-token format. It identifies authority, generated outputs, intended consumers, precedence, and verification. Keep exact reusable values in the appropriate token source instead of duplicating them throughout the record.
manifest_id: brand-system-main
manifest_revision: 1
status: approved
sources:
strategy:
id: brand-strategy
revision: 3
owner: brand-lead
governs: [positioning, voice, verbal-exclusions]
visual_system:
id: product-visual-system
revision: 7
owner: design-system-lead
governs:
- semantic-color-roles
- typography-roles
- spacing-foundations
- motifs
- asset-usage
scope:
products: [customer-web-app]
modes: [light, dark]
locales: [en]
excluded_surfaces: [transactional-email]
outputs:
- id: design-guidance
format: DESIGN.md
derived_from: [brand-strategy@3, product-visual-system@7]
identity: pending-build-hash
- id: portable-tokens
format: DTCG
derived_from: [product-visual-system@7]
identity: pending-build-hash
- id: web-theme
format: framework-mapping
derived_from: [portable-tokens]
identity: pending-build-hash
consumers:
- id: customer-web-app
owner: web-product-team
expected_outputs: [design-guidance, web-theme]
representative_cases:
- primary-action-default-light
- primary-action-focus-dark
- data-table-dense-light
precedence:
- current-approved-source-over-generated-output
- approved-scoped-exception-within-named-scope
- unresolved-when-approved-sources-conflict
unresolved:
- decision: font-loading-policy
owner: web-platform
blocks: [typography-acceptance]
verification:
status: not-run
first_divergence: unknown
acceptance_owner: product-design
retest_triggers:
- source-revision-change
- output-identity-change
- consumer-mapping-change
- component-contract-changeThe output entries need identities because a filename isn't enough. Contents can change while the path stays fixed. Use a version, immutable package identifier, content hash, or another reproducible identity, and record the source revisions that produced it.
An application may consume a generated token export without making that export the place where a person approves the original decision. If a team authors canonical values directly in a token file, place that file under sources with an owner, revision, scope, and approval state.
Inspect a complete public kit before writing your manifest
Ambient Sage shows how semantic modes, typography roles, written guidance, and delivery formats can belong to one identified kit while remaining separate artifacts. Inspect the system, then record your own sources and consumers.
Route each decision to the artifact that can carry it
Don't make every format repeat every fact. A consumer may require duplication, but the direction should be declared. One representation governs the decision; the others are generated, mapped, or reviewed against it.
| Artifact | Put here | Keep elsewhere | |
|---|---|---|---|
| Brand strategy record | Brand strategy record | Positioning, audience, voice, strategic exclusions, approvers, and rationale. | Exact interface values and component runtime behavior. |
| DESIGN.md | DESIGN.md | Visual intent, composition, selection guidance, motifs, usage rules, and prohibitions. | Canonical reusable values when a structured source already owns them. |
| DTCG or portable tokens | DTCG or portable tokens | Typed reusable values, aliases, semantic roles, and portable mode data. | Narrative rationale, application policy, and unsupported guesses. |
| Tailwind or shadcn mapping | Tailwind or shadcn mapping | Framework-facing names, variables, aliases, and installation mappings. | Upstream brand authority or product-specific behavior. |
| CSS | CSS | Executable styling, selectors, environmental fallbacks, runtime variables, and cascade behavior. | Strategic rationale and asset provenance. |
| Asset manifest | Asset manifest | File identity, version, variants, usage restrictions, and replacement status. | Component interaction rules. |
| Component contract | Component contract | Structure, variants, states, content constraints, accessibility behavior, and supported overrides. | Organization-wide positioning or unrelated product policy. |
| Application policy | Application policy | Permissions, workflows, persistence, business rules, and product-specific behavior. | Portable visual identity decisions. |
| Unresolved-decision record | Unresolved-decision record | Missing values, conflicting approvals, unsupported modes, owner, consequence, and next decision. | A convenient fallback disguised as approval. |
Consider a primary action. Brand or product strategy may establish its strategic importance. The semantic color relationship belongs in the portable visual system, and DTCG can carry the reusable role. Tailwind or shadcn maps that role into a project. The button contract owns hover, focus, disabled, and loading states, while the application decides whether the action is permitted. A rendered check records what happened in a named state.
Token specimen · real values
Ambient Sage
Live renderAmbient Sage's actual tokens — the same values its exports use.
Set conflict rules before artifacts disagree
Files will drift. Someone will edit generated CSS, a project will retain an old package, or a component will gain an urgent override. Decide what happens before the first conflict. Otherwise, the newest timestamp or loudest stakeholder can become the accidental rule.
- 1
Prefer the current approved source
When an approved decision conflicts with generated output, the source wins. Regenerate or correct the output unless an authorized owner changes the decision.
- 2
Honor an approved exception only within its scope
Name the consumer, decision, reason, owner, and review trigger. The exception must not silently become a portable rule.
- 3
Mark conflicts between approved sources unresolved
If two current approved sources disagree and no precedence exists, stop that mapping and route the conflict to the decision owner.
- 4
Reject unsupported inference as authority
A screenshot, existing component, agent output, or local override reveals behavior. It doesn't settle what the brand requires without owner approval.
- 5
Retest when a relevant identity changes
A source revision, output identity, framework mapping, component contract, or consumer exception can invalidate earlier evidence.
Identical values can have different meanings
Two roles may currently resolve to the same value and still need distinct names because they change for different reasons. Giving every component its own alias causes a different problem: unnecessary layers. Model change scope, not visual coincidence.
Keep delivery routes separate from authority
MCP, a CLI, a registry, and direct files determine how a consumer obtains an artifact. They don't decide which brand source is correct. Each route should return or install an identified output derived from an identified source revision.
| Route | Useful when | Acceptance still requires | |
|---|---|---|---|
| MCP server | MCP server | An agent needs discoverable, structured access across clients or sessions. | Checking artifact identity, project mapping, component adoption, and the rendered result. |
| CLI | CLI | Installation should be explicit, local, reproducible, or scriptable. | Checking what was written, which version was applied, and whether the project uses it. |
| Registry | Registry | A framework can install a known theme or component artifact through its native workflow. | Checking the resolved item, local changes, mappings, and representative states. |
| Direct file | Direct file | A person or tool needs a portable artifact with little delivery machinery. | Checking provenance, freshness, placement, references, and actual consumption. |
Hybrid delivery works only when both routes resolve to the same recorded authority and compatible output identities. If a CLI installs revision 7 while an agent retrieves revision 8 through MCP, that convenience has created a precedence problem. Align the versions or declare which route governs the installation.
Retrieval is one evidence state
An agent successfully reading a brand skill or DESIGN.md proves access. It doesn't show that generated code used the intended tokens, that the project loaded them, or that the browser rendered the expected result.
Use Ambient Sage as a bounded source record
Ambient Sage is a public Identity Forge kit with a recorded v1 revision. Its published page identifies Plus Jakarta Sans for heading and body roles, JetBrains Mono for the mono role, and semantic color roles across light and dark modes. It also exposes DESIGN.md and installation routes. These published facts make it useful as upstream intake for this method.
source:
id: identityforge-kit-ambient-sage
revision: 1
approval_state: published
evidence_scope:
- typography-roles
- semantic-light-and-dark-structure
- design-guidance-availability
- delivery-route-availability
verified_public_facts:
heading_role: Plus Jakarta Sans
body_role: Plus Jakarta Sans
mono_role: JetBrains Mono
semantic_modes: [light, dark]
outputs_or_routes:
design_md: available
cli: available
registry: available
mcp: available
consumer:
id: example-product
delivery_status: not-checked
mapping_status: not-checked
adoption_status: not-checked
rendered_observation: not-run
disposition: openThe record doesn't copy protected token values, generated CSS, or private kit content. Nor does it turn available routes into an implementation claim. The consumer fields remain open because no named external product was inspected for this example.
Kit showcase · live surfaces
Ambient Sage
Live renderAmbient Sage rendered from its real tokens across 3 surfaces.
Verify a named consumer in five evidence states
A single status such as "installed" hides the part of the chain most likely to fail. Track available, delivered, mapped, adopted, and observed separately. Each state answers a narrower question and needs different evidence.
| State | Question | Acceptable evidence | |
|---|---|---|---|
| Available | Available | Can the source or route provide the required decision or artifact? | Published source, schema, documented route, or inspected response. |
| Delivered | Delivered | Did the intended output reach the project at the recorded identity? | File identity, package version, registry resolution, or retrieval record. |
| Mapped | Mapped | Does the project connect the source role to the intended implementation property? | Configuration, resolved aliases, generated output, or inspected mapping. |
| Adopted | Adopted | Does the named component use that mapping without an unintended substitute? | Component implementation, computed references, or a controlled fixture. |
| Observed | Observed | Under recorded conditions, did the expected visible and behavioral result occur? | Rendered inspection, computed styles, interaction result, screenshot, or test record. |
Write the expected result before you observe it. Otherwise, a plausible interface can pass merely because it looks polished. Name the consumer, component, variant, state, mode, viewport, content condition, environment, expected role, expected behavior, and observation method.
record_id: customer-web-primary-action-focus-dark
source:
id: product-visual-system
revision: 7
decision: action-primary-focus
artifact:
expected_id: web-theme
expected_identity: release-2026-11-05
delivered_status: pass
project_mapping:
consumer: customer-web-app
role: action.primary.focus
destination: button-focus-style
mapping_status: pass
adoption:
component: PrimaryButton
variant: default
state: keyboard-focus
mode: dark
viewport: desktop
adoption_status: pending
observation:
expected: Uses the approved focus role and remains visibly distinct on the button surface.
method: computed-style-and-rendered-inspection
result: not-run
first_divergence: unknown
owner: web-product-team
disposition: open
retest_on:
- source-change
- theme-output-change
- button-contract-change
- dark-mode-policy-changeWhen a check fails, inspect the chain in order: source decision, artifact identity, project mapping, component contract, approved exceptions, consumer use, and rendered result. The first point where the evidence no longer matches the expectation identifies the layer that owns the correction.
A screenshot is not provenance
A screenshot shows what appeared under one condition. It doesn't identify the source revision, prove that a token was used, cover another mode, or establish that the result will survive the next generated output.
Run one controlled change before broad adoption
Don't begin by validating every decision across every product. Choose one decision that crosses the important layers, such as a semantic action role, typography role, or spacing rule used by a representative component. Record its source, output, mapping, consumer, and expected observation.
- 1
Freeze one source revision
Identify the approved source, owner, scope, modes, exclusions, and unresolved questions. Don't mix material from several revisions.
- 2
Select identified outputs
Record which DESIGN.md, token package, framework mapping, assets, or agent resource derive from that source.
- 3
Map one representative consumer
Choose a real project and component state that exercises the decision, including the difficult mode or interaction where relevant.
- 4
Write the expected result
State what should happen and how it will be inspected before running the check.
- 5
Observe and classify the first divergence
Record pass, revise, block, or approved exception, and assign the first mismatch to its owning layer.
- 6
Expand only after resolving the divergence
Reuse the working chain for more roles and consumers. Fix authority or precedence problems before generating more outputs.
This method doesn't replace broader brand strategy, generate an identity by itself, rank coding agents, or guarantee adoption. It gives you a reviewable path from an approved decision to a real interface, with a place to preserve uncertainty when evidence is missing.
Common questions about brand guidelines as code
Brand guidelines as code FAQ
Is a Markdown brand guide enough?
It can carry written intent and agent context, but it usually isn't enough for reusable exact values, framework mappings, asset identity, component behavior, and observed adoption. Pair it with the artifacts required by named consumers.
Should the token file be the source of truth?
It can govern reusable values and aliases if the team authors and approves those decisions there. It shouldn't automatically govern positioning, prose guidance, component structure, product behavior, or facts it can't represent.
Can an agent skill be the brand system?
A skill is a useful delivery and context artifact. It can carry rules, values, and instructions, but its presence doesn't prove that its source is current or that generated work adopted every rule.
What happens when DESIGN.md and tokens disagree?
Apply the declared precedence for that decision. Correct or regenerate the downstream representation. If two approved sources conflict without precedence, mark the decision unresolved and route it to the owner.
Does installing a shadcn theme or Tailwind mapping prove adoption?
No. Installation proves delivery at most. Check that the project resolves the intended artifact, maps its roles correctly, uses them in representative components, and renders the expected states in each required mode.
How much should a team verify first?
Start with one source revision, one meaningful decision, one named consumer, and one representative state. Expand after the complete chain works and the first divergence is resolved or accepted as a bounded exception.
Start with one identified system
Choose a published kit, record its source revision and outputs, then map one representative consumer without treating installation as acceptance.
Sources
- AI Brand Suite Brand Code | Upland Strategy: Upland presents brand strategy as identified, versioned documents with dependencies, decision rules, exclusions, and governance, providing a baseline for the strategy authority layer.
- brand-guidelines - Claude Code Skills - BuildWithClaude: The captured skill combines colors, typography, fallbacks, and application instructions in an agent resource, illustrating both the value and limits of an agent-facing artifact.
- Brand Guidelines Generator | Claude Code Skill - MCP Market: The captured workflow moves from source ingestion and guided discovery to a persistent SKILL.md, showing how several inputs can feed an agent-facing output.
- Ambient Sage Design Kit: The public Ambient Sage v1 page identifies its revision, semantic light and dark structure, typography roles, available outputs, and delivery routes used in the bounded example.
- DESIGN.md vs design tokens: choose authority and prevent drift: Identity Forge distinguishes written intent from reusable exact values and component behavior, and recommends assigning authority decision by decision.
- Brand guidelines to Tailwind CSS: map rules into code without losing context: The guide supports routing framework values, runtime CSS, assets, component behavior, guidance, exceptions, and unresolved decisions into separate layers.
- Brand guidelines to shadcn theme: map decisions to tokens and DESIGN.md: The guide supports source-first semantic mapping, explicit precedence, separate treatment of non-color rules, and verification in named consumers.
- Design system MCP server vs CLI: choose the right delivery route: The guide distinguishes design-system authority from MCP and CLI delivery routes and requires downstream artifact, mapping, adoption, and rendered checks.