Skip to content

feat: enhance gh-pr-review skill with multi-agent teams review and auto-fix#13530

Merged
DeJeune merged 4 commits intomainfrom
DeJeune/agent-team-review
Mar 18, 2026
Merged

feat: enhance gh-pr-review skill with multi-agent teams review and auto-fix#13530
DeJeune merged 4 commits intomainfrom
DeJeune/agent-team-review

Conversation

@DeJeune
Copy link
Copy Markdown
Collaborator

@DeJeune DeJeune commented Mar 17, 2026

What this PR does

Before this PR:
The gh-pr-review skill was a simple single-agent PR review workflow using the gh-pr-review CLI extension (EurFelux/gh-pr-review) for structured inline comments. It only supported PR reviews.

After this PR:
The gh-pr-review skill is a comprehensive code review system inspired by Tencent/tgfx's .codebuddy/skills/cr, adapted for Claude Code's Agent tool. It now supports:

  • Multiple review modes: local branch changes, PRs, commits, commit ranges, and file paths
  • Multi-agent teams review: parallel reviewer agents with an adversarial verifier agent to reduce false positives
  • Risk-based auto-fix: automatic fixing of low/medium/high risk issues based on user-selected mode
  • Structured checklists: code and document review checklists tailored for the project's TypeScript/React/Electron stack, with cross-references to vercel-react-best-practices for deeper React/performance analysis
  • Self-diagnosis: /gh-pr-review diag to analyze and improve the skill itself
  • Checklist evolution: mechanism to add new checklist items based on recurring patterns
  • PR review via gh-pr-review extension: retains the gh-pr-review CLI extension for pending reviews with inline comments, preview, and structured submission

Why we need it and why it was done in this way

The previous skill was limited to PR-only review. The tgfx approach provides a battle-tested, comprehensive review system with adversarial verification (reviewer finds issues, verifier challenges them), which significantly reduces false positives.

The following tradeoffs were made:

  • Adapted CodeBuddy's CreateTeam/SendMessage/TeamDelete APIs to Claude Code's Agent tool with parallel subagents
  • Code checklist adapted for this project's specific stack (TypeScript, React 19, Electron 38, Redux Toolkit, Dexie, AI SDK v5) instead of tgfx's C++ focus
  • Cross-references vercel-react-best-practices skill for React/performance checks instead of duplicating those rules
  • Added v2 refactoring block rules in judgment matrix (Redux state shape / IndexedDB schema changes always deferred)
  • Retained gh-pr-review CLI extension for PR review comment submission (pending review API with preview)

The following alternatives were considered:

  • Creating a new /cr skill alongside gh-pr-review — rejected because both serve code review and having two review skills would be confusing

Links to places where the discussion took place:

Breaking changes

None. The skill name and invocation (/gh-pr-review) remain the same. The gh-pr-review CLI extension is still used for PR reviews. New capabilities (local review, teams review, auto-fix) are additive.

Special notes for your reviewer

  • The new skill routes to different reference files based on context (PR number, uncommitted changes, branch state, agent teams availability)
  • references/teams-review.md is the most complex file — it orchestrates multi-agent review with 6 phases
  • All reference files are adapted from tgfx's implementation with project-specific customizations
  • Code checklist cross-references vercel-react-best-practices skill for React/performance deep checks

Checklist

Release note

NONE

DeJeune and others added 4 commits March 17, 2026 13:13
…to-fix

Rewrite the gh-pr-review skill based on Tencent/tgfx's code review system.
Add structured review checklists, adversarial reviewer-verifier mechanism,
risk-based auto-fix, and self-diagnosis capability.

New reference files:
- teams-review.md: multi-agent parallel review with Agent tool
- local-review.md: single-agent local change review
- pr-review.md: PR review via gh api inline comments
- diagnosis.md: skill self-diagnosis (/gh-pr-review diag)
- code-checklist.md: adapted for TS/React/Electron stack
- doc-checklist.md: document review checklist
- judgment-matrix.md: risk levels with v2 block rules
- checklist-evolution.md: checklist update mechanism

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: suyao <[email protected]>
Add cross-references to the vercel-react-best-practices skill from
code-checklist.md, teams-review.md, local-review.md, and pr-review.md
for deeper React/performance analysis during reviews.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: suyao <[email protected]>
Remove outdated reference to gh-pr-review CLI extension in the skill
frontmatter description.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: suyao <[email protected]>
Replace raw gh api calls with gh-pr-review CLI extension (EurFelux/gh-pr-review)
for structured pending reviews with inline comments, preview, and submit.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: suyao <[email protected]>
@EurFelux EurFelux self-requested a review March 17, 2026 05:22
Copy link
Copy Markdown
Collaborator

@GeorgeDong32 GeorgeDong32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This is a well-designed enhancement to the gh-pr-review skill, inspired by Tencent/tgfx's battle-tested code review system. The multi-agent teams review with adversarial verification (reviewer vs verifier) is a solid approach to reduce false positives.

Highlights

  • Clean routing logic in SKILL.md - routes to appropriate review flow based on context
  • Comprehensive checklists tailored for the project's TypeScript/React/Electron stack
  • Risk-based auto-fix with clear judgment matrix for fix decisions
  • V2 block rules properly documented to prevent conflicts with ongoing refactoring
  • Cross-references to vercel-react-best-practices for React/performance deep checks

Minor Observations (no action needed)

  1. The git commit --only flag in teams-review.md Fix rules is widely supported since Git 2.0.5+ (2014), so no compatibility concerns.

  2. The module partition thresholds (≤1000 lines, ≤20 files) for single-reviewer optimization seem reasonable for this codebase.

Verdict: Ready to merge. Good documentation quality and clear architectural decisions.

Copy link
Copy Markdown
Contributor

@cherry-ai-bot cherry-ai-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I reviewed the current version and do not see a blocking issue that justifies holding this PR. The overall direction is useful, and the remaining points are follow-up refinements rather than reasons to block merge.

@DeJeune DeJeune merged commit 68af452 into main Mar 18, 2026
12 checks passed
@DeJeune DeJeune deleted the DeJeune/agent-team-review branch March 18, 2026 07:08
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.

2 participants