Skip to content

Commit 5f99264

Browse files
committed
feat: add parallel review agent execution and support for non-PR code reviews
1 parent 50858a6 commit 5f99264

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

.claude/commands/review/pr-review.md

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You are conducting a comprehensive pull request review for the Pattern Stack eco
2121

2222
## Phase 1: Context Discovery & Analysis
2323

24-
### Step 1.1: Identify the PR
24+
### Step 1.1: Identify the PR or Recent Work
2525
$ARGUMENTS
2626

2727
If a PR number was provided, fetch details:
@@ -34,6 +34,16 @@ If no PR specified, find current branch's PR:
3434
gh pr status
3535
```
3636

37+
**If no PR exists:** Review recent commits related to the task:
38+
```bash
39+
# Identify recent work by examining commit history
40+
git log --oneline -20
41+
# Find commits related to specific tickets (e.g., CLI-8)
42+
git log --grep="CLI-8" --oneline
43+
# Review the full changeset for the task
44+
git diff [base-commit]..HEAD --stat
45+
```
46+
3747
### Step 1.2: Understand the Task Context
3848
Use task patterns to understand what was implemented:
3949
```bash
@@ -58,7 +68,8 @@ Launch a subagent to comprehensively analyze the changes:
5868
```
5969
Task: "Analyze PR changes comprehensively"
6070
Prompt: "
61-
1. Use 'gh pr diff [pr-number]' to get the full diff
71+
1. If PR exists: Use 'gh pr diff [pr-number]' to get the full diff
72+
If no PR: Use 'git diff [base-commit]..HEAD' for recent changes
6273
2. Identify all files changed and categorize them by:
6374
- Layer (for backend-patterns: atoms/features/molecules/organisms)
6475
- Component (for cli-patterns: core/execution/ui/parser)
@@ -75,8 +86,12 @@ Subagent: general-purpose
7586

7687
## Phase 2: Multi-Dimensional Review
7788

89+
**IMPORTANT: Launch all review agents IN PARALLEL for efficiency**
90+
91+
You MUST send a single message with multiple Task tool calls to run all review agents concurrently. This significantly improves review performance.
92+
7893
### Step 2.1: Architecture Compliance Review
79-
Launch architecture review agent:
94+
Launch architecture review agent (in parallel with other agents):
8095

8196
**Task Tool Usage:**
8297
```
@@ -107,7 +122,7 @@ Subagent: general-purpose
107122
```
108123

109124
### Step 2.2: Test Coverage & TDD Validation
110-
Launch test validation agent:
125+
Launch test validation agent (in parallel with other agents):
111126

112127
**Task Tool Usage:**
113128
```
@@ -131,7 +146,7 @@ Subagent: general-purpose
131146
```
132147

133148
### Step 2.3: Code Quality & Standards Review
134-
Launch code quality agent:
149+
Launch code quality agent (in parallel with other agents):
135150

136151
**Task Tool Usage:**
137152
```
@@ -159,7 +174,7 @@ Subagent: general-purpose
159174
```
160175

161176
### Step 2.4: Pattern Stack Integration Opportunities
162-
Launch pattern enhancement agent:
177+
Launch pattern enhancement agent (in parallel with other agents):
163178

164179
**Task Tool Usage:**
165180
```
@@ -192,7 +207,19 @@ Subagent: general-purpose
192207
```
193208

194209
### Step 2.5: Security & Performance Review
195-
Launch security and performance agent:
210+
Launch security and performance agent (in parallel with other agents):
211+
212+
**Example of launching all agents in parallel:**
213+
```python
214+
# Send ONE message with MULTIPLE Task tool calls:
215+
assistant: I'll launch all review agents in parallel to comprehensively analyze the code.
216+
217+
[Task 1: Architecture Compliance]
218+
[Task 2: Test Coverage & TDD]
219+
[Task 3: Code Quality]
220+
[Task 4: Pattern Stack Opportunities]
221+
[Task 5: Security & Performance]
222+
```
196223

197224
**Task Tool Usage:**
198225
```

0 commit comments

Comments
 (0)