The Haunting Protocol: An Open-Source AI Ghost That Lives in Your Codebase
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built Meet The Haunting Protocol — a local AI-powered desktop companion that behaves like a ghost haunting your development environment. It watches your project directory, notices when files appe

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
Meet The Haunting Protocol — a local AI-powered desktop companion that behaves like a ghost haunting your development environment.
It watches your project directory, notices when files appear or disappear, discovers unfinished TODOs, and responds with eerie commentary. But this isn't just a horror chatbot. The ghost has a persistent memory, allowing it to remember previous events and make each new session feel like another chapter in an unfolding mystery.
Imagine deleting an old file and hearing:
"You deleted the file. Why do I still remember it?" Or returning to your project the next morning and discovering that the ghost remembers what happened before you left.
The central design decision was to make the open-weight model part of the actual experience, rather than simply adding an AI-generated story to a Halloween-themed interface.
I chose a relatively small open-weight language model so the ghost could generate contextual responses on a local machine. Ollama provides a straightforward local inference interface, making it easy to send the ghost's observations to the model without integrating a remote API.
The file watcher detects events in a user-selected directory. Instead of continuously sending project files to an AI, the application focuses on metadata such as event types, relative paths, and selected TODO line numbers.
The application stores events, session information, and generated ghost messages in SQLite. On a new session, it retrieves recent events and memories and includes them in the next model prompt.
The system prompt defines the ghost's behavior: short, unsettling messages, a mysterious personality, and a tendency to treat deleted files as lost memories and TODOs as unfinished promises.
The result is a small local AI agent with a distinct purpose: transforming development activity into an evolving horror narrative.
With a locally running model, the application can keep its inference on the same machine. The current prototype sends selected event metadata rather than file contents to the model.
I can also experiment with different compatible open-weight models and compare how they handle the same events.
Offline by design Once Ollama and the model have been installed, the core experience can run without an internet connection. The application does not need a cloud inference API for each message.
No per-request API bill Local inference avoids per-request charges from a hosted AI provider, although it still uses hardware, electricity, and disk space.
There is something inherently spooky about a computer remembering what you thought was gone.
Developers delete files, abandon experiments, leave TODOs behind, and return to projects months later. Most of the time, these are ordinary traces of work. But viewed through the right lens, they start to resemble the remnants of something that once lived there.
The Haunting Protocol takes those traces and gives them a voice.
It doesn't need to pretend that a supernatural entity is actually inside the machine. The illusion comes from something much more familiar: memory, context, and an AI that knows enough about what happened before to make its next words feel strangely personal.
And because the model runs locally, the ghost doesn't have to leave your machine to tell its story.
Maybe the most unsettling line of code isn't the one you wrote.
🟣 Best Use of Render - powers the deployed backend and API.