AAgentic Design School
Module 2 of 6
40–50 minutes

Design Systems for Agents

DESIGN.md and Machine-Readable Systems

The system needs one document that an agent loads at the start of every session and a human can still read in ten minutes. This module covers what belongs in DESIGN.md, what belongs elsewhere, and how to keep it true.

Duration40–50 minutes

Slides13 slides with notes and narration

Learning objectives

  • Structure a DESIGN.md that covers identity, colour, type, spacing, components, and anti-patterns.
  • Decide what belongs in DESIGN.md versus instruction files, tokens, and skills.
  • Set up a review habit that keeps the document aligned with the actual codebase.
Slide deck

Work through the module

Each slide is shown in its 16:9 frame, exactly as it appears in the video version. Open the notes under any slide for the longer explanation, and the narration if you prefer to read along.

Slide 1 of 1316:9

DESIGN.md and Machine-Readable Systems

Design Systems for Agents · Module 2 of 6

  • One document, two audiences: the agent at session start, the human in ten minutes
  • What the document is: the contract, not the marketing site
  • The anatomy: from identity and colour to anti-patterns
  • Who owns what: DESIGN.md, CLAUDE.md, tokens, skills
  • Keeping it true when the code keeps moving

Module 1 made tokens carry intent. This module writes the document that tells an agent how all those tokens fit together.

Slide notes

Open by connecting back to Module 1. Tokens answer the question which value do I use here, but they cannot answer why this system looks the way it does, which component to reach for, or what the system refuses to do. That connective tissue is what DESIGN.md carries. Without it, an agent with a perfect token set still assembles those tokens into something generic.

Name the two audiences explicitly, because the document fails if it serves only one. The agent reads it at the start of every session — it has to be parseable, specific, and short enough to fit in context without crowding out the actual task. The human reads it when onboarding, reviewing, or arguing about a decision — it has to be skimmable in ten minutes and written in plain language, not a token dump. Most design system documentation today fails both tests: too long and too vague for the agent, too scattered across wiki pages for the human.

Set the scope of the module honestly. This is not a documentation-tooling module and it is not about publishing a public design system site. It is about one Markdown file in the repository, what goes in it, what stays out of it, and the habit that stops it from rotting.

Narration for this slide

Welcome back. In Module 1 we made tokens carry intent — the names themselves became instructions. But tokens alone cannot tell an agent why the system looks the way it does, which component to reuse, or what the system refuses to do. That job belongs to one document: DESIGN.md. This module is about that document. What it is, what goes in it, what deliberately stays out, and how you keep it true when the codebase keeps moving. The test is simple and double-sided: an agent should load it at the start of every session, and a human should still be able to read it in ten minutes. Let's start with what the document actually is.

Slide 2 of 1316:9

The contract, not the marketing site

DESIGN.md is the version of your design system written for execution, not persuasion.

  • It states decisions: exact values, named components, explicit rules
  • It lives in the repository, next to the code it governs
  • It is loaded by the agent before any design work starts
  • It is short — a working contract, not a brand book
  • If a rule is not in it, the agent will fill the gap with the most generic option

Public design system sites persuade humans. DESIGN.md instructs whoever — or whatever — is doing the work right now.

Slide notes

The distinction to land is between documentation that explains and documentation that governs. A public design system site exists to persuade and orient: principles, photography, long usage essays, brand storytelling. It is valuable, but an agent given that material extracts very little it can act on. DESIGN.md is the governing version: the decisions themselves, written so they can be applied without interpretation. Exact colour values mapped to semantic roles, the actual font stacks, the spacing scale, the names of the components that exist and the rules for using them.

Location matters as much as content. The document lives in the repository, version-controlled next to the code it describes. That is what makes it machine-readable in practice: the agent does not need a link, an export, or a vendor API — it reads the file the same way it reads any other file, and changes to it show up as diffs that go through review like everything else.

The last bullet is the behavioural argument from Module 1, restated for documents. Agents fill gaps with the centre of their training distribution. If your document does not say what the system does about radius, density, or empty states, the agent will produce the most common answer on the public web — competent, polished, and not yours. The contract exists to pre-empt that fallback, decision by decision.

Narration for this slide

First, what the document is. DESIGN.md is the contract version of your design system — written for execution, not persuasion. A public design system site explains and inspires; this file states decisions. Exact values, the components that exist, the rules for using them. It lives in the repository next to the code it governs, so the agent reads it the way it reads any other file, and changes to it are diffs you review. And here is the reason it has to be complete on the decisions that matter: anything you leave unsaid, the agent fills with the most generic option available. The contract exists to close those gaps before the work starts.

Slide 3 of 1316:9

This is now a convention, not an invention

