v0.11.0 — latest release

Audit risky MySQL & TiDB DDL & DML before it ships

DeltaScope helps teams catch dangerous DDL and DML before changes reach a database. Use the same offline-first audit engine in migration review, CI pipelines, HTTP services, and AI-assisted SQL workflows.

$ curl -fsSL https://raw.githubusercontent.com/Fanduzi/DeltaScope/main/install.sh | sh
Go 1.26 CLI MCP Server HTTP API Agent Ready Apache 2.0

DDL and DML mistakes are cheap before execution and expensive after

DeltaScope gives DBAs, application engineers, CI systems, and AI agents one consistent way to review DDL and DML before rollout. The goal is simple: catch risky changes early, keep policy consistent, and avoid discovering preventable issues after a migration or script has already run.

🧱

Stop dangerous schema changes early

Catch risky DDL such as destructive ALTER TABLE operations, missing comments, or policy violations before migration tools ever touch the database.

🚦

Turn DDL and DML review into a repeatable gate

Use the same audit logic in local review and CI so developers do not get one answer locally and a different answer in automation.

🔌

Keep one audit contract across workflows

CLI, HTTP, MCP, and Go library integrations all return the same underlying findings, verdicts, and rule identifiers.

Start where risky DDL and DML actually show up

DeltaScope is most useful at the moments when teams make high-impact DDL and DML decisions: before merging migrations, inside CI, and inside agent-driven coding loops.

🗂️

Review migration DDL before rollout

Audit migration files before they are applied so destructive changes, missing governance details, and schema policy violations are caught while they are still cheap to fix.

Read migration workflow
🔒

Gate risky DML in CI

Block merges or deployments when statements cross your configured threshold. This works well for teams that want dangerous DELETE and UPDATE patterns stopped automatically.

Read CI workflow
🤖

Review AI-generated SQL with structure

Give agents a stable JSON contract, stable rule IDs, and explicit verdicts so they can revise unsafe SQL without scraping prose or guessing what failed.

Read AI agent workflow

Submit DDL or DML, evaluate against policy, get a clear outcome

DeltaScope is offline-first by default. You can audit DDL and DML with no database connection, then optionally add live metadata when your workflow needs instance-aware checks.

Provide DDL or DMLfile, stdin, API, or library call
Evaluate policyDDL and DML rules run consistently
Get a verdictpass, review, or reject
Offline-first Run on laptops, in CI, or in agent sessions without injecting database credentials into every workflow.
Policy-driven Enable, disable, or tune rule severity through configuration instead of forking logic across tools.
Metadata-aware when needed Attach live schema and instance facts only for checks that need them, without changing the core audit path.

Keep one DDL and DML audit path across humans, CI, and agents

DeltaScope covers both governance and automation: safe local review for humans, stable structured output for machines, and one engine that stays consistent across delivery surfaces.

🛡️

Coverage for DDL and DML

Audit both schema changes and data-changing statements instead of stitching together separate tools for separate risk categories.

📄

Stable machine-readable results

Return verdicts, findings, and rule IDs in a predictable structure that CI systems and AI agents can rely on.

⚙️

Policy as configuration

Change enforcement without changing code. Teams can start with blockers only, then tighten to warnings as confidence grows.

🌐

One engine across surfaces

Use the same audit behavior from the CLI, inside services, through MCP tooling, or by embedding the Go library directly.

📡

Optional live metadata

Stay offline when you want portability and safety. Add instance-aware checks only when your workflow needs real schema context.

🧠

Built for human and agent workflows

Readable output for engineers, structured output for automation, and stable contracts for agentic review loops.

Three levels, clear outcomes

Every finding maps to a severity. Every audit request maps to a verdict. You can keep the same model across local review, CI, services, and AI workflows.

🛑
blocker
SQL must not be applied as-is. This usually means a policy violation or a meaningful risk of outage, data loss, or corruption.
⚠️
warning
The change should be reviewed before applying. It may be valid, but it deserves explicit human sign-off.
ℹ️
notice
Informational only. Worth surfacing, but not something that should block rollout by itself.

Verdict calculation

Verdict Condition Exit Code (CLI)
reject ≥ 1 blocker finding 1 (when --fail-on blocker)
review No blockers, ≥ 1 warning or notice 1 (when --fail-on warning)
pass No findings at any level 0

