/autoresearch:debugfrom autoresearch
Investigates bugs using falsifiable hypotheses, systematic elimination, and structured logging. Useful for root-cause analysis of non-obvious failures.
Ships in autoresearch. 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.
Read when SKILL.md points to them.
Root-cause analysis using the scientific method: form falsifiable hypotheses, design tests that could disprove them, eliminate candidates, and converge on confirmed root causes. Every step is logged — nothing is assumed, nothing is skipped.
A hypothesis is only useful if it can be falsified. "Something is wrong" is not a hypothesis. "The cache is returning stale data because the TTL is not being reset on write" is a hypothesis — it can be tested and disproved.
Create debug/ in the working directory (or alongside the failing artifact):
| File | Purpose |
|---|---|
debug/hypotheses.md | Active candidates under investigation |
debug/eliminated.md | Ruled-out hypotheses with proof of elimination |
debug/findings.md | Confirmed root causes with reproduction case |
Initialize all three files before the first iteration.
Repeat until stop condition:
[Observe] --> [Hypothesize] --> [Design Test] --> [Run Test] --> [Update] --> [Log]
^ |
|__________________________________________________________________________|
Collect all available evidence before forming any hypothesis:
Write a symptom summary at the top of debug/findings.md:
## Symptom
[Exact error message or behavior]
## Observed conditions
- Occurs: [when/where]
- Does NOT occur: [contrasting case if known]
- First observed: [commit/date/event]
Form at least 2 candidate hypotheses before testing any of them. More candidates = less confirmation bias.
Hypothesis format:
H-N: [X] causes [Y] because [Z].
Test: [specific action that would disprove this if false]
Confidence: low | medium | high
Example:
H-1: The database connection pool is exhausted because max_connections is set too low.
Test: Print active connection count during the failure window. If count < max_connections, this hypothesis is false.
Confidence: medium
H-2: The timeout is triggered by a slow DNS lookup, not the actual request.
Test: Replace hostname with IP address in the connection string. If bug disappears, H-2 is confirmed.
Confidence: low
Write all active hypotheses to debug/hypotheses.md.
Prioritization rule: Test high-confidence, low-cost hypotheses first. A cheap test that eliminates a hypothesis is more valuable than an expensive test that confirms one.
For each hypothesis under test, design the minimal experiment that could disprove it.
Ask: "If this hypothesis is FALSE, what would I observe?"
Design the test to produce that observable. If the test does NOT produce the falsifying observation, the hypothesis survives (not confirmed — survives).
Good test design:
Execute the test. Record:
Do not interpret yet. Record what happened, literally.
If the test produced the falsifying observation:
debug/hypotheses.md to debug/eliminated.mdIf the test did NOT produce the falsifying observation:
If the test produced unexpected output:
After each iteration, update all three files:
debug/hypotheses.md — current active candidates (sorted by confidence, high first)
debug/eliminated.md — append the eliminated hypothesis with proof
debug/findings.md — append iteration summary
Then immediately begin Stage 1 of the next iteration.
Success: Root cause confirmed — stop when ALL of these are true:
Write confirmed root cause to debug/findings.md:
## Root Cause (Confirmed)
[Hypothesis text]
## Evidence
[Test that confirmed it]
## Reproduction case
[Minimal steps/code to reproduce]
## Proposed fix
[What needs to change]
## Next step
Run `/autoresearch:fix` to implement and verify the fix iteratively.
Budget exhausted: If max_iterations is reached without confirmation, write a partial findings report with the strongest surviving hypothesis and the evidence collected so far.
If more than 3 iterations pass without eliminating any hypothesis:
Do not continue making minor variations. Switch observation technique entirely.
Available technique changes (see investigation-techniques.md for details):
Log the technique switch:
## TECHNIQUE SWITCH — Iteration N
- Previous technique: [name]
- Reason: 3 iterations, 0 hypotheses eliminated
- New technique: [name]
- Rationale: [why this technique is more likely to produce new evidence]
Once the investigation begins:
The only valid stops are: root cause confirmed, or budget exhausted.
When /autoresearch:debug is invoked:
debug/ directory and initialize the three files.Do not ask more questions after setup. The investigation is autonomous from Stage 1 onward.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
bug-hunting, root-cause-analysis, scientific-method, debugging
10 skills in this plugin
/autoresearchCore autonomous research loop. Reads research.md, proposes hypotheses,
runs experiments, evaluates results mechanically, keeps improvements,
discards failures, and iterates until the target metric is achieved or
the iteration budget is exhausted.
TRIGGER when: user invokes "autoresearch" (no subcommand); research.md exists;
user wants the 5-stage loop; user wants iterative optimization overnight.
/fixautoresearch:fixIterative error-crusher loop that auto-stops at 0 errors. Cascade-aware: fixes
dependency errors before their dependents. Refuses anti-patterns that hide errors
instead of fixing them.
TRIGGER when: user has errors or failures to fix iteratively; user asks to "fix all errors";
user has a failing test suite; user has compilation errors; user has linter errors;
user wants systematic error elimination; user invokes /autoresearch:fix.
DO NOT TRIGGER when: user wants a one-shot fix for a single obvious bug; user wants
debugging guidance only; user wants code review without fixing.
/learnautoresearch:learnFeedback-driven self-improvement protocol for autoresearch-skill. Converts
failed runs, confusing transcripts, bad outputs, or user feedback into a
bounded improvement plan, an eval scenario, and a patch checklist without
executing the patch automatically.
TRIGGER when: user says the skill failed, wants to improve autoresearch-skill,
provides feedback on confusing behavior, asks to turn a failure into an eval,
or invokes /autoresearch:learn.
DO NOT TRIGGER when: the user wants to run an optimization loop (use
/autoresearch), fix code errors (use /autoresearch:fix), or ship a finished
artifact (use /autoresearch:ship).
/planautoresearch:plan7-step setup wizard that produces a complete, ready-to-run research.md without
executing the research loop. Walks the user through goal, metric, search space,
constraints, evaluator design, and baseline measurement, then writes the file.
TRIGGER when: user wants to set up a research project; user wants to plan before
running the loop; user says "plan my research"; user has a goal but no research.md;
user invokes /autoresearch:plan.
DO NOT TRIGGER when: research.md already exists and the user wants to run the loop;
user wants a one-shot answer; user wants to debug, not optimize.
/predictautoresearch:predictMulti-perspective deliberation engine. Gathers independent positions from
diverse personas, runs cross-examination and rebuttal rounds, detects herd
behavior, and synthesizes a neutral judge verdict with confidence levels.
TRIGGER when: user wants multi-perspective prediction, forecasting,
scenario analysis, decision analysis, "what will happen if", "should we",
"predict the outcome of", structured devil's advocacy, or any question
benefiting from adversarial deliberation.
/reasonautoresearch:reasonAdversarial multi-round reasoning with blind-judge panel to reach rigorous conclusions.
TRIGGER when: user wants rigorous reasoning or argument evaluation; user wants a decision
analyzed from multiple angles; user wants devil's advocate critique; user asks "what are
the strongest arguments for/against"; user wants a structured debate; user wants to avoid
groupthink or anchoring; user invokes /autoresearch:reason.
DO NOT TRIGGER when: user wants a simple recommendation; user wants a quick summary;
user wants factual lookup; user just wants pros/cons without adversarial pressure.
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: commands: Invalid input, skills: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Other plugins' skills for the same job