Markdown design systems that agents read before generating UI have become an ecosystem pattern.

  • A nine-section DESIGN.md schema is in shared use across open-source design tooling
  • Public libraries ship dozens of well-known product systems in this format, as of mid-2026
  • Tools switch the active system and the next render uses the new rules immediately
  • The same idea appears as brand-spec files frozen for agents in HTML-canvas tools
  • Portable Markdown beats theme JSON: humans can read it, agents can apply it

You are not designing a bespoke format. You are adopting a convention that agents and tools already expect to find.

Slide notes

The point of this slide is to remove the am I inventing something weird hesitation. The pattern of a Markdown design system that an agent loads before generating anything is already an ecosystem convention. A nine-section schema — colour, typography, spacing, layout, components, motion, voice, brand, anti-patterns — circulates through open-source projects, and public libraries ship large collections of well-known product design systems expressed exactly this way, as of mid-2026. Keep the claim conservative: the specific counts and project names change quickly, so what matters is the direction, not the catalogue.

Two properties of the convention are worth calling out. First, switchability: tools built around these files can swap the active system and the very next generation respects the new rules, because the system is an input the agent reads rather than a theme baked into a template. Second, the insight that portable Markdown beats theme JSON for this job: a JSON theme carries values but not reasoning, usage rules, or refusals, and a human cannot skim it. Markdown carries all of it and stays diffable.

The same idea shows up under other names — brand-spec files frozen for agents in HTML-canvas tools, design-system sections inside skills. The names differ; the move is the same: write the system down once, in text, where the agent reads before it writes.

Narration for this slide

Before we open the document, one piece of context: this is a convention now, not something you would be inventing for your team. A nine-section Markdown schema for design systems circulates through open-source design tooling, and public libraries ship dozens of well-known product systems written exactly this way — as of mid-2026. Tools built on the pattern can switch the active system and the next render follows the new rules immediately, because the system is something the agent reads, not a theme baked into a template. The lesson is simple: portable Markdown beats theme JSON, because a human can read it and an agent can apply it. You are adopting a convention agents already expect.

Slide 4 of 1316:9

Anatomy: nine sections and what an agent does with each

Every section pairs a set of declarations with a behaviour you expect from the agent.

Grid of nine cards, one per section of a machine-readable DESIGN.md: colour, typography, spacing, layout, components, motion, voice, brand, and anti-patterns. Each card states what the section declares and what the agent does with it — for example, colour declares the palette and semantic roles and the agent maps every fill to a named token; components declares primitives and usage rules and the agent reuses existing components before building new ones; anti-patterns declares what the system refuses to do and the agent checks its own output against that list. Colour, typography, spacing, layout, and motion are marked as token-backed sections; components, voice, and brand as usage and asset sections; anti-patterns as the refusal list.
The nine-section schema in common use: colour, typography, spacing, layout, components, motion, voice, brand, and anti-patterns. Token-backed sections point at the variables from Module 1; usage and asset sections carry rules tokens cannot express; anti-patterns is the refusal list the agent checks its own output against.

Write each section as a declaration plus an expected behaviour. If you cannot say what the agent should do with a section, it probably belongs somewhere else.

Slide notes

Walk the grid by groups rather than card by card. The token-backed sections — colour, typography, spacing, layout, motion — should not duplicate the token files; they name the semantic roles, the scales, and the rules for choosing between them, and they point at where the tokens live. The agent behaviour for all of them is the same shape: choose from the named set, never invent a value. If Module 1 was done well, these sections are short.

The usage and asset sections carry what tokens cannot. Components lists the primitives and composites that exist, where they live, and the reuse-before-build rule — for an agent this is the single highest-leverage section, because the most common agent failure in a real codebase is rebuilding something that already exists. Voice covers tone and copy patterns, which matter because agents write a surprising amount of interface copy: labels, empty states, error messages. Brand freezes the assets — logo paths, imagery rules — so the agent references them rather than redrawing them.

Anti-patterns is deliberately drawn in ink as the refusal list; it gets its own slide next. Note that your own document does not have to use exactly nine headings — this school's adds identity, radius, shadows, and icons — but every heading should pass the same test: it declares something, and there is a behaviour you expect from the agent because of it. A section with no expected behaviour is prose that belongs on the public site, not in the contract.

Narration for this slide

Here is the anatomy. Nine sections, and the discipline is to write each one as a declaration plus an expected behaviour. The token-backed sections — colour, typography, spacing, layout, motion — name the semantic roles and the scales, and point at the tokens from Module 1; the agent's job there is to choose from the named set and never invent a value. The usage sections carry what tokens cannot: components and the reuse-before-build rule, voice for the copy agents end up writing, brand for the assets they must reference rather than redraw. And the ninth section, anti-patterns, is the refusal list. If you cannot say what an agent should do with a section, it probably does not belong in the contract.

