Review pull requests for structural code quality
This agent reads a pull request diff and posts one review comment. It reports missing abstractions, deeply nested control flow, feature logic leaking into shared paths, and files pushed past 1,000 lines. Style nits and behavior disputes stay out.
This template is one model turn: read the diff, then post one comment.
Scaffold
bdk init ./thermo-quality-review --template thermo-quality-reviewcd thermo-quality-reviewDeploy
Sign in once, then deploy from a pushed checkout:
bdk loginbdk deploy --cursor-events-repo acme/apiRepeat --cursor-events-repo for each repo. Every repo must share one
owner. The deployment watches those repos through your team's Cursor
GitHub connection and reviews each opened PR. No webhook or local
server.
Change repos later without redeploying:
bdk event-repos thermo-quality-review --repo acme/api --repo acme/webTry it locally
Skip the deploy while you iterate. Start the relay for one repo:
bdk dev --cursor-events --repo acme/apiOpen a PR, or replay a known one without pushing:
bdk github replay https://github.com/acme/api/pull/12 --dir .replay needs pull access. Draft PRs are ignored. The channel writes
pr/diff.patch, then starts a model turn. The model calls
post_findings once. Chat replies stay in the playground.
post_findings writes the GitHub comment.
Connect GitHub in Cursor first (Settings or cursor.com/dashboard) so the relay and API calls use your account. See the GitHub guide.
Evals
Use the two smoke cases, one spaghetti-branch fixture and one clean fix, as a local exercise. They need no GitHub access.
bdk evalEval sessions skip the GitHub write.
What to edit
bot/instructions.md: what counts as a finding and the comment shapeevals/review.eval.ts: smoke cases