Skip to content
yonnockPublic

About

A panel of Codex reviewers for your pull requests: review, fix, wait for CI, repeat until it is clean

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

quorum

Several Codex reviewers read your pull request independently. Their findings are merged, then a separate evidence pass checks each one against the code. It may preserve, correct, remove or add findings when the repository supports that result. Only the final report is posted or handed to a fix session. From there quorum can keep going on its own: wait for CI, review again, and repeat until the PR is clean.

quorum watch           # follow running, queued and finished work
quorum review          # review the current branch, with or without a PR
quorum babysit 1811    # review, fix, CI, repeat until it is clean

The name is the mechanism: no single reviewer decides anything. Six of them run against the same diff, an aggregator deduplicates their claims, and an independent verifier judges every resulting finding from the code evidence. A run that cannot produce enough reviewer outputs or a valid verified report refuses to post.

What it costs

One review is six Codex reviewer passes, an aggregator and a verifier. quorum babysit multiplies that by the number of rounds, adds a fix session per round, and adds one final description pass after convergence. Lower REVIEWERS for cheaper runs.

PR writes come from your GitHub account, under your name. Start with POST=0, which keeps review output on disk and disables comments and final description generation, until you trust the output.

Because the agent's trigger is the review request rather than the code, a PR costs one review no matter how many times it is pushed to.

Install

brew tap --custom-remote yungweng/tap https://github.com/yonnock/homebrew-tap
brew install yungweng/tap/quorum terminal-notifier
brew install --cask codex     # Homebrew formulas cannot depend on a cask

From a checkout, which needs Go 1.25 or newer:

make install-hooks
make dev

This writes ~/.local/bin/quorum with a version such as 1.1.0-dev+3d85e2a.dirty. The commit identifies the checkout; dirty means the build includes uncommitted changes. If ~/.local/bin precedes Homebrew in PATH, every new terminal uses this build. Check with which quorum and quorum --version.

Requires gh (authenticated), git and the engine you run: codex by default, claude (Claude Code) or grok (Grok CLI) when REVIEW_ENGINE/ FIX_ENGINE or --engine/--review-engine select them. An engine nothing selects does not need to be installed. terminal-notifier sends notifications from detached macOS agent runs. Foreground commands normally notify through the terminal. It also sends the two clickable action notifications: an own pull request needing another person's approval, and, with NOTIFY_READY_TO_MERGE=1, a clean review that quorum did not merge. Each one is named owner/repo#number; clicking it opens the pull request on GitHub. quorum doctor reports a missing notifier. direnv is optional and only needed for projects that have an .envrc.

make install-hooks is needed once per clone and after a tracked hook changes. It copies the reviewed hooks into the clone's untracked Git directory and sets an absolute core.hooksPath. Pre-commit rejects whitespace errors and unformatted staged Go files, while pre-push runs the full check against the commits being pushed. Run the same format, race-test, build, dead-code and lint checks directly with make check.

Claude Code also loads the project hooks from .claude/. After it changes Go or check configuration, its Stop hook runs make check and returns failures to the session. Review new or changed hooks when the client asks.

quorum review

Run it from inside the repository checkout:

quorum review                         # current branch; its PR when one exists
quorum review 1811
quorum review https://github.com/owner/repo/pull/1811
quorum review 1811 -n 8 --effort low
quorum review 1811 --engine claude # review with Claude Code instead of Codex
quorum review 1811 --engine grok   # review with the Grok CLI
quorum review 1811 --dry-run       # write the report, do not post it

If the current branch has no open PR, it reviews the pushed branch against the repository's default branch and writes the report to disk without posting it. The checkout must be clean and match origin; use --base to choose another base branch.

It builds a detached worktree under ~/.cache/quorum/reviews/, runs direnv allow unless the target itself changed an .envrc, links in cached dependency trees and enters the environment once so the install hook runs one time per run rather than once per reviewer, then fans out codex exec review. The outputs are merged into a candidate report. A fresh verifier inspects the diff and code in a read-only sandbox. It can keep, correct, remove or add well-supported findings. Afterward Go also requires the original HEAD and an empty Git status. PR reviews post only the final report; branch-only reviews keep it on disk. Each run also writes a machine-readable findings.json. The unfiltered aggregated-pr-comment.md and local verification-changes.md remain beside it for audit.

