← ClaudeAtlas

coverage-gap-analysislisted

Systematically find untested branches, edge cases, and unasserted behavior in EXISTING code — complements test-driven-development, which governs new code written test-first. Use when asked to "improve coverage" or "find untested edge cases", or when a coverage report shows lines executed but the assertions look weak. Triggers — "increase test coverage", "what's not tested", "coverage gaps", "untested branches", "legacy code has no tests", "characterization tests", "is this well tested".
BenMacDeezy/Orns-Forge · ★ 0 · AI & Automation · score 72
Install: claude install-skill BenMacDeezy/Orns-Forge
# Coverage gap analysis `superpowers:test-driven-development` governs writing new code test-first. This skill is for the opposite direction: code already exists, has weak or no tests, and you need to find what's actually untested before touching it. Order matters — inventory (§1) before characterize (§4) before any new assertions, and never let "coverage went up" substitute for "the risk went down" (§3). ## 1. Branch/path inventory — before writing a single test Read the target code and enumerate, in a list, every point where behavior forks: - **Conditionals**: every `if`/`else`/`switch`/ternary branch, including the implicit "else does nothing" branch nobody wrote. - **Loops**: zero iterations, one iteration, many, early-exit (`break`/ `return` inside the loop). - **Error paths**: every `throw`/`catch`/`Result::Err`/error return, every place a caught exception is swallowed, logged-and-continued, or fell back silently. - **Boundary values**: empty string/collection, null/undefined/None, zero, negative, max-length, off-by-one at any range check (`<` vs `<=`). - **External-input validation**: what happens on malformed input at each parse/deserialize/validate call. Turn this into a checklist of `<location> -> <branch>` pairs before writing any test. A gap you didn't enumerate is a gap you won't test. ## 2. Mutation-testing mindset on EXISTING tests For every test that already exists and claims to cover a piece of code, ask: "what one-line bug could I introduce