You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -64,27 +64,25 @@ If a base branch is not specified via `--base`, use `main` or `master` if either
64
64
2. Read the target files or diff to grasp the scope.
65
65
3. Produce a concise summary of the review content.
66
66
4. Decide whether to add optional reviewers based on the scope. If the user has explicitly requested specific reviewers, include them.
67
-
5.**Fetch diff information** — To avoid each reviewer redundantly running `git diff` themselves, the review leader fetches the diff once here and passes it to each reviewer:
- Example filename: `parallel-review-diff-{timestamp}.txt`
67
+
5.**Fetch diff information via script** — Run the provided script to collect all diff data atomically. This guarantees every section — including unstaged changes — is always written to the output file:
68
+
- Generate an output file path: `/tmp/parallel-review-diff-{timestamp}.txt`
6. **Decide how to pass the diff to reviewers based on file size:**
76
+
- **Less than 1,000 lines:** Read the file and embed its contents directly in the reviewer prompt.
77
+
- **1,000 lines or more:** Pass the **file path** to reviewers, who will read it via Read.
80
78
81
79
## Step 2 — Launching Parallel Reviewers
82
80
83
81
Launch all selected reviewers **simultaneously** using the Agent tool. Each reviewer runs as a **read-only** sub-agent.
84
82
85
83
### Agent Prompt Template
86
84
87
-
Pass the following prompt to each reviewer agent (filling in `{name}`, `{perspective}`, `{targets}`, `{base}`, `{changed_files_list}`, `{diff_content_or_path}`, and `{commit_log_summary}`):
85
+
Pass the following prompt to each reviewer agent (filling in `{name}`, `{perspective}`, `{targets}`, `{base}`, and `{diff_content_or_path}`):
88
86
89
87
```
90
88
You are {name}. Conduct a code review from your specialist perspective.
@@ -94,15 +92,11 @@ You are {name}. Conduct a code review from your specialist perspective.
94
92
Review target:
95
93
- Scope: {targets}
96
94
- Base branch: {base}
97
-
- Changed files:
98
-
{changed_files_list}
99
95
100
-
Diff (fetched by the review leader):
96
+
Diff and context (pre-fetched by the review leader via script):
101
97
{diff_content_or_path}
102
-
(For under 1,000 lines, embed the diff body directly here. For 1,000+ lines, write `File path: {path}` and have the reviewer read it via Read.)
0 commit comments