{"slug": "wake-every-deleted-line-had-a-reason-an-archival-git-necropolis", "title": "Wake: Every Deleted Line Had a Reason (An Archival Git Necropolis)", "summary": "A developer built Wake, a local-first web application that scans Git repositories to deterministically track deleted files, generates grounded obituaries for each deletion using the local open-weight model gemma3:1b, and uses ripgrep to flag surviving code, docs, and configs that still reference the dead files. The system verifies model-generated commit citations against real SHAs and falls back to a deterministic template when a citation is hallucinated, and it was evaluated against 25 hand-labeled historical deletions across expressjs/cors, sindresorhus/is, and chalk/chalk.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine](https://dev.to/challenges/hacktoberfest-week4-2026-10-26).*\n\nIn commit `7e6f7eeac0c16d9abed2cb84ac4b2891a51fa3dc`, an open-source maintainer quietly removed `CONTRIBUTING.md` from `expressjs/cors`. \n\nIt was 33 lines of history. If you look at Git log today, that file is just gone. But if you open **Wake**, that deletion is preserved forever on a stone slab:\n\n**Born:** 2017-10-04 (Commit `78dd894`)\n\n**Died:** 2025-11-30 (Commit `7e6f7ee`)\n\n**Lifespan:** 2,979 days\n\n**Last Words:** `\"docs: revamp content (#374)\"`\n\n**Grounded Obituary:** *\"Removed CONTRIBUTING.md after 2979 days. Purged 33 lines of historical code.\"*\n\n**Citations:** `commit 7e6f7ee` *(clickable chip that expands the author, timestamp, and diff inline)* \n\nAnd then comes the twist.\n\nWhen you look below the headstone, a solitary amber-gold warning appears: **`STILL HAUNTING`**. Wake's regex engine traced active survivor files across the repository and found that a living documentation file still contained a dangling markdown link pointing to that dead file.\n\nThis is **Wake**: an archival necropolis for dead code, and an exorcist for the ghosts left behind.\n\n**Wake** is an end-to-end, local-first web application that inspects Git repositories, deterministically tracks deleted files, writes grounded obituaries using a local open-weight model (`gemma3:1b`), and locates the \"ghosts\"—active code, documentation, and configuration files that still reference things that died.\n\nWake was built around a strict principle of **Honest AI**:\n\n`[TEMPLATE]`.` git apply`.` oklch(16% 0.01 260)`), hairline borders, 2px radii, self-hosted IBM Plex typography, and a single accent—Marigold (`oklch(78% 0.15 75)`)—strictly and solely reserved for active hauntings.\n**Hosted Interactive Necropolis (Render Live):**\n\n👉 [https://wake-necropolis.onrender.com](https://wake-necropolis.onrender.com)\n\n*(Serves authentic precomputed real scans from `samples/wake.json` and `samples/cors.json` since free cloud containers lack local Ollama/GPU runtimes).*\n\n**Video Walkthrough (1:12 Full HD 1080p with AI Narration):**\n\n*Click the thumbnail above to play or download the 1080p MP4 walkthrough: [wake_demo_walkthrough.mp4](https://github.com/Shreyansh00987/Wake/raw/main/wake_demo_walkthrough.mp4)*\n\nWake was engineered with a modern, fully offline-capable stack:\n\n`node:sqlite` (Node.js 22+ built-in C-SQLite engine with zero external compile dependencies).`child_process.spawn`) with `-M` rename detection. When a file is moved (e.g. `test/cors.js` -> `test/test.js`), Wake tracks the rename lineage and never falsely classifies it as a death.`@vscode/ripgrep` bundled binary executed with strict argument arrays (never shell-interpolated strings).`gemma3:1b` (806 MB, Q4_K_M quantization, licensed under the `@fontsource/ibm-plex-sans` and `@fontsource/ibm-plex-mono` for 100% offline functionality.\n\n```\n[Git Repo] \n   │\n   ├─► git ls-files (Load surviving files)\n   ├─► git log -M --name-status (Extract deletions & trace renames)\n   │\n   ▼\n[Evidence Extraction] \n   │ (diffstat, birth SHA, death SHA, lifespan, authors, last words)\n   │\n   ▼\n[Ollama Inference: gemma3:1b] ◄── [Structured JSON Schema]\n   │\n   ▼\n[SHA Citation Verifier]\n   ├── Valid citations? ──► [Verified Grounded Obituary]\n   └── Hallucinated SHA? ──► [Deterministic Template Fallback]\n   │\n   ▼\n[Ripgrep Haunting Detector]\n   ├── Scan surviving code, docs, configs (excluding node_modules, lockfiles)\n   └── Detect dangling imports & references\n   │\n   ▼\n[Exorcise Engine] ──► Produces Copy-Only Unified Diff\n```\n\nTo maintain total credibility, I evaluated Wake against **25 hand-labeled historical deletions** across three popular open-source repositories: `expressjs/cors` (MIT), `sindresorhus/is` (MIT), and `chalk/chalk` (MIT).\n\nHere are the real, unvarnished measurements from `eval/RESULTS.md`:\n\n| System / Model | Cases | Citation Validity Rate | Cause Accuracy | Avg Latency | Fallback Rate | \n|---|---|---|---|---|---|\n| **Deterministic Template Engine** | 25 | **100.0%** (25/25) | **80.0%** (20/25) | < 1ms | 0% | \n| **gemma3:1b (Open-Weight)** | 25 | **80.0%** (20/25) | **28.0%** (7/25) | 1,964ms | 20% (5/25) | \n| **qwen2.5-coder:1.5b** | 25 | *Tested in prototype* | *Tested in prototype* | *N/A* | *N/A* | \n\nBuilding Wake entirely on open-source software and open-weight models was not a compromise—it was the only design that makes ethical sense for software developers:\n\n`refactor` and an `abandoned_experiment` solely from short Git commit messages is noisy (28% exact cause match). The deterministic regex engine actually outperformed the 1B LLM on category categorization. However, the LLM excels at synthesizing the human summary.`test.js` or `data.ts`, searching for `test` across a codebase triggers hundreds of false positives. Wake mitigates this by requiring token lengths >= 4 characters and filtering common programming keywords, but maintainers must always review confidence scores.`samples/wake.json` and `samples/cors.json`). True real-time local scanning is intended for developers running `npm run dev` or `docker-compose up` on their own machines.\nCode is written by humans. Every deleted file represented someone's late night, an architecture that served its time, or a lesson learned the hard way. Wake treats code history not as an untangled pile of diffs, but as a dignified cemetery.\n\nAnd when you exorcise that final lingering ghost from your `README.md` or `package.json`, you give that deleted line the peace it deserves.", "url": "https://wpnews.pro/news/wake-every-deleted-line-had-a-reason-an-archival-git-necropolis", "canonical_source": "https://dev.to/shreyansh_agrahari_2009db/wake-every-deleted-line-had-a-reason-an-archival-git-necropolis-510o", "published_at": "2026-10-31 04:42:21+00:00", "updated_at": "2026-10-31 04:49:14.406790+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models", "ai-agents"], "entities": ["Wake", "expressjs/cors", "sindresorhus/is", "chalk/chalk", "Ollama", "gemma3:1b", "ripgrep", "Render"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/wake-every-deleted-line-had-a-reason-an-archival-git-necropolis", "markdown": "https://wpnews.pro/news/wake-every-deleted-line-had-a-reason-an-archival-git-necropolis.md", "text": "https://wpnews.pro/news/wake-every-deleted-line-had-a-reason-an-archival-git-necropolis.txt", "jsonld": "https://wpnews.pro/news/wake-every-deleted-line-had-a-reason-an-archival-git-necropolis.jsonld"}}