Slide 5 of 1316:9

Specific enough to execute

The difference between a design principle and a machine-readable rule is the precision of the values.

  • Exact values, not adjectives: a hue, a stack, a scale, a pixel limit
  • Every token has a CSS-variable or code counterpart the agent can use
  • Component entries name the actual file path, not just the concept
  • Forbidden values are listed next to the allowed ones
DESIGN.md — excerpt of the schema pattern
## Color
- Primary: oklch(0.43 0.17 263)  — CTAs, active nav, system emphasis
- Background: oklch(0.97 0.018 86) — warm paper base
- Forbidden: pure black, saturated purple gradients

## Typography
- Display: Georgia, "Times New Roman", serif
- Body: Avenir Next, Avenir, "Segoe UI", sans-serif
- Scale: 12, 14, 16, 18, 20, 24, 30, 36, 48, 64, 80

## Components
- Button: variants from components/ui/button.tsx; min height 44px
- Card: flat, 2px border, 8px max radius, no nested cards

"Generous spacing and a warm palette" is a mood. A scale and a named hue are instructions.

Slide notes

This slide is about the writing standard inside each section. The recurring failure in design documentation is adjectives where values should be: generous spacing, a warm and approachable palette, clean typography. A human designer fills in those adjectives from taste and context; an agent fills them in from the average of the public web. The fix is mechanical: exact values with their semantic role attached, font stacks with fallbacks, a numeric scale, pixel limits where limits exist.

The excerpt shows three habits worth copying. First, every colour line carries both the value and the role — the agent needs the role to choose correctly, the human needs it to review. Second, component entries point at the actual file path. An agent told Button: primary and outline variants will often write a new button; an agent told the variants live in components/ui/button.tsx imports the existing one. Third, forbidden values sit next to allowed ones in the same section, so the constraint is visible at the moment of choice rather than buried at the end.

Also make the pairing with tokens explicit: every value in the document should have a CSS-variable or code counterpart, and the document should say where those live. DESIGN.md states the decision and the role; the token file is the runtime. When the two disagree, that is drift, and a later slide deals with it.

Narration for this slide

Inside each section, the standard is precision. The classic failure is documentation written in adjectives — generous spacing, warm palette, clean type. A human fills those in from taste; an agent fills them in from the average of the internet. So write values: the exact hue with its role next to it, the real font stacks, the numeric scale, the pixel limit on radius. Point component entries at the actual file path, because that is the difference between the agent importing your button and writing a new one. And keep the forbidden values in the same section as the allowed ones, so the constraint is visible at the moment of choice. A mood is not an instruction. A value with a role is.

Slide 6 of 1316:9

Anti-patterns are first-class content

What the system refuses to do shapes agent output as much as what it prescribes.

  • Agents default to the most common patterns on the web — your refusals are what pull them off that centre
  • Write refusals as concrete, checkable rules: no purple gradients, no nested cards, no hardcoded brand colours
  • Include the failure modes you have already corrected twice — they will recur
  • Refusals double as review criteria: the agent can check its own output against the list
  • Keep the list short and real; a fifty-line refusal list stops being read

Every recurring correction you make in review is a missing anti-pattern entry.

Slide notes

Most design documentation only says what to do. For agents, what not to do carries unusual weight, because the agent's default behaviour is to produce the centre of its training distribution: gradient hero bands, decorative blobs, card grids inside card grids, an invented call-to-action on every section. Those defaults are exactly what an anti-patterns section exists to block. This is the same anti-slop idea that appears across the ecosystem — never invent colours outside the system, never use display fonts not in the spec, never add decoration the content does not justify.

The writing standard is the same as the rest of the document: concrete and checkable. No purple gradients is checkable. Avoid visual clutter is not. The best source of entries is your own review history — anything you have corrected twice in agent output is a candidate, because it will recur until it is written down. This is also where the document earns its keep over time: the refusal list is the accumulated taste of the team, expressed in a form the agent can apply before you ever see the work.

Two cautions. Refusals double as self-review criteria — you can and should ask the agent to check its output against the anti-patterns section before reporting done, which turns the list into a cheap automated gate. And keep it short. A refusal list that tries to enumerate everything bad becomes noise; ten sharp entries that reflect your actual failure modes outperform fifty generic ones.

Narration for this slide

Now the section most teams skip: anti-patterns. What your system refuses to do shapes agent output as much as what it prescribes, because the agent's defaults are the most common patterns on the web — gradient heroes, nested cards, an invented call-to-action on everything. Your refusals are what pull the work off that centre. Write them as concrete, checkable rules: no purple gradients, no nested cards, no hardcoded brand colours. Source them from your own review history — anything you have corrected twice belongs on the list. And use the list both ways: the agent can check its own output against it before you ever look. Keep it short, keep it real, and let it grow one correction at a time.

