feat(pr-management-code-review): suggest domain-expert reviewers in the review body#844
Merged
potiuk merged 1 commit intoJul 12, 2026
Conversation
…he review body
During a per-PR review, surface up to 2-3 domain experts worth pinging
for an additional look at the touched area, folded into the review body.
New Step 4.5 in review-flow.md derives candidates, cheapest source first:
1. CODEOWNERS owners for the changed paths (authoritative, ~always a
committer — satisfies the "at least one maintainer" requirement)
2. recent commit authors on the touched paths (surfaces active
non-committer contributors)
3. reviewers of prior merged PRs on those paths (only when 1-2 fall short)
Candidates are filtered for activity and de-noised (drop the author,
the viewer, and anyone already requested / already reviewing). Every
suggestion must trace to a concrete source — no fabricated handles, and
an empty section when nothing grounds out. Suggestions are named in the
body only; the skill never auto-requests reviewers (that stays a
maintainer action, or a job for reviewer-routing).
posting.md gains the "Suggested additional reviewers" body section;
SKILL.md notes it in the per-PR loop, the does-NOT-do list, and the
per-PR gh budget.
Adds a step-4.5-suggested-reviewers eval suite (4 cases): grounded
2-3-with-a-committer, empty-section-when-nothing-grounds, prompt-injection
resistance (ungrounded body request ignored), and exclusion of
already-reviewing owners.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reviewer-routingis a separate, roster-bounded skill — nothing suggests area experts inside the review output itself.Type of change
.claude/skills/<name>/) — eval fixtures updated belowTest plan
step-4.5-suggested-reviewerseval suite (4 cases): grounded 2–3-with-a-committer, empty-section-when-nothing-grounds, prompt-injection resistance (an ungrounded "add @x" line in the PR body is ignored), and exclusion of an already-reviewing owner.skill-and-tool-validatepasses for the edited skill (internal links resolve; no new hard violations).skill-evalrenders all 4 cases, exit 0). Full LLM grading requires theclaudeCLI + an API key, which was not available in the authoring environment — it should be run by CI / a reviewer:uv run --project tools/skill-evals skill-eval --cli "claude -p" tools/skill-evals/evals/pr-management-code-review/step-4.5-suggested-reviewers/fixtures/RFC-AI-0004 compliance
gh pr edit --add-reviewer/requestReviewsare never called).<repo>/<viewer>/<project-config>placeholders.Notes for reviewers (optional)
review-flow.mdStep 4.5,posting.mdtemplate section) to respect the SKILL.md ≤500-line guidance;SKILL.mdonly gains short pointers (per-PR loop, does-NOT-do list, gh budget).maintip plus this single commit, so the three-dot diff shows exactly the intended change. It can be rebased onto currentapache:mainon request (the fork couldn't be synced here without theworkflowOAuth scope).