agentleFS
juandelossantosjuandelossantos/another-agent-skills/skills/debugging-three-strikes/SKILL.md

debugging-three-strikes

Skill1 starsChanged 11 days agoMITView on GitHub

Stop speculative debugging after 3 same-bug strikes. Diagnose systematically before writing code. Use when repetitive fixes fail. Do NOT use for first-time bugs.

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Strike 1 — Diagnose then fix: Every attempt starts with evidence, not speculation.

    line 49
  2. Distinctive:

    Document root cause vs expected behavior

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

3 Strikes Protocol

When the same bug is reported 3+ times with different fixes, STOP.

When to Use

  • Same test failing across 3+ consecutive commits (mechanical STRIKES_LOG trigger)
  • Same component fixed twice with different root causes
  • bug-tag: repeating in commit body for the same issue
  • Escalated from debugging-and-error-recovery after repeated fix attempts

When NOT to Use

  • First occurrence of a bug (use debugging-and-error-recovery instead)
  • One-off test flakiness or network-dependent failure
  • Different components failing independently (not the same root cause)

Output Contract

Strike log entry + escalation diagnosis — .git/STRIKES_LOG recording each strike with test name and timestamp, root cause documented per strike, route-to-skill assigned at strike 3 (test gap → TDD, spec gap → review, process gap → doubt, architecture gap → analysis), user notified before any fix code at strike 3.

Trigger: Test Failure Recurrence

A mechanical pre-commit check reads .git/STRIKES_LOG. Same test name failing 3 consecutive commits → BLOCK and escalate.

Commit 1: test-X FAIL → strike 1 (logged)
Commit 2: test-X FAIL → strike 2 (logged)
Commit 3: test-X FAIL → BLOCK. Escalating.

Other triggers: session-level agent memory (same component fixed twice), bug-tag: in commit body repeating.

Protocol

Strike 1 — Diagnose then fix. Every attempt starts with evidence, not speculation. Inspect DOM, network, console, logs. Document root cause. Fix. Verify tests pass.

Strike 2 — Your diagnosis was wrong. Re-diagnose with fresh context. Fix + add regression guard (test coverage, instrumentation, or lint rule).

Strike 3 — Systemic failure. The diagnosis-fix-verify cycle works but the system reproduces the bug. BLOCK. No more fix code.

Agent must on strike 3:

  1. Stop all commits
  2. Inspect real state (computed styles, network, console, DOM)
  3. Document root cause vs expected behavior
  4. Report to user before any fix code

Escalation Matrix

Root CauseRoute To
Test gap (no regression guard)test-driven-development
Spec gap (requirements missed)code-review-and-quality
Process gap (no quality gate)doubt-driven-development
Architecture gap (design flaw)architecture-analysis
Unknown or recurring after escalationFull project-health-check + improvement loop

Anti-Patterns

  1. Same fix, harder — The definition of insanity. Strike 3 means your approach is wrong.
  2. Skipping diagnosis — "I know what's wrong" without inspecting. You didn't last 2 times.
  3. Not escalating — Fixing strike 3 locally when the problem is systemic.
  4. Ignoring strike log — Strike 3 didn't come from nowhere. The log told you test X was failing.

Verification

  • Strike 1: diagnose before fix, evidence documented
  • Strike 2: re-diagnose, add regression guard
  • Strike 3: BLOCK, escalate to appropriate skill
  • bash tests/run-all.sh passes after fix

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.