agentleFS
HermeticOrmusHermeticOrmus/hypothesis-debugging-skills/skills/hypothesis-debugging/SKILL.md

hypothesis-debugging

Skill0 starsChanged 5 months agoMITView on GitHub

Hypothesis-driven debugging protocol — reproduce, isolate, hypothesize, test, fix, document. Use when debugging a failure, a failing test, a flaky CI run, or a production error. Write a ranked hypothesis table before any fix; find the root cause, not a workaround. The operational form of the vibe-engineer-skills principle "hypothesis before help.

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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:

    Write a ranked hypothesis table BEFORE touching the code.

    line 23

≈ “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

Hypothesis debugging

A six-phase protocol for debugging. Do not write a fix until you have a ranked hypothesis table and a confirmed root cause.

Tradeoff: bias toward finding the cause over shipping a fast patch. For an obvious one-line typo, use judgment.

1. Reproduce

Make the failure happen on demand. Capture the exact error and stack trace, the repro steps, and expected versus actual. Consistent or intermittent? Intermittent points at state, timing, or environment.

2. Isolate

Narrow the scope. Check recent commits (git log --oneline -10) and diffs, then reduce to the smallest input that still fails.

3. Hypothesize

Write a ranked hypothesis table BEFORE touching the code.

#HypothesisLikelihoodHow to test
1Most likely cause, stated specificallyHighA cheap yes/no test
2Second possibilityMediumA specific test
3Less likely causeLowA specific test

Each row names a concrete cause and has a test that can run.

4. Test

Work the table top to bottom. Confirm or refute each row. A confirmed hypothesis is the root cause; a refuted one is removed. Do not skip to a fix on a hunch.

5. Fix

With the cause confirmed: the smallest change that addresses it, traced for side effects, verified against the Phase 1 reproduction, plus a regression test that fails on the old code.

Root cause, not workaround. Reject try/catch swallowing, defensive masking checks, renamed symptom variables, mocked broken dependencies, and asserting the bug away. A workaround that passes tests hides the bug and propagates it.

6. Document

Record the root cause, the fix and why it addresses the cause, and the prevention: the regression test, the bug category, and how to catch this class faster next time.


See full content and worked examples at https://github.com/HermeticOrmus/hypothesis-debugging-skills.

Download now (ZIP)

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. mohmaedeslam00116/waypower★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

Does it work?

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

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.