Design-system rules Cursor actually follows
Product and designDesign engineer and frontend team using Cursor and Claude Code
Our Cursor rule file grew to 4k tokens: use Button from ui/, spacing in 4s, no raw hex colours, icon sizes. It loaded in full on every prompt, and the agent still used a raw <button> half the time because rule 31 got lost in the middle.
Why does Cursor ignore my design system rules, and how do I make it use our components?
Add each design token rule on ArcRoom's Rules page, including one on your ui folder saying what lives there. Every agent gets the rules at the start of each session. The same rules reach Claude Code in the same repo. A lint rule is still the real guard.
Also asked as: My Cursor rules file is huge and the agent still uses raw buttons. What can I do? · How do I give an AI agent only the design rules that matter for each prompt? · Can Cursor and Claude Code share the same design system rules?
A rule on src/components/ui says what lives there.
Code map: src/components/ui: design-system primitives; use Button/Input from here, never raw elements
Step by step
- A rule on src/components/ui says what lives there.
- Each token rule is a rule on the Rules page.
- Every agent gets the rules at the start of each session.
- The same rules reach Claude Code sessions in the same repo.
What the agent sees
Code map: src/components/ui: design-system primitives; use Button/Input from here, never raw elements
Recall (Cursor, 'add a settings form'): 3 rules: ui/ inputs · spacing in 4px steps · colours from tokens.tsCompared with today's tools
Cursor rules (.cursor/rules)
Keep the design-system rules in Cursor rule files, scoped by folder.
- Setup
- 1–2 hours
- Ongoing
- Trim and update rules as the system grows
ArcRoom
Every agent reads the team playbook before it works and writes to it when it finishes. Nothing to update by hand.
- Setup
- 2 min per agent (npx arcroom init --agent cursor)
- Ongoing
- None
Folder-scoped Cursor rules work well inside Cursor but don't reach Claude Code; Mem0's OpenMemory works in both but only when the agent chooses to search.
Where it stops
Recall is a reminder, not enforcement. A lint rule that bans raw <button> is still the real guard.
Try it in your project
Works with the agents your team already uses, and any agent over MCP or the HTTP API.