What is DESIGN.md for Windsurf?
DESIGN.md is a visual design brief that Windsurf reads before editing React, Tailwind, or shadcn code. It defines color roles, typography, spacing, component behavior, and anti-patterns — giving Cascade and Command a stable reference instead of making independent visual decisions for each edit.
How do I use DESIGN.md with Windsurf Cascade?
Place DESIGN.md in the repo root and reference it at the start of Cascade sessions: "Follow DESIGN.md as the design source of truth. Use existing components first. Explain any conflicts before editing." For smaller Command edits, add a brief pointer: "Match the component states described in DESIGN.md."
What should a Windsurf-ready DESIGN.md include?
Product mood, color tokens mapped to CSS variables or Tailwind classes, typography scale, spacing rhythm, component variants for the most common elements, page layout patterns, and explicit anti-patterns. Note which Windsurf mode each rule is most relevant for — Cascade for layout and page-level decisions, Command for component-level edits.