parthh01 / sphinx
git clone https://github.com/parthh01/sphinx.git
You can outsource your thinking, but not your understanding. A hook for agent-assisted development that quizzes you on the changes before you push to prod.
—
stars, 24h
+254
stars, 7 days · #238
+254
stars, 30 days · #1,018
254
★ total · +254% this week
10
forks · 2 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageJavaScript
LicenseMIT
Created2026-10-14 (6d ago)
Last push1d ago
Watchers0
OwnerUser
Links
- GitHub: github.com/parthh01/sphinx
- Homepage: https://sphinx-six-theta.vercel.app
- Releases · Issues · Hacker News mentions
README excerpt
Sphinx You can outsource your thinking, but not your understanding. Works with Claude Code · Codex · Cursor · OpenCode · Pi · or a plain git push Reviews run on your Claude Code or Codex plan · OpenRouter · any OpenAI-compatible endpoint Sphinx adds an understanding check to agent-assisted development. When you push to a protected branch, Git waits while Sphinx asks you to predict what your change will do. If you miss something, it explains and gives you a new scenario to try. Once you pass, the same push continues. This works whether you or a coding agent ran `git push`. The questions come from a separate reviewer model. It reads the committed change through read-only Git tools and does not see the conversation that produced the code. ## What a check looks like This is an illustrative exchange for a change that adds a background job queue: > **Question.** The worker commits the operation but crashes before acknowledging the job. After redelivery, can the operation happen twice? Give a short reason. > > **Your answer.** No, the job is marked done when the operation commits. > > **Sphinx.** Not quite. The job is only marked done by the acknowledgement, which happens after the commit. A crash between the two leaves it unacknowledged, so the queue delivers it again and the operation runs a second time. > > **New scenario.** A worker stalls past the visibility timeout, so a second worker receives the same job. Both commit before either acknowledges. What stops a duplicate, if anything? Questions cover behavior, failure modes, and invariants rather than file names or function names. The check is open-book: you can read the code, or ask your agent to show it to you, while you answer. ## Before you install - **Requirements.** Node.js 22.19 or newer, Git, and macOS, Linux, or WSL. Native Windows is not supported yet. - **It applies to every repository on this machine.** `sphinx install` sets your global Git `core.hooksPath`. Your existing hooks still run first. Right after install, pushes to `main` or `master` in any repository are checked. `sphinx init` lets you adjust that for each repository. - **It blocks Git.** A matching push waits until you pass, pause, or skip, for up to 25 minutes. Your coding agent's shell may time out sooner. - **You need a reviewer model account.** This can be a signed-in Codex or Claude Code CLI, which uses that plan's allowance. It can also be an OpenRouter API key, which bills separately and is required even for free models, or any OpenAI-compatible endpoint. Sphinx has no account or hosted service of its own. - **Code leaves your machine.** The reviewer provider receives the changed code and related files from the commit, your answers, and `.sphinxcontext.md`. Ignored files are never read, and `.env` files, private keys, and common credential files are excluded by default. Add your own sensitive paths to `.sphinxignore` before your first check. Ignore rules match file paths, so they will not catch a secret pasted i