Skip to main content

Overview

The recursive-debugging subskill inserts a mandatory Phase 1.5 between Phase 1 (AS-IS) and Phase 2 (TO-BE Plan) whenever a requirement involves fixing a bug, investigating a test failure, or understanding unexpected behavior. It enforces systematic root cause analysis before any fix is attempted.
Core principle: Always find the root cause before attempting fixes. Symptom fixes are failure.

The Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.Skipping Phase 1.5 to attempt a quick fix is not faster — it creates rework, new bugs, and thrashing. Systematic debugging is faster than guess-and-check, even under time pressure.

When to Use

Insert Phase 1.5 whenever:
  • A requirement is a bug fix
  • Tests are failing and you need to understand why
  • Behavior is unexpected or intermittent
  • A performance problem needs investigation
  • Integration issues are reported
Use it especially when you feel pressure to skip it: emergencies, “obvious” fixes, and repeated failed fix attempts are all signs that the process matters more, not less.

How Phase 1.5 Fits

Phase 1.5 sits between AS-IS analysis and planning:
Lock Phase 1 first. Then create 01.5-root-cause.md with Status: DRAFT and work through the four steps below. Lock Phase 1.5 when root cause is confirmed. Phase 2 then consumes the findings from Phase 1.5.

The Four Steps

1

Error Analysis

Read error messages and stack traces completely before doing anything else. They often contain the exact location of the problem.Record in the artifact:
Then verify you can reproduce the issue reliably. If you cannot reproduce it, gather more data — do not guess.
2

Pattern Analysis

Find the difference between working and broken code before proposing any fix.
  • Locate similar working code in the same codebase
  • Compare the working and broken paths line by line
  • Check recent commits, dependency changes, and config changes for what could have introduced the problem
  • Trace data flow backward through the call stack to find where the bad value originates
Record in the artifact:
3

Hypothesis Testing

Form one clear hypothesis. Make the smallest possible change to test it. One variable at a time.
If the hypothesis is rejected, form a new one. Do not stack multiple fixes on top of each other to see if something works.
If you genuinely don’t understand something, say so. Do not pretend to know the root cause. Research more or ask for help.
4

Fix Summary

Once root cause is confirmed, write a summary that Phase 2 can build directly from.
This summary becomes the input to Phase 2’s fix plan and test strategy. Do not begin fixing until Phase 1.5 is locked.

Output Artifact

Write the artifact to:
The artifact must close with a Coverage Gate and Approval Gate before it can be locked:

Red Flags

Stop and return to the systematic process if you catch yourself thinking any of the following:
  • “Quick fix for now, investigate later”
  • “Just try changing X and see if it works”
  • “Add multiple changes, run tests”
  • “It’s probably X, let me fix that”
  • “I don’t fully understand but this might work”
  • You are proposing solutions before tracing data flow
  • You are on your third failed fix attempt
If you have made three or more failed fix attempts, stop fixing. The pattern indicates an architectural problem. Document the attempts in Phase 1.5, question whether the approach is sound, and decide whether a deeper refactor is needed before continuing.

Common Shortcuts to Reject