A failed run keeps its worktree, so the expensive reviewer passes never have to run twice: quorum review 1811 --resume-run <dir> picks it up with the original target and base.

Successful runs remove their detached worktree immediately. quorum gc keeps active runs protected, removes inactive worktrees before review output, and handles read-only dependency caches without blocking new run startup during the recursive deletion.

A run refuses to post rather than post something misleading: on a moved PR head, on an .envrc the PR itself changed, on a malformed aggregator or verifier answer, and when the verifier changes HEAD or leaves staged, unstaged or untracked files. The reference says what each means.

quorum babysit

You implement, babysit iterates. It expects the first implementation to be committed and pushed.

quorum babysit                  # current branch; its PR when one exists
quorum babysit 1811
quorum babysit 1811 --effort high "Focus on the time-tracking module"

The loop: review, decide, fix. Zero Blockers and Critical means done. Otherwise the already verified review comment goes into a Codex session that checks each remaining finding for whether it is real or intended, fixes the real ones and commits. By default everything stays local (LOOP_MODE=offline): reviews check the unpushed worktree head, a per-repo test command guards each round (a tracked .quorum/testcmd in the repo, shared by the whole team and read from the base branch so a change cannot weaken its own gate; --test-cmd and the user-local ~/.config/quorum/testcmd/<owner>/<repo> override it), and only the converged result is pushed - once - so the whole run triggers a single CI run instead of one per fix round. After that push quorum posts one consolidated fix-log comment plus the final review's comment, and if CI repairs moved the head, one more review checks the repaired result. --online (or LOOP_MODE=online) restores the old push-and-wait-for-CI-every-round loop.

After a posted PR run converges with green CI, a fresh read-only pass writes a local PR-description candidate that describes the final implementation rather than the review and fix history. It preserves still-relevant links and instructions. If the final implementation materially departs from the original direction, it adds one short, calm warning at the top. Immediately before writing, quorum re-reads the PR: if the description was edited or the head moved during the run, it keeps the candidate local instead of overwriting that work; otherwise it replaces the remote description.

If the current branch has no open PR, babysit runs the same review-fix rounds on the clean, pushed branch. It still runs repository checks in each fix step and confirms every push on origin, but it skips PR CI and PR comments because neither exists yet. --local forces that mode even when an open PR exists, for a run that must not touch the PR.

Draft PRs need a --draft flag (or BABYSIT_DRAFTS=1 in the config) before babysit will push fixes and comments to them. Before the first review and before reporting ready, babysit fetches the base and merges it when the branch is behind. Conflicts go through the fix session, and the merged head is reviewed again. A pushed CI fix gets the same update before its checks are awaited, because GitHub runs no pull request workflow for a head that conflicts with its base. --no-resolve-conflicts turns all automatic base updates off.

Only Blockers and Critical keep the loop alive. Suggestions and Questions are handed to each fix round once, so the loop cannot chase moving targets forever. All fix rounds share one Codex session, so context carries across rounds.

When the final review is clean but still lists Suggestions, one last fix round triages them: it implements the ones worth keeping and skips the rest, and no further fix round follows. FIX_SUGGESTIONS=0 or --no-fix-suggestions turns that off. When the run is going to merge and that round pushed commits, one more review covers them while their CI runs, and the merge follows if it finds no Blocker and no Critical. Without auto-merge the commits stay unreviewed and the run reports ready.

An opt-in divergence scan can explain why a run still has findings at its round limit:

DIVERGENCE_SCAN=1
DIVERGENCE_ESCALATE_TO="example-user acme/platform"

