-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fix(skills): address code-review findings from PR #2007 #2013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| --- | ||
| name: bmad-code-review | ||
| description: 'Perform adversarial code review finding specific issues. Use when the user says "run code review" or "review this code"' | ||
| description: 'Review code changes adversarially using parallel review layers (Blind Hunter, Edge Case Hunter, Acceptance Auditor) with structured triage into actionable categories. Use when the user says "run code review" or "review this code"' | ||
| --- | ||
|
|
||
| Follow the instructions in ./workflow.md. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| --- | ||
| name: Review | ||
| description: 'Launch parallel adversarial review layers and collect findings.' | ||
| failed_layers: '' # set at runtime: comma-separated list of layers that failed or returned empty | ||
| --- | ||
|
|
||
| # Step 2: Review | ||
|
|
@@ -23,16 +22,18 @@ description: 'Launch parallel adversarial review layers and collect findings.' | |
| - **Acceptance Auditor** (only if `{review_mode}` = `"full"`) -- A subagent that receives `{diff_output}`, the content of the file at `{spec_file}`, and any loaded context docs. Its prompt: | ||
| > You are an Acceptance Auditor. Review this diff against the spec and context docs. Check for: violations of acceptance criteria, deviations from spec intent, missing implementation of specified behavior, contradictions between spec constraints and actual code. Output findings as a markdown list. Each finding: one-line title, which AC/constraint it violates, and evidence from the diff. | ||
|
|
||
| 2. **Subagent failure handling**: If any subagent fails, times out, or returns empty results, note the failed layer and proceed with findings from the remaining layers. Report the failure to the user in the next step. | ||
| 2. **Subagent failure handling**: If any subagent fails, times out, or returns empty results, append the layer name to `{failed_layers}` (comma-separated) and proceed with findings from the remaining layers. | ||
|
|
||
| 3. **Fallback** (if subagents are not available): Generate prompt files in `{implementation_artifacts}` -- one per active reviewer: | ||
| 3. If `{review_mode}` = `"no-spec"`, note to the user: "Acceptance Auditor skipped — no spec file provided." | ||
|
|
||
| 4. **Fallback** (if subagents are not available): Generate prompt files in `{implementation_artifacts}` -- one per active reviewer: | ||
| - `review-blind-hunter.md` (always) | ||
| - `review-edge-case-hunter.md` (always) | ||
| - `review-acceptance-auditor.md` (only if `{review_mode}` = `"full"`) | ||
|
|
||
| HALT. Tell the user to run each prompt in a separate session and paste back findings. When findings are pasted, resume from this point and proceed to step 3. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the fallback flow, it says to “resume … and proceed to step 3”, but step 3 is now earlier in the file; this can send execution backwards/loop instead of continuing forward through the numbered instructions. Severity: medium 🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||
|
|
||
| 4. Collect all findings from the completed layers. | ||
| 5. Collect all findings from the completed layers. | ||
|
|
||
|
|
||
| ## NEXT | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| --- | ||
| name: Triage | ||
| description: 'Normalize, deduplicate, and classify all review findings into actionable categories.' | ||
| --- | ||
|
|
||
| # Step 3: Triage | ||
|
|
@@ -42,9 +40,9 @@ description: 'Normalize, deduplicate, and classify all review findings into acti | |
|
|
||
| 4. **Drop** all `reject` findings. Record the reject count for the summary. | ||
|
|
||
| 5. If zero findings remain after dropping rejects, note clean review. | ||
| 5. If `{failed_layers}` is non-empty, report which layers failed before announcing results. If zero findings remain after dropping rejects AND `{failed_layers}` is non-empty, warn the user that the review may be incomplete rather than announcing a clean review. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Severity: high 🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||
|
|
||
| 6. If any review layer failed or returned empty (noted in step 2), report this to the user now. | ||
| 6. If zero findings remain after dropping rejects and no layers failed, note clean review. | ||
|
|
||
|
|
||
| ## NEXT | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For “file list”, the instructions call for
git diff HEAD -- ...plusgit diff --no-index ...for untracked paths, but it’s not explicit how to merge those outputs into a single{diff_output}; there’s a risk of silently dropping either tracked or untracked file diffs.Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.