feat(code-review): add HALT guards, batch option, defer reason, final summary
Add strong HALT guards after decision-needed and patch menus to prevent auto-progression. Add batch-apply option 0 for >3 patch findings. Prompt for defer reason and append to story file and deferred-work.md. Show boxed final summary with counts. Polish clean-review shortcut in triage.
This commit is contained in:
parent
097c4ec5c1
commit
9c3e2804ab
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
5. If `{failed_layers}` is non-empty, report which layers failed before announcing results. If zero findings remain after dropping dismissed AND `{failed_layers}` is non-empty, warn the user that the review may be incomplete rather than announcing a clean review.
|
5. If `{failed_layers}` is non-empty, report which layers failed before announcing results. If zero findings remain after dropping dismissed AND `{failed_layers}` is non-empty, warn the user that the review may be incomplete rather than announcing a clean review.
|
||||||
|
|
||||||
6. If zero findings remain after dropping dismissed and no layers failed, note clean review.
|
6. If zero findings remain after triage (all rejected or none raised): state "✅ Clean review — all layers passed." (Step 3 already warned if any review layers failed via `{failed_layers}`.)
|
||||||
|
|
||||||
|
|
||||||
## NEXT
|
## NEXT
|
||||||
|
|
|
||||||
|
|
@ -44,25 +44,41 @@ Otherwise add: `Findings are listed above. No story file was provided, so nothin
|
||||||
|
|
||||||
If `decision_needed` findings exist, present each one with its detail and the options available. The user must decide — the correct fix is ambiguous without their input. Walk through each finding (or batch related ones) and get the user's call. Once resolved, each becomes a `patch`, `defer`, or is dismissed.
|
If `decision_needed` findings exist, present each one with its detail and the options available. The user must decide — the correct fix is ambiguous without their input. Walk through each finding (or batch related ones) and get the user's call. Once resolved, each becomes a `patch`, `defer`, or is dismissed.
|
||||||
|
|
||||||
|
If the user chooses to defer, ask: Quick one-line reason for deferring this item? (helps future reviews): — then append that reason to both the story file bullet and the `{deferred_work_file}` entry.
|
||||||
|
|
||||||
|
**HALT** — I am waiting for your numbered choice. Reply with only the number (or "0" for batch). Do not proceed until you select an option.
|
||||||
|
|
||||||
### 5. Handle `patch` findings
|
### 5. Handle `patch` findings
|
||||||
|
|
||||||
If `patch` findings exist (including any resolved from step 4), HALT. Ask the user:
|
If `patch` findings exist (including any resolved from step 4), HALT. Ask the user:
|
||||||
|
|
||||||
If `{spec_file}` is set, present all three options:
|
If `{spec_file}` is set, present all three options (if >3 `patch` findings exist, also show option 0):
|
||||||
|
|
||||||
> **How would you like to handle the <Z> `patch` findings?**
|
> **How would you like to handle the <Z> `patch` findings?**
|
||||||
|
> 0. **Batch-apply all** — automatically fix every non-controversial patch (recommended when there are many)
|
||||||
> 1. **Fix them automatically** — I will apply fixes now
|
> 1. **Fix them automatically** — I will apply fixes now
|
||||||
> 2. **Leave as action items** — they are already in the story file
|
> 2. **Leave as action items** — they are already in the story file
|
||||||
> 3. **Walk through each** — let me show details before deciding
|
> 3. **Walk through each** — let me show details before deciding
|
||||||
|
|
||||||
If `{spec_file}` is **not** set, present only options 1 and 3 (omit option 2 — findings were not written to a file):
|
If `{spec_file}` is **not** set, present only options 1 and 3 (omit option 2 — findings were not written to a file). If >3 `patch` findings exist, also show option 0:
|
||||||
|
|
||||||
> **How would you like to handle the <Z> `patch` findings?**
|
> **How would you like to handle the <Z> `patch` findings?**
|
||||||
|
> 0. **Batch-apply all** — automatically fix every non-controversial patch (recommended when there are many)
|
||||||
> 1. **Fix them automatically** — I will apply fixes now
|
> 1. **Fix them automatically** — I will apply fixes now
|
||||||
> 2. **Walk through each** — let me show details before deciding
|
> 2. **Walk through each** — let me show details before deciding
|
||||||
|
|
||||||
|
**HALT** — I am waiting for your numbered choice. Reply with only the number (or "0" for batch). Do not proceed until you select an option.
|
||||||
|
|
||||||
|
- **Option 0** (only when >3 findings): Apply all non-controversial patches without per-finding confirmation. Skip any finding that requires judgment. Present a summary of changes made and any skipped findings.
|
||||||
- **Option 1**: Apply each fix. After all patches are applied, present a summary of changes made. If `{spec_file}` is set, check off the items in the story file.
|
- **Option 1**: Apply each fix. After all patches are applied, present a summary of changes made. If `{spec_file}` is set, check off the items in the story file.
|
||||||
- **Option 2** (only when `{spec_file}` is set): Done — findings are already written to the story.
|
- **Option 2** (only when `{spec_file}` is set): Done — findings are already written to the story.
|
||||||
- **Walk through each**: Present each finding with full detail, diff context, and suggested fix. After walkthrough, re-offer the applicable options above.
|
- **Walk through each**: Present each finding with full detail, diff context, and suggested fix. After walkthrough, re-offer the applicable options above.
|
||||||
|
|
||||||
Workflow complete.
|
**HALT** — I am waiting for your numbered choice. Reply with only the number (or "0" for batch). Do not proceed until you select an option.
|
||||||
|
|
||||||
|
**✅ Code review actions complete**
|
||||||
|
|
||||||
|
- Decision-needed resolved: <D>
|
||||||
|
- Patches handled: <P>
|
||||||
|
- Deferred: <W>
|
||||||
|
- Dismissed: <R>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue