DEV Community

Vishwajeet Kumar
Vishwajeet Kumar

Posted on

COBOL-GHOUL: The Local Séance Chatbot Channeling Dead Code

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

I built COBOL-GHOUL, an offline terminal séance chatbot that channels the spirits of long-dead and forgotten programming languages. In honor of Halloween and Día de los Muertos, this project acts as a digital medium, letting developers conduct a local séance on their machines to speak directly with the ancestral "ghosts" of software history—specifically targeting the ancient spirits of COBOL, ALGOL 60, and Fortran.
When you boot it up, the terminal interface darkens, and the AI agent speaks entirely in character. It uses cryptic mid-century computing jargon mixed with eerie, spectral commentary about modern software complexities like JavaScript fatigue and ephemeral cloud architectures.

Demo

You can view the live terminal session recording and interaction logs on my GitHub repository linked below, or watch the quick terminal cast here:
[Link to your Asciinema, YouTube, or Loom demo video]

Code

bash

Clone the repository to summon the spirits locally

git clone https://github.com
Use code with caution.
You can inspect the full open-source codebase, system prompts, and custom tools directly in my repository:
{ github github.com }

How I Built It

COBOL-GHOUL runs entirely locally with zero external network dependencies, ensuring the dead stay safely contained on your own machine.
• The Brain: I used Gemma 2 (9B), Google's open-weight model, served locally via Ollama. It was configured with a specific system prompt to anchor its historical memory and alter its "ectoplasm levels" based on text temperature.
• The Orchestrator: I built the core agent architecture using Mastra, an open-source agent framework, to seamlessly manage the conversational state loop, inject context libraries, and handle dynamic tool execution.
• The Medium's Tools: The agent utilizes a local directory parsing tool that scans the user's workspace for deprecated file extensions or legacy code syntax to "feed" the spirit and influence its personality.

Why Does Open Innovation Matter?

Open innovation was crucial to making this project a reality:

  1. True Offline Safety: Channeling spirits shouldn't mean sending your personal workspace details or private source code to a centralized corporate server. Running Gemma 2 locally ensures the data never leaves my laptop.
  2. Zero Séance Fees: Closed APIs charge per token, which inherently penalizes lengthy, atmospheric storytelling and deep roleplaying. Local inference on open weights allows for extensive generation without incurring infrastructure costs.
  3. No Censorship of the Past: Proprietary models guardrail heavily against roleplaying morbid, highly eccentric, or deeply specific historical personas. Open weights gave me complete freedom over the narrative depth and structural flavor of the "haunted" responses.

My Agent Session

I saved my development and testing session using DevRelay. You can see how the agent iteratively learned to refine its spectral personas and execute local tools here:
[Link to your DevRelay Agent Session]

The Spirit of It

The moment this project truly landed was when I fed it an actual snippet of 1960s COBOL code from an old banking ledger. The terminal paused, printed a simulated "cold chill" sequence, and generated this response:
"I remember the magnetic drums... the shifting punch cards... why have you awoken me to a world where lines of code are written to be discarded in weeks? We built to outlive the century."
It genuinely gave me chills and made me appreciate the sheer engineering resilience of the programmers who came before us.

Prize Categories

I am entering COBOL-GHOUL into the following partner categories:
• Best Use of Gemma: Built entirely around Google's Gemma 2 open-weight model running locally.
• Best Use of Mastra: Used Mastra's open-source agent framework to orchestrate tools, system memory, and the local conversational loop.

Top comments (0)