Guide · Solo builders
Vibe coding without breaking production: a 15-minute guardrail setup
Vibe coding is great until the thing has users. Then every "quick change" from the agent risks breaking sign-up, payments or the one export a customer depends on, and you're the only reviewer.
This is a setup you can do in 15 minutes that keeps the speed and removes most of the risk.
1. Git habits that save you
- Commit before every agent task. A clean starting point makes every agent change easy to see and easy to undo.
- One task per commit. Don't let a session sprawl across five features.
- Branch for anything risky. Payments, auth and data changes get their own branch.
2. Write down what must keep working
List the five things that would hurt most if they broke. For most products: sign-up, sign-in, the core action, payments, and one integration. For each, find or write the command that proves it works, even if it's a single test.
npx stet-cli init
stet lock add "Sign-up works" --cmd "npm test -- tests/signup"
stet lock add "Stripe checkout creates a session" --cmd "npm test -- tests/checkout"
stet lock add "Public API shape" --snapshot "node scripts/print-api-routes.js"
3. Give every task a scope
stet scope set "Add dark mode toggle" --allow "src/theme/**,src/components/Settings.tsx"
The scope goes into AGENTS.md and CLAUDE.md, so Claude Code, Cursor and Codex see it. If you work in ChatGPT or Claude in the browser, stet context builds a paste-ready pack with the rules, scope and the relevant code, so you stop uploading your whole source folder.
4. One command before you commit
stet scope done --commit
That runs the scope guard and your locks, then commits only the task's files with a generated message, and closes the scope. If something outside the task changed, or a locked behaviour broke, it stops and tells you. Prefer it automatic? stet hook install runs the guard on every commit.
5. Log decisions as you make them
stet decide "Prices are stored in cents" --why "Avoid rounding bugs"
Decisions go into the rules file, so next week's agent session doesn't undo this week's choice.
What this doesn't replace
You still need to read what the agent wrote, and real tests are still worth writing. This setup makes sure the things you already know matter can't break silently while you move fast.
FAQ
Is vibe coding safe for production apps?
It can be, with guardrails: a clean commit before each task, a scope for every task, the behaviours that matter locked with commands that prove them, and a check before every commit.
Do I need lots of tests first?
No. Start with one proof command for each of the five things that would hurt most if they broke, and add more as you go.
Does this work if I code in ChatGPT, not an IDE?
Yes. stet context builds a paste-ready pack of the rules, scope and code for any AI chat; you then run stet guard and stet check on the result in your repo.
Put guardrails on your AI coding agent
Stet is a free, open-source CLI and MCP server for Claude Code, Cursor, Codex and Copilot. It runs locally: no account, your code never leaves your machine.
npx stet-cli init · Install · Setup guide · GitHub