Skip to content

fix(code-review): restore actionable review output with interactive choices#2055

Merged
alexeyv merged 6 commits intomainfrom
fix-code-review-actions
Mar 20, 2026
Merged

fix(code-review): restore actionable review output with interactive choices#2055
alexeyv merged 6 commits intomainfrom
fix-code-review-actions

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Mar 18, 2026

Summary

  • Restores the interactive post-review action menu removed in PR feat(skills): rewrite code-review with sharded step-file architecture #2007 (March 15 rewrite)
  • Deferred findings: auto-written to deferred-work.md and checked off in story file — no HITL turn needed
  • Intent gap / bad spec findings: conversation with options ordered cheapest-to-most-expensive: downgrade to patch, patch the spec, reset to ready-for-dev, dismiss
  • Patch findings: three choices restored — fix automatically, create action items ([AI-Review][Severity]), or show details

Motivation

The rewrite made the review step presentation-only, removing the ability to act on findings. This forced expensive upstream re-runs (create story = ~15 HITL turns, dev story = full cycle) even when a simple code patch would suffice. The new "downgrade to patch" option lets users reclassify spec findings into the patch bucket to avoid unnecessary re-runs.

Test plan

  • Run code review with a spec file that produces patch findings — verify 3-option menu appears
  • Run code review that produces defer findings — verify auto-write to deferred-work.md and story file
  • Run code review with intent_gap findings — verify conversation with 4 options (downgrade, patch spec, reset, dismiss)
  • Choose "downgrade to patch" for an intent_gap — verify it flows into patch menu
  • Choose "create action items" — verify [AI-Review][Severity] format in story file

🤖 Generated with Claude Code

…hoices

The March 15 rewrite (PR #2007) removed the ability to auto-fix patches,
create action items in story files, and handle deferred/spec findings.
This restores interactive post-review actions:

- Deferred findings: auto-written to deferred-work.md and checked off in story
- Intent gap/bad spec: conversation with downgrade-to-patch, patch-spec,
  reset-to-ready-for-dev, or dismiss options
- Patch findings: fix automatically, create action items, or show details

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@seynurmammad0v
Copy link
Copy Markdown

Thanks, I caught this as well.

@alexeyv alexeyv marked this pull request as ready for review March 19, 2026 06:15
@github-actions
Copy link
Copy Markdown
Contributor

@coderabbitai review

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Mar 19, 2026

🤖 Augment PR Summary

Summary: Restores actionable behavior to the code review workflow’s final step by reintroducing interactive “what next?” decisions after findings are presented.

Changes:

  • Renames Step 4 to “Present and Act” and adds clearer handling rules by finding type
  • Automatically writes defer findings to deferred-work.md and optionally marks them complete in the story file
  • Adds an intent-gap / bad-spec resolution conversation with options ordered from lowest to highest cost (including “downgrade to patch”)
  • Restores a 3-option patch findings menu (auto-fix, create action items, or walkthrough details)
Technical Notes: Introduces a deferred_work_file frontmatter variable pointing at {implementation_artifacts}/deferred-work.md to standardize deferred output.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 19, 2026

📝 Walkthrough

Walkthrough

Updated Step 4 workflow instructions for "Present and Act" to automatically append defer findings to a configurable file, introduce a clean review shortcut when no findings remain, and restructure the presentation and handling of findings with interactive control flow for patches and intent gaps.

Changes

Cohort / File(s) Summary
Step 4 Workflow Instructions
src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md
Automated handling of defer findings (appended to {deferred_work_file} with standardized heading), new clean review shortcut to exit when no findings remain, restructured finding presentation by category with interactive control flow, intent-gap/bad-spec findings require conversation with explicit resolution options, patch findings require user choice via menu, and updated summary line wording to reflect auto-managed defer findings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: restoring interactive post-review action capabilities that were previously removed.
Description check ✅ Passed The description is directly related to the changeset, providing clear motivation, summary of changes, and a comprehensive test plan for the restored functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-code-review-actions
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md (1)

16-18: Consider acknowledging failed layers in the clean review shortcut.

Step-03 triage (lines 41-46 in step-03-triage.md) warns the user when zero findings remain but {failed_layers} is non-empty, indicating the review may be incomplete. This shortcut doesn't reference that warning. Consider adding a note that the clean review shortcut assumes step-03 already handled the failed layers warning.

📝 Suggested clarification
 ### 1. Clean review shortcut
 
-If zero findings remain after triage (all rejected or none raised): state that and end the workflow.
+If zero findings remain after triage (all rejected or none raised): state that and end the workflow. (Note: step 3 will have already warned if any review layers failed.)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md`
around lines 16 - 18, Update the "Clean review shortcut" text in
step-04-present.md to acknowledge failed layers: either add a short note that
this shortcut assumes step-03 triage has already handled any {failed_layers}
warnings, or explicitly instruct the reviewer to verify {failed_layers} is empty
before ending the workflow; reference the Step-03 triage behavior mentioned in
step-03-triage.md (the warning about non-empty {failed_layers}) so readers know
where to check.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md`:
- Around line 57-68: The Option 2 flow assumes a non-empty spec_file and will
fail when review_mode == "no-spec"; update the Option 2 handling in the step
that presents "How would you like to handle the {Z} patch findings?" to first
check that spec_file is present (non-empty) before attempting to add a "Review
Follow-ups (AI)" subsection to {spec_file}; if spec_file is empty (review_mode
== "no-spec") present a clear alternative (e.g., ask the user to choose another
option, create a downloadable patch/summary, or store follow-ups in a temporary
in-memory or output-only location) and do not attempt to write to {spec_file}.
Ensure the guard references the existing variables review_mode and spec_file and
is applied in the code path that implements Option 2.

---

Nitpick comments:
In `@src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md`:
- Around line 16-18: Update the "Clean review shortcut" text in
step-04-present.md to acknowledge failed layers: either add a short note that
this shortcut assumes step-03 triage has already handled any {failed_layers}
warnings, or explicitly instruct the reviewer to verify {failed_layers} is empty
before ending the workflow; reference the Step-03 triage behavior mentioned in
step-03-triage.md (the warning about non-empty {failed_layers}) so readers know
where to check.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bfa38c4a-fef8-4515-89c3-9a3f9c864695

📥 Commits

Reviewing files that changed from the base of the PR and between 4cb58ba and 0277381.

📒 Files selected for processing (1)
  • src/bmm-skills/4-implementation/bmad-code-review/steps/step-04-present.md

alexeyv and others added 4 commits March 19, 2026 00:41
…/dismiss

Replace 5-bucket classification (intent_gap, bad_spec, patch, defer, reject)
with 4 pragmatic buckets. Findings always written to story file first.
Decision-needed findings gate patch handling — resolve ambiguity before fixing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace undefined curly-brace placeholders with angle-bracket syntax,
add HALT guard before patch menu, guard spec_file references for
no-spec mode, and backtick category names for consistency.
… 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.
@alexeyv alexeyv merged commit 9088d49 into main Mar 20, 2026
5 checks passed
@alexeyv alexeyv deleted the fix-code-review-actions branch March 20, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants