Rob

All projects · GitHub · 한국어

make-it-fail

Make the bug fail on command before you explain it, then fix it with a red-then-green test.

npx skills add robfold/make-it-fail

English · 한국어

Formerly bug-diagnosis.

Make the bug fail on command before you explain it, then fix it with a red-then-green test. This skill is for hard bugs, flaky failures, and performance regressions, the kind where a coding agent reads code, picks the first plausible cause, and calls it fixed without ever watching it fail.

  • No command, no theory. The agent builds one command that goes red on this exact bug before it proposes any cause.
  • The failure is made, not waited for. Known starting state, controlled inputs (data, time, randomness, environment, schedules), and repeats or load to raise the reproduction rate of a flaky bug.
  • Every remaining detail is load-bearing. The case is cut one circumstance or one half at a time, or the difference between a good and a failing version is bisected.
  • Hypotheses are predictions. Three to five ranked, falsifiable hypotheses, each explaining every observation so far, tested one change at a time.
  • "Fixed" is proven both ways. The test goes red, then green with the fix, red again with the fix taken out, and green when it goes back in.
  • Two candidates before a retry. When a command fails, the agent writes two candidate causes and one command that separates them before it runs anything again.
  • Every claim carries a label. The diagnosis note marks each line confirmed, inferred, or unknown.

Shape

problem statement (quick look first: ten minutes)
→ loop: one command that can go red on this bug
→ make it fail: known state, controlled inputs
→ minimise: every remaining element is load-bearing
→ hypotheses: 3 to 5, ranked, each with a prediction
→ probe: one change per experiment
→ fix: red → green → fix out: red → fix back: green
→ diagnosis note: confirmed / inferred / unknown, read back
Reference Settles
logbook.md The quick look, the problem statement, the six logbook items, labels, the gate table, the diagnosis note
loop.md The four properties of a loop, ten ways to build one, inputs to control, flaky bugs, the human-run loop, redaction
minimise.md What to cut, halving, stopping early, shrinking the difference, bisection
hypotheses.md The scientific method, where hypotheses come from, probing at boundaries, performance regressions, two candidates before a retry
fix.md The correct seam, red-green-red-green, bugs that "went away", fixing the cause, closing
sources.md Which rules came from something that happened, which were set in advance, and the sections read

The Korean text of the skill is in SKILL.ko.md and sources.ko.md. The agent loads only the English SKILL.md. For bugs only a person can trigger, human-loop.template.sh walks them through numbered steps and prints timestamped KEY=VALUE answers.

Install

Claude Code:

/plugin marketplace add robfold/make-it-fail
/plugin install make-it-fail@make-it-fail

Other agents, with the skills CLI:

npx skills add robfold/make-it-fail

Or copy skills/make-it-fail/ into your agent's skills folder (for Claude Code, ~/.claude/skills/).

Use

Tell your agent "debug this", "why is this broken?", or "it got slow", or call it directly:

$make-it-fail The CSV export returns an empty file for accounts with more than 500 rows. It worked last week. Build a loop that goes red on this before you suggest a cause.

The skill:

  1. Takes a ten-minute quick look, then opens a logbook with the problem statement.
  2. Builds one command that goes red on this bug, and makes it fail from a known state.
  3. Cuts the case until every remaining element is load-bearing.
  4. Writes ranked hypotheses, each with a prediction, and shows them to you.
  5. Tests one prediction per experiment.
  6. Writes a failing regression test at a correct seam, fixes, and proves the fix by taking it out and putting it back.
  7. Writes the diagnosis note into the commit or pull request, labels every line, and reads it back to you.

If no loop can be built, it stops, lists what it tried, and asks for access, a redacted artifact, or permission to instrument.

Sources

The rules come from publishing and installing agent skills, where several commands failed for reasons other than the first one they suggested, checked against three books:

  • Andreas Zeller, Why Programs Fail
  • David J. Agans, Debugging
  • Diomidis Spinellis, Effective Debugging

The skill is redesigned from Matt Pocock's diagnosing-bugs in mattpocock/skills (MIT). The wording is new. sources.md lists the sections read, which rules came from something that happened, and which were set in advance.

License

MIT

Get the next fix when it ships.

I email you when a new skill is ready. Unsubscribe any time.