DESIGN.md — DNA-first design statements
DESIGN.md is an open Apache-2.0 spec from Google Labs, released alongside Stitch in April 2026. One markdown file at your repo root with a YAML frontmatter that carries design tokens — read by Stitch, Cursor, Claude Code, Lovable, v0, Bolt, and any AI agent that knows the format.
helixui follows the canonical schema and treats it as a deterministic projection of the 8-gene helixui DNA. Author your design system in 5 lines of DNA; helixui produces the full canonical document.
The DNA-first authoring path
Instead of hand-authoring 100+ token entries, write the genome:
---version: alphaname: Auroradescription: AI notebook for researchers.extensions: helixui: basePreset: wildtype # one of: wildtype | studio | botanic | solstice | noir mutations: - { gene: accent, value: violet } - { gene: density, value: compact } - { gene: lightness, value: dark }---
## OverviewAurora is …Run helixui-prompt design DESIGN.md. The parser:
- Reads the canonical fields (none here — that’s fine).
- Resolves
basePreset + mutationsinto an effective DNA. - Auto-expands every missing canonical block (
colors,typography,rounded,spacing,components) by runningexpress(dna). - Returns a fully-populated DESIGN.md object with
expanded: true.
Tools that don’t know helixui’s DNA shorthand can call helixui-prompt express DESIGN.md to get the long form.
How DNA maps onto canonical tokens
| Gene | What it multiplies / picks | Canonical block it drives |
|---|---|---|
accent | OKLCH hue (and chromaMax per hue) | colors.brand-50 … brand-900 |
chroma | global chroma multiplier (0.55 / 1.0 / 1.3) | every brand stop’s saturation |
lightness | light / dark / auto | semantic alias resolution ({colors.primary} → which stop) |
radius | factor on base (0.35 / 0.7 / 1.0 / 1.4 / 2.2) | rounded.sm/md/lg/xl |
density | factor on base (0.78 / 1.0 / 1.25) | spacing.1 … spacing.24 |
typography | family stack + scale (1.0 / 1.05 / 0.98) | typography.*.fontFamily + .fontSize |
surface | flat / elevated / glassy | shadow tokens (body section) |
motion | subtle / standard / lively | duration tokens (body section) |
accent: violet swaps every brand stop to violet OKLCH. density: compact shrinks every spacing token by 22%. radius: rounded makes `md` 11.20px instead of 8px. The math is deterministic and lossless.
Named presets
Run helixui-prompt presets for the full list. As of this version:
| Preset | accent | density | radius | typography | mood |
|---|---|---|---|---|---|
wildtype | blue | comfortable | standard | sans | The default — calm, blue, comfortable. |
studio | cyan | compact | subtle | grotesk | Compact, sharp, mono-feel for code-heavy interfaces. |
botanic | green | spacious | rounded | rounded | Soft, warm, organic — for content-first surfaces. |
solstice | orange | comfortable | rounded | sans | Warm, vibrant accent for marketing or playful apps. |
noir | crimson | compact | sharp | grotesk | Dark, sharp, crimson — for tools you live in. |
CLI reference
# scaffold a project DESIGN.md (DNA-first body, hand-tunable)npx helixui-prompt init-design [DESIGN.md] --preset=wildtype --name="My App"
# express DNA into a complete canonical DESIGN.mdnpx helixui-prompt express DESIGN.md --preset=noir --gene=accent --to=violet
# apply additional mutations to an existing DESIGN.mdnpx helixui-prompt mutate DESIGN.md --gene=density --to=spacious > new-DESIGN.md
# parse + validate (canonical + helixui extensions, with consistency check)npx helixui-prompt design DESIGN.md --pretty
# show DNA-vs-canonical disagreements (where the file overrides DNA)npx helixui-prompt diff DESIGN.md --pretty
# list named presetsnpx helixui-prompt presetsAuto-expansion
If your DESIGN.md has DNA but is missing canonical blocks, the parser fills them in:
extensions: helixui: basePreset: noir # accent=crimson, lightness=dark, density=compact, radius=sharp, …The result has colors.brand-500: oklch(56% 0.16 18) (crimson), spacing.4: 12.48px (compact), rounded.md: 2.80px (sharp) — all derived. You can override individual values; the consistency check warns when an override drifts from the DNA.
Consistency checking
When both DNA and canonical blocks are present, helixui-prompt compares the semantic aliases:
colors: primary: "#ff0000" # ← hand-authored overrideextensions: helixui: basePreset: wildtype # implies primary = {colors.brand-500} (blue)warning: DNA disagreement at colors.primary: file has "#ff0000", DNA implies "{colors.brand-500}"This is a warning, not an error — overrides are sometimes intentional (a brand demands an exact hex). Use helixui-prompt diff to see all disagreements at once.
Programmatic API
import { expressDesignMd, // DNA shorthand → full canonical markdown parseDesignMd, // canonical + extensions → normalized object resolveDna, // basePreset + mutations → effective DNA expressForDesignMd, // effective DNA → canonical token blocks (object) DNA_PRESETS, // named presets} from '@helixui/prompt';
const md = expressDesignMd({ name: 'Aurora', basePreset: 'wildtype', mutations: [{ gene: 'accent', value: 'violet' }],});
const parsed = await parseDesignMd(md);// parsed.colors['brand-500'] → 'oklch(56% 0.20 280)' (violet hue)// parsed.effectiveDna.accent → 'violet'// parsed.expanded → false (canonical blocks were authored, not expanded)Why DNA-first
Hand-authoring tokens for every project means rebuilding what helixui already knows. The 8 genes compress the design space into ~10⁴ unique combinations, every one of which is internally consistent (a compact density auto-shrinks every spacing token; a dark lightness auto-swaps every alias). DESIGN.md gives you the canonical, tool-portable surface; DNA gives you the compression of that surface to its meaningful axes.
A 5-line DESIGN.md becomes a 100-line canonical document on demand. Editing one gene re-derives the whole frontmatter consistently. Tools that read canonical-only see a normal DESIGN.md; helixui-aware tools see the genome.
References
- Canonical spec: https://github.com/google-labs-code/design.md
- helixui’s own DESIGN.md (DNA-first wildtype expression):
/DESIGN.md - DNA implementation:
packages/dna/src/(TypeScript) andpackages/prompt/src/dna-express.js(JS port for DESIGN.md tooling) - Catalog of community DESIGN.md files: https://github.com/VoltAgent/awesome-design-md