Blog Network

parthh01 · 2026-10-16 · notable

Sphinx — a git hook that quizzes you on your agent's code before a push

Sphinx is an open-source git hook that stops a push to a protected branch until you correctly predict what the change does. A separate reviewer model writes the questions from the diff. Works with Claude Code, Codex, Cursor, OpenCode and Pi. MIT.

GitHub card for the parthh01/sphinx comprehension-checkpoint repository

Before agent-written code is pushed, Sphinx asks what it does when things go wrong, and lets the push through once you answer.

What is it?

Sphinx is a comprehension checkpoint for agent-assisted development: when you or your coding agent push to a protected branch, git waits while Sphinx asks you to predict how the change behaves. A wrong answer gets an explanation and a new scenario on the same concept; a right answer lets the push continue. Its tagline is "outsource your thinking, not your understanding."

How does it work?

The questions come from a separate reviewer model that reads the committed change through read-only git tools and never sees the conversation that wrote the code. It asks about behaviour, failure modes and invariants rather than file names, scales from one to three questions with change size, and uses a signed-in Codex or Claude Code CLI, OpenRouter, or any OpenAI-compatible endpoint. .env files and private keys are excluded by default.

Why does it matter?

Developers who let agents write most of their code can ship changes they never understood. Sphinx makes that understanding a step in the push itself, while the agent only sees check status, never your answers. The README is clear that it is practice, not a security gate: anyone with local access can skip it with sphinx yolo, which logs every skip.

Who is it for?

developers who ship code written by coding agents

Try it

npm install -g sphinx-understand && sphinx install

Sources · 3 outlets

Tags

  • sphinx
  • git-hooks
  • coding-agents
  • code-review
  • claude-code
  • codex
  • developer-tools
  • open-source
  • show-hn

← All releases