Slide 7 of 1316:9

Who owns what: DESIGN.md, CLAUDE.md, tokens, skills

Four homes for system knowledge. Duplication between them is where contradictions breed.

HomeOwnsDoes not own
DESIGN.mdDesign decisions: roles, scales, components, voice, refusalsBuild commands, workflow rules, raw token values
CLAUDE.md / AGENTS.mdHow to work in this repo: commands, conventions, "read DESIGN.md first"The design decisions themselves
Token filesThe runtime values: CSS variables, DTCG JSON, theme filesUsage rules, reasoning, refusals
SkillsRepeatable procedures: audits, component scaffolds, review checklistsThe system's identity and constraints

One rule per home. The instruction file points at DESIGN.md; DESIGN.md points at the tokens; skills consume both.

Slide notes

This table answers the question every team asks within a week of adopting the pattern: we already have a CLAUDE.md and a token file — why do we need another document? The answer is separation of concerns, and it matters because duplicated rules drift apart and the agent has no way to know which copy is current.

Walk the rows. The agent instruction file — CLAUDE.md, AGENTS.md, GEMINI.md depending on platform — owns how to work in the repository: commands, test conventions, branch rules, and one line that matters here: read DESIGN.md before any UI work. It should not restate the palette. DESIGN.md owns the design decisions: roles, scales, component rules, voice, anti-patterns. Token files own the runtime values the code actually consumes; DESIGN.md names the roles and points at these files rather than copying every value, because copied values are the first thing to drift. Skills own procedures — run the token audit, scaffold a component with our states, produce a review checklist — and they consume DESIGN.md rather than re-declaring it.

The practical test for any new rule: where would the agent need it, and where would a human look for it? Workflow rules go in the instruction file, design decisions in DESIGN.md, values in tokens, procedures in skills. When you find the same rule in two places, pick the owner and replace the other copy with a pointer.

Narration for this slide

By now most teams have several homes for system knowledge, so let's settle who owns what. The instruction file — CLAUDE.md or AGENTS.md — owns how to work in the repository, and contains one crucial line: read DESIGN.md before any UI work. DESIGN.md owns the design decisions: the roles, the scales, the component rules, the refusals. The token files own the runtime values, and DESIGN.md points at them instead of copying them, because copies drift. Skills own repeatable procedures, like audits and scaffolds, and they consume the document rather than restating it. One rule, one home. The moment the same rule lives in two places, you have planted next quarter's contradiction.

Slide 8 of 1316:9

What stays out of DESIGN.md

The document fails by addition. Each of these is useful somewhere — just not here.

  • Every raw token value — point at the token files instead of mirroring them
  • Brand storytelling and principle essays — the public site's job
  • Per-feature specs and page briefs — they belong with the work, not the system
  • Workflow and tooling rules — the instruction file owns those
  • Anything you are not willing to keep current — stale rules are worse than missing ones

The ten-minute read is a feature. Everything you add dilutes the rules the agent must not miss.

Slide notes

The pressure on this document is always to grow. Every incident produces a candidate rule, every stakeholder has a paragraph they want included, and the document quietly becomes a wiki. The cost is real on both sides: for the human, a long document stops being read; for the agent, every additional line competes for attention with the rules that actually prevent bad output, and the document starts crowding out the task context it is meant to support.

Go through the exclusions. Raw token values are the most tempting duplication — resist mirroring the whole token file, because the mirror will be wrong within a month; name the roles, give the handful of values that anchor identity, and point at the files. Brand storytelling and principle essays persuade humans and give agents almost nothing actionable. Per-feature specs and page briefs describe a moment in time, not the system; they belong in the brief for that work. Workflow rules — how to run checks, how to branch — belong in the instruction file from the previous slide.

The last bullet is the honest one: do not write down anything you are not willing to maintain. A stale rule is worse than a missing one, because the agent will follow it confidently and the human will assume the document is wrong about everything else too. Keeping the document small is what makes keeping it true achievable.

Narration for this slide

Just as important is what stays out. The document fails by addition. Do not mirror every raw token value — name the roles and point at the token files, because a mirror is stale within a month. Leave brand storytelling to the public site; it persuades humans and gives the agent nothing to act on. Keep per-feature specs with the feature, and workflow rules in the instruction file. And the honest one: do not write down anything you are not willing to keep current, because a stale rule is worse than a missing one — the agent follows it confidently, and the humans stop trusting the rest. The ten-minute read is not a limitation. It is the feature.

Slide 9 of 1316:9

Keeping it true: the document drifts from the code

