revamp
Large rewrites preserve behavior by separating mechanical translation from redesign. Source: https://bun.com/blog/bun-in-rust. Any executor follows repository model routing; invocation alone authorizes no agents.
1. Baselines before any code
- Freeze known defects so regressions remain distinguishable from old bugs.
- Benchmark throughput, memory, artifact size, and latency on the same workload/hardware.
- Count assertions; exit with none skipped, weakened, or deleted.
2. Tests are implementation-independent
Tests must target a language-independent CLI/API boundary, not the implementation being replaced. If coupled, decouple first as phase 0.
3. Mechanical first, idiomatic later
Translate 1:1, preserving architecture, names, and structure. Refactor only after parity. Port plus redesign makes failures ambiguous. Choose and record big-bang when bridges would linger; choose incremental when the system must keep shipping.
4. Trial run before fleet
Port three representative files through translate -> compile -> adversarial review -> tests. Use the trial to calibrate prompts, checks, and queue before scaling.