Developers drowning in abandoned open-source projects now have a new local-first tool to help them: Inheritance Engine. Built by developer Shailesh Vats for the Hacktoberfest Open-Source AI Challenge, the workbench uses a team of Gemma 4 agents running entirely on a local laptop to find, understand, and repair repositories that have gone quiet. The twist? The original code acts as a hard verification gate, rejecting AI patches that change behavior even if unit tests pass.
The Problem with Blind AI Repair
Vatsβ motivation came from a specific failure case. On October 31, a local model proposed a fix for kachayev/fn.py, a Python library last updated in 2014. The patch made all 126 existing tests pass, and a secondary 'Reviewer' agent approved it. However, the fix was functionally wrong. The engine caught the error not through AI consensus, but by running the original code on Python 3.9 alongside the patched code on Python 3.12. The behavioral probes revealed the patch had introduced a NameError where the original threw a TypeError, proving the AI had broken the libraryβs intent despite passing syntax checks.
How the Engine Works
Inheritance Engine is a Rust binary that orchestrates five distinct agent roles: Hunter, Investigate, Restore, Preserve, and a Lead Engineer. The 'Hunter' stage scans GitHub for candidates, while 'Inherit' clones the repo into a read-only state to preserve the original commit. The repair process happens in a 'successor' branch within an isolated Docker sandbox. Crucially, the engine enforces a strict verification pipeline. Every citation the AI makes is re-read from disk to prevent hallucinations, and any patch that causes new failures or alters behaviorβdetected via differential testing against the original runtimeβis automatically reverted.
Local-First Architecture and Limits
The tool runs on Gemma 4 E4B via LM Studio or Ollama, requiring only 16GB of RAM and no GPU for the demo. It uses a 'replay' mode for users without models, which re-runs recorded patches to demonstrate the verification logic. While the tool is currently a v0.1.0 MVP limited to Python and Node.js on public GitHub repos, it demonstrates a robust security model. Code never leaves the machine in local_only mode, and Sentry tracing is scrubbed to ensure no source code leaks to external monitoring services.
Key Takeaways
- Verification Over Generation: The engine prioritizes behavioral parity with the original code over AI 'approval' or passing test suites.
- Local Execution: Runs entirely on a laptop using Gemma 4, ensuring data privacy and zero cost for inference.
- Provenance Records: Generates an
INHERITANCE.mdfile that documents every change, rejected patch, and original author attribution. - Strict Sandboxing: Uses Docker with
--network noneand read-only filesystems to prevent malicious or broken inherited code from affecting the host.
The Bottom Line
Inheritance Engine is a compelling proof that AI shouldn't just be a code generator, but a code archaeologist with strict ethical constraints. By forcing the 'original to get a vote,' Vats has built a safety rail that other AI dev tools desperately need.