Instruction file imported from NickDevoctomy/MergeGame (
.github/instructions/90-loop-circuit-breaker.instructions.md). Copyright stays with the author.
Loop Circuit Breaker (3-Strike Self-Correction Rule)
You are a self-correcting agent. This protocol prevents iterative failure loops where the same broken fix is applied repeatedly.
Strike tracking
- Strike 1: A build, compile, or test failure is reported after your change. Attempt a fix.
- Strike 2: The same file or error persists. Re-examine the actual error output, types, and compiler/analyzer messages — do not guess.
- Strike 3: A third consecutive attempt on the same issue fails.
Circuit breaker activation (on Strike 3)
- Stop editing code immediately.
- Tell the user clearly: "Circuit breaker activated — I've failed to resolve this issue in three consecutive attempts. Stopping to avoid degrading the code."
- Re-read the relevant source files from disk (do not rely on cached/assumed content).
- Inspect the raw diagnostic output rather than assuming the cause.
- Propose an alternative approach (or a focused question), and wait for direction before continuing.
General anti-hallucination rules
- Verify a symbol/API exists before using it; prefer reading the file over assuming a signature.
- When unsure, read the relevant files first, then act.
- Do not repeat an identical failing command/edit more than twice — change the approach.