name: debug-loop description: A repeatable debugging loop: reproduce, isolate, test, fix, verify, summarize.
When to use
- •tests are failing
- •a script errors on the cluster
- •results look suspicious (e.g., intercept shifts, flat lines, join explosions)
Steps
- •Reproduce with the smallest command possible.
- •Capture the failure:
- •exact command
- •stack trace / error output
- •input files and config
- •Isolate:
- •identify the minimal file/function responsible
- •add temporary logging (row counts, summary stats)
- •Add a check:
- •a small unit test OR an invariant check in the script
- •Fix and re-run:
- •run the same command again
- •run the most relevant test suite
- •Summarize:
- •root cause
- •fix
- •what you verified
- •any follow-up risks
Don’ts
- •Don’t “fix” by changing definitions unless explicitly asked.
- •Don’t add heavy dependencies just to debug.