Skip to content
AI Learning Ground Start learning

News ·

Show HN: Sphinx – A hook that quizzes you on your AI's code before shipping

Sphinx is a Git hook for agent-assisted development that quizzes you on your AI-generated code before it ships, pausing protected-branch pushes until you answer correctly.

Sphinx is a Git hook designed for agent-assisted development. Before code written by a coding agent can be pushed, it asks the developer a question about what that code actually does. The tagline captures its intent: you can outsource your thinking, but not your understanding.

The workflow: when you push (or your agent does), Git pauses on protected branches. Sphinx reads the diff and asks what the change does when things go wrong — a reviewer that never saw your chat. If you get it wrong, you learn why and try again, usually with a new scenario. Get it right and the push continues. It is built to run on minimal tokens, using your existing coding agent, OpenRouter, or any OpenAI-compatible endpoint.

It works with Codex, Claude Code, Cursor, OpenCode, and Pi, or plain Git, and sphinx install connects Git with your coding agents and asks which model should review. Answers never reach the coding agent, and .env files and keys are never opened. If you are in a hurry, sphinx yolo lets pushes through, with every skip logged.

For anyone building with AI, it addresses a real risk of agent-assisted coding: shipping code you don't fully understand. The hook acts as a lightweight comprehension check at exactly the moment code leaves your machine.

References

Read the full story at Hacker News ↗Like, save or discuss on Buzz

#community #signals