review-quill
v0.3.1
Published
GitHub-first PR review service for the PatchRelay stack
Maintainers
Readme
review-quill
review-quill is a self-hosted GitHub PR review bot. It watches configured
repositories, materializes the exact PR head SHA in a throwaway checkout,
builds the review context locally, runs a read-only Codex review pass, and
publishes a normal GitHub PR review with its GitHub App identity.
It fits alongside:
patchrelayfor delegated implementation and PR upkeepmerge-stewardfor queue admission and merge execution
You can run review-quill on its own. PatchRelay is not required.
What It Does
For each eligible PR head, review-quill:
- detects that a new reviewable PR head exists
- materializes an ephemeral local checkout of that exact SHA
- builds a curated diff against the PR base branch
- loads repo review guidance such as
REVIEW_WORKFLOW.md,CLAUDE.md, andAGENTS.md - runs a review pass through
codex app-server - publishes an ordinary GitHub
APPROVEorREQUEST_CHANGESreview - cancels stale in-flight attempts when a newer PR head lands first
This keeps review grounded in the real repository state instead of only the GitHub files API.
Quick Start
1. Install
npm install -g review-quill2. Bootstrap the local home
review-quill init https://patchrelay.example.com/reviewThat creates:
~/.config/review-quill/runtime.env~/.config/review-quill/service.env~/.config/review-quill/review-quill.json/etc/systemd/system/review-quill.service
3. Configure GitHub access
Quick-start path: put the non-secret GitHub App id in service.env and keep
the webhook secret plus App private key in encrypted systemd credentials.
Typical machine-level config:
REVIEW_QUILL_GITHUB_APP_ID=123456
REVIEW_QUILL_GITHUB_APP_INSTALLATION_ID=12345678Recommended encrypted credentials:
review-quill-webhook-secretreview-quill-github-app-pem
For first-time local bring-up you can also use environment-file secrets, but production should prefer encrypted systemd credentials.
4. Attach a repository
review-quill repo attach owner/reporeview-quill repo attach is the normal happy-path command:
- it adds or updates one watched repository
- it can auto-discover the default branch and required checks
- it stores repo-local review doc paths
- it reloads the service when needed
If you want machine review to count toward merge admission, include
review-quill/verdict in the repository's required checks and in any downstream
merge queue policy.
5. Validate the install
review-quill doctor --repo repo
review-quill service status
review-quill dashboardThat is the minimum “is this actually alive?” loop.
Public Ingress
Recommended public base URL:
https://patchrelay.example.com/review
That gives these public endpoints:
POST /review/webhooks/githubfor the GitHub App webhookGET /review/healthfor external health checksGET /review/attempts/:idfor check-run detail links
Keep these local-only:
/review/watch/review/attempts/review/admin/*
The package ships an example Caddy config at infra/Caddyfile.
GitHub App Permissions
This is the current known-good permission set:
Repository permissions:
Contents: Read and writeIssues: Read and writePull requests: Read and writeActions: Read-onlyMetadata: Read-only
Webhook events:
Pull requestCheck runCheck suite
Notes:
Pull requests: Read and writeis what letsreview-quillsubmit ordinary GitHub reviews.Actions: Read-onlylets it observe CI state clearly.Contents: Read and writeis part of the validated working setup today.
CLI Surface
The operator-facing commands are:
review-quill init <public-base-url>review-quill repo attach <owner/repo>review-quill repo listreview-quill repo show <id>review-quill doctor --repo <id>review-quill service statusreview-quill service logs --lines 100review-quill dashboardreview-quill attempts <repo> <pr-number>review-quill transcript <repo> <pr-number>review-quill diff --repo <id>
watch is kept as an alias for dashboard, but dashboard is the name to
document and use.
Validation, Visibility, And Troubleshooting
These are the key commands once the service is installed:
review-quill doctor --repo repo
review-quill service status
review-quill dashboard
review-quill attempts repo 123
review-quill transcript repo 123
review-quill diff --repo repo
review-quill service logs --lines 100Use them this way:
doctorchecks config, binaries, service reachability, and GitHub review wiring.dashboardshows queued/running/completed review attempts and recent webhook wakeups.attemptsshows recorded review history for one PR.transcriptlets you inspect the visible Codex thread for a review attempt.diffshows the exact local diff/inventory the reviewer would see.service logsis where to look when webhooks are not arriving, Codex requests fail, or GitHub publishing fails.
If GitHub is not counting review-quill reviews toward branch protection:
- verify the App permission set above
- confirm the repository requires the review/check signals you expect
- run
review-quill doctor --repo <id> - inspect recent attempts and transcripts for the affected PR
Review Context
review-quill reviews from a real checked-out PR head, not just GitHub API
metadata.
The default context path is:
- ephemeral local checkout at the exact PR head SHA
- local
git diff <base>...HEADinventory and curated patch set - repo guidance from
REVIEW_WORKFLOW.md,CLAUDE.md, andAGENTS.md - prior formal PR reviews from GitHub
- optional Linear issue context when issue keys appear in the PR metadata
Diff context is intentionally filtered:
- noisy/generated paths can be ignored or summarized
- oversized patches are summarized instead of dumped whole
- repo config can tune ignore/summarize patterns and patch budgets
Relationship To PatchRelay And Merge Steward
The three services have distinct ownership:
patchrelayowns implementation, branch upkeep, and issue/worktree orchestrationreview-quillowns PR review publicationmerge-stewardowns queue admission, speculative validation, and landing
GitHub is the shared protocol boundary between them.
Happy Path
review-quill init https://patchrelay.example.com/review
review-quill repo attach owner/repo
review-quill doctor --repo repo
review-quill service status
review-quill dashboard