Skip to main content

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:

  1. It is injected as a system-prompt layer.
  2. It is written as a physical DESIGN.md in the agent's working directory, so the skill can Read it.
  3. 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:

#SectionDescription
1Visual Theme & AtmosphereMood, aesthetic direction, inspirations
2Color Palette & RolesPrimary, secondary, accent, neutral, semantic colours with usage rules
3Typography RulesFamilies, sizes, weights, line heights, letter spacing per text role
4Component StylingsButtons, cards, inputs, modals, nav bars, recurring components
5Layout PrinciplesGrid, spacing scale, container widths, alignment
6Depth & ElevationShadows, borders, blur, layering
7Do's and Don'tsPositive and negative guidance to stay on-brand
8Responsive BehaviorBreakpoints, mobile-first rules, adaptation
9Agent Prompt GuideInstructions 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 of web | image | video | audio, defaulting to web.
  • The first paragraph becomes the picker summary, and hex colours in the body become the swatch strip.

How a system reaches the agent​

  1. 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/.
  2. Validation — an unknown id is a 400 UNKNOWN_DESIGN_SYSTEM naming the catalogue route, not a silent null. This is what makes --design-system trustworthy from a CLI.
  3. Injection — the composer splices the body into the prompt above the craft rules, and writes the file into the project working directory.
  4. Application — switching the picker reloads the system; the next generation uses the new tokens.

Two registries, one store​

RegistryPathWritable
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": []
}
}
FieldNotes
idFolder slug, stable picker id, /^[a-z0-9-]+$/
source.typebundled | local | github
files.designFixed to DESIGN.md
files.tokensRequired for manifest-bearing packages
craftWhich craft rules apply, are suggested, or are exempted
importModenormalized | 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 ruleCovers
typographyFont pairing, hierarchy, readability
colorColour theory, contrast, accessibility
anti-ai-slopThe failure patterns — purple gradients, emoji icons, rounded-card-with-left-border-accent, hand-drawn SVG humans, Inter as a display face, invented metrics
accessibility-baselineContrast, focus states, semantics
animation-disciplineMotion that serves the interface
form-validationInput states and error handling
rtl-and-bidiRight-to-left layout correctness
state-coverageEmpty, 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

  1. Open the Brand Guidelines tab, or the design-system dropdown above the brief.
  2. Browse by category; each card previews swatches, summary, and surface.
  3. 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.