hypothesis-debugging-skills / rules
Cursor rule0 starsChanged 5 months agoMITView on GitHub
Hypothesis-driven debugging protocol — reproduce, isolate, hypothesize, test, fix, document. Apply when debugging a failure. Find the root cause, not a workaround.
We split this hypothesis-debugging.mdc 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
- Distinctive: line 22
Write a ranked hypothesis table BEFORE touching the code.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule 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.
Files
--- description: Hypothesis-driven debugging protocol — reproduce, isolate, hypothesize, test, fix, document. Apply when debugging a failure. Find the root cause, not a workaround. alwaysApply: false --- # Hypothesis debugging A six-phase protocol for debugging a failure. 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 steps, and expected versus actual behavior. Note whether it is 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 or call that still fails. Turn "the app is broken" into "this input to this function fails." ## 3. Hypothesize Write a ranked hypothesis table BEFORE touching the code. | # | Hypothesis | Likelihood | How to test | |---|-----------|------------|-------------| | 1 | Most likely cause, stated specifically | High | A cheap test that gives a yes/no answer | | 2 | Second possibility | Medium | A specific test | | 3 | Less likely cause | Low | A specific test | Each row names a concrete cause and has a test that can actually run. ## 4. Test Work the table top to bottom. Run each test, record the result. A confirmed hypothesis is the root cause; a refuted one is removed. Do not skip ahead to a fix on a hunch. ## 5. Fix With the cause confirmed: the smallest change that addresses the cause, 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 the failure, defensive checks masking a contract violation, renamed symptom variables, mocked broken dependencies, 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, how to catch it faster next time).
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- hypothesis-debuggingSkill
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
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.

