跳到正文
DEV Community· Swayam Takkamore·· 3 小時前AI 評分45

REPOREAPER:以本機開放權重 AI 讓沉寂程式碼重獲新生

REPOREAPER: Summoning Dead Code Back to Life with Local Open-Weight AI

AI 導讀

REPOREAPER 可分析公開 GitHub 儲存庫,評估程式碼庫狀況並制定復甦路線圖。平台根據 5 個健康維度的 18 項確定性指標計算 100 分制復甦評分,再以本機開放權重 LLM 整理建議。分析採唯讀方式,不會執行目標儲存庫的安裝指令、建置指令或測試。

正文

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

What I Built

Every day, thousands of open-source projects quietly die. A maintainer moves on, a build badge turns red, a dependency tree rots, and a once-vibrant library becomes digital abandoned ruins. GitHub has become the world’s largest software graveyard — haunted by the ghosts of legacy codebases, broken toolchains, and forgotten architectures.

For Week 4's "Ghost in the Machine" challenge, I built REPOREAPER — an AI-powered software repository archaeology and deterministic revival platform designed to summon dormant code back to life.

Paste any public GitHub repository URL, and REPOREAPER:

  1. Shallow-excavates the repository into an isolated, read-only sandbox.
  2. Evaluates 18 deterministic signals across 5 health dimensions (Documentation, Dependencies, Maintenance, Testing & CI, and Code Quality).
  3. Calculates an objective 100-point Revival Score accompanied by an honest Assessment Confidence percentage.
  4. Synthesizes a structured revival roadmap using a local open-weight LLM, sequenced into Immediate (48h), Short-term (1–2w), and Long-term (1–3m) action items with effort estimates and linked evidence findings.
  5. Steam-Style Model Vault: A built-in model library and live download dock that allows switching and downloading local open-weight models with real-time speed (MB/s), countdown ETA, and byte telemetry.
  6. Exports the dossier as GitHub-Flavored Markdown or JSON.

The Core Philosophy

  • Zero Untrusted Execution: To protect developers from malicious install scripts or deprecated build tools, REPOREAPER never runs npm install, pip install, build scripts, or tests from the target repository.
  • Analysis Before Interpretation: Heuristics calculate the score deterministically before the AI model is invoked. The AI explains findings; it never hallucinates them. If the model is offline or slow, the platform falls back gracefully to a deterministic rules engine.

Demo

  • GitHub Repository: https://github.com/SwayamTakkamore/REPOREAPER
  • Interface Experience:
    • Minimalist Cyberpunk Dashboard: High-contrast dark mode with glassmorphic depth, glowing radial score meters, and interactive hover reveals to keep the view clean and low-textual.
    • Live 8-Stage Pipeline: Real-time Server-Sent Events (SSE) stream progress (Validating URL → Ingesting Repository → Inspecting Structure → Analyzing Dependencies → Checking Documentation → Evaluating Maintenance → Calculating Score → Generating AI Assessment).
    • Steam-Style Download Dock: Persistent bottom telemetry bar featuring live speed meters (MB/s), remaining time countdowns (ETA), and weight verification status.
    • One-Click Exports: Export reports formatted for GitHub issues, pull request descriptions, or offline documentation.

Image1

Image2

Image3

Image4

Image5

Code

REPOREAPER

Tagline: Bringing dead repositories back to life.
Theme: Ghost in the Machine — Hacktoberfest 2026, Week 4.
Repository: https://github.com/SwayamTakkamore/REPOREAPER

REPOREAPER is an AI-powered software repository archaeology and revival platform. Give it a public GitHub URL and it produces an honest, evidence-grounded assessment of an abandoned outdated, or neglected codebase: what is broken, what is still solid, a deterministic 100-point Revival Score, and a phased roadmap to bring it back.


Core principles

  • Analysis before interpretation. The static analyzer walks the tree, parses manifests inspects documentation, samples git history, and computes the Revival Score deterministically before any model is invoked. The AI explains findings; it never invents them.
  • Zero untrusted execution. Analysis is read-only: no npm install, no build scripts, no tests, no setup.py, no shell interpolation.
  • AI is optional. A local Hugging Face model (or Ollama) can write the narrative assessment. If it is missing, slow, or returns…
  • GitHub Repository: SwayamTakkamore/REPOREAPER
  • License: MIT License
  • Stack:
    • Framework: Next.js 16.0.10 (App Router, Turbopack)
    • UI & Styling: React 19, Tailwind CSS 3, Lucide React
    • Language: TypeScript 5 (Strict mode + noUncheckedIndexedAccess)
    • Testing: Vitest 3.x (15 test suites, 150 automated tests, 100% passing)
    • Package Manager: npm

How I Built It

REPOREAPER is engineered from the ground up around open-source AI and native host inference, intentionally avoiding cloud API dependencies, Docker containers, or Python virtual environments:

1. Local Open-Weight Models & Zero-Cloud Inference

