Debug Loop
Use when bug is unclear, flaky, slow, or reported only as "broken".
Rule
No theory before loop. First create one command that can catch the exact symptom.
Loop Ladder
Stop at first rung that catches the bug:
- Existing focused test.
- New smallest regression test.
- CLI or script with fixture input.
- HTTP request against running service.
- Playwright/browser script for UI.
- Captured trace replay.
- Tiny harness around one function/module.
- Stress loop for flaky bugs.
Tighten
Loop must be:
- Specific: asserts user's symptom, not "does not crash".
- Fast: seconds if possible.
- Deterministic: same verdict, or high reproduction rate for flakes.
- Agent-runnable: no manual clicks unless wrapped in a written HITL script.
Work
- Name loop command and run it once.
- Minimize inputs until every remaining part is load-bearing.
- Change one thing at a time.
- Keep the loop as the regression check.
- Report command, red/green evidence, and remaining uncertainty.
If no loop can be built, stop and ask for the missing artifact: logs, HAR, fixture, environment access, or permission for temporary instrumentation.