autoresearch
Autonomous iteration loop: modify, verify, keep/discard against any metric
Crush errors one-by-one until zero remain: tests, types, lint, build
> /plugin marketplace add uditgoenka/autoresearch > /plugin install autoresearch@autoresearch
How it fires
How this command gets triggered: by you, by Claude, or both.
/fixContext preview
What this command does when you run it.
Crush errors one-by-one until zero remain: tests, types, lint, build
name: autoresearch:fix description: "Crush errors one-by-one until zero remain: tests, types, lint, build" argument-hint: "[Target: <cmd>] [Scope: <glob>] [Guard: <cmd>] [Iterations: N] [--evals] [--from-debug]"
EXECUTE IMMEDIATELY.
Extract from $ARGUMENTS:
If Target and Scope both missing: 1. Auto-detect failures: run test suite, type checker, linter, build 2. Present results via AskUserQuestion (single batched call): Q1 (Fix What): "Found [N] test failures, [M] type errors, [K] lint errors. Fix what?" — everything, only tests, only types, only lint Q2 (Guard): "Safety command that must always pass?" — npm test, tsc, npm run build, skip Q3 (Scope): "Which files can I modify?" — suggested globs from error locations + all Q4 (Launch): "Ready?" — fix until zero, fix with limit, cancel If all provided → skip setup. If --from-debug → read handoff.json for scope and findings.
Verify: git repo exists, clean working tree, no lock files, no detached HEAD. Fail fast on critical issues.
1. Run Target command → count errors (metric = error count, direction = lower_is_better) 2. Record baseline in TSV 3. Create output directory: `autoresearch/fix-{YYMMDD}-{HHMM}/` 4. TSV header: `# metric_direction: lower_is_better\niteration\ttimestamp\terror_type\terror_fixed\tcommit\tmetric\tdelta\tguard\tstatus\tdescription`
Order: crash/fatal → test failures → type errors → lint → warnings. Within category: easiest first (single-file fixes before cross-file).
Append row: iteration, timestamp, error_type, error_fixed, commit/-, metric (error count), delta, guard, status, description
If --evals: check if current_iteration % interval == 0 → run checkpoint analysis.
If bounded: current_iteration >= max_iterations → exit loop, print summary.
Print: total errors fixed, remaining errors, error types distribution, fix success rate.
If --evals present:
After completion, write handoff.json to output directory: version "2.1.0", source "fix", timestamp, status (COMPLETE|USER_INTERRUPT|BOUNDED|ERROR), results_tsv path, findings = unfixed errors, config{target, scope, guard}. 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