Home › Any stack › Universal vibe-coding guardrails
Universal vibe-coding guardrails
Always-on Cursor rules that keep any AI agent careful: plan first, small diffs, verify, never fake it.
CursorAny stack
How to use
Save this as .cursor/rules/guardrails.mdc in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.
.cursor/rules/guardrails.mdcDownload ---
description: Universal agent guardrails
alwaysApply: true
---
# Guardrails for AI coding agents
## Plan
- Restate the goal in one sentence. If requirements are ambiguous, ask before coding.
- For changes touching more than 3 files, write a short plan first.
## Edit
- Read the files you will change before editing them.
- Make the smallest diff that works. Don't refactor or rename unrelated code.
- Match existing patterns, naming, and libraries in the repo. Don't add dependencies silently.
- Never delete tests to make them pass. Never hardcode values to satisfy a test.
## Verify
- Run the project's lint, typecheck, and tests. Report real output, not assumptions.
- If you couldn't run something, say so plainly.
## Safety
- Never commit secrets or print `.env` contents.
- Ask before destructive actions: dropping data, force-pushing, deleting files, running migrations on shared DBs.
## Report
- End with: what changed, files touched, how it was verified, and any follow-ups.