A Git hook that quizzes you before agent code ships
Sphinx is a free, open-source Git hook for agent-assisted development. When you (or your coding agent) push code, Sphinx pauses the push on protected branches, reads the diff, and asks you a question about what the change actually does — particularly how it behaves when things go wrong. If you answer incorrectly, it explains why and presents a new scenario; answer correctly and the push continues. The goal is to force genuine understanding of agent-generated code before it ships.
Git pauses on protected branches while Sphinx asks a question generated from your diff about what the change does in failure scenarios.
Wrong answers get an explanation of why they were wrong, then a follow-up scenario; the push only proceeds once you demonstrate understanding.
Compatible with Codex, Claude Code, Cursor, OpenCode, and Pi, or plain Git without any agent.
Runs on minimal tokens using your existing coding agent, OpenRouter, or any OpenAI-compatible endpoint; `sphinx install` connects Git and your agents and asks which model should review.
Your answers never reach the coding agent, and .env files and keys are never opened by the reviewer.
`sphinx yolo` lets pushes through when you're in a hurry, and every skip is logged.
You push — or your agent does. Git pauses on the branches you protect.
A reviewer that never saw your chat reads the diff and asks what the change does when things go wrong.
Get it wrong and you learn why, then try a new scenario. Get it right and the push continues.
Sphinx is free and open source (FOSS). There are no paid plans.
Free
Fully open-source Git hook; users supply their own model access via their coding agent, OpenRouter, or an OpenAI-compatible endpoint.
Sphinx is a Git hook for agent-assisted development. Before your agent's code ships, it pauses the push and asks you a question about what that code actually does, especially how it behaves when things go wrong.
When you push to a protected branch, Git pauses. Sphinx's reviewer — which never saw your chat with your coding agent — reads the diff and asks what the change does in a failure scenario. A wrong answer gets an explanation and a new scenario; a correct answer lets the push continue.
Sphinx works with Codex, Claude Code, Cursor, OpenCode, and Pi, or with plain Git if you're not using an agent.
It's built to run on minimal tokens and can use your existing coding agent, OpenRouter, or any OpenAI-compatible endpoint. `sphinx install` connects Git and your coding agents and asks which model should review.
Yes. Sphinx is free and open source (FOSS), installed globally via npm: `npm install -g sphinx-understand`.
Node.js 22.19 or newer, running on macOS, Linux, or WSL. After installing, run `sphinx install` to connect Git and your coding agents, then push as usual.
Yes. `sphinx yolo` lets pushes through, and every skip is logged so there's an audit trail.
No. Your answers never reach the coding agent, and .env files and keys are never opened by the reviewer.