AI NewsDev toolsAnnouncement

Sphinx quizzes the person pushing on an AI agent's code

Sphinx is an MIT-licensed Git hook that pauses a push, reads the diff, and asks the person pushing to predict what the code does under failure, before the push continues.

AI News

Editorial2 min read

LinkedInX
GitHub social card for the parthh01/sphinx repository

Image: GitHub

Why it mattersA reviewer who never saw the chat picks the questions, so a push that passes is one where the person on the keyboard can still answer for what the agent wrote.

A push that gets through only after the person pushing has answered a question about the code is a different kind of review. Sphinx, posted to Show HN with 50 points and 11 comments at the time of writing, is a Git hook that pauses a git push, reads the diff, and asks the pushing user to predict what the change does when something goes wrong. If the answer is wrong, Sphinx explains why and poses a new scenario. If it is right, the push continues.

The reviewer never sees the chat

Sphinx uses a separate reviewer model that reads only the committed change through read-only Git tools, with no access to the conversation that produced the code. The reviewer can be a signed-in Codex or Claude Code command line, an OpenRouter key, or any OpenAI-compatible endpoint. The default preset uses Haiku through Claude Code or GPT-6 Luna through Codex, so a user on an existing subscription can run it with no new bill.

The illustrative exchange on the project page covers a webhook handler that saves a Stripe event ID before calling charge(). The reviewer asks what happens on retry if the first charge times out, points out that saving the ID before the charge means a failed charge is never retried, and then poses a new scenario on the same handler.

The hook blocks Git for up to 25 minutes

The questions cover behaviour, failure modes and invariants, so the pusher has to answer for what the code does under load. The hook is open book: a user can read the code, or ask their own coding agent to show it, while they answer. The hook blocks git push for up to 25 minutes before releasing or timing out. There is no default cap on model calls, and a typical check makes 5 to 8 requests plus one per answer, so a team paying by the token should set a spending limit on the reviewer provider.

The README calls the hook a comprehension practice, with no claim to work as a security gate. Anyone with local access, including the coding agent itself, can bypass Git hooks or ask another model for the answer. Passing a check does not prove who wrote the code or that the pusher understood it on their own. The examiner is a language model and can be wrong. Sensitive files are excluded by default, with .env files, private keys and common credential files on the list, but a secret pasted into ordinary source will still be sent to the reviewer provider.

Where this sits in the review workflow

A team that already has human code review on every change does not need Sphinx. The point of the hook is the push that reaches main with no human reviewer in between: a solo developer, a researcher landing a weekend fix, a founder shipping on Sunday night, or a repository where the agent has write access. In those paths, the hook adds a question the person has to answer before the code leaves the laptop. It is MIT-licensed, open-source, runs on Node 22.19 or newer, and installs through npm.

Source

The project page is at sphinx-six-theta.vercel.app and the code is on GitHub at parthh01/sphinx. The launch thread is on Hacker News.

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project