Yasindu Udayanga has released PhantomCommit AI, an open-source platform that treats Git history as a forensic investigation workspace rather than a static archive. Built for the Hacktoberfest 2026 "Ghost in the Machine" challenge, the tool helps developers identify why code was removed, how features evolved, and what might be causing current regressions by combining deterministic Git analysis with Google's Gemma 4 models. The project is currently live on Render and available under the MIT License, offering a practical alternative to manually digging through commit logs with git log and git diff.
Evidence-First Architecture
The core philosophy of PhantomCommit AI is that Git provides the evidence, AI interprets it, and the developer makes the final call. The system retrieves real commit data from GitHub via the REST API, then runs a deterministic analysis layer to identify deleted lines, renames, and change types before sending any context to the AI. This prevents the model from hallucinating explanations based on vague problem descriptions. The AI's output is structured using Zod validation, ensuring that any references to specific commit SHAs or file paths are checked against the actual retrieved history. If the evidence doesn't support a claim, it is marked as insufficient rather than presented as fact.
Key Features for Debugging and Recovery
The platform includes several specialized tools for different investigation needs. The "Code Graveyard" highlights removed files and lines, while "Ghost Replay" uses React Flow and Monaco Editor to visualize commit relationships and compare historical snapshots. For developers looking to restore functionality, "Smart Code Recovery" generates validated patches for inspection, though it explicitly avoids automatically applying or merging changes. The "Code Impact Graph" utilizes TypeScript-based static analysis to map dependencies, helping users understand what other components might break if a deleted function is restored. Additionally, a "Security Regression Review" flags suspicious removals of authentication or validation checks, treating them as review leads rather than confirmed vulnerabilities.
Open-Weight Model Integration
PhantomCommit AI is built around Google's open-weight Gemma models, specifically preferring gemma-4-26b-a4b-it with support for gemma-4-31b-it. The integration uses the official @google/genai SDK, and the system records which model version was used for each analysis to maintain transparency. Udayanga also integrated "Ultramarine" by Paper Instruments as an alternative AI provider, allowing users to switch between models explicitly. This modular approach ensures that the Git analysis logic remains independent of the specific AI provider, reducing vendor lock-in and allowing for easier comparison of model performance on code interpretation tasks. The application does not claim to run Gemma locally, relying instead on hosted APIs for inference.
Key Takeaways
- The tool uses a deterministic analysis layer to filter Git data before AI processing, reducing hallucinations.
- It supports both Google Gemma 4 and Ultramarine by Paper Instruments as selectable AI providers.
- Recovery patches are generated for developer review but are never auto-applied to the repository.
- The project is fully open-source (MIT) and deployed on Render with Supabase for auth and database.
The Bottom Line
This is a solid example of using AI for code archaeology without losing the rigor of deterministic analysis. It solves the real problem of forgotten context in legacy codebases while keeping the developer in control of the final decision.