The normal rounds do not change. After the final fix and CI wait, one read-only analysis compares the current run's review comments, fix responses, disputes and commits using the configured review model, effort and timeout. It reports whether the history contains incompatible decisions, only cumulative findings, or too little evidence to decide, then always stops. For a one-off run, use quorum babysit --divergence-scan. Reports are kept in the run directory; PR reports mention the author and configured escalation targets only when a manual decision may be needed.

Auto-merge

Auto-merge is off by default and is one switch for agent, review and babysit runs alike:

AUTO_MERGE=0
AUTO_MERGE_TIMEOUT="2h"
AUTO_MERGE_AUTHORS=""

A clean posted PR review has no Blockers or Critical findings; Suggestions and Questions are allowed. Quorum approves the exact reviewed commit, then asks GitHub to merge it with a method the repository allows after its branch rules pass. It prefers a merge commit to preserve existing behavior, then squash, then rebase. It never uses administrator privileges. When the target branch requires a merge queue, quorum adds the reviewed commit to the queue instead and reports queued for merge; GitHub owns the outcome from there, and the dashboard lists the PR as auto-merge queued until it lands. A non-empty AUTO_MERGE_AUTHORS limits merging to pull requests from those GitHub logins; everyone else's clean review stays posted, but the merge waits for a person. GitHub does not let you approve your own PR, so quorum merges it without an approval when the target branch requires none. If the branch requires an approving review, quorum skips both approval and merge, reports awaiting approval, and leaves a dedicated macOS Notification Center item. A moved head, a local report (POST=0 or --dry-run), and a branch without a PR are not merged. A repository with no supported merge method is rejected before approval, unless its queue makes that choice instead.

The wait for protected checks and mergeability defaults to two hours; set AUTO_MERGE_TIMEOUT=0 to wait until the run is stopped. Change these settings with quorum config or in the config file.

To merge one babysit run without changing the config, pass the flag. Commits the suggestion round pushes get a review of their own before the merge; turn the round off to save that review:

quorum babysit 42 --auto-merge
quorum babysit 42 --auto-merge --no-fix-suggestions

The fix sessions run with the engine sandbox and approvals bypassed, which gives them full file and network access on your machine. --sandboxed opts out. Read what that means before the first run.

Three situations that used to need a human are decided automatically. Pass --interactive to turn them back into terminal prompts.

  • Product decisions. The session decides conservatively and records notable decisions in the fix-log comment. If it stops to ask anyway, the questions go back for it to answer itself; after three rounds of that the run gives up.
  • Disputed findings. Review findings can be wrong, so a dispute is never accepted on first sight: the session must survive one forced re-check where it actively tries to reproduce each finding. If the dispute survives, the pipeline posts the final rebuttal with a link to the review comment. The original review stays unchanged, so the PR conversation preserves both sides.
  • Changed .envrc files. A run stops before loading an .envrc changed by the target unless you pass --allow-envrc-change after reading it. Changes made during a fix round are printed before direnv allow runs; with the sandbox bypassed the session can execute anything anyway.

Every pushed review fix and CI fix ends with a comment on the PR describing what failed, what changed and which checks ran. The session writes the text, in the language of the PR description; the pipeline posts it, so it appears as an ordinary comment from you.

Do not push to the PR branch while a run is active. The pipeline also refuses dirty or diverged checkouts and fork PRs; the reference says why.

The agent

quorum install writes a launchd agent that polls for pull requests asking for your review and handles them on its own. After that, binary upgrades at the same path and config changes such as POLL_INTERVAL refresh the job on the next poll; you do not need to run quorum install again unless you removed the agent.

quorum 1.1.0                                        agent loaded, every 5m, last poll 2m ago

  1/2 review   ·   1 fix   ·   1 queued   ·   3.4 load                                     ⠋
────────────────────────────────────────────────────────────────────────────────────────────

OPEN  2
  ● payments #98                accept crumb refunds in the same currency
      reviewed 21:02 · 2B 1C 3S  comment ↗
  ● toaster-api #2002           read the crumb tray size from the config
      reviewed 19:42 · nothing found  comment ↗

