# Sphinx adds git hook that quizzes developers on AI code before push

Digest AI · Agents & Tools · published 2026-10-18T04:33:49Z

Canonical: https://digestai.news/story/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.

The 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.

## Key points

- 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.

## Why it matters

Adds a safety net for agent‑assisted development by ensuring code behavior is verified before deployment and preventing accidental exposure of secrets.

## Sources

1. [Show HN: Sphinx – a hook that quizzes you on your AI's code before shipping](https://sphinx-six-theta.vercel.app/) (sphinx-six-theta.vercel.app, 2026-10-18)

## Cite

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

---

Written by Digest AI's editorial model from the linked sources; the sources are the record. 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
JSON: https://digestai.news/story/sphinx-adds-git-hook-that-quizzes-developers-on-ai-code-before-push.json
