Graveyard: a funeral for dead code, with a checker that keeps the AI honest
说明与用途
Graveyard 将 Git 中已删除的文件转换为客户端墓园,使用本地 Gemma 3 4B 模型生成经过验证的墓碑铭文,防止模型胡编乱造。
问题
Repositories accumulate deleted files that are never revisited, creating a hidden legacy of dead code.
结果
Graveyard provides a visual, client‑side cemetery for deleted code, using a local open‑weight model to generate verified epitaphs while preventing hallucinations.
工作流
- Run a Node script that reads the git history and outputs a JSON file of deleted files.
- Load the JSON into a client‑side web page that renders a cemetery of tombstones.
- For each tombstone, call a local Gemma 3 4B model via Ollama to generate an epitaph and cause of death.
- Apply a checker that ensures dates, file names and commit hashes come from the repo, and that the cause of death shares most keywords with the real commit message; otherwise replace with "Cause of death unknown".
- Display the verified tombstone data to the user.
证据
A small Node script reads a git repo's history (read-only) and exports every deleted file as JSON.
The app calls only http://localhost:11434. A guard in the code throws if the model name doesn't start with "gemma", and there are no API keys anywhere in the app.
Tests: 15 unit tests for the checker, all passing.
- 记录日期: 2026-11-01T11:44:13.828Z