Migration and Contract Review

•
120
•

Reviews database migrations and API contract changes to prevent breaking schema alterations, lock contention, and consumer outages.

Migration and Contract Review equips Claude Code with architectural safeguards inspired by strong_migrations, Squawk, and Google AIP-180 to evaluate database schema migrations and API contract modifications. It inspects code diffs and technical specifications to flag hazardous DDL operations—such as unbatched backfills, volatile column defaults, non-concurrent index builds, and unvalidated foreign keys—that trigger table locks or deployment downtime. Furthermore, it enforces the expand-and-contract pattern across distributed services and mobile clients, guaranteeing that database changes and API contracts preserve backward compatibility with running code during rollbacks and phased rollouts.

Key Features

01Enforces expand-and-contract patterns for safe column drops, renames, and type modifications
02120 GitHub stars
03Validates PostgreSQL safety rules including concurrent index creation and two-step constraint validation
04Evaluates database migrations for production-blocking locks, table rewrites, and rollback hazards
05Audits API endpoints, DTOs, and event payloads for breaking consumer contract changes per AIP-180
06Verifies backward compatibility across cross-repo consumers, dependent services, and mobile clients

Use Cases

01Reviewing pull requests containing SQL DDL migrations to prevent production table locks and outages
02Verifying backward compatibility for REST endpoints, DTOs, and event schemas across client versions
03Designing multi-stage deployment plans and rollback strategies for high-traffic database updates