Sphinx Quizzes You on Your AI-Written Code Before You Push It
An open source tool that quizzes developers before their code reaches a shared repository. Answer correctly and the push goes through. But its creator says passing is no guarantee the code is safe.

A developer going by parthh01 has released Sphinx, an open source tool that asks you whether you actually understand the code an AI helped you write. It was featured on Hacker News on October 18. The tool poses its questions right before you “push” code to a shared repository. The version listed in the repository is 0.1.
What it asks before your code ships
Out of the box, Sphinx halts pushes to main and master, the primary branches of a project. It does this using Git “hooks,” a feature that lets Git automatically run something before or after a given operation. A separate reviewer AI reads the committed changes and generates questions: how does this code work, and under what conditions does it fail? The reviewer AI cannot see the conversation you had with an AI while writing the code.
If your answer is wrong, it explains why and presents a new scenario. Pass the questions and the paused push resumes. You can also choose to skip, pushing immediately without answering, though that does not count as a pass. By default, the initial round is at most 1 question for small changes and up to 3 for large ones. According to the repository description, those figures are ceilings, so if there is less to ask about, you get fewer questions. A wrong answer adds another question probing the same concept, which means the total can exceed the ceiling. A pass is valid for 24 hours, but only as long as the code, the push destination, and the check policy remain unchanged.
How this differs from existing checks
Git has long been able to run something right before a push. Sphinx layers a test of the developer’s own understanding on top of that. A similar tool, sphinx-ci, quizzes developers at the “pull request” stage, when they ask for their changes to be merged, and prompts them to check their understanding before merging. Sphinx asks on the developer’s own machine, before the code is pushed to a shared repository.
The scope of what it checks matches that difference. Version 0.1 covers only commits and pushes made on the developer’s machine. It does not touch merges performed on the web, automated checks, or deployment. The repository’s documentation notes that hooks can be bypassed and that the reviewer AI can be wrong. It adds that passing the questions is not proof that the code is safe or that the developer understood it unaided.
Who it is for, and what it costs
Installation requires Git and Node.js 22.19 or later. It runs on macOS and Linux; on Windows you need to go through the Linux environment (WSL). Sphinx operates no accounts or services of its own. You have to connect your own AI model to handle the review. Options include a logged-in Codex or Claude command line tool, or an OpenRouter API key.
The tool is open source, but the reviewing model is on you. If you use the Codex or Claude command line tool while signed in, the reviews count toward that plan’s usage allowance. OpenRouter requires an API key even for free models, and paid models are billed separately. The default configuration sets no cap on model calls. The documentation says a typical review makes 5 to 8 calls, with 1 additional call per answer.
Sphinx forces developers to explain how AI-written code behaves and where it breaks before sharing it. Anyone considering adopting it should first weigh the time and cost the reviews add. Note also that the code under review and your answers are sent to the reviewing model you designate. For work code, that is another factor to consider.