# Sphinx: a Git hook that quizzes you on agent-written code before it ships

> Sphinx is a Git hook that pauses a push and asks the person sending the code what the change does when things go wrong.

- Project: Sphinx by critiquebrowser
- List: Built for AI
- Kind: tool
- Works with: Codex, Claude Code, Cursor, OpenCode, OpenRouter
- Noticed: 253 points on Hacker News (when we found it)
- Added: 2026-11-25T11:37:57+00:00
- Web page: https://ai-news.ikangai.com/built/sphinx/

Sphinx is a Git hook for agent-assisted development. According to the author, when you push, or your agent does, Git pauses on the branches you protect. A reviewer reads the diff and asks what the change does under failure. A wrong answer brings a new scenario. A right one lets the push continue. The project is described as FOSS and MIT licensed.

Installation runs through npm with the package sphinx-understand, on Node 22.19 or later, on macOS, Linux or WSL. Running sphinx install connects Git and your coding agents and asks which model should do the review. The author lists Codex, Claude Code, Cursor, OpenCode and Pi, or plain Git. It can use OpenRouter or any OpenAI-compatible endpoint, and the author says it is built to run on minimal tokens.

The author says answers never reach the coding agent, and that .env files and keys are never opened. For urgent pushes, sphinx yolo lets them through, and every skip is logged. The sample exchange is labelled illustrative. The author says real questions come from the diff. Costs and limits of the review model are not described.

## In the author's words

> Sphinx is a Git hook for agent-assisted development. Before your agent's code ships, it asks you a question about what that code actually does.

## When to reach for it

Readers who let agents write code might add a gate that checks whether a person understood the diff, not just whether tests pass, while keeping the answers away from the agent. The failure-case questions in the sample show the kind of check to aim for.

## See it

- [Sphinx](https://sphinx-six-theta.vercel.app/)
- [Discussion on Hacker News](https://news.ycombinator.com/item?id=50137950)

---

AI wrote this entry from the project's own README or its author's post. What the project does, and that AI built it where the entry says so, are the author's statements, quoted here. Nobody at IKANGAI ran or tested it.
