Route pull requests to a qualified reviewer with the lightest workload

A developer set up a Cursor Automations agent that picks one reviewer per PR by relevant context, then by open review load; mean open-to-merge time fell from 18.2 to 12.9 hours in the pilot week.

Done withCursor· Nov 10, 2026

What they did

The author, Adra, found that reviewers on their team were picked more or less at random: someone posted a PR in the group chat and waited. They used Cursor Automations to run an agent on each new pull request. The agent reads the change, builds a pool of people with relevant history in the touched files or nearby components, drops the author and bots, and then ranks that pool by outstanding review requests, reviews assigned in the last seven days, time since their last assignment, and only last by experience. It requests exactly one reviewer, leaves any human choice alone, never re-requests someone a person removed, and reports who it chose and why. It is not allowed to review, approve or merge.

How it went

The pilot started on 2 November 2026. Mean open-to-merge time that week was 12.9 hours, against 18.2 hours across the three weeks before. Against the week just before, the mean went from 25.8 to 12.9 hours and the median from 14.4 to 6.2 hours. The author stresses these are one week of observational numbers and does not claim the routing caused the whole drop.

Worth knowing

Ranking by expertise alone would keep picking the same person, which is why workload comes first inside the qualified pool. The prompt also tells the agent to skip any metric it cannot get and say so, and to flag a PR for human routing rather than guess when no one qualifies.

Try it

With Cursor· 4 parts to fill in

On every new non-draft pull request in [repository], assign exactly one human reviewer. First check the review-request history and leave things alone if a person has already assigned or removed a reviewer. Read the diff, then list eligible reviewers who have worked on the changed files or related components, excluding the author and bots. Rank them by fewest open review requests, then fewest assignments in the last [7] days, then longest since their last assignment, then relevant experience. Avoid anyone with [3] or more open requests if someone else qualifies. Never review, approve or merge. Post a short note saying who you picked and why, and if nobody qualifies, flag the PR for [team lead] instead of guessing.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related