Frontmatter & Structure
A DESIGN.md document pairs machine-readable YAML tokens with ordered Markdown prose sections in a single file. This page covers the document envelope and top-level metadata defined in the alpha specification. For the authoritative upstream spec, see the official specification .
Where YAML tokens live
The upstream DESIGN.md specification allows two YAML layers inside a document:
- YAML frontmatter — a block delimited by
---fences at the very top of the file, used for document metadata (version,name,description,omitted) and global token groups. - Interleaved YAML blocks — fenced
```yamlblocks placed directly inside the##section they describe, keeping tokens adjacent to their prose rationale.
In the upstream spec, all YAML blocks are merged into a single token tree, and each top-level key may be defined at most once across the entire file — defining colors in both frontmatter and a section block is an error.
DesignMD Pro’s browser Validator and theme code generators parse the top --- YAML frontmatter block directly. If you use DesignMD Pro’s validator or generators, keep all token groups (colors, typography, rounded, spacing, motion, components) in the top frontmatter block.
Top-level keys
| Key | Required | Contents |
|---|---|---|
version | No | Specification version string (current upstream spec: alpha, or semantic version when tracking document revisions) |
name | Yes | Name of the design system (must be a non-empty string) |
description | No | Concise summary of the design system’s visual character and target use |
omitted | No | List of standard prose sections intentionally omitted from the document, optionally with a reason |
colors | No | Color token map (hex, rgb(), oklch(), named CSS colors, color-mix(), or nested theme groups) |
typography | No | Type styles (fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, fontFeature, fontVariation) |
rounded | No | Border-radius dimensions (px, em, rem) |
spacing | No | Spacing dimensions or unitless numbers (column counts, ratios) |
motion | No | Purpose-named transitions (duration, delay, timingFunction) |
components | No | Component names mapped to style properties (backgroundColor, textColor, typography, rounded, padding, and size) |
Metadata fields
---
version: alpha
name: Studio Ledger
description: High-contrast editorial layout built on warm paper surfaces and crisp borders.
omitted:
- section: Motion & Micro-interaction
reason: Static marketing site with default browser transitions only.
---nameis the only strictly required key in DesignMD Pro’s storage validator (missing-nameis a blocking error).omittedaccepts either plain section names (- Motion & Micro-interaction) or{ section, reason }objects so reviewers and agents know a section was skipped deliberately rather than forgotten.
Structural validation rules
DesignMD Pro’s parser checks the frontmatter envelope before reading tokens:
| Issue code | Severity | Cause |
|---|---|---|
empty | Error | Document contains no non-whitespace characters |
missing-frontmatter | Error | File does not start with --- |
unclosed-frontmatter | Error | Opening --- has no matching closing \n--- |
invalid-yaml | Error | YAML syntax error inside the frontmatter block |
frontmatter-not-mapping | Error | Frontmatter evaluates to a scalar or array instead of key-value pairs |
missing-name | Error | name is missing or blank |
no-token-sections | Warning | None of colors, typography, rounded, spacing, motion, or components are present |
Run checks interactively in the Validator or read the full rule reference in Validator & Lint Rules.
Next steps
- Design Tokens — schema for
colors,typography,rounded,spacing,motion, and{token}references - Components — property rules, states, and external template references
- Prose Sections — the ten ordered
##Markdown sections