diff --git a/.claude/skills/bmad-os-review-pr/prompts/instructions.md b/.claude/skills/bmad-os-review-pr/prompts/instructions.md index c1739e8cf..74512128e 100644 --- a/.claude/skills/bmad-os-review-pr/prompts/instructions.md +++ b/.claude/skills/bmad-os-review-pr/prompts/instructions.md @@ -95,7 +95,7 @@ Store list of binary files to skip. Note them in final output. ## Review Layers -**Launch steps 1.1 and 1.2 as parallel subagents** using the Task tool. Both receive the same PR diff and run concurrently. Wait for both to complete before proceeding to step 1.3. +**Launch steps 1.1 and 1.2 as parallel subagents.** Both receive the same PR diff and run concurrently. Wait for both to complete before proceeding to step 1.3. ### 1.1 Run Cynical Review (subagent) @@ -136,7 +136,7 @@ The task returns a JSON array of objects, each with: `location`, `trigger_condit **Map each JSON finding to the standard finding format:** -```markdown +````markdown ### [NUMBER]. [trigger_condition] [likely] **Severity:** [INFERRED_EMOJI] [INFERRED_LEVEL] @@ -147,7 +147,7 @@ The task returns a JSON array of objects, each with: `location`, `trigger_condit ``` [guard_snippet] ``` -``` +```` Severity inference rules for edge case findings: diff --git a/src/core/tasks/review-edge-case-hunter.xml b/src/core/tasks/review-edge-case-hunter.xml index 0aa82287e..dfe75ce34 100644 --- a/src/core/tasks/review-edge-case-hunter.xml +++ b/src/core/tasks/review-edge-case-hunter.xml @@ -16,17 +16,17 @@ Ignore the rest of the codebase unless the provided content explicitly reference Return ONLY a valid JSON array of objects. Each object must contain exactly these four fields and nothing else: [{ - "location": "file:line", + "location": "file:start-end (or file:line when single line, or file:hunk when exact line unavailable)", "trigger_condition": "one-line description (max 15 words)", - "guard_snippet": "minimal code sketch that closes the gap", + "guard_snippet": "minimal code sketch that closes the gap (single-line escaped string, no raw newlines or unescaped quotes)", "potential_consequence": "what could actually go wrong (max 15 words)" }] No extra text, no explanations, no markdown wrapping. An empty array [] is valid when no unhandled paths are found. - MANDATORY: Execute steps in the flow section IN EXACT ORDER unless a halt-condition triggers + MANDATORY: Execute steps in the flow section IN EXACT ORDER DO NOT skip steps or change the sequence - HALT immediately when halt-conditions are met + When a halt-condition triggers, follow its specific instruction exactly Each action xml tag within step xml tag is a REQUIRED action to complete that step Your method is exhaustive path enumeration — mechanically walk every branch, not hunt by intuition @@ -38,8 +38,8 @@ No extra text, no explanations, no markdown wrapping. An empty array [] is valid - Load the content to review from provided input or context - If content to review is empty or unreadable, HALT per halt-conditions + Load the content to review strictly from provided input + If content is empty, or cannot be decoded as text, return empty array [] and stop Identify content type (diff, full file, or function) to determine scope rules @@ -51,13 +51,20 @@ No extra text, no explanations, no markdown wrapping. An empty array [] is valid Collect only the unhandled paths as findings - discard handled ones silently - + + Recheck every conditional for missing else/default + Recheck every input for null/empty/wrong-type + Recheck loop bounds for off-by-one and empty-collection + Add any newly found unhandled paths to findings; discard confirmed-handled ones + + + Output findings as a JSON array following the output-format specification exactly - HALT if content is empty or unreadable + If content is empty or cannot be decoded as text, return empty array [] and stop