Cursor
A brand rule Cursor applies to every edit
The exact files Glyph writes, shown here for an example brand called Ledgerly. Yours use your own colors, fonts and logo.
---
description: Ledgerly design system. Apply to every UI change.
alwaysApply: true
---
Follow DESIGN.md for every component, page and style change.
- Use only the variables in brand/tokens.css. Never write a raw hex value, and never use Tailwind's default palette (blue-500, indigo-600, slate-*) for brand UI.
- Buttons and links use the --ds-action-* and --ds-text-link tokens; the primary (#0F766E) appears on one action per view.
- Type is "Manrope" for headings (weight 500) and "Inter" for body text (weight 400). No other typeface, and no Inter fallback in its place.
- Dark mode comes from the .dark token values. Do not add dark: color variants by hand.
- Status is a word plus --ds-status-* color, never a colored dot alone.
- Reuse existing components before writing new ones; never invent a token, button style or radius that is not in DESIGN.md.
- No gradients, glass, pills for static tags, eyebrow labels or "Learn more →" links.
Why it drifts
Why Cursor loses your brand
Rules that are not always applied
A project rule without alwaysApply only loads when Cursor decides it is relevant, which a quick styling edit often is not. The generated rule sets alwaysApply: true.
Tab completions follow the file, not the brand
Completions copy whatever classes sit nearby. When the nearby classes are tokens, completions stay on-brand; when they are raw Tailwind colors, the drift spreads.
Each chat starts from scratch
A brand pasted into one chat is unknown to the next. The rule file is part of the repo, so every chat and every teammate gets the same instructions.
Dark mode gets bolted on
Asked for dark mode, Cursor adds dark: variants component by component. The tokens already carry dark values, and the rule tells Cursor to use them.
Setup
Set it up in Cursor
- 01
Create the brand in Glyph from a sentence about your product or from the site you already shipped with Cursor.
- 02
Save the rule as .cursor/rules/brand.mdc, DESIGN.md in the project root and brand/tokens.css beside your global styles.
- 03
Import brand/tokens.css in app/layout.tsx (or your global stylesheet) so the --ds-* and brand utilities exist before Cursor uses them.
- 04
Open Cursor Settings → Rules to confirm the brand rule shows as always applied, then ask for your next screen.
Questions
Common questions.
- Where do Cursor rules go?
- Project rules live in .cursor/rules as .mdc files with a short frontmatter. The generated brand.mdc uses alwaysApply: true so it loads on every request.
- Does Cursor read AGENTS.md too?
- Glyph writes an AGENTS.md alongside the rule for agents that read that file. Keeping both in the repo costs nothing, since both point at the same DESIGN.md.
- How do I stop Cursor from using default Tailwind colors?
- Map your colors to named utilities (the generated tokens.css adds bg-brand-primary and friends under Tailwind v4's @theme) and keep the rule that bans the default palette for brand UI.
- Will the rule slow Cursor down?
- The rule is short on purpose: the key constraints, with the full system in DESIGN.md for when Cursor needs the detail.