/harness-craft:root-cause-debuggingfrom harness-craft
Four-phase debugging protocol with one Iron Law: no fix without root-cause investigation first. Includes the 3-failed-fixes circuit breaker that escalates from "try another patch" to "question the architecture". USE WHEN hitting any bug, test failure, or unexpected behavior — and ESPECIALLY under time pressure, when a "quick fix" seems obvious, or when previous fixes didn't stick. SKIP for none — simple bugs have root causes too.
Ships in harness-craft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Distilled from obra/superpowers
systematic-debugging (MIT, Jesse Vincent). Harness wiring: this skill is
the aim that the 仗助 loop (instant kill → fix → rerun) needs — speed
without root cause is thrashing. Escalation at 3 failed fixes routes to
dual-magi-review, and escalation is NOT retreat (松岡-compatible).
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
Systematic is faster than guess-and-check: upstream measured 15-30 min vs 2-3 h thrashing, ~95% vs ~40% first-fix rate.
Find working code similar to the broken path (same codebase or reference implementation — read it completely, don't skim). List every difference, however small; don't assume "that can't matter".
One specific hypothesis ("X is the root cause because Y"), tested by the smallest possible change, one variable at a time. Didn't confirm? New hypothesis — do NOT stack more changes on top. If you don't understand something, say so and investigate; don't pretend.
If each fix reveals a new problem somewhere else, or needs "massive refactoring" to land — that is not a failed hypothesis, that is a wrong architecture. STOP patching. Run dual-magi-review on the design (or at minimum surface the architecture question to the user) before fix #4.
This escalation is a report-with-alternatives, not a retreat.
| Excuse | Reality |
|---|---|
| "Too simple to need process" | Simple bugs have root causes; the process is fast on them |
| "Emergency, no time" | Systematic is faster than thrashing — measured |
| "I'll test after the fix works" | Untested fixes don't stick |
| "Multiple fixes at once saves time" | Can't isolate what worked; breeds new bugs |
| "I see the problem" | Seeing a symptom ≠ understanding the cause |
If investigation truly ends at "environmental / timing / external": document what you ruled out, add handling (retry, timeout, message) and monitoring. But ~95% of "no root cause" is incomplete investigation.
Upstream: obra/superpowers systematic-debugging — MIT © 2025 Jesse
Vincent. Distilled and adapted for claude-harness (magi escalation wiring).
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub hrmtz/claude-harness --plugin harness-craft4 skills in this plugin
/atomized-briefingWrite an implementation plan / worker briefing as atomized 2-5 minute
steps with exact file paths, explicit Consumes/Produces interfaces, and
zero placeholders — so a context-free executor (formation worker, spawned
subagent, or future you) can run it without re-deriving intent.
USE WHEN briefing a formation worker, dispatching subagents over a
multi-task plan, or writing any plan another session will execute.
SKIP for single-task work you will execute yourself in this session.
/calibrated-verificationEvery verification script, test, scanner, or matcher must ship with a
calibration pair — a known positive it provably catches and a negative
control it provably passes — and must print its denominator (scanned N /
matched M / dropped K). "All clean" from an uncalibrated checker is
indistinguishable from a broken checker.
USE WHEN writing or running any detector-shaped artifact: a doc-vs-source
matcher, an audit script, a migration verifier, a scrubber, a grep-based
sweep — and ESPECIALLY before asserting a negative ("no matches", "no
references", "all clean", "0 findings") from its output.
SKIP when the tool's output is directly the deliverable (not a judgment
about presence/absence).
/skill-tddAuthor or edit an agent skill using the TDD loop: run a baseline pressure
scenario WITHOUT the skill (RED), write the minimal skill that fixes the
observed failure (GREEN), then close the loopholes agents actually used
(REFACTOR).
USE WHEN creating a new SKILL.md, editing an existing one, or when a
deployed skill is being ignored / rationalized around by agents.
SKIP when the rule is mechanically enforceable — write a hook, not a skill
(see Structural-first gate below).