Aug 6, 2026 · v0.4.0

Only the Verification Layer

Breaking, despite being a minor. The refactoring product this package grew out of has been removed: six commands, the 20 AST transforms, the interactive TUI, blast-radius scoring and the tier taxonomy. They were the demo of the verification engine, not the product. verify-diff and the MCP tool are untouched.

Refactron is now only a verification layer. verify-diff and the verify_change MCP tool are exactly what they were in 0.3.0, down to the report shape. Everything that surrounded them, the refactoring product this package grew out of, has been removed from it.

Under semver a 0.x release may carry breaking changes in a minor, and this one does. Read the Removed section before upgrading: there is no major-version bump to warn you, so ^0.3.0 will not pull this in but refactron@latest will. The 0.3.0 entry below says nothing was renamed, removed, or redefined. That was true of 0.3.0 and is explicitly untrue of this release.

Removed

Six commands, the transforms behind them, and the interactive UI.

RemovedWas
refactron analyzescan for transform patterns, blast radius, tier
refactron runplan, verify and apply transforms
refactron documentgenerate docstrings and changelog prose
refactron rollbackundo the last applied refactor
refactron preflightSQLAlchemy 1.x to 2.0 safety report
refactron initscaffold .refactronrc.json
bare refactronthe interactive Ink REPL

Also removed: the 20 AST transforms and their LibCST sidecars, the autofix fixers, blast-radius scoring, the tier taxonomy, the .refactron/ session store, the legacy verification engine, the language-adapter layer, and the src/core/models.ts and src/adapters/interface.ts locked contracts.

Why: they were the demo of the verification engine, not the product. They were also most of the package. What remains is about a sixth of the source and all of what people install it for.

Changed

  • Bare `refactron` prints help and exits 2 instead of opening the TUI.
  • An unknown command exits 2 and says so, rather than failing to resolve a module.
  • `refactron login` is a real command. Previously only login --print-token was dispatched, and it discarded the status callback, so the device code and verification URL were never displayed. Status now goes to stderr, which keeps --print-token pipeable.
  • `--help` describes this product. It advertised six departed commands and called Refactron “safety-first refactoring”, the pre-pivot positioning.

Added

  • A library entry point. main and types have pointed at dist/index.js since before 0.2.0, but no such file existed, so import { verifyDiff } from 'refactron' never resolved. src/index.ts now exports verifyDiff, RefactronVerifier, checkPythonSyntax, checkTypescriptSyntax, reportCoverage, the VerdictReport type and the contracts.ts surface.
  • A help-drift test. tests/unit/cli/help-drift.test.ts asserts that every verb the help advertises is actually dispatched, against the built binary.

Fixed

  • `build:copy-py` could fail silently. Its trailing || true bound to the whole && chain, so a failure to copy the *verification* sidecars exited 0: green build, green CI, then every Python verdict failing at runtime against a missing sidecar. The build now asserts all three sidecars reach dist/.

Internal

  • 18 unused runtime dependencies dropped, including ink, react, ts-morph and the three tree-sitter packages. Five remain.
  • The pre-merge gate no longer runs analyze src/ against this repo. It gates the shipped artifact instead. It deliberately does not run verify-diff against this repo either: coverage attestation is Python-only, so a TypeScript repo verifying itself caps at UNPROVEN permanently.

TransformId still lists the 20 transform literals. Narrowing a locked contract in the same release that restructures the repo would make any regression un-bisectable, so it waits for a later major.