Skip to content

feat(pr-review): sweep assessment framework + filtered diff metrics#1919

Merged
nick-inkeep merged 1 commit intomainfrom
feat/pr-review-improvements
Feb 11, 2026
Merged

feat(pr-review): sweep assessment framework + filtered diff metrics#1919
nick-inkeep merged 1 commit intomainfrom
feat/pr-review-improvements

Conversation

@nick-inkeep
Copy link
Collaborator

Summary

  • Filtered diff metrics: The pr-context Size row now reports additions/deletions/file counts computed from git diff --numstat with the same EXCLUDE_PATTERNS applied to the diff. Previously these came from the GitHub API (unfiltered), which inflated counts with lockfiles, snapshots, changelogs, etc.
  • Sweep assessment framework: Adds a structured decision framework to the PR review orchestrator for re-reviews (review_scope=delta). Instead of the vague "very large surface area" heuristic, the orchestrator now evaluates five qualitative factors — Size, Novelty, Sensitivity, Blast radius, and Precedent — to decide whether a broader sweep beyond the delta is warranted. All three downstream references updated to point to the new framework.
  • Cross-type deduplication: Adds a rule to Phase 4.1 to cluster and merge findings across different finding types when they address the same underlying concern.

Files changed

File What changed
.github/workflows/claude-code-review.yml Compute filtered_additions, filtered_deletions, filtered_file_count from git diff --numstat (respects EXCLUDE_PATTERNS). Use these in the pr-context Size metadata row instead of raw GitHub API values.
.claude/agents/pr-review.md Add ### Sweep assessment (re-reviews only) subsection in Phase 1.1 with five-factor decision table and "two or more" threshold. Replace all three "very large surface area" references to point to the new framework.

Test plan

  • Trigger a review on a PR with excluded files (lockfiles, snapshots) and verify the Size row in pr-context shows filtered counts, not inflated GitHub API values
  • Trigger a re-review (review_scope=delta) on a large PR and verify the orchestrator performs the sweep assessment and notes its determination
  • Trigger a re-review on a small delta PR and verify the orchestrator defaults to delta-only (no sweep)

Made with Cursor

… metrics

- Add filtered additions/deletions/file count computed from git diff --numstat
  (respects EXCLUDE_PATTERNS, unlike raw GitHub API values that include lockfiles,
  snapshots, changelogs). Use these in the pr-context Size metadata row.
- Add Sweep Assessment decision framework to pr-review orchestrator (Phase 1.1)
  with five qualitative factors: Size, Novelty, Sensitivity, Blast radius, Precedent.
  Replaces vague "very large surface area" language with a concrete, multi-dimensional
  evaluation that the orchestrator performs during re-reviews (review_scope=delta).
- Update all three downstream references to point to the new framework.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2026

⚠️ No Changeset found

Latest commit: 472d968

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Building Building Preview, Comment Feb 11, 2026 2:47am
agents-docs Building Building Preview, Comment Feb 11, 2026 2:47am
agents-manage-ui Building Building Preview, Comment Feb 11, 2026 2:47am

Request Review

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