This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
What happens to all the code we leave behind?
The branches nobody merges. The files we delete. The TODOs we promise to revisit. The commits whose messages make us question our past decisions.
They disappear from our daily workflow, but their history remains.
For this challenge, I built Repo Séance 👻 — a local AI-powered command-line tool that summons the ghosts of your Git repository and gives them a voice.
It explores forgotten Git history and identifies:
- Deleted files and their last-known history.
- Abandoned or stale branches.
- Forgotten TODOs, FIXMEs and unfinished promises.
- Regrettable commit messages.
Instead of simply displaying Git metadata, Repo Séance uses locally running open-weight models to turn these findings into contextual narratives.
It has three modes:
- 👻 Haunt: Eerie whispers with dry humour about forgotten repository history.
- 🌼 Ofrenda: Warm Día de los Muertos-inspired remembrances celebrating contributors and their work.
- 🔥 Exorcise: Generates
DELETE,KEEPorINVESTIGATErecommendations for stale branches and old TODOs, with optional grounding verification.
The idea was to make repository archaeology feel a little more human.
Demo
Here's Repo Séance in action!
A sped-up preview of all three modes, running locally through Ollama with Qwen 2.5 3B.
Full video demonstration: Watch Repo Séance
Code
Both repositories are public:
Main project: Aarya0706/repo-seance
Supporting experiments: Aarya0706/seance-local-llm-benchmark
The benchmark repository includes the experiment methodology, preliminary results and all four saved model outputs.
Try It Yourself
You only need Python 3.9+, Git and Ollama.
git clone https://github.com/Aarya0706/repo-seance.git
cd repo-seance
ollama pull qwen2.5:3b
# generate a deliberately haunted sample repo, then summon its ghosts
python -m seance.demo ./haunted
python -m seance ./haunted
Switch modes with --mode haunt, --mode ofrenda or --mode exorcise, and add --verify to enable grounding checks.
How I Built It
I wanted the open-source AI component to be central to the application, rather than an optional feature added on top.
The architecture follows a lightweight pipeline:
1. Git History Extraction
Python invokes Git commands such as git log, git for-each-ref, git grep and git blame to identify deleted files, stale branches, unfinished TODOs and suspicious commit messages.
2. Structured Ghost Records
Each finding is converted into a structured Ghost record containing information such as its type, name, author, date, last-known commit message and relevant Git details.
3. Local AI Narration
The structured findings are passed to a locally running open-weight language model through Ollama's /api/generate endpoint.
I experimented with two models:
- Qwen 2.5 3B (
qwen2.5:3b) - Llama 3.2 3B (
llama3.2:3b)
The selected mode determines the prompt and storytelling style.
4. Grounding Verification
One challenge I encountered was that small language models can generate convincing but incorrect historical details.
They might invent dates, durations, commit hashes or even incorrectly describe a branch's merge status.
To address this, I implemented a separate Python-based grounding verification layer.
It checks generated descriptions against the facts extracted from Git, including numerical claims, dates, commit hashes, merge status and unsupported contributor references.
With --verify, flagged responses can be regenerated up to a configurable retry limit. If contradictions remain, the application falls back to a predefined, fact-consistent whisper.
The verifier is rule-based and uses regular expressions. It catches specific, checkable contradictions but cannot guarantee complete factual correctness.
5. Terminal Rendering
Finally, the findings and generated narratives are displayed through a themed terminal interface, with different visual styles for each mode.
The application has no third-party Python runtime dependencies and uses Python's standard library alongside Git and Ollama.
Why Does Open Innovation Matter?
This is probably the most important part of the project for me.
I didn't want repository analysis to require sending someone's development history to an external AI service.
Using locally running open-weight models made several things possible.
1. Privacy
Git history can contain internal implementation details, contributor activity and development decisions.
With the default local Ollama endpoint, repository findings and prompts stay on the developer's machine instead of being sent to a third-party inference server.
2. Offline Inference
Once Ollama and the required model weights are installed, Repo Séance can run without an internet connection.
The initial installation and model download require internet access, but normal local inference does not.
3. Model Freedom
I can switch between models using a single command-line argument, without redesigning the application.
python -m seance . --model qwen2.5:3b
python -m seance . --model llama3.2:3b
This allowed me to experiment with different models, compare their storytelling styles and investigate their factual consistency.
4. Cost Control
Local inference eliminates per-request cloud API charges, making repeated experiments and benchmarking possible without paying for every generation.
5. More Control Over Experimentation
I could inspect model outputs, experiment with prompts, compare generations and build a separate verification mechanism around the model's responses.
I also created a separate benchmark repository to compare Qwen 2.5 3B and Llama 3.2 3B.
In three runs on a synthetic haunted repository:
| Model | Mean total runtime |
|---|---|
| Qwen 2.5 3B | 50.93 seconds |
| Llama 3.2 3B | 78.50 seconds |
Qwen had approximately 35.1% lower mean wall-clock runtime in this experiment.
A second comparison on MediAgent AI showed approximately 34.3% lower runtime for Qwen, but that experiment used only one run per model.
These are preliminary total application runtimes, not isolated model-inference measurements.
Interestingly, both models also produced factual inconsistencies in selected examples. Faster generation did not necessarily mean more reliable storytelling.
That reinforced one of my biggest learnings: a convincing AI-generated story is not necessarily an accurate one.
The complete methodology, observations and saved outputs are available in the benchmark repository.
Open-weight models made it possible to build something private by default, adaptable and independently testable.
The Spirit of It
There is something interesting about a Git repository.
Every deleted file was once considered useful.
Every abandoned branch started with an idea.
Every TODO was a promise someone made to their future self.
We usually look at the current state of a codebase and forget the experiments, mistakes and decisions that brought it there.
Repo Séance is my little attempt to bring that forgotten history back to life.
I started this as a spooky interpretation of the challenge, but it became an interesting exploration of local AI, open-weight models, privacy and factual grounding.
And perhaps, when you run it on your own repository, one of those ghosts will sound a little too familiar.
Some code never really rests. It just waits to be summoned. 👻
Built with Python, Git, Ollama, Qwen 2.5 3B and Llama 3.2 3B.
Thanks for checking out Repo Séance!

Top comments (0)