diagnose-loop
Diagnose Loop
Tradeoff caveat. This skill biases toward thoroughness over speed. For trivial bugs with obvious causes (typos, off-by-one, a missing import the stack trace already points at), skip phases and just fix it. For everything else — flaky tests, performance regressions, "it works on my machine," intermittent failures, anything you've stared at for more than 15 minutes — the discipline is the point. Adapted from mattpocock's
diagnosepattern.
diagnose-loop vs systematic-debugging. The plugin skill
superpowers:systematic-debuggingis the general "form a hypothesis before you touch a fix" discipline for any bug or unexpected behavior. Reach fordiagnose-loop(this skill) specifically when the payoff is in building a fast, deterministic, binary feedback loop first — flaky tests, performance regressions, hard-to-reproduce or intermittent failures. For a straightforward bug where you just need disciplined hypothesizing,superpowers:systematic-debuggingis the lighter fit.
Phase 1 — Build a feedback loop (THE SKILL)
Spend disproportionate effort here. Be aggressive. Be creative. Refuse to give up.
Every later phase mechanically consumes Phase 1's output. A fast deterministic loop turns hypothesizing into a binary search; a slow or noisy loop turns it into guessing. Building the loop is the work — the rest is bookkeeping.
A good loop has three properties: it runs in seconds, it returns a binary pass/fail signal, and it fails for the same reason every time. Optimize for those before doing anything else.
Ten ranked ways to construct a loop
In order of cost — pick the cheapest one that actually reproduces the bug.