Every DESIGN.md is wrong somewhere within a quarter. The question is whether anyone notices.

  • Drift sources: new components, renamed tokens, one-off exceptions that became patterns
  • An agent following a stale document reproduces last quarter's system, confidently
  • Cheapest check: ask the agent to diff the document against the code and report mismatches
  • Update the document in the same pull request as the change it describes
  • Put a review date on it — "last verified" is information, not decoration

The agent that follows the document is also the cheapest tool you have for checking it.

Slide notes

The document and the code drift apart for ordinary reasons: a new component family lands without a documentation pass, a token is renamed during a refactor, a one-off exception ships under deadline and quietly becomes the pattern everyone copies. None of these is negligence; they are what happens when documentation is a separate activity from making changes.

The consequence is specific to agents. A human reader treats documentation with healthy suspicion and checks the code when something looks off. An agent treats the document as authoritative — that is the entire point of the document — so a stale entry does not just mislead, it gets faithfully reproduced in new work. A document that is eighty per cent right produces output that is confidently wrong in the other twenty.

Two habits keep it true without a documentation project. First, the document changes in the same pull request as the change it describes: a new component, a renamed token, a revised rule — same diff, reviewed together. Second, run a periodic verification pass where the agent itself diffs the document against the codebase: do these components still exist at these paths, do these tokens still carry these values, are there token families or components in the code the document never mentions. That is a small, well-scoped agent task, and Module 4 turns it into a full audit practice. A visible last-verified date completes the loop — it tells both audiences how much to trust what they are reading.

Narration for this slide

Now the uncomfortable truth: every DESIGN.md is wrong somewhere within a quarter. Components land without a documentation pass, tokens get renamed, a deadline exception becomes the pattern everyone copies. For a human reader that is a nuisance. For an agent it is worse, because the agent treats the document as authoritative and faithfully reproduces last quarter's system in this quarter's work. Two habits keep it true. Update the document in the same pull request as the change it describes — same diff, reviewed together. And periodically ask the agent itself to diff the document against the code and report mismatches. The agent that follows the contract is also the cheapest tool you have for checking it.

Slide 10 of 1316:9

Generating the first draft from an existing codebase

If the system already exists in code, the agent can draft the document from the evidence — and you correct it.

  • Extraction beats recall: the agent reads tokens, components, and usage from the code
  • Mark inferences as unverified so review effort goes to the right lines
  • Anti-patterns and identity stay human-written — the code cannot tell the agent your taste
  • Expect a strong first draft and a wrong one in places; the review is the design work
Prompt — first-draft extraction, plan first
Read app/globals.css, the Tailwind theme, components/ui/, and the
shared site components. Draft a DESIGN.md with sections for identity,
colour, typography, spacing, radius, motion, components, and
anti-patterns.

Rules:
- Only document what the code shows. Mark guesses as [UNVERIFIED].
- Name semantic roles, point at token files — do not copy every value.
- List components with their file paths and visible usage rules.
- Leave anti-patterns as an empty section for me to fill in.
Plan the section outline first; do not write the file yet.

The agent drafts what the code already knows. You supply what it cannot: intent, identity, and refusals.

Slide notes

Most teams adopting this pattern are not starting from nothing — the system already exists, scattered across a globals file, a Tailwind theme, a components directory, and habits nobody wrote down. Drafting the document by hand from memory is slow and produces a document about the system you think you have. Having the agent extract a first draft from the code produces a document about the system you actually have, which is more useful and occasionally more embarrassing.

Walk the prompt. Scoping the read matters: point at the token files, the component directories, and the shared shell components rather than the whole repository. The only-document-what-the-code-shows rule plus the [UNVERIFIED] marker is what makes the draft reviewable — without it, the agent will confidently describe conventions it inferred from one example. Asking for a section outline first is the same plan-before-build gate as any other agent task.

Be clear about what extraction cannot produce. The code can tell the agent what values exist and which components are used where; it cannot say why, what the identity is, or what the system refuses to do. Identity, voice, and anti-patterns stay human-written. And the first draft will be wrong in places — it will elevate accidents into rules and miss rules that live only in review comments. That correction pass is not overhead; it is the moment the team actually decides what its system is.

Narration for this slide

If your system already exists in code, do not draft the document from memory — have the agent extract it from the evidence. Point it at the token files, the component directories, the shared shell, and ask for a draft with the standard sections. Two rules make the draft reviewable: it may only document what the code shows, and anything inferred gets marked unverified. Ask for the outline first, as a plan. What you get back is a strong draft of the sections the code can prove — and nothing useful for identity, voice, or anti-patterns, because the code cannot tell the agent your taste. Those you write yourself. The correction pass is where the team decides what its system actually is.

Slide 11 of 1316:9

Worked example: this school's own DESIGN.md

The site you are learning on runs on the document this module describes. Here is how its sections map to agent behaviour.

