Skip to content

Commit 956c43f

Browse files
alexeyvclaude
andauthored
chore(skills): convert review-edge-case-hunter.xml to native skill (#1871)
* chore(skills): convert review-edge-case-hunter.xml to native skill Replace single-file XML task with skill directory format (SKILL.md + workflow.md + bmad-skill-manifest.yaml) following the pattern established by bmad-review-adversarial-general. Update all reference locations: bmad-skill-manifest.yaml, module-help.csv, step-04-review.md, and bmad-os-review-pr instructions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address PR review findings for edge-case-hunter skill - Fix "task returns" → "skill returns" terminology in review-pr instructions - Remove edge-case-hunter entry from central manifest (has own directory manifest) - Add sentinel error response for empty/bad input instead of silent empty array - Reframe Step 2 with two-lens approach: control flow paths + domain boundaries - Simplify Step 3 to reference Step 2 edge classes instead of duplicating list Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1b3c3c5 commit 956c43f

File tree

8 files changed

+73
-80
lines changed

8 files changed

+73
-80
lines changed

.claude/skills/bmad-os-review-pr/prompts/instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ Likely tag:
130130

131131
### 1.2 Run Edge Case Hunter (subagent)
132132

133-
Spawn a subagent that executes the task defined in `_bmad/core/tasks/review-edge-case-hunter.xml`. Pass the full PR diff as the `content` input. Omit `also_consider` unless the user specified extra focus areas.
133+
Spawn a subagent that invokes the `bmad-review-edge-case-hunter` skill. Pass the full PR diff as the `content` input. Omit `also_consider` unless the user specified extra focus areas.
134134

135-
The task returns a JSON array of objects, each with: `location`, `trigger_condition`, `guard_snippet`, `potential_consequence`.
135+
The skill returns a JSON array of objects, each with: `location`, `trigger_condition`, `guard_snippet`, `potential_consequence`.
136136

137137
**Map each JSON finding to the standard finding format:**
138138

src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
name: 'step-04-review'
33
description: 'Adversarial review, classify findings, optional spec loop'
44

5-
edge_case_hunter_task: '{project-root}/_bmad/core/tasks/review-edge-case-hunter.xml'
65
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
76
specLoopIteration: 1
87
---
@@ -31,7 +30,7 @@ Do NOT `git add` anything — this is read-only inspection.
3130
**Plan-code-review:** Launch three subagents without conversation context. If no sub-agents are available, generate three review prompt files in `{implementation_artifacts}` — one per reviewer role below — and HALT. Ask the human to run each in a separate session (ideally a different LLM) and paste back the findings.
3231

3332
- **Blind hunter** — receives `{diff_output}` only. No spec, no context docs, no project access. Invoke via the `bmad-review-adversarial-general` skill.
34-
- **Edge case hunter** — receives `{diff_output}` and read access to the project. Invoke via `{edge_case_hunter_task}`.
33+
- **Edge case hunter** — receives `{diff_output}` and read access to the project. Invoke via the `bmad-review-edge-case-hunter` skill.
3534
- **Acceptance auditor** — receives `{diff_output}`, `{spec_file}`, and read access to the project. Must also read the docs listed in `{spec_file}` frontmatter `context`. Checks for violations of acceptance criteria, rules, and principles from the spec and context docs.
3635

3736
### Classify

src/core/module-help.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ core,anytime,Shard Document,SD,,_bmad/core/tasks/shard-doc.xml,bmad-shard-doc,fa
77
core,anytime,Editorial Review - Prose,EP,,_bmad/core/tasks/editorial-review-prose.xml,bmad-editorial-review-prose,false,,,"Review prose for clarity, tone, and communication issues. Use after drafting to polish written content.",report located with target document,"three-column markdown table with suggested fixes",
88
core,anytime,Editorial Review - Structure,ES,,_bmad/core/tasks/editorial-review-structure.xml,bmad-editorial-review-structure,false,,,"Propose cuts, reorganization, and simplification while preserving comprehension. Use when doc produced from multiple subprocesses or needs structural improvement.",report located with target document,
99
core,anytime,Adversarial Review (General),AR,,skill:bmad-review-adversarial-general,bmad-review-adversarial-general,false,,,"Review content critically to find issues and weaknesses. Use for quality assurance or before finalizing deliverables. Code Review in other modules run this automatically, but its useful also for document reviews",,
10-
core,anytime,Edge Case Hunter Review,ECH,,_bmad/core/tasks/review-edge-case-hunter.xml,bmad-review-edge-case-hunter,false,,,"Walk every branching path and boundary condition in code, report only unhandled edge cases. Use alongside adversarial review for orthogonal coverage - method-driven not attitude-driven.",,
10+
core,anytime,Edge Case Hunter Review,ECH,,skill:bmad-review-edge-case-hunter,bmad-review-edge-case-hunter,false,,,"Walk every branching path and boundary condition in code, report only unhandled edge cases. Use alongside adversarial review for orthogonal coverage - method-driven not attitude-driven.",,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
name: bmad-review-edge-case-hunter
3+
description: 'Walk every branching path and boundary condition in content, report only unhandled edge cases. Orthogonal to adversarial review - method-driven not attitude-driven.'
4+
---
5+
6+
Follow the instructions in [workflow.md](workflow.md).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
type: skill
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Edge Case Hunter Review
2+
3+
**Goal:** You are a pure path tracer. Never comment on whether code is good or bad; only list missing handling.
4+
When a diff is provided, scan only the diff hunks and list boundaries that are directly reachable from the changed lines and lack an explicit guard in the diff.
5+
When no diff is provided (full file or function), treat the entire provided content as the scope.
6+
Ignore the rest of the codebase unless the provided content explicitly references external functions.
7+
8+
**Inputs:**
9+
- **content** — Content to review: diff, full file, or function
10+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal edge-case analysis
11+
12+
**MANDATORY: Execute steps in the Execution section IN EXACT ORDER. DO NOT skip steps or change the sequence. When a halt condition triggers, follow its specific instruction exactly. Each action within a step is a REQUIRED action to complete that step.**
13+
14+
**Your method is exhaustive path enumeration — mechanically walk every branch, not hunt by intuition. Report ONLY paths and conditions that lack handling — discard handled ones silently. Do NOT editorialize or add filler — findings only.**
15+
16+
17+
## EXECUTION
18+
19+
### Step 1: Receive Content
20+
21+
- Load the content to review strictly from provided input
22+
- If content is empty, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
23+
- Identify content type (diff, full file, or function) to determine scope rules
24+
25+
### Step 2: Exhaustive Path Analysis
26+
27+
**Walk every branching path and boundary condition within scope — report only unhandled ones.**
28+
29+
- If `also_consider` input was provided, incorporate those areas into the analysis
30+
- Walk all branching paths: control flow (conditionals, loops, error handlers, early returns) and domain boundaries (where values, states, or conditions transition). Derive the relevant edge classes from the content itself — don't rely on a fixed checklist. Examples: missing else/default, unguarded inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
31+
- For each path: determine whether the content handles it
32+
- Collect only the unhandled paths as findings — discard handled ones silently
33+
34+
### Step 3: Validate Completeness
35+
36+
- Revisit every edge class from Step 2 — e.g., missing else/default, null/empty inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
37+
- Add any newly found unhandled paths to findings; discard confirmed-handled ones
38+
39+
### Step 4: Present Findings
40+
41+
Output findings as a JSON array following the Output Format specification exactly.
42+
43+
44+
## OUTPUT FORMAT
45+
46+
Return ONLY a valid JSON array of objects. Each object must contain exactly these four fields and nothing else:
47+
48+
```json
49+
[{
50+
"location": "file:start-end (or file:line when single line, or file:hunk when exact line unavailable)",
51+
"trigger_condition": "one-line description (max 15 words)",
52+
"guard_snippet": "minimal code sketch that closes the gap (single-line escaped string, no raw newlines or unescaped quotes)",
53+
"potential_consequence": "what could actually go wrong (max 15 words)"
54+
}]
55+
```
56+
57+
No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when no unhandled paths are found.
58+
59+
60+
## HALT CONDITIONS
61+
62+
- If content is empty or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop

src/core/tasks/bmad-skill-manifest.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ index-docs.xml:
1818
type: task
1919
description: "Generates or updates an index.md to reference all docs in the folder"
2020

21-
review-edge-case-hunter.xml:
22-
canonicalId: bmad-review-edge-case-hunter
23-
type: task
24-
description: "Walk every branching path and boundary condition in content, report only unhandled edge cases"
25-
2621
shard-doc.xml:
2722
canonicalId: bmad-shard-doc
2823
type: task

src/core/tasks/review-edge-case-hunter.xml

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)