{"version":1,"type":"story","url":"https://digestai.news/story/sphinx-adds-git-hook-that-quizzes-developers-on-ai-code-before-push","json":"https://digestai.news/story/sphinx-adds-git-hook-that-quizzes-developers-on-ai-code-before-push.json","markdown":"https://digestai.news/story/sphinx-adds-git-hook-that-quizzes-developers-on-ai-code-before-push.md","slug":"sphinx-adds-git-hook-that-quizzes-developers-on-ai-code-before-push","headline":"Sphinx adds git hook that quizzes developers on AI code before push","summary":"Sphinx is a free, open‑source git hook that asks developers a question about the behavior of AI‑generated code before the change is pushed. It works by pausing the push, presenting a scenario—such as a Stripe webhook retry—and requiring the user to explain what the code should do. The answer is not sent to the coding agent, keeping environment variables and secret keys hidden.\n\nThe hook can be installed with npm and connects to any OpenAI‑compatible endpoint, including OpenRouter, as well as models like Codex, Claude, Cursor, OpenCode, and Pi. It supports a “yolo” mode that lets pushes continue while logging each skip, allowing teams to bypass the check when necessary. Sphinx runs on Node 22.19+ on macOS, Linux, or WSL and integrates with existing Git workflows without exposing sensitive data.","keyPoints":["Sphinx is a free, open‑source git hook that quizzes developers on AI‑generated code before a push.","It integrates with any OpenAI‑compatible endpoint, such as OpenRouter, and supports models like Codex, Claude, Cursor, OpenCode, and Pi.","A “yolo” mode lets pushes bypass the quiz, logging each skip while keeping .env files and keys hidden from the agent."],"whyItMatters":"Adds a safety net for agent‑assisted development by ensuring code behavior is verified before deployment and preventing accidental exposure of secrets.","category":{"slug":"agents","name":"Agents & Tools","url":"https://digestai.news/category/agents"},"entities":{"companies":["OpenAI","OpenRouter"],"models":["Codex","Claude","Cursor","OpenCode","Pi"],"people":[]},"firstPublishedAt":"2026-10-18T04:33:49Z","updatedAt":"2026-10-18T04:33:49Z","sourceCount":1,"hasPrimarySource":false,"sources":[{"outlet":"sphinx-six-theta.vercel.app","title":"Show HN: Sphinx – a hook that quizzes you on your AI's code before shipping","url":"https://sphinx-six-theta.vercel.app/","publishedAt":"2026-10-18T04:33:49Z","type":"press","primary":false,"lead":true}],"sourceNotes":null,"discussions":[{"site":"Hacker News","url":"https://news.ycombinator.com/item?id=50137950","points":49}],"thread":null,"cite":{"text":"Digest AI, \"Sphinx adds git hook that quizzes developers on AI code before push\", 18 October 2026, https://digestai.news/story/sphinx-adds-git-hook-that-quizzes-developers-on-ai-code-before-push","publisher":"Digest AI","title":"Sphinx adds git hook that quizzes developers on AI code before push","datePublished":"2026-10-18T04:33:49Z","url":"https://digestai.news/story/sphinx-adds-git-hook-that-quizzes-developers-on-ai-code-before-push"},"generatedBy":"Written by Digest AI's editorial model from the linked sources; the sources are the record.","license":"Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse"}