Get started

Brand guidelines as code: structure authority, outputs, and verification

Brand guidelines become code when versioned decisions connect to traceable delivery artifacts and verified consumers. A PDF in a repository, an agent skill, or a token export can help, but none proves that the intended system reached an interface. In practice, you need to separate authority, outputs, application behavior, and observations, then record how each decision moves through them.

Updated November 5, 2026

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.

Separate four kinds of authority

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.

LayerOwnsDoes not prove
Brand strategy and voiceBrand strategy and voicePositioning, audience, verbal principles, exclusions, and strategic decision rules.That a visual token, component, or product implements those decisions.
Portable visual systemPortable visual systemSemantic 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 artifactsGenerated delivery artifactsRepresentations 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 stateApplication behavior and runtime stateComponent structure, supported states, responsive behavior, permissions, content rules, and product-specific exceptions.That upstream identity decisions were delivered or mapped correctly.
The four authority layers and their proof boundaries

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-change
A vendor-neutral manifest for tracing approved decisions into outputs and named consumers.

The 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.

ArtifactPut hereKeep elsewhere
Brand strategy recordBrand strategy recordPositioning, audience, voice, strategic exclusions, approvers, and rationale.Exact interface values and component runtime behavior.
DESIGN.mdDESIGN.mdVisual intent, composition, selection guidance, motifs, usage rules, and prohibitions.Canonical reusable values when a structured source already owns them.
DTCG or portable tokensDTCG or portable tokensTyped reusable values, aliases, semantic roles, and portable mode data.Narrative rationale, application policy, and unsupported guesses.
Tailwind or shadcn mappingTailwind or shadcn mappingFramework-facing names, variables, aliases, and installation mappings.Upstream brand authority or product-specific behavior.
CSSCSSExecutable styling, selectors, environmental fallbacks, runtime variables, and cascade behavior.Strategic rationale and asset provenance.
Asset manifestAsset manifestFile identity, version, variants, usage restrictions, and replacement status.Component interaction rules.
Component contractComponent contractStructure, variants, states, content constraints, accessibility behavior, and supported overrides.Organization-wide positioning or unrelated product policy.
Application policyApplication policyPermissions, workflows, persistence, business rules, and product-specific behavior.Portable visual identity decisions.
Unresolved-decision recordUnresolved-decision recordMissing values, conflicting approvals, unsupported modes, owner, consequence, and next decision.A convenient fallback disguised as approval.
Artifact routing and proof boundaries

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 render

Ambient Sage's actual tokens — the same values its exports use.

Color tokensSemantic roles with HEX / HSL / CMYK

Color tokens

Ambient Sage
light · HEX · HSL · CMYK

Core

#F3F4EF

background

H 72 · C0, 0, 2, 4

#1A1C17

foreground

H 84 · C7, 0, 18, 89

#E5E6E0

card

H 70 · C0, 0, 3, 10

#ECEEE8

muted

H 80 · C1, 0, 3, 7

#D8D9D2

border

H 68.57 · C0, 0, 3, 15

Brand

#FEE951

primary

H 52.72 · C0, 8, 68, 0

#1A1C17

primary-fg

H 84 · C7, 0, 18, 89

#E5E6E0

secondary

H 70 · C0, 0, 3, 10

#F7E464

accent

H 52.24 · C0, 8, 60, 3

#FEE951

ring

H 52.72 · C0, 8, 68, 0

Semantic

#C0392B

destructive

H 5.64 · C0, 70, 78, 25

#FFFFFF

destructive-fg

H 0 · C0, 0, 0, 0

#2D7238

success

H 129.57 · C61, 0, 51, 55

#C97D12

warning

H 35.08 · C0, 38, 91, 21

#545651

muted-fg

H 84 · C2, 0, 6, 66

Charts

#FEE951

chart-1

H 52.72 · C0, 8, 68, 0

#4A8FD4

chart-2

H 210 · C65, 33, 0, 17

#6BBF8A

chart-3

H 142.14 · C44, 0, 28, 25

#E07498

chart-4

H 340 · C0, 48, 32, 12

#E8A24B

chart-5

H 33.25 · C0, 30, 68, 9

Type scaleHeading, body, and mono in the kit's fonts

Typography

Ambient Sage

Scale: compact-product

Density: balanced

Heading · Plus Jakarta Sans · 1.875rem

Ship beautiful product faster

Subheading · Plus Jakarta Sans · 1.375rem

A warm-sage neutral-surface mobile kit with a single vivid yellow accent, flat tonal cards, and oversized display numerals.

Body · Plus Jakarta Sans · 1rem

