Design System Contracts

The specification

The contract, field by field

This reference is generated from the schemascripts/contract-schema.ts, the same Zod document that validates every contract, typed the generators, and emits the JSON Schema. Docs that are rendered from the spec cannot drift from it.

The coverage receiptGenerated#

At every build, the site enumerates every branch of the live schema and asserts each one has a documented home. 154/154 branches covered, zero missing, zero stale. If the schema grows a branch this reference doesn’t document — or the reference names a branch the schema dropped — the build fails, by name. The receipt ships with the site: spec-coverage.json.

How to read these pagesCurated#

Every section is labeled with its provenance:

  • Generated — field names, types, optionality: rendered from the Zod schema by introspection at build time.
  • Curated — prose and constraint summaries, distilled from the schema’s own commentary and the refusal rules in core/emit-react.ts — hand-written, and kept honest by the coverage guard and review.
  • Example — real excerpts: shipping contracts from contracts/, or output of the actual import engine replayed over committed capture fixtures, at build time. Illustrative snippets (used only where no shipping contract exercises a branch yet) are schema-validated at build time and say so in their captions.

Two version lines are in play and the pages name both: the contract carries its own semver (version); the schema has a single current version (v16) — see versioning.

Reference pages