In plain words
A project rules file is a note the agent reads at the start of every chat: which tools you use, how to run the app, what never to do.
Where you see it
CLAUDE.md for Claude Code, AGENTS.md for Codex and several other agents, .cursor/rules in Cursor, and the Knowledge section in Lovable's project settings. It's how you stop repeating "we use Supabase, not Firebase" in every chat.
What goes wrong
- Writing an essay
A rules file hundreds of lines long gets followed patchily. Keep the rules that prevent real mistakes and cut the rest.
- Letting it go stale
The file still says Prisma, but you moved to Drizzle in March. The agent trusts the file and writes code for a tool you no longer use.
- Rules nobody can check
"Write clean code" changes nothing. "Run the build before you finish" is something the agent can do and you can see.
- Always write clean, high-quality code
What to tell your agent
Quick check
Sign in to earn +10 XP for itEvery new Cursor chat suggests Firebase, but your app uses Supabase. Best fix?