This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine.
A month ago my team lead left. He was the one who knew why our code is shaped the way it is: why one piece
is split from another, why a check lives here and not there, why a decision that looks wrong was actually
right. More than once since then I have hit one of those decisions, opened a chat to ask him, and stopped
halfway through typing. He has moved on. It felt wrong to pull him back into code he no longer owns, and
there was nobody else to ask.
git blame did not help. It showed me the last person who touched the file, not the person who decided why
it exists. That is when it hit me how much a team loses when one person walks out the door, and how little
of what they knew was ever written down where the next person would find it.
Halloween is about talking to people who are no longer in the room. So I built a séance for them.
TL;DR
Ouija Blame asks a line of code why it exists. It walks the line back to the commit that first
wrote it, gathers what its author and reviewers wrote (commits, the pull request, review comments,
linked issues, and the prompts behind agent-written code), and the ghost answers only in their own
words, each one linked. If nobody ever wrote the reason down, the ghost says "I never wrote down why."
Gemma can only point, then explain with citations. The open model picks passage numbers from a
fixed list, so it cannot put a word in the ghost's mouth, and code checks every quote word for word. Then
it writes a plain-words answer (what the line does, why it exists, what to check before you change it)
where every reason cites a quote by number.
The test: 45 real lines from Rails, Kubernetes, Home Assistant, Ansible and Istio that someone deleted
as pointless, which broke something and were put back. Every method saw only history from before the
deletion. The séance surfaced a written reason for 28/45 lines; the git blame message, 19/45
(+20 points, 95% CI +9 to +33). Reading the whole PR behind the blame commit found 29/45, but meant
reading 268 words per line instead of 67.
What surprised me: no method, mine included, found the reason the line had to come back more than
18% of the time. The reason code was written and the reason it must stay are usually different, and the
second one is almost never written down.
What failed: Gemma 4B hates silence. It said "I never wrote down why" for only 1 of the 13 lines where
no method found any reason.
Ouija Blame is a pixel-art séance for one question: why does this line exist? It is a séance for people's lost knowledge in a repo, not a haunted terminal.
git log -L follows the line back through every change to the
commit that first wrote it. git blame stops at the last change, which in my test set was the wrong
commit In that Kubernetes example, git blame on cluster/addons/storage-class/openstack/default.yaml shows a
group-version bump by a different person. The ghost is @jsafrane, who wrote the file in 2016, and the
answer comes from his PR: "In previous versions of Kubernetes a PersistentVolumeClaim without a StorageClass annotation on these cloud platforms would be satisfied by manually-created PersistentVolume objects…" Six years later someone deleted it as an OpenStack leftover, and existing Cinder volumes became
Code written with an AI agent has a new kind of lost knowledge: the prompt. The engineer typed the reason
into a chat, and the commit says "Canvas rce2". Entire records those
sessions and publishes them next to the code as refs/entire/checkpoints/…. Ouija Blame reads them with
plain git (no account needed), so the ghost can quote the human's own prompt:
Ask a line of code why it exists. The ghost of whoever wrote it answers, only in words they actually wrote.
Live: https://ouija-blame.onrender.com · DEV Hacktoberfest 2026, Week 4: Ghost in the Machine
Every codebase has a line nobody dares delete, and the person who knew why it is there has left. git blame shows the last commit that touched the line, which is often a reformat. Ouija Blame walks the
line back to the commit that first wrote it, gathers what its author and reviewers wrote (commit
messages, the pull request, review comments, linked issues, and agent-session prompts recorded with
Entire), and lets an open-weight model, Gemma, point at the passages that say why. The model can only
choose passage numbers, never write the quote, and code checks every quote word for word against its
source. If nothing says why, the ghost says "I never wrote down…
line ──git log -L──▶ every commit that touched it ──▶ PRs · reviews · linked issues · Entire prompts
│
passages: exact slices of the raw text (templates, bots, /lgtm dropped)
│ BM25 against the line's own words → top 16
▼
Gemma 3 4B (Ollama): "which passages say WHY?" → ids from an enum
│
quote checker: word for word in the source, or dropped
▼
the ghost speaks, or "I never wrote down why."
enum, so Gemma can only
choose from what is there, and every chosen passage is checked against its source again before it is
shown. Over the 45 test séances the checker dropped api.github.com; the server asks the
medium. The same seance.run() serves the evaluation from a disk cache.
The hardest part of "why does this line exist?" is knowing the right answer. Big projects have a natural
answer key: reverts of deletions. Someone removes code that looks pointless, it breaks something, and a
revert puts it back, usually with a PR explaining why it was needed.
git log -S hits for the line's main identifier; the séance.
| Method | Gives the revert's reason | Gives a written reason (any) | Words to read (median) |
|---|---|---|---|
git blame message |
7/45 (16%) | 19/45 (42%) | 12 |
| blame + its whole PR | 7/45 (16%) | 29/45 (64%) | 268 |
git log -S , 5 oldest |
5/45 (11%) | 15/45 (33%) | 41 |
| séance | 8/45 (18%) | 28/45 (62%) | 67 |
Paired bootstrap over cases, séance minus baseline, any written reason: vs blame +0.20 (+0.09 to +0.33),
vs log -S +0.29 (+0.13 to +0.44), vs blame + PR −0.02 (−0.11 to +0.04). On the revert's reason the
differences are all within ±0.09 and not significant.
So the honest summary: the séance finds a written reason far more often than blame, about as often as reading the entire PR, in a quarter of the reading, and it reaches the original author every time.
Every number above comes from python -I scripts/stats.py, which reads only files in
The first real user was me. I opened a haunted line from the gallery, read through the séance, and my honest
reaction was: "all I see is a git blame." The quotes were all there, but nothing told me in plain words the
one thing I had come for. That sentence changed the product the same night: every séance now opens with an
answer card (what the line does, why it exists, what to check before you change it), and every reason on
it is pinned to the quote it came from, so you can check the medium against the ghost.
The ghosts in the gallery are real people who wrote real code, and most of them simply moved on to other
work. Nobody here is framed as dead, the ghost is a generic sprite rather than anyone's photo, and every word
it says links to where that person actually wrote it. That last rule turned out to be the whole product:
a tool that only lets people speak in their own recorded words is a tool that makes you notice how rarely
we write down why.
This week I was buried in work until the last night, so most of the code was written by Claude Code from
specs we agreed on (specs/ in the repo). I chose the idea, the cuts and the evaluation design, and I was
its first user.
render.yaml. The AI runtime is on Render. Entire-Checkpoint trailer, Ouija Blame reads
the published checkpoint and the ghost quotes the developer's own prompt (see the agent-written séance in
the gallery).