Design capture and DESIGN.md

Design context for AI coding agents through measured components, text, colour, spacing, states and DESIGN.md export.

Luci Capture measures rendered DOM styles, interactive states and layout structure on live pages so AI coding agents work from measured values instead of screenshot estimates.

Four capture tools

ToolCapturesOutput options
ComponentAnatomy, tokens, states, motion, accessibility and image slotsThis one, The whole system (variants) or This section
TextFont family, size, line height, weight and letter spacingThis one or The whole system (grouped by role)
ColourElement colours or Pixel eyedropper under the pointerThis one, The whole system or Image (palette estimate)
SpacingPadding, margin, gaps and distance dragged between two elementsAll values on an element, one value or The whole system

There is also a Whole page capture that writes text styles, colours, spacing and every component kind on the current page into one file.

States and responsive tables

Component captures record hover, focus, focus-visible, active and disabled states and state how each was read.

After capturing a component or section, How it changes by width reads it across the site's media query breakpoints and adds a Responsive table showing what changes at each width.

Images and page text are not copied

Luci never copies image files, image URLs or page copy. When a component contains an img, video, canvas, SVG picture or background image, the capture records an image slot describing its size, aspect ratio, fit, corners and overlays so your agent can place your own asset there.

Basket, Use my tokens and DESIGN.md

  • Basket: collect captures across pages or sites, add notes under any item, merge page systems into site-wide files, compare two items side by side or export everything as one .collection.design.md file.
  • Use my tokens: map measured values onto your project's own custom properties (--space-4, --luci-color-primary).
  • DESIGN.md (Stitch): switch the output format to DESIGN.md (Stitch) to copy, download or export captures in the open DESIGN.md format.

Saving into your project

In the dev toolbar (luci serve), press Save to project to write captures directly into .luci/design/, where your agent lists them with list_captures and reads them with get_capture.

From the CLI, you can also build a baseline from your own stylesheets or crawl routes:

bash
# Build project.system.*.design.md from your stylesheets (--stitch also writes DESIGN.md)
luci capture baseline --stitch

# Crawl multiple routes and merge them into site-level systems
luci capture crawl / /pricing /docs --base http://localhost:3000 --stitch