Show HN: Sphinx – A hook that quizzes you on your AI's code before shipping
TL;DR Highlight
A Git hook quizzes you on your AI-written diff before push and lets it through only if you understand it.
Who Should Read
A developer who worries about pushing coding-agent output without really reading or understanding it
Core Mechanics
- It asks a question right before push
- Sphinx is a Git hook for agent-assisted development.
- Before the code ships, it asks what the code actually does.
- Questions come from the diff
- A reviewer model that never saw your chat reads only the diff.
- It asks what the change does when things go wrong.
- Wrong answers get an explanation and a new scenario
- A correct answer lets the push continue.
- The example was a Stripe webhook retry where charge() fails.
- It works across models and agents
- It runs on your existing coding agent, OpenRouter, or any OpenAI-compatible endpoint.
- It works with Codex, Claude Code, Cursor, OpenCode, Pi, or plain Git.
- It has privacy and bypass controls
- Answers never reach the coding agent, and .env files and keys are never opened.
- sphinx yolo lets pushes through and logs every skip.
- Setup is one npm install
- It needs Node 22.19+ on macOS, Linux, or WSL.
- It is MIT licensed; run sphinx install, then git push as usual.
Community Reactions
- Writing PR descriptions gives a similar benefit, per one commenter
- Splitting it into why, what, and how surfaced hidden LLM decisions and bugs.
- Someone built a quiz skill and found it useful
- They quizzed on the whole PR or branch rather than a commit, and the questions were good.
- Another said it helps on 1500-line PRs but misses bad decisions like calling the wrong endpoint.
- Opinion that it should run before code is written
- A commenter who built something similar said multiple choice lets people guess without understanding.
- Someone built one and quit using it
- They disliked being questioned by a tool expected to work like magic.
- Another predicted confirmation fatigue and agents answering for us.
- Opinion that it should gate PR submission
- It would save other people's time before they review.
- Others thought it would be great for OSS maintainers.
How to Apply
- Get quizzed on your current branch today
- Paste the prompt below into Claude or Claude Code with your diff.
- Check whether the question quality is useful before installing.
- Gate only protected-branch pushes with Sphinx
- Run npm install -g sphinx-understand, then sphinx install.
- Pick the reviewer model and push to main to see the flow.
- Make a self-quiz before opening a PR a team rule
- Add why, what, and how sections to your PR template.
- Require the how section to be written by the author without LLM help.
Try It
# Paste into Claude or Claude Code (simplified version of Sphinx's approach)
You are a code reviewer who never saw this conversation. Read only the diff below and quiz me.
Rules:
- Ask one question at a time.
- Ask about failure, retry, and edge cases, not the happy path.
- After I answer, judge it; if wrong, explain why and ask a new scenario.
- After 3 correct answers in a row, say "Understood".
{{git diff output}}
Next to try: answer wrong on purpose and check whether the explanation makes sense.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques