When should you use it?
- An agent is building a multi-tenant app
- You are about to launch to paying users
- Customer data must stay separated
Not for: Single-user prototypes; Apps with no customer data
What do you need, and what do you get?
You need
- Repo and environments
- Database policies
- Auth setup
- Deployment config
You get
- Checklist results per layer
- Tenant isolation test
- Environment map
How does it work, step by step?
- Map environmentsWrite down which database, keys and URLs each environment uses.
- Test tenant isolationLog in as two test tenants and try to read each other's data.
- Check token handlingConfirm tokens are encrypted once and refresh correctly.
- Lock settingsTrack environment variables in a reviewed file so reverts show up.
- Recheck on every deployRun the same checks after each agent change before release.
The prompt
Our own prompt, inspired by u/rohynal on r/replit and written to work in Custom agent. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
Review this multi-tenant app before release. Repo: {repo}. Environments: {envs}. 1. List every table and its row-level security policy; flag any query using a key that bypasses policies. 2. Trace OAuth token storage and confirm it is encrypted exactly once. 3. Show which database URL each environment uses. 4. Write a test where tenant A tries to read tenant B's records. Report results; do not change production.
Inspired by u/rohynal on r/replit: My first serious Replit build: a production multi-tenant SaaS in 15 days (and the lessons I’m still using every day). The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Security policies that look present but are bypassed by a service key.
- A live deployment that still reads and writes the development database.
Our take
This is one of the most concrete lists of AI build failures we have seen, and each item maps to a check you can run in minutes. The theme is silent failure: things that look configured but are not. Treat the agent's work like a junior engineer's and verify layers where a mistake leaks one customer's data to another. Write each check as an automated test the agent must keep passing, so a later change that weakens isolation fails loudly. Write down which database, keys and URLs each environment uses, then log in as two test tenants and try to read each other's data. Confirm tokens are encrypted once and refresh correctly. Track environment variables in a reviewed file so silent reverts show up. Watch for security policies bypassed by a service key and for production still wired to the development database. Run these checks after every agent change. Prototypes can skip some of this.
Where the time goes back: A short pre-release checklist catches the failures that would cost customer trust.
FAQ
Where is the full write-up?
Can the agent test this itself?
Source and credit
Inspired by u/rohynal on r/replit. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- My first serious Replit build: a production multi-tenant SaaS in 15 days (and the lessons I’m still using every day)
- Creator
- u/rohynal on r/replit
- Published on
- Original date
- Dec 2, 2025
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Custom agent
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends, bookings or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.