Write Rules Once, Stop Repeating Yourself to Cursor
- #engineering
- #cursor
- #ai
- #architecture
I used to explain our folder structure to Cursor every single morning.
"We use feature folders."
"We use React Query."
"Please don't create another Button component."
Every.
Single.
Morning.
The recipe card on the wall
Walk into a good restaurant kitchen and you'll often see recipe cards pinned to the wall.
Momo filling: these ingredients, this ratio, this much salt.
A new cook doesn't need to ask the head chef every time.
They read the card.
The momo tastes the same on Monday and Friday.
That's what project rules are for Cursor.
What goes on the card
Cursor supports project rules: instructions saved in your repository that it can pick up automatically, so you don't have to paste them every time.
Mine include things like:
- Tech stack and versions
- Folder structure
- Naming conventions
- "Use the shared components in src/ui"
- "Never call the API directly from components"
- How we write tests
Short.
Specific.
Boring.
That's what makes them work.
Bad card, good card
Bad:
Write clean code and follow best practices.
Good:
- React Native + TypeScript, strict mode
- Features live in src/features/<name>
- API calls only through src/services
- Use React Query for server state
- Reuse components from src/ui before creating new ones
- Every new service needs a unit test"Best practices" means something different to everyone.
"API calls only through src/services" means exactly one thing.
Update the card when it fails
Whenever Cursor does something I don't like, I ask:
"Is this missing from the rules?"
Usually it is.
I add one line.
The mistake doesn't come back.
The card gets better every week.
Final thoughts
Repeating yourself isn't a prompting skill.
It's a missing recipe card.
Write the rules once.
Pin them to the wall.
Then spend your mornings building, not re-explaining your folder structure for the hundredth time.