docs: add strong guardrails against MCP migrations in CLAUDE.md and AGENTS.md

Prevents agents from using apply_migration or DDL via execute_sql,
which breaks CI by creating remote migration entries without local files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jjbruntonandClaude Opus 4.5 committed 2026-01-31 22:21:48 +00:00
1 parent 307af2c1e9
commit 73d7c1a200
2 files changed
+56 -15

No files matched your search

+14
View File
@@ -5,3 +5,17 @@
- npm run lint
- npm run typecheck
- npm run build
## Database Migrations - MANDATORY RULES
**NEVER use `mcp__sauci-prod__apply_migration` or `mcp__sauci-non-prod__apply_migration`.** These create migration records in the remote database without local files, which breaks CI/CD deployments.
**NEVER run DDL (`CREATE`, `ALTER`, `DROP`) via `mcp__*__execute_sql`.** This changes the schema with no migration tracking.
**All schema changes must be local migration files:**
1. Run `supabase migration new <name>` to create the file
2. Edit the file in `apps/supabase/migrations/`
3. Use idempotent SQL (`IF NOT EXISTS`, `CREATE OR REPLACE`)
4. Commit the file — CI deploys it automatically
**`execute_sql` is ONLY for SELECT queries.** No exceptions.