# Design system file A design-system file is the adopted system in machine-checkable form: what [check](check.md) lints against and what a draft names when it binds to a system. Several may live side by side in the workspace, by default `design-system/.md`; when several exist, name the one a design uses. ## Format Markdown with a `name` front matter field and four sections, each a `| Token | Value | Use |` table: `## Colors` (hex, `rgb()` or `hsl()`), `## Fonts` (a full `font-family` stack), `## Spacing` (px or rem), `## Radii`; then `## Usage`, a few lines on roles and rules (which color is the one accent, which family is display). Token names are CSS custom property names when the source has them. Keep the table layout; edit values and usage freely. JSON with the same keys (`colors`, `fonts`, `spacing`, `radii`, `usage`, each an object of token to value) is also read. ## Import When the user asks to use a project's own system, or a workspace has styles and no design-system file yet, import with this script before designing. Do not extract tokens from source files by hand: the script resolves Tailwind themes and variables the same way every time and writes the file where later checks and drafts look for it. ```text node "/scripts/import-design-system.mjs" "" --name "" [--from ""]... [--out ""] [--force] ``` It reads CSS and SCSS custom properties (`:root`, `html`, `:host`; other selectors such as a dark theme become qualified tokens), the static `theme` and `theme.extend` of `tailwind.config.{js,ts,cjs,mjs}` (`colors`, `fontFamily`, `spacing`, `borderRadius`; values such as `hsl(var(--primary))` resolve through the stylesheet, and channel-only variables like `--primary: 221 83% 53%` become `hsl()`), and `