Home / Start here

How it works

MigraSutra turns a repository into reviewable evidence in five steps. Nothing from your project is ever executed.

The whole flow#

From repository to reviewed decision

scan.json

Findings with file, line, rule ID and a SHA-256 of each source.

plan.json

One field change, its baseline hash, prerequisites and rollback notes.

rehearsal.json

Before and after hashes. Tests and rollback are marked as not run.

gate.json

NO_GO or REVIEW_REQUIRED with every reason listed.

Step 1: Scan#

The scanner reads only an allow-list of files. It refuses symbolic links and files over 1 MiB, and hashes everything it reads.

EcosystemWhat happensDepth
SQL migrations7 rulesrules
npm3 rules, plan and rehearsaldeepest
Python requirements1 rulerules
Dockerfile1 rulerules
Go, PHPInventory with countsinventory
Java, pyproject, .tool-versionsDetected onlypresence
.NET, Rust, Kubernetes, OpenTofuNot read yetroadmap

Step 2: Check SQL#

Comments and quoted strings are blanked first, so a DROP TABLE inside a comment is not reported.

How one SQL file is checked
High rules5 / 13
Medium rules7 / 13
Low rules1 / 13
The 13 rules by severity

Step 3: Plan one change#

You name the target, such as npm:express@5.0.0 or node:22. The plan records the old value, the new value and the hash of the file it was based on.

Step 4: Rehearse safely#

What a static rehearsal really does

Step 5: Gate#

How the release verdict is decided. There is no automatic GO.
NO_GOA high-severity static finding exists, or the rehearsal failed. Fix this first.
REVIEW_REQUIREDThe best possible result. A person must review. Tests and rollback were not run.
UNVERIFIED_EXTERNALEvidence you imported. It is recorded and never raises the verdict.
GO_CANDIDATEReserved for a future policy with verified tests. Not implemented.

Reading a report#

Findings are sorted from high to low. The chart below comes from the bundled risky sample.

High4 / 8
Medium4 / 8
Low0 / 8
Findings in the bundled risky fixture (8 total), read from the generated audit.json

Open the risky sample report to see the full layout.

Safe schema changes#

  1. 1. ExpandAdd the new column as nullable. Old code keeps working.
  2. 2. Dual writeThe application writes both old and new columns.
  3. 3. BackfillCopy history in small batches. Check the counts.
  4. 4. Switch readsRead the new column. Keep the old one for rollback.
  5. 5. ContractAfter a safe window and a tested restore, drop the old column.

With an AI coding assistant#

The 20 skills tell an assistant how to run the CLI and how to treat evidence. They do not replace the CLI output.

How the agent skills use the CLI

What never happens#

The tool does

  • Read allow-listed filesmanifests, Dockerfile, SQL migrations
  • Hash and matchdeterministic rules, stable evidence IDs
  • Write reportsonly where you point --out
  • Rehearse in a temp folderdeleted afterwards

The tool never

  • Runs your codeno installs, scripts, tests or migrations
  • Calls the internetno cloud, no telemetry, no keys
  • Edits your sourcetests compare bytes before and after
  • Reads .env filesunlisted files are ignored