👻 RepoSéance: The Ghost in Your Code — Bringing Forgotten Code Back to Life with Gemma AI
Every codebase has a ghost. Some are forgotten, some are abandoned, and some are waiting for someone to uncover their secrets.
What I Built
RepoSéance is a local AI-powered code investigator that gives forgotten, abandoned, or confusing source code a voice.
The inspiration came from a simple thought: What if your old code could explain itself?
Developers frequently revisit projects they haven't touched in months or years. Functions lose their context, documentation becomes outdated, and the original purpose of code gets forgotten.
I interpreted the Ghost in the Machine theme by imagining a mysterious digital spirit living inside an abandoned codebase. Instead of simply displaying a technical explanation, RepoSéance lets developers summon that spirit and ask it to reveal the secrets hidden in their code.
With the help of Gemma, RepoSéance offers four investigation rituals:
- 👻 Investigate: Discover what the code does and understand its purpose.
- 💀 Haunted Story: Experience a creative, ghost-themed interpretation of the code.
- ⚡ Revive: Get practical suggestions to improve and modernize forgotten code.
- 🔍 Debug: Explore potential bugs, weaknesses, and suspicious logic.
It also features a Memory Vault, which saves previous investigations in the browser so developers can revisit their discoveries.
The idea is simple: make code exploration useful, interactive, and a little mysterious.
Demo
GitHub Repository:
https://github.com/Manish010325/RepoSeance
Run locally: http://localhost:3000
RepoSéance currently runs locally using Ollama and Gemma. The repository includes the source code and instructions to install and run the application.
To experience it:
- Clone the GitHub repository.
- Install the project dependencies using
npm install. - Install Ollama and download the required Gemma model.
- Start the application using
npm run dev. - Open
http://localhost:3000, paste your code, choose a ritual, and summon the ghost.
Note: A publicly hosted demo is not currently available. The application is demonstrated locally.
Code
👨💻 Explore the complete source code:
GitHub — Manish010325/RepoSeance
The project is organized into a simple full-stack architecture:
-
server.js— Express backend and local Ollama API integration. -
public/index.html— Main application interface. -
public/style.css— Dark, haunted visual design. -
public/app.js— Frontend functionality and Memory Vault. -
package.json— Dependencies and project scripts.
The project is built with the intention of being understandable, extendable, and open to future contributions.
How I Built It
I built RepoSéance using a full-stack JavaScript architecture and an open-weight AI model running locally.
Technology Stack
| Technology | Purpose |
|---|---|
| HTML5 | Application structure |
| CSS3 | Interface and visual design |
| JavaScript | Frontend interactions |
| Node.js | Backend runtime |
| Express.js | API and web server |
| Ollama | Local AI model runtime |
Gemma (gemma4:e2b) |
Code analysis and AI responses |
How the AI workflow works
- The developer pastes source code into the RepoSéance interface.
- The frontend sends the code to the Express backend.
- The backend communicates with the locally running Ollama API.
- Gemma analyzes the supplied code using a custom prompt that defines the ghost's personality and investigation task.
- The generated response is returned to the frontend.
- The ghost reveals its findings through a structured investigation.
- The result is saved in the browser's Memory Vault for future reference.
One of the interesting parts was designing the AI prompt. I wanted the ghost to sound mysterious and entertaining without sacrificing technical accuracy. The responses needed to be creative, but the actual code analysis still had to be useful.
I chose Gemma through Ollama because I wanted to explore how open-weight models could power practical developer tools without depending on a hosted AI API.
Why Does Open Innovation Matter?
Open innovation made RepoSéance possible in a way that aligns with the project's core philosophy: developers should have more control over the tools they build and the data they work with.
1. Privacy and local processing
The source code is sent to a locally running Ollama service rather than a third-party hosted AI API. This gives developers greater control over where their code is processed.
2. Freedom to experiment
Using an open-weight model allowed me to customize prompts, experiment with the ghost's personality, and shape the AI experience around a specific developer use case.
3. Reduced dependence on hosted AI APIs
Developers can run the model locally without requiring a paid third-party AI API key. Once the model is downloaded, inference can run without an internet connection.
4. Learning through open technology
Building with Gemma and Ollama helped me understand how local AI models can be integrated into real applications, from backend communication to prompt engineering and frontend presentation.
For me, open innovation is not just about accessing a model. It is about having the freedom to understand, experiment, customize, and build something meaningful with it.
My Agent Session
The development of RepoSéance involved hands-on experimentation with Gemma through Ollama.
I designed a custom system prompt to give the model a mysterious digital-ghost personality while keeping its code explanations technically focused.
I also tested the complete workflow locally, from submitting source code to receiving AI-generated investigations and saving them in the Memory Vault.
The Spirit of It
Every developer has encountered a piece of code that feels like a mystery.
Maybe it belongs to an old college assignment, an unfinished side project, or a repository that has not been opened in years.
The files are still there. The functions still execute. But the story behind them slowly disappears.
That is the ghost I wanted to bring to life.
With RepoSéance, instead of asking an ordinary AI assistant to explain a function, you summon a forgotten digital spirit and let it reveal what it remembers.
It might explain the purpose of a function, uncover a potential weakness, or suggest how an abandoned project could be improved.
The spooky interface makes the experience memorable, but the real purpose is to help developers reconnect with their forgotten work.
The code may be abandoned. Its story doesn't have to be.
👻 The ghost never really left. It was waiting for someone to ask the right question.
Top comments (0)