Skip to content

feat(pr-review): full-review workflow — risk+heuristics → editable prompt → PR comment - #411

Merged
jrothrock merged 1 commit into
mainfrom
feat/pr-full-review
Sep 11, 2026
Merged

jrothrock merged 1 commit into
mainfrom
feat/pr-full-review

Conversation

@jrothrock

Copy link
Copy Markdown
Collaborator

What

A "Full Review" of a PR that runs as a workflow and builds on everything we already compute (risk, heuristics, per-block findings, description, diff), then reviews the whole PR against an editable review brief and can post the result as a comment.

The workflow

POST /prs/<id>/review:

  1. Auto-runs prerequisites if missing — block/heuristics extraction + the risk verdict (one click does everything).
  2. Assembles context — risk verdict + file heuristics/hot-spots + per-block AI findings + PR description + (capped) diff.
  3. Runs the editable pr.review prompt on the host (read-only) Claude.
  4. Stores the markdown per-PR, latest-wins (GET /prs/<id>/review; new columns full_review/full_review_at, migration 0013).

The prompt (editable, global + per-repo)

New pr.review catalog entry seeded with the review brief: don't treat heuristics as binary — evaluate the entire PR; look for commonly-missed issues (unhandled edge cases, concurrency, idempotency, at-least/at-most-once semantics); decide additive vs subtractive; for fixes, find & justify the root cause, not the symptom; flag hot-path performance. Editable in the Prompts carousel globally and per-repo (the carousel is catalog-driven, so it appears automatically — no per-key frontend work).

UI

  • A prominent ★ Full Review CTA in the PR toolbar (solid accent fill, distinct from the muted toolbar buttons).
  • A right-side drawer that renders the review markdown, with Run / Re-run and a 💬 Comment on PR button.
  • "Comment on PR" pre-fills the existing comment box for edit-then-post — nothing reaches GitHub without the user confirming in the action bar.

Tests

RunFullReview assembles the prior analysis as context + stores/round-trips; degrades to "not available" notes when prereqs are absent; nil-runner guard; StoredReview absent. Migration 0013 applies. Full internal/dashboard + internal/prreview + internal/store packages pass; frontend typechecks + builds.

🤖 Generated with Claude Code

…ompt → comment

Adds a "Full Review" of a PR that runs as a workflow and reuses everything
we already compute:

1. New editable `pr.review` prompt in the catalog (the user's review brief:
   don't treat heuristics as binary, evaluate the whole PR, look for missed
   edge cases / concurrency / idempotency / at-least/at-most-once, decide
   additive vs subtractive, find & justify the ROOT CAUSE for fixes, flag
   hot-path perf). Editable globally AND per-repo like every catalog prompt
   (the Prompts carousel is catalog-driven, so it appears automatically).

2. Backend workflow (POST /prs/<id>/review): auto-runs risk + block/heuristics
   analysis if missing, then feeds the risk verdict + file heuristics + per-
   block findings + PR description + diff as context into pr.review, run by the
   host (read-only) claude. Result stored per-PR (GET /prs/<id>/review),
   latest-wins (new columns full_review / full_review_at, migration 0013).

3. Right-side "Full Review" drawer with a prominent ★ CTA in the PR toolbar.
   Renders the markdown; "Comment on PR" hands it to the action bar's comment
   box PRE-FILLED for edit-then-post (nothing posts to GitHub without the user
   confirming there).

Tests: RunFullReview assembles the prior analysis as context + stores/round-
trips; degrades to "not available" notes when prereqs are absent; nil-runner
guard; StoredReview absent. Full dashboard + prreview + store packages pass;
frontend typechecks + builds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jrothrock
jrothrock merged commit cfbb2c9 into main Sep 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant