Skip to content

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 ​

text
agent-sdk init ./thermo-quality-review --template thermo-quality-review
cd thermo-quality-review

Deploy ​

Sign in once, then deploy from a pushed checkout:

text
agent-sdk login
agent-sdk deploy --cursor-events-repo acme/api

Repeat --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:

text
agent-sdk deployment update thermo-quality-review --event-repo acme/api --event-repo acme/web

Try it locally ​

Skip the deploy while you iterate. Start the relay for one repo:

text
agent-sdk dev --cursor-events --repo acme/api

Open a PR, or replay a known one without pushing:

text
agent-sdk 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.

text
agent-sdk eval

Eval sessions skip the GitHub write.

What to edit ​

  • bot/instructions.md: what counts as a finding and the comment shape
  • evals/review.eval.ts: smoke cases