From evidence to migration: what we are researching now
Reading a system is shipped. Moving it is the research. How an intermediate representation, slice contracts, bounded models and fail-closed gates fit together.
Lift: one representation for every language
Normalized ASTs are language-shaped. To move meaning between languages we need a lower, shared form: an intermediate representation in static single assignment form, where every value is defined once and control-flow joins are explicit phi nodes. The open problem is preserving the source-traceability that makes our evidence useful: every IR instruction must point back to the AST node it came from.
Plan: waves cut from the graph
The dependency graph already tells us a safe order. Using commander's real module graph of 13 edges and 0 cycles, a leaf-first ordering produces five waves:
- Wave 1error.jssuggestSimilar.js
- Wave 2argument.jsoption.js
- Wave 3help.js
- Wave 4command.js
- Wave 5index.js
Each slice gets a written contract before any code changes: the symbols it exports, the calls it receives, the invariants its tests must keep, and the unresolved edges a human must sign off.
Forge: bounded generation
A model receives only the evidence slice for one unit of work, not the repository. Output is typed and every generated line cites the source nodes it came from. Smaller context means fewer retries and cheaper review, and a model never becomes the authority on what the old code did.
Prove: fail closed
Candidates compile in an isolated sandbox, run differential tests against the legacy behavior, and must hold their slice invariants. One failing gate blocks the candidate. Then an engineer reviews the evidence, the diff and every verdict, and signs.