How I Built Lazarus: Autonomous Legacy Resurrection with Kiro Specs, Custom MCP, and Differential Fuzzing
Engineering teams sit on unmaintained legacy JavaScript modules they are afraid to touch because manual rewrites introduce silent edge-case regressions. For Kiroween 2026 (Frankenstein category), I built Lazarus — an aut
Engineering teams sit on unmaintained legacy JavaScript modules they are afraid to touch because manual rewrites introduce silent edge-case regressions. For Kiroween 2026 (Frankenstein category), I built Lazarus — an autonomous legacy resurrection engine that stitches an isolated execution sandbox together with a 4-agent Kiro Crew and fast-check property-based differential fuzzing.
- Live Operating Table: https://lazarus-yf0a.onrender.com
-
GitHub Repository &
.kiro/Artifacts: https://github.com/anjarkar25-max/lazarus - Social Blitz Post (#KiroweenHackathon26): https://x.com/ashlesha_25/status/2121502679369421082
Why Unit Tests Miss Legacy Regressions
Consider a classic ES5 32-bit integer truncation expression: (n / 2) | 0. A naive modernization replaces | 0 with Math.floor(n / 2). On positive integers, both match. On negative odd integers like -3, (-3 / 2) | 0 evaluates to -1, whereas Math.floor(-3 / 2) evaluates to -2.
How Lazarus Proves Behavioral Parity
-
Isolated Sandbox (
src/sandbox/): Executes untrusted legacy code in a locked-down Node child process with strict memory, timeout, filesystem, and network restrictions. -
Custom MCP Server (
lazarus-sandbox): Exposesrun_legacy_probeover stdio in.kiro/settings/mcp.jsonso agents safely probe legacy expressions. -
4-Agent Kiro Crew (
.kiro/agents/):- Archaeologist probes boundary inputs to capture baseline runtime traces.
- Architect synthesizes observed behavior into formal Kiro specifications.
- Necromancer modernizes the code to ES2022+.
-
Exorcist runs
fast-checkdifferential fuzzing (Object.isparity checks for-0vs+0,NaN, and integer truncation). When Exorcist finds a divergence, it shrinks the input to a minimal counterexample and feeds it back to Necromancer to self-heal automatically.
Engineered with Kiro Spec-Driven Development
Every subsystem in Lazarus was designed using formal requirements, architecture designs, and implementation task lists inside .kiro/specs/, paired with repository-wide steering guidelines (.kiro/steering/) and an automated on-save Vitest hook (.kiro/hooks/run-tests-on-save.json) verifying 86 passing tests across 10 suites.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.