Repo Séance: Summoning the Ghosts of Git History with Local AI 👻
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 decision

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
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:
Instead of simply displaying Git metadata, Repo Séance uses locally running open-weight models to turn these findings into contextual narratives.
The idea was to make repository archaeology feel a little more human.
A sped-up preview of all three modes, running locally through Ollama with Qwen 2.5 3B.
Full video demonstration: Watch Repo Séance
Supporting experiments: Aarya0706/seance-local-llm-benchmark
The benchmark repository includes the experiment methodology, preliminary results and all four saved model outputs.
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 Enter fullscreen mode Exit fullscreen mode Switch modes with --mode haunt, --mode ofrenda or --mode exorcise, and add --verify to enable grounding checks.
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:
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.
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.
The structured findings are passed to a locally running open-weight language model through Ollama's /api/generate endpoint.
The selected mode determines the prompt and storytelling style.
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.
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.
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.
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.
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.
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 Enter fullscreen mode Exit fullscreen mode This allowed me to experiment with different models, compare their storytelling styles and investigate their factual consistency.
Local inference eliminates per-request cloud API charges, making repeated experiments and benchmarking possible without paying for every generation.
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:
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.
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.