/autoresearch:planfrom autoresearch
Guides users through a 7-step wizard to create a complete research.md for structured experiments. Useful for planning before running research loops.
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.
None: SKILL.md is the whole skill.
A 7-step interview that produces a complete research.md (and optionally evaluate.py) before a single experiment runs. The wizard is conversational — ask each step, wait for the answer, then proceed. Do not batch all questions at once.
One step at a time. Present the step title and question(s). Wait for the user's response. Summarize what you recorded ("Got it — I'll set metric: accuracy, direction: maximize"). Then proceed to the next step.
Do not skip steps. Each step produces a concrete artifact that feeds Step 7. If the user's answer is vague, probe once for specificity, then record your best interpretation and note it as an assumption.
Probe for specificity. Vague goals produce useless research loops.
Ask:
Probe rules:
Record: goal_statement (1-2 sentences, specific and measurable)
What to measure, how to measure it, and what direction counts as progress.
Ask:
Guide the user if stuck:
Record: metric_name, direction (maximize/minimize), target_value, noise_runs (1 if deterministic, 3-5 if noisy)
Enumerate what can change and, critically, what must not.
Ask:
Probe rules:
Record: allowed_changes (bullet list), forbidden_changes (bullet list), guard (optional hard constraint)
Scope the loop before it starts.
Ask:
If the user wants overnight/unattended:
pause_every: nevernohup bash scripts/autoresearch-loop.sh ./research-dir/ > autoresearch.log 2>&1 &bash scripts/check_progress.sh"If the user wants periodic reviews:
pause_every: NRecord: max_iterations, pause_every, time_budget_per_experiment (default: 5 minutes), any resource constraints
Can measurement be automated? This determines loop speed and quality.
Ask: "Can the success metric be measured by running a script? For example, python evaluate.py that outputs a number."
Guide the user to produce a script that prints:
{"pass": true, "score": 0.94}
Ask clarifying questions:
Offer to write a evaluate.py starter template based on their answers. Use the appropriate example from below as a starting point, adapt it to their domain, and write it to the research directory.
Template — timing/benchmark (minimize):
#!/usr/bin/env python3
import json, subprocess, statistics, time
times = []
for _ in range(3):
t0 = time.perf_counter()
subprocess.run(["python", "TARGET_SCRIPT.py"], check=True)
times.append(time.perf_counter() - t0)
median = statistics.median(times)
print(json.dumps({"pass": median < TARGET_VALUE, "score": median}))
Template — accuracy/quality (maximize):
#!/usr/bin/env python3
import json, subprocess
result = subprocess.run(["python", "test_suite.py"], capture_output=True, text=True)
score = float(result.stdout.strip().split("score:")[-1].strip())
print(json.dumps({"pass": score > TARGET_VALUE, "score": score}))
Keep policy: Ask: "Keep only if strictly better than best so far (score_improvement), or keep anything that passes the threshold (pass_only)?"
Note in research.md: Evaluator: _(none — agent judges manually)_
Explain: "The agent will evaluate each experiment using its own judgment. This is slower and less reliable than a script — consider adding a script later."
Record: evaluator_command (or none), keep_policy
Run the evaluator NOW to establish iteration 0. This is mandatory before writing research.md.
If an evaluator was designed in Step 5:
# Run the evaluator dry run
python evaluate.py
Expected output: a JSON line like {"pass": true, "score": 0.73}
If the evaluator runs successfully:
If the evaluator fails (non-zero exit, invalid JSON, crash):
evaluate.py and re-run.If no evaluator (manual evaluation):
Record: baseline_score (iteration 0 value)
Write the fully populated research.md using all recorded values.
If scripts/init_research.py is available:
python scripts/init_research.py \
--goal "GOAL_STATEMENT" \
--metric "METRIC_NAME" \
--direction "DIRECTION" \
--target "TARGET_VALUE" \
--evaluator "EVALUATOR_COMMAND" \
--output ./research-dir/
If the script is not available, write research.md directly using this structure:
# Research: GOAL_TITLE
## Goal
GOAL_STATEMENT
## Success Metric
- **Metric:** METRIC_NAME
- **Target:** TARGET_VALUE
- **Direction:** DIRECTION
## Constraints
- **Max iterations:** MAX_ITERATIONS
- **Time budget per experiment:** 5 minutes
- **Pause for review every:** PAUSE_EVERY
- **Evaluator:** EVALUATOR_COMMAND
- **Keep policy:** KEEP_POLICY
- **Guard:** GUARD (if any)
- **Noise runs:** NOISE_RUNS
- **Min delta:** 0
## Current Approach
BASELINE_DESCRIPTION
## Search Space
- **Allowed changes:** ALLOWED_CHANGES
- **Forbidden changes:** FORBIDDEN_CHANGES
## Context & References
REFERENCES (if any)
---
## History
| # | Change | Metric | Result | Timestamp |
|---|--------|--------|--------|-----------|
| 0 | Baseline | BASELINE_SCORE | -- | TODAY |
After writing:
evaluate.py was written, confirm that too.To start the loop, tell your agent:
"Run autoresearch on ./research-dir/research.md"
Or for overnight unattended:
nohup bash scripts/autoresearch-loop.sh ./research-dir/ > autoresearch.log 2>&1 &
bash scripts/check_progress.sh ./research-dir/
/autoresearch:ship to publish the results."Before declaring the wizard complete, verify:
research.md written with all sections populated (no TBD or TODO placeholders)evaluate.py written if automated evaluation was chosenWhat SKILL.md sets; muted values are Claude Code's defaults
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.
/debugautoresearch:debugScientific bug hunting using falsifiable hypotheses. Forms hypotheses, designs
falsifying tests, eliminates candidates systematically, and logs the full
investigation trail in a structured debug/ folder.
TRIGGER when: user has a bug to investigate scientifically; user wants systematic
root-cause analysis; user says "debug", "investigate", "root cause", "why is this
failing"; user invokes /autoresearch:debug.
DO NOT TRIGGER when: user wants to optimize a metric (use /autoresearch); user
wants to fix a known error automatically (use /autoresearch:fix); user just wants
a quick one-line answer about what a function does.
/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.
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