In the old tales of Vikram and Vetal, the king carries a ghost down from a tamarind tree. On the way, Vetal tells a story that ends in a riddle, with a warning: “If you know the answer and keep silent, your head will burst into a thousand pieces.”
Vetal brings that ghost into git. A lot of code is written by AI agents now, the tests pass, and it gets pushed. Vetal adds one small moment before your code leaves: explain your own change.
Built for the DEV Hacktoberfest 2026 Open-Source AI Challenge, Week 4: Ghost in the Machine.
Demo
Features
On every git push (pre-push hook)
- A local Gemma model reads your diff
- Tells a short folk tale that secretly mirrors your change
- Asks one riddle about your actual code: why it changed, what breaks, which edge case
- Good answer: push goes through. Weak answer or silence: push refused
On every pull request (GitHub Action)
- Vetal posts the tale and riddle as a PR comment
- The
vetalstatus check stays pending until the author replies/answer ... - Gemma judges the answer and the check turns green or red
Never traps you
- Model not running, no terminal, or already answered: you pass
git push --no-verifyalways works
Tech Stack
- Python (standard library only, no dependencies)
- Gemma 3 via Ollama, with JSON-schema structured outputs
- GitHub Actions running Gemma 1B on the runner
How It Works
- Two model calls. The first writes the tale, the riddle and a hidden answer key from the diff. The second judges your answer against that key, so even a small model grades consistently.
- Your code never leaves your machine. Everything runs on local open weights. On PRs, the model runs on the CI runner, with no API key.
- Safe on pull requests. The workflow never checks out or runs PR code. It reads the diff as text, and only the PR author’s answer counts.

Try It Out
ollama pull gemma3:4b
pipx install git+https://github.com/abhijeetkaze/hackathon-2026-vetal-pr
vetal install # adds the pre-push hook
vetal ask # face Vetal now, without pushing
- Demo video: YouTube
- Repository: @abhijeetkaze/hackathon-2026-vetal-pr

