Each example lives in examples/<name>/ and must include the following files:
| File | Required | Description |
|---|---|---|
research.md |
Yes | The research document used during the run (goal, metric, constraints, history) |
evaluate.py |
Yes* | Evaluator script outputting {"pass": bool, "score": number} where score is higher-is-better. Use a shell alternative if Python is not appropriate. |
research_log.md |
Yes | Snippet of the actual log (at least 3 iterations showing keep/revert decisions) |
results.png |
Yes | Before/after chart or optimization trajectory plot |
autoresearch-results.tsv |
Yes | TSV log with columns: iteration, metric_value, delta, delta_pct, status, description, evaluator_source, timestamp |
README.md |
Recommended | One paragraph describing the problem, the result, and why this example is interesting |
*If the domain does not use Python, replace evaluate.py with the equivalent evaluator and document the format in the example's README.md.
Before opening a PR with a new example:
-
research.mdshows real goal, metric, and at least 5 history rows -
evaluate.py(or equivalent) outputs valid{"pass": bool, "score": number}JSON -
research_log.mdincludes at least 3 complete iteration entries -
results.pngshows measured data (not a placeholder or mock) -
autoresearch-results.tsvhas a header row and at least 5 data rows - Numbers in the example are real — tested locally, not fabricated
New subcommands live in skills/<name>/SKILL.md. Follow this structure:
---
name: autoresearch:<name>
description: |
One sentence describing what this subcommand does.
TRIGGER when: <precise trigger conditions>
DO NOT TRIGGER when: <anti-trigger conditions>
allowed-tools:
- Read
- Write
- Edit
- Bash
- WebFetch # only if needed
- WebSearch # only if needed
---- Purpose — one paragraph describing the problem this subcommand solves
- Autonomy Directive — copy from
SKILL.mdroot (never stop, never ask permission, loop until done) - Loop / Procedure — numbered stages with explicit entry and exit conditions
- Output Contract — what files are created or modified, and their format
- Chaining — which subcommands this one feeds into or receives from
- Directory:
skills/<name>/— lowercase, no hyphens (e.g.,skills/debug/,skills/fix/) - Skill file:
skills/<name>/SKILL.md - Invocation:
/autoresearch:<name>— matches directory name exactly - Add the command to the routing table in the root
SKILL.md
- Write in imperative present tense: "Read the file." not "The agent should read the file."
- No filler phrases ("Note that...", "It's important to..."). State facts directly.
- Every loop must have an explicit termination condition.
- Every output file must be described with its format and whether it is append-only or overwritten.
Before submitting a pull request, verify all of the following:
-
python scripts/init_research.py --helpruns without error on Python 3.8 - No new pip dependencies introduced (stdlib only)
- All new Python is compatible with Python 3.8+ (no walrus operator, no
match, no3.9+type hints) - New skill files include required frontmatter with trigger and anti-trigger conditions
- New examples include all required files (see table above) with real measured data
- Existing tests pass:
python -m pytest tests/(if tests directory exists) - No debug output left in scripts (
printstatements used for progress are fine;import pdbis not) - PR description states what problem the change solves and links to any relevant issue
Python
- Target Python 3.8+ compatibility throughout
- No new
pipdependencies — stdlib only (os,json,subprocess,pathlib,argparse,csv, etc.) - Use
pathlib.Pathoveros.pathfor new code - Keep functions under 40 lines; split if longer
- Test with
python scripts/init_research.py --helpbefore submitting
Shell scripts
- Target
bash(notzshorfish) - Use
#!/usr/bin/env bashshebang set -euo pipefailat the top of every new script- Quote all variable expansions:
"$var"not$var
Markdown / Skill files
- Use ATX headings (
##) not setext (---underlines) - Tables must have a header row and alignment separator row
- No trailing whitespace
- Prefer plain ASCII diagrams (using
┌,│,└,─,v) over images for logic flows
Open an issue with the question label. For new example ideas, open a discussion before writing code — the example should demonstrate a genuinely different domain or evaluation strategy than the existing four.