bmad-review-edge-case-hunter

Walk every branching path in code or diffs and report unhandled edge cases as JSON.

Updated Aug 25, 2024
One-click install
npx skills add https://github.com/LeGeRyChEeSe/LanPlay-DiscordBot --skill bmad-review-edge-case-hunter-legerycheese
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bmad-review-edge-case-hunter
Source: https://github.com/LeGeRyChEeSe/LanPlay-DiscordBot/tree/main/bmad/src/core-skills/bmad-review-edge-case-hunter
Command: npx skills add https://github.com/LeGeRyChEeSe/LanPlay-DiscordBot --skill bmad-review-edge-case-hunter-legerycheese

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code reviews often miss boundary conditions and unhandled branches, leading to runtime failures that only surface in production. This Skill mechanically enumerates every control-flow path and domain boundary in a diff, file, or function, and reports only the paths lacking explicit guards. ## Core Features & Use Cases - Exhaustive Path Enumeration: Walks conditionals, loops, error handlers, early returns, and domain boundaries such as off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, and timeout gaps. - Diff-Aware Scoping: When given a diff, analyzes only changed hunks and boundaries directly reachable from changed lines; when given a full file or function, treats the entire content as scope. - Structured JSON Output: Returns findings as a strict JSON array with location, trigger condition, guard snippet, and potential consequence, silently discarding handled paths. - Use Case: Paste a pull request diff before merging and receive a list of unguarded edge cases, such as a missing null check on a new function parameter, each with a minimal guard snippet to close the gap. ## Quick Start Ask the AI to run an edge-case review on a pasted diff or function and return the unhandled boundary conditions as JSON.

Frequently Asked Questions about bmad-review-edge-case-hunter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find unhandled edge cases in a code diff?▼

Provide the diff as input and the review scans only the changed hunks, listing boundaries directly reachable from changed lines that lack an explicit guard. Each finding includes a location, trigger condition, minimal guard snippet, and potential consequence in JSON format.

What types of edge cases does edge case review detect?▼

It derives edge classes from the content itself rather than a fixed checklist. Typical classes include missing else or default branches, unguarded null or empty inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, and timeout gaps.

Can I review a full file instead of a diff for edge cases?▼

Yes, when no diff is provided the entire file or function becomes the analysis scope. The rest of the codebase is ignored unless the provided content explicitly references external functions.

What output format does the edge case review return?▼

It returns only a valid JSON array where each object has exactly four fields: location, trigger_condition, guard_snippet, and potential_consequence. An empty array is returned when no unhandled paths are found, with no extra text or markdown.

How is edge case hunting different from adversarial code review?▼

Edge case hunting is method-driven, mechanically enumerating every branch and boundary, while adversarial review is attitude-driven and probes for weaknesses by intent. The two approaches are orthogonal and can be combined for broader coverage.