Windsurf
Windsurf supports context injection via a rules file in your project root. Pair it with tokens.css in your stylesheet directory so Cascade suggestions naturally reference the correct token values.
Setup
Step 1: Create the rules file
Add a windsurf.rules or .windsurfrules file to your project root. Paste the Quick Reference (Section 0) from your exported layout.md into it:
# Design System Rules
<!-- Paste Quick Reference from layout.md here -->Windsurf reads this file automatically and injects the content as context on every Cascade prompt.
Step 2: Copy tokens.css into your project
Copy tokens.css from your export bundle into your stylesheet directory:
cp path/to/export/tokens.css src/styles/tokens.cssStep 3: Import tokens.css in your global stylesheet
Import the file at the top of your global CSS to make all design tokens available as CSS custom properties throughout your project:
/* In your globals.css or app.css */
@import "./tokens.css";With the token values present in your source files, Cascade suggestions will naturally use the correct values when generating CSS or component styles.
layout.md or tokens.css open in a tab during UI generation sessions gives Cascade the full token inventory to draw from.Why tokens.css matters
The rules file tells Windsurf what design system to follow. The token file makes those values available as concrete CSS custom properties. When Cascade generates a component that uses var(--color-primary), the actual value is defined in tokens.css, so there is no guesswork and no magic strings.