Design Systems Overview
A design system in TF Design is a portable Markdown file (DESIGN.md), not a JSON theme. It defines the visual rules — colours, typography, components, layout — that the agent reads and applies when generating an artifact.
A bound design system does three things at once:
- It is injected as a system-prompt layer.
- It is written as a physical
DESIGN.mdin the agent's working directory, so the skill canReadit. - It replaces the direction picker — a bound system is the visual direction, so the agent stops asking.
The 9-section schema
Every DESIGN.md follows the same nine sections:
| # | Section | Description |
|---|---|---|
| 1 | Visual Theme & Atmosphere | Mood, aesthetic direction, inspirations |
| 2 | Color Palette & Roles | Primary, secondary, accent, neutral, semantic colours with usage rules |
| 3 | Typography Rules | Families, sizes, weights, line heights, letter spacing per text role |
| 4 | Component Stylings | Buttons, cards, inputs, modals, nav bars, recurring components |
| 5 | Layout Principles | Grid, spacing scale, container widths, alignment |
| 6 | Depth & Elevation | Shadows, borders, blur, layering |
| 7 | Do's and Don'ts | Positive and negative guidance to stay on-brand |
| 8 | Responsive Behavior | Breakpoints, mobile-first rules, adaptation |
| 9 | Agent Prompt Guide | Instructions the agent reads to interpret the system |
Two metadata lines are parsed from the file itself:
# Neutral Modern
> Category: Starter
> Surface: web
- The H1 becomes the picker label.
> Category:groups the picker.> Surface:(optional) is one ofweb|image|video|audio, defaulting toweb.- The first paragraph becomes the picker summary, and hex colours in the body become the swatch strip.
How a system reaches the agent
- Resolution — the daemon reads the id from project metadata (or a per-run override) across two registries: bundled
<resources>/brand-guidelines/and user-authored<dataDir>/brand-guidelines/. - Validation — an unknown id is a
400 UNKNOWN_DESIGN_SYSTEMnaming the catalogue route, not a silentnull. This is what makes--design-systemtrustworthy from a CLI. - Injection — the composer splices the body into the prompt above the craft rules, and writes the file into the project working directory.
- Application — switching the picker reloads the system; the next generation uses the new tokens.
Two registries, one store
| Registry | Path | Writable |
|---|---|---|
| Bundled | <resources>/brand-guidelines/ | No — replaced on update |
| User | <dataDir>/brand-guidelines/ | Yes |
User-authored systems get a user: id prefix. They survive app updates because the bundle is never written to. The same registry is served under two route names:
/api/design-systems— the current name/api/brand-guidelines— kept working for existing clients
design-systems is the directory that was renamed; projects.design_system_id still points at brand-guidelines. Both names address one store.
What a package contains
brand-guidelines/<slug>/
├── manifest.json # optional but validated when present
├── USAGE.md # optional agent-facing package guide
├── DESIGN.md # required: the 9-section rules
├── tokens.css # compiled CSS custom properties
├── components.html # optional standalone component fixture
├── components.manifest.json # optional rebuildable component cache
├── assets/ # images, logos, icons
├── fonts/ # webfont files
├── preview/ # static preview pages
└── source/ # importer evidence and snippets
A folder with only DESIGN.md still works. That is the legacy shape, and it keeps design systems cheap to author by hand.
Manifest
New or imported packages should ship manifest.json, validated against od-brand-guideline-project/v1:
{
"schemaVersion": "od-brand-guideline-project/v1",
"id": "my-brand",
"name": "My Brand",
"category": "Productivity & SaaS",
"description": "One line for the picker.",
"source": { "type": "bundled", "origin": "hand-authored" },
"files": {
"design": "DESIGN.md",
"tokens": "tokens.css",
"components": "components.html"
},
"importMode": "normalized",
"craft": {
"applies": [],
"suggested": ["color", "accessibility-baseline"],
"exemptions": []
}
}
| Field | Notes |
|---|---|
id | Folder slug, stable picker id, /^[a-z0-9-]+$/ |
source.type | bundled | local | github |
files.design | Fixed to DESIGN.md |
files.tokens | Required for manifest-bearing packages |
craft | Which craft rules apply, are suggested, or are exempted |
importMode | normalized | hybrid | verbatim |
Validation is enforced by pnpm guard for folders that ship a manifest; legacy DESIGN.md-only folders are skipped and keep working.
Craft rules
Beyond brand-specific systems, every artifact is measured against universal craft rules — brand-agnostic quality standards in craft/*.md:
| Craft rule | Covers |
|---|---|
typography | Font pairing, hierarchy, readability |
color | Colour theory, contrast, accessibility |
anti-ai-slop | The failure patterns — purple gradients, emoji icons, rounded-card-with-left-border-accent, hand-drawn SVG humans, Inter as a display face, invented metrics |
accessibility-baseline | Contrast, focus states, semantics |
animation-discipline | Motion that serves the interface |
form-validation | Input states and error handling |
rtl-and-bidi | Right-to-left layout correctness |
state-coverage | Empty, loading, error, and success states |
Skills opt in through frontmatter (od.craft.requires). The composer injects craft bodies between the design system and the skill body: brand tokens win on conflict, craft rules cover the rest.
Selecting a system
In the app
- Open the Brand Guidelines tab, or the design-system dropdown above the brief.
- Browse by category; each card previews swatches, summary, and surface.
- Select one — it becomes active for all subsequent generations.
From the CLI
tfdesign design-systems list
tfdesign design-systems show linear-app
tfdesign design-systems files linear-app
tfdesign run "Billing settings page" --design-system linear-app
Ids are exact. list prints the id, category, title, and whether the entry is editable.
Creating a custom system
Custom systems can be generated from a screenshot, a brand-guide PDF, a URL, or a text brief — or authored by hand. See Creating Custom Design Systems.
You can also create one directly:
tfdesign design-systems create \
--title "Acme Corp" \
--category "Productivity & SaaS" \
--body-file ./DESIGN.md
Or over MCP with create_design_system, update_design_system, and delete_design_system. Bundled ids are rejected for update and delete; delete_design_system requires confirm to repeat the id because deleting a brand spec is irreversible.