DB

Interactive guide

The AGENTS.md safety system

Give an AI coding agent the keys to your business and it will do exactly what you asked — including the parts you never thought to forbid. AGENTS.md is the file that forbids them. It sits in a code repository, every agent reads it before touching anything, and it outranks whatever got typed into the chat box.

This is ours. The same rule set runs across ten repositories: one master copy, clear guardrails, two inspectors, and a human who holds the keys. Sixteen numbered rules in the order the work actually happens, plus one hard stop that no amount of passing tests can talk its way past.

The diagram below is interactive — click any block for the rule, why it matters, and the specific failure it prevents. Steal whatever is useful.

The AGENTS.md safety system: sixteen rules in four rows — give everyone the same map, fix the house rather than paint over the crack, put the work through two inspections, and a final human approval gate.
The whole system on one page. The clickable version is right below — every block opens the rule behind it.

The AGENTS.md safety system

How to keep AI agents from wrecking your business.

One master copy. Clear guardrails. Two inspectors. Courtney holds the keys.

Click a colored block to explain it ↓

Red light means stop: The Hard stops in AGENTS.md outrank every deadline, shortcut, and agent decision. Think of them like the emergency brake—when one is triggered, the agent stops and asks Courtney.

1 — Give everyone the same map

2 — Fix the house, don’t paint over the crack

3 — Put the work through two inspections

4 — Courtney holds the final key

Shared AGENTS.md rules — identical across all ten repos

Tier 1 — Hard stops approval required every time

Git

claude/ branch only · Show diff, then stop · Never force-push main · Stage explicit paths · Don’t touch others’ branches · Uncommitted work → stop

Deploys + database

Push is the deploy · No production deploys, promotes, or rollbacks · Write migrations, don’t run them · No schema changes · Reads are fine; writes need approval · Never edit a shipped migration

Secrets + money

Never print secrets · Never rotate credentials · Never edit .env in place · Stripe test mode only · No live payments

Deletion + customer data

No rm -rf or DROP · Deactivate, don’t delete · Never touch real personally identifiable information · Synthetic fixtures only

Sending + spending

Never send to real addresses · No manual cron fires · No paid API without approval

Routines + incidents

Edit the file, not the trigger · Stop and report incidents; don’t self-fix

Approval + scope

Four words count as approval · Approval applies once to one action · Not in plan → ask · Not in docs → ask

Think red traffic light: nobody gets to decide it is inconvenient and drive through it.

Tier 2 — Code review gate always in this order

1. Automated review

SonarQube for 2 designated repos. Semgrep for the other 8 repos.

2. Human review

Show Courtney the final scoped diff, test evidence, regression results, scanner findings, and remaining risk.

3. Push approval

Courtney reviews and explicitly says push. Until then, stop.

Think home inspection: the builder checks the work, an outside inspector checks it again, then the owner accepts the keys.

Tier 3 — Medium risk ask first

Stack + claims

Stack is locked · No new dependencies · No fabricated statistics · No ranking or revenue guarantees

Identity + her documents

First name only · Never rewrite her .md · Quote, propose, wait

Diff + infrastructure

Stay inside the diff · One concern per commit · No side-effect infrastructure

Search Engine Optimization + legal

Ask before robots, canonicals, or redirects · Regulated text is propose-only

PDF

No overlapping elements · SAFE_BOTTOM = 36pt · Render and check every page

Think permission fence: the agent can see the next yard, but it must ask before stepping into it.

Tier 4 — Low risk just do it this way

Commands

Run lint, build, and tests · Use newest Python · Never claim an unrun check

Conventions

Use docs/ and scripts/ · One concern per file · Commit message via a -F file

Reporting + voice

Every task ends with a summary · Tone and voice are specific to each property

Think closing checklist: routine steps happen every time so nothing small is forgotten.

Only one section changes by repository: “This repo specifically.” Everything above stays shared across all ten repos.

The simple version: one master copy → separate drafts → real fix → two inspections → Courtney turns the key.

This is what running a back office on AI actually looks like. Not a prompt — a file, a gate, and a human who signs off. If you want the same discipline pointed at your business, that is what we do.