Skip to content

An open-source, faster Devin alternative

TypeScript

docs(agents): add hard rule — production DB is effectively read-only

Igor Zalutskie63949deeb54
diff --git a/AGENTS.md b/AGENTS.md
index ff82986f..3326a637 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -42,6 +42,35 @@ Managed-agent product behavior is mostly **not** implemented here:
## Hard rules
+**⚠️ PRODUCTION DATABASE IS EFFECTIVELY READ-ONLY.** This is the most
+load-bearing safety rule in this repo. Any Postgres connection that reaches the
+production DB (via the Azure bastion `oc-bastion` / `20.65.57.133` to host
+`10.200.1.8`, or any non-localhost host using credentials from
+`~/Digger/gstack/opencomputer/.env`) is governed by two tiers, both stricter
+than normal collaboration:
+
+- **Modifying SQL** (`INSERT`, `UPDATE`, `DELETE` with WHERE, `COPY` into a
+ table, mutating function calls, manual migrations, `cmd/migrate-prices`-style
+ tools pointed at prod): requires **explicit per-statement approval** from
+ the user. Show the exact statement, ask, wait. A general "yes go ahead"
+ earlier in the conversation does NOT carry across to a different statement.
+ Blanket approvals ("just do whatever you need") MUST NOT be accepted for
+ prod writes — confirm each statement individually.
+
+- **Destructive SQL** (`DROP`, `TRUNCATE`, schema-changing `ALTER`, unbounded
+ `DELETE` / `UPDATE`, anything `CASCADE`, anything bulk-mutating that can't be
+ undone with a single inverse statement, any direct write to
+ `schema_migrations`): **REFUSE OUTRIGHT.** First response is always no.
+ Tell the user this is the standing safety rule; require them to insist
+ across multiple turns with explicit acknowledgement of what will be lost
+ before any such command runs. There is no "production emergency"
+ justification for shortcutting this — an emergency is exactly when wrong
+ commands cause the most damage.
+
+`localhost` Postgres on a developer machine is exempt — these tiers apply only
+to production. Read-only queries (`SELECT`, `EXPLAIN`) against prod are fine
+and do not require approval.
+
**NEVER force push.** `git push --force`, `git push -f`, and
`git push --force-with-lease` are forbidden. No exceptions. Make a new commit
instead.