Section in the fileWhat it declaresWhat it changed in agent output
Identity"Editorial, bookish, field-tested" — mood and metaphorDrafts stopped defaulting to SaaS landing-page styling
Colouroklch values mapped to shadcn semantic variablesFills reference var(--primary), not invented hexes
Typography & spacingGeorgia display, Avenir body, scale, grouping ruleType sizes come from the scale; related items use gap-2 to gap-4
Layout anti-slop rulesNo purple gradients, no nested cards, no hardcoded brand coloursThe most common generic patterns are blocked before review
Component systemEvery component family with its file path and usage rulesNew pages reuse SectionBand and AccentCard instead of bespoke divs

The document is ten sections and reads in about ten minutes — and every course page and article band you are looking at was built under it.

Slide notes

This example is first-party: the document being described is the DESIGN.md in this site's own repository, and the agent-built pages of the school are the evidence of what it does. Walk the mapping column by column: the declaration is only as useful as the behaviour change it produces.

A few specifics worth narrating. The identity section is two lines of mood and metaphor — clear, instructional, bookish — and it is what stopped early drafts from defaulting to generic SaaS landing-page styling; identity is the cheapest section to write and the one most teams omit. The colour section maps oklch values to the shadcn semantic variables in globals.css rather than duplicating them, which is the point-at-the-tokens pattern from earlier. The anti-slop rules sit inside the layout section rather than as a separate ninth heading — a reminder that the nine-section schema is a convention, not a law; this document uses ten headings including radius, shadows, and icons, and adds a canvas contract section covering the Figma and OpenPencil snapshots, which is deliberately out of scope for this module.

The component system section is the longest in the file and earns it: every component family is named with its file path and a usage rule, which is why agent-built pages assemble SectionBand, AccentCard, and ArticleCard instead of inventing layout divs. The honest caveat: the document still requires the verification habit from earlier in the module — it has needed corrections as components evolved, and the last-verified discipline is what keeps it trustworthy.

Narration for this slide

Let's make it concrete with the document this school actually runs on. The site's DESIGN.md is about ten sections and reads in ten minutes. The identity section — two lines of mood — is what stopped drafts defaulting to generic SaaS styling. The colour section maps oklch values to semantic variables instead of copying the token file. The anti-slop rules block purple gradients, nested cards, and hardcoded brand colours before anything reaches review. And the component section names every family with its file path, which is why new pages reuse SectionBand and AccentCard rather than inventing bespoke layouts. Every page you are looking at in this course was built under that document. It is not a perfect document — it needs the verification habit too — but it earns its ten minutes.

Slide 12 of 1316:9

Exercise: draft or refresh your DESIGN.md

One working session, one document. Use the agent for extraction and keep the judgement calls for yourself.

  • Run the extraction prompt against your codebase, scoped to tokens and component directories
  • Correct the draft: fix wrong inferences, delete accidental conventions, resolve every [UNVERIFIED] mark
  • Write identity and anti-patterns by hand — at least five refusals drawn from your own review history
  • Replace any duplicated values with pointers to the token files, and add a last-verified date
  • Test it: ask the agent to build one small component using only the document, and note what it gets wrong

The test build is the real grade. Every mistake the agent makes is a line your document is missing or a line that lies.

Slide notes

This exercise produces the artefact the rest of the course builds on, so encourage people to actually run it rather than file it away. If a document already exists, the same steps work as a refresh: run the extraction, diff the result against the existing document, and treat every mismatch as either drift to fix or a rule to delete.

The sequencing matters. Extraction first, because the agent is faster and more honest about what the code contains than memory is. Correction second, and warn people that this step takes longer than they expect — the draft will contain accidental conventions, things that appear three times in the code without ever having been decided. Deciding whether each one is a rule or an accident is the actual design-system work. The hand-written sections come third: identity in a few lines, and at least five anti-pattern entries drawn from real review history rather than imagination.

The final step is the one that distinguishes this from a documentation exercise: give the document to the agent and have it build one small, low-stakes component using only what the document says. Every mistake in the output is diagnostic — either a missing rule, a vague rule, or a rule that no longer matches the code. Keep the notes from that test run; Module 3 uses the same component as the input to its review-gate exercise.

Narration for this slide

Your exercise: one working session, one document. Run the extraction prompt against your own codebase, scoped to your tokens and component directories. Then correct the draft — fix the wrong inferences, delete the accidental conventions, resolve every unverified mark. Write identity and anti-patterns by hand, with at least five refusals taken from your real review history, not your imagination. Replace duplicated values with pointers to the token files and add a last-verified date. Then the real test: ask the agent to build one small component using only the document, and write down everything it gets wrong. Each mistake is a line your document is missing, or a line that lies. Keep those notes — Module 3 picks them up.

Slide 13 of 1316:9

