This is a submission for the Sanity Challenge, Path Two: Vibe-Code Something Strange The Code Exorcist is a horror-themed AI bug-triage app built with Next.js and Sanity. A developer pastes an error/stack trace and the actual buggy code snippet. A Groq-powered agent reads both together, finds the real root cause, names the "demon" (bug category), assigns a threat level, and writes a concrete fix.
A human reviewer then makes the final call β directly from Sanity Studio β by clicking either π BANISH (approve the fix, close the case) or π Send Back for Re-analysis (reject it, reset the case to uncontained). Every decision is logged, timestamped, and visible live on the frontend with zero page reloads.
It's built for the moment right after a bug report lands β when a team wants a fast, structured first pass before anyone commits real review time to it.
π¬ Video walkthrough: [https://youtu.be/HKND1FXQkEo](https://youtu.be/HKND1FXQkEo)
π Live app: [https://the-code-exorcist.vercel.app/](https://the-code-exorcist.vercel.app/)
The app has one main route (/) plus the Sanity Studio embedded at /studio β submit a bug on the homepage, then open Studio to see the human-review side of the workflow.
π Repo: https://github.com/vidishagupta/the-code-exorcist
Tech stack: Next.js, React, TypeScript, Sanity (Studio v3, custom document actions, real-time client.listen() API), Groq AI (Llama), Tailwind CSS, deployed on Vercel.
I used Claude (chat) as my AI execution partner β working in VS Code with the terminal open side by side, pasting real errors back and forth until they were fixed. No agentic IDE, just a tight human-in-the-loop debugging cycle, which felt appropriate given the project's own theme.
The workflow, modeled as data next to the content:
Every haunting document links to a separate workflowState document rather than storing status as a flat field. Stages: uncontained β pending_human_review β banished, with a full history log (actor, action, timestamp, notes).
pending_human_review.
Real-time, not read-only:
The frontend uses client.listen() on a GROQ query, so new submissions, AI diagnoses, and Banish/Reject decisions all appear instantly. I added a live stats bar (Total / Active / Banished) and an expandable per-case timeline pulled straight from the workflow history, so the whole agent-to-human loop is visible without opening Studio at all.
Where I got stuck (the honest part):
llama-3.3-70b-versatile, then llama-3.1-8b-instant β both came back model_not_found. Had to check Groq's actual live model list and swap to openai/gpt-oss-20b instead of trusting a name that merely sounded plausible..env.local. A full restart (not just a file save) resolved it. status field that already existed; Sanity Studio refused to boot until the duplicate was found and removed.client.ts, image.ts, later live.ts β none ever actually wired into the app) sit unnoticed for days. Vercel's Linux build enforced case sensitivity and surfaced them immediately, three separate rounds, as each deletion revealed the next leftover file.
Every one of these was a real terminal error, pasted back in, fixed, retested β nothing here worked on the first try.
Project ID: 1vedw6uo
Dataset: production
Structured content: two document types, haunting and workflowState, connected by reference rather than embedded, so the workflow can be queried and reasoned about independently of the content it's tracking. haunting has a custom Studio preview (title + status + threat level) and two custom document actions (banishAction.ts, rejectAction.ts) registered in sanity.config.ts, fully replacing the default publish flow for that document type.
The full build was done in a Claude chat session, used as an iterative execution partner rather than an autonomous agent β paste an error, get a fix, apply it, retest.
Thanks for checking out my project! π€