Skip to content

typesafe-migration-guard

CI gate that asks Jev to classify database migration DDL as SAFE or DANGER and blocks destructive changes before they reach Supabase.

Projectprototype

Overview

Typesafe Migration Guard intercepts database migrations in CI/CD pipelines and deployment runners. It sends DDL statements to Jev through the TypeSafe SDK and receives a typed SAFE or DANGER decision with probabilities. Destructive operations such as DROP TABLE, DROP COLUMN and unindexed truncation are blocked with an HTTP 403 before the migration touches a live Supabase PostgreSQL database. It works with Prisma migrations and a GitHub Actions workflow.

The README argues that regex and AST linters miss edge cases while chat LLMs are slow and hard to parse, and cites 150 to 400 ms per decision for Jev. A video walkthrough is linked. Some claims in the README (such as "deterministic" gating) are the author's framing; a model-based check should still be combined with review for high-stakes schema changes.

What the decision model decides

TypeQuestionAnswers
ChoiceIs this migration SAFE or DANGER?SAFE · DANGER

How it works

  1. A push triggers the CI pipeline.
  2. The migration's DDL is sent to the guard API.
  3. Jev classifies it as SAFE or DANGER.
  4. DANGER returns 403 and stops the deployment.

Strengths

  • Catches destructive DDL before it reaches production.
  • Fast enough for CI per the README (150 to 400 ms).
  • Video walkthrough available.

Caveats

  • Model-based judgment; not a replacement for review on risky migrations.
  • Tied to Supabase and Prisma in the example.

At a glance

Type
Project
Status
prototype
Runtime
API endpoint + GitHub Actions
Has code
yes

Use cases and integrations

How curated lists describe it

  • Automated database migration safety reviewer powered by TypeSafe AI (Jev System One model).

    hellogumbo/awesome-jev

Frequently asked questions

What does Jev decide?

Whether a migration's DDL is SAFE or DANGER.

What happens on DANGER?

The guard returns 403 and the migration is blocked.

Which stack does it target?

Supabase PostgreSQL with Prisma migrations and GitHub Actions.

Related projects

  • Coding-agent hook that asks Jev one yes/no per project rule on every edit or turn and makes the agent fix any violation.

    HookbetaTypeScript
  • Claude Code plugin that scores a turn's redacted diff on eight Jev risk axes at Stop and asks Claude to reinvestigate once if high.

    ProjectbetaGo
  • Compiler that turns agent rules in CLAUDE.md and similar files into testable Jev programs: typed questions plus a coded verdict.

    ProjectbetaTypeScript
  • Zero-dependency Python toolkit of nine agent skills whose typed decisions pass a code gate and are sealed in a hash-chained ledger.

    ProjectbetaPython
  • Pi extension that checks proposed code edits against repository Markdown rules with Jev, reporting rule text and line ranges.

    ProjectbetaTypeScript
  • Stop hook for Claude Code and Codex that refuses 'done' until a check passes after the last edit; Jev advises but never causes a block.

    CLIbetaTypeScript