# debug-loop > Debug by reproducing, minimizing, writing regression tests, fixing, and documenting. - Author: Mostafa Rafaie - Repository: rafaie/codex_home - Version: 20260126224410 - Stars: 1 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/rafaie/codex_home - Web: https://mule.run/skillshub/@@rafaie/codex_home~debug-loop:20260126224410 --- --- name: debug-loop description: Debug by reproducing, minimizing, writing regression tests, fixing, and documenting. --- 1) Reproduce the failure (exact command, inputs, environment). 2) Minimize to the smallest failing case. 3) Add a regression test that fails before the fix. 4) Fix the root cause. 5) Re-run tests: `uv run pytest -q`. 6) Update the feature spec Debug log with repro, root cause, fix, and regression test.