autoresearch
Autonomous iteration loop: modify, verify, keep/discard against any metric
Hunt bugs with scientific method: hypothesize, test, falsify, repeat
> /plugin marketplace add uditgoenka/autoresearch > /plugin install autoresearch@autoresearch
How it fires
How this command gets triggered: by you, by Claude, or both.
/debugContext preview
What this command does when you run it.
Hunt bugs with scientific method: hypothesize, test, falsify, repeat
name: autoresearch:debug description: "Hunt bugs with scientific method: hypothesize, test, falsify, repeat" argument-hint: "[Scope: <glob>] [Symptom: <text>] [Iterations: N] [--fix] [--evals]"
EXECUTE IMMEDIATELY.
Extract from $ARGUMENTS:
If Scope and Symptom both missing: 1. Auto-scan: run tests, lint, typecheck to detect existing failures 2. AskUserQuestion (single batch): Q1 (Issue): "What's the problem?" — hunt all bugs, specific error, failing tests, CI failure, performance Q2 (Scope): "Which files?" — suggested globs + entire codebase Q3 (Depth): "How deep?" — quick (5), standard (15), deep (30+), unlimited Q4 (After): "When bugs found?" — report only, find and fix (--chain fix), chain to other, ask each time If all provided → skip.
| Technique | When to Use | |---|---| | Binary search | Know when it worked, find when it broke | | Differential | Compare working vs broken state | | Minimal reproduction | Simplify to smallest failing case | | Trace | Follow execution path through code | | Pattern search | Grep for known anti-patterns | | Working backwards | Start from error, trace to root cause |
1. Auto-scan for failures if no symptom provided 2. Create output directory: `autoresearch/debug-{YYMMDD}-{HHMM}/` 3. TSV header: `# metric_direction: higher_is_better\niteration\ttimestamp\thypothesis\tstatus\ttechnique\tevidence\tfile_line` 4. Metric = cumulative confirmed findings count
Append to TSV: iteration, timestamp, hypothesis, status, technique, evidence, file_line
If --evals: check if current_iteration % interval == 0 → run checkpoint analysis.
If bounded: current_iteration >= max_iterations → exit loop, print summary.
Print: total hypotheses tested, confirmed/disproven/inconclusive counts, all confirmed bugs with severity and file:line.
If --evals present:
After completion, write handoff.json to output directory: version "2.1.0", source "debug", timestamp, status (COMPLETE|USER_INTERRUPT|BOUNDED|ERROR), results_tsv path, findings = confirmed bugs with severity + file:line, config{scope, symptom}. If --fix flag → chain to fix automatically. Invoke next target in --chain order. Propagate --evals flag.
Turn Claude Code, OpenCode, or OpenAI Codex into a relentless improvement engine. Based on Karpathy's autoresearch — constraint + mechanical metric + autonomous iteration = compounding gains.
Repo: uditgoenka/autoresearch
Autonomous iteration loop: modify, verify, keep/discard against any metric
Analyze iteration results: trends, plateaus, regressions, recommendations
Scout codebase and auto-generate docs — or a navigable wiki knowledge base — with validation-fix loop