Ambient Sage uses a near-white warm-sage canvas (#f3f4ef) with card panels distinguished only by a tonal shift to #e5e6e0, never by shadows or borders. A single vivid yellow (#fee951) is the only saturated color and appears sparingly at component scale as orbs, button fills, and focus rings. Primary data values render as oversized bold hero numerals with a small superscript unit. Typography is a friendly rounded geometric (Plus Jakarta Sans) with no uppercase and no tight tracking, while JetBrains Mono is reserved for hex codes and technical strings. Generous rounding and luminance-only contrast give the whole system a calm, minimal feel.

Mono · JetBrains Mono · 0.8125rem

npx shadcn add ambientsage.json

Aa

Plus Jakarta Sans · Heading

400500600700

Aa

Plus Jakarta Sans · Body

400500600700

ABCDEFGHIJKLM NOPQRSTUVWXYZ

abcdefghijklmnopqrstuvwxyz

0123456789 & @ # % →

Radius & spacingCorner radius, elevation, and spacing steps

Tokens

Ambient Sage primitives
density: balanced

Radius scale

sm · 0.375rem
md · 0.75rem
lg · 1.25rem
xl · 1.75rem

Component radius

button
card
input

Elevation

level 1
level 2
level 3
level 4

Spacing · base 4px

1x
2x
3x
4x
6x
8x
Ambient Sage shows color roles, typography, and spacing as related system inputs without collapsing them into one artifact.

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. 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. 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. 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. 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. 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.

RouteUseful whenAcceptance still requires
MCP serverMCP serverAn agent needs discoverable, structured access across clients or sessions.Checking artifact identity, project mapping, component adoption, and the rendered result.
CLICLIInstallation should be explicit, local, reproducible, or scriptable.Checking what was written, which version was applied, and whether the project uses it.
RegistryRegistryA framework can install a known theme or component artifact through its native workflow.Checking the resolved item, local changes, mappings, and representative states.
Direct fileDirect fileA person or tool needs a portable artifact with little delivery machinery.Checking provenance, freshness, placement, references, and actual consumption.
Choose a delivery route by the consumer task

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: open
A partial record that keeps published source facts separate from uncollected consumer evidence.

The 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 render

Ambient Sage rendered from its real tokens across 3 surfaces.

WebsiteLanding page hero with nav, headline, and feature row.
AS
Ambient Sage
Sign in
Planning workspace
Keep every project moving

Plan work and keep decisions visible to everyone.

JL
AK
MR
TS

Trusted by 15.1k builders

Plan without busywork

Go from zero to shipped in an afternoon, not a sprint.

Learn more

Keep decisions visible

SOC 2 controls and SSO are baked in from day one.

Learn more

Know what needs attention

Dashboards and insights your whole team can read.

Learn more
App dashboardProduct UI: sidebar, KPI cards, area chart, recent sales, and a transactions table.
Ambient SageOverview
Search anything⌘K
AS

Analytics

Revenue overview

See revenue and retention trends alongside account health.

Jan 1 to Jan 30, 2026
Overview
Analytics
Reports
Notifications

Active users

15.1k

2,491 new

+5%

MRR

$49.1k

Net of churn

+3%

Retention

89%

28-day window

+2%

NPS

69

1,204 replies

+3

Revenue

Last 12 months

$49.1k +18.2%

12m30d7d
JanFebMarAprMayJunJulAugSepOctNovDec

Acquisition

Goal completion

On track
78%of goal
Organic48%
Direct31%
Referral21%

Recent transactions

Latest activity across your workspace

View all
CustomerStatusDateAmount
AR

Alex Rivera

Founder & CEO

Paid2 min ago$1,999.00
MO

Mira Okonkwo

Head of Product

Pending1 hour ago$39.00
JF

Jonas Feld

Design Lead

Processing3 hours ago$299.00
Component sheetButtons, inputs, badges, controls — all shadcn, all themed.
Ambient Sage UI

Every shadcn component, themed by this kit.

Buttons

Badges

Default
Secondary
Outline
SuccessWarning

Avatar / chips

AS
minimalwarm-neutralflat

Form

Controls

Feedback

Onboarding72%

Ship beautiful product faster

A warm-sage neutral-surface mobile kit with a single vivid yellow accent, flat tonal cards, and oversized display numerals.

Tabs

AccountTeamBilling

Manage your account settings and preferences.

Alert

Heads up

Your trial ends in 7 days. Upgrade to keep access.

Tooltip

Add to library
Showing one kit across several surfaces illustrates system continuity. It remains a kit demonstration, not evidence about an unrelated consumer.

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.

StateQuestionAcceptable evidence
AvailableAvailableCan the source or route provide the required decision or artifact?Published source, schema, documented route, or inspected response.
DeliveredDeliveredDid the intended output reach the project at the recorded identity?File identity, package version, registry resolution, or retrieval record.
MappedMappedDoes the project connect the source role to the intended implementation property?Configuration, resolved aliases, generated output, or inspected mapping.
AdoptedAdoptedDoes the named component use that mapping without an unintended substitute?Component implementation, computed references, or a controlled fixture.
ObservedObservedUnder recorded conditions, did the expected visible and behavioral result occur?Rendered inspection, computed styles, interaction result, screenshot, or test record.
Evidence states from source to screen

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-change
A named-consumer record with expectations completed before observations.

When 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. 1

    Freeze one source revision

    Identify the approved source, owner, scope, modes, exclusions, and unresolved questions. Don't mix material from several revisions.

  2. 2

    Select identified outputs

    Record which DESIGN.md, token package, framework mapping, assets, or agent resource derive from that source.

  3. 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. 4

    Write the expected result

    State what should happen and how it will be inspected before running the check.

  5. 5

    Observe and classify the first divergence

    Record pass, revise, block, or approved exception, and assign the first mismatch to its owning layer.

  6. 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