Forensic code intelligence. We don't fix code — we explain the human tragedy behind it.
GhostKode connects to your GitHub repositories and identifies the most troubled lines in your codebase using git blame analysis, semantic embeddings, and AST-aware parsing. Click any haunted line to get a streaming AI forensics briefing — who touched it, why it keeps breaking, and what a clean fix would look like.
For any file, GhostKode fetches the full blame graph via GitHub's GraphQL API and commit history via REST. Every line is mapped to the commit that last touched it — author, date, and message.
Commit messages are embedded using OpenAI's text-embedding-3-small model and compared against a curated retrieval corpus of archetypal bad-commit patterns — things like hotfixes, reverts, emergency patches, and workarounds. Cosine similarity against this reference corpus produces a semantic churn score per line, surfacing code that has a history of instability even when the commit messages don't use obvious keywords. This is combined with keyword signal and file-level churn frequency for a final weighted score.
File content is parsed using AST analysis to distinguish executable code from comments, docstrings, and blank lines. This ensures only semantically meaningful lines are candidates for haunting — comment blocks and non-code constructs are excluded regardless of their commit history.
Haunted lines are sent to GPT-4o with full git context. The model responds as a forensics narrator — naming authors, quoting commit messages, and tracing the pattern of changes. Responses stream in real time via SSE. A second pass automatically generates a concrete fix suggestion for the line.
Each haunted line opens a conversation thread. Follow-up questions send the full history back to the model, maintaining context across turns.
- Next.js 16 (App Router) — full-stack framework
- Auth0 — authentication with GitHub OAuth
- GitHub GraphQL + REST APIs — blame, commits, file content, repo tree
- OpenAI —
text-embedding-3-smallfor RAG corpus similarity,gpt-4ofor streaming analysis - Tailwind v4 — styling
npm install
npm run devRequired environment variables:
AUTH0_DOMAIN=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
AUTH0_SECRET=
APP_BASE_URL=
OPENAI_API_KEY=
GEMINI_API_KEY=
GITHUB_PAT=