Skip to lesson
Exit
Review, verify & guardrails1 / 3

1 min lesson

Guardrails: rules and approvals

Put this idea into your own words: "Let the agent move fast on reversible edits, and slow it down where a mistaken command changes shared state."

Step 1 of 3

Let the agent move fast on reversible edits, and slow it down where a mistaken command changes shared state.

Learn more

Advanced table

Action

Action
Edits, renames, refactors
Auto-run or hold
Auto-run. git puts it back.
Action
Package install
Auto-run or hold
Hold. It rewrites the dependency tree.
Action
File deletion
Auto-run or hold
Hold. The file may not be committed yet.
Action
Network call
Auto-run or hold
Hold. It leaves your machine.
Action
Reading or writing secrets
Auto-run or hold
Hold. A leak is not reversible.
Action
Database write
Auto-run or hold
Hold. Shared state, other people's data.
Action
Deploy
Auto-run or hold
Hold. Everyone sees it.
Your two guardrails
Project rules
Project RulesVersion-controlled instructions in the repo that every Cursor agent interaction inherits, so standards are encoded once. Press Enter for the full definition. are version-controlled conventions kept in .cursor/rules as .mdc files. You choose how each one applies: always, when its description matches the work, on matching file globs, or only when you @-mention it.
Command approvals
Auto-RunThe Cursor Settings > Agents setting that decides which commands the agent runs automatically and which wait for your approval, via allow and block lists. Press Enter for the full definition. (Cursor Settings → Agents → Auto-Run): which commands fire automatically, which wait for your click, set by allow and block lists.
Write it once

If you correct Agent the same way twice, make it a rule. That is a one-line .mdc file under .cursor/rules, not a sentence you retype in every prompt.

Learn more

Optional practice

Practice: Guardrails: rules and approvals

QWhat's the difference between a project rule and a command approval?

QAgent is about to run four commands. Which one should wait for your click?