@shanepadgett/design.md 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/spec/spec-content.d.ts +1 -1
- package/dist/core/spec/spec-content.d.ts.map +1 -1
- package/dist/core/spec/spec-content.js +1 -1
- package/dist/core/spec/spec-content.js.map +1 -1
- package/dist/core/validation/section-schemas.js +3 -1
- package/dist/core/validation/section-schemas.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const humanSpec = "# DESIGN.md Specification\n\nDESIGN.md is a Markdown format for describing visual identity to humans, agents, and tooling. Prose explains design intent. Final `yaml` fences inside known sections contain normative design tokens.\n\nThe recommended filename is `DESIGN.md`, but tools may lint any Markdown file passed explicitly.\n\n## Spec documents\n\n- [Document structure](./document-structure.md)\n- [Token syntax](./token-syntax.md)\n- [Token sections](./token-sections.md)\n- [Linting](./linting.md)\n- [Exporting and tooling](./exporting.md)\n- [Agent-oriented compact spec](./agent.md)\n\nFuture work lives in [Future enhancements](../future.md).\n\n## Minimal shape\n\n````md\n# Acme Design\n\n## Overview\n\nAcme uses calm surfaces, strong typographic contrast, and restrained depth.\n\n## Colors\n\nUse primary color for the main action. Use surface and on-surface roles for default page backgrounds and text.\n\n```yaml\nprimary: \"#1A1C1E\"\nsurface: \"#F7F5F2\"\non-surface: \"#1A1C1E\"\n```\n\n## Typography\n\nUse a clear sans-serif stack for interface text. Body text is optimized for long-form reading.\n\n```yaml\nfontFamily:\n sans: \"Inter, system-ui, sans-serif\"\nbaseFontSize: \"16px\"\ntext:\n body:\n fontFamily: \"{typography.fontFamily.sans}\"\n fontSize: \"1rem\"\n lineHeight: 1.5\n```\n\n## Layout\n\nUse a compact spacing rhythm with centered content containers.\n\n```yaml\nspacing:\n sm: \"0.5rem\"\n md: \"1rem\"\n lg: \"1.5rem\"\ncontainer:\n md: \"64rem\"\ngrid:\n columns: 12\n gutter: \"{layout.spacing.lg}\"\n```\n\n## Elevation\n\nUse borders and tonal contrast for most hierarchy. Reserve shadows for floating overlays.\n\n## Shapes\n\nUse modest radius for controls and cards. Avoid mixing sharp and round geometry in one view.\n\n```yaml\nradius:\n none: 0\n sm: \"0.25rem\"\n md: \"0.5rem\"\n full: \"9999px\"\nborderWidth:\n thin: \"1px\"\nborderStyle:\n default: \"solid\"\n```\n````\n\n## Core rules\n\n- First non-blank line must be exactly one `#` title.\n- YAML front matter is not valid in the new format.\n- Required sections are `Overview`, `Colors`, `Typography`, `Layout`, `Elevation`, and `Shapes`.\n- `Metadata`, `Components`, `Iconography`, `Motion`, and `Do's and Don'ts` are optional known sections.\n- Token-bearing sections use prose first and one final `yaml` fence.\n- The `yaml` fence uses DESIGN.md Token YAML, a strict YAML subset.\n- Prose should describe how to design with tokens, not repeat hard-coded token values.\n\n---\n\n# Document Structure\n\nDESIGN.md is a Markdown document with a required title, required design sections, optional known sections, and optional unknown sections.\n\n## Title\n\nThe first non-blank line must be exactly one H1 heading:\n\n```md\n# Acme Design\n```\n\nThe H1 is the design system name. A valid file must contain exactly one H1. YAML front matter is not valid; legacy front matter is handled only by `designmd migrate`.\n\n## Section levels\n\nOnly H2 headings define DESIGN.md sections. H3 and deeper headings are prose structure inside the current H2 section.\n\nKnown sections use exact names. Aliases are not valid in the new format.\n\n## Required sections\n\nThese sections are required:\n\n1. `Overview`\n2. `Colors`\n3. `Typography`\n4. `Layout`\n5. `Elevation`\n6. `Shapes`\n\n`Overview` is prose-only. `Elevation` requires prose and may include tokens. `Colors`, `Typography`, `Layout`, and `Shapes` require prose and one final token fence.\n\n## Optional known sections\n\nThese sections are optional:\n\n1. `Metadata`\n2. `Components`\n3. `Iconography`\n4. `Motion`\n5. `Do's and Don'ts`\n\nIf `Metadata` appears, it must be the first H2 section after the H1 and must contain one final token fence. `Metadata` is required when themes are used.\n\nIf `Components`, `Iconography`, or `Motion` appears, the section must include prose and one final token fence.\n\n`Do's and Don'ts` is prose/list-only.\n\n## Canonical order\n\nKnown sections should appear in this order:\n\n1. `Metadata`\n2. `Overview`\n3. `Colors`\n4. `Typography`\n5. `Layout`\n6. `Elevation`\n7. `Shapes`\n8. `Components`\n9. `Iconography`\n10. `Motion`\n11. `Do's and Don'ts`\n\nMissing required sections are errors. Duplicate known sections are errors. Known sections out of order produce warnings. Unknown sections are ignored for order checks.\n\n## Unknown sections\n\nUnknown H2 sections are allowed anywhere. Tools preserve them and do not treat them as design tokens.\n\nCode fences, including `yaml` fences, are allowed in unknown sections and are ignored by token tooling.\n\n## Token fence placement\n\nToken-bearing sections use one normative `yaml` fence. The fence must be the final non-whitespace block in the section.\n\n````md\n## Colors\n\nUse primary color only for the most important action.\n\n```yaml\nprimary: \"#1A1C1E\"\n```\n````\n\nMultiple `yaml` fences in a known token-bearing section are errors. Non-`yaml` code fences may appear before the final token fence when needed.\n\nYAML fences outside known token-bearing sections are ignored silently.\n\n## Prose requirements\n\nEvery recognized section that appears must include non-empty prose before any normative token fence. Prose explains design rationale and usage. Token fences provide machine-readable values.\n\n---\n\n# Token Syntax\n\nNormative token fences use the Markdown info string `yaml` for editor highlighting, but consumers only need to support DESIGN.md Token YAML: a strict YAML-compatible subset.\n\n````md\n```yaml\nprimary: \"#1A1C1E\"\n```\n````\n\n## DESIGN.md Token YAML\n\nToken YAML supports:\n\n- maps\n- nested maps by indentation\n- scalar lists\n- double-quoted strings\n- numbers\n\nToken YAML does not support full YAML.\n\nUnsupported syntax includes:\n\n- YAML front matter\n- comments\n- tabs for indentation\n- anchors and aliases\n- merge keys\n- tags\n- block scalars with `|` or `>`\n- flow arrays and flow objects\n- multiple YAML documents\n- booleans and nulls\n- single-quoted strings\n- unquoted string values\n\n## Indentation\n\nIndentation must use two spaces per nesting level. Tabs are invalid. Indentation may only increase by one level at a time.\n\n```yaml\nneutral:\n \"50\": \"#fafafa\"\n \"900\": \"#111111\"\n```\n\n## Keys\n\nNormal keys are unquoted. Double-quoted keys are allowed when needed. Numeric keys must be double-quoted.\n\n```yaml\nprimary: \"#1A1C1E\"\nneutral:\n \"50\": \"#fafafa\"\n```\n\nKeys must not be empty, contain `.`, `{`, or `}`, or have leading/trailing whitespace. Kebab-case keys and quoted numeric scale keys are recommended. Other valid string keys are accepted with warnings because they may be normalized during export.\n\nDuplicate keys in the same map are errors.\n\n## Values\n\nLeaf values must be double-quoted strings or numbers.\n\n```yaml\nfontSize: \"1rem\"\nfontWeight: 600\n```\n\nStrings support only `\\\"` and `\\\\` escapes. Empty leaf values are invalid. A key with no value must introduce a nested map or scalar list.\n\n## Lists\n\nLists contain only double-quoted strings or numbers. Inline arrays are invalid.\n\n```yaml\nthemes:\n - \"light\"\n - \"dark\"\n```\n\n## Token references\n\nToken references use `{path.to.token}`. References may appear as a whole value or embedded inside a string.\n\n```yaml\naccent: \"{colors.primary}\"\nfocusRing: \"0 0 0 3px {colors.focus}\"\n```\n\nReferences are allowed in any token leaf. Missing references and reference cycles are errors. Embedded references must resolve to primitive token values.\n\nProse may also use `{path.to.token}`. Token references in prose are validated.\n\n## Token paths\n\nToken paths start with the compiled section group name:\n\n- `colors`\n- `typography`\n- `layout`\n- `elevation`\n- `shapes`\n- `components`\n- `iconography`\n- `motion`\n\nNested map keys become dot-separated path segments.\n\n```yaml\nneutral:\n \"50\": \"#fafafa\"\n```\n\nThe token path is `{colors.neutral.50}`.\n\n## Themes\n\nThemes are declared in `Metadata`.\n\n```yaml\nthemes:\n - \"light\"\n - \"dark\"\ndefaultTheme: \"light\"\n```\n\nTheme names must be unique kebab-case strings. `defaultTheme` must match one declared theme.\n\nWhen themes are declared, any map whose keys exactly match all declared themes is a themed token value.\n\n```yaml\nsurface:\n light: \"#ffffff\"\n dark: \"#111111\"\n```\n\nScalar values apply to all themes. Partial theme maps are errors. Without `Metadata`, inline theme maps are not recognized as themes.\n\nReferences to themed tokens omit theme names. `{colors.surface}` resolves according to active theme.\n\n## Colors\n\nColor strings support this subset:\n\n- `#rgb`\n- `#rgba`\n- `#rrggbb`\n- `#rrggbbaa`\n- `rgb(...)`\n- `rgba(...)`\n- `hsl(...)`\n- `hsla(...)`\n- `oklab(...)`\n- `oklch(...)`\n- `color(display-p3 ...)`\n- `transparent`\n\nOther named CSS colors are invalid.\n\n## Dimensions and numbers\n\nDimension fields accept quoted CSS length or percentage strings using known CSS units. Numeric `0` is allowed where a dimension is expected.\n\nUnitless non-zero numbers are only valid where the section schema permits numbers, such as `fontWeight`, `lineHeight`, `zIndex`, grid columns, and icon stroke width.\n\n---\n\n# Token Sections\n\nEach known section compiles to one token group. Section prose explains how to apply tokens. Section Token YAML contains machine-readable values.\n\n## Metadata\n\n`Metadata` is optional unless themes are used. If present, it must be the first H2 section after the H1.\n\nAllowed keys:\n\n- `themes`\n- `defaultTheme`\n\n```yaml\nthemes:\n - \"light\"\n - \"dark\"\ndefaultTheme: \"light\"\n```\n\nNo `name`, `description`, or version fields are part of Metadata. The H1 is the design system name. Overview prose is the description.\n\n## Overview\n\n`Overview` is required and prose-only. It describes visual identity, audience, personality, and intended emotional response.\n\n## Colors\n\n`Colors` is required and must define at least one color token.\n\nColor maps may nest. Leaves are color strings, token references, or themed values. Themed values require `Metadata` with declared themes.\n\n```yaml\nprimary: \"oklch(62% 0.18 250)\"\nsurface:\n light: \"#ffffff\"\n dark: \"#111111\"\non-surface:\n light: \"#1A1C1E\"\n dark: \"#F7F5F2\"\nneutral:\n \"50\": \"#fafafa\"\n \"900\": \"#111111\"\n```\n\nRecommended anchors:\n\n- `primary`\n- `surface`\n- `on-surface`\n\nMissing recommended anchors produce warnings, not errors.\n\n## Typography\n\n`Typography` is required.\n\nRequired keys:\n\n- `baseFontSize`\n- `text`\n\nOptional keys:\n\n- `fontFamily`\n- `fontSize`\n- `fontWeight`\n- `lineHeight`\n- `letterSpacing`\n- `measure`\n\n`text` must contain at least one text style. Each text style requires `fontFamily`, `fontSize`, and `lineHeight`.\n\n```yaml\nfontFamily:\n sans: \"Inter, system-ui, sans-serif\"\n mono: \"SFMono-Regular, ui-monospace, monospace\"\nbaseFontSize: \"16px\"\nfontSize:\n \"1\": \"0.875rem\"\n \"2\": \"1rem\"\n \"3\": \"1.5rem\"\nfontWeight:\n \"1\": 400\n \"2\": 700\nlineHeight:\n \"1\": 1.15\n \"2\": 1.5\nletterSpacing:\n \"1\": \"-0.02em\"\n \"2\": \"0em\"\nmeasure:\n body: \"38rem\"\n heading: \"28rem\"\ntext:\n body:\n fontFamily: \"{typography.fontFamily.sans}\"\n fontSize: \"{typography.fontSize.2}\"\n lineHeight: \"{typography.lineHeight.2}\"\n fontWeight: \"{typography.fontWeight.1}\"\n heading:\n fontFamily: \"{typography.fontFamily.sans}\"\n fontSize: \"{typography.fontSize.3}\"\n lineHeight: \"{typography.lineHeight.1}\"\n fontWeight: \"{typography.fontWeight.2}\"\n letterSpacing: \"{typography.letterSpacing.1}\"\n```\n\nPrimitive typography ramps are optional. Use them when several text styles share sizes, weights, line heights, or letter spacing values.\n\nText style fields:\n\n- `fontFamily`\n- `fontSize`\n- `fontWeight`\n- `lineHeight`\n- `letterSpacing`\n- `fontFeature`\n- `fontVariation`\n\nRecommended text anchors include `body` or `body-md`.\n\n## Layout\n\n`Layout` is required.\n\nRequired keys:\n\n- `spacing`\n\nOptional keys:\n\n- `container`\n- `grid`\n- `breakpoint`\n\n`spacing` must contain at least one dimension token. Spacing values are dimensions or numeric `0`; non-zero unitless numbers belong in other layout fields.\n\n```yaml\nspacing:\n sm: \"0.5rem\"\n md: \"1rem\"\n lg: \"1.5rem\"\ncontainer:\n md: \"64rem\"\n lg: \"80rem\"\ngrid:\n columns: 12\n gutter: \"{layout.spacing.lg}\"\nbreakpoint:\n md: \"48rem\"\n lg: \"64rem\"\n```\n\nRecommended spacing anchors are `sm`, `md`, and `lg`. Quoted integer spacing scales such as `\"0\"`, `\"1\"`, and `\"2\"` are also valid anchors and do not produce missing-anchor warnings.\n\n## Elevation\n\n`Elevation` is required. It explains how hierarchy and depth work: shadows, borders, tonal contrast, overlays, or intentionally flat composition.\n\nToken YAML is optional. If present, allowed keys are:\n\n- `shadow`\n- `zIndex`\n\n```yaml\nshadow:\n sm: \"0 1px 2px rgb(0 0 0 / 0.08)\"\n md: \"0 8px 24px rgb(0 0 0 / 0.12)\"\nzIndex:\n base: 0\n dropdown: 100\n modal: 1000\n```\n\nSurface and layer colors belong in `Colors`, not `Elevation`.\n\n## Shapes\n\n`Shapes` is required.\n\nRequired keys:\n\n- `radius`\n\nOptional keys:\n\n- `borderWidth`\n- `borderStyle`\n\n`radius` must contain at least one token. `borderStyle` values must be quoted CSS border-style keywords such as `solid`, `dashed`, `dotted`, `double`, or `none`.\n\n```yaml\nradius:\n none: 0\n sm: \"0.25rem\"\n md: \"0.5rem\"\n full: \"9999px\"\nborderWidth:\n thin: \"1px\"\n thick: \"2px\"\nborderStyle:\n default: \"solid\"\n```\n\nRecommended radius anchors are `none`, `sm`, `md`, and `full`.\n\n## Components\n\n`Components` is optional. It defines component-level design decisions for agents and linters. Components are not exported to CSS by default.\n\nEach component has optional `base` and optional `variants`; at least one must be present. Variant axes are freeform.\n\n```yaml\nbutton:\n base:\n backgroundColor: \"{colors.primary}\"\n textColor: \"{colors.on-primary}\"\n radius: \"{shapes.radius.md}\"\n padding: \"{layout.spacing.md}\"\n variants:\n intent:\n secondary:\n backgroundColor: \"{colors.surface}\"\n textColor: \"{colors.on-surface}\"\n state:\n hover:\n shadow: \"{elevation.shadow.sm}\"\n```\n\nVariant resolution merges `base` first, then selected variant values by axis. Compound variants are not part of the initial spec.\n\nKnown component properties:\n\n- `backgroundColor`\n- `textColor`\n- `borderColor`\n- `typography`\n- `radius`\n- `borderWidth`\n- `borderStyle`\n- `padding`\n- `gap`\n- `height`\n- `width`\n- `minHeight`\n- `minWidth`\n- `shadow`\n- `zIndex`\n- `transitionDuration`\n- `transitionEasing`\n\nUnknown component properties are preserved and produce warnings.\n\nFlat legacy component maps are preserved by migration but produce warnings in the new format.\n\n## Iconography\n\n`Iconography` is optional. It gives agents and tooling enough context to choose consistent icons. It does not install icon libraries or generate SVGs.\n\nRequired keys:\n\n- `library`\n\nOptional keys:\n\n- `style`\n- `strokeWidth`\n- `grid`\n- `size`\n- `color`\n\n```yaml\nlibrary: \"Lucide\"\nstyle: \"outlined\"\nstrokeWidth: 1.5\ngrid: \"24px\"\nsize:\n sm: \"16px\"\n md: \"24px\"\n lg: \"32px\"\ncolor: \"{colors.on-surface}\"\n```\n\nRecommended style values are `outlined`, `filled`, `rounded`, `sharp`, and `duotone`. Unknown style values are preserved and produce warnings.\n\nCSS exporters may emit icon size, stroke width, and color variables. `library` and `style` are implementation guidance.\n\n## Motion\n\n`Motion` is optional.\n\nAllowed keys:\n\n- `duration`\n- `easing`\n- `reducedMotion`\n\n```yaml\nduration:\n fast: \"150ms\"\n medium: \"300ms\"\n slow: \"600ms\"\neasing:\n standard: \"cubic-bezier(0.2, 0, 0, 1)\"\n emphasized: \"cubic-bezier(0.2, 0, 0, 1.5)\"\nreducedMotion:\n medium: \"100ms\"\n slow: \"100ms\"\n```\n\nDuration values are quoted CSS time strings or numeric `0`. Easing values are quoted CSS keywords or supported easing functions: `cubic-bezier(...)`, `linear(...)`, and `steps(...)`.\n\nDurations greater than `200ms` should have same-key entries in `reducedMotion`.\n\n## Do's and Don'ts\n\n`Do's and Don'ts` is optional and prose/list-only.\n\n```md\n## Do's and Don'ts\n\n- Do use one primary action per screen.\n- Don't stack cards inside cards.\n```\n\n---\n\n# Linting\n\nThe linter validates document structure, token syntax, section schemas, references, themes, accessibility checks, and export readiness.\n\n## Severity\n\nDiagnostics use only two severities:\n\n- `error` fails default linting\n- `warning` passes default linting but fails `--strict`\n\nSummary data is separate from diagnostics. There is no `info` severity.\n\n```json\n{\n \"valid\": false,\n \"diagnostics\": [\n {\n \"severity\": \"error\",\n \"rule\": \"missing-section\",\n \"path\": \"Typography\",\n \"message\": \"Missing required section.\"\n }\n ],\n \"summary\": {\n \"errors\": 1,\n \"warnings\": 0,\n \"tokens\": {\n \"colors\": 3,\n \"typography\": 2\n }\n }\n}\n```\n\n## Document rules\n\nErrors:\n\n- missing H1 title\n- multiple H1 titles\n- YAML front matter in linted files\n- missing required section\n- duplicate known section\n- missing required prose in a known section\n- missing required token fence in a token-bearing section\n- multiple `yaml` fences in a known token-bearing section\n- normative token fence is not the final non-whitespace block in its section\n\nWarnings:\n\n- known sections out of canonical order\n\nUnknown sections are allowed and ignored for section order. YAML fences outside known token-bearing sections are ignored silently.\n\n## Token syntax rules\n\nErrors:\n\n- invalid DESIGN.md Token YAML syntax\n- invalid indentation\n- comments inside token fences\n- unquoted string values\n- single-quoted strings\n- empty leaf values\n- duplicate keys\n- unsupported YAML features\n\nWarnings:\n\n- keys that are valid but not recommended kebab-case or numeric scale keys\n\n## Schema rules\n\nErrors:\n\n- invalid value type for a known field\n- required section token minimum not met\n- invalid color syntax\n- invalid dimension or time syntax\n- invalid `borderStyle` keyword\n- invalid theme name\n- `defaultTheme` not found in `themes`\n- partial theme map\n\nWarnings:\n\n- unknown keys in known token sections\n- unknown component properties\n- unknown icon style values\n- missing recommended token anchors\n\nUnknown keys and properties are preserved in the parsed result. Current exporters skip them and lint warns that they are not exported.\n\n## Reference rules\n\nErrors:\n\n- token reference path does not exist\n- token reference cycle\n- embedded reference resolves to a non-primitive value\n\nToken references in prose are validated too.\n\n## Prose hard-coded value rule\n\nProse should not use hard-coded token-like values. The linter warns when prose outside code fences contains hard-coded:\n\n- colors\n- dimensions\n- time values\n\nExamples include `#ffffff`, `oklch(...)`, `16px`, `1rem`, and `300ms`.\n\nUse token names or `{path.to.token}` references instead.\n\n## Recommended anchors\n\nWarnings are produced when common anchors are missing:\n\n- Colors: `primary`, `surface`, `on-surface`\n- Typography: `body` or `body-md`\n- Layout spacing: `sm`, `md`, `lg`, unless `spacing` uses quoted integer scale keys such as `\"0\"`, `\"1\"`, and `\"2\"`\n- Shapes radius: `none`, `sm`, `md`, `full`\n\nThese anchors are recommendations, not requirements.\n\n## Contrast checks\n\nContrast warnings use WCAG AA normal text threshold `4.5:1`.\n\nThe linter checks:\n\n- semantic color pairs when both exist: `surface`/`on-surface`, `primary`/`on-primary`, `secondary`/`on-secondary`, `error`/`on-error`\n- component `backgroundColor` and `textColor` pairs after base/variant merge\n\nFor themed systems, contrast is checked per theme.\n\nAlpha colors are composited over same-theme `surface` or `background` when available. If no backdrop token is available, tools may skip that pair without producing normal-mode noise.\n\n## Exit codes\n\nDefault linting exits with code `1` when errors exist and `0` otherwise.\n\n`--strict` exits with code `1` when errors or warnings exist.\n\n## CLI and library output\n\nThe CLI hides parsed design system output.\n\nThe library API returns parsed design system data with lint results so generators and agents can reuse one parse pass.\n\n---\n\n# Exporting and Tooling\n\nThe CLI name documented by this spec is `designmd`.\n\n## Commands\n\nCore commands:\n\n```bash\ndesignmd lint DESIGN.md\ndesignmd lint --strict DESIGN.md\ndesignmd export --format css DESIGN.md\ndesignmd export --format css-tailwind DESIGN.md\ndesignmd export --format css --out custom-tokens.css DESIGN.md\ndesignmd export --format css-tailwind --force DESIGN.md\ndesignmd migrate old-DESIGN.md > DESIGN.md\ndesignmd migrate --write old-DESIGN.md\n```\n\nAll commands should accept a file path. Standard input support may be added where useful.\n\n## Library API\n\nThe preferred library API is functional:\n\n```ts\nparseDesignMd(source);\nlintDesignMd(source);\nexportDesignMd(source, { format: \"css\" });\n```\n\nExact TypeScript interfaces are implementation details until the parser and linter stabilize.\n\n## Export files\n\nExport writes files by default.\n\n| Format | Default output path |\n| -------------- | ------------------------------------------ |\n| `css` | `design-tokens.css` next to the input file |\n| `css-tailwind` | `theme.css` next to the input file |\n\n`--out <file>` overrides the output path. Export fails if the output file already exists. `--force` allows overwriting an existing output file.\n\nExport warnings do not block output. Errors block output and no partial file is written.\n\nSuccessful export prints the path that was written:\n\n```txt\nwrote design-tokens.css\n```\n\n## CSS custom properties\n\nPlain CSS export emits default theme tokens in `:root`.\n\n```css\n/* Generated by designmd from DESIGN.md. Do not edit directly. */\n\n:root {\n --color-primary: #1a1c1e;\n --spacing-md: 1rem;\n}\n```\n\nWhen themes are declared, the default theme emits to `:root`. If `defaultTheme` is absent, the first declared theme emits to `:root`. Non-root themes emit to data-theme selectors.\n\n```css\n:root {\n --color-surface: #ffffff;\n}\n\n[data-theme=\"dark\"] {\n --color-surface: #111111;\n}\n```\n\nReferences become CSS custom property references when possible. Embedded references are replaced inside composite strings.\n\n```yaml\nshadow:\n focus-ring: \"0 0 0 3px {colors.focus}\"\n```\n\n```css\n--shadow-focus-ring: 0 0 0 3px var(--color-focus);\n```\n\n## CSS variable names\n\nExporters use mapped names, not exact internal paths.\n\n| Token path | CSS custom property |\n| --------------------------------- | --------------------- |\n| `colors.*` | `--color-*` |\n| `typography.fontFamily.*` | `--font-*` |\n| `typography.fontSize.*` | `--text-*` |\n| `typography.lineHeight.*` | `--leading-*` |\n| `typography.letterSpacing.*` | `--tracking-*` |\n| `typography.fontWeight.*` | `--font-weight-*` |\n| `typography.text.*.fontSize` | `--text-*` |\n| `typography.text.*.lineHeight` | `--leading-*` |\n| `typography.text.*.letterSpacing` | `--tracking-*` |\n| `typography.text.*.fontWeight` | `--font-weight-*` |\n| `layout.spacing.*` | `--spacing-*` |\n| `layout.container.*` | `--container-*` |\n| `layout.breakpoint.*` | `--breakpoint-*` |\n| `shapes.radius.*` | `--radius-*` |\n| `shapes.borderWidth.*` | `--border-width-*` |\n| `shapes.borderStyle.*` | `--border-style-*` |\n| `elevation.shadow.*` | `--shadow-*` |\n| `elevation.zIndex.*` | `--z-index-*` |\n| `motion.duration.*` | `--duration-*` |\n| `motion.easing.*` | `--ease-*` |\n| `iconography.size.*` | `--icon-size-*` |\n| `iconography.strokeWidth` | `--icon-stroke-width` |\n| `iconography.color` | `--icon-color` |\n\nToken keys that require normalization are preserved in parsing but may be slugified during export. The linter warns for such keys. If two token paths normalize to the same CSS custom property, export fails.\n\n## Tailwind CSS export\n\n`css-tailwind` emits Tailwind v4-compatible theme variables to `theme.css` by default.\n\n```css\n/* Generated by designmd from DESIGN.md. Do not edit directly. */\n\n@theme static {\n --color-primary: #1a1c1e;\n --spacing-md: 1rem;\n --radius-md: 0.5rem;\n}\n```\n\nTheme overrides emit normal CSS variables under `[data-theme=\"...\"]` selectors.\n\n```css\n@theme static {\n --color-surface: #ffffff;\n}\n\n[data-theme=\"dark\"] {\n --color-surface: #111111;\n}\n```\n\n`css-tailwind` exports Tailwind-native namespaces only: colors, font family, font size, line height, letter spacing, font weight, spacing, container, breakpoint, radius, shadow, and easing. Other CSS-like tokens remain available in plain `css` export.\n\n## Components and iconography\n\nComponents are not exported to CSS by default. They are structured guidance for agents and linting.\n\nIconography exports only CSS-like values such as size, stroke width, and color. `library` and `style` guide implementation and code generation; they do not install packages or generate SVGs.\n\n## Unknown keys\n\nUnknown keys in known sections are preserved in the parsed design system and skipped by current exporters. The linter warns that these keys are preserved but not exported.\n\n## Migration\n\n`designmd migrate` converts legacy frontmatter-based DESIGN.md files into section-local token fences.\n\nDefault behavior writes converted Markdown to stdout. `--write` updates the input file in place.\n\nMigration preserves existing prose where possible and injects tokens into matching canonical sections. It does not invent missing design prose. If the legacy file lacks required sections or required token fields, run `designmd lint` on the migrated file and complete the remaining gaps manually.\n\nLegacy mapping:\n\n- `colors` -> `## Colors`\n- `typography` -> `## Typography` under `text`; `baseFontSize` is derived from `body`, `body-md`, or the first text style font size when available\n- `spacing` -> `## Layout` under `spacing`\n- `rounded` -> `## Shapes` under `radius`\n- `components` -> `## Components`\n\nLegacy section aliases are canonicalized where possible:\n\n- `Brand & Style` -> `Overview`\n- `Layout & Spacing` -> `Layout`\n- `Elevation & Depth` -> `Elevation`\n\nLegacy component maps are wrapped in `base`. The old `rounded` component property is renamed to `radius`. Migration does not infer variants.\n\nLegacy references are rewritten when their target path moved:\n\n- `{spacing.*}` -> `{layout.spacing.*}`\n- `{rounded.*}` -> `{shapes.radius.*}`\n- `{typography.*}` -> `{typography.text.*}`\n\nUnknown legacy root keys are skipped with warnings.\n\nThe migration parser accepts a looser simple legacy YAML subset: maps, nested maps, numbers, double-quoted strings, and simple unquoted strings. It does not support lists, comments, anchors, aliases, tags, flow collections, or block scalars. It outputs strict DESIGN.md Token YAML with double-quoted strings.\n";
|
|
1
|
+
export declare const humanSpec = "# DESIGN.md Specification\n\nDESIGN.md is a Markdown format for describing visual identity to humans, agents, and tooling. Prose explains design intent. Final `yaml` fences inside known sections contain normative design tokens.\n\nThe recommended filename is `DESIGN.md`, but tools may lint any Markdown file passed explicitly.\n\n## Spec documents\n\n- [Document structure](./document-structure.md)\n- [Token syntax](./token-syntax.md)\n- [Token sections](./token-sections.md)\n- [Linting](./linting.md)\n- [Exporting and tooling](./exporting.md)\n- [Agent-oriented compact spec](./agent.md)\n\nFuture work lives in [Future enhancements](../future.md).\n\n## Minimal shape\n\n````md\n# Acme Design\n\n## Overview\n\nAcme uses calm surfaces, strong typographic contrast, and restrained depth.\n\n## Colors\n\nUse primary color for the main action. Use surface and on-surface roles for default page backgrounds and text.\n\n```yaml\nprimary: \"#1A1C1E\"\nsurface: \"#F7F5F2\"\non-surface: \"#1A1C1E\"\n```\n\n## Typography\n\nUse a clear sans-serif stack for interface text. Body text is optimized for long-form reading.\n\n```yaml\nfontFamily:\n sans: \"Inter, system-ui, sans-serif\"\nbaseFontSize: \"16px\"\ntext:\n body:\n fontFamily: \"{typography.fontFamily.sans}\"\n fontSize: \"1rem\"\n lineHeight: 1.5\n```\n\n## Layout\n\nUse a compact spacing rhythm with centered content containers.\n\n```yaml\nspacing:\n sm: \"0.5rem\"\n md: \"1rem\"\n lg: \"1.5rem\"\ncontainer:\n md: \"64rem\"\ngrid:\n columns: 12\n gutter: \"{layout.spacing.lg}\"\n```\n\n## Elevation\n\nUse borders and tonal contrast for most hierarchy. Reserve shadows for floating overlays.\n\n## Shapes\n\nUse modest radius for controls and cards. Avoid mixing sharp and round geometry in one view.\n\n```yaml\nradius:\n none: 0\n sm: \"0.25rem\"\n md: \"0.5rem\"\n full: \"9999px\"\nborderWidth:\n thin: \"1px\"\nborderStyle:\n default: \"solid\"\n```\n````\n\n## Core rules\n\n- First non-blank line must be exactly one `#` title.\n- YAML front matter is not valid in the new format.\n- Required sections are `Overview`, `Colors`, `Typography`, `Layout`, `Elevation`, and `Shapes`.\n- `Metadata`, `Components`, `Iconography`, `Motion`, and `Do's and Don'ts` are optional known sections.\n- Token-bearing sections use prose first and one final `yaml` fence.\n- The `yaml` fence uses DESIGN.md Token YAML, a strict YAML subset.\n- Prose should describe how to design with tokens, not repeat hard-coded token values.\n\n---\n\n# Document Structure\n\nDESIGN.md is a Markdown document with a required title, required design sections, optional known sections, and optional unknown sections.\n\n## Title\n\nThe first non-blank line must be exactly one H1 heading:\n\n```md\n# Acme Design\n```\n\nThe H1 is the design system name. A valid file must contain exactly one H1. YAML front matter is not valid; legacy front matter is handled only by `designmd migrate`.\n\n## Section levels\n\nOnly H2 headings define DESIGN.md sections. H3 and deeper headings are prose structure inside the current H2 section.\n\nKnown sections use exact names. Aliases are not valid in the new format.\n\n## Required sections\n\nThese sections are required:\n\n1. `Overview`\n2. `Colors`\n3. `Typography`\n4. `Layout`\n5. `Elevation`\n6. `Shapes`\n\n`Overview` is prose-only. `Elevation` requires prose and may include tokens. `Colors`, `Typography`, `Layout`, and `Shapes` require prose and one final token fence.\n\n## Optional known sections\n\nThese sections are optional:\n\n1. `Metadata`\n2. `Components`\n3. `Iconography`\n4. `Motion`\n5. `Do's and Don'ts`\n\nIf `Metadata` appears, it must be the first H2 section after the H1 and must contain one final token fence. `Metadata` is required when themes are used.\n\nIf `Components`, `Iconography`, or `Motion` appears, the section must include prose and one final token fence.\n\n`Do's and Don'ts` is prose/list-only.\n\n## Canonical order\n\nKnown sections should appear in this order:\n\n1. `Metadata`\n2. `Overview`\n3. `Colors`\n4. `Typography`\n5. `Layout`\n6. `Elevation`\n7. `Shapes`\n8. `Components`\n9. `Iconography`\n10. `Motion`\n11. `Do's and Don'ts`\n\nMissing required sections are errors. Duplicate known sections are errors. Known sections out of order produce warnings. Unknown sections are ignored for order checks.\n\n## Unknown sections\n\nUnknown H2 sections are allowed anywhere. Tools preserve them and do not treat them as design tokens.\n\nCode fences, including `yaml` fences, are allowed in unknown sections and are ignored by token tooling.\n\n## Token fence placement\n\nToken-bearing sections use one normative `yaml` fence. The fence must be the final non-whitespace block in the section.\n\n````md\n## Colors\n\nUse primary color only for the most important action.\n\n```yaml\nprimary: \"#1A1C1E\"\n```\n````\n\nMultiple `yaml` fences in a known token-bearing section are errors. Non-`yaml` code fences may appear before the final token fence when needed.\n\nYAML fences outside known token-bearing sections are ignored silently.\n\n## Prose requirements\n\nEvery recognized section that appears must include non-empty prose before any normative token fence. Prose explains design rationale and usage. Token fences provide machine-readable values.\n\n---\n\n# Token Syntax\n\nNormative token fences use the Markdown info string `yaml` for editor highlighting, but consumers only need to support DESIGN.md Token YAML: a strict YAML-compatible subset.\n\n````md\n```yaml\nprimary: \"#1A1C1E\"\n```\n````\n\n## DESIGN.md Token YAML\n\nToken YAML supports:\n\n- maps\n- nested maps by indentation\n- scalar lists\n- double-quoted strings\n- numbers\n\nToken YAML does not support full YAML.\n\nUnsupported syntax includes:\n\n- YAML front matter\n- comments\n- tabs for indentation\n- anchors and aliases\n- merge keys\n- tags\n- block scalars with `|` or `>`\n- flow arrays and flow objects\n- multiple YAML documents\n- booleans and nulls\n- single-quoted strings\n- unquoted string values\n\n## Indentation\n\nIndentation must use two spaces per nesting level. Tabs are invalid. Indentation may only increase by one level at a time.\n\n```yaml\nneutral:\n \"50\": \"#fafafa\"\n \"900\": \"#111111\"\n```\n\n## Keys\n\nNormal keys are unquoted. Double-quoted keys are allowed when needed. Numeric keys must be double-quoted.\n\n```yaml\nprimary: \"#1A1C1E\"\nneutral:\n \"50\": \"#fafafa\"\n```\n\nKeys must not be empty, contain `.`, `{`, or `}`, or have leading/trailing whitespace. Kebab-case keys and quoted numeric scale keys are recommended. Other valid string keys are accepted with warnings because they may be normalized during export.\n\nDuplicate keys in the same map are errors.\n\n## Values\n\nLeaf values must be double-quoted strings or numbers.\n\n```yaml\nfontSize: \"1rem\"\nfontWeight: 600\n```\n\nStrings support only `\\\"` and `\\\\` escapes. Empty leaf values are invalid. A key with no value must introduce a nested map or scalar list.\n\n## Lists\n\nLists contain only double-quoted strings or numbers. Inline arrays are invalid.\n\n```yaml\nthemes:\n - \"light\"\n - \"dark\"\n```\n\n## Token references\n\nToken references use `{path.to.token}`. References may appear as a whole value or embedded inside a string.\n\n```yaml\naccent: \"{colors.primary}\"\nfocusRing: \"0 0 0 3px {colors.focus}\"\n```\n\nReferences are allowed in any token leaf. Missing references and reference cycles are errors. Embedded references must resolve to primitive token values.\n\nProse may also use `{path.to.token}`. Token references in prose are validated.\n\n## Token paths\n\nToken paths start with the compiled section group name:\n\n- `colors`\n- `typography`\n- `layout`\n- `elevation`\n- `shapes`\n- `components`\n- `iconography`\n- `motion`\n\nNested map keys become dot-separated path segments.\n\n```yaml\nneutral:\n \"50\": \"#fafafa\"\n```\n\nThe token path is `{colors.neutral.50}`.\n\n## Themes\n\nThemes are declared in `Metadata`.\n\n```yaml\nthemes:\n - \"light\"\n - \"dark\"\ndefaultTheme: \"light\"\n```\n\nTheme names must be unique kebab-case strings. `defaultTheme` must match one declared theme.\n\nWhen themes are declared, any map whose keys exactly match all declared themes is a themed token value.\n\n```yaml\nsurface:\n light: \"#ffffff\"\n dark: \"#111111\"\n```\n\nScalar values apply to all themes. Partial theme maps are errors. Without `Metadata`, inline theme maps are not recognized as themes.\n\nReferences to themed tokens omit theme names. `{colors.surface}` resolves according to active theme.\n\n## Colors\n\nColor strings support this subset:\n\n- `#rgb`\n- `#rgba`\n- `#rrggbb`\n- `#rrggbbaa`\n- `rgb(...)`\n- `rgba(...)`\n- `hsl(...)`\n- `hsla(...)`\n- `oklab(...)`\n- `oklch(...)`\n- `color(display-p3 ...)`\n- `transparent`\n\nOther named CSS colors are invalid.\n\n## Dimensions and numbers\n\nDimension fields accept quoted CSS length or percentage strings using known CSS units. Numeric `0` is allowed where a dimension is expected.\n\nUnitless non-zero numbers are only valid where the section schema permits numbers, such as `fontWeight`, `lineHeight`, `zIndex`, grid columns, and icon stroke width.\n\n---\n\n# Token Sections\n\nEach known section compiles to one token group. Section prose explains how to apply tokens. Section Token YAML contains machine-readable values.\n\n## Metadata\n\n`Metadata` is optional unless themes are used. If present, it must be the first H2 section after the H1.\n\nAllowed keys:\n\n- `themes`\n- `defaultTheme`\n\n```yaml\nthemes:\n - \"light\"\n - \"dark\"\ndefaultTheme: \"light\"\n```\n\nNo `name`, `description`, or version fields are part of Metadata. The H1 is the design system name. Overview prose is the description.\n\n## Overview\n\n`Overview` is required and prose-only. It describes visual identity, audience, personality, and intended emotional response.\n\n## Colors\n\n`Colors` is required and must define at least one color token.\n\nColor maps may nest. Leaves are color strings, token references, or themed values. Themed values require `Metadata` with declared themes.\n\n```yaml\nprimary: \"oklch(62% 0.18 250)\"\nsurface:\n light: \"#ffffff\"\n dark: \"#111111\"\non-surface:\n light: \"#1A1C1E\"\n dark: \"#F7F5F2\"\nneutral:\n \"50\": \"#fafafa\"\n \"900\": \"#111111\"\n```\n\nRecommended anchors:\n\n- `primary`\n- `surface`\n- `on-surface`\n\nMissing recommended anchors produce warnings, not errors.\n\n## Typography\n\n`Typography` is required.\n\nRequired keys:\n\n- `baseFontSize`\n- `text`\n\nOptional keys:\n\n- `fontFamily`\n- `fontSize`\n- `fontWeight`\n- `lineHeight`\n- `letterSpacing`\n- `measure`\n\n`text` must contain at least one text style. Each text style requires `fontFamily`, `fontSize`, and `lineHeight`.\n\n```yaml\nfontFamily:\n sans: \"Inter, system-ui, sans-serif\"\n mono: \"SFMono-Regular, ui-monospace, monospace\"\nbaseFontSize: \"16px\"\nfontSize:\n \"1\": \"0.875rem\"\n \"2\": \"1rem\"\n \"3\": \"1.5rem\"\nfontWeight:\n \"1\": 400\n \"2\": 700\nlineHeight:\n \"1\": 1.15\n \"2\": 1.5\nletterSpacing:\n \"1\": \"-0.02em\"\n \"2\": \"0em\"\nmeasure:\n body: \"38rem\"\n heading: \"28rem\"\ntext:\n body:\n fontFamily: \"{typography.fontFamily.sans}\"\n fontSize: \"{typography.fontSize.2}\"\n lineHeight: \"{typography.lineHeight.2}\"\n fontWeight: \"{typography.fontWeight.1}\"\n heading:\n fontFamily: \"{typography.fontFamily.sans}\"\n fontSize: \"{typography.fontSize.3}\"\n lineHeight: \"{typography.lineHeight.1}\"\n fontWeight: \"{typography.fontWeight.2}\"\n letterSpacing: \"{typography.letterSpacing.1}\"\n```\n\nPrimitive typography ramps are optional. Use them when several text styles share sizes, weights, line heights, or letter spacing values.\n\nText style fields:\n\n- `fontFamily`\n- `fontSize`\n- `fontWeight`\n- `lineHeight`\n- `letterSpacing`\n- `fontFeature`\n- `fontVariation`\n\nRecommended text anchors include `body` or `body-md`.\n\n## Layout\n\n`Layout` is required.\n\nRequired keys:\n\n- `spacing`\n\nOptional keys:\n\n- `container`\n- `grid`\n- `breakpoint`\n\n`spacing` must contain at least one dimension token. Spacing values are dimensions or numeric `0`; non-zero unitless numbers belong in other layout fields.\n\n```yaml\nspacing:\n sm: \"0.5rem\"\n md: \"1rem\"\n lg: \"1.5rem\"\ncontainer:\n md: \"64rem\"\n lg: \"80rem\"\ngrid:\n columns: 12\n gutter: \"{layout.spacing.lg}\"\nbreakpoint:\n md: \"48rem\"\n lg: \"64rem\"\n```\n\nRecommended spacing anchors are `sm`, `md`, and `lg`. Quoted integer spacing scales such as `\"0\"`, `\"1\"`, and `\"2\"` are also valid anchors and do not produce missing-anchor warnings.\n\n## Elevation\n\n`Elevation` is required. It explains how hierarchy and depth work: shadows, borders, tonal contrast, overlays, or intentionally flat composition.\n\nToken YAML is optional. If present, allowed keys are:\n\n- `shadow`\n- `zIndex`\n\n```yaml\nshadow:\n sm: \"0 1px 2px rgb(0 0 0 / 0.08)\"\n md: \"0 8px 24px rgb(0 0 0 / 0.12)\"\nzIndex:\n base: 0\n dropdown: 100\n modal: 1000\n```\n\nSurface and layer colors belong in `Colors`, not `Elevation`.\n\n## Shapes\n\n`Shapes` is required.\n\nRequired keys:\n\n- `radius`\n\nOptional keys:\n\n- `borderWidth`\n- `borderStyle`\n\n`radius` must contain at least one token. `borderStyle` values must be quoted CSS border-style keywords such as `solid`, `dashed`, `dotted`, `double`, or `none`.\n\n```yaml\nradius:\n none: 0\n sm: \"0.25rem\"\n md: \"0.5rem\"\n full: \"9999px\"\nborderWidth:\n thin: \"1px\"\n thick: \"2px\"\nborderStyle:\n default: \"solid\"\n```\n\nRecommended radius anchors are `none`, `sm`, `md`, and `full`. Quoted integer radius scales such as `\"0\"`, `\"1\"`, and `\"2\"` are also valid anchors and do not produce missing-anchor warnings.\n\n## Components\n\n`Components` is optional. It defines component-level design decisions for agents and linters. Components are not exported to CSS by default.\n\nEach component has optional `base` and optional `variants`; at least one must be present. Variant axes are freeform.\n\n```yaml\nbutton:\n base:\n backgroundColor: \"{colors.primary}\"\n textColor: \"{colors.on-primary}\"\n radius: \"{shapes.radius.md}\"\n padding: \"{layout.spacing.md}\"\n variants:\n intent:\n secondary:\n backgroundColor: \"{colors.surface}\"\n textColor: \"{colors.on-surface}\"\n state:\n hover:\n shadow: \"{elevation.shadow.sm}\"\n```\n\nVariant resolution merges `base` first, then selected variant values by axis. Compound variants are not part of the initial spec.\n\nKnown component properties:\n\n- `backgroundColor`\n- `textColor`\n- `borderColor`\n- `typography`\n- `radius`\n- `borderWidth`\n- `borderStyle`\n- `padding`\n- `gap`\n- `height`\n- `width`\n- `minHeight`\n- `minWidth`\n- `shadow`\n- `zIndex`\n- `transitionDuration`\n- `transitionEasing`\n\nUnknown component properties are preserved and produce warnings.\n\nFlat legacy component maps are preserved by migration but produce warnings in the new format.\n\n## Iconography\n\n`Iconography` is optional. It gives agents and tooling enough context to choose consistent icons. It does not install icon libraries or generate SVGs.\n\nRequired keys:\n\n- `library`\n\nOptional keys:\n\n- `style`\n- `strokeWidth`\n- `grid`\n- `size`\n- `color`\n\n```yaml\nlibrary: \"Lucide\"\nstyle: \"outlined\"\nstrokeWidth: 1.5\ngrid: \"24px\"\nsize:\n sm: \"16px\"\n md: \"24px\"\n lg: \"32px\"\ncolor: \"{colors.on-surface}\"\n```\n\nRecommended style values are `outlined`, `filled`, `rounded`, `sharp`, and `duotone`. Unknown style values are preserved and produce warnings.\n\nCSS exporters may emit icon size, stroke width, and color variables. `library` and `style` are implementation guidance.\n\n## Motion\n\n`Motion` is optional.\n\nAllowed keys:\n\n- `duration`\n- `easing`\n- `reducedMotion`\n\n```yaml\nduration:\n fast: \"150ms\"\n medium: \"300ms\"\n slow: \"600ms\"\neasing:\n standard: \"cubic-bezier(0.2, 0, 0, 1)\"\n emphasized: \"cubic-bezier(0.2, 0, 0, 1.5)\"\nreducedMotion:\n medium: \"100ms\"\n slow: \"100ms\"\n```\n\nDuration values are quoted CSS time strings or numeric `0`. Easing values are quoted CSS keywords or supported easing functions: `cubic-bezier(...)`, `linear(...)`, and `steps(...)`.\n\nDurations greater than `200ms` should have same-key entries in `reducedMotion`.\n\n## Do's and Don'ts\n\n`Do's and Don'ts` is optional and prose/list-only.\n\n```md\n## Do's and Don'ts\n\n- Do use one primary action per screen.\n- Don't stack cards inside cards.\n```\n\n---\n\n# Linting\n\nThe linter validates document structure, token syntax, section schemas, references, themes, accessibility checks, and export readiness.\n\n## Severity\n\nDiagnostics use only two severities:\n\n- `error` fails default linting\n- `warning` passes default linting but fails `--strict`\n\nSummary data is separate from diagnostics. There is no `info` severity.\n\n```json\n{\n \"valid\": false,\n \"diagnostics\": [\n {\n \"severity\": \"error\",\n \"rule\": \"missing-section\",\n \"path\": \"Typography\",\n \"message\": \"Missing required section.\"\n }\n ],\n \"summary\": {\n \"errors\": 1,\n \"warnings\": 0,\n \"tokens\": {\n \"colors\": 3,\n \"typography\": 2\n }\n }\n}\n```\n\n## Document rules\n\nErrors:\n\n- missing H1 title\n- multiple H1 titles\n- YAML front matter in linted files\n- missing required section\n- duplicate known section\n- missing required prose in a known section\n- missing required token fence in a token-bearing section\n- multiple `yaml` fences in a known token-bearing section\n- normative token fence is not the final non-whitespace block in its section\n\nWarnings:\n\n- known sections out of canonical order\n\nUnknown sections are allowed and ignored for section order. YAML fences outside known token-bearing sections are ignored silently.\n\n## Token syntax rules\n\nErrors:\n\n- invalid DESIGN.md Token YAML syntax\n- invalid indentation\n- comments inside token fences\n- unquoted string values\n- single-quoted strings\n- empty leaf values\n- duplicate keys\n- unsupported YAML features\n\nWarnings:\n\n- keys that are valid but not recommended kebab-case or numeric scale keys\n\n## Schema rules\n\nErrors:\n\n- invalid value type for a known field\n- required section token minimum not met\n- invalid color syntax\n- invalid dimension or time syntax\n- invalid `borderStyle` keyword\n- invalid theme name\n- `defaultTheme` not found in `themes`\n- partial theme map\n\nWarnings:\n\n- unknown keys in known token sections\n- unknown component properties\n- unknown icon style values\n- missing recommended token anchors\n\nUnknown keys and properties are preserved in the parsed result. Current exporters skip them and lint warns that they are not exported.\n\n## Reference rules\n\nErrors:\n\n- token reference path does not exist\n- token reference cycle\n- embedded reference resolves to a non-primitive value\n\nToken references in prose are validated too.\n\n## Prose hard-coded value rule\n\nProse should not use hard-coded token-like values. The linter warns when prose outside code fences contains hard-coded:\n\n- colors\n- dimensions\n- time values\n\nExamples include `#ffffff`, `oklch(...)`, `16px`, `1rem`, and `300ms`.\n\nUse token names or `{path.to.token}` references instead.\n\n## Recommended anchors\n\nWarnings are produced when common anchors are missing:\n\n- Colors: `primary`, `surface`, `on-surface`\n- Typography: `body` or `body-md`\n- Layout spacing: `sm`, `md`, `lg`, unless `spacing` uses quoted integer scale keys such as `\"0\"`, `\"1\"`, and `\"2\"`\n- Shapes radius: `none`, `sm`, `md`, `full`, unless `radius` uses quoted integer scale keys such as `\"0\"`, `\"1\"`, and `\"2\"`\n\nThese anchors are recommendations, not requirements.\n\n## Contrast checks\n\nContrast warnings use WCAG AA normal text threshold `4.5:1`.\n\nThe linter checks:\n\n- semantic color pairs when both exist: `surface`/`on-surface`, `primary`/`on-primary`, `secondary`/`on-secondary`, `error`/`on-error`\n- component `backgroundColor` and `textColor` pairs after base/variant merge\n\nFor themed systems, contrast is checked per theme.\n\nAlpha colors are composited over same-theme `surface` or `background` when available. If no backdrop token is available, tools may skip that pair without producing normal-mode noise.\n\n## Exit codes\n\nDefault linting exits with code `1` when errors exist and `0` otherwise.\n\n`--strict` exits with code `1` when errors or warnings exist.\n\n## CLI and library output\n\nThe CLI hides parsed design system output.\n\nThe library API returns parsed design system data with lint results so generators and agents can reuse one parse pass.\n\n---\n\n# Exporting and Tooling\n\nThe CLI name documented by this spec is `designmd`.\n\n## Commands\n\nCore commands:\n\n```bash\ndesignmd lint DESIGN.md\ndesignmd lint --strict DESIGN.md\ndesignmd export --format css DESIGN.md\ndesignmd export --format css-tailwind DESIGN.md\ndesignmd export --format css --out custom-tokens.css DESIGN.md\ndesignmd export --format css-tailwind --force DESIGN.md\ndesignmd migrate old-DESIGN.md > DESIGN.md\ndesignmd migrate --write old-DESIGN.md\n```\n\nAll commands should accept a file path. Standard input support may be added where useful.\n\n## Library API\n\nThe preferred library API is functional:\n\n```ts\nparseDesignMd(source);\nlintDesignMd(source);\nexportDesignMd(source, { format: \"css\" });\n```\n\nExact TypeScript interfaces are implementation details until the parser and linter stabilize.\n\n## Export files\n\nExport writes files by default.\n\n| Format | Default output path |\n| -------------- | ------------------------------------------ |\n| `css` | `design-tokens.css` next to the input file |\n| `css-tailwind` | `theme.css` next to the input file |\n\n`--out <file>` overrides the output path. Export fails if the output file already exists. `--force` allows overwriting an existing output file.\n\nExport warnings do not block output. Errors block output and no partial file is written.\n\nSuccessful export prints the path that was written:\n\n```txt\nwrote design-tokens.css\n```\n\n## CSS custom properties\n\nPlain CSS export emits default theme tokens in `:root`.\n\n```css\n/* Generated by designmd from DESIGN.md. Do not edit directly. */\n\n:root {\n --color-primary: #1a1c1e;\n --spacing-md: 1rem;\n}\n```\n\nWhen themes are declared, the default theme emits to `:root`. If `defaultTheme` is absent, the first declared theme emits to `:root`. Non-root themes emit to data-theme selectors.\n\n```css\n:root {\n --color-surface: #ffffff;\n}\n\n[data-theme=\"dark\"] {\n --color-surface: #111111;\n}\n```\n\nReferences become CSS custom property references when possible. Embedded references are replaced inside composite strings.\n\n```yaml\nshadow:\n focus-ring: \"0 0 0 3px {colors.focus}\"\n```\n\n```css\n--shadow-focus-ring: 0 0 0 3px var(--color-focus);\n```\n\n## CSS variable names\n\nExporters use mapped names, not exact internal paths.\n\n| Token path | CSS custom property |\n| --------------------------------- | --------------------- |\n| `colors.*` | `--color-*` |\n| `typography.fontFamily.*` | `--font-*` |\n| `typography.fontSize.*` | `--text-*` |\n| `typography.lineHeight.*` | `--leading-*` |\n| `typography.letterSpacing.*` | `--tracking-*` |\n| `typography.fontWeight.*` | `--font-weight-*` |\n| `typography.text.*.fontSize` | `--text-*` |\n| `typography.text.*.lineHeight` | `--leading-*` |\n| `typography.text.*.letterSpacing` | `--tracking-*` |\n| `typography.text.*.fontWeight` | `--font-weight-*` |\n| `layout.spacing.*` | `--spacing-*` |\n| `layout.container.*` | `--container-*` |\n| `layout.breakpoint.*` | `--breakpoint-*` |\n| `shapes.radius.*` | `--radius-*` |\n| `shapes.borderWidth.*` | `--border-width-*` |\n| `shapes.borderStyle.*` | `--border-style-*` |\n| `elevation.shadow.*` | `--shadow-*` |\n| `elevation.zIndex.*` | `--z-index-*` |\n| `motion.duration.*` | `--duration-*` |\n| `motion.easing.*` | `--ease-*` |\n| `iconography.size.*` | `--icon-size-*` |\n| `iconography.strokeWidth` | `--icon-stroke-width` |\n| `iconography.color` | `--icon-color` |\n\nToken keys that require normalization are preserved in parsing but may be slugified during export. The linter warns for such keys. If two token paths normalize to the same CSS custom property, export fails.\n\n## Tailwind CSS export\n\n`css-tailwind` emits Tailwind v4-compatible theme variables to `theme.css` by default.\n\n```css\n/* Generated by designmd from DESIGN.md. Do not edit directly. */\n\n@theme static {\n --color-primary: #1a1c1e;\n --spacing-md: 1rem;\n --radius-md: 0.5rem;\n}\n```\n\nTheme overrides emit normal CSS variables under `[data-theme=\"...\"]` selectors.\n\n```css\n@theme static {\n --color-surface: #ffffff;\n}\n\n[data-theme=\"dark\"] {\n --color-surface: #111111;\n}\n```\n\n`css-tailwind` exports Tailwind-native namespaces only: colors, font family, font size, line height, letter spacing, font weight, spacing, container, breakpoint, radius, shadow, and easing. Other CSS-like tokens remain available in plain `css` export.\n\n## Components and iconography\n\nComponents are not exported to CSS by default. They are structured guidance for agents and linting.\n\nIconography exports only CSS-like values such as size, stroke width, and color. `library` and `style` guide implementation and code generation; they do not install packages or generate SVGs.\n\n## Unknown keys\n\nUnknown keys in known sections are preserved in the parsed design system and skipped by current exporters. The linter warns that these keys are preserved but not exported.\n\n## Migration\n\n`designmd migrate` converts legacy frontmatter-based DESIGN.md files into section-local token fences.\n\nDefault behavior writes converted Markdown to stdout. `--write` updates the input file in place.\n\nMigration preserves existing prose where possible and injects tokens into matching canonical sections. It does not invent missing design prose. If the legacy file lacks required sections or required token fields, run `designmd lint` on the migrated file and complete the remaining gaps manually.\n\nLegacy mapping:\n\n- `colors` -> `## Colors`\n- `typography` -> `## Typography` under `text`; `baseFontSize` is derived from `body`, `body-md`, or the first text style font size when available\n- `spacing` -> `## Layout` under `spacing`\n- `rounded` -> `## Shapes` under `radius`\n- `components` -> `## Components`\n\nLegacy section aliases are canonicalized where possible:\n\n- `Brand & Style` -> `Overview`\n- `Layout & Spacing` -> `Layout`\n- `Elevation & Depth` -> `Elevation`\n\nLegacy component maps are wrapped in `base`. The old `rounded` component property is renamed to `radius`. Migration does not infer variants.\n\nLegacy references are rewritten when their target path moved:\n\n- `{spacing.*}` -> `{layout.spacing.*}`\n- `{rounded.*}` -> `{shapes.radius.*}`\n- `{typography.*}` -> `{typography.text.*}`\n\nUnknown legacy root keys are skipped with warnings.\n\nThe migration parser accepts a looser simple legacy YAML subset: maps, nested maps, numbers, double-quoted strings, and simple unquoted strings. It does not support lists, comments, anchors, aliases, tags, flow collections, or block scalars. It outputs strict DESIGN.md Token YAML with double-quoted strings.\n";
|
|
2
2
|
export declare const agentSpec = "# DESIGN.md agent spec\n\nUse this to create or maintain `DESIGN.md` files. Start minimal. Add optional sections only when user intent or existing document requires them. Do not copy every snippet into every file.\n\n## Required shape\n\n- First non-blank line is exactly one `#` title.\n- YAML front matter is invalid.\n- Required sections: `Overview`, `Colors`, `Typography`, `Layout`, `Elevation`, `Shapes`.\n- Optional known sections: `Metadata`, `Components`, `Iconography`, `Motion`, `Do's and Don'ts`.\n- Canonical order: `Metadata`, `Overview`, `Colors`, `Typography`, `Layout`, `Elevation`, `Shapes`, `Components`, `Iconography`, `Motion`, `Do's and Don'ts`.\n- Known token-bearing sections use prose first and exactly one final `yaml` fence.\n- Prose explains design use. Avoid repeating hard-coded token values in prose.\n\n## Minimal valid file\n\n````md\n# Acme Design\n\n## Overview\n\nAcme uses calm surfaces, clear hierarchy, and restrained depth.\n\n## Colors\n\nUse semantic roles for surfaces, text, and primary actions.\n\n```yaml\nprimary: \"#1A1C1E\"\nsurface: \"#F7F5F2\"\non-surface: \"#1A1C1E\"\n```\n\n## Typography\n\nUse a readable sans-serif stack and body style for interface text.\n\n```yaml\nfontFamily:\n sans: \"Inter, system-ui, sans-serif\"\nbaseFontSize: \"16px\"\ntext:\n body:\n fontFamily: \"{typography.fontFamily.sans}\"\n fontSize: \"1rem\"\n lineHeight: 1.5\n```\n\n## Layout\n\nUse a compact spacing rhythm with centered content containers.\n\n```yaml\nspacing:\n sm: \"0.5rem\"\n md: \"1rem\"\n lg: \"1.5rem\"\ncontainer:\n md: \"64rem\"\ngrid:\n columns: 12\n gutter: \"{layout.spacing.lg}\"\n```\n\n## Elevation\n\nUse borders and tonal contrast for most hierarchy. Reserve shadows for overlays.\n\n## Shapes\n\nUse modest radius for controls and cards.\n\n```yaml\nradius:\n none: 0\n sm: \"0.25rem\"\n md: \"0.5rem\"\n full: \"9999px\"\nborderWidth:\n thin: \"1px\"\nborderStyle:\n default: \"solid\"\n```\n````\n\n## Optional snippets\n\n### Metadata and themes\n\nThemes are optional. Omit `Metadata`, `themes`, and `defaultTheme` for single-theme systems. Use themes only when multiple named visual modes exist. Theme maps should be complete for each theme.\n\n```yaml\nthemes:\n - \"light\"\n - \"dark\"\ndefaultTheme: \"light\"\n```\n\nThen put matching theme maps in token sections:\n\n```yaml\nsurface:\n light: \"#F7F5F2\"\n dark: \"#1A1C1E\"\non-surface:\n light: \"#1A1C1E\"\n dark: \"#F7F5F2\"\n```\n\n### Components\n\nUse components when reusable UI parts need tokenized design rules. Variants override base properties.\n\n```yaml\nbutton:\n base:\n backgroundColor: \"{colors.primary}\"\n textColor: \"{colors.on-primary}\"\n typography: \"{typography.text.body}\"\n radius: \"{shapes.radius.md}\"\n padding: \"{layout.spacing.md}\"\n variants:\n intent:\n secondary:\n backgroundColor: \"{colors.surface}\"\n textColor: \"{colors.on-surface}\"\n```\n\n### Iconography\n\nUse iconography when icon library, geometry, size, or stroke choices are part of identity.\n\n```yaml\nlibrary: \"lucide\"\nstyle: \"outlined\"\nstrokeWidth: 2\ngrid: \"24px\"\nsize:\n md: \"1.25rem\"\ncolor: \"{colors.on-surface}\"\n```\n\n### Motion\n\nUse motion when timing/easing choices affect product feel.\n\n```yaml\nduration:\n fast: \"150ms\"\n normal: \"250ms\"\neasing:\n standard: \"cubic-bezier(0.2, 0, 0, 1)\"\nreducedMotion:\n normal: \"100ms\"\n```\n\n### Do's and Don'ts\n\nUse this prose-only section for product-specific design guidance.\n\n```md\n## Do's and Don'ts\n\n- Do use one primary action per screen.\n- Don't stack cards inside cards.\n```\n\n## Token YAML subset\n\nAllowed inside token fences: nested maps by spaces, scalar lists, double-quoted strings, numbers. Forbidden: comments, tabs, YAML front matter, anchors/aliases, merge keys, tags, block scalars, flow arrays/objects, multiple YAML documents, booleans, null, single-quoted strings, unquoted string values, empty leaf values, duplicate keys.\n\nReferences use quoted `{path.to.token}` strings. Section roots are `colors`, `typography`, `layout`, `elevation`, `shapes`, `components`, `iconography`, `motion`.\n\n## Section key cheat sheet\n\n- `Colors`: semantic color tokens like `primary`, `on-primary`, `surface`, `on-surface`, `secondary`, `error`.\n- `Typography`: `baseFontSize`, `fontFamily`, optional primitive ramps `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`, `text`, `measure`; text style keys include `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`, `fontFeature`, `fontVariation`.\n- `Layout`: `spacing`, `container`, `grid`, `breakpoint`.\n- `Elevation`: `shadow`, `zIndex`.\n- `Shapes`: `radius`, `borderWidth`, `borderStyle`.\n- `Components`: component names with `base` and optional `variants`; properties include `backgroundColor`, `textColor`, `borderColor`, `typography`, `radius`, `borderWidth`, `borderStyle`, `padding`, `gap`, `height`, `width`, `minHeight`, `minWidth`, `shadow`, `zIndex`, `transitionDuration`, `transitionEasing`.\n- `Iconography`: `library`, `style`, `strokeWidth`, `grid`, `size`, `color`.\n- `Motion`: `duration`, `easing`, `reducedMotion`.\n\n## Common mistakes\n\n- Do not add front matter before title.\n- Do not put Markdown after token fence in same known token-bearing section.\n- Do not put comments inside `yaml` fences.\n- Do not use unquoted or single-quoted strings.\n- Do not add optional sections or comprehensive token sets unless useful for user goal.\n";
|
|
3
3
|
//# sourceMappingURL=spec-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-content.d.ts","sourceRoot":"","sources":["../../../src/core/spec/spec-content.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"spec-content.d.ts","sourceRoot":"","sources":["../../../src/core/spec/spec-content.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,i52BACgm2B,CAAC;AAEvn2B,eAAO,MAAM,SAAS,k7KACo1K,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Generated by scripts/update-spec-content.mjs. Do not edit directly.
|
|
2
|
-
export const humanSpec = '# DESIGN.md Specification\n\nDESIGN.md is a Markdown format for describing visual identity to humans, agents, and tooling. Prose explains design intent. Final `yaml` fences inside known sections contain normative design tokens.\n\nThe recommended filename is `DESIGN.md`, but tools may lint any Markdown file passed explicitly.\n\n## Spec documents\n\n- [Document structure](./document-structure.md)\n- [Token syntax](./token-syntax.md)\n- [Token sections](./token-sections.md)\n- [Linting](./linting.md)\n- [Exporting and tooling](./exporting.md)\n- [Agent-oriented compact spec](./agent.md)\n\nFuture work lives in [Future enhancements](../future.md).\n\n## Minimal shape\n\n````md\n# Acme Design\n\n## Overview\n\nAcme uses calm surfaces, strong typographic contrast, and restrained depth.\n\n## Colors\n\nUse primary color for the main action. Use surface and on-surface roles for default page backgrounds and text.\n\n```yaml\nprimary: "#1A1C1E"\nsurface: "#F7F5F2"\non-surface: "#1A1C1E"\n```\n\n## Typography\n\nUse a clear sans-serif stack for interface text. Body text is optimized for long-form reading.\n\n```yaml\nfontFamily:\n sans: "Inter, system-ui, sans-serif"\nbaseFontSize: "16px"\ntext:\n body:\n fontFamily: "{typography.fontFamily.sans}"\n fontSize: "1rem"\n lineHeight: 1.5\n```\n\n## Layout\n\nUse a compact spacing rhythm with centered content containers.\n\n```yaml\nspacing:\n sm: "0.5rem"\n md: "1rem"\n lg: "1.5rem"\ncontainer:\n md: "64rem"\ngrid:\n columns: 12\n gutter: "{layout.spacing.lg}"\n```\n\n## Elevation\n\nUse borders and tonal contrast for most hierarchy. Reserve shadows for floating overlays.\n\n## Shapes\n\nUse modest radius for controls and cards. Avoid mixing sharp and round geometry in one view.\n\n```yaml\nradius:\n none: 0\n sm: "0.25rem"\n md: "0.5rem"\n full: "9999px"\nborderWidth:\n thin: "1px"\nborderStyle:\n default: "solid"\n```\n````\n\n## Core rules\n\n- First non-blank line must be exactly one `#` title.\n- YAML front matter is not valid in the new format.\n- Required sections are `Overview`, `Colors`, `Typography`, `Layout`, `Elevation`, and `Shapes`.\n- `Metadata`, `Components`, `Iconography`, `Motion`, and `Do\'s and Don\'ts` are optional known sections.\n- Token-bearing sections use prose first and one final `yaml` fence.\n- The `yaml` fence uses DESIGN.md Token YAML, a strict YAML subset.\n- Prose should describe how to design with tokens, not repeat hard-coded token values.\n\n---\n\n# Document Structure\n\nDESIGN.md is a Markdown document with a required title, required design sections, optional known sections, and optional unknown sections.\n\n## Title\n\nThe first non-blank line must be exactly one H1 heading:\n\n```md\n# Acme Design\n```\n\nThe H1 is the design system name. A valid file must contain exactly one H1. YAML front matter is not valid; legacy front matter is handled only by `designmd migrate`.\n\n## Section levels\n\nOnly H2 headings define DESIGN.md sections. H3 and deeper headings are prose structure inside the current H2 section.\n\nKnown sections use exact names. Aliases are not valid in the new format.\n\n## Required sections\n\nThese sections are required:\n\n1. `Overview`\n2. `Colors`\n3. `Typography`\n4. `Layout`\n5. `Elevation`\n6. `Shapes`\n\n`Overview` is prose-only. `Elevation` requires prose and may include tokens. `Colors`, `Typography`, `Layout`, and `Shapes` require prose and one final token fence.\n\n## Optional known sections\n\nThese sections are optional:\n\n1. `Metadata`\n2. `Components`\n3. `Iconography`\n4. `Motion`\n5. `Do\'s and Don\'ts`\n\nIf `Metadata` appears, it must be the first H2 section after the H1 and must contain one final token fence. `Metadata` is required when themes are used.\n\nIf `Components`, `Iconography`, or `Motion` appears, the section must include prose and one final token fence.\n\n`Do\'s and Don\'ts` is prose/list-only.\n\n## Canonical order\n\nKnown sections should appear in this order:\n\n1. `Metadata`\n2. `Overview`\n3. `Colors`\n4. `Typography`\n5. `Layout`\n6. `Elevation`\n7. `Shapes`\n8. `Components`\n9. `Iconography`\n10. `Motion`\n11. `Do\'s and Don\'ts`\n\nMissing required sections are errors. Duplicate known sections are errors. Known sections out of order produce warnings. Unknown sections are ignored for order checks.\n\n## Unknown sections\n\nUnknown H2 sections are allowed anywhere. Tools preserve them and do not treat them as design tokens.\n\nCode fences, including `yaml` fences, are allowed in unknown sections and are ignored by token tooling.\n\n## Token fence placement\n\nToken-bearing sections use one normative `yaml` fence. The fence must be the final non-whitespace block in the section.\n\n````md\n## Colors\n\nUse primary color only for the most important action.\n\n```yaml\nprimary: "#1A1C1E"\n```\n````\n\nMultiple `yaml` fences in a known token-bearing section are errors. Non-`yaml` code fences may appear before the final token fence when needed.\n\nYAML fences outside known token-bearing sections are ignored silently.\n\n## Prose requirements\n\nEvery recognized section that appears must include non-empty prose before any normative token fence. Prose explains design rationale and usage. Token fences provide machine-readable values.\n\n---\n\n# Token Syntax\n\nNormative token fences use the Markdown info string `yaml` for editor highlighting, but consumers only need to support DESIGN.md Token YAML: a strict YAML-compatible subset.\n\n````md\n```yaml\nprimary: "#1A1C1E"\n```\n````\n\n## DESIGN.md Token YAML\n\nToken YAML supports:\n\n- maps\n- nested maps by indentation\n- scalar lists\n- double-quoted strings\n- numbers\n\nToken YAML does not support full YAML.\n\nUnsupported syntax includes:\n\n- YAML front matter\n- comments\n- tabs for indentation\n- anchors and aliases\n- merge keys\n- tags\n- block scalars with `|` or `>`\n- flow arrays and flow objects\n- multiple YAML documents\n- booleans and nulls\n- single-quoted strings\n- unquoted string values\n\n## Indentation\n\nIndentation must use two spaces per nesting level. Tabs are invalid. Indentation may only increase by one level at a time.\n\n```yaml\nneutral:\n "50": "#fafafa"\n "900": "#111111"\n```\n\n## Keys\n\nNormal keys are unquoted. Double-quoted keys are allowed when needed. Numeric keys must be double-quoted.\n\n```yaml\nprimary: "#1A1C1E"\nneutral:\n "50": "#fafafa"\n```\n\nKeys must not be empty, contain `.`, `{`, or `}`, or have leading/trailing whitespace. Kebab-case keys and quoted numeric scale keys are recommended. Other valid string keys are accepted with warnings because they may be normalized during export.\n\nDuplicate keys in the same map are errors.\n\n## Values\n\nLeaf values must be double-quoted strings or numbers.\n\n```yaml\nfontSize: "1rem"\nfontWeight: 600\n```\n\nStrings support only `\\"` and `\\\\` escapes. Empty leaf values are invalid. A key with no value must introduce a nested map or scalar list.\n\n## Lists\n\nLists contain only double-quoted strings or numbers. Inline arrays are invalid.\n\n```yaml\nthemes:\n - "light"\n - "dark"\n```\n\n## Token references\n\nToken references use `{path.to.token}`. References may appear as a whole value or embedded inside a string.\n\n```yaml\naccent: "{colors.primary}"\nfocusRing: "0 0 0 3px {colors.focus}"\n```\n\nReferences are allowed in any token leaf. Missing references and reference cycles are errors. Embedded references must resolve to primitive token values.\n\nProse may also use `{path.to.token}`. Token references in prose are validated.\n\n## Token paths\n\nToken paths start with the compiled section group name:\n\n- `colors`\n- `typography`\n- `layout`\n- `elevation`\n- `shapes`\n- `components`\n- `iconography`\n- `motion`\n\nNested map keys become dot-separated path segments.\n\n```yaml\nneutral:\n "50": "#fafafa"\n```\n\nThe token path is `{colors.neutral.50}`.\n\n## Themes\n\nThemes are declared in `Metadata`.\n\n```yaml\nthemes:\n - "light"\n - "dark"\ndefaultTheme: "light"\n```\n\nTheme names must be unique kebab-case strings. `defaultTheme` must match one declared theme.\n\nWhen themes are declared, any map whose keys exactly match all declared themes is a themed token value.\n\n```yaml\nsurface:\n light: "#ffffff"\n dark: "#111111"\n```\n\nScalar values apply to all themes. Partial theme maps are errors. Without `Metadata`, inline theme maps are not recognized as themes.\n\nReferences to themed tokens omit theme names. `{colors.surface}` resolves according to active theme.\n\n## Colors\n\nColor strings support this subset:\n\n- `#rgb`\n- `#rgba`\n- `#rrggbb`\n- `#rrggbbaa`\n- `rgb(...)`\n- `rgba(...)`\n- `hsl(...)`\n- `hsla(...)`\n- `oklab(...)`\n- `oklch(...)`\n- `color(display-p3 ...)`\n- `transparent`\n\nOther named CSS colors are invalid.\n\n## Dimensions and numbers\n\nDimension fields accept quoted CSS length or percentage strings using known CSS units. Numeric `0` is allowed where a dimension is expected.\n\nUnitless non-zero numbers are only valid where the section schema permits numbers, such as `fontWeight`, `lineHeight`, `zIndex`, grid columns, and icon stroke width.\n\n---\n\n# Token Sections\n\nEach known section compiles to one token group. Section prose explains how to apply tokens. Section Token YAML contains machine-readable values.\n\n## Metadata\n\n`Metadata` is optional unless themes are used. If present, it must be the first H2 section after the H1.\n\nAllowed keys:\n\n- `themes`\n- `defaultTheme`\n\n```yaml\nthemes:\n - "light"\n - "dark"\ndefaultTheme: "light"\n```\n\nNo `name`, `description`, or version fields are part of Metadata. The H1 is the design system name. Overview prose is the description.\n\n## Overview\n\n`Overview` is required and prose-only. It describes visual identity, audience, personality, and intended emotional response.\n\n## Colors\n\n`Colors` is required and must define at least one color token.\n\nColor maps may nest. Leaves are color strings, token references, or themed values. Themed values require `Metadata` with declared themes.\n\n```yaml\nprimary: "oklch(62% 0.18 250)"\nsurface:\n light: "#ffffff"\n dark: "#111111"\non-surface:\n light: "#1A1C1E"\n dark: "#F7F5F2"\nneutral:\n "50": "#fafafa"\n "900": "#111111"\n```\n\nRecommended anchors:\n\n- `primary`\n- `surface`\n- `on-surface`\n\nMissing recommended anchors produce warnings, not errors.\n\n## Typography\n\n`Typography` is required.\n\nRequired keys:\n\n- `baseFontSize`\n- `text`\n\nOptional keys:\n\n- `fontFamily`\n- `fontSize`\n- `fontWeight`\n- `lineHeight`\n- `letterSpacing`\n- `measure`\n\n`text` must contain at least one text style. Each text style requires `fontFamily`, `fontSize`, and `lineHeight`.\n\n```yaml\nfontFamily:\n sans: "Inter, system-ui, sans-serif"\n mono: "SFMono-Regular, ui-monospace, monospace"\nbaseFontSize: "16px"\nfontSize:\n "1": "0.875rem"\n "2": "1rem"\n "3": "1.5rem"\nfontWeight:\n "1": 400\n "2": 700\nlineHeight:\n "1": 1.15\n "2": 1.5\nletterSpacing:\n "1": "-0.02em"\n "2": "0em"\nmeasure:\n body: "38rem"\n heading: "28rem"\ntext:\n body:\n fontFamily: "{typography.fontFamily.sans}"\n fontSize: "{typography.fontSize.2}"\n lineHeight: "{typography.lineHeight.2}"\n fontWeight: "{typography.fontWeight.1}"\n heading:\n fontFamily: "{typography.fontFamily.sans}"\n fontSize: "{typography.fontSize.3}"\n lineHeight: "{typography.lineHeight.1}"\n fontWeight: "{typography.fontWeight.2}"\n letterSpacing: "{typography.letterSpacing.1}"\n```\n\nPrimitive typography ramps are optional. Use them when several text styles share sizes, weights, line heights, or letter spacing values.\n\nText style fields:\n\n- `fontFamily`\n- `fontSize`\n- `fontWeight`\n- `lineHeight`\n- `letterSpacing`\n- `fontFeature`\n- `fontVariation`\n\nRecommended text anchors include `body` or `body-md`.\n\n## Layout\n\n`Layout` is required.\n\nRequired keys:\n\n- `spacing`\n\nOptional keys:\n\n- `container`\n- `grid`\n- `breakpoint`\n\n`spacing` must contain at least one dimension token. Spacing values are dimensions or numeric `0`; non-zero unitless numbers belong in other layout fields.\n\n```yaml\nspacing:\n sm: "0.5rem"\n md: "1rem"\n lg: "1.5rem"\ncontainer:\n md: "64rem"\n lg: "80rem"\ngrid:\n columns: 12\n gutter: "{layout.spacing.lg}"\nbreakpoint:\n md: "48rem"\n lg: "64rem"\n```\n\nRecommended spacing anchors are `sm`, `md`, and `lg`. Quoted integer spacing scales such as `"0"`, `"1"`, and `"2"` are also valid anchors and do not produce missing-anchor warnings.\n\n## Elevation\n\n`Elevation` is required. It explains how hierarchy and depth work: shadows, borders, tonal contrast, overlays, or intentionally flat composition.\n\nToken YAML is optional. If present, allowed keys are:\n\n- `shadow`\n- `zIndex`\n\n```yaml\nshadow:\n sm: "0 1px 2px rgb(0 0 0 / 0.08)"\n md: "0 8px 24px rgb(0 0 0 / 0.12)"\nzIndex:\n base: 0\n dropdown: 100\n modal: 1000\n```\n\nSurface and layer colors belong in `Colors`, not `Elevation`.\n\n## Shapes\n\n`Shapes` is required.\n\nRequired keys:\n\n- `radius`\n\nOptional keys:\n\n- `borderWidth`\n- `borderStyle`\n\n`radius` must contain at least one token. `borderStyle` values must be quoted CSS border-style keywords such as `solid`, `dashed`, `dotted`, `double`, or `none`.\n\n```yaml\nradius:\n none: 0\n sm: "0.25rem"\n md: "0.5rem"\n full: "9999px"\nborderWidth:\n thin: "1px"\n thick: "2px"\nborderStyle:\n default: "solid"\n```\n\nRecommended radius anchors are `none`, `sm`, `md`, and `full`.\n\n## Components\n\n`Components` is optional. It defines component-level design decisions for agents and linters. Components are not exported to CSS by default.\n\nEach component has optional `base` and optional `variants`; at least one must be present. Variant axes are freeform.\n\n```yaml\nbutton:\n base:\n backgroundColor: "{colors.primary}"\n textColor: "{colors.on-primary}"\n radius: "{shapes.radius.md}"\n padding: "{layout.spacing.md}"\n variants:\n intent:\n secondary:\n backgroundColor: "{colors.surface}"\n textColor: "{colors.on-surface}"\n state:\n hover:\n shadow: "{elevation.shadow.sm}"\n```\n\nVariant resolution merges `base` first, then selected variant values by axis. Compound variants are not part of the initial spec.\n\nKnown component properties:\n\n- `backgroundColor`\n- `textColor`\n- `borderColor`\n- `typography`\n- `radius`\n- `borderWidth`\n- `borderStyle`\n- `padding`\n- `gap`\n- `height`\n- `width`\n- `minHeight`\n- `minWidth`\n- `shadow`\n- `zIndex`\n- `transitionDuration`\n- `transitionEasing`\n\nUnknown component properties are preserved and produce warnings.\n\nFlat legacy component maps are preserved by migration but produce warnings in the new format.\n\n## Iconography\n\n`Iconography` is optional. It gives agents and tooling enough context to choose consistent icons. It does not install icon libraries or generate SVGs.\n\nRequired keys:\n\n- `library`\n\nOptional keys:\n\n- `style`\n- `strokeWidth`\n- `grid`\n- `size`\n- `color`\n\n```yaml\nlibrary: "Lucide"\nstyle: "outlined"\nstrokeWidth: 1.5\ngrid: "24px"\nsize:\n sm: "16px"\n md: "24px"\n lg: "32px"\ncolor: "{colors.on-surface}"\n```\n\nRecommended style values are `outlined`, `filled`, `rounded`, `sharp`, and `duotone`. Unknown style values are preserved and produce warnings.\n\nCSS exporters may emit icon size, stroke width, and color variables. `library` and `style` are implementation guidance.\n\n## Motion\n\n`Motion` is optional.\n\nAllowed keys:\n\n- `duration`\n- `easing`\n- `reducedMotion`\n\n```yaml\nduration:\n fast: "150ms"\n medium: "300ms"\n slow: "600ms"\neasing:\n standard: "cubic-bezier(0.2, 0, 0, 1)"\n emphasized: "cubic-bezier(0.2, 0, 0, 1.5)"\nreducedMotion:\n medium: "100ms"\n slow: "100ms"\n```\n\nDuration values are quoted CSS time strings or numeric `0`. Easing values are quoted CSS keywords or supported easing functions: `cubic-bezier(...)`, `linear(...)`, and `steps(...)`.\n\nDurations greater than `200ms` should have same-key entries in `reducedMotion`.\n\n## Do\'s and Don\'ts\n\n`Do\'s and Don\'ts` is optional and prose/list-only.\n\n```md\n## Do\'s and Don\'ts\n\n- Do use one primary action per screen.\n- Don\'t stack cards inside cards.\n```\n\n---\n\n# Linting\n\nThe linter validates document structure, token syntax, section schemas, references, themes, accessibility checks, and export readiness.\n\n## Severity\n\nDiagnostics use only two severities:\n\n- `error` fails default linting\n- `warning` passes default linting but fails `--strict`\n\nSummary data is separate from diagnostics. There is no `info` severity.\n\n```json\n{\n "valid": false,\n "diagnostics": [\n {\n "severity": "error",\n "rule": "missing-section",\n "path": "Typography",\n "message": "Missing required section."\n }\n ],\n "summary": {\n "errors": 1,\n "warnings": 0,\n "tokens": {\n "colors": 3,\n "typography": 2\n }\n }\n}\n```\n\n## Document rules\n\nErrors:\n\n- missing H1 title\n- multiple H1 titles\n- YAML front matter in linted files\n- missing required section\n- duplicate known section\n- missing required prose in a known section\n- missing required token fence in a token-bearing section\n- multiple `yaml` fences in a known token-bearing section\n- normative token fence is not the final non-whitespace block in its section\n\nWarnings:\n\n- known sections out of canonical order\n\nUnknown sections are allowed and ignored for section order. YAML fences outside known token-bearing sections are ignored silently.\n\n## Token syntax rules\n\nErrors:\n\n- invalid DESIGN.md Token YAML syntax\n- invalid indentation\n- comments inside token fences\n- unquoted string values\n- single-quoted strings\n- empty leaf values\n- duplicate keys\n- unsupported YAML features\n\nWarnings:\n\n- keys that are valid but not recommended kebab-case or numeric scale keys\n\n## Schema rules\n\nErrors:\n\n- invalid value type for a known field\n- required section token minimum not met\n- invalid color syntax\n- invalid dimension or time syntax\n- invalid `borderStyle` keyword\n- invalid theme name\n- `defaultTheme` not found in `themes`\n- partial theme map\n\nWarnings:\n\n- unknown keys in known token sections\n- unknown component properties\n- unknown icon style values\n- missing recommended token anchors\n\nUnknown keys and properties are preserved in the parsed result. Current exporters skip them and lint warns that they are not exported.\n\n## Reference rules\n\nErrors:\n\n- token reference path does not exist\n- token reference cycle\n- embedded reference resolves to a non-primitive value\n\nToken references in prose are validated too.\n\n## Prose hard-coded value rule\n\nProse should not use hard-coded token-like values. The linter warns when prose outside code fences contains hard-coded:\n\n- colors\n- dimensions\n- time values\n\nExamples include `#ffffff`, `oklch(...)`, `16px`, `1rem`, and `300ms`.\n\nUse token names or `{path.to.token}` references instead.\n\n## Recommended anchors\n\nWarnings are produced when common anchors are missing:\n\n- Colors: `primary`, `surface`, `on-surface`\n- Typography: `body` or `body-md`\n- Layout spacing: `sm`, `md`, `lg`, unless `spacing` uses quoted integer scale keys such as `"0"`, `"1"`, and `"2"`\n- Shapes radius: `none`, `sm`, `md`, `full`\n\nThese anchors are recommendations, not requirements.\n\n## Contrast checks\n\nContrast warnings use WCAG AA normal text threshold `4.5:1`.\n\nThe linter checks:\n\n- semantic color pairs when both exist: `surface`/`on-surface`, `primary`/`on-primary`, `secondary`/`on-secondary`, `error`/`on-error`\n- component `backgroundColor` and `textColor` pairs after base/variant merge\n\nFor themed systems, contrast is checked per theme.\n\nAlpha colors are composited over same-theme `surface` or `background` when available. If no backdrop token is available, tools may skip that pair without producing normal-mode noise.\n\n## Exit codes\n\nDefault linting exits with code `1` when errors exist and `0` otherwise.\n\n`--strict` exits with code `1` when errors or warnings exist.\n\n## CLI and library output\n\nThe CLI hides parsed design system output.\n\nThe library API returns parsed design system data with lint results so generators and agents can reuse one parse pass.\n\n---\n\n# Exporting and Tooling\n\nThe CLI name documented by this spec is `designmd`.\n\n## Commands\n\nCore commands:\n\n```bash\ndesignmd lint DESIGN.md\ndesignmd lint --strict DESIGN.md\ndesignmd export --format css DESIGN.md\ndesignmd export --format css-tailwind DESIGN.md\ndesignmd export --format css --out custom-tokens.css DESIGN.md\ndesignmd export --format css-tailwind --force DESIGN.md\ndesignmd migrate old-DESIGN.md > DESIGN.md\ndesignmd migrate --write old-DESIGN.md\n```\n\nAll commands should accept a file path. Standard input support may be added where useful.\n\n## Library API\n\nThe preferred library API is functional:\n\n```ts\nparseDesignMd(source);\nlintDesignMd(source);\nexportDesignMd(source, { format: "css" });\n```\n\nExact TypeScript interfaces are implementation details until the parser and linter stabilize.\n\n## Export files\n\nExport writes files by default.\n\n| Format | Default output path |\n| -------------- | ------------------------------------------ |\n| `css` | `design-tokens.css` next to the input file |\n| `css-tailwind` | `theme.css` next to the input file |\n\n`--out <file>` overrides the output path. Export fails if the output file already exists. `--force` allows overwriting an existing output file.\n\nExport warnings do not block output. Errors block output and no partial file is written.\n\nSuccessful export prints the path that was written:\n\n```txt\nwrote design-tokens.css\n```\n\n## CSS custom properties\n\nPlain CSS export emits default theme tokens in `:root`.\n\n```css\n/* Generated by designmd from DESIGN.md. Do not edit directly. */\n\n:root {\n --color-primary: #1a1c1e;\n --spacing-md: 1rem;\n}\n```\n\nWhen themes are declared, the default theme emits to `:root`. If `defaultTheme` is absent, the first declared theme emits to `:root`. Non-root themes emit to data-theme selectors.\n\n```css\n:root {\n --color-surface: #ffffff;\n}\n\n[data-theme="dark"] {\n --color-surface: #111111;\n}\n```\n\nReferences become CSS custom property references when possible. Embedded references are replaced inside composite strings.\n\n```yaml\nshadow:\n focus-ring: "0 0 0 3px {colors.focus}"\n```\n\n```css\n--shadow-focus-ring: 0 0 0 3px var(--color-focus);\n```\n\n## CSS variable names\n\nExporters use mapped names, not exact internal paths.\n\n| Token path | CSS custom property |\n| --------------------------------- | --------------------- |\n| `colors.*` | `--color-*` |\n| `typography.fontFamily.*` | `--font-*` |\n| `typography.fontSize.*` | `--text-*` |\n| `typography.lineHeight.*` | `--leading-*` |\n| `typography.letterSpacing.*` | `--tracking-*` |\n| `typography.fontWeight.*` | `--font-weight-*` |\n| `typography.text.*.fontSize` | `--text-*` |\n| `typography.text.*.lineHeight` | `--leading-*` |\n| `typography.text.*.letterSpacing` | `--tracking-*` |\n| `typography.text.*.fontWeight` | `--font-weight-*` |\n| `layout.spacing.*` | `--spacing-*` |\n| `layout.container.*` | `--container-*` |\n| `layout.breakpoint.*` | `--breakpoint-*` |\n| `shapes.radius.*` | `--radius-*` |\n| `shapes.borderWidth.*` | `--border-width-*` |\n| `shapes.borderStyle.*` | `--border-style-*` |\n| `elevation.shadow.*` | `--shadow-*` |\n| `elevation.zIndex.*` | `--z-index-*` |\n| `motion.duration.*` | `--duration-*` |\n| `motion.easing.*` | `--ease-*` |\n| `iconography.size.*` | `--icon-size-*` |\n| `iconography.strokeWidth` | `--icon-stroke-width` |\n| `iconography.color` | `--icon-color` |\n\nToken keys that require normalization are preserved in parsing but may be slugified during export. The linter warns for such keys. If two token paths normalize to the same CSS custom property, export fails.\n\n## Tailwind CSS export\n\n`css-tailwind` emits Tailwind v4-compatible theme variables to `theme.css` by default.\n\n```css\n/* Generated by designmd from DESIGN.md. Do not edit directly. */\n\n@theme static {\n --color-primary: #1a1c1e;\n --spacing-md: 1rem;\n --radius-md: 0.5rem;\n}\n```\n\nTheme overrides emit normal CSS variables under `[data-theme="..."]` selectors.\n\n```css\n@theme static {\n --color-surface: #ffffff;\n}\n\n[data-theme="dark"] {\n --color-surface: #111111;\n}\n```\n\n`css-tailwind` exports Tailwind-native namespaces only: colors, font family, font size, line height, letter spacing, font weight, spacing, container, breakpoint, radius, shadow, and easing. Other CSS-like tokens remain available in plain `css` export.\n\n## Components and iconography\n\nComponents are not exported to CSS by default. They are structured guidance for agents and linting.\n\nIconography exports only CSS-like values such as size, stroke width, and color. `library` and `style` guide implementation and code generation; they do not install packages or generate SVGs.\n\n## Unknown keys\n\nUnknown keys in known sections are preserved in the parsed design system and skipped by current exporters. The linter warns that these keys are preserved but not exported.\n\n## Migration\n\n`designmd migrate` converts legacy frontmatter-based DESIGN.md files into section-local token fences.\n\nDefault behavior writes converted Markdown to stdout. `--write` updates the input file in place.\n\nMigration preserves existing prose where possible and injects tokens into matching canonical sections. It does not invent missing design prose. If the legacy file lacks required sections or required token fields, run `designmd lint` on the migrated file and complete the remaining gaps manually.\n\nLegacy mapping:\n\n- `colors` -> `## Colors`\n- `typography` -> `## Typography` under `text`; `baseFontSize` is derived from `body`, `body-md`, or the first text style font size when available\n- `spacing` -> `## Layout` under `spacing`\n- `rounded` -> `## Shapes` under `radius`\n- `components` -> `## Components`\n\nLegacy section aliases are canonicalized where possible:\n\n- `Brand & Style` -> `Overview`\n- `Layout & Spacing` -> `Layout`\n- `Elevation & Depth` -> `Elevation`\n\nLegacy component maps are wrapped in `base`. The old `rounded` component property is renamed to `radius`. Migration does not infer variants.\n\nLegacy references are rewritten when their target path moved:\n\n- `{spacing.*}` -> `{layout.spacing.*}`\n- `{rounded.*}` -> `{shapes.radius.*}`\n- `{typography.*}` -> `{typography.text.*}`\n\nUnknown legacy root keys are skipped with warnings.\n\nThe migration parser accepts a looser simple legacy YAML subset: maps, nested maps, numbers, double-quoted strings, and simple unquoted strings. It does not support lists, comments, anchors, aliases, tags, flow collections, or block scalars. It outputs strict DESIGN.md Token YAML with double-quoted strings.\n';
|
|
2
|
+
export const humanSpec = '# DESIGN.md Specification\n\nDESIGN.md is a Markdown format for describing visual identity to humans, agents, and tooling. Prose explains design intent. Final `yaml` fences inside known sections contain normative design tokens.\n\nThe recommended filename is `DESIGN.md`, but tools may lint any Markdown file passed explicitly.\n\n## Spec documents\n\n- [Document structure](./document-structure.md)\n- [Token syntax](./token-syntax.md)\n- [Token sections](./token-sections.md)\n- [Linting](./linting.md)\n- [Exporting and tooling](./exporting.md)\n- [Agent-oriented compact spec](./agent.md)\n\nFuture work lives in [Future enhancements](../future.md).\n\n## Minimal shape\n\n````md\n# Acme Design\n\n## Overview\n\nAcme uses calm surfaces, strong typographic contrast, and restrained depth.\n\n## Colors\n\nUse primary color for the main action. Use surface and on-surface roles for default page backgrounds and text.\n\n```yaml\nprimary: "#1A1C1E"\nsurface: "#F7F5F2"\non-surface: "#1A1C1E"\n```\n\n## Typography\n\nUse a clear sans-serif stack for interface text. Body text is optimized for long-form reading.\n\n```yaml\nfontFamily:\n sans: "Inter, system-ui, sans-serif"\nbaseFontSize: "16px"\ntext:\n body:\n fontFamily: "{typography.fontFamily.sans}"\n fontSize: "1rem"\n lineHeight: 1.5\n```\n\n## Layout\n\nUse a compact spacing rhythm with centered content containers.\n\n```yaml\nspacing:\n sm: "0.5rem"\n md: "1rem"\n lg: "1.5rem"\ncontainer:\n md: "64rem"\ngrid:\n columns: 12\n gutter: "{layout.spacing.lg}"\n```\n\n## Elevation\n\nUse borders and tonal contrast for most hierarchy. Reserve shadows for floating overlays.\n\n## Shapes\n\nUse modest radius for controls and cards. Avoid mixing sharp and round geometry in one view.\n\n```yaml\nradius:\n none: 0\n sm: "0.25rem"\n md: "0.5rem"\n full: "9999px"\nborderWidth:\n thin: "1px"\nborderStyle:\n default: "solid"\n```\n````\n\n## Core rules\n\n- First non-blank line must be exactly one `#` title.\n- YAML front matter is not valid in the new format.\n- Required sections are `Overview`, `Colors`, `Typography`, `Layout`, `Elevation`, and `Shapes`.\n- `Metadata`, `Components`, `Iconography`, `Motion`, and `Do\'s and Don\'ts` are optional known sections.\n- Token-bearing sections use prose first and one final `yaml` fence.\n- The `yaml` fence uses DESIGN.md Token YAML, a strict YAML subset.\n- Prose should describe how to design with tokens, not repeat hard-coded token values.\n\n---\n\n# Document Structure\n\nDESIGN.md is a Markdown document with a required title, required design sections, optional known sections, and optional unknown sections.\n\n## Title\n\nThe first non-blank line must be exactly one H1 heading:\n\n```md\n# Acme Design\n```\n\nThe H1 is the design system name. A valid file must contain exactly one H1. YAML front matter is not valid; legacy front matter is handled only by `designmd migrate`.\n\n## Section levels\n\nOnly H2 headings define DESIGN.md sections. H3 and deeper headings are prose structure inside the current H2 section.\n\nKnown sections use exact names. Aliases are not valid in the new format.\n\n## Required sections\n\nThese sections are required:\n\n1. `Overview`\n2. `Colors`\n3. `Typography`\n4. `Layout`\n5. `Elevation`\n6. `Shapes`\n\n`Overview` is prose-only. `Elevation` requires prose and may include tokens. `Colors`, `Typography`, `Layout`, and `Shapes` require prose and one final token fence.\n\n## Optional known sections\n\nThese sections are optional:\n\n1. `Metadata`\n2. `Components`\n3. `Iconography`\n4. `Motion`\n5. `Do\'s and Don\'ts`\n\nIf `Metadata` appears, it must be the first H2 section after the H1 and must contain one final token fence. `Metadata` is required when themes are used.\n\nIf `Components`, `Iconography`, or `Motion` appears, the section must include prose and one final token fence.\n\n`Do\'s and Don\'ts` is prose/list-only.\n\n## Canonical order\n\nKnown sections should appear in this order:\n\n1. `Metadata`\n2. `Overview`\n3. `Colors`\n4. `Typography`\n5. `Layout`\n6. `Elevation`\n7. `Shapes`\n8. `Components`\n9. `Iconography`\n10. `Motion`\n11. `Do\'s and Don\'ts`\n\nMissing required sections are errors. Duplicate known sections are errors. Known sections out of order produce warnings. Unknown sections are ignored for order checks.\n\n## Unknown sections\n\nUnknown H2 sections are allowed anywhere. Tools preserve them and do not treat them as design tokens.\n\nCode fences, including `yaml` fences, are allowed in unknown sections and are ignored by token tooling.\n\n## Token fence placement\n\nToken-bearing sections use one normative `yaml` fence. The fence must be the final non-whitespace block in the section.\n\n````md\n## Colors\n\nUse primary color only for the most important action.\n\n```yaml\nprimary: "#1A1C1E"\n```\n````\n\nMultiple `yaml` fences in a known token-bearing section are errors. Non-`yaml` code fences may appear before the final token fence when needed.\n\nYAML fences outside known token-bearing sections are ignored silently.\n\n## Prose requirements\n\nEvery recognized section that appears must include non-empty prose before any normative token fence. Prose explains design rationale and usage. Token fences provide machine-readable values.\n\n---\n\n# Token Syntax\n\nNormative token fences use the Markdown info string `yaml` for editor highlighting, but consumers only need to support DESIGN.md Token YAML: a strict YAML-compatible subset.\n\n````md\n```yaml\nprimary: "#1A1C1E"\n```\n````\n\n## DESIGN.md Token YAML\n\nToken YAML supports:\n\n- maps\n- nested maps by indentation\n- scalar lists\n- double-quoted strings\n- numbers\n\nToken YAML does not support full YAML.\n\nUnsupported syntax includes:\n\n- YAML front matter\n- comments\n- tabs for indentation\n- anchors and aliases\n- merge keys\n- tags\n- block scalars with `|` or `>`\n- flow arrays and flow objects\n- multiple YAML documents\n- booleans and nulls\n- single-quoted strings\n- unquoted string values\n\n## Indentation\n\nIndentation must use two spaces per nesting level. Tabs are invalid. Indentation may only increase by one level at a time.\n\n```yaml\nneutral:\n "50": "#fafafa"\n "900": "#111111"\n```\n\n## Keys\n\nNormal keys are unquoted. Double-quoted keys are allowed when needed. Numeric keys must be double-quoted.\n\n```yaml\nprimary: "#1A1C1E"\nneutral:\n "50": "#fafafa"\n```\n\nKeys must not be empty, contain `.`, `{`, or `}`, or have leading/trailing whitespace. Kebab-case keys and quoted numeric scale keys are recommended. Other valid string keys are accepted with warnings because they may be normalized during export.\n\nDuplicate keys in the same map are errors.\n\n## Values\n\nLeaf values must be double-quoted strings or numbers.\n\n```yaml\nfontSize: "1rem"\nfontWeight: 600\n```\n\nStrings support only `\\"` and `\\\\` escapes. Empty leaf values are invalid. A key with no value must introduce a nested map or scalar list.\n\n## Lists\n\nLists contain only double-quoted strings or numbers. Inline arrays are invalid.\n\n```yaml\nthemes:\n - "light"\n - "dark"\n```\n\n## Token references\n\nToken references use `{path.to.token}`. References may appear as a whole value or embedded inside a string.\n\n```yaml\naccent: "{colors.primary}"\nfocusRing: "0 0 0 3px {colors.focus}"\n```\n\nReferences are allowed in any token leaf. Missing references and reference cycles are errors. Embedded references must resolve to primitive token values.\n\nProse may also use `{path.to.token}`. Token references in prose are validated.\n\n## Token paths\n\nToken paths start with the compiled section group name:\n\n- `colors`\n- `typography`\n- `layout`\n- `elevation`\n- `shapes`\n- `components`\n- `iconography`\n- `motion`\n\nNested map keys become dot-separated path segments.\n\n```yaml\nneutral:\n "50": "#fafafa"\n```\n\nThe token path is `{colors.neutral.50}`.\n\n## Themes\n\nThemes are declared in `Metadata`.\n\n```yaml\nthemes:\n - "light"\n - "dark"\ndefaultTheme: "light"\n```\n\nTheme names must be unique kebab-case strings. `defaultTheme` must match one declared theme.\n\nWhen themes are declared, any map whose keys exactly match all declared themes is a themed token value.\n\n```yaml\nsurface:\n light: "#ffffff"\n dark: "#111111"\n```\n\nScalar values apply to all themes. Partial theme maps are errors. Without `Metadata`, inline theme maps are not recognized as themes.\n\nReferences to themed tokens omit theme names. `{colors.surface}` resolves according to active theme.\n\n## Colors\n\nColor strings support this subset:\n\n- `#rgb`\n- `#rgba`\n- `#rrggbb`\n- `#rrggbbaa`\n- `rgb(...)`\n- `rgba(...)`\n- `hsl(...)`\n- `hsla(...)`\n- `oklab(...)`\n- `oklch(...)`\n- `color(display-p3 ...)`\n- `transparent`\n\nOther named CSS colors are invalid.\n\n## Dimensions and numbers\n\nDimension fields accept quoted CSS length or percentage strings using known CSS units. Numeric `0` is allowed where a dimension is expected.\n\nUnitless non-zero numbers are only valid where the section schema permits numbers, such as `fontWeight`, `lineHeight`, `zIndex`, grid columns, and icon stroke width.\n\n---\n\n# Token Sections\n\nEach known section compiles to one token group. Section prose explains how to apply tokens. Section Token YAML contains machine-readable values.\n\n## Metadata\n\n`Metadata` is optional unless themes are used. If present, it must be the first H2 section after the H1.\n\nAllowed keys:\n\n- `themes`\n- `defaultTheme`\n\n```yaml\nthemes:\n - "light"\n - "dark"\ndefaultTheme: "light"\n```\n\nNo `name`, `description`, or version fields are part of Metadata. The H1 is the design system name. Overview prose is the description.\n\n## Overview\n\n`Overview` is required and prose-only. It describes visual identity, audience, personality, and intended emotional response.\n\n## Colors\n\n`Colors` is required and must define at least one color token.\n\nColor maps may nest. Leaves are color strings, token references, or themed values. Themed values require `Metadata` with declared themes.\n\n```yaml\nprimary: "oklch(62% 0.18 250)"\nsurface:\n light: "#ffffff"\n dark: "#111111"\non-surface:\n light: "#1A1C1E"\n dark: "#F7F5F2"\nneutral:\n "50": "#fafafa"\n "900": "#111111"\n```\n\nRecommended anchors:\n\n- `primary`\n- `surface`\n- `on-surface`\n\nMissing recommended anchors produce warnings, not errors.\n\n## Typography\n\n`Typography` is required.\n\nRequired keys:\n\n- `baseFontSize`\n- `text`\n\nOptional keys:\n\n- `fontFamily`\n- `fontSize`\n- `fontWeight`\n- `lineHeight`\n- `letterSpacing`\n- `measure`\n\n`text` must contain at least one text style. Each text style requires `fontFamily`, `fontSize`, and `lineHeight`.\n\n```yaml\nfontFamily:\n sans: "Inter, system-ui, sans-serif"\n mono: "SFMono-Regular, ui-monospace, monospace"\nbaseFontSize: "16px"\nfontSize:\n "1": "0.875rem"\n "2": "1rem"\n "3": "1.5rem"\nfontWeight:\n "1": 400\n "2": 700\nlineHeight:\n "1": 1.15\n "2": 1.5\nletterSpacing:\n "1": "-0.02em"\n "2": "0em"\nmeasure:\n body: "38rem"\n heading: "28rem"\ntext:\n body:\n fontFamily: "{typography.fontFamily.sans}"\n fontSize: "{typography.fontSize.2}"\n lineHeight: "{typography.lineHeight.2}"\n fontWeight: "{typography.fontWeight.1}"\n heading:\n fontFamily: "{typography.fontFamily.sans}"\n fontSize: "{typography.fontSize.3}"\n lineHeight: "{typography.lineHeight.1}"\n fontWeight: "{typography.fontWeight.2}"\n letterSpacing: "{typography.letterSpacing.1}"\n```\n\nPrimitive typography ramps are optional. Use them when several text styles share sizes, weights, line heights, or letter spacing values.\n\nText style fields:\n\n- `fontFamily`\n- `fontSize`\n- `fontWeight`\n- `lineHeight`\n- `letterSpacing`\n- `fontFeature`\n- `fontVariation`\n\nRecommended text anchors include `body` or `body-md`.\n\n## Layout\n\n`Layout` is required.\n\nRequired keys:\n\n- `spacing`\n\nOptional keys:\n\n- `container`\n- `grid`\n- `breakpoint`\n\n`spacing` must contain at least one dimension token. Spacing values are dimensions or numeric `0`; non-zero unitless numbers belong in other layout fields.\n\n```yaml\nspacing:\n sm: "0.5rem"\n md: "1rem"\n lg: "1.5rem"\ncontainer:\n md: "64rem"\n lg: "80rem"\ngrid:\n columns: 12\n gutter: "{layout.spacing.lg}"\nbreakpoint:\n md: "48rem"\n lg: "64rem"\n```\n\nRecommended spacing anchors are `sm`, `md`, and `lg`. Quoted integer spacing scales such as `"0"`, `"1"`, and `"2"` are also valid anchors and do not produce missing-anchor warnings.\n\n## Elevation\n\n`Elevation` is required. It explains how hierarchy and depth work: shadows, borders, tonal contrast, overlays, or intentionally flat composition.\n\nToken YAML is optional. If present, allowed keys are:\n\n- `shadow`\n- `zIndex`\n\n```yaml\nshadow:\n sm: "0 1px 2px rgb(0 0 0 / 0.08)"\n md: "0 8px 24px rgb(0 0 0 / 0.12)"\nzIndex:\n base: 0\n dropdown: 100\n modal: 1000\n```\n\nSurface and layer colors belong in `Colors`, not `Elevation`.\n\n## Shapes\n\n`Shapes` is required.\n\nRequired keys:\n\n- `radius`\n\nOptional keys:\n\n- `borderWidth`\n- `borderStyle`\n\n`radius` must contain at least one token. `borderStyle` values must be quoted CSS border-style keywords such as `solid`, `dashed`, `dotted`, `double`, or `none`.\n\n```yaml\nradius:\n none: 0\n sm: "0.25rem"\n md: "0.5rem"\n full: "9999px"\nborderWidth:\n thin: "1px"\n thick: "2px"\nborderStyle:\n default: "solid"\n```\n\nRecommended radius anchors are `none`, `sm`, `md`, and `full`. Quoted integer radius scales such as `"0"`, `"1"`, and `"2"` are also valid anchors and do not produce missing-anchor warnings.\n\n## Components\n\n`Components` is optional. It defines component-level design decisions for agents and linters. Components are not exported to CSS by default.\n\nEach component has optional `base` and optional `variants`; at least one must be present. Variant axes are freeform.\n\n```yaml\nbutton:\n base:\n backgroundColor: "{colors.primary}"\n textColor: "{colors.on-primary}"\n radius: "{shapes.radius.md}"\n padding: "{layout.spacing.md}"\n variants:\n intent:\n secondary:\n backgroundColor: "{colors.surface}"\n textColor: "{colors.on-surface}"\n state:\n hover:\n shadow: "{elevation.shadow.sm}"\n```\n\nVariant resolution merges `base` first, then selected variant values by axis. Compound variants are not part of the initial spec.\n\nKnown component properties:\n\n- `backgroundColor`\n- `textColor`\n- `borderColor`\n- `typography`\n- `radius`\n- `borderWidth`\n- `borderStyle`\n- `padding`\n- `gap`\n- `height`\n- `width`\n- `minHeight`\n- `minWidth`\n- `shadow`\n- `zIndex`\n- `transitionDuration`\n- `transitionEasing`\n\nUnknown component properties are preserved and produce warnings.\n\nFlat legacy component maps are preserved by migration but produce warnings in the new format.\n\n## Iconography\n\n`Iconography` is optional. It gives agents and tooling enough context to choose consistent icons. It does not install icon libraries or generate SVGs.\n\nRequired keys:\n\n- `library`\n\nOptional keys:\n\n- `style`\n- `strokeWidth`\n- `grid`\n- `size`\n- `color`\n\n```yaml\nlibrary: "Lucide"\nstyle: "outlined"\nstrokeWidth: 1.5\ngrid: "24px"\nsize:\n sm: "16px"\n md: "24px"\n lg: "32px"\ncolor: "{colors.on-surface}"\n```\n\nRecommended style values are `outlined`, `filled`, `rounded`, `sharp`, and `duotone`. Unknown style values are preserved and produce warnings.\n\nCSS exporters may emit icon size, stroke width, and color variables. `library` and `style` are implementation guidance.\n\n## Motion\n\n`Motion` is optional.\n\nAllowed keys:\n\n- `duration`\n- `easing`\n- `reducedMotion`\n\n```yaml\nduration:\n fast: "150ms"\n medium: "300ms"\n slow: "600ms"\neasing:\n standard: "cubic-bezier(0.2, 0, 0, 1)"\n emphasized: "cubic-bezier(0.2, 0, 0, 1.5)"\nreducedMotion:\n medium: "100ms"\n slow: "100ms"\n```\n\nDuration values are quoted CSS time strings or numeric `0`. Easing values are quoted CSS keywords or supported easing functions: `cubic-bezier(...)`, `linear(...)`, and `steps(...)`.\n\nDurations greater than `200ms` should have same-key entries in `reducedMotion`.\n\n## Do\'s and Don\'ts\n\n`Do\'s and Don\'ts` is optional and prose/list-only.\n\n```md\n## Do\'s and Don\'ts\n\n- Do use one primary action per screen.\n- Don\'t stack cards inside cards.\n```\n\n---\n\n# Linting\n\nThe linter validates document structure, token syntax, section schemas, references, themes, accessibility checks, and export readiness.\n\n## Severity\n\nDiagnostics use only two severities:\n\n- `error` fails default linting\n- `warning` passes default linting but fails `--strict`\n\nSummary data is separate from diagnostics. There is no `info` severity.\n\n```json\n{\n "valid": false,\n "diagnostics": [\n {\n "severity": "error",\n "rule": "missing-section",\n "path": "Typography",\n "message": "Missing required section."\n }\n ],\n "summary": {\n "errors": 1,\n "warnings": 0,\n "tokens": {\n "colors": 3,\n "typography": 2\n }\n }\n}\n```\n\n## Document rules\n\nErrors:\n\n- missing H1 title\n- multiple H1 titles\n- YAML front matter in linted files\n- missing required section\n- duplicate known section\n- missing required prose in a known section\n- missing required token fence in a token-bearing section\n- multiple `yaml` fences in a known token-bearing section\n- normative token fence is not the final non-whitespace block in its section\n\nWarnings:\n\n- known sections out of canonical order\n\nUnknown sections are allowed and ignored for section order. YAML fences outside known token-bearing sections are ignored silently.\n\n## Token syntax rules\n\nErrors:\n\n- invalid DESIGN.md Token YAML syntax\n- invalid indentation\n- comments inside token fences\n- unquoted string values\n- single-quoted strings\n- empty leaf values\n- duplicate keys\n- unsupported YAML features\n\nWarnings:\n\n- keys that are valid but not recommended kebab-case or numeric scale keys\n\n## Schema rules\n\nErrors:\n\n- invalid value type for a known field\n- required section token minimum not met\n- invalid color syntax\n- invalid dimension or time syntax\n- invalid `borderStyle` keyword\n- invalid theme name\n- `defaultTheme` not found in `themes`\n- partial theme map\n\nWarnings:\n\n- unknown keys in known token sections\n- unknown component properties\n- unknown icon style values\n- missing recommended token anchors\n\nUnknown keys and properties are preserved in the parsed result. Current exporters skip them and lint warns that they are not exported.\n\n## Reference rules\n\nErrors:\n\n- token reference path does not exist\n- token reference cycle\n- embedded reference resolves to a non-primitive value\n\nToken references in prose are validated too.\n\n## Prose hard-coded value rule\n\nProse should not use hard-coded token-like values. The linter warns when prose outside code fences contains hard-coded:\n\n- colors\n- dimensions\n- time values\n\nExamples include `#ffffff`, `oklch(...)`, `16px`, `1rem`, and `300ms`.\n\nUse token names or `{path.to.token}` references instead.\n\n## Recommended anchors\n\nWarnings are produced when common anchors are missing:\n\n- Colors: `primary`, `surface`, `on-surface`\n- Typography: `body` or `body-md`\n- Layout spacing: `sm`, `md`, `lg`, unless `spacing` uses quoted integer scale keys such as `"0"`, `"1"`, and `"2"`\n- Shapes radius: `none`, `sm`, `md`, `full`, unless `radius` uses quoted integer scale keys such as `"0"`, `"1"`, and `"2"`\n\nThese anchors are recommendations, not requirements.\n\n## Contrast checks\n\nContrast warnings use WCAG AA normal text threshold `4.5:1`.\n\nThe linter checks:\n\n- semantic color pairs when both exist: `surface`/`on-surface`, `primary`/`on-primary`, `secondary`/`on-secondary`, `error`/`on-error`\n- component `backgroundColor` and `textColor` pairs after base/variant merge\n\nFor themed systems, contrast is checked per theme.\n\nAlpha colors are composited over same-theme `surface` or `background` when available. If no backdrop token is available, tools may skip that pair without producing normal-mode noise.\n\n## Exit codes\n\nDefault linting exits with code `1` when errors exist and `0` otherwise.\n\n`--strict` exits with code `1` when errors or warnings exist.\n\n## CLI and library output\n\nThe CLI hides parsed design system output.\n\nThe library API returns parsed design system data with lint results so generators and agents can reuse one parse pass.\n\n---\n\n# Exporting and Tooling\n\nThe CLI name documented by this spec is `designmd`.\n\n## Commands\n\nCore commands:\n\n```bash\ndesignmd lint DESIGN.md\ndesignmd lint --strict DESIGN.md\ndesignmd export --format css DESIGN.md\ndesignmd export --format css-tailwind DESIGN.md\ndesignmd export --format css --out custom-tokens.css DESIGN.md\ndesignmd export --format css-tailwind --force DESIGN.md\ndesignmd migrate old-DESIGN.md > DESIGN.md\ndesignmd migrate --write old-DESIGN.md\n```\n\nAll commands should accept a file path. Standard input support may be added where useful.\n\n## Library API\n\nThe preferred library API is functional:\n\n```ts\nparseDesignMd(source);\nlintDesignMd(source);\nexportDesignMd(source, { format: "css" });\n```\n\nExact TypeScript interfaces are implementation details until the parser and linter stabilize.\n\n## Export files\n\nExport writes files by default.\n\n| Format | Default output path |\n| -------------- | ------------------------------------------ |\n| `css` | `design-tokens.css` next to the input file |\n| `css-tailwind` | `theme.css` next to the input file |\n\n`--out <file>` overrides the output path. Export fails if the output file already exists. `--force` allows overwriting an existing output file.\n\nExport warnings do not block output. Errors block output and no partial file is written.\n\nSuccessful export prints the path that was written:\n\n```txt\nwrote design-tokens.css\n```\n\n## CSS custom properties\n\nPlain CSS export emits default theme tokens in `:root`.\n\n```css\n/* Generated by designmd from DESIGN.md. Do not edit directly. */\n\n:root {\n --color-primary: #1a1c1e;\n --spacing-md: 1rem;\n}\n```\n\nWhen themes are declared, the default theme emits to `:root`. If `defaultTheme` is absent, the first declared theme emits to `:root`. Non-root themes emit to data-theme selectors.\n\n```css\n:root {\n --color-surface: #ffffff;\n}\n\n[data-theme="dark"] {\n --color-surface: #111111;\n}\n```\n\nReferences become CSS custom property references when possible. Embedded references are replaced inside composite strings.\n\n```yaml\nshadow:\n focus-ring: "0 0 0 3px {colors.focus}"\n```\n\n```css\n--shadow-focus-ring: 0 0 0 3px var(--color-focus);\n```\n\n## CSS variable names\n\nExporters use mapped names, not exact internal paths.\n\n| Token path | CSS custom property |\n| --------------------------------- | --------------------- |\n| `colors.*` | `--color-*` |\n| `typography.fontFamily.*` | `--font-*` |\n| `typography.fontSize.*` | `--text-*` |\n| `typography.lineHeight.*` | `--leading-*` |\n| `typography.letterSpacing.*` | `--tracking-*` |\n| `typography.fontWeight.*` | `--font-weight-*` |\n| `typography.text.*.fontSize` | `--text-*` |\n| `typography.text.*.lineHeight` | `--leading-*` |\n| `typography.text.*.letterSpacing` | `--tracking-*` |\n| `typography.text.*.fontWeight` | `--font-weight-*` |\n| `layout.spacing.*` | `--spacing-*` |\n| `layout.container.*` | `--container-*` |\n| `layout.breakpoint.*` | `--breakpoint-*` |\n| `shapes.radius.*` | `--radius-*` |\n| `shapes.borderWidth.*` | `--border-width-*` |\n| `shapes.borderStyle.*` | `--border-style-*` |\n| `elevation.shadow.*` | `--shadow-*` |\n| `elevation.zIndex.*` | `--z-index-*` |\n| `motion.duration.*` | `--duration-*` |\n| `motion.easing.*` | `--ease-*` |\n| `iconography.size.*` | `--icon-size-*` |\n| `iconography.strokeWidth` | `--icon-stroke-width` |\n| `iconography.color` | `--icon-color` |\n\nToken keys that require normalization are preserved in parsing but may be slugified during export. The linter warns for such keys. If two token paths normalize to the same CSS custom property, export fails.\n\n## Tailwind CSS export\n\n`css-tailwind` emits Tailwind v4-compatible theme variables to `theme.css` by default.\n\n```css\n/* Generated by designmd from DESIGN.md. Do not edit directly. */\n\n@theme static {\n --color-primary: #1a1c1e;\n --spacing-md: 1rem;\n --radius-md: 0.5rem;\n}\n```\n\nTheme overrides emit normal CSS variables under `[data-theme="..."]` selectors.\n\n```css\n@theme static {\n --color-surface: #ffffff;\n}\n\n[data-theme="dark"] {\n --color-surface: #111111;\n}\n```\n\n`css-tailwind` exports Tailwind-native namespaces only: colors, font family, font size, line height, letter spacing, font weight, spacing, container, breakpoint, radius, shadow, and easing. Other CSS-like tokens remain available in plain `css` export.\n\n## Components and iconography\n\nComponents are not exported to CSS by default. They are structured guidance for agents and linting.\n\nIconography exports only CSS-like values such as size, stroke width, and color. `library` and `style` guide implementation and code generation; they do not install packages or generate SVGs.\n\n## Unknown keys\n\nUnknown keys in known sections are preserved in the parsed design system and skipped by current exporters. The linter warns that these keys are preserved but not exported.\n\n## Migration\n\n`designmd migrate` converts legacy frontmatter-based DESIGN.md files into section-local token fences.\n\nDefault behavior writes converted Markdown to stdout. `--write` updates the input file in place.\n\nMigration preserves existing prose where possible and injects tokens into matching canonical sections. It does not invent missing design prose. If the legacy file lacks required sections or required token fields, run `designmd lint` on the migrated file and complete the remaining gaps manually.\n\nLegacy mapping:\n\n- `colors` -> `## Colors`\n- `typography` -> `## Typography` under `text`; `baseFontSize` is derived from `body`, `body-md`, or the first text style font size when available\n- `spacing` -> `## Layout` under `spacing`\n- `rounded` -> `## Shapes` under `radius`\n- `components` -> `## Components`\n\nLegacy section aliases are canonicalized where possible:\n\n- `Brand & Style` -> `Overview`\n- `Layout & Spacing` -> `Layout`\n- `Elevation & Depth` -> `Elevation`\n\nLegacy component maps are wrapped in `base`. The old `rounded` component property is renamed to `radius`. Migration does not infer variants.\n\nLegacy references are rewritten when their target path moved:\n\n- `{spacing.*}` -> `{layout.spacing.*}`\n- `{rounded.*}` -> `{shapes.radius.*}`\n- `{typography.*}` -> `{typography.text.*}`\n\nUnknown legacy root keys are skipped with warnings.\n\nThe migration parser accepts a looser simple legacy YAML subset: maps, nested maps, numbers, double-quoted strings, and simple unquoted strings. It does not support lists, comments, anchors, aliases, tags, flow collections, or block scalars. It outputs strict DESIGN.md Token YAML with double-quoted strings.\n';
|
|
3
3
|
export const agentSpec = '# DESIGN.md agent spec\n\nUse this to create or maintain `DESIGN.md` files. Start minimal. Add optional sections only when user intent or existing document requires them. Do not copy every snippet into every file.\n\n## Required shape\n\n- First non-blank line is exactly one `#` title.\n- YAML front matter is invalid.\n- Required sections: `Overview`, `Colors`, `Typography`, `Layout`, `Elevation`, `Shapes`.\n- Optional known sections: `Metadata`, `Components`, `Iconography`, `Motion`, `Do\'s and Don\'ts`.\n- Canonical order: `Metadata`, `Overview`, `Colors`, `Typography`, `Layout`, `Elevation`, `Shapes`, `Components`, `Iconography`, `Motion`, `Do\'s and Don\'ts`.\n- Known token-bearing sections use prose first and exactly one final `yaml` fence.\n- Prose explains design use. Avoid repeating hard-coded token values in prose.\n\n## Minimal valid file\n\n````md\n# Acme Design\n\n## Overview\n\nAcme uses calm surfaces, clear hierarchy, and restrained depth.\n\n## Colors\n\nUse semantic roles for surfaces, text, and primary actions.\n\n```yaml\nprimary: "#1A1C1E"\nsurface: "#F7F5F2"\non-surface: "#1A1C1E"\n```\n\n## Typography\n\nUse a readable sans-serif stack and body style for interface text.\n\n```yaml\nfontFamily:\n sans: "Inter, system-ui, sans-serif"\nbaseFontSize: "16px"\ntext:\n body:\n fontFamily: "{typography.fontFamily.sans}"\n fontSize: "1rem"\n lineHeight: 1.5\n```\n\n## Layout\n\nUse a compact spacing rhythm with centered content containers.\n\n```yaml\nspacing:\n sm: "0.5rem"\n md: "1rem"\n lg: "1.5rem"\ncontainer:\n md: "64rem"\ngrid:\n columns: 12\n gutter: "{layout.spacing.lg}"\n```\n\n## Elevation\n\nUse borders and tonal contrast for most hierarchy. Reserve shadows for overlays.\n\n## Shapes\n\nUse modest radius for controls and cards.\n\n```yaml\nradius:\n none: 0\n sm: "0.25rem"\n md: "0.5rem"\n full: "9999px"\nborderWidth:\n thin: "1px"\nborderStyle:\n default: "solid"\n```\n````\n\n## Optional snippets\n\n### Metadata and themes\n\nThemes are optional. Omit `Metadata`, `themes`, and `defaultTheme` for single-theme systems. Use themes only when multiple named visual modes exist. Theme maps should be complete for each theme.\n\n```yaml\nthemes:\n - "light"\n - "dark"\ndefaultTheme: "light"\n```\n\nThen put matching theme maps in token sections:\n\n```yaml\nsurface:\n light: "#F7F5F2"\n dark: "#1A1C1E"\non-surface:\n light: "#1A1C1E"\n dark: "#F7F5F2"\n```\n\n### Components\n\nUse components when reusable UI parts need tokenized design rules. Variants override base properties.\n\n```yaml\nbutton:\n base:\n backgroundColor: "{colors.primary}"\n textColor: "{colors.on-primary}"\n typography: "{typography.text.body}"\n radius: "{shapes.radius.md}"\n padding: "{layout.spacing.md}"\n variants:\n intent:\n secondary:\n backgroundColor: "{colors.surface}"\n textColor: "{colors.on-surface}"\n```\n\n### Iconography\n\nUse iconography when icon library, geometry, size, or stroke choices are part of identity.\n\n```yaml\nlibrary: "lucide"\nstyle: "outlined"\nstrokeWidth: 2\ngrid: "24px"\nsize:\n md: "1.25rem"\ncolor: "{colors.on-surface}"\n```\n\n### Motion\n\nUse motion when timing/easing choices affect product feel.\n\n```yaml\nduration:\n fast: "150ms"\n normal: "250ms"\neasing:\n standard: "cubic-bezier(0.2, 0, 0, 1)"\nreducedMotion:\n normal: "100ms"\n```\n\n### Do\'s and Don\'ts\n\nUse this prose-only section for product-specific design guidance.\n\n```md\n## Do\'s and Don\'ts\n\n- Do use one primary action per screen.\n- Don\'t stack cards inside cards.\n```\n\n## Token YAML subset\n\nAllowed inside token fences: nested maps by spaces, scalar lists, double-quoted strings, numbers. Forbidden: comments, tabs, YAML front matter, anchors/aliases, merge keys, tags, block scalars, flow arrays/objects, multiple YAML documents, booleans, null, single-quoted strings, unquoted string values, empty leaf values, duplicate keys.\n\nReferences use quoted `{path.to.token}` strings. Section roots are `colors`, `typography`, `layout`, `elevation`, `shapes`, `components`, `iconography`, `motion`.\n\n## Section key cheat sheet\n\n- `Colors`: semantic color tokens like `primary`, `on-primary`, `surface`, `on-surface`, `secondary`, `error`.\n- `Typography`: `baseFontSize`, `fontFamily`, optional primitive ramps `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`, `text`, `measure`; text style keys include `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`, `fontFeature`, `fontVariation`.\n- `Layout`: `spacing`, `container`, `grid`, `breakpoint`.\n- `Elevation`: `shadow`, `zIndex`.\n- `Shapes`: `radius`, `borderWidth`, `borderStyle`.\n- `Components`: component names with `base` and optional `variants`; properties include `backgroundColor`, `textColor`, `borderColor`, `typography`, `radius`, `borderWidth`, `borderStyle`, `padding`, `gap`, `height`, `width`, `minHeight`, `minWidth`, `shadow`, `zIndex`, `transitionDuration`, `transitionEasing`.\n- `Iconography`: `library`, `style`, `strokeWidth`, `grid`, `size`, `color`.\n- `Motion`: `duration`, `easing`, `reducedMotion`.\n\n## Common mistakes\n\n- Do not add front matter before title.\n- Do not put Markdown after token fence in same known token-bearing section.\n- Do not put comments inside `yaml` fences.\n- Do not use unquoted or single-quoted strings.\n- Do not add optional sections or comprehensive token sets unless useful for user goal.\n';
|
|
4
4
|
//# sourceMappingURL=spec-content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-content.js","sourceRoot":"","sources":["../../../src/core/spec/spec-content.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,MAAM,CAAC,MAAM,SAAS,GACpB,
|
|
1
|
+
{"version":3,"file":"spec-content.js","sourceRoot":"","sources":["../../../src/core/spec/spec-content.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,MAAM,CAAC,MAAM,SAAS,GACpB,on2BAAon2B,CAAC;AAEvn2B,MAAM,CAAC,MAAM,SAAS,GACpB,w2KAAw2K,CAAC"}
|
|
@@ -242,7 +242,9 @@ function validateShapes(sectionToken, diagnostics) {
|
|
|
242
242
|
const radiusMap = validateMapEntry(sectionToken, diagnostics, radius, "Shapes.radius");
|
|
243
243
|
if (radiusMap !== undefined) {
|
|
244
244
|
validateDimensionMap(sectionToken, diagnostics, radiusMap, ["radius"], true);
|
|
245
|
-
|
|
245
|
+
if (!hasQuotedIntegerKey(radiusMap)) {
|
|
246
|
+
warnMissingAnchors(sectionToken, diagnostics, radiusMap, ["none", "sm", "md", "full"], "Shapes.radius");
|
|
247
|
+
}
|
|
246
248
|
}
|
|
247
249
|
const borderWidth = findEntry(root, "borderWidth");
|
|
248
250
|
const borderWidthMap = validateMapEntry(sectionToken, diagnostics, borderWidth, "Shapes.borderWidth");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-schemas.js","sourceRoot":"","sources":["../../../src/core/validation/section-schemas.ts"],"names":[],"mappings":"AAIA,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,iBAAiB;IACjB,WAAW;IACX,aAAa;IACb,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,aAAa;IACb,SAAS;IACT,KAAK;IACL,QAAQ;IACR,OAAO;IACP,WAAW;IACX,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,oBAAoB;IACpB,kBAAkB;CACnB,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG;IACtB,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,aAAa;IACb,eAAe;CACP,CAAC;AAEX,MAAM,oBAAoB,GAAG;IAC3B,YAAY;IACZ,cAAc;IACd,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,SAAS;IACT,MAAM;CACE,CAAC;AAEX,MAAM,UAAU,sBAAsB,CAAC,aAA4C;IACjF,MAAM,WAAW,GAAiB,EAAE,CAAC;IAErC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,iBAAiB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAE7C,QAAQ,YAAY,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;YACtC,KAAK,UAAU;gBACb,gBAAgB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;gBAC5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C;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,OAAO,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC"}
|
|
1
|
+
{"version":3,"file":"section-schemas.js","sourceRoot":"","sources":["../../../src/core/validation/section-schemas.ts"],"names":[],"mappings":"AAIA,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,iBAAiB;IACjB,WAAW;IACX,aAAa;IACb,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,aAAa;IACb,SAAS;IACT,KAAK;IACL,QAAQ;IACR,OAAO;IACP,WAAW;IACX,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,oBAAoB;IACpB,kBAAkB;CACnB,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG;IACtB,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,aAAa;IACb,eAAe;CACP,CAAC;AAEX,MAAM,oBAAoB,GAAG;IAC3B,YAAY;IACZ,cAAc;IACd,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,SAAS;IACT,MAAM;CACE,CAAC;AAEX,MAAM,UAAU,sBAAsB,CAAC,aAA4C;IACjF,MAAM,WAAW,GAAiB,EAAE,CAAC;IAErC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,iBAAiB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAE7C,QAAQ,YAAY,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;YACtC,KAAK,UAAU;gBACb,gBAAgB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;gBAC5C,MAAM;YACR,KAAK,QAAQ;gBACX,cAAc,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;gBAC1C,MAAM;YACR,KAAK,YAAY;gBACf,kBAAkB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;gBAC9C,MAAM;YACR,KAAK,QAAQ;gBACX,cAAc,CAAC,YAAY,EAAE,WAAW,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