agentleFS
GhostwheeIGhostwheeI/Master-Planner/.cursor/rules/001-planning-safety.mdc

Master-Planner / rules

Cursor rule0 starsChanged 5 months agoMITView on GitHub

Prevents premature implementation and destructive actions during planning

  • Deletes or force-pushes
  • Installs packages
  • Commits and pushes

The file

We split this 001-planning-safety.mdc into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    No implementation before plan approval: Do not write, generate, or modify production source code (.js, .ts, .py, .go, .rs, .java, .rb, …

    line 11
  2. Very specific:

    No destructive commands during planning: Do not execute rm -rf, DROP TABLE, git push --force, docker system prune, or any irreversible …

    line 12
  3. Very specific:

    No unreviewed third-party installs: Do not run npm install, pip install, cargo add, npx, or any package manager command without explicit …

    line 13
  4. Distinctive:

    No secrets in planning docs: Never write API keys, passwords, tokens, or PII into any planning artifact.

    line 14
  5. Distinctive:

    When the agent drifts from the planning workflow, escalate gradually:

    line 23

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
001-planning-safety.mdc
---
description: Prevents premature implementation and destructive actions during planning
globs: *
alwaysApply: true
---
# Planning Safety

## Hard Blocks
These are non-negotiable. The agent must refuse and explain why.

1. **No implementation before plan approval.** Do not write, generate, or modify production source code (`.js`, `.ts`, `.py`, `.go`, `.rs`, `.java`, `.rb`, `.swift`, `.kt`, etc.) unless `.cursor/plans/<project>/manifest.md` explicitly shows `Status: READY_FOR_DEV` or the user has explicitly approved the plan and requested implementation.
2. **No destructive commands during planning.** Do not execute `rm -rf`, `DROP TABLE`, `git push --force`, `docker system prune`, or any irreversible command during any planning phase.
3. **No unreviewed third-party installs.** Do not run `npm install`, `pip install`, `cargo add`, `npx`, or any package manager command without explicit user approval. Propose the install, explain why, and wait.
4. **No secrets in planning docs.** Never write API keys, passwords, tokens, or PII into any planning artifact.

## Permitted During Planning
- Example code in markdown fenced blocks (for illustration, not execution).
- Research commands (`curl` to test a public API, `npx --help` to check a tool's interface).
- File reads to understand existing codebase.
- Creating/updating `.cursor/plans/` artifacts.

## Soft Enforcement Escalation
When the agent drifts from the planning workflow, escalate gradually:
- **Silent**: Agent is following the plan. No intervention needed.
- **Hint**: "Note: we haven't completed the spec yet. Want to finish that first?"
- **Warning**: "Warning: implementation is being attempted before the plan is approved."
- **Hard stop**: Refuse the action and cite this rule.

## Anti-Rationalization

| Excuse | Reality |
|--------|---------|
| "The change is trivial, no plan needed" | If it is tiny and implementation was explicitly requested, proceed without harness planning. If design decisions exist, create a lightweight plan. |
| "The user seems impatient" | A bad plan wastes more time than a quick spec. |
| "I can plan and code simultaneously" | This is how drift starts. Finish the plan first. |
| "The plan is obvious, I'll just start" | For non-tiny work, write the obvious plan. It takes 30 seconds. |

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.