Skip to content

Guidelines

guidelines.yaml records the rules whoever uses a component or a foundation must observe — never use a badge for a value that changes on screen, never style from a raw ramp step. Its audience is a consumer, not a builder; what a builder must implement is Supplemental’s subject.

An entry carries an obligation level and no schema gap, which is the reverse of a supplemental entry. That is why the two are separate documents rather than one shape with everything optional.

Rules only. At a foundation’s scope that means how tokens, themes and raw values are applied across the catalogue — never a table of what each individual token is for. A description is not a rule: it binds nobody, and thirty-six token descriptions sitting above eleven rules is the order nobody reads them in.

Where that per-token description belongs is not settled. No document kind carries it today, and the schema’s position is only that this one does not.

Relationship to DSDS

An entry is a guideline item as the Design System Documentation Specification (DSDS) 0.23.1 defines one. statement, level, checkedBy, checks, evidence, alternatives and refines are its field names, used as it defines them.

The document is not a DSDS document. DSDS requires kind and for on every section and this carries neither, so an exporter wraps a concern’s entries in a DSDS section rather than emitting the file as-is.

Two members depart from DSDS deliberately:

  • may is RFC 2119’s fifth level and absent from DSDS’s four. A permission recorded as should asserts an obligation the system does not hold.
  • instead carries a remedy no pointer can hold. An exporter appends it to statement rather than dropping it, so no consumer receives a prohibition without its fix.

Scopes

As with the supplemental document, the same shape is written at three scopes, and entries across scopes are additive rather than overriding.

ScopePath
One componentcomponents/<component>/guidelines.yaml
Every componentcomponents/guidelines.yaml
One foundationfoundations/<concern>/guidelines.yaml

Properties

PropertyTypeRequiredDescription
metaGuidelinesMetaNoAuthorship and review status for the document
concern keyGuidelineEntry[]NoOne list of rules per concern — see the two vocabularies below

Nothing else. useWhen and dontUseWhen are rejected — see Rules only above.

The section keys differ by scope

A foundation’s sections are a different vocabulary, not a subset of the component one. Six foundation concerns have no component counterpart, and nine component concerns say nothing about a value set — anatomy and slotComposition describe a thing with parts, which a foundation does not have.

ScopeSection keys
One component, every componentanatomy, props, styles, slotComposition, events, accessibility, behavior, motion, layout, overrides, naming
One foundationcolor, typography, layout, space, shape, elevation, motion, brand

A document uses one vocabulary or the other, never both, and the schema rejects a mix. Only layout and motion are in each — so they discriminate neither, and a document using only those two validates at either scope. The path is what finally says which scope a document is at.

GuidelineEntry

PropertyTypeRequiredDescription
statementstringYesThe rule, as a sentence a reader can act on
levelObligationLevelYesHow strongly it binds
alternativesGuidelineReference[]NoWhat to use instead, when the remedy is a thing this can point at
insteadstringNoWhat to do instead, when the remedy is a rule rather than a thing
refinesGuidelineReferenceNoA broader guideline this one elaborates
evidenceGuidelineReference[]NoSource material supporting the rule
checkedBy'automated' | 'assisted' | 'manual'NoHow this is checked
checksGuidelineReference[]NoWhat does the checking. Required when checkedBy is automated

A GuidelineReference carries either to, naming something inside the workspace, or href, naming something outside it — never both.

Prefer alternatives over instead whenever the remedy can be named. A pointer resolves and a validator can check it; a sentence cannot.

ObligationLevel

RFC 2119 semantics.

ValueMeaningOften written instead as
mustAn absolute requirement; a usage that disregards it is wrongrequired, always
shouldA strong recommendation; disregard it only with a considered reasonrecommended, prefer
should-notA strong recommendation against; do it only with a considered reasonavoid
must-notAn absolute prohibition; a usage that does it is wrongnever
mayA permission the system grants, and neither requires nor discouragesoptional, could

The right-hand column is why the five values are worth learning: the words an author reaches for naturally — always, never, avoid — are not five distinct strengths but five labels for these. Recording the level means a reader never has to infer strength from how emphatically a sentence was written.

Example

A foundation’s rules, which generalise over the whole catalogue rather than naming one token:

# foundations/color/guidelines.yaml — foundation concern keys
meta:
concern: color
status: proposed
updated: 2026-11-06
sources:
- analysis/foundations.yaml
color:
- statement: "Style any property from a `DE Palette/*` ramp step."
level: must-not
instead: "Style from the semantic token that aliases the ramp step."
- statement: "Pair an `Alert/<family>/Background` with that same family's `Element` for every text and glyph on it."
level: must
- statement: "Use `Text/Primary Inverse`, `Icon/Primary inverse` and `Line/Primary inverse` together on a dark or saturated surface."
level: may
elevation:
- statement: "Assemble an elevation shadow inline from the four shadow tokens — the library publishes no named effect style."
level: must

And a component’s, where a prohibition points at what to use instead:

components/badge/guidelines.yaml
meta:
concern: badge
status: ratified
slotComposition:
- statement: "Use a badge for a value that changes while on screen."
level: must-not
alternatives: [{ to: "liveRegion" }]
accessibility:
- statement: "Set accessibilityLabel on a badge whose slot holds no text child."
level: must
checkedBy: automated
checks: [{ to: "react/src/components/Badge/a11y.test.tsx" }]

See Also

  • Supplemental — the requirements whoever builds a component must implement
  • Component — the spec these sit beside
  • Specification — document kinds, and the rules a validator applies