DEV Community

Ankush
Ankush

Posted on

NecroCode: The Open-Source Codebase Necromancer & Spectral Auditor đź‘»

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

In open-source software, there is a quiet tragedy that unfolds every single day: over 80% of open-source repositories on GitHub end up abandoned.

They become digital ghosts. They sit dormant in the digital cemetery—haunted by deprecated Python 2 syntax, collision-broken cryptographic digests (MD5/SHA-1), unpatched CVEs, dead dependencies, and elusive concurrency heisenbugs that spawn phantom crashes and zombie threads.

For Week 4's theme, "Ghost in the Machine", I built NecroCode: an autonomous, privacy-first open-source AI platform and CLI powered by Google Gemma (open weights) that serves as a digital necromancer for forgotten software.

The Core Capabilities:

  1. ⚰️ The Cemetery & Bit Rot Audit: Analyzes legacy source code using Python Abstract Syntax Trees (AST) and regex heuristics, calculates a real-time Bit Rot Score (0–100), categorizes its resting state (Restless Spirit, Haunted Legacy, or Decomposed Zombie), and diagnoses dangerous bit rot and memory leaks.
  2. ⚡ Modernization Necromancy: Uses Google Gemma open-weight reasoning and AST transformers to transmute legacy syntax to modern Python 3.12+, upgrades broken cryptographic digests to SHA-256, wraps shared memory race conditions in threading.Lock(), and auto-synthesizes self-healing pytest suites and non-root Dockerfiles.
  3. 🔮 The Séance Chamber (Ghost in the Machine): Opens an interactive séance where developers can speak directly with the digital spirit of the original maintainer—synthesized via Gemma open-weight prompt chaining and voiced by ElevenLabs (with an offline Web Audio procedural fallback).
  4. 📡 Spectral Observability: Traces multi-agent reasoning steps, tool calls, and LLM completions via Sentry Agent Tracing.
  5. 🏛️ The Graveyard Vault: Indexes and tracks audited repositories using MongoDB Atlas.

Demo

The Crypt UI in Action

The application features a Gothic Cyberpunk Terminal interface with CRT scanline shaders, binaural procedural ambient audio drones generated via the Web Audio API, and real-time Server-Sent Events (SSE) streaming the resurrection ritual:

Top comments (0)