Show HN: Sphinx – A hook that quizzes you on your AI's code before shipping
FOSS, Basically it plugs into your existing coding agent workflow and every time you push to prod it'll throw up a questionnaire that checks if you understand how the code you're pushing works. Comments URL: https://news.ycombinator.com/item?id=50137950 Points: 211 # Comments: 73
Sphinx is a Git hook designed for agent-assisted development. Before an agent's code is shipped, Sphinx questions the developer about what the code actually does. It can be integrated with various coding agents like OpenRouter, OpenAI-compatible endpoints, and works seamlessly with Codex, Claude Code, Cursor, OpenCode, and Pi, or works with plain Git.
The hook ensures that the customer is not billed twice when the payment gateway times out and retries. By saving the event ID before calling charge(), the hook identifies the retry and returns a 200 status without performing the charge. If the charge fails, the next retry skips the charge, preventing the customer from being billed.
Sphinx pauses Git branching protection, allowing a reviewer who has never seen the developer's chat to read the diff and understand what the change does in case of failure. In case of mistakes, Sphinx helps the developer learn from the experience by presenting a new scenario. If the developer gets it right, the push continues without any interruptions.
For quick pushes, developers can use the sphinx yolo command, which allows pushes through, logging every skip. To set up Sphinx, developers simply run sphinx install, connecting Git with their coding agents and specifying the model that should review the code. The documentation provides further details on how to use Sphinx effectively.
Written by urgent.news from Hacker News Best's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.
- Show HN: Sphinx – a hook that quizzes you on your AI's code before shipping sphinx-six-theta.vercel.app