Skip to content

docs: KEEP-432 document @requires-db-prep directive and merge gate#1293

Open
OleksandrUA wants to merge 1 commit into
stagingfrom
KEEP-432-updating-documentation-and-instructions
Open

docs: KEEP-432 document @requires-db-prep directive and merge gate#1293
OleksandrUA wants to merge 1 commit into
stagingfrom
KEEP-432-updating-documentation-and-instructions

Conversation

@OleksandrUA
Copy link
Copy Markdown

Summary

Documents the @requires-db-prep directive and db-prep-check merge gate that were introduced during KEEP-432 incident response. No code changes - reference docs only.

Tracking: KEEP-432

Why now

The mechanism was added in PR #1219 (and merged via #1281 + #1283), but the contract (when to use the directive, how to author a migration, the operator runbook) lives only in PR comments and commit messages right now. This makes it discoverable to both humans and AI agents who read CLAUDE.md / AGENTS.md when working in this repo.

What changed

  • CLAUDE.md: adds a Heavy DDL Migrations subsection under the existing Database Migrations section. Covers: when to use the directive, how to author the SQL, the pre-merge operator runbook, what the gate does, and what happens on deploy.
  • AGENTS.md: existing Database Migrations bullets were outdated (said "Never Write Manual Migrations" and listed db:push as the apply step, neither of which match how this repo actually works). Corrected to match CLAUDE.md and adds a one-line bullet pointing at the directive with a pointer to the full operator runbook.

What did NOT change

  • No new markdown files (per CLAUDE.md rule "No Random Documentation").
  • README.md untouched. The README is high-level setup; migrations live in CLAUDE.md / AGENTS.md where developers actually look.
  • No spec or design-system docs touched.

Test plan

  • Read both files in the diff; ensure the operator runbook is unambiguous
  • Confirm wording is consistent with what we actually did for KEEP-432 (workflow file path, label names, branch protection check name)

Adds the operator runbook and authoring contract for the new
@requires-db-prep directive that was introduced as part of the
KEEP-432 incident response.

- CLAUDE.md gets a "Heavy DDL Migrations" subsection under the
  existing Database Migrations section: when to use the directive,
  how to author a migration that uses it, the operator runbook for
  the manual CREATE INDEX CONCURRENTLY step, the db-prep-check
  workflow + db-prepped-<branch> label gate, and what happens on
  deploy (no-op via IF NOT EXISTS).
- AGENTS.md gets its Database Migrations section corrected
  (previously said "Never Write Manual Migrations" and listed
  db:push as the apply step, both wrong for this repo) and gains
  a bullet pointing at the directive with a one-line summary.

No code changes. Reference docs only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant