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
refactor: Switch review-resolve to per-specialist batched verification
Step 1 returns by_assignee instead of writing findings.json; Step 2 launches
one Sub per specialist that batch-verifies its assigned ids. review-rounds
SKILL and the sequencer program are updated to match.
Also trim redundant preambles and chat-context-dependent wording from the
review-resolve SKILL and sequencer prompts per .claude/rules/prompt.md.
Copy file name to clipboardExpand all lines: .claude/skills/review-resolve/SKILL.md
+43-36Lines changed: 43 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Review documents are generated by parallel-review and contain metadata markers a
34
34
---
35
35
```
36
36
37
-
The current state of each finding is determined from **the fields present between the markers**:
37
+
The current state of each finding is determined from the fields present between the markers:
38
38
39
39
- Markers are empty → not yet triaged.
40
40
-`Triage: 🔧 Will Fix` only → triaged, estimate not yet completed.
@@ -62,7 +62,7 @@ For common prohibitions, see `.claude/rules/sub-agent.md`. The leader appends th
62
62
63
63
## Internal Processing (Intermediate Files)
64
64
65
-
Each finding's verification verdict is written to an intermediate file, and the aggregator sub-agent consolidates them. The leader (you) does not load verification bodies into context.
65
+
The leader (you) does not load verification bodies into context.
66
66
67
67
### Working Directory
68
68
@@ -75,7 +75,7 @@ The leader creates `{tmp_dir}` with `mkdir -p {tmp_dir}/verifications` at the st
75
75
76
76
### events.jsonl
77
77
78
-
Final markdown reflection still uses **`{basename}.events.jsonl` in the same directory as the markdown** (e.g., `review-round1.md` → `review-round1.events.jsonl`; referred to as `{events_path}` below). The **aggregator sub-agent** generates events.jsonl in one shot from the files under `{tmp_dir}/verifications/` (Step 4). Format:
78
+
events.jsonl is `{basename}.events.jsonl` in the same directory as the markdown (e.g., `review-round1.md` → `review-round1.events.jsonl`; referred to as `{events_path}` below). Format:
79
79
80
80
```jsonl
81
81
{"id":"C-1","field":"verification","value":"✅ Verified — Null check fix is correct"}
@@ -88,50 +88,61 @@ Use the **Write tool** for the file. Bash cat heredoc is unusable because apostr
88
88
89
89
## Step 1 — Parse (Delegated to Parsing Sub-Agent)
90
90
91
-
Launch the parsing sub-agent to extract findings. The leader (you) receives only the result file path, the count, and the dispatch `items`; do not load the review document body into context.
92
-
Use the same prompt template as review-respond Step 1 to generate `{tmp_dir}/findings.json` (see review-respond § Step 1).
91
+
Launch the parsing sub-agent to extract findings and assign verification specialists.
Read review document {document_path} and extract id / stage / verification assignee for each finding (no file output).
103
97
104
-
Each element of `items` (only `id` and `stage`) is used as the dispatch list for launching verification sub-agents in the next step.
98
+
Extraction targets: Critical / Major / Minor (skip Info).
105
99
106
-
## Step 2 — Verify Each Finding (Delegated in Parallel to Verification Sub-Agents)
100
+
stage classification (based on the latest values in current_meta):
101
+
- markers empty → pending_triage
102
+
- triage: 🔧 Will Fix, no estimate → pending_estimate
103
+
- estimate: ▶️ Maintain or 🚧 Alternative, no status → pending_fix
104
+
- verification last value is 💬 Feedback → feedback
105
+
- triage: 🚫 Won't Fix → wontfix_skip
106
+
- estimate: 🔻 Downgrade → downgrade_skip
107
+
- status: 🟢 Fixed, no verification or last value is ✅ Verified → fixed_skip
107
108
108
-
Loop over the `items` array received in Step 1 and launch a verification sub-agent in parallel for each `id` via the Agent tool. Findings have no inter-dependencies, so parallel launch is allowed. Each sub-agent looks up its id in `{tmp_dir}/findings.json` to obtain the trailing metadata, and Writes the result to `{tmp_dir}/verifications/{id}.json`.
109
+
Verification assignee determination:
110
+
- If the Triage line includes "(assignee: {specialist})", use that specialist.
111
+
- If no assignee is present, pick one specialist from the finding's Reviewers, preferring required reviewers (cpp-sensei / qt-sensei / obs-sensei / network-sensei). If none of the required reviewers are listed, use the first Reviewer.
1. Launch a verification sub-agent in parallel for each element of `items` via the Agent tool. Example prompt:
116
+
## Step 2 — Verify Each Finding (Delegated in Parallel per Specialist)
117
+
118
+
Loop over Step 1's `by_assignee` and launch a verification sub-agent in parallel for each `{assignee, ids}` via `Agent(subagent_type=assignee, prompt=...)` (the agent definition's persona and specialty perspective load automatically). Each specialist processes all assigned ids in a single launch, writing one `{tmp_dir}/verifications/{id}.json` per id.
119
+
120
+
Example prompt (do not include persona):
113
121
114
122
```
115
-
Verify the resolution of finding {finding-id} (verification and JSON Write only).
123
+
Verify the assigned findings {ids} in a single batch.
116
124
117
-
Input: the item with id == "{finding-id}" in {tmp_dir}/findings.json (read trailing field from current_meta).
118
-
Output: {tmp_dir}/verifications/{finding-id}.json
125
+
Input: review document {document_path} (Read to obtain severity / location / description / trailing metadata for each id).
119
126
120
-
Decision: based on the trailing field (final value of triage / estimate / status / verification), apply the rules in this SKILL § "Step 2 § Verification Logic" to determine Resolved / Feedback / Unresolved.
127
+
For each id:
128
+
1. Based on the trailing field (final value of triage / estimate / status / verification), apply the rules in this SKILL § "Step 2 § Verification Logic" to determine Resolved / Feedback / Unresolved.
trailing_field: the literal last metadata line inside the markers (e.g., "Status: 🟢 Fixed" / "Triage: 🚫 Won't Fix" / "(empty)")
123
134
124
135
memo_value:
125
136
- Resolved: "✅ Verified — {verification result}"
126
137
- Feedback: "💬 Feedback — {what is missing and what is needed for full resolution}"
127
138
- Unresolved: ""
128
139
129
-
feedback_detail (include only when outcome == Feedback): {current_state, issue, suggestion}
140
+
feedback_detail (include only when outcome == Feedback): {description, current_state, issue, suggestion}
130
141
131
-
Return value: {path, outcome}
142
+
Return value: [{id, outcome}, ...]
132
143
```
133
144
134
-
2. Receive the return values (`{path, outcome}` only) from all verification agents. **Do not load verification bodies into context.**
145
+
**Do not load verification bodies into context** (return values are `[{id, outcome}, ...]` only).
135
146
136
147
### Verification Logic
137
148
@@ -175,7 +186,7 @@ Apply in each of `Status: 🟢 Fixed` / `Triage: 🚫 Won't Fix` / `Estimate:
175
186
176
187
## Step 3 — Verification Report and Reflection (Delegated to Aggregator Sub-Agent)
177
188
178
-
The aggregator sub-agent consolidates the verification results under `{tmp_dir}/verifications/` and performs verification-report generation, events.jsonl write, and `render-review.py` execution in one shot. The leader (you) does not load verification bodies into context.
189
+
The leader (you) does not load verification bodies into context.
179
190
180
191
Launch procedure:
181
192
@@ -185,8 +196,7 @@ Launch procedure:
185
196
You are responsible for review-verification aggregation. Generate the verification report and events.jsonl from the intermediate files, and reflect them into the markdown.
186
197
187
198
Input:
188
-
- {tmp_dir}/verifications/ — verification result for each finding
189
-
- {tmp_dir}/findings.json — severity / trailing field reference
199
+
- {tmp_dir}/verifications/ — verification result for each finding (includes severity / trailing_field / feedback_detail)
190
200
- Target markdown: {document_path}
191
201
192
202
Output:
@@ -196,15 +206,15 @@ Output:
196
206
197
207
What to do:
198
208
199
-
1. Read {tmp_dir}/verifications/*.json, cross-reference with findings.json, and Write the verification report to {tmp_dir}/resolve-summary.md. Format:
209
+
1. Read {tmp_dir}/verifications/*.json and Write the verification report to {tmp_dir}/resolve-summary.md. Format:
200
210
- Heading: "# Review Verification Report"
201
211
- Meta info: "Review document: {document_path}", "Verification date: YYYY-MM-DD" (bold)
- "## Summary": findings verified / Resolved / Feedback required / Unresolved as a bullet list
207
-
- "## Feedback Details": for each outcome == Feedback finding, write "### {finding-id} — Feedback", "Original finding", "Trailing field", "Actual state (feedback_detail.current_state)", "Issue (feedback_detail.issue)", "Suggestion (feedback_detail.suggestion)"; separate entries with ---
217
+
- "## Feedback Details": for each outcome == Feedback finding, write "### {finding-id} — Feedback", "Original finding (feedback_detail.description)", "Trailing field", "Actual state (feedback_detail.current_state)", "Issue (feedback_detail.issue)", "Suggestion (feedback_detail.suggestion)"; separate entries with ---
208
218
209
219
2. Write verification events to {events_path} as JSONL (one event per line). Format: {"id":"...","field":"verification","value":"<memo_value>"}. Do not write events for outcome == Unresolved.
2. The leader holds the return value (`{events_path, summary_path, summary_line, resolved_count, feedback_count, unresolved_count}`) in context.
218
-
219
-
3. The leader removes `{tmp_dir}` in one shot:
227
+
2. The leader removes `{tmp_dir}` in one shot:
220
228
```bash
221
229
.claude/scripts/rm-tmp.sh {tmp_dir}
222
230
```
223
231
224
232
## Step 4 — Completion Report
225
233
226
-
The leader prints the `summary_line` received from the aggregator sub-agent to the console.
227
-
If a detailed report is needed, Read `summary_path` (`resolve-summary.md` while `{tmp_dir}` still exists). Usually the `summary_line` alone is sufficient.
234
+
The leader prints the `summary_line` received from the aggregator sub-agent to the console. If a detailed report is needed, Read `summary_path` (`resolve-summary.md` while `{tmp_dir}` still exists).
Copy file name to clipboardExpand all lines: .claude/skills/review-rounds/SKILL.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,14 +40,15 @@ Write the review document in the user's chat language.
40
40
-**Most work, including aggregation and consolidation, is delegated to sub-agents** (one level of nesting is allowed):
41
41
- Individual reviewers (Step 2.1) — launch cpp-sensei / qt-sensei / obs-sensei / network-sensei, etc. in parallel for individual reviews. Each reviewer Writes findings to a file; the return value is only the path and counts.
42
42
- Aggregator sub-agent (Step 2.1) — Read the individual reviewer output files and consolidate them into the review document (parallel-review § Step 3).
43
-
- Parsing sub-agent (Steps 2.2 / 2.3 / 2.4) — Read the review document and Write `findings.json`. Subsequent sub-agents take this JSON as input (review-respond § Step 1 / review-resolve § Step 1).
43
+
- Parsing sub-agent (review-respond, Steps 2.2 / 2.4) — Read the review document and Write `findings.json`. Subsequent sub-agents take this JSON as input (review-respond § Step 1).
44
+
- Parsing sub-agent (review-resolve, Steps 2.3 / 2.4) — Read the review document and return verification assignments (by_assignee) (review-resolve § Step 1; no file output).
44
45
- Triage sub-agent (Steps 2.2 / 2.4) — render verdicts in a separate context to avoid bias (review-respond § Step 2).
45
46
- Individual estimates (Steps 2.2 / 2.4) — delegate each Will Fix in parallel to its assigned specialist sub-agent (read-only).
46
47
- Estimate aggregator sub-agent (Steps 2.2 / 2.4) — generate a summary of individual estimate results (review-respond § Step 3).
47
48
- Individual fixes (Steps 2.2 / 2.4) — delegate each finding to the appropriate specialist sub-agent.
48
49
- Format & build verification sub-agent (Steps 2.2 / 2.4) — run clang-format / cmake-format + build once; on failure, analyze code and determine the responsible specialist (no fix; recommendation only).
49
50
- Build-fix specialist sub-agent (Steps 2.2 / 2.4) — fix build errors as the specialist determined by the format & build verification sub-agent. The leader re-launches the format & build verification sub-agent afterwards (review-respond § Step 5).
50
-
- Verification sub-agent (Steps 2.3 / 2.4) — verify each finding in parallel (review-resolve § Step 2; read-only).
51
+
- Verification sub-agent (Steps 2.3 / 2.4) — launched in parallel per specialist; each batch-verifies its assigned findings (review-resolve § Step 2; read-only).
51
52
- Aggregator sub-agent (Steps 2.2 / 2.3 / 2.4) — generate events.jsonl from intermediate files and run render-review.py (review-respond § Step 6 / review-resolve § Step 3).
52
53
- Final-report aggregator sub-agent (Step 3) — generate the final report from all rounds' review documents.
53
54
-**The orchestrator (you) directly handles only the following**:
0 commit comments