← ClaudeAtlas

debug-looplisted

One tight loop for a hard bug: reproduce it, pin it with a test that fails, narrow it by halving (git bisect, input halving, toggling), keep a written hypothesis log, fix the cause, keep the test as a guard and strip the debug noise. Use for a bug you can reproduce: "it worked yesterday", "find the commit that broke it", "bisect this", "this test fails and I don't know why", or a fix that didn't stick. For a long open-ended diagnosis (no reliable repro yet, slowdowns, intermittent failures), use `diagnosing-bugs`; for flaky tests, `flaky-test`.
ychampion/ystack · ★ 4 · Code & Development · score 77
Install: claude install-skill ychampion/ystack
# Debug loop Hard bugs are lost by guessing. Every step here turns a guess into a run with a yes/no answer. ## When it applies - The cause isn't obvious after reading the error and the code it points to. - A first fix didn't hold, or the bug comes and goes. - Something broke between two known states: a commit, a version, a config, a data set. Skip it when the error names the line and the fix is plain. Fix that directly and run the test. ## The loop ### 1. Reproduce: one command, red Write down the one command that shows the bug: a test, a script, a curl, a CLI call with a saved input. Run it and see the failure yourself. It must check the user's exact symptom, not "it ran". Make it fast and give the same answer every run: pin the clock, seed randomness, use a temp dir. No reproduction, no theories. If you can't build one, stop and say what you tried and what you need (logs, an input file, access to the environment where it fails). ### 2. Pin it as a test Turn the reproduction into a test in the project's own test suite, at the lowest level that still shows the bug. If the project has no tests, add one file using the language's built-in test runner. Run it and confirm it fails for the right reason: read the failure message. ### 3. Narrow by halving Cut the search space in half each step. Pick whichever axis applies: - **History:** it fails at B and worked at some older commit A. Check out A and run your command first to confirm it passes. Then run `git bisect st