RepositoryTypeScript
google-labs-code

google-labs-code/design.md

A format specification for describing a visual identity to coding agents. DESIGN.md gives agents a persistent, structured understanding of a design system.

29.3kstars
2.4kforks
28issues
2views

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·TypeScript

#1 Repository Của Tuần

📐 A bridge between design intent and code

DESIGN.md gives agents a persistent, structured understanding of a design system.

DESIGN.md is a format specification for describing a visual identity to coding agents. It combines machine-readable design tokens (YAML front matter) with human-readable design rationale (markdown prose), so agents get exact values plus the reasoning behind them. An agent reading a DESIGN.md file will produce a UI matching the defined palette, typography, spacing, and component styles.

✨ Highlights

  • Machine-readable tokens: YAML front matter provides exact values for colors, typography, spacing, and more.
  • Human-readable rationale: Markdown prose explains why values exist and how to apply them.
  • Linting: Validates DESIGN.md files, catches broken token references, checks WCAG contrast ratios, and outputs structured JSON.
  • Diffing: Compares two versions of a design system to detect token-level and prose regressions.
  • Structured CLI: Runs via npx @google/design.md lint or diff commands with clear JSON output.
  • Token types: Supports colors, dimensions, token references ({path.to.token}), and typography objects.
  • Component tokens: Maps component names to sub-token properties like backgroundColor, textColor, and rounded.
  • Section ordering: Enforces a standard order for design sections (Overview, Colors, Typography, etc.).

💡 Why it matters

DESIGN.md standardizes how visual identity is communicated to coding agents, reducing ambiguity and inconsistency in UI generation. Instead of scattering design decisions across documents or code comments, teams can encode their design system in a single, structured file that both humans and agents understand.

It fits naturally into modern design-to-code workflows, especially where AI agents or automated tools generate UI from design specs. By making design intent explicit and actionable, it helps ensure that generated interfaces stay faithful to the intended brand and aesthetic.


#DesignSystem #AIDevelopment #OpenSource #TiniX