Home / Lessons / Set the boundaries / 17 of 27
Never test against production data
Agents need somewhere they can break things.
- Agents get a full copy with the same shape as production.
- They can break it.
- And rebuild it. No customer ever saw any of that.
- There is no route from here to the real thing.
Tests run against an isolated database branch, with separate test data and separate permissions. Agents can run migrations, create records and exercise failures there without touching a real customer.
The isolation covers four things: where the connection points, the data, the permissions and the migration path. A test command must point only at the isolated environment. A test has no path to production.
How I do it
My isolated branch is called v2-test. Only test migrations run there.
The rule
Give agents a full copy of the shape of production and no route to the real thing.
Rule 17. Give agents a full copy of the shape of production and no route to the real thing. (Never test against production data, https://chiefofagents.si/one-page#rule-17)
The skill I use for this: /principle-boundary-discipline. Made by Lauren Tan.
Read next
This lesson as plain text, for your agent. Or all 27 on one page.