ACTIVE  1 / 2
  ● toaster-api #2016           stop emailing every user at 3am about crumbs
      review · agent · 6m · 4/6 reviewers done
  ◆ payments #103               harden artifact health screening
      review · manual · 2m · 0/6 reviewers done · gpt-5.6-luna/max
  ● toaster-api #2018           make the crumb tray endpoint idempotent
      1h04m   round 3/12   CI ✗ fix 2/3   review ✓   CI fix 2 ● 4m   opus/high   5 commits   log ↗
  ○ toaster-api #2014           allow browning levels above 11
      queued · waiting for a free slot

HISTORY
  ✓  21:02   payments #98       @robin     2B 1C 3S       comment ↗
  ✓  19:42   toaster-api #2002  @sam       2 runs         nothing found  comment ↗  merged
  ✗  29 Jul  toaster-api #1993  @robin     failed         reviewer-2 timed out after 45m

every repo that asks you · 2 at a time, 6 reviewers each · auto-merge off · 5.0 GB cache

The status bar under the version answers "what is this machine doing" before anything else has to be read.

OPEN lists pull requests quorum has reviewed that are still open, newest first, with what the review found. The bullet is red for blockers, yellow for critical findings and green for neither. A PR waiting on GitHub's Auto-Merge or merge queue says auto-merge queued; the others still need a person. A pull request leaves the section when it is merged, closed or no longer available on GitHub, when it is being reviewed again (ACTIVE has it then), and two weeks after its last review.

ACTIVE is everything in flight: reviews the agent started, reviews you started in a terminal, fix loops, and what is waiting for a slot. The symbol and the label under each line say which is which. Its count covers agent slots only, so a review or a fix loop you ran yourself does not spend one. On an idle machine the whole section is one line saying so.

HISTORY is one line per pull request, newest first, however its runs were started. toaster-api #2002 says 2 runs, a review and then a fix loop: the log keeps every run, and the line says how many there were and how many of them failed rather than spending a row on each. HISTORY=20 in the config sets how many are listed. The log behind it is described in the reference.

Every section draws the same columns at the same widths, measured from what is actually on screen. On a narrow terminal the columns give way in a fixed order, whole rather than shortened to a stub: the author first, then the explanation behind a result, and the repository and number last.

quorum watch redraws the same screen as it changes and marks pull requests that have since been merged or closed.

The trigger is the review request, not the code. One request is one review, so pushing more commits does not trigger another one; re-request the review to get a fresh one. Being an assignee is not a trigger. Requests aimed at a team you belong to are searched separately, because GitHub's review-requested: qualifier does not match those despite the docs.

Set AGENT_ACTION=babysit and the agent runs the full fix loop instead of posting a single review.

Commands

quorum                 show the command overview
quorum watch           follow running, queued and finished work
quorum status          show one dashboard snapshot
quorum run <pr>        hand one PR to the agent right now
quorum logs [-n N]     follow the log, --no-follow to just print the tail
quorum doctor [--fix]  check the setup and report what to do about it
quorum setup           configure scope, limits and notifications
quorum install         install the launchd agent
quorum uninstall       remove the agent, keep config and state
quorum poll            run one cycle by hand
quorum gc [--dry-run]  trim the cache to its budget
quorum config          change any setting, or --path for the file location
quorum version         print the version

On Linux everything works except quorum install; call quorum poll from a systemd timer or cron.

Configuration and reference

quorum config shows every setting and lets you change it; nothing is reachable only by opening the file. It is plain KEY=value at ~/.config/quorum/config.

docs/reference.md has the full reference: every config key with its default, every command flag, the exit codes, the files quorum reads and writes, and troubleshooting.

An existing prbot config and state are picked up automatically, and quorum install unloads the old prbot agent so the two do not race. They are only read: the first save writes ~/.config/quorum/config, and the state moves to quorum's own directory on the first poll. The prbot files stay as they were.

License

MIT

About

A panel of Codex reviewers for your pull requests: review, fix, wait for CI, repeat until it is clean

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages