DEV Community

Faheem Musthafa P
Faheem Musthafa P

Posted on

CodeNecromancer: Resurrecting Dead Repositories with Open-Weight Gemma

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission ๐Ÿ‘ป๐ŸŒผ

This is a submission for the Hacktoberfest Open-Source AI Challenge: Week 4.


๐Ÿ’€ Ghost in the Machine: What I Built

Every developer knows the sorrow of wandering through the open-source graveyard. Repositories that once powered thousands of applications sit abandoned in digital purgatoryโ€”strangled by bitrot, deprecated packages, vulnerable cryptographic primitives, and broken CI systems like Travis CI.

For Hacktoberfest 2026: Week 4 (Ghost in the Machine), I built CodeNecromancer: an autonomous digital mortician and repository resurrection agent powered by Google Gemma (open-weight) running locally on-device.

CodeNecromancer does three things:

  1. The Autopsy Chamber (codenecromancer autopsy): Inspects a repository's git burial ground, calculates a Necro-Score (0โ€“100), audits rotting dependencies, and channels Gemma to issue a Certificate of Digital Death with deep technical post-mortem analysis.
  2. The Sรฉance Circle (codenecromancer seance): Holds an interactive sรฉance with the Ghost of the Original Maintainer, allowing you to interrogate the ghost about their architecture, unmerged plans, and regrets.
  3. The Resurrection Ritual (codenecromancer resurrect): Autonomously mutates rotting manifests, synthesizes modern GitHub Actions v4 CI workflows, refactors deprecated syntax (such as Python 2 or obsolete APIs), and generates a commemorative RESURRECTION.md on a fresh git branch.

It includes both a Rich Gothic Terminal CLI and a web portal with dark ethereal styling.


๐Ÿ”ฎ Why Open Innovation Matters

Code bases are among the most sensitive intellectual property developers create. In this project, relying on open-weight models (Google Gemma via Ollama) wasn't just a design choiceโ€”it was the only ethical and practical architecture:

  1. Zero Source Code Exfiltration: When auditing an internal or private abandoned repository, sending entire git histories, environment variables, and proprietary code to cloud LLMs violates security policies. With open-weight Gemma running locally on an RTX GPU, zero bytes leave the machine.
  2. No Token Tax on Deep AST Analysis: Performing full-repo dependency graphs, changelog forensics, and multi-file code refactoring consumes hundreds of thousands of tokens. Running on-device is 100% free, unlimited, and runs even with the lights and internet turned off.
  3. Perpetual Digital Preservation: Proprietary APIs alter model weights, introduce new safety guardrails that break syntax parsing, or shut down entirely. Open-weight models guarantee that software archaeology tools remain functional decades into the future.

โšก Demo & Screenshots

Terminal Autopsy Output

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                       ๐Ÿ“œ CERTIFICATE OF DIGITAL DEATH                        โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Repository Subject        โ”‚ zombie_microservice                          โ”‚ โ”‚
โ”‚ โ”‚ Necro-Score               โ”‚ 100 / 100 (Fossilized Lich)                  โ”‚ โ”‚
โ”‚ โ”‚ Time in Purgatory         โ”‚ 3,487 days (Last breath: 2017-04-12)         โ”‚ โ”‚
โ”‚ โ”‚ Defunct CI/CD             โ”‚ Travis CI (Defunct/Abandoned)                โ”‚ โ”‚
โ”‚ โ”‚ Dead / Vulnerable         โ”‚ โ€ข flask==0.12.2 โ€ข pycrypto==2.6.1            โ”‚ โ”‚
โ”‚ โ”‚ Packages                  โ”‚ โ€ข requests==2.11.1 โ€ข nose==1.3.7             โ”‚ โ”‚
โ”‚ โ”‚ โšฐ๏ธ Official Cause of Death โ”‚ Succumbed to digital entropy, rotting in... โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
Enter fullscreen mode Exit fullscreen mode

The Sรฉance with the Ghost of the Maintainer

User: "Why did you abandon this repository?"

Ghost of zombie_microservice: "I built this thing to serve, but time turned my function into a mausoleum. My dependencies are whispers of vulnerability, and my CI/CD is a forgotten crypt. The pull requests stopped coming in 2017..."


๐Ÿ› ๏ธ Partner Technology & Tracks Entered

  • Best Use of Gemma ($200 Featured Track):
    • Powered by Google Gemma (gemma4:e4b / gemma:2b) running via local Ollama.
    • Gemma handles:
    • The qualitative post-mortem autopsy analysis and cause-of-death diagnosis.
    • Dynamic roleplay as the Departed Maintainer in the sรฉance chat.
    • Code modernization refactoring (transforming legacy syntax into modern standard Python).

๐Ÿงช Testing Instructions for Judges

To run CodeNecromancer locally:

# 1. Clone & install
git clone https://github.com/FM9447/CodeNecromancer.git
cd CodeNecromancer
pip install -e .

# 2. Ensure Ollama is running with Gemma
ollama pull gemma4:e4b  # or gemma:2b

# 3. Autopsy the included 2017 zombie microservice
codenecromancer autopsy examples/zombie_microservice

# 4. Hold a sรฉance
codenecromancer seance examples/zombie_microservice

# 5. Perform the resurrection ritual
codenecromancer resurrect examples/zombie_microservice

# 6. Launch the Web Portal
codenecromancer serve --port 8000
Enter fullscreen mode Exit fullscreen mode

Visit http://localhost:8000 to interact with the visual necrology lab!


๐Ÿ”— Code Repository & MLH Project

Built with ๐Ÿ–ค for Hacktoberfest 2026: Week 4.

Top comments (0)