Skip to content

Commit 3677cd6

Browse files
committed
feat: Switch review-respond to --no-confirm with integrated estimate summary
1 parent f258953 commit 3677cd6

4 files changed

Lines changed: 39 additions & 14 deletions

File tree

.claude/sequencer/programs/review_rounds.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,12 @@ def run(ctx):
466466
else "the default base branch (main or master)"
467467
)
468468
confirm_clause = (
469-
"Option: --confirm enabled (wait for user confirmation immediately after the estimate result)."
469+
"Option: confirm mode enabled (after the estimate completes, Read summary_path, "
470+
"present it to the user, and wait for confirmation before proceeding to fix)."
470471
if confirm
471-
else "Option: --confirm disabled (continue without pausing after the estimate)."
472+
else "Option: no-confirm mode (equivalent to review-respond's --no-confirm). "
473+
"Continue without pausing after the estimate; do not Read summary_path. "
474+
"This overrides review-respond SKILL's standalone default (confirm-on)."
472475
)
473476
commit_clause = (
474477
"Option: --commit enabled (perform an aggregate git commit after fixing)."

.claude/skills/review-respond/SKILL.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The user supplies a path to a review document (markdown). When the argument is `
1717
## Options
1818

1919
- `--commit` (default OFF) — Create a commit for each finding's fix.
20-
- `--confirm` (default OFF) — Wait for user confirmation immediately after the estimate results are produced.
20+
- `--no-confirm` (default OFF) — Skip the user confirmation immediately after the estimate. Default (when not specified) is confirm-on.
2121

2222
### `--commit` option
2323

@@ -37,9 +37,13 @@ When enabled, in Step 3 each completed fix per finding is committed to git.
3737
fix: Add null check before accessing output pointer
3838
```
3939

40-
### `--confirm` option
40+
### `--no-confirm` option
4141

42-
When enabled, wait for user confirmation immediately after the Step 2 result table is shown on the console. Do not confirm right after triage.
42+
When not specified (default), the integrated summary (a single table merging review + triage + estimate) is displayed on the console immediately after Step 2's estimate completes, and the leader waits for user confirmation before proceeding to the fix step. Confirmation is not performed right after triage.
43+
44+
When `--no-confirm` is specified, confirmation is skipped and the flow proceeds to the fix step after the estimate completes. The leader does not Read `summary_path` written by the aggregator sub-agent (to avoid bloating the leader's context).
45+
46+
When an upper orchestrator such as review-rounds takes on the review-respond leader role, that orchestrator's confirmation flag overrides this default (confirm OFF if review-rounds' `--confirm` is OFF, confirm ON if ON).
4347

4448
## Review document format
4549

@@ -176,7 +180,7 @@ Include `template_id` (Read from the template's frontmatter) in the return value
176180

177181
2. Receive the return value from every estimate agent (`{items: [{id, verdict}, ...], template_id}`). Verify that each agent's `template_id` matches `8b2d5f1c-7a93-4e64-b8d1-2c5e9a3f7b48`; on mismatch, relaunch that agent. Aggregate `items` to build a `{id → verdict}` map. Do not load the estimate body. Each agent has Written `{tmp_dir}/estimates/{id}.json`. The leader keeps the `{id → verdict}` map in context for selecting the fix targets in Step 3.
178182

179-
3. Launch the aggregator sub-agent to display the estimate result table on the console. Reading each `{tmp_dir}/estimates/{id}.json` and producing the table is the aggregator sub-agent's responsibility. Launch via `Agent(subagent_type="review-helper", prompt=...)`.
183+
3. Launch the aggregator sub-agent via `Agent(subagent_type="review-helper", prompt=...)` to generate the estimate result summary. The aggregator sub-agent always produces an integrated summary (a single table merging review + triage + estimate, plus a link to the review document).
180184

181185
Example launch prompt for the aggregator sub-agent. Task-specific instructions are stored in the `templates/estimate-summary.md` external template:
182186

@@ -185,16 +189,17 @@ Include `template_id` (Read from the template's frontmatter) in the return value
185189
186190
Variables (substitute into the template's {{...}} placeholders):
187191
- tmp_dir: {tmp_dir}
192+
- document_path: {document_path}
188193
189194
Round-specific overrides (apply after following the template's instructions):
190195
- (none)
191196
192197
Include `template_id` (Read from the template's frontmatter) in the return value.
193198
```
194199

195-
Receive the return value from the aggregator sub-agent (`{summary_path, summary_line, maintain_count, downgrade_count, alternative_count, template_id}`). Verify that `template_id` matches `5c1e9b7a-3d48-4a96-b8e2-7f3c5a1d4b29`; on mismatch, relaunch the sub-agent. The leader keeps only `summary_line` in context and does not load the table body. Read `summary_path` to present it to the user only when `--confirm` is enabled.
200+
Receive the return value from the aggregator sub-agent (`{summary_path, summary_line, maintain_count, downgrade_count, alternative_count, template_id}`). Verify that `template_id` matches `5c1e9b7a-3d48-4a96-b8e2-7f3c5a1d4b29`; on mismatch, relaunch the sub-agent. The leader keeps only `summary_line` in context and does not load the table body.
196201

197-
4. When `--confirm` is enabled, wait for user confirmation before proceeding to the fix step.
202+
4. In confirm mode, Read `summary_path`, present it to the user, and wait for user confirmation before proceeding to the fix step. In no-confirm mode, do not Read `summary_path` (to avoid bloating the leader's context). Confirm-mode determination: review-respond standalone is confirm mode when `--no-confirm` is not specified, and no-confirm mode when specified. When an upper orchestrator (review-rounds, etc.) takes on the role, follow that orchestrator's confirmation flag.
198203

199204
When both Maintain and Alternative are 0 (all Downgrade): skip Steps 3 and 4 and proceed to Step 5 (compile). Record them as Downgrade in the summary.
200205

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
---
22
name: estimate-summary
3-
description: Prompt for the estimate-aggregator sub-agent that produces the estimate result table in review-respond Step 2
3+
description: Prompt for the estimate-aggregator sub-agent that produces the estimate result summary in review-respond Step 2
44
template_id: 5c1e9b7a-3d48-4a96-b8e2-7f3c5a1d4b29
55
---
66

7-
As the estimate-summary owner, Read all `{{tmp_dir}}/estimates/*.json`, cross-reference them with `{{tmp_dir}}/triage.json`, and Write a markdown table to `{{tmp_dir}}/estimate-summary.md`. Read `.claude/rules/sub-agent.md` and observe the common prohibitions.
7+
As the estimate-summary owner, Read `{{tmp_dir}}/triage.json`, all `{{tmp_dir}}/estimates/*.json`, and `{{document_path}}`, and Write the integrated summary to `{{tmp_dir}}/estimate-summary.md`. Read `.claude/rules/sub-agent.md` and observe the common prohibitions.
88

9-
Table columns: Finding ID / Specialist / Cost / Future / Signals / Verdict (▶️ Maintain | 🔻 Downgrade | 🚧 Alternative) / Note (supplementary information such as "recommend separate PR" or FIXME insertion).
9+
## Input handling
1010

11-
Return value: `{summary_path, summary_line (<=200 chars; e.g. "C-1 Maintain / M-2 Downgrade(separate PR) / M-3 Alternative"), maintain_count, downgrade_count, alternative_count, template_id}`. Include `template_id` (Read from this template's frontmatter) verbatim in the return value.
11+
- Each item in triage.json (both Will Fix and Won't Fix) is part of the output. Estimates exist only for Will Fix, so use triage.json as the primary axis and join `estimates/{id}.json` by id.
12+
- Read the review document `{{document_path}}` and obtain severity / location / description for each finding (extracted from the heading and body around the METADATA marker). Compress description into a 1–2 sentence summary.
13+
14+
## `{{tmp_dir}}/estimate-summary.md` structure
15+
16+
1. Place a link line to the review document at the top: `Detail: [{basename}]({{document_path}})` (`{basename}` is the trailing file name of `{{document_path}}`).
17+
2. Integrated table (columns): Finding ID / Severity / Location / Summary / Specialist / Triage / Cost / Future / Signals / Estimate Verdict (▶️ Maintain | 🔻 Downgrade | 🚧 Alternative) / Note.
18+
- Severity: Critical / Major / Minor / Info
19+
- Location: file:line (may shorten to basename:line when long)
20+
- Summary: 1–2 sentence summary of the description
21+
- Specialist: assignee from triage.json (`` for Won't Fix)
22+
- Triage: 🔧 Will Fix / 🚫 Won't Fix
23+
- For a Won't Fix row, fill the four estimate columns (Cost / Future / Signals / Estimate Verdict) with ``, and place a summary of the triage.json reason in the Note column.
24+
- Note: supplementary information such as "recommend separate PR" / FIXME insertion, or a Won't Fix reason summary.
25+
26+
## Return value
27+
28+
`{summary_path, summary_line (<=200 chars; e.g. "C-1 Maintain / M-2 Downgrade(separate PR) / M-3 Alternative"), maintain_count, downgrade_count, alternative_count, template_id}`. Include `template_id` (Read from this template's frontmatter) verbatim in the return value.

.claude/skills/review-rounds/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The user may optionally specify an output base path. When the argument is `$ARGU
1414

1515
## Options
1616

17-
- `--confirm` (default OFF) — Wait for user confirmation immediately after estimate results are gathered (before proceeding to fix).
17+
- `--confirm` (default OFF) — Wait for user confirmation immediately after estimate results are gathered (before proceeding to fix). This flag also applies to the review-respond leader role taken on by review-rounds and overrides review-respond's standalone default (confirm-on).
1818
- `--confirm-round` (default OFF) — After review-resolve, if unresolved findings remain, wait for user confirmation before proceeding to the next round.
1919
- `--commit` (default OFF) — Perform a git commit after each finding is fixed (the orchestrator performs an aggregated commit).
2020
- `--max-rounds N` (default 5, range 1–10) — Change the maximum number of rounds for the outer loop.
@@ -153,7 +153,7 @@ Round-specific overrides (apply after following the template's instructions):
153153
- Will Fix >= 1: proceed to the estimate phase.
154154
- Round loop control after estimate:
155155
- Both Maintain and Alternative are 0 (all Downgrade): skip the fix and build verification phase, perform only the document update (review-respond § Step 5), and end the round.
156-
- Maintain or Alternative >= 1: proceed to the fix phase (Maintain via normal fix, Alternative via FIXME attachment). When `--confirm` is enabled, display the estimate result and wait for user confirmation.
156+
- Maintain or Alternative >= 1: proceed to the fix phase (Maintain via normal fix, Alternative via FIXME attachment). Only when `--confirm` is enabled, Read the aggregator sub-agent's `summary_path`, present it to the user, and wait for confirmation.
157157

158158
### 2.3 — Review verification (review-resolve)
159159

0 commit comments

Comments
 (0)