This is a submission for the Hacktoberfest Open Source AI Challenge: Week 4 - Ghost in the Machine.
What I built
Requiem is a CLI that gives every crashed program a funeral. When a command fails, Requiem produces an obituary card with the cause of death, a suggested fix, and a first person eulogy written as if the program itself were speaking.
Demo
PYTHONPATH=. python3 -m requiem run -- python3 examples/lost_config.py
┌─ REQUIEM ─────────────────────────────────────────────────────┐
│ requiem-733bae python3 examples/lost_config.py 132ms │
│ died of missing key 'bob' in config dictionary. │
├──────────────────────────────────────────────────────────────┤
│ WHERE │
│ examples/lost_config.py:14 in load_user │
│ user = config["users"][user_id] │
│ CAUSE │
│ missing key 'bob' in config dictionary. │
│ FIX │
│ add 'bob' to config dictionary. │
│ EULOGY │
│ I was a program. I existed to process requests, to │
│ organize data. │
└──────────────────────────────────────────────────────────────┘
A segfault gets the same treatment:
make examples/segv && PYTHONPATH=. python3 -m requiem run -- ./examples/segv
┌─ REQUIEM ─────────────────────────────────────────────────────┐
│ requiem-e9b362 ./examples/segv 1ms │
│ died of segmentation fault │
├──────────────────────────────────────────────────────────────┤
│ WHERE │
│ killed by SIGSEGV │
│ CAUSE │
│ segmentation fault │
│ FIX │
│ null │
│ EULOGY │
│ I trusted a pointer I had no right to trust. Now I return │
│ to /dev/null. │
└──────────────────────────────────────────────────────────────┘
How it works
Requiem is a hybrid: code does what code must, the model gives the program a voice.
- Capture runs the command with subprocess and records exit code, signal, duration, and the last chunk of stderr and stdout.
- Coroner parses Python tracebacks, maps signals to names, reads the failing source line off disk, and redacts secrets before anything leaves the process.
- Ghost talks to a local llama-server running Gemma 3 1B via llama.cpp. It asks for a terse diagnosis and a first person eulogy, caches results, and falls back to deterministic output if the model is offline.
- Graveyard stores every obituary in
data/obituaries.jsonl. Userequiem listandrequiem show <id>to browse them. The terminal renders a clean obituary card.
All of this is stdlib Python, about 400 lines. No API keys. No network calls when using --no-model.
Why open innovation matters
Crash logs are sensitive. A traceback can contain file paths, hostnames, SQL, auth headers, customer data, or tokens. Sending that to a cloud crash explainer leaks private information. Requiem runs inference on your own machine and redacts secrets before the model ever sees them.
It works offline. The model, prompt, logic, and examples are all local. Swap the GGUF, edit the prompt, read every line. With --no-model it is fully deterministic and works in air gapped environments.
It is inspectable. Redaction rules, traceback parsing, and the eulogy prompt are all visible and easy to change. Open tools let you reason about your failures without handing them to a third party.
Prize categories
Best Use of Gemma - Gemma 3 1B runs locally through llama.cpp and llama-server to write the eulogy and diagnosis.
Try it
git clone https://github.com/mukuvi/requiem
cd requiem
make demo
make test
Every crash gets a funeral.
Top comments (0)