Home / Tutorial · ✦ Official

Project Rules for Design Consistency (.cursor/rules)

Cursor Team · Cursor Docs ·

Cursor's official Rules system lets you pin reusable, scoped instructions — including a design-system rule that encodes tokens, spacing and component conventions — so every generation stays on-brand. Covers MDC format, globs, and auto-attached vs. always-on rules.

Publisher summary

Rules let you provide persistent, reusable context to the Agent. Use a project rule to encode your design system so generated UI follows your tokens and conventions.

In this article

  • Project rules live in .cursor/rules as MDC files
  • Scope rules with globs (e.g. components/**)
  • Always-on vs. auto-attached vs. agent-requested rules
  • Encoding a design system: tokens, spacing, typography
  • Nested rules for monorepos and sub-packages

Source: Cursor Docs

Read original Content lives on the original publisher's site.
Curated for the Cursor-Design community as a first-party reference on designing with Cursor.