From 1495074c45e7d49ac17797a2d22267c874ee926f Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 31 Jul 2026 19:30:31 +0800 Subject: [PATCH] =?UTF-8?q?docs(design-system):=20perfection=20pass=20?= =?UTF-8?q?=E2=80=94=20per-component=20contracts,=20playbook,=20authoring?= =?UTF-8?q?=20DoD,=20usage=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SPEC: named layout states (§4.13), migration/adoption playbook updated for 59e4c3dfc (§13), authoring definition of done (§14), main-is-gated rule. - COMPONENTS §9: binding contract for every existing component (34 blocks) — purpose, modes, states, keyboard/SR, tokens, rules, open defects mapped to closing PRs. - TOKENS §7: per-group allowed/forbidden usage rules. - GATES §3a: every new rule labelled. - README: set index, reading order, source-of-truth ranking. No visual or value changes. Verified: docs:check-links green, prettier clean. Co-Authored-By: Claude Fable 5 --- docs/design-system/COMPONENTS.md | 298 +++++++++++++++++++++++++++++++ docs/design-system/GATES.md | 11 ++ docs/design-system/README.md | 24 +++ docs/design-system/SPEC.md | 99 ++++++++++ docs/design-system/TOKENS.md | 17 +- 5 files changed, 448 insertions(+), 1 deletion(-) create mode 100644 docs/design-system/README.md diff --git a/docs/design-system/COMPONENTS.md b/docs/design-system/COMPONENTS.md index d744dea16..9616803bf 100644 --- a/docs/design-system/COMPONENTS.md +++ b/docs/design-system/COMPONENTS.md @@ -544,3 +544,301 @@ phrase). **Do:** compose inside `AnswerFooter`, `RetrievalStateBanner`, provenance rows, print headers. **Don't:** format a date anywhere else in product code; don't localise the machine layer. + +--- + +## 9 · Existing-component contracts + +The binding contract per existing component: what it is for, its modes and states, its +keyboard/screen-reader behaviour, the token roles it may touch, and its rules. Anything not +stated here falls back to the universal rules (SPEC §6) and the authoring definition of +done (SPEC §14). **Open defects** name their closing PR from the playbook (SPEC §13); +until that PR lands the defect stands and is not re-litigated per review. + +### 9.1 `Button` + +**Purpose.** The one action primitive. `AsyncButton` and hand-rolled `