Since Cursor shipped its planning mode with persistence in a file, I decided to polish and publish my own set of rules for Cursor. It came together from working on a couple dozen projects and now it’s successfully (I think) used in a couple of companies. It was used both for code and for infrastructure (Terraform, Ansible, Helm).
The core idea is to work together with the agent while keeping control over the process, acting as a guardrail between stages and switching them explicitly via @task-*.
Key principles:
- instruction unification (in progress): setting up a new project should boil down to choosing rules and editing
main.mdc; - splitting instructions into types:
task-*[Apply Manual] — task stages;rules-*[Always Apply] — work rules: TDD, code style, etc.docs-*[Always Apply] — documentation rules;run-commands.mdc[Always Apply] — describing console commands for maintaining the project;howto-*[Apply Intelligent] — automatic instructions for situational tasks that may come up for the model during work;
- documentation as the agent’s long-term memory:
- all project documentation must live in the repo;
- two documentation схемes: cline-bank (7 files) and a simplified one (Software Requirements Specification + Software Design Specification, 4 files);
- docs in a compact style, plus a separate task for compacting them;
- saving the current task to a file (
./documents/whiteboard.md) to hand off between chats and stages; - maximum automatic regression control: the whole project check is reduced to a single command (
./run check) so the agent can’t run only part of the checks; the same command is used in CI; - a single entrypoint for all project commands (
./run).
The rules are far from perfect and I don’t have time to polish them properly, but they work — and they work much better than a bare IDE.