Urgent.News

What's breaking now, across thousands of outlets.

AI

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.

Read the original at sphinx-six-theta.vercel.app →

More in AI

ZeroTrace: An Air-Gapped, Zero-Day Behavioral SOC Copilot

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle What I Built Modern cybersecurity threats are evolving rapidly, but advanced security monitoring and Endpoint…

  • ZeroTrace is an AI-powered, local-first cybersecurity tool
  • Focuses on behavioral threat analysis and AI-assisted triage
  • Offers per-server subscriptions and managed incident triage services

More from Sunday 18 October →