Operator surface

PR Review Remediation Controller

Carry out already-expressed reviewer judgment: autonomous mechanical completion of clear, bounded review decisions after verified evidence — then notify to finalize merge (default) or auto-merge when MERGE_HANDOFF_MODE=auto_merge. Humans stay for design, ambiguity, security, and conflicts. GitHub keeps CI/approval gates.

68.1%
of PRs · candidates to fully automate

In a 183K-PR Cargo/GitHub study, 31.9% of PRs had an author–integrator exchange. That means 68.1% are candidates to be fully automated through this system.

Working hypothesis: if there is no exchange, either feedback is being missed/deferred or the submitter is implementing clear reviewer direction without debate. In both cases the controller reclaims that coordination bandwidth by executing the mechanical path — batch explicit comments, remediation, verification, eligible thread closure, freshness, CI/approval gating, and merge handoff.

PR-level observed author–integrator exchange; Golzadeh et al., Cargo, 183K PRs.

Human / manual Controller Cursor worker GitHub Durable state Delay / rework

Before · exchange / manual path

Unnecessary amount of work after publishing a PR for review. Most of it is manual and mechanical -- it doesn't change the actual code being deployed just ensures there are no conflicts or is at the mercy of personal preference of the reviewer/devops.

After · PRs automatically progress and merge

Remove the user as an unnecessary controller. Automate the mechanical path on the no-exchange majority of PRs and escalate intelligently for human intervention.

Architecture · Technical flow

What you are seeing: humans at the edges (Reviewer → PR Author); the controller classifies each comment (LLM) then remediates the clear lane while escalating the rest — durable jobs and async gate events in the middle.

Why this matters: mutation jobs end after a demo-branch push; CI/approval events recompute readiness independently. When ready, default is notify the human to finalize merge; set MERGE_HANDOFF_MODE=auto_merge to merge automatically once all threads are clear (no open escalations). Layer A = short-lived jobs (remediate / freshness) that finish after push. Layer B = readiness projection recomputed from GitHub-like events (CI, approval, behind).

Technical sequence: Reviewer → GitHub → controller classify (LLM) → remediate and escalate in parallel Reviewer submits one multi-comment review on GitHub. GitHub sends review.submitted to the controller. The controller classifies comments with a read-only Cursor LLM call (escalate at least one; remediate the rest), then persists decisions. Remediable comments are batched under a mutation lock; Cursor worker patches, tests, and pushes one patch from a worktree; the job ends terminal. Escalated comments notify the PR Author via Discord in parallel — they do not wait for the worker. Later CI and approval webhooks independently recompute readiness. Clear directives resolve after verified evidence. MERGE_HANDOFF_MODE chooses notify-human-finalize (default) or controller auto-merge when all threads are clear. Discord never routes decisions into the controller. HUMAN Reviewer GitHub Controller DB / outbox Cursor LLM + worker Discord HUMAN PR Author Durability + mutation lock boundary 1 · Reviewer submits review 2 · review.submitted 3 · classify comments (LLM) 4 · decisions · escalate if necessary 5 · persist · remediable batch 6 · lock · persist job 7 · bounded remediation context 8 · worktree · test · one patch push 9 · job terminal · release lock clear directives: resolve eligible after verified evidence (demo: local intended resolve · prod: GitHub thread resolve) ── async gap: no agent waiting for CI ── 10 · CI / approval events 11 · recompute readiness from DB 12 · MERGE_HANDOFF_MODE 13a · default: Discord · ready · human finalizes 13b · auto_merge → GitHub merge 14 · classify fork · escalate · outbox 15 · Discord notify PR Author 16 · human lane 17 · Author reply / decide / resolve on GitHub 18 · webhook · re-evaluate
Human actor System Solid · bounded call Dashed · async event Dashed rose · human / escalation path
  • Reviewer submits one review (multi-comment) on GitHub.
  • Controller classifies comments with a Cursor LLM call (read-only) — escalate ≥1, remediate the rest — then forks: batch the clear lane immediately; notify humans on the rest.
  • PR Author replies/decides on escalated threads on GitHub.
  • GitHub owns CI and approval gates. Merge defaults to human finalize (MERGE_HANDOFF_MODE=manual); auto_merge merges when all threads are clear.
  • Database manages state to prevent duplication of efforts (jobs, locks, readiness, escalations, notifications).
  • Cursor is used twice: classify (no commits) then a worktree worker that ends after it pushes a demo-branch commit. Later CI/approval events recompute readiness independently.
  • Discord is notifications only. This could be replaced by any notification surface (Slack, Teams, SMS, etc). Discord never routes decisions into the controller.
Before — manual / no controller

Removes human time: None yet — engineer rediscovers comments, dispatches an agent, babysits freshness/CI.

Human still owns: All judgment and all last-mile coordination.

Policy: AUTO_RESOLVE_ELIGIBLE_THREADS=true · STRICT_HUMAN_THREAD_RESOLUTION=false · product default true
Autonomous mechanical completion of already-expressed review decisions for teams where most feedback is clear and bounded (common review nits).
Kill switch: STRICT_HUMAN_THREAD_RESOLUTION=true — teams that require human thread resolution keep threads open until a person clicks resolve.

Fixture PR — docs change (deliberately simple)

What you are seeing: the demo PR body plus review threads the controller will act on or escalate.

One markdown file. Three clear actionable inline comments (auto-resolve after verified fix). One design/debate thread that stays open and escalated — visually distinct below.