Menu

Linting a DESIGN.md before your AI coding agent reads it
📰

Linting a DESIGN.md before your AI coding agent reads it

DEV Community: css·Casper Tran·5 days ago
#H9uTvz0y
#devtocss#devto#dev#colors#design
Reading 0:00
15s threshold

DESIGN.md is a Markdown file with YAML front matter that tells an AI coding agent what your UI looks like: colors, type, radii, spacing and a few components. The tokens go in the front matter, and the Markdown body says how to use them. Google publishes the format along with a CLI, @google/design.md , that lints it.

I wrote a first draft by hand for Northwind Roasters, a fictional coffee shop site I use for demos, ran the linter (v0.4.0), and fixed what it found. Here is what it caught, and what it doesn't check.

The first draft

This is the kind of file you write in five minutes from DevTools:

--- version : alpha name : "Northwind Roasters" colors : brand : "#c2410c" amber : "#f59e0b" background : "#fffaf3" surface : "#f6eadb" text : "#2b1d14" muted : "#7a6656" components : button-primary : backgroundColor : "{colors.brand}" textColor : "#ffffff" badge-new : backgroundColor : "{colors.amber}" textColor : "#ffffff" card : backgroundColor : "{colors.surfce}" textColor : "{colors.text}" ---

Enter…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.