Slide 1 — DESIGN.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 2 — The 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 3 — This 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 4 — Anatomy: 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 5 — Specific 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 6 — Anti-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 7 — Who 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 8 — What 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 9 — Keeping 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 10 — Generating 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 11 — Worked 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 12 — Exercise: 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 13 — Summary, 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.