The platform defaults to Google’s open-weight Gemma 3 1B Instruct (google/gemma-3-1b-it), offering high code comprehension and strict structured JSON adherence with minimal hardware requirements (~1.9 GB VRAM).

  • It also supports Gemma 2 2.6B, Qwen 2.5 Coder 1.5B, Llama 3.2 1B, and SmolLM 135M.
  • Inference runs via an embedded Python server (scripts/hf_local_server.py) using system PyTorch and Hugging Face Transformers. If an NVIDIA GPU is present, it automatically enables CUDA acceleration (bfloat16); otherwise, it falls back to CPU inference.
  • An OpenAI-compatible /v1/chat/completions API handles requests, supplemented by a custom POST /v1/switch_model endpoint that enables hot-swapping model weights on the fly without server restarts.

2. Steam-Style Model Vault & Live Downloader

  • Implemented a dedicated download helper (scripts/download_model.py) that wraps huggingface_hub.snapshot_download and streams real-time JSON progress lines.
  • Backend SSE pub/sub endpoint (/api/models/download/stream) broadcasts speed in MB/s, ETA countdown, and file status.
  • Safe uninstallation engine with path-traversal guards and active-model protection.

3. Prompt Hardening & Fenced Evidence

Untrusted repository text (READMEs, manifests, commit histories) is sanitized and enclosed within <untrusted_evidence> XML boundaries with strict token caps. This neutralizes prompt injection attempts embedded inside malicious repositories and forces the model to respond exclusively in schema-validated JSON verified by Zod.

4. Rigorous Automated Verification

  • Test runner powered by Vitest 3.x under Node 24.
  • 15 test suites with 150 passing tests covering URL validation, sandboxed file traversal, dependency manifests (npm, cargo, poetry, requirements.txt), documentation scoring, prompt injection defense, Hugging Face provider fallbacks, and all API endpoints.

Why Does Open Innovation Matter?

Open innovation is the entire reason a project like REPOREAPER can exist:

  1. True Code Sovereignty & Privacy: Dead or legacy codebases often contain proprietary algorithms, sensitive credentials from ancient commits, or trade secrets. Pumping arbitrary repositories through closed third-party APIs violates security compliance. By using local open-weight models, code never leaves the host machine.
  2. Freedom from Arbitrary Censorship & Filtering: Closed APIs often reject or refuse to analyze repositories containing obsolete cryptographic algorithms, deprecated protocols, or vulnerability test harnesses. Open-weight models analyze code faithfully without moralizing refusals.
  3. Zero Marginal Cost for Open Source: Scanning hundreds of abandoned repositories in a community sprint shouldn't cost dollars per query. Open-weight models run for free on consumer laptops, older GPUs, or local homelabs.
  4. Longevity & Reproducibility: Closed API endpoints get deprecated, prices change, and models get stealthily modified or retired. Open weights ensure that an archaeological analyzer built today will still function identically ten years from now.

My Agent Session

This project was planned, architected, and verified using an agentic development workflow in T3 Code powered by the Antigravity harness with Gemini models.

Key milestones accomplished during the collaborative sessions:

  • Formulating the 18-signal deterministic scoring algorithm and sandboxed ingestion pipeline.
  • Migrating the full runtime and testing infrastructure from Bun to npm and Vitest 3.x, updating all test suites without a single regression.
  • Building the Steam-Style Model Vault with live progress bars, ETA calculations, speed metrics, and safe deletion.
  • Designing and implementing the minimalist cyberpunk UI with interactive hover reveals and low-textual glassmorphism.
  • Hardening all API endpoints (/api/analyze, /api/models, /api/export) against payload mismatches and authoring 28 comprehensive API integration tests.

The Spirit of It

There is an eerie, quiet thrill in software archaeology.

When you point REPOREAPER at a repository whose last commit was pushed in 2014, the terminal beam sweeps across the screen: scanning files preserved in amber, discovering a forgotten lockfile, recognizing an abandoned test suite that hasn't run in a decade.

Then the machine speaks. Through a local open-weight model, the ghost speaks not in riddles, but with clarity: "The core algorithm is still solid. The test suite is intact. Upgrade this single outdated manifest, replace the legacy build script, and this project can run again tomorrow."

It transforms an abandoned graveyard into a salvage yard of opportunity. That is the ghost in the machine — the knowledge and labor of developers who came before us, waiting for the right spark to be useful once more.

Prize Categories

  • Best Overall "Ghost in the Machine" Project — Embodying the theme of finding, understanding, and resurrecting forgotten code with local AI.
  • Best Use of Open-Weight AI Models — Deep native integration with Google's Gemma 3, local PyTorch inference, dynamic weight hot-swapping, and a Steam-style model download library.
  • Best Developer Tool / Code Archaeology Engine — 18-signal deterministic scoring engine, zero untrusted execution, and automated revival roadmaps backed by 150 automated tests.

Authored with ❤️ by Swayam Takkamore (@swayamtakkamore) for Hacktoberfest 2026.

來源:DEV Community · dev.to