Built-in rules, ready to use

Stable dotted rule IDs let teams inspect, tune, and discuss the same checks across CLI, CI, services, and agent workflows.

Rule ID Area Default Level Description
dml.where.require DML blocker DELETE or UPDATE must include a WHERE clause
dml.limit.forbid DML warning UPDATE and DELETE statements must not include LIMIT
dml.subquery.forbid DML blocker UPDATE and DELETE statements must not include subqueries
ddl.column.comment.require DDL warning Columns must have a comment
ddl.table.comment.require DDL warning Tables must have a comment
ddl.alter.drop_column.forbid DDL warning ALTER TABLE drop column is forbidden
ddl.alter.merge.mysql.require DDL warning Multiple ALTER TABLE statements on the same table should be merged
ddl.index.key_length.max_bytes.require DDL blocker Index key length must stay within InnoDB instance limits
# View all rules $ deltascope rules list # Show detail for one rule $ deltascope rules show dml.where.require # Audit with custom policy $ deltascope audit --file ./migrations.sql --config ./strict-policy.yaml

Use the same audit engine where your team already works

Product surfaces matter, but they matter more after the homepage has already earned trust. DeltaScope keeps them aligned so teams do not have to duplicate DDL and DML review logic.

CLI

Fast local review for developers, scripts, and migration checks.

🌐

HTTP API

Expose the same audit engine as a service for internal tooling and platform workflows.

🤖

MCP Server

Plug DDL and DML review into Claude Code, Codex, Cursor, and other agent-driven environments.

📦

Go Library

Embed DeltaScope directly inside Go services that need deterministic DDL and DML audit behavior.

From quick audit to CI gate

Three distinct examples: one for unsafe DML, one for migration DDL, and one for machine-readable CI output.

# ── DML: reject an unsafe DELETE ── $ deltascope audit --sql "delete from users" Verdict: reject Statements: 1 Blockers: 1 Warnings: 0 Notices: 0 Statement 1: DELETE [blocker] dml.where.require: DELETE or UPDATE must include a WHERE clause
# ── DDL: review a migration before rollout ── $ deltascope audit --file "./migrations/20260322.sql" Verdict: review Statements: 1 Blockers: 0 Warnings: 1 Notices: 0 Statement 1: CREATE TABLE [warning] ddl.column.comment.require: column `id` must have a comment
# ── CI / JSON output ── $ deltascope audit \ --sql "alter table users drop column age" \ --format json \ --fail-on warning { "verdict": "review", "summary": { "blockers": 0, "warnings": 1, "notices": 0 }, "statements": [ ... ] }

Trust the contract, not just the changelog

DeltaScope is open source, ships published releases, documents its contracts, and keeps one audit path across human and machine workflows. Those are stronger trust signals than broad promises.

📘

Documented concepts

Core concepts, recipes, and references are published for teams that need implementation depth after the homepage overview.

🧾

Stable rule IDs

Findings are grounded in stable dotted identifiers so humans and automation can speak about the same rule consistently.

📦

Published releases

Installers, release artifacts, and release notes are already part of the product story, which matters for adoption and automation.

🔍

Offline-first by default

Teams can adopt the tool without granting database access to every local, CI, or agent execution environment.

Shipping steadily across CLI, HTTP, MCP, and library workflows

Recent releases show the product getting more usable in real delivery paths: CI integration, HTTP readiness, MCP tooling, and a more complete audit contract.

2026-03-30
v0.11.0 latest
GitHub Actions composite action, GitLab CI examples, /readyz endpoint, structured JSON access logs, and graceful shutdown.
2026-03-29
v0.10.0
HTTP adapter, API-key auth, rate limiting, and Prometheus metrics support.
2026-03-28
v0.9.0
Homebrew distribution and Claude Code skill support for agent-driven review.
2026-03-27
v0.7.0
Official MCP stdio server with audit_sql, describe_rule, list_rules, and get_capabilities.
2026-03-25
v0.6.x
Richer explanations in audit results, including why, risk, suggestion, and metadata notes.
2026-03-21
v0.5.0
First release with CLI, HTTP, offline DDL/DML rules, and the public Go API.

Put DDL and DML review earlier in the workflow

Install once, audit locally, gate in CI, and reuse the same policy everywhere.