{"slug": "show-hn-sphinx-a-hook-that-quizzes-you-on-your-ai-s-code-before-shipping", "title": "Show HN: Sphinx – a hook that quizzes you on your AI's code before shipping", "summary": "A free, open-source Git hook called Sphinx, published on GitHub by developer parthh01 and installable via `npm install -g sphinx-understand`, pauses pushes on protected branches to quiz developers on what their AI agent's code actually does before it ships. Sphinx has a reviewer model that never saw the developer's chat read the diff and ask what the change does when things go wrong; a wrong answer explains why and prompts a new scenario, while a correct answer lets the push continue. The tool works with Codex, Claude Code, Cursor, OpenCode and Pi or plain Git, runs on minimal tokens from an existing coding agent, OpenRouter or any OpenAI-compatible endpoint, requires Node 22.19+ on macOS, Linux or WSL, and offers a `sphinx yolo` bypass that logs every skip.", "body_md": "- Free\n- [FOSS](https://github.com/parthh01/sphinx)\n\n“Outsource your thinking,\n\n not your *understanding*.”\n\n— [Sun Tzu](https://x.com/yacineMTB/status/2018886083120153046?s=20)\n\nSphinx is a Git hook for agent-assisted development. Before your agent’s code ships, it asks you a question about what that code actually does.\n\n`npm install -g sphinx-understand`\nBuilt to run on minimal tokens, from your existing coding agent, OpenRouter, or any OpenAI-compatible endpoint.\n\nSphinx\n\nYour webhook handler now saves the event ID *before* calling `charge()`. Stripe times out and sends the same event again. What happens on the retry?\n\nYou\n\nIt runs twice, so the customer is charged twice.\n\nSphinx\n\nNot quite. The retry finds the saved ID and returns 200 without charging. But that ID is stored before the charge succeeds. If `charge()` fails, what does the next retry do?\n\nYou\n\nIt skips the charge, so the customer is never billed.\n\n1. 01### You push.Or your agent does. Git pauses on the branches you protect.\n2. 02### Sphinx asks.A reviewer that never saw your chat reads the diff and asks what the change does when things go wrong.\n3. 03### You answer.Get it wrong and you learn why, then try a new scenario. Get it right and the push continues.\n\nWorks with **Codex, Claude Code, Cursor, OpenCode,** and **Pi**, or plain Git. Your answers never reach the coding agent, and `.env` files and keys are never opened. In a hurry? `sphinx yolo` lets pushes through, and every skip is logged.\n\n## Start in a minute.\n\n```\n# Node 22.19+ · macOS, Linux, or WSL\nnpm install -g sphinx-understand\nsphinx install\n\n# then push as usual\ngit push\n```\n\n`sphinx install` connects Git and your coding agents and asks which model should review. [Read the docs](https://github.com/parthh01/sphinx#readme) for everything else.", "url": "https://wpnews.pro/news/show-hn-sphinx-a-hook-that-quizzes-you-on-your-ai-s-code-before-shipping", "canonical_source": "https://sphinx-six-theta.vercel.app/", "published_at": "2026-10-18 04:33:49+00:00", "updated_at": "2026-10-18 06:14:28.598488+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools", "ai-safety"], "entities": ["Sphinx", "parthh01", "GitHub", "Codex", "Claude Code", "Cursor", "OpenCode", "OpenRouter"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-sphinx-a-hook-that-quizzes-you-on-your-ai-s-code-before-shipping", "markdown": "https://wpnews.pro/news/show-hn-sphinx-a-hook-that-quizzes-you-on-your-ai-s-code-before-shipping.md", "text": "https://wpnews.pro/news/show-hn-sphinx-a-hook-that-quizzes-you-on-your-ai-s-code-before-shipping.txt", "jsonld": "https://wpnews.pro/news/show-hn-sphinx-a-hook-that-quizzes-you-on-your-ai-s-code-before-shipping.jsonld"}}