Summary, and what comes next

  • DESIGN.md is the contract: decisions written for execution, living in the repository the agent reads
  • The anatomy pairs declarations with behaviours — token-backed sections, usage rules, and a refusal list
  • One rule, one home: the instruction file points here, this document points at tokens, skills consume both
  • The document drifts; same-PR updates and agent-run verification keep it true
  • Extraction drafts the document from the code — identity, voice, and anti-patterns stay human-written

Module 3 moves from the written contract to the judgement calls it cannot capture: component taste, and the review gates that protect it.

Slide notes

Recap by tracing the through-line rather than re-listing the slides. The contract framing explains the writing standard — values, paths, and refusals instead of adjectives — and the anatomy is just that standard applied section by section. The who-owns-what table prevents the duplication that breeds contradictions, and the drift slide is the maintenance cost you accept by writing anything down at all. The extraction workflow makes the first draft cheap; the correction pass and the hand-written sections are where the actual decisions get made.

If participants did the exercise, the test-build notes are the bridge to the next module: most of what the agent got wrong will not be token or rule violations, it will be judgement — density that feels off, hierarchy that is technically compliant and still wrong, copy that is grammatical and not yours. That is precisely the territory DESIGN.md cannot fully capture.

Preview Module 3 concretely: what taste means operationally, which checks an agent can run on its own output, and how a review gate works when the contributor is an agent — including what evidence a component has to bring before a human spends attention on it.

Narration for this slide

Let's close. DESIGN.md is the contract: design decisions written for execution, living in the repository, loaded by the agent before any UI work. Its sections pair declarations with expected behaviours, and the refusal list matters as much as the rules. Keep one rule in one home — the instruction file points here, this document points at the tokens, skills consume both. Expect drift, and counter it with same-PR updates and an agent-run verification pass. And let the agent draft the document from your code, while you supply identity, voice, and refusals. But a written contract cannot capture taste — and taste is what keeps a fast system from becoming a mediocre one. That is Module 3: component taste, and the review gates that protect it. See you there.

Module transcript
Module 2, narrated slide by slide

Slide 1DESIGN.md and Machine-Readable Systems

Welcome back. In Module 1 we made tokens carry intent — the names themselves became instructions. But tokens alone cannot tell an agent why the system looks the way it does, which component to reuse, or what the system refuses to do. That job belongs to one document: DESIGN.md. This module is about that document. What it is, what goes in it, what deliberately stays out, and how you keep it true when the codebase keeps moving. The test is simple and double-sided: an agent should load it at the start of every session, and a human should still be able to read it in ten minutes. Let's start with what the document actually is.

Slide 2The contract, not the marketing site

First, what the document is. DESIGN.md is the contract version of your design system — written for execution, not persuasion. A public design system site explains and inspires; this file states decisions. Exact values, the components that exist, the rules for using them. It lives in the repository next to the code it governs, so the agent reads it the way it reads any other file, and changes to it are diffs you review. And here is the reason it has to be complete on the decisions that matter: anything you leave unsaid, the agent fills with the most generic option available. The contract exists to close those gaps before the work starts.

Slide 3This is now a convention, not an invention

Before we open the document, one piece of context: this is a convention now, not something you would be inventing for your team. A nine-section Markdown schema for design systems circulates through open-source design tooling, and public libraries ship dozens of well-known product systems written exactly this way — as of mid-2026. Tools built on the pattern can switch the active system and the next render follows the new rules immediately, because the system is something the agent reads, not a theme baked into a template. The lesson is simple: portable Markdown beats theme JSON, because a human can read it and an agent can apply it. You are adopting a convention agents already expect.

Slide 4Anatomy: nine sections and what an agent does with each

Here is the anatomy. Nine sections, and the discipline is to write each one as a declaration plus an expected behaviour. The token-backed sections — colour, typography, spacing, layout, motion — name the semantic roles and the scales, and point at the tokens from Module 1; the agent's job there is to choose from the named set and never invent a value. The usage sections carry what tokens cannot: components and the reuse-before-build rule, voice for the copy agents end up writing, brand for the assets they must reference rather than redraw. And the ninth section, anti-patterns, is the refusal list. If you cannot say what an agent should do with a section, it probably does not belong in the contract.

Slide 5Specific enough to execute

Inside each section, the standard is precision. The classic failure is documentation written in adjectives — generous spacing, warm palette, clean type. A human fills those in from taste; an agent fills them in from the average of the internet. So write values: the exact hue with its role next to it, the real font stacks, the numeric scale, the pixel limit on radius. Point component entries at the actual file path, because that is the difference between the agent importing your button and writing a new one. And keep the forbidden values in the same section as the allowed ones, so the constraint is visible at the moment of choice. A mood is not an instruction. A value with a role is.

