Skip to content
Back to skills

Systematic Debugging

ASecurity

Resolve software bugs, flaky tests, and production failures through disciplined four-phase root-cause investigation, isolated code review, and evidence-before-completion verification. Use for debugging, triage, and QA fixes.

  • 327 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentstestingdebuggingcode-reviewgitsecurity

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add Johnson-Durui/ApexCluster --skill systematic-debugging --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Systematic Debugging?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Systematic Debugging
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/johnson-durui-systematic-debugging/badge)](https://www.skillsdirectory.com/skills/johnson-durui-systematic-debugging)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: systematic-debugging
description: Resolve software bugs, flaky tests, and production failures through disciplined four-phase root-cause investigation, isolated code review, and evidence-before-completion verification. Use for debugging, triage, and QA fixes.
license: MIT
source: obra/superpowers
---

# Systematic Debugging & Verification Discipline

Adapted for ApexCluster from `obra/superpowers` (`skills/systematic-debugging`, `skills/requesting-code-review`, and `skills/verification-before-completion`, MIT).

## Purpose

Eliminate guess-and-patch debugging loops by enforcing scientific root-cause isolation, minimal targeted fixes, independent diff review, and fresh verification evidence before declaring any issue solved.

## Phase 1: Reproduce & Gather Evidence First

Never propose a code edit until you have directly observed the failure:

1. **Read the Exact Failure**: Capture the full error message, stack trace, failing assertion, HTTP status, or exit code—do not paraphrase from intuition.
2. **Minimal Reproduction**: Identify the smallest deterministic command or test case that triggers the bug reliably.
3. **Trace Recent Changes & Boundaries**: Inspect recent git diffs, data boundaries, config/env inputs, and cross-module contracts around the failing path.

## Phase 2: Pattern Analysis & Single-Hypothesis Testing

1. **Compare Working vs. Failing Paths**: Find a similar working code path or passing test in the repository and diff every assumption (types, encoding, async timing, path resolution, permissions, state initialization).
2. **Form One Falsifiable Hypothesis**: State explicitly: *"I believe root cause X produces symptom Y because of code path Z."*
3. **Verify the Hypothesis**: Confirm X with targeted inspection, logging, or a minimal test—never stack three speculative edits at once. If three consecutive hypotheses fail, step back and question the underlying architectural assumption.

## Phase 3: Minimal Fix & Regression Test

1. **Write a Failing Regression Test First**: Capture the exact bug in an automated test and confirm it fails for the expected reason.
2. **Apply the Smallest Clean Root-Cause Fix**: Fix the cause at the true boundary rather than adding brittle downstream band-aids or swallowing errors.
3. **Audit Scope & Side Effects**: Review the full diff (`git diff`) for unintended edits, edge cases, concurrency/cleanup leaks, and security regressions.

## Phase 4: Verification Before Completion (Iron Law)

- **No Claims Without Fresh Evidence**: Run the full relevant test suite, typecheck, and build *after* the final edit and inspect real command exit codes and outputs.
- **Request Independent Review (When Multi-Agent)**: Hand off a clean diff summary (intent, root cause, changed files, test commands run) to an independent reviewer seat without polluting their context with noisy trial logs.
- **Honest Failure Reporting**: If a check cannot be run (for example, missing optional service or offline constraint), report exactly what was verified and what remains unverified.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.