Give the agent project rules and context
rules & mcp
// what it does
The CLI uses the same rules system as the editor: put rule files under .cursor/rules and they load automatically based on their configuration. The CLI also reads an AGENTS.md or CLAUDE.md at the project root and applies it as rules, so instructions you already keep for other agents carry over. Use rules to encode conventions like "use pnpm, not npm" once instead of repeating them per prompt.
// shell
$ mkdir -p .cursor/rules$ printf '# Project rules\nUse pnpm, never npm. Run pnpm lint before finishing.\n' > AGENTS.md