Slide 6Anti-patterns are first-class content

Now the section most teams skip: anti-patterns. What your system refuses to do shapes agent output as much as what it prescribes, because the agent's defaults are the most common patterns on the web — gradient heroes, nested cards, an invented call-to-action on everything. Your refusals are what pull the work off that centre. Write them as concrete, checkable rules: no purple gradients, no nested cards, no hardcoded brand colours. Source them from your own review history — anything you have corrected twice belongs on the list. And use the list both ways: the agent can check its own output against it before you ever look. Keep it short, keep it real, and let it grow one correction at a time.

Slide 7Who owns what: DESIGN.md, CLAUDE.md, tokens, skills

By now most teams have several homes for system knowledge, so let's settle who owns what. The instruction file — CLAUDE.md or AGENTS.md — owns how to work in the repository, and contains one crucial line: read DESIGN.md before any UI work. DESIGN.md owns the design decisions: the roles, the scales, the component rules, the refusals. The token files own the runtime values, and DESIGN.md points at them instead of copying them, because copies drift. Skills own repeatable procedures, like audits and scaffolds, and they consume the document rather than restating it. One rule, one home. The moment the same rule lives in two places, you have planted next quarter's contradiction.

Slide 8What stays out of DESIGN.md

Just as important is what stays out. The document fails by addition. Do not mirror every raw token value — name the roles and point at the token files, because a mirror is stale within a month. Leave brand storytelling to the public site; it persuades humans and gives the agent nothing to act on. Keep per-feature specs with the feature, and workflow rules in the instruction file. And the honest one: do not write down anything you are not willing to keep current, because a stale rule is worse than a missing one — the agent follows it confidently, and the humans stop trusting the rest. The ten-minute read is not a limitation. It is the feature.

Slide 9Keeping it true: the document drifts from the code

Now the uncomfortable truth: every DESIGN.md is wrong somewhere within a quarter. Components land without a documentation pass, tokens get renamed, a deadline exception becomes the pattern everyone copies. For a human reader that is a nuisance. For an agent it is worse, because the agent treats the document as authoritative and faithfully reproduces last quarter's system in this quarter's work. Two habits keep it true. Update the document in the same pull request as the change it describes — same diff, reviewed together. And periodically ask the agent itself to diff the document against the code and report mismatches. The agent that follows the contract is also the cheapest tool you have for checking it.

Slide 10Generating the first draft from an existing codebase

If your system already exists in code, do not draft the document from memory — have the agent extract it from the evidence. Point it at the token files, the component directories, the shared shell, and ask for a draft with the standard sections. Two rules make the draft reviewable: it may only document what the code shows, and anything inferred gets marked unverified. Ask for the outline first, as a plan. What you get back is a strong draft of the sections the code can prove — and nothing useful for identity, voice, or anti-patterns, because the code cannot tell the agent your taste. Those you write yourself. The correction pass is where the team decides what its system actually is.

Slide 11Worked example: this school's own DESIGN.md

Let's make it concrete with the document this school actually runs on. The site's DESIGN.md is about ten sections and reads in ten minutes. The identity section — two lines of mood — is what stopped drafts defaulting to generic SaaS styling. The colour section maps oklch values to semantic variables instead of copying the token file. The anti-slop rules block purple gradients, nested cards, and hardcoded brand colours before anything reaches review. And the component section names every family with its file path, which is why new pages reuse SectionBand and AccentCard rather than inventing bespoke layouts. Every page you are looking at in this course was built under that document. It is not a perfect document — it needs the verification habit too — but it earns its ten minutes.

Slide 12Exercise: draft or refresh your DESIGN.md

Your exercise: one working session, one document. Run the extraction prompt against your own codebase, scoped to your tokens and component directories. Then correct the draft — fix the wrong inferences, delete the accidental conventions, resolve every unverified mark. Write identity and anti-patterns by hand, with at least five refusals taken from your real review history, not your imagination. Replace duplicated values with pointers to the token files and add a last-verified date. Then the real test: ask the agent to build one small component using only the document, and write down everything it gets wrong. Each mistake is a line your document is missing, or a line that lies. Keep those notes — Module 3 picks them up.

Slide 13Summary, and what comes next

Let's close. DESIGN.md is the contract: design decisions written for execution, living in the repository, loaded by the agent before any UI work. Its sections pair declarations with expected behaviours, and the refusal list matters as much as the rules. Keep one rule in one home — the instruction file points here, this document points at the tokens, skills consume both. Expect drift, and counter it with same-PR updates and an agent-run verification pass. And let the agent draft the document from your code, while you supply identity, voice, and refusals. But a written contract cannot capture taste — and taste is what keeps a fast system from becoming a mediocre one. That is Module 3: component taste, and the review gates that protect it. See you there.