Estimate: 20m · Depends on: 1.0.5.1, 1.0.5.2, 1.0.5.3
Write the canonical design-system reference document at /docs/design-system.md. This file is the single most-referenced artifact in Epic 4's prompt-generation — every design-type Subtask prompt will inject it as context. The quality of this document directly determines the visual consistency of every later UI Subtask.
Why coding-agent-executed (corrected from earlier "human" assignment — see notes.html mistake #21): this is a synthesis document. It pulls together what 1.0.5.1–3 produced (tokens in app/globals.css, primitives in components/ui/* with rich JSDoc, patterns in EmptyState.tsx + ErrorState.tsx, and the architectural spec in docs/DESIGN.md) and recombines them into a single user-manual-style reference. That synthesis is a coding-agent strength: deterministic recombination of existing source files into prose. The earlier "human writes this faster and better" rationale was wrong on every axis (see mistake #21 for the full breakdown).
What you'll do: Write a single Markdown file with these sections in order: (1) Tokens — the color palette as a swatch table, type scale, spacing scale, with code snippets for each; (2) Primitives — each component from 1.0.5.2 with its variant matrix, a code sample, and a one-line "when to use this"; (3) Patterns — empty + error states from 1.0.5.3 with screenshots; (4) Voice & tone — 4-6 principles with do/don't examples (confident not corporate, warm not cute, specific not vague, honest about AI limitations); (5) Don'ts — common anti-patterns to avoid. Total length: ~1500-2000 words. Include screenshots from the specimen page.
/docs/design-system.md.README.md in the docs section./app/globals.css (from 1.0.5.1) — the actual tokens to document/components/ui/* (from 1.0.5.2 and 1.0.5.3) — the primitives + patterns to document/app/_tokens/page.tsx — the live specimen page for screenshots