diff --git a/CHANGELOG.md b/CHANGELOG.md
index b4a3b37..b9724f5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,380 +2,88 @@
## Unreleased
-What changes for a 0.1.1 user. [Upgrading from 0.1.1](#upgrading-from-011)
-has the checklist.
-
-### Breaking
-
-- **A new config format.** `constraints:` is now `gates:`, `metrics:` /
- `observables:` are `observe:` entries with a `name:`, `reviewer:` is a
- `review:` entry, `acceptance.metric_gates` is a `metric:` gate. Every old key
- is an error that names its replacement; there is no migration.
-- **Budgets are command-line flags**: `budget:` is now the `run`/`resume`
- flags `--until`, `-n`, `--cost` and `--time`. `--until N` stops after
- iteration N of the run, as 0.1.1's `budget.iterations: N` and `-n N` did;
- `--cost` and `--time` count one command (a segment), where 0.1.1's
- `budget.cost` and `budget.time` counted the project's whole history. Without
- a flag a segment runs 1 iteration (0.1.1 ran until iteration
- `budget.iterations`, default 5).
-- **`-n N` runs N more iterations**, counted from where the run is; 0.1.1's
- `-n N` ran until iteration N (now `--until N`).
-- **Runs.** Every `autohelix run` starts a new run, with its own state in
- `.autohelix/runs//`; `autohelix resume` continues one. 0.1.1's state
- (`.autohelix/history.jsonl`) is refused, not migrated.
-- **Your branch moves only when a run lands.** Accepted iterations are commits
- on `refs/autohelix/`; by default your branch is fast-forwarded at the end
- of each `run`/`resume` (`--land manual`: only by `autohelix land`).
-- **Every phase runs in a private copy outside the project**
- (`~/.cache/autohelix/copies/`, or `$AUTOHELIX_COPIES_ROOT`), not a git
- worktree. A gate or observe command that changes the candidate rejects it.
-- **The agent's material is in `.autohelix-iteration/`** in its copy (was
- `.autohelix/`): notes, history, hints, `commit_summary.txt`.
-- **`.autohelix/prompt.md` is no longer read**: set `prompt_template:` (a path
- relative to the config). Several template variables are renamed or gone
- ([the table below](#prompt-template-variables)).
-- **Metrics come only from `##autohelix[name=value]` lines** on stdout, by
- the metric's name. 0.1.1 also took a `name: value` or `name=value` line, and,
- with one declared metric, a single `##autohelix[...]` line whatever its
- name; those now report nothing.
-- **Every experiment is a folder in `autohelix/`, and its config is the
- folder's `config.yaml`: `autohelix//config.yaml`** (`autohelix run
- `; a bare `autohelix run` runs the only experiment, or lists them
- when there are several). The top-level `autohelix.yaml` is no longer a
- config, nor is `autohelix/.yaml`; development builds'
- `autohelix//autohelix.yaml` is now `autohelix//config.yaml`,
- the name the run's stored copy (`runs//config.yaml`) and
- `$AUTOHELIX_CONFIG` have. A run whose config
- isn't an experiment's is refused, so a development build's run of either
- old file can't be resumed: continue from it with `autohelix run
- --import `. `-c/--config` is gone; runs are named after the
- experiment folder (`name:` is an error).
-- **A run keeps the config it started with** (`runs//config.yaml`):
- `resume` refuses when the file's settings changed; apply an edit with
- `run --import `.
-- **Agent settings**: `agent.type` is now `agent.cli` (`claude` is
- `claude-code`); `agent.command` is replaced by `AUTOHELIX_CLAUDE_CODE_CMD`,
- `AUTOHELIX_CODEX_CMD` and `AUTOHELIX_OPENCODE_CMD`; `agent.settings` and
- `agent.require_notes` are gone.
-- **Time limits are `agent.timeout`**, a duration (`30m`), replacing
- `agent.timeout_seconds` and `budget.iteration_time`.
-- **Metric gates** (`- metric: NAME` in `gates:`) compare with the last
- accepted iteration, not the best one (0.1.1); the threshold is written with
- `%` (`regress: 5%` or `improve: 0%`), a bare number is an error, and there is
- no default (0.1.1's `max_regression_pct` defaulted to 10).
-- **Removed commands**: `init` (use bare `autohelix`), `clear` (`archive`,
- `delete`), `parallel` (`run --group`), `watch` (`view --terminal`).
-- **Exit codes**: `run` and `resume` exit 0 when a budget, a stop condition or
- `autohelix stop` ended them, 1 on an error, 130 when interrupted.
-- `.autohelix/` is kept out of git through `.git/info/exclude`, not
- `.gitignore`.
+A redesign. 0.1.1 configs and run state don't carry over: rewrite the config
+(every old key is an error naming its replacement; see
+[Upgrading from 0.1.1](#upgrading-from-011)) and start a new run.
### Added
-- **A run keeps its experiment folder's files** (`runs//experiment/`):
- the scripts and material beside `autohelix//config.yaml`, links
- inside `autohelix/` followed (`metrics.py -> ../lib/metrics.py`; a
- committed project file is named by its path instead). `run` refuses a folder
- with a link out of `autohelix/` (the folder itself too) or into a dot-name
- inside it (`autohelix/.git/`, `.env`), a link to a folder holding it
- (`up -> ..`), a folder reached twice through links, a
- non-regular or unreadable file, or over 200 files, 200 folders or 10 MB.
- The stored files keep their read and exec bits, without write bits. A folder
- holding only its config gives commands, the agent and judges no copy.
- `resume` refuses
- when the folder's files changed since, naming them. Gate, observe and stop
- commands get a copy of it as `$AUTOHELIX_EXPERIMENT`
- (`python "$AUTOHELIX_EXPERIMENT/render.py"`); the agent gets one in
- `.autohelix-iteration/experiment/`, `ask`/`review` in their own copy
- (read-only files). All of `autohelix/` is always frozen, for every config:
- an agent's edit to a committed experiment or `autohelix/lib/` is discarded.
- `run --check` warns about a command that names an `autohelix/` path that
- exists but the commit lacks.
-- **The end block's `next` line and the web run page name the run's folder**
- (`.autohelix/runs//`: `report.md`, `history.jsonl`, `iterations/`).
- Each segment's start record in `segments.jsonl` has `autohelix_version`.
+- **Runs.** Every `autohelix run` starts a new run, with its own state in
+ `.autohelix/runs//` (per iteration: its record, prompt, agent log and
+ every command's output). `resume` continues one, `archive` hides it,
+ `delete` removes it.
+- **Landing.** Accepted iterations are commits on `refs/autohelix/`. Your
+ branch moves only when the run lands: at the end of each `run` or `resume`
+ by default, or by `autohelix land` (`--land manual`).
+- **Private copies.** Every phase (the agent, the checks, each judge) runs in
+ its own copy outside the project (`~/.cache/autohelix/copies/`), made from
+ the commit. Rejected work is kept as `refs/autohelix-rejected//`, and
+ the next agent gets it as `rejected.patch`.
+- **Experiment folders.** Each experiment is `autohelix//config.yaml`
+ (`autohelix run `), with its scripts beside it. A run stores the
+ config and the folder; `resume` refuses when either changed, and
+ `run --import ` continues from the run with the edit.
- **Bare `autohelix`** in a terminal: the project's runs, then a Claude Code,
- Codex or OpenCode session with the bundled skill, which asks what next: a
- question about the runs, or a new experiment. The skill keeps a new
- experiment folder private (`/autohelix/` in the local exclude file,
- `git rev-parse --git-path info/exclude`) unless you
- want it shared, and keeps the coordinator's notes in `autohelix/README.md`
- (the session reads it first).
-- **`autohelix view`**: the runs on a live web page (`127.0.0.1:8765`; a page
- per run); `--terminal` follows a run; `--once` and `--json` print the runs
- or one run once (JSON fields are only ever added).
-- **`autohelix stop`** ends a run after its current iteration, from another
- terminal or a script; `--now` interrupts it.
-- **`autohelix wait`** blocks until a run event (a segment started, an
- iteration recorded, a segment ended or crashed) and prints it as JSON, with
- a cursor to continue from; `--follow` streams them.
-- **`autohelix resume`, `land`, `archive` and `delete`** to continue, land,
- hide and remove runs.
-- **`autohelix ask`** (a yes/no judge; `ask:` gates) and **`autohelix
- review`** (feedback and `--metric` numbers; `review:` observe entries):
- read-only agents, each on its own copy of the candidate.
-- **`stop:` commands**: the run ends once one exits 0 after an accepted
+ Codex or OpenCode session with the bundled skill, to set up an experiment
+ or ask about the runs.
+- **`autohelix view`**: the runs on a live local web page; `--terminal`
+ follows a run; `--once` and `--json` print a snapshot.
+- **`autohelix stop`** ends a run after its current iteration (`--now`: at
+ once); **`autohelix wait`** blocks until a run event and prints it as JSON.
+- **Judges**: `autohelix ask` (yes/no; `ask:` gates) and `autohelix review`
+ (feedback; `review:` observe entries), read-only agents on their own copy.
+- **`stop:` commands** end the run once one exits 0 after an accepted
iteration.
-- **Groups** (`run --group NAME`): runs of one project share notes and code.
-- **`run --import RUN_ID`**: a new run from your checkout that reads another
- run's notes, history and code.
-- **`run --check`** makes every check a run makes before it writes anything,
- says what `run` would say at its start (other runs' unlanded commits, the
- imported run's, an uncommitted config), and names the command it checked,
- flags included.
-- **`run --why`** and **`archive --why`**: one line kept with the run.
-- **A summary at the end of each segment**: `runs//report.md` and
- `report.html`, a one-file copy of the run page (`--no-report` skips the
- summary).
-- **Cost tracking** across the agent, judges, the summary and model calls a
- command records in `$AUTOHELIX_USAGE_FILE`; `--cost` budgets on it.
-- **Gate, observe and stop commands get the run's context** in their environment
- (`$AUTOHELIX_CANDIDATE`, `$AUTOHELIX_BASE`, `$AUTOHELIX_SCRATCH`,
- `$AUTOHELIX_PREVIOUS`, `$AUTOHELIX_OBSERVATIONS` and more): see
- [Phases → Command environment](docs/phases.md#command-environment).
-- **Rejected work is kept** as `refs/autohelix-rejected//`, and the
- next agent gets the change as `rejected.patch`.
-- **One folder per iteration**, `runs//iterations/NNN/`: its record,
- prompt, agent log, and each gate's, observe entry's and stop command's
- output.
-- **The prompt has the hints' text** and names discarded out-of-scope changes.
-- **Keep-awake**: `run` and `resume` keep the machine from sleeping while a
- segment runs (`caffeinate` on macOS, `systemd-inhibit` on Linux).
-- **SIGTERM acts as Ctrl-C** in a running segment (`kill PID`,
- `stop --now`): the iteration is recorded and the run lands.
-- **`autohelix skill install` / `export`**: the `autohelix` skill (set up an
- experiment, explain runs, supervise one when asked) for Claude Code, Codex or
- OpenCode; `--agent` takes `agent.cli`'s names (`claude-code`, `codex`,
- `opencode`).
-- The user docs ship in the package (`autohelix/docs`); **`autohelix docs`**
- prints their folder.
-- **`docs/patterns.md`**: a starting config for each kind of goal (a checked
- task, optimization with a metric adapter, training a model, working through
- a spec, writing and research, comparing approaches); the skill starts from
- it. The training pattern's artifacts recipe (one model folder per run and
- iteration) is now a `paths.sh` in the experiment folder, sourced by the
- agent and the commands alike (`docs/ml-experiments.md`).
-
-### Changed
-
-- **A failed or timed-out agent call is a rejected iteration**, and the loop
- goes on; three in a row stop the run (also a rate limit or an outage, HTTP
- 429 or 5xx). An infrastructure failure (a rejected key or credentials, HTTP
- 401/403) stops it after the one call, with an error (exit 1) that says to fix
- it and `autohelix resume`.
-- **Notes are saved as a version per iteration**: a note the agent deletes
- stays deleted.
-- Gate, observe and stop commands run in their own process group, killed
- whole when the command ends or times out.
-- Durations are accepted everywhere (`90s`, `30m`, `2h30m`; a bare number is
- seconds).
-- `scope.editable` and `scope.frozen` can be combined: editable minus frozen
- (0.1.1 refused both).
-
-### Fixed
-
-- A gate, observe or stop command that leaves a background process holding
- its output (`./server & curl ...`) ends when its shell exits, with the
- shell's exit code; it waited for its whole timeout and was reported as timed
- out.
-- A JSON line from the agent that isn't an object (a wrapper script's `0` on
- stderr) is shown as output; for Claude Code and OpenCode it ended the run
- with a Python error. Any error while an agent runs now kills its process
- group: the agent kept running, past its timeout.
-- A failed command's output in the record and the prompt is its last 15
- lines, each cut at 500 characters: one long line (a JSON dump) made the
- prompt too large to start the agent, and every resume failed the same way.
-- Files the agent writes outside the scope (a dataset, a checkpoint) are no
- longer hashed into your repository's objects at each freeze, and the record
- and the next prompt list at most 20 discarded paths, frozen ones first
- (`discarded_more` counts the rest). An unreadable file outside the scope is
- now discarded instead of rejecting the iteration.
-- A setup that can't work stops the run at the baseline, before any agent call
- is paid for, with a setup error naming the gate and its last stderr line: a
- gate command that exits 126 or 127 (not executable, not found; unless its
- first word is a file the agent may write and git doesn't ignore), and an `ask:` gate that exits 2
- (no answer). Each iteration used to be paid for and rejected the same way.
-- Every `resume` checks that the agents' executables can be found, as the
- first `run` does; a missing one cost an iteration.
-- A custom prompt template that names a variable the prompt doesn't have, or
- the old `.autohelix/` copy paths, or fails to render against a sample
- history, is a config error, so `run --check` finds it. A misspelt variable
- rendered empty (the agent got no goal), and a render error failed iteration
- 1 after the baseline, in a run that couldn't take the fix. A run whose
- stored template has one of these problems no longer resumes: continue from
- it with `autohelix run --import ` after fixing the template.
-- A damaged line in an old run's `history.jsonl` no longer stops new runs of
- its config; that run's own commands name the line and what works (fix or
- remove it, or `autohelix archive`), where `report` and `resume --until`
- ended in a traceback. A blank line resumes, as it views.
-- `delete` without `--force` refuses a run whose tip is on no branch, tag or
- remote-tracking branch: a run that read landed after its target was reset
- was deleted with the only ref to its commits. `land` says when it did
- nothing (already there, nothing accepted, landed before) instead of
- "Landed".
-- Bare `land` and `report` take the most recently active run that isn't
- running: they took the running run, which refuses them.
-- The refusal of a changed config gives the landing first, then the `run
- --import` command, a line each: a new run started first lacked the code.
-- A config name given where a run id goes (`land perf`) names the config's
- latest run; an unknown id lists the latest real ids instead of "e.g. k3f9".
-- After a failed first baseline, the end block, `view --terminal` and the
- entry screen suggest `autohelix run ` (and `autohelix delete `),
- as the error does, not `resume`, which refuses the fixed setup. `view
- --json` runs have `baseline`.
-- An interrupted baseline is recorded as "baseline interrupted", not
- "baseline failed: " with nothing after it.
-- One set of numbers for a run on every screen: `run`'s baseline row has its
- judges' cost, as `view` shows it; the run page's time counts the baseline, as
- the run list's does (`view --json` gives the baseline's `seconds`); `view`'s
- Budget names the run totals it shows (`to iteration 8 · $5.04 run total`)
- and the time used of `--time` as the web pages do (`12m 05s of 1h (this
- segment)`; the web pages write `12m5s`); an incomplete cost is `$0.07+` everywhere (was `$0.07
- (incomplete)` on `run` and the run page); a resumed segment's `landed` says
- `(this segment)`.
-- The run page words the phase as the console does (`gates`, `observe ·
- bench`), not "Running gates…" or "accept…".
-- A stopped run's `view --terminal` waits for `autohelix resume `, not
- "the next run" (a new run never shows there).
-- The run page and report.html no longer show a stored config or template
- that is a symlink (read as the rest of run state is).
-- `resume`'s refusal of a changed config names the field and the entry
- (`agent.timeout`, `gates entry 2`, `observe bench (added)`), not only
- `agent` or `observe`; for files added to the experiment folder it says to
- remove them, not to restore them.
-- The config template's `model: opus` is commented out: a user who changed
- only `cli:` kept a Claude model name for Codex or OpenCode.
-- `run --help` forks from a run's code on a branch (`git switch -c
- autohelix/`), not a detached checkout, which can't land.
-- A timed-out agent call's error reads `timed out after 30m`, as a timed-out
- command's does (was `timed out after 30 minutes`).
-- A second `autohelix view` on a port in use names the page to open in the
- one already serving, or `--port 0`, instead of "Address already in use".
-- When no cost is known for a run and all its calls give the same reason, the
- end says it (`cost unavailable: set agent.model` for Codex, whose output names
- no model).
-- An OpenCode `error` event (an invalid key) fails the call, the main agent's
- or a judge's: OpenCode exits 0 after one, which read as a successful call
- that changed nothing.
-- A Claude Code call whose session ended several turns (it went on after its
- answer, when a background task ended) counts every turn's tokens and time;
- only the last turn's were recorded.
-- A flag in `agent.extra_args` that takes several values (Claude Code's
- `--disallowedTools X`) no longer takes the prompt: every agent command ends
- with `--` and the prompt.
-- The main Claude Code agent gets `--disallowedTools ScheduleWakeup`: a
- pending wakeup kept `claude -p` running for up to 15 minutes after its
- answer. A `--disallowedTools` of your own in `extra_args` still applies.
-- A Claude Code `--settings` in `agent.extra_args` no longer drops AutoHelix's
- time-left hooks (Claude Code reads only the last `--settings`): AutoHelix
- merges your settings and its hooks into one file. A value that can't be read
- is a config error.
-- A rejection because a gated metric's observe entry failed names the entry
- and how it failed (`metric gate: score was not measured (observe bench
- exited 2)`), and the next agent gets the tail of its output, as for a failed
- gate command.
-- A commit subject cut at 200 characters has the agent's whole first line in
- the commit body.
-- The prompt shows at most the last 8,000 characters of the hints, with a line
- saying earlier ones are in `.autohelix-iteration/hints.md`.
-- Commands and agents get Ctrl-C (SIGINT) and SIGQUIT at their defaults in a
- run a script started in the background (`nohup autohelix run ... &`).
-- `agent.timeout` kills an agent whose child closed its output but kept
- running.
-- Agent output in the live panels is sanitised (terminal escape sequences).
-- "Not a git repository" is recognised in any locale.
-- A nested git repository in the project is refused with "nested git
- repository at X: remove its .git or clone outside the project".
-- Rich markup in a goal (`[/bold]`) no longer crashes `--verbose`.
-- The examples run as written: Docker's steps name the AutoHelix checkout and
- `run.sh` refuses a missing `--env` script; autoresearch's polite stop names
- the run; AlgoTune's collector reads `base_commit`; kernelbench and
- autoresearch commit without a git identity and autoresearch's setup reruns;
- kernelbench's model is `opus` (its published Bedrock id is a comment), and
- autoresearch's Bedrock id says the example runs on Bedrock.
+- **Budgets on the command line**: `-n`, `--until`, `--cost` and `--time`,
+ per `run` or `resume` (1 iteration without any). Cost tracking covers the
+ agent, the judges, the summary, and model calls a command records in
+ `$AUTOHELIX_USAGE_FILE`.
+- **`run --check`** makes every check before anything is written or spent.
+- **Groups** (`run --group NAME`): runs that share notes and code.
+ **`run --import ID`**: a new run that reads another run's notes, history
+ and code.
+- **A summary at the end of each segment**: `report.md` and `report.html`
+ (`--no-report` skips it).
+- The skill and the user docs ship in the package (`autohelix docs` prints
+ the docs' folder); `docs/patterns.md` has a starting config for each kind
+ of goal.
### Upgrading from 0.1.1
-1. **Rewrite the config** with the new keys (the table below); move `budget:`
- to the command line: `budget.iterations` (and an old `-n`) is `--until`,
- `budget.cost` / `budget.time` are `--cost` / `--time`, now per command.
- `autohelix run --check` reports every old key with its replacement.
-2. **Move `autohelix.yaml` to `autohelix//config.yaml`**, a folder
- named for the experiment (`mkdir -p autohelix/perf && mv autohelix.yaml
- autohelix/perf/config.yaml`), and run it with `autohelix run ` (or a
- bare `autohelix run` while it is the only one); there is no `-c`.
- - A `prompt_template:` is relative to the config's folder: move the
- template with it.
- - If `autohelix.yaml` was committed, commit its removal: the first baseline
- needs no uncommitted changes to tracked files. Commit the new folder to
- share it, or keep `autohelix/` private
- ([Where configs live](docs/concepts.md#where-configs-live)).
- - With a development build's experiment folders, rename each
- `autohelix//autohelix.yaml` to `config.yaml`.
- - A `/autohelix.yaml` line in `.git/info/exclude` (a private top-level
- config) can go: `/autohelix/` covers the folder.
-3. **Set `AUTOHELIX_CLAUDE_CODE_CMD`** instead of `AUTOHELIX_CLAUDE_CMD`
- (a set `AUTOHELIX_CLAUDE_CMD` is an error), and use the variables instead
- of `agent.command`.
-4. **No `init`**: run bare `autohelix` in a terminal (an agent
- drafts the config), or start from an example or the packaged template.
-5. **No `watch`**: `autohelix view` is the web page (the old
- `.autohelix/output/dashboard.html` is no longer written); `view --terminal`
- follows a run.
-6. **Old runs can't be resumed**: move or delete `.autohelix/`, run
- `git worktree prune`, and start a new run. If you used `parallel`, remove
- its worktrees and branches too, once you have merged what you want to keep:
- `git worktree remove ../-parallel/worker-N` and
- `git branch -D parallel/worker-N` for each worker.
-7. **A custom prompt**: move it beside the config, set `prompt_template:`,
- change its `.autohelix/` paths to `.autohelix-iteration/`, and rename its
- variables ([the table below](#prompt-template-variables)).
-8. **Print metrics as `##autohelix[name=value]`** lines.
-
-Each old key is an error naming its replacement; there are no aliases.
-
-| Old | New | Error message |
-|---|---|---|
-| `constraints:` | `gates:` (commands, unchanged) | `` `constraints:` is now `gates:` `` |
-| `metrics:`, `observables:` | `observe:`, every entry with a `name:` | `` `metrics:` is now `observe:` (each entry needs a `name:`; `values:` is now `metrics:`) `` |
-| `values:` in an entry | `metrics:` in an `observe:` entry | `` `values:` is now `metrics:` `` |
-| `capture_stdout:` | removed: stdout is always saved | `` `capture_stdout:` is gone: stdout is always saved; remove it `` |
-| `acceptance.metric_gates` (`max_regression_pct`) | `gates:` entry `metric:` with `regress: N%` (vs the last accepted iteration, not the best) or `improve: N%` | `` `acceptance:` is now a `gates:` entry: ... `` |
-| `reviewer:` | an `observe:` entry with `name:` and `review:`; OpenCode can't be a judge, so with `agent.cli: opencode` the entry needs `agent: {cli: claude-code}` (or `codex`) | `` `reviewer:` is now an `observe:` entry with `name:` and `review: ` `` |
-| `reviewer.model`, `reviewer.timeout_seconds` | `agent:` and `timeout:` on the review entry | |
-| `agent.type` | `agent.cli` (`claude` is `claude-code`) | `` `agent.type` is now `agent.cli` (claude-code, codex or opencode) `` |
-| `agent.reasoning_effort` | `agent.effort` | `` `agent.reasoning_effort` is now `agent.effort` `` |
-| `agent.command` | `$AUTOHELIX_CLAUDE_CODE_CMD`, `$AUTOHELIX_CODEX_CMD`, `$AUTOHELIX_OPENCODE_CMD` | `` `agent.command` is gone: set AUTOHELIX_CLAUDE_CODE_CMD, ... `` |
-| `$AUTOHELIX_CLAUDE_CMD` | `$AUTOHELIX_CLAUDE_CODE_CMD` | `AUTOHELIX_CLAUDE_CMD is now AUTOHELIX_CLAUDE_CODE_CMD: ...` |
-| `agent.settings` | `agent.extra_args` | `` `agent.settings` is gone: pass the CLI's own options in `agent.extra_args` `` |
-| `agent.require_notes` | ask for notes in the goal or the prompt template | `` `agent.require_notes` is gone: ... `` |
-| `agent.timeout_seconds` | `agent.timeout` (a duration) | `` `agent.timeout_seconds` is now `agent.timeout` (a duration such as 30m) `` |
-| `budget:` (`iterations`, `cost`, `time`) | the `run`/`resume` flags `--until` (a run total, as `iterations` was), `--cost` and `--time` (per segment, where they counted the whole history); see [CLI → Budgets](docs/cli.md#budgets) | `` `budget:` moved to the command line: `autohelix run --until N --cost USD --time DURATION` (also `resume`; ...) `` |
-| `budget.iteration_time` | `agent.timeout` (always a hard kill, with time-left hints) | as `budget:` |
-| `timeout:` in seconds | durations everywhere (a bare number, or a string of digits like `"90"`, is still seconds) | |
-| `.autohelix/prompt.md` | `prompt_template:` (relative to the config) | a warning at run start |
-| `-c/--config FILE` on `run`, `report` | the config at `autohelix//config.yaml` and `autohelix run ` (a bare `run` with one experiment); `resume ` uses the run's own | `No such option '-c'.` |
-| the `init [PATH]` command | bare `autohelix` in a terminal (an agent drafts the config; by hand: the examples in docs/config.md and the template it names) | `No such command 'init'.` |
-
-#### Prompt template variables
-
-For a custom `prompt_template:`. Each old name is a config error: `worktree`
-names its new name, the others are listed as variables the prompt doesn't have.
+1. **Rewrite the config** with the new keys (the table below);
+ `autohelix run --check` names every old key and its replacement. Metrics
+ come only from `##autohelix[name=value]` lines on stdout.
+2. **Move it to `autohelix//config.yaml`** and run it with
+ `autohelix run `. If `autohelix.yaml` was committed, commit its
+ removal.
+3. **Budgets are flags, per command**: `budget.iterations` is `--until`, and
+ `budget.cost` and `budget.time` are `--cost` and `--time`. `-n N` now runs
+ N more iterations.
+4. **Start fresh**: 0.1.1's state can't be resumed. Move or delete
+ `.autohelix/` and run `git worktree prune`; after `parallel`, also remove
+ its worktrees and `parallel/worker-N` branches.
+5. **Removed commands**: `init` (bare `autohelix`), `clear` (`archive`,
+ `delete`), `parallel` (`run --group`), `watch` (`view --terminal`).
+6. **A custom prompt**: `.autohelix/prompt.md` is no longer read. Move it
+ beside the config and set `prompt_template:`. Change its `.autohelix/`
+ paths to `.autohelix-iteration/`, and its variables to the current ones
+ ([Concepts → Prompt](docs/concepts.md#prompt); `run --check` names any it
+ doesn't know).
| 0.1.1 | Now |
|---|---|
-| `worktree` | `copy` (an error: `` `worktree` is now `copy` ``) |
-| `history_summary` | `history` (one line per recent iteration) |
-| `constraints` (commands) | `gates` (`{text, kind}`; `text` is the command, or what a metric gate compares) |
-| `observables` (`{command, metric_labels}`) | `observe` (`{name, kind, metric_labels}`, plus `command` or `prompt`) |
-| `iteration_time` | `time_limit` (from `agent.timeout`) |
-| `has_hints` | `hints` (the file, when there are hints) or `hints_text` (their text) |
-| `peers` | `group` and `group_runs` (`run --group`) |
-| `has_reviewer` | none: reviews are `observe` entries with `kind` `review` |
-
-`goal`, `iteration`, `editable` and `frozen` keep their names (`frozen` now
-includes the config and template files). The full list is in
-[Concepts → Prompt](docs/concepts.md#prompt).
+| `constraints:` | `gates:` |
+| `metrics:`, `observables:` | `observe:`, each entry with a `name:` (its `values:` is `metrics:`) |
+| `capture_stdout:` | removed: stdout is always saved |
+| `acceptance.metric_gates` | a `- metric: NAME` gate with `regress: N%` or `improve: N%`, compared with the last accepted iteration (was the best), no default |
+| `reviewer:` | an `observe:` entry with `name:` and `review:` (`model`, `timeout_seconds`: the entry's `agent:` and `timeout:`); OpenCode can't be a judge |
+| `agent.type` | `agent.cli` (`claude` is `claude-code`) |
+| `agent.reasoning_effort` | `agent.effort` |
+| `agent.command`, `$AUTOHELIX_CLAUDE_CMD` | `$AUTOHELIX_CLAUDE_CODE_CMD`, `$AUTOHELIX_CODEX_CMD`, `$AUTOHELIX_OPENCODE_CMD` |
+| `agent.settings` | `agent.extra_args` |
+| `agent.require_notes` | ask for notes in the goal or the prompt template |
+| `agent.timeout_seconds`, `budget.iteration_time` | `agent.timeout`, a duration (`30m`) |
+| `budget:` | the `run`/`resume` flags (step 3) |
## 0.1.1 — 2026-09-02
diff --git a/CLAUDE.md b/CLAUDE.md
index 0a0a792..00fb22f 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -96,7 +96,7 @@ User-facing docs are plain markdown in `docs/` (see `docs/README.md` for the ind
## Architecture Notes
-- Entry points: bare `autohelix` (`cli._entry`, only when stdin and stdout are TTYs, `cli._interactive`; else the help and "Run `autohelix` in a terminal to start." on stderr, exit 2) shows the project (`cli.entry_project`: `runs.find_project`'s folder when it has runs, else the nearest folder up from here with a config, else the git top level; outside a checkout it says so, `_git_problem`, and offers nothing, exit 1): a header (`run_table.entry_header`, drawn before the runs are read), the runs table (`run_table.entry_lines`, `table_lines`, one line per run), one suggested command per run (`run_table.suggestion`), the archived count and the `--help` footer, then one question: with one agent CLI found (`_found_agents`), `cli.entry_question` ("Start Claude Code with AutoHelix?", Enter/q, `menu.confirm`); with several, a menu of them (`cli.ENTRY_TITLE`, `menu.choose`); both drop keys typed before them; q or Esc raises `menu.Quit`, exit 0; Ctrl-C exits 130. It execs one agent session (`_agent_argv`, Claude Code/Codex/OpenCode, never `mock`) with the bundled skill and `cli.first_prompt` (`autohelix/README.md`, the coordinator's notes, when present; runs, configs, the pick, AutoHelix's CLI, Python and docs: `cli.docs_dir`, the package's `autohelix/docs` that pyproject force-includes from docs/, else the checkout's). There is no setup command. `autohelix run [NAME]` finds the config (`config.find_config`: an experiment folder's `autohelix/NAME/config.yaml`, `config.experiment_config`; without NAME the only one, several are named; `config.project_configs`; a folder without `config.yaml`, a dot-folder or a `.yaml` file directly in `autohelix/` isn't a config), creates `.autohelix/` on first use and starts the harness loop.
+- Entry points: bare `autohelix` (`cli._entry`, only when stdin and stdout are TTYs, `cli._interactive`; else the help and "Run `autohelix` in a terminal to start." on stderr, exit 2) shows the project (`cli.entry_project`: `runs.find_project`'s folder when it has runs, else the nearest folder up from here with a config, else the git top level; outside a checkout it says so, `_git_problem`, and offers nothing, exit 1): a header (`run_table.entry_header`, drawn before the runs are read), the runs table (`run_table.entry_lines`, `table_lines`, one line per run), one suggested command per run (`run_table.suggestion`), the archived count and the `--help` footer, then one question: with one agent CLI found (`_found_agents`), `cli.entry_question` ("Start Claude Code with AutoHelix?", Enter/q, `menu.confirm`); with several, a menu of them (`cli.ENTRY_TITLE`, `menu.choose`); both drop keys typed before them; q or Esc raises `menu.Quit`, exit 0; Ctrl-C exits 130. It execs one agent session (`_agent_argv`, Claude Code/Codex/OpenCode, never `mock`) with the bundled skill and `cli.first_prompt` (`autohelix/README.md`, the coordinator's notes, when present; runs, configs, the pick, AutoHelix's CLI and docs: `cli.docs_dir`, the package's `autohelix/docs` that pyproject force-includes from docs/, else the checkout's). There is no setup command. `autohelix run [NAME]` finds the config (`config.find_config`: an experiment folder's `autohelix/NAME/config.yaml`, `config.experiment_config`; without NAME the only one, several are named; `config.project_configs`; a folder without `config.yaml`, a dot-folder or a `.yaml` file directly in `autohelix/` isn't a config), creates `.autohelix/` on first use and starts the harness loop.
- Iteration isolation: `iteration.py` runs every phase in its own fresh `workspace.Copy` (agent, checks, each review, stop; baseline and report too): a private folder holding one tree, with its own `.git` borrowing the user's objects via alternates. The harness reads copies only from outside through `Repo` and a harness index kept in a private per-process folder; it never runs git inside a copy after a call used it. The agent copy is frozen to a tree T (pinned at `refs/autohelix-tmp/`); checks run on a fresh copy of T with HEAD at A and T's files verified after every command (checks, stop and report copies are `watched`: fingerprinted for `Copy.changed()`; agent and judge copies aren't); accept commits exactly T on A (`commit-tree`, no hooks), CAS-updates `refs/autohelix/`, and records history in a deferred-SIGINT section. A no-op is accepted without a commit. A rejected attempt's T (also after a failed or timed-out agent call) is kept as `refs/autohelix-rejected//` (`keep_rejected`; removed by `delete`), and the next agent copy gets the latest rejection's `base..T` (`workspace.diff_args`, independent of the user's git config) as `rejected.patch` (over 2 MiB: none, the prompt's `rejected_diff` names the `git diff`). An attempt whose T equals its base keeps no ref. Run segments land separately on the target branch.
- Evaluation (`harness._evaluate`; user docs in `docs/config.md`): gate commands in list order (first failure rejects; `ask:` entries render to `autohelix ask [flags] -- Q`), then `observe:` entries top to bottom (`review:` entries render to `autohelix review [flags] -- P`); after each entry, the metric gates on its metrics, compared with the last accepted commit-creating record (`checks.metric_reference`). A failed observe entry is recorded and contributes no metrics; a missing gated metric fails. The baseline runs everything and rejects nothing; a missing command metric is a setup error, and so is a gate that can't work (`Harness._unworkable_gate`: a command gate exiting 126/127 unless its first word is a path the agent may write and git doesn't ignore, `_agent_may_write`; an `ask:` gate exiting 2), naming the gate and its last stderr line. Metrics come only from `##autohelix[name=value]` lines on stdout, by name (`checks.parse_structured_metrics`). Unknown top-level keys and old config keys are errors (`config.RENAMED_TOP_LEVEL_KEYS`, `agents.RENAMED_AGENT_KEYS`, `agents.RENAMED_CLIS`, `config.RENAMED_ENTRY_AGENT_KEYS`); agent values are type-checked (`agents.agent_string`, `agents.cli_value`); `agent:` is `cli` (claude-code, codex, opencode; hidden `mock`, whose test knobs are `agent.mock:`), `model`, `effort` (both passed through), `timeout`, `extra_args`, `auto_memory`; a `prompt_template:` is a config error (`prompt_template.template_problem`) when it doesn't parse, names a variable not in `VARIABLES` or the old `.autohelix/` copy paths (`uses_old_layout`), or fails to render against `SAMPLE_RECORDS` after each of their iterations (`_sample_variables`, a temporary folder; docs/phases.md's prompt is rendered from the same sample); one that fails to render in a run still raises naming it. `run --check` is `Harness(check_only=True)`: every refusal before the first write, then `run`'s start notices (`Harness._check_notices`: `runs.new_run_notices` and, landing automatically, `_uncommitted_config` over the files `snapshot_files` would store), then nothing; its OK line names the command with `--import`/`--group`/`--land`. A damaged history line raises `runs.damaged_history` (run, line, what works) from `History.load` and `repair_history` alike (which skip blank lines); readers across runs (`_resumable`, `new_run_notices`) take it as no baseline (`has_baseline(paths, damaged=False)`). Preflight (`checks.preflight_check`, before the baseline; at a later segment's start only its agent part, `checks.agent_issues`) finds every agent the config runs (`Config.agent_commands`: the main agent, each `ask:`/`review:` judge, resolved like `judge.judge_config`) with `agents.command_path` (`$AUTOHELIX_CLAUDE_CODE_CMD` / `_CODEX_CMD` / `_OPENCODE_CMD`, else `claude`/`codex`/`opencode` on PATH; never the config), the backends' own resolver, and warns about a gate/observe/stop command naming an `autohelix/` path that exists in the working tree but not in HEAD (`checks.uncommitted_command_paths`, textual, `./autohelix/` too, so a run ref `autohelix/` stays quiet; `ask:`/`review:` entries skipped: a judge reads `experiment/`; advice `$AUTOHELIX_EXPERIMENT/...`, `$AUTOHELIX_EXPERIMENT` for the folder itself); bare `autohelix` starts `agents.executable`. A set `AUTOHELIX_CLAUDE_CMD` is a `ConfigError` from the one check in `agents.executable` (`variable_problem`'s message), wherever an executable is resolved: a backend resolves its own when created (`create_agent`; so `Harness.__init__`, the report, a judge call), preflight, the entry screen; each command reports it as a config error (`cli._start`, `report`, `ask`/`review` exit 2, the entry screen's warning). `ask`/`review` take `--cli`/`--model`/`--effort` (`cli._judge_options`; `--agent`/`--command` are hidden errors).
- Copy location: copies live outside the project, at `/-//iter-N-`, where base is `$AUTOHELIX_COPIES_ROOT` or `${XDG_CACHE_HOME:-~/.cache}/autohelix/copies` (`runs.copies_base()`). `runs.claim_copies()` fixes the folder for a process under the run lock (created on first use by `ensure_copies`: private 0700, owned, no symlinks below the base; a shared base must be sticky), base recorded in `runs//.internal/copies` for observers (`RunPaths.copies`), `GIT_CEILING_DIRECTORIES` set there. Segment end, standalone report and delete remove it; the project's folder stays with a `project.json` record (path, host) so `runs.sweep_copies()`, at the start of every `run`/`resume`, can remove leftovers of killed processes (runs whose lock is free) and other projects' folders whose checkout is gone (same host, over a day old). The root `conftest.py` points the base at a temporary folder for every test, examples included.
diff --git a/README.md b/README.md
index 9fab034..3a5ec86 100644
--- a/README.md
+++ b/README.md
@@ -29,8 +29,8 @@
## Quickstart
-In your project (a git repository), with its environment active and Claude Code, Codex or
-OpenCode installed:
+In your project (a git repository, git 2.29 or newer), with its environment active and
+Claude Code, Codex or OpenCode installed:
```bash
pip install git+https://github.com/awslabs/AutoHelix.git
@@ -39,11 +39,12 @@ pip install git+https://github.com/awslabs/AutoHelix.git
**1. Set up.**
```bash
-autohelix
+autohelix skill install --agent claude-code --scope user # once (or codex, opencode)
```
-An agent session opens and helps you turn your goal into a protocol: it looks at your
-project, proposes the checks and what to measure, and saves the file once you agree.
+Then ask your agent "Use AutoHelix to improve [goal]", in any app, IDE or terminal session.
+In a terminal, `autohelix` starts one with the skill directly. The agent looks at your
+project, proposes the checks and what to measure, and saves the protocol once you agree.
**2. Run.** The setup agent ends by suggesting a command and budget, for example:
@@ -56,17 +57,15 @@ branch when the run ends. With `--land manual` they wait until you run `autoheli
for example to review them first or to compare several runs. `autohelix resume` continues
a run later.
-**3. Follow it.**
+**3. Ask and follow.** Ask your agent about the runs: it reads them, answers questions and
+suggests what to try next. To watch them live:
```bash
autohelix view --open
```
-The web view lists all of the project's runs, live. Open one to see its metrics, diffs,
-notes and costs, iteration by iteration.
-
-**4. Ask about it.** Run `autohelix` again any time: it lists your runs and opens an agent
-that can read them, answer questions and suggest what to try next.
+The web view lists all of the project's runs. Open one to see its metrics, diffs, notes and
+costs, iteration by iteration.
## How it works
@@ -141,8 +140,8 @@ was given.
AutoHelix records every attempt: its diff, cost, metrics and gate results, why it was
rejected and the reviews it got. It's all plain files in `.autohelix/runs//`, which the
-web view shows and the `autohelix` agent reads when you ask about a run. When the run ends, an agent reads the record and writes a report of what
-was tried, what worked and what it cost.
+web view shows and your agent reads when you ask about a run. When the run ends, an agent
+reads the record and writes a report of what was tried, what worked and what it cost.
In the terminal, each iteration is a row with its time, cost and metrics:
@@ -157,29 +156,43 @@ models:
-## Why not just a loop?
+## What you can use it for
+
+The goal can be anything that can be checked, either with a script or with an agent:
+
+| | Pass or fail | Better or worse |
+|---|---|---|
+| **Checked by a script** | Fix a failing test, finish a Lean proof | Speed up code, raise a model's accuracy, cut an agent's cost ([sorting](examples/sorting), [AlgoTune](examples/algotune), [KernelBench](examples/kernelbench), [posttrain](examples/posttrain), [autoresearch](examples/autoresearch), [workflow-optimization](examples/workflow-optimization)) |
+| **Checked by an agent** | Implement every item of a spec, with a reviewer tracking what's missing ([task-queue](examples/task-queue)) | Improve research or writing, with a reviewer saying what to improve next ([research](examples/research), [writing](examples/writing)) |
+
+The agent proposes changes toward the goal. Gates are the constraints the result must meet
+for a change to be kept: the tests still pass, the public API stays the same, accuracy
+doesn't drop. It's constrained optimization, checked by scripts or agents.
+
+## Why not a simple loop?
-A `while` loop around `claude -p` takes a few lines to write. Here's what such a loop
-usually gets wrong, and what AutoHelix does instead:
+A `while` loop around `claude -p` is easy to write. Here are some things a loop can get
+wrong, and what AutoHelix does instead:
| A homemade loop | AutoHelix |
|---|---|
-| Tests pass in the agent's working folder, with files that never get committed. | The gates run on a fresh copy of exactly the tree that will be committed. |
| The agent quietly edits the tests or the benchmark until they pass. | Only files in scope can change, and the config and its checks are frozen. |
+| Tests pass in the agent's working folder, with files that never get committed. | The gates run on a fresh copy of exactly the tree that will be committed. |
+| It stops when the agent says it's done. | It stops when your budget runs out, or when a stop condition you wrote says so. |
| A failed attempt is thrown away, along with what it learned. | Its patch goes to the next iteration, and the agent's notes survive rejections. |
| The context fills up, and compaction drops the important part. | Every iteration is a fresh session; what carries over is files: code, notes and results. |
| You come back to a branch in an unknown state. | Your checkout isn't touched until checked work lands. |
| Finding out what happened overnight, and what it cost, means digging through logs. | Every attempt's metrics, diff, notes and cost are in a live web view, and a report sums up the run. |
-| It stops when the agent says it's done. | It stops when your budget runs out, or when a stop condition you wrote says so. |
-**Compared with Ralph loops, `/goal` or autoresearch.** These share the basic idea of
+**Compared with Ralph loops, `/goal` or autoresearch.** These all share the basic idea of
keeping an agent working toward one goal. Ralph and `/goal` work toward a goal that is
-either met or not (tests pass, a feature is done); autoresearch pushes a number (loss). A protocol covers both: gates for what must hold, metrics for what should improve,
-and a stop condition for when it's done. The bigger difference is who decides what counts
-and what gets kept: the checks run outside the agent, on an isolated copy of exactly its
-change; the protocol is one file, committed with your code, that anyone can rerun; and
-every attempt is recorded, whether it was kept or not, so you can follow a run, pick it up
-later and compare it with other runs.
+either met or not (tests pass, a feature is done); autoresearch pushes a number (loss). A
+protocol is one general pattern that covers both: gates for what must hold, metrics for
+what should improve, and a stop condition for when it's done. Another difference is who
+decides what counts and what gets kept: the checks run outside the agent, on an isolated
+copy of exactly its change. And the protocol is one file, stored with every run, and every
+attempt is recorded, whether it was kept or not, so you can follow a run, pick it up later
+and compare it with other runs.
**Compared with subagents and multi-agent workflows.** These work at a different level, and
the two combine well: a workflow decides how a single attempt is made, while AutoHelix
@@ -187,40 +200,14 @@ decides what happens between attempts. The agent in each iteration is a full Cla
Codex or OpenCode session, so it can use subagents and skills as usual. What changes is that
it doesn't check its own work, since the gates run outside it, on the frozen change.
-## More features
-
-| | |
-|---|---|
-| **Agent judges** | Read-only agents check, review or track progress on exactly the candidate: `ask:` gates answer a yes/no question, `review:` entries write feedback for the next iteration, and a review that sees its previous verdict keeps an independent count of what's left in a spec. Judges can use a different agent or model from the main one. [→](docs/concepts.md#reviews) |
-| **Resume** | Continue a run later, with its stored protocol and a new budget. [→](docs/cli.md#autohelix-resume) |
-| **Steer** | `hint` sends the running agent a note for its next iteration; `stop` ends the run after the current one. [→](docs/cli.md#autohelix-hint) |
-| **Groups** | Parallel runs in a group read each other's notes and accepted code at every iteration, so they can build on each other's work. [→](docs/cli.md#groups) |
-| **Docker sandbox** | Optionally run the agent in a container with no access to your home directory or other projects. [→](docs/docker.md) |
-
-For everything else, see the [CLI](docs/cli.md) and [configuration](docs/config.md) references.
-
-## What you can use it for
-
-The goal can be anything you can check, with a script or with an agent:
-
-| | Pass or fail | Better or worse |
-|---|---|---|
-| **Checked by a script** | Fix a failing test, finish a Lean proof | Speed up code, raise a model's accuracy, cut an agent's cost ([sorting](examples/sorting), [AlgoTune](examples/algotune), [KernelBench](examples/kernelbench), [posttrain](examples/posttrain), [workflow-optimization](examples/workflow-optimization)) |
-| **Checked by an agent** | Implement every item of a spec, with a reviewer tracking what's missing ([task-queue](examples/task-queue)) | Improve research or writing, with a reviewer saying what to improve next ([research](examples/research), [writing](examples/writing)) |
-
-Gates add the constraints. Whatever the goal, a change is kept only if it passes them: the
-tests still pass, the public API stays the same, accuracy doesn't drop. In the sorting run
-at the top, the speedup is the goal and pytest is the constraint. It's optimization under
-constraints, with scripts or agents checking both.
-
## Results
-**Iterating beats resampling.** On 30 random [AlgoTune](https://github.com/oripress/AlgoTune)
+**AlgoTune.** On 30 random [AlgoTune](https://github.com/oripress/AlgoTune)
tasks, each AutoHelix iteration turned more agent spend into more speedup, while the best of
up to five independent attempts leveled off and a Claude Code `/goal` session stopped on its
own near the AutoHelix curve. Scored on held-out instances, five iterations were faster than
the best of five attempts on all 30 tasks and faster than `/goal` on 27
-([setup, audit and per-task results](examples/algotune)).
+([details](examples/algotune/README.md)).
@@ -229,28 +216,12 @@ the best of five attempts on all 30 tasks and faster than `/goal` on 27
-On 270 [KernelBench](https://github.com/ScalingIntelligence/KernelBench) tasks, median
-speedup rose with every iteration, to 3.12× after five (earlier harness version, Claude
-Opus 4.8).
-
-
-
-
-
-**An open-ended goal, one H200.** Asked to post-train `Qwen3-4B-Base` on GSM8K with no
-method prescribed, the agent went from supervised fine-tuning through rejection sampling
-to GRPO, reaching **93%** in 8 iterations ([posttrain](examples/posttrain)).
-
-
-
-
-
-**Three loops, same budget.** On Karpathy's [autoresearch](https://github.com/karpathy/autoresearch)
+**Autoresearch.** On Karpathy's [autoresearch](https://github.com/karpathy/autoresearch)
(lower val_bpb of a small GPT trained for five minutes), AutoHelix, Claude Code `/goal` and
autoresearch's own `program.md` loop got the same model (Claude Opus 5.5), up to 60
experiments and the same trusted scorer, two runs each, each run isolated in its own
container. Both AutoHelix runs ended 4.8% below the baseline on a held-out shard, for
-$27–36; `/goal` 4.3% for $36–37; `program.md` 2.3% for $20–45 ([autoresearch](examples/autoresearch)).
+$27–36; `/goal` 4.3% for $36–37; `program.md` 2.3% for $20–45 ([details](examples/autoresearch/README.md#comparing-loops)).
@@ -259,16 +230,26 @@ $27–36; `/goal` 4.3% for $36–37; `program.md` 2.3% for $20–45 ([autoresear
-**In the wild.** In [Hybrid Model Factory](https://github.com/awslabs/hybrid-model-factory),
-the agent developed a state-passing sequence-parallelism implementation: ~5× faster per
-layer and 1.6× faster end-to-end training at 128K sequence length on a 27B model.
+## More features
+
+| | |
+|---|---|
+| **Agent judges** | Read-only agents judge exactly the candidate. Add as many as you like, each with its own question, agent and model: `ask:` gates for what must hold, `review:` entries for what to fix next. A review that sees its previous verdict keeps an independent count of what's left in a spec. [→](docs/concepts.md#reviews) |
+| **Any feedback** | An observe entry keeps a command's whole output and any files it names (`capture: [results/plots/]`), and the next agent reads them: profiles, logs, plots, failing cases, not just numbers. [→](docs/config.md#observe) |
+| **Continue** | `resume` continues a run with its stored protocol and a new budget. After you change the protocol, `run --import ID` starts a new run whose agent reads the old run's notes, history and code. [→](docs/cli.md#autohelix-resume) |
+| **Steer** | `hint` sends the running agent a note for its next iteration; `stop` ends the run after the current one. [→](docs/cli.md#autohelix-hint) |
+| **Groups** | Parallel runs in a group read each other's notes and accepted code at every iteration, so they can build on each other's work. [→](docs/cli.md#groups) |
+| **Scripts and agents** | `wait` blocks until a run event and prints it as JSON, and `view --json` gives every run's state, so a script or an agent can launch and supervise runs. [→](docs/cli.md#autohelix-wait) |
+| **Docker sandbox** | Optionally run the agent in a container with no access to your home directory or other projects. [→](docs/docker.md) |
+
+For everything else, see the [CLI](docs/cli.md) and [configuration](docs/config.md) references.
## Limitations
-- **Your checks are the verdict.** The agent optimizes what you measure, and the more
- iterations you run, the harder it pushes on loopholes in your checks (reward hacking).
- AutoHelix makes gaming visible through diffs, notes, reviews and the report, and an
- `ask:` gate or a reviewer can look for it, but it can't make weak checks strong.
+- **Results are only as good as your checks.** The agent optimizes what you measure, so
+ it can find and use a loophole in your checks (reward hacking). Diffs, notes, reviews and
+ the run's summary make gaming visible, and an `ask:` gate can look for it, but weak checks
+ stay weak.
- **Copies are not a sandbox.** Each iteration's private copy protects your code from bad
attempts, not your machine from the agent, which runs with your permissions. Use the
[Docker mode](docs/docker.md) on machines with anything sensitive on them.
@@ -278,6 +259,7 @@ layer and 1.6× faster end-to-end training at 128K sequence length on a 27B mode
## Learn more
- [Getting started](docs/getting-started.md): install, agent setup, first run
+- [Patterns](docs/patterns.md): a starting config for each kind of goal
- [Concepts](docs/concepts.md): iterations, notes, reviews, progress tracking, groups
- [Configuration](docs/config.md): every field
- [CLI](docs/cli.md): every command
diff --git a/assets/README-pypi.md b/assets/README-pypi.md
index 11740a3..73e5286 100644
--- a/assets/README-pypi.md
+++ b/assets/README-pypi.md
@@ -1,10 +1,10 @@
# AutoHelix
-**Put an AI agent in a verified improvement loop.**
+**Run agents with protocols, not conversations.**
-Set gates and what to observe; an AI agent proposes changes in a loop, and only
-changes that pass your gates get merged. Works with Claude Code, Codex, and
-OpenCode.
+One file sets the goal, the checks and what to observe. An AI agent iterates on
+your code in private copies, and only changes that pass your gates are kept.
+Works with Claude Code, Codex and OpenCode.
```bash
pip install autohelix
diff --git a/assets/progression_posttrain_gsm8k.png b/assets/progression_posttrain_gsm8k.png
deleted file mode 100644
index 73375ec..0000000
Binary files a/assets/progression_posttrain_gsm8k.png and /dev/null differ
diff --git a/assets/steps_kernelbench.png b/assets/steps_kernelbench.png
deleted file mode 100644
index 5d25e17..0000000
Binary files a/assets/steps_kernelbench.png and /dev/null differ
diff --git a/docs/README.md b/docs/README.md
index 464eab4..4ba01e7 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,20 +1,21 @@
# AutoHelix Documentation
-**Autonomous iterative improvement harness.**
+**Run agents with protocols, not conversations.**
-AutoHelix runs AI agents in a loop — each iteration is isolated in private copies of the code, validated by its gates, and only accepted when they pass. What doesn't pass gets discarded; what the agent learns persists.
+One file sets the goal, the checks and what to observe. An AI agent iterates on
+your code in private copies, and only changes that pass your gates are kept.
-See the [main README](https://github.com/awslabs/AutoHelix/blob/main/README.md) for an overview, quick start, and the config reference.
+See the [main README](https://github.com/awslabs/AutoHelix/blob/main/README.md) for an overview and quick start.
## Guides
- **[Getting Started](getting-started.md)** — install, write a config (with your agent or by hand), run your first loop
- **[Patterns](patterns.md)** — a starting config for each kind of goal: a checked task, optimization, training a model, working through a spec, writing and research
-- **[Configuration](config.md)** — the full config surface (`autohelix//config.yaml`): gates, observe, stop, scope, agent (budgets are `run`/`resume` flags)
-- **[CLI Reference](cli.md)** — skill installation/export, bare `autohelix` (the entry screen), `run` (and groups of runs), `resume`, `stop`, `land`, `archive`, `delete`, `view`, `wait`, `hint`, `ask`, `review`, `report`, `docs`
-- **[Docker Sandbox](docker.md)** — run the agent with filesystem isolation
- **[Concepts](concepts.md)** — how iteration, isolation, and verified improvement
work, and how to design a loop
+- **[Configuration](config.md)** — the full config surface (`autohelix//config.yaml`): gates, observe, stop, scope, agent (budgets are `run`/`resume` flags)
+- **[CLI Reference](cli.md)** — skill installation/export, bare `autohelix` (the entry screen), `run` (and groups of runs), `resume`, `stop`, `land`, `archive`, `delete`, `view`, `wait`, `hint`, `ask`, `review`, `report`, `docs`
- **[Phases](phases.md)** — where each phase runs (agent, checks, judges, stop,
summary), what it gets, and where its output goes
- **[ML Experiments](ml-experiments.md)** — patterns for training/eval loops (post-training, benchmarks)
+- **[Docker Sandbox](docker.md)** — run the agent with filesystem isolation
diff --git a/docs/cli.md b/docs/cli.md
index 8a16820..cf8b928 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -402,7 +402,7 @@ Every budget counts **this segment**, whatever earlier ones spent:
| `-n N` | after N iterations (`resume -n N`: N more) |
| `--until N` | after iteration N of the run: the one flag that counts a total, so a script can repeat it (`resume --until 20` twice runs nothing the second time) |
| `--cost USD` | once this segment has charged USD: agent calls, reviews, asks, every model call a command reports, the baseline's too (the summary, written after the loop, is counted but never stopped by it) |
-| `--time DURATION` | once DURATION of this segment's wall clock has passed, the baseline included |
+| `--time DURATION` | before the next iteration, once DURATION of this segment's wall clock has passed, the baseline included; one under way finishes (below) |
Whichever comes first ends the segment; a stop condition or [`autohelix stop`](#autohelix-stop) can end it sooner.
@@ -1301,10 +1301,12 @@ $ autohelix docs
## `autohelix skill`
-Install or export the packaged `autohelix` skill and all its references. It
-helps your coding agent set up experiments, explain a project's runs, and, when
-asked, launch and supervise one, using the installed CLI. A source checkout is
-not required.
+Install or export the packaged `autohelix` skill and all its references, so your
+coding agent can set up experiments, explain a project's runs and, when asked,
+launch and supervise one, in any app, IDE or terminal session. It uses the
+installed CLI; a source checkout is not required. In a terminal, bare
+[`autohelix`](#autohelix) starts an agent with the bundled skill without
+installing anything.
```bash
autohelix skill install --agent claude-code --scope project --path /path/to/project
@@ -1337,27 +1339,13 @@ directory.
- Updates replace individual files; an I/O failure can leave a partially
updated folder. Correct the error and repeat with `--force`.
-The copied `SKILL.md` says which AutoHelix version wrote it (a line after its
-front matter), and tells the agent to point out a different `autohelix
---version` and suggest reinstalling with `--force`: an installed copy stays as
-it was when AutoHelix is upgraded.
-
-After installation, ask your agent to use the `autohelix` skill to prepare your
-experiment (or to explain the project's runs) (or run bare [`autohelix`](#autohelix) in a terminal: it starts the
-agent with the bundled skill, without installing anything). The agent:
-
-- inspects the project and proposes scope, gates, observe entries (commands
- and reviews) and optional metric gates;
-- shows the complete YAML and its section-by-section explanation for you to
- review before project files change; agreement to save and commit leads to
- writing, validating, and committing only the setup files;
-- gives verification results and the complete launch command with a suggested
- budget (`autohelix run perf -n 10 --cost 20`), and starts `autohelix run`
- only when requested.
-
-To request ongoing management, ask the agent to prepare, run, and supervise
-within explicit effort limits. It should monitor saved outcomes through process
-termination and use hints when useful for later iterations. See the
-[setup-only and managed walkthroughs](getting-started.md#with-your-coding-agent).
+The copied `SKILL.md` names the AutoHelix version that wrote it, and tells the
+agent to run `autohelix --version` first and, on another version, to suggest
+reinstalling with `--force`: an installed copy stays as it was when AutoHelix is
+upgraded.
+
+After installation, ask your agent "Use AutoHelix to improve [goal]", or about
+the project's runs: see
+[Getting started → With your coding agent](getting-started.md#with-your-coding-agent).
Installing the Python package does not register skills automatically.
diff --git a/docs/concepts.md b/docs/concepts.md
index 1448488..e56989d 100644
--- a/docs/concepts.md
+++ b/docs/concepts.md
@@ -16,7 +16,8 @@ for each iteration:
5. checks copy — fresh copy of T (HEAD at A); T's files are verified after every command
6. gate commands — in list order (tests, linting, ask: questions); the first failure rejects
7. observe entries — in list order (benchmarks, reviews), each output saved by name;
- after each, the metric gates on its numbers; a failure rejects
+ after each, the metric gates on its numbers (a failed metric
+ gate rejects; a failed entry doesn't)
8. accept or reject — commit exactly T on A, update the run ref and history atomically;
or keep T as refs/autohelix-rejected//
9. stop commands — after an accept, in a copy of the accepted tip
@@ -133,7 +134,9 @@ A failed or timed-out attempt is rejected without checks: it is kept for the
record and the next agent, never accepted unchecked, and the loop goes on (the
next agent gets its `rejected.patch`). Three failed agent calls in a row stop
the run: "the agent failed 3 times in a row: ". An accepted or
-gate-rejected iteration resets the count.
+gate-rejected iteration resets the count. A rejected key or credentials (HTTP
+401/403) stops the run after the one call, with an error that says to fix it
+and `autohelix resume`.
An attempt whose changes were all discarded (its tree equals the commit it
started from) keeps no ref: there is nothing to keep or re-apply.
@@ -288,7 +291,7 @@ characters.
Editing the template is also how you can keep an evaluation *out of the agent's view*, useful for measuring generalization without the agent optimizing against the eval itself. Two prompt-only levers:
- **Don't list the eval command.** Drop the `observe` (or `gates`) loop from your `prompt_template:` file. The command still runs and its metric still gates and ranks the run; it just isn't named in the prompt. Its output is still in the agent's copy under `.autohelix-iteration/iterations/NNN/`: an observe entry's `observe//` (a review's transcript included), and a *failing* gate's whole `gates//` folder (`command.txt`, so the gate's command verbatim, stdout, stderr, and an `ask:` gate's judge transcript; passing gates' output is not copied). A gate's command is in every record too (`record.json`, `history.jsonl`), so leaving a gate out of the prompt doesn't hide its command. So keep what it prints minimal, and prefer an observe entry or a gate that says little when it fails.
-- **Fence the agent into its copy.** Add an explicit instruction to only read and write inside `{{ copy }}`, and keep the eval script *and* any answer key outside the project tree (reference the script by absolute path from your config). The agent then has nothing in scope to reverse-engineer.
+- **Fence the agent into its copy.** Add an explicit instruction to only read and write inside `{{ copy }}`, and keep the eval script *and* any answer key outside the project tree (reference the script by absolute path from your config), and out of the experiment folder too: the agent's copy holds that as `.autohelix-iteration/experiment/`. The agent then has nothing in scope to reverse-engineer.
This is a **best-effort nudge, not a security boundary.** In practice a cooperative agent respects the fence: in testing, Claude declined to read an out-of-copy eval even when its path was visible in a log it had legitimately read. But nothing *enforces* it: copies live outside the project, but the agent runs as you, so one that is determined (or explicitly told to cheat) can still reach the project and anything else on disk by absolute path. Treat it as reducing reward-hacking pressure, not eliminating the possibility.
@@ -325,13 +328,12 @@ file it points to. A link out of `autohelix/` (even to a committed file), or
into a dot-name inside it (`autohelix/.git/`, `.env`), is refused: a committed
project file is in every copy, so a command names it by its path
(`python scripts/bench.py`); an ignored document (under `notes/`, say) is
-copied into the folder (stored and frozen with the run) or named by its path
-in the goal (read live). Use relative links: they still work in a clone of
-`autohelix/`'s own repository.
+copied into the folder (stored and frozen with the run). Use relative links:
+they still work in a clone of `autohelix/`'s own repository.
`autohelix/README.md` is the coordinator's notes: the current state, decisions
-and why, work done outside the loop, what's next. The agent session bare
-`autohelix` starts reads it first, and updates it at the end only while
+and why, work done outside the loop, what's next. An agent session with
+the skill reads it first, and updates it at the end only while
`autohelix/` isn't tracked by the project (a tracked file edited during a run
dirties the checkout).
@@ -347,7 +349,7 @@ committed one. Git is only for sharing them.
| Setup | How | When |
|---|---|---|
-| **Private** (setup's default) | `/autohelix/` in the local exclude file | your own experiments; their scripts live in their folders |
+| **Private** (the agent-led setup's default) | `/autohelix/` in the local exclude file | your own experiments; their scripts live in their folders |
| **Private, tracked** | private, plus `git init` in `autohelix/` | as private, with history, backup and a remote to clone onto other machines |
| **Committed** | commit `autohelix/`, or one experiment of it, with the project | shared experiments (a team's benchmark) |
| Team-wide ignore | `/autohelix/` in `.gitignore` | everyone on the team keeps their configs private |
@@ -432,10 +434,7 @@ for cooperative agents, not a filesystem security boundary.
Archive retains evidence, unlanded commits and rejected trees, and leaves code
intact. Delete removes the run directory, its ref and its
`refs/autohelix-rejected//` refs, while lock files remain outside that
-directory. A run folder missing a file every release writes (its stored
-`config.yaml`) was made by a development build: it is refused, with the advice
-to delete it. Legacy top-level
-history must be moved or deleted before run; there is no automatic migration.
+directory.
## Cost Tracking
@@ -463,8 +462,7 @@ stays unknown; see [CLI → `autohelix report`](cli.md#autohelix-report)).
History's `calls` list records each attempted agent call and command model call
with its role, usage and log path (relative to the run directory); it is the
-only place usage is stored. Records from earlier versions may list `reviewer`
-calls; they count the same way. Every agent call's usage (the main agent's, a
+only place usage is stored. Every agent call's usage (the main agent's, a
judge's, the run summary's) records `cli`, `model` (the model the CLI's output
named, `null` when it named none) and `executable` (the resolved path started):
which model ran, whatever `model:` asked for. `view`'s run screen and the web
@@ -486,7 +484,7 @@ accepted commits record that charge as unknown.
The numeric field is `usage.cost_usd` for every CLI. `usage.cost_source` is
`backend` when the CLI supplies the amount, or `calculated` when AutoHelix
calculates it. Backend-supplied amounts can themselves be estimates; they are
-not necessarily invoice totals. Older history without this metadata still loads.
+not necessarily invoice totals.
**Codex costs are estimated** from reported input, cached-input, cache-write,
and output token counts and a bundled snapshot of the model's published
diff --git a/docs/config.md b/docs/config.md
index 4f31f57..e005fe4 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -11,9 +11,9 @@ the examples below or the commented template shipped in the package
`observe:` and `stop:`) runs inside a per-iteration copy of the code, not the main
repo, and every path (`capture:` files, the patterns in `scope.editable` and
`scope.frozen`) is resolved there. Use relative paths (`src/`, `tests/`,
-`results/log.json`); absolute paths point outside the copy and will either be
-silently ignored or crash the run (in `scope:`, an absolute path or a `..`
-component is a config error).
+`results/log.json`). An absolute path in a command reaches the main checkout,
+not the candidate (an absolute `capture:` or scope entry, or one with a `..`
+component, is a config error).
(The one exception is long-lived outputs you deliberately keep outside the repo,
such as model checkpoints: see
[ML Experiments → One folder per iteration](ml-experiments.md#one-folder-per-iteration).) Untracked files such as a virtualenv or downloaded data aren't in the copy;
@@ -22,7 +22,7 @@ see [Phases → Candidate copies](phases.md#candidate-copies).
## Where configs live
A run stores its config when it starts, so git is only for sharing configs.
-Setup keeps `autohelix/` private (`/autohelix/` in the local exclude file,
+The agent-led setup (bare `autohelix`) keeps `autohelix/` private (`/autohelix/` in the local exclude file,
`git rev-parse --git-path info/exclude`) unless
you share an experiment by committing it. The setups, and how to share one experiment
out of a private folder: [Concepts → Where configs live](concepts.md#where-configs-live).
@@ -389,9 +389,10 @@ Where gate, observe and stop commands run and the variables they get:
An experiment folder (`autohelix/NAME/`, holding `config.yaml`) can keep its
evaluator scripts and material beside it. The run stores the folder when it
-starts, as `.autohelix/runs//experiment/` (without the config and its
-template), and each gate, observe and stop command gets its own copy of that
-as `$AUTOHELIX_EXPERIMENT`:
+starts, as `.autohelix/runs//experiment/` (without the config, its
+template, dotfiles, dot-folders and `__pycache__/`; at most 200 files, 200
+folders and 10 MB: see [CLI → Config files](cli.md#config-files)), and each
+gate, observe and stop command gets its own copy of that as `$AUTOHELIX_EXPERIMENT`:
```
autohelix/console/
diff --git a/docs/getting-started.md b/docs/getting-started.md
index faf384f..29db96a 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -2,6 +2,8 @@
## Installation
+AutoHelix needs Python 3.11 or newer and git 2.29 or newer (`git --version`).
+
Install the CLI and its agent skill from git (until the PyPI release):
```bash
@@ -17,19 +19,9 @@ python -m venv .venv && source .venv/bin/activate
pip install -e .
```
-To design a run with your coding agent, run `autohelix` in your project, in a
-terminal (see [With your coding agent](#with-your-coding-agent)), or explicitly
-install the portable skill into your target project:
-
-```bash
-autohelix skill install --agent codex --scope project --path /path/to/my-project
-```
-
-Choose `claude-code`, `codex`, or `opencode`, then ask the agent to use the
-`autohelix` skill to prepare and verify your experiment. The skill includes
-performance, writing, and research patterns. Preparation does not start the
-optimization loop. See [CLI → skill](cli.md#autohelix-skill) for user installation,
-export, and update behavior.
+Commands run in the environment AutoHelix starts in. Don't editable-install your
+own project there: commands would then test the checkout's code, not the
+candidate's (see [Command environment](phases.md#command-environment)).
## Agent Setup
@@ -82,122 +74,47 @@ default, what `effort` maps to and its model docs: [Config → Agent](config.md#
### With your coding agent
-In your project, run:
+Install the skill once, where your agent finds it:
```bash
-autohelix
+autohelix skill install --agent claude-code --scope user # or codex, opencode
```
-`autohelix` shows the project's runs (none yet), then asks "Start Claude Code
+Then ask the agent "Use AutoHelix to improve [goal]", in any app, IDE or terminal
+session; it needs `autohelix` on its `PATH`. After upgrading AutoHelix, repeat
+the install with `--force` (the agent tells you when its copy is older than
+`autohelix --version`). In a terminal, `autohelix` does the same without the
+install: it shows the project's runs (none yet), then asks "Start Claude Code
with AutoHelix? Enter/q" (or names the agent you have: Codex or OpenCode; it
-asks which when there are several). Enter starts your coding agent with the
-skill bundled with AutoHelix; the agent takes a quick look at the project and
-asks what AutoHelix should work on, with a few goals that fit it. The skill helps design the experiment from your existing code,
-checks, and evidence. The agent proposes a short name for the experiment,
-saves the config as `autohelix//config.yaml`, keeps `autohelix/` private
-unless you want the experiment shared
-([Where configs live](concepts.md#where-configs-live)), checks it with
-`autohelix run --check`, and gives the `autohelix run` command to start. The agent you choose becomes
-`agent.cli`, the loop's agent, unless you decide otherwise.
-
-Later, `autohelix` lists the project's runs with the command that applies to
-each (`resume`, `land`, `view`), and the same question starts the agent: it
-says what the table doesn't show (why iterations were rejected, anything odd)
-and asks what next, whether a question about the runs or another experiment. See [CLI → autohelix](cli.md#autohelix).
-
-With the skill installed as described above, you can also start from an
-ordinary agent session. The installation's `--agent` selects the agent that
-discovers the skill; `agent.cli` in the generated configuration selects the
-loop's agent. For preparation only, ask:
-
-> Set up AutoHelix to improve [goal]. [Optional instructions.]
-
-Describe the outcome you want, such as making data processing faster while
-preserving its results. The agent can propose suitable tests and benchmarks;
-you do not need to specify the evaluation in the initial request.
-
-The agent inspects the project, then shows the complete proposed YAML and its
-intended path (`autohelix//config.yaml`) before changing
-project files. A numbered walkthrough follows the YAML in configuration order:
-what each section controls, why its settings were chosen, and how to adjust
-them. It covers the goal, scope, gates, observations and evidence, backend,
-and effective defaults for omitted fields. Missing evaluators are
-proposed with their design and likely cost before implementation. Discuss
-revisions, then agree to save it when the proposal fits your goal. You can
-also ask for a proposal only.
-
-The skill uses a consistent top-level order for generated configs: `goal`,
-`scope`, `gates`, `observe`, `stop`, `agent`, `prompt_template`, omitting
-unused fields. This is a presentation convention; existing configs can use any
-top-level order.
-
-After agreement, the agent writes the setup files and validates the config
-without executing evaluators. It commits the experiment only when you want it
-shared. It can also run known cheap checks within the request. Its final reply
-gives the saved paths, where they are kept (private, or the setup commit),
-verification results, what remains unverified, and the complete
-command line to start it, with a suggested budget and why (`autohelix run perf
--n 10 --cost 20`). Budgets are command-line flags, not config: `-n`
-iterations, `--cost` dollars, `--time` wall clock, for each `run` or `resume`
-(1 iteration when none is given; see [CLI → Budgets](cli.md#budgets)).
-Measurements alone do not reject regressions; metric gates are optional.
-
-After reviewing the configuration, ask for a managed execution:
-
-> Run and manage AutoHelix using the existing config. [Optional changes or budget limits.]
-
-For example, add limits of three iterations, four minutes per agent call, and
-fifteen minutes for the loop. Choose bounds appropriate to your work.
-Within the request, the agent uses the existing configuration, applies agreed
-changes, verifies setup, resolves the clean
-committed state required to launch, starts the loop, and monitors it through
-termination. It can send evidence-based `autohelix hint` messages for subsequent
-iterations. The handoff should explain accepted changes, actual measurements,
-failures, evidence paths, and accounting limits. Ending this execution does not
-mean an open-ended experiment cannot be continued with `autohelix resume`.
-
-You can also combine preparation and execution in one request when you want the
-agent to set up and manage the experiment from scratch.
-
-`--time` and `--cost` are checked between iterations; per-agent deadlines and
-check timeouts have their own boundaries. Dollar accounting depends on backend
-reporting and includes the optimization agent and the `ask` and `review` calls
-of gates and observe entries, including the baseline's. The run summary's cost
-counts in the run's total but runs after `--cost` is checked; supervisor calls
-are separate. Missing cost
-is unknown, not zero. See [CLI → Budgets](cli.md#budgets) before relying on a cap.
-For a long run, `run` and `resume` keep the machine from sleeping until the
-segment ends (macOS `caffeinate`, Linux `systemd-inhibit`; nothing where the tool
-is missing or refused). A closed laptop lid still sleeps, and expiring
-credentials or a dropped VPN still stop the agent: keep the lid open (or use a
-server) and check how long your login lasts.
-The console, `autohelix view`, the run summary and run page (`report.md`,
-`report.html`), and saved records already support inspecting results.
+asks which when there are several), and Enter starts that agent with the skill.
+See [CLI → autohelix skill](cli.md#autohelix-skill) and
+[CLI → autohelix](cli.md#autohelix).
+
+The agent looks at the project, asks what AutoHelix should work on, and
+designs the experiment with you from your existing code, checks and evidence.
+When you agree, it saves the config as `autohelix//config.yaml` (kept
+private unless you want it shared:
+[Where configs live](concepts.md#where-configs-live)), checks it with
+`autohelix run --check`, and gives the command to start, with a
+suggested budget (`autohelix run perf -n 10 --cost 20`). The agent you work
+with becomes `agent.cli`, the loop's agent, unless you decide otherwise.
+
+To have it start the run too, ask: "Run and manage AutoHelix using the
+existing config", with any budget. It starts the loop, follows it to the end,
+can send `autohelix hint`s, and reports what was accepted and measured. Its own
+calls aren't counted in the run's cost.
+
+Later, ask the agent about the runs: it reads them, says what the numbers don't
+show (why iterations were rejected, anything odd) and asks what next. In a
+terminal, `autohelix` lists them first, with the command that applies to each
+(`resume`, `land`, `view`). See [After the first run](#after-the-first-run).
### Manual setup
-The following steps prepare the same kind of experiment without the skill.
-
-### 1. Write the config
+#### 1. Write the config
Write the config of an experiment folder, `autohelix/perf/config.yaml` (a
-project can have [several](#5-several-configs)). Start from the config below, a
-[pattern](patterns.md) for your kind of goal, an
-[example](https://github.com/awslabs/AutoHelix/tree/main/examples), or the commented template shipped in the package:
-
-```bash
-cd my-project
-mkdir -p autohelix/perf
-python -c "from importlib.resources import files; print(files('autohelix.templates').joinpath('config_template.yaml').read_text())" > autohelix/perf/config.yaml
-```
-
-(use the Python AutoHelix is installed in). There is nothing else to
-initialize: the first run creates `.autohelix/`, its runtime directory, kept
-out of git.
-
-### 2. Configure
-
-Edit `autohelix/perf/config.yaml`: set your goal and uncomment relevant sections:
+project can have [several](#several-configs)):
```yaml
goal: |
@@ -215,59 +132,73 @@ observe: # measured after the gates; the next agent reads the
metrics: {speed: higher}
- name: review # a read-only reviewer's feedback
review: Review the change for correctness. What should the next iteration fix?
+
+agent:
+ cli: claude-code # or codex, opencode
```
`gates:` decide what is accepted; `observe:` entries only inform (a failing
benchmark doesn't reject anything, unless a `metric:` gate is on its number).
-See the [configuration reference](config.md).
+For other goals, start from a [pattern](patterns.md) or an
+[example](https://github.com/awslabs/AutoHelix/tree/main/examples); every key is
+in the [configuration reference](config.md). There is nothing else to
+initialize: the first run creates `.autohelix/`, its runtime directory, kept
+out of git.
-### 3. Run
+#### 2. Run
AutoHelix needs a git repository with a commit, and the first baseline needs no
-uncommitted changes to tracked files. Commit the config before the first
-`run` (or keep it private: [Where configs live](concepts.md#where-configs-live)),
-and commit any scripts its commands use
-([Phases → Candidate copies](phases.md#candidate-copies)).
-Preserve unrelated work:
+uncommitted changes to tracked files. A script kept in the experiment folder is
+stored with the run, like the config (commands run it as
+`"$AUTOHELIX_EXPERIMENT/bench.py"`:
+[Experiment folder](config.md#experiment-folder)); a script elsewhere in the
+project must be committed, since copies are made from the commit. The config
+needn't be committed. Keep `autohelix/` private, as the agent-led setup does:
```bash
-git add autohelix/perf/config.yaml
-git commit -m "Configure AutoHelix experiment"
+echo /autohelix/ >> "$(git rev-parse --git-path info/exclude)"
```
-The configuration must reference implemented checks and measurements that use
-the intended environment. Then launch:
+or commit it to share the experiment (the other setups:
+[Where configs live](concepts.md#where-configs-live)). Then launch:
```bash
autohelix run perf -n 5 # a bare `autohelix run -n 5` runs the only experiment
```
-It prints a header (goal, agent, gates, observe, scope, budget), then one row per
+## After the first run
+
+### Follow it
+
+`run` prints a header (goal, agent, gates, observe, scope, budget), then one row per
iteration as it ends, with a live row for the one under way:
```text
time cost speed ↑
· base 46.9
✓ 1 31s $0.15 17,481.5 373×
- ✗ 2 2m 23s $0.48 pytest -q test_sort.py failed (exit 1)
+ ✗ 2 2m 23s $0.48 pytest tests/ failed (exit 1)
⠹ 3 1m 12s agent
```
-✓ is accepted, with each metric's change from the baseline; ✗ is rejected, with the reason. When
-the segment ends, the end block says why, how each metric moved, what landed on your
-branch and what to type next (see [CLI → What it prints](cli.md#what-it-prints)).
+✓ is accepted, with each metric's change from the baseline; ✗ is rejected, with
+the reason. When the command ends, the end block says why, how each metric
+moved, what landed on your branch and what to type next (see
+[CLI → What it prints](cli.md#what-it-prints)).
-Use `autohelix view` in a second terminal to follow the run on a live page in your browser
-(every run of the project, each with its own page), or `autohelix view --terminal` for the
-same screen `run` prints (header, iterations so far, the live row) with the agent's live output below it.
-`autohelix stop ` ends it after the current iteration (`--now`, or Ctrl-C in its
-terminal, at once); scripts can block on `autohelix wait`, which prints each iteration
-and the run's end as JSON.
+Use `autohelix view` in a second terminal to follow the run on a live page in
+your browser (every run of the project, each with its own page), or
+`autohelix view --terminal` for the same screen `run` prints (header,
+iterations so far, the live row) with the agent's live output below it.
+`autohelix stop ` ends it after the current iteration (`--now`, or Ctrl-C
+in its terminal, at once); scripts can block on `autohelix wait`, which prints
+each iteration and the run's end as JSON.
-### 4. Continue, set aside or start over
+### Continue, set aside or start over
Each `autohelix run` starts a **new** run, with fresh notes. To give the same
-run more iterations, resume it; budgets count each segment:
+run more iterations, resume it; each `run` or `resume` command has its own
+budget:
```bash
autohelix resume -n 5 # five more iterations of this config's latest run
@@ -295,7 +226,7 @@ rm -rf /path/to/artifacts//* # 3. only if you configured an external art
Run step 1 on the run's branch. `git reset --hard` also discards uncommitted
changes and any commits you made on that branch since the run started.
-### 5. Several configs
+### Several configs
A project can have several loops: one experiment folder each, in
`autohelix/` at the project root. Commit the configs, or keep the folder private
@@ -321,7 +252,7 @@ Runs are named after the folder (`20261112-1400-perf-0mws`). A bare
stops with the list (`autohelix run ` picks one). See
[CLI → Config files](cli.md#config-files) for the rules.
-### 6. Several runs side by side
+### Several runs side by side
To try a goal several ways at once (another model or prompt), write one config
per variant, commit them, and start one run per config in its own terminal,
diff --git a/docs/patterns.md b/docs/patterns.md
index 179eca6..37ed4e3 100644
--- a/docs/patterns.md
+++ b/docs/patterns.md
@@ -217,16 +217,16 @@ agent:
cli: claude-code
```
-Launch: `autohelix run train -n 3 --time 8h`. `--time` bounds the segment
-when each iteration trains for a long time.
+Launch: `autohelix run train -n 3 --time 8h`. `--time` starts no iteration
+after 8 hours; the one under way runs on, up to `agent.timeout` for its agent
+call (a hard limit that also tells the agent how much time is left).
- **What it gives**: rollback. The next agent starts from the last accepted
model, and every accepted model stays on disk.
- **What it doesn't**: cleanup (nothing removes the folders; delete them
yourself), and accepting a retrain that changes no code as an improvement
(see [ML experiments](ml-experiments.md#one-folder-per-iteration)).
-- **Long training**: offer `agent.timeout` (a hard limit that also tells the
- agent how much time is left) besides `--time`;
+- **Long training**: set `agent.timeout` with `--time`;
[ML experiments](ml-experiments.md) has the environment and run discipline
(pre-installed dependencies, cached data, training in the foreground).
@@ -347,8 +347,10 @@ agent:
`validate.py` checks what a script can (the results' schema, recorded seeds
and parameters, every number in the report present in the results); it can't
establish that the science is sound, which is the review's job. If the
-experiments call models or remote services, cap them in those commands:
-AutoHelix doesn't count what they spend.
+experiments call models or remote services, AutoHelix counts their spend only if
+they record it in `$AUTOHELIX_USAGE_FILE`
+([Cost Tracking](concepts.md#cost-tracking)); otherwise cap them in those
+commands.
## Comparing approaches
diff --git a/docs/phases.md b/docs/phases.md
index 2e67bc0..c598c80 100644
--- a/docs/phases.md
+++ b/docs/phases.md
@@ -60,9 +60,9 @@ when the copy is made; no stash, no remote). This means:
each copy gets: [At a glance](#at-a-glance)).
- Accepted commits advance the run's hidden `refs/autohelix/` first.
- A process-held per-run lock lets only one process write a run at a time.
-- PYTHONPATH is remapped so Python imports resolve to the copy (not the main repo), and
- `autohelix` on a command's `PATH` is a launcher for the harness's own installation
- (see [Command environment](#command-environment)).
+- PYTHONPATH is remapped so the project's sources import from the copy, with a
+ limit (see [Command environment](#command-environment)), and `autohelix` on a
+ command's `PATH` is a launcher for the harness's own installation.
- **A copy holds only committed files.** A script a gate runs that isn't
committed is missing there, so commit the scripts your commands use. Commands get
their tools from the environment AutoHelix started in: run it with your virtualenv
@@ -269,8 +269,16 @@ the agent can still find the project (its copy's `.git` borrows the project's
objects through alternates, and the copies folder records the checkout) and runs
as you.
-`PYTHONPATH` is remapped so the project's own sources import from the copy.
-That would let candidate code replace modules inside `autohelix ask` or
+`PYTHONPATH` is remapped so the project's own sources import from the copy, but
+only the project paths on AutoHelix's own Python's `sys.path`. So the environment
+your commands run in must not import the project from the checkout: no editable
+install of it there (`pip install -e .`), or every iteration is measured on the
+checkout's code. Installing AutoHelix in that environment isn't enough on its
+own: an editable install that puts no project path on `sys.path` (setuptools'
+strict mode, a meta-path finder) isn't remapped either. A command can put the
+sources on the path itself, relative to the copy: `PYTHONPATH=src pytest`.
+
+The remapped `PYTHONPATH` would let candidate code replace modules inside `autohelix ask` or
`autohelix review`, so `PATH` starts with a private folder holding an
`autohelix` launcher: it runs the harness's own installation in isolated mode,
whatever the command's `PYTHONPATH` and working directory. Call `autohelix` by
diff --git a/examples/README.md b/examples/README.md
index 0bb5480..105499e 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -20,6 +20,7 @@ guidance.
| [**KernelBench**](kernelbench/setup.py) | GPU kernel speed | PyTorch implementation |
| [**ml-recipe**](ml-recipe/) | Training recipe | Preprocessing, model choice, and hyperparameters |
| [**posttrain**](posttrain/) | Trained model | Training code and generated model weights |
+| [**autoresearch**](autoresearch/) | Validation bits per byte of a small GPT | Training script |
| [**writing**](writing/) | Clarity and quality | Written article |
| [**task-queue**](task-queue/) | Implementation tasks | Task state and deliverables |
| [**research**](research/) | Research evidence | Experiment, results, and report |
@@ -86,6 +87,6 @@ time and is not vendored in this repository. The evaluator follows KernelBench's
fp32 correctness tolerance and cold-cache mean-runtime protocol, with additional
untimed checks for evaluator tampering and output caching.
-The [post-training example](posttrain/) requires a prepared GPU environment and
-manual setup. Follow each example's README or generated instructions for any
+The [post-training example](posttrain/) and [autoresearch](autoresearch/) require a
+prepared GPU environment and manual setup. Follow each example's README or generated instructions for any
additional requirements.
diff --git a/pyproject.toml b/pyproject.toml
index 98f1e4d..009b5a8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
[project]
name = "autohelix"
version = "0.2.0"
-description = "Agent-powered iterative optimization: put an AI agent in a verified improvement loop"
+description = "Run agents with protocols, not conversations: an AI agent iterates on your code, and only changes that pass your gates are kept"
readme = "assets/README-pypi.md"
requires-python = ">=3.11"
license = "Apache-2.0"
diff --git a/src/autohelix/cli.py b/src/autohelix/cli.py
index 58d68b9..ed691f4 100644
--- a/src/autohelix/cli.py
+++ b/src/autohelix/cli.py
@@ -286,7 +286,7 @@ def _run_line(run: dict) -> str:
def first_prompt(agent: str, project: Path, runs: list[dict], configs: list[str],
git: tuple[str, str | None] | None = None) -> str:
"""The session's first prompt: facts only; how the session opens and goes on is the
- skill's (SKILL.md). The bundled skill, AutoHelix's own CLI, Python and docs, the
+ skill's (SKILL.md). The bundled skill, AutoHelix's own CLI and docs, the
coordinator's notes (`autohelix/README.md`, when there is one), any git problem, the
project's runs and configs, and which agent CLI the session runs in."""
skill_dir = _skill_dir()
@@ -295,13 +295,12 @@ def first_prompt(agent: str, project: Path, runs: list[dict], configs: list[str]
current = run_table.current_runs(runs)
archived = len(runs) - len(current)
unrun = _unrun(configs, runs)
- python = shlex.quote(sys.executable)
- tools = (f"`autohelix` below means `{shlex.quote(str(launcher))}`, and AutoHelix's Python is `{python}`: "
- "use them rather than whatever `autohelix` or `python` your shell finds." if launcher else
- f"AutoHelix's Python is `{python}`: use it rather than whatever `python` your shell finds.")
+ tools = [f"`autohelix` below means `{shlex.quote(str(launcher))}`: use it rather than "
+ "whatever `autohelix` your shell finds."] if launcher else []
+ if docs:
+ tools.append(f"AutoHelix's user docs are in `{docs}`: read them when needed.")
parts = [f"Read `{skill_dir / 'SKILL.md'}` and follow it: you are helping me with AutoHelix in this "
- f"project ({project}).",
- tools + (f" AutoHelix's user docs are in `{docs}`: read them when needed." if docs else "")]
+ f"project ({project})."] + ([" ".join(tools)] if tools else [])
if (project / "autohelix" / "README.md").is_file():
parts.append("The coordinator's notes are in `autohelix/README.md`: read it first.")
if git:
diff --git a/src/autohelix/skill.py b/src/autohelix/skill.py
index 1be8a42..2510e3f 100644
--- a/src/autohelix/skill.py
+++ b/src/autohelix/skill.py
@@ -40,9 +40,9 @@ def walk(directory: Traversable, prefix: Path = Path()):
return dict(walk(root))
-STAMP = ("> Written for AutoHelix {version}. If `autohelix --version` prints another version, "
- "tell the user this copy of the skill may be out of date and suggest reinstalling it "
- "(`autohelix skill install --force` with the same `--agent` and `--scope`).\n")
+STAMP = ("> Written for AutoHelix {version}. Run `autohelix --version` first: if it prints another "
+ "version, tell the user this copy of the skill may be out of date and suggest reinstalling "
+ "it (`autohelix skill install --force` with the same `--agent` and `--scope`).\n")
def stamped(skill_md: bytes, version: str) -> bytes:
diff --git a/src/autohelix/skills/autohelix/SKILL.md b/src/autohelix/skills/autohelix/SKILL.md
index 23dfa9e..21ebe06 100644
--- a/src/autohelix/skills/autohelix/SKILL.md
+++ b/src/autohelix/skills/autohelix/SKILL.md
@@ -14,13 +14,10 @@ This skill covers three jobs: explaining existing runs, setting up an
experiment (an agreed, checked config, ready to run), and launching or
supervising a run, only when the user asks for one.
-Use the installed AutoHelix; a source checkout is not required. Its CLI and
-Python are the ones the session's first prompt names, else the `autohelix` on
-`PATH` and the interpreter on that launcher's first line
-(`head -1 "$(command -v autohelix)"`): a plain `python` may lack the package
-(pipx, `uv tool`, a venv that isn't active), and the harness and the target
-project may use different environments. Check `autohelix --help` and the
-relevant subcommand help against the installed version. Its user docs are in
+Use the installed AutoHelix; a source checkout is not required. Use the
+`autohelix` the session's first prompt names, else the one on `PATH`. Check
+`autohelix --help` and the relevant subcommand help against the installed
+version. Its user docs are in
the folder `autohelix docs` prints (`README.md` is their index); read them when
needed. Every config key is in `config.md` there, every flag in `cli.md`.
@@ -35,12 +32,13 @@ nothing that changes anything: `autohelix/README.md` first when it exists (the
coordinator's notes: see [Coordinator notes](#coordinator-notes)), the README
and project instructions, how the
code is tested and measured (test folders, benchmarks, evaluators, CI config),
-task or spec files (`TODO`, `TASKS.md`, a PRD), and any AutoHelix configs
-(`autohelix/*/config.yaml`).
+task or spec files (`TODO`, `TASKS.md`, a PRD), any AutoHelix configs
+(`autohelix/*/config.yaml`), and the runs: the first prompt lists them, else
+`autohelix view --once` (it only reads).
-- **With current runs**: the user has just seen them in a table (state,
- iterations, landing, cost), from bare `autohelix`; don't repeat it. Read the
- live runs and the most recent other one ([reading runs](references/reading-runs.md))
+- **With current runs**: when the first prompt says the user saw them in a
+ table (state, iterations, landing, cost), don't repeat it; otherwise give
+ its gist in a line. Read the live runs and the most recent other one ([reading runs](references/reading-runs.md))
and give in a few lines what the table doesn't show: why recent iterations
were rejected, anything odd. Then ask what next, with two or three examples
drawn from the state: a question about a run, the command that applies (land,
@@ -122,13 +120,15 @@ Pick these yourself and say what you picked; don't ask about them:
expensive, say so in the handoff and offer the flag ("add `--cost 20` to cap
it").
- **Timeouts**: none (no `timeout:` on entries, no `agent.timeout`): the
- built-in defaults apply. When each iteration trains a model for a long time,
+ built-in defaults apply (commands 30m, `ask:` gates 10m, the main agent no
+ limit). When each iteration trains a model for a long time,
offer `agent.timeout` and `--time` (`patterns.md`, Training a model).
- **Metric gates**: none: the agent sees the numbers and decides. Suggest one
in the walkthrough when a measurement is stable enough to protect.
- **Agent**: `agent: {cli: X}`, where X is the CLI this session runs in (the
- first prompt names it), unless the user names another. Add `model:` or
- `effort:` only when the user names one.
+ first prompt names it; else the agent you are: `claude-code`, `codex` or
+ `opencode`), unless the user names another. Add `model:` or `effort:` only
+ when the user names one.
- **Summary**: written by default; `--no-report` only when the user asks (it
isn't stored: it goes on every `resume` command too).
@@ -151,8 +151,8 @@ Name the config's path:
An experiment folder holds its config and what only it uses: its prompt
template, evaluators, metric adapters, sketches. The run stores the folder
-when it starts (dotfiles and `__pycache__/` left out; at most 200 files and
-10 MB):
+when it starts (dotfiles and `__pycache__/` left out; at most 200 files, 200
+folders and 10 MB):
```
autohelix/
@@ -177,7 +177,7 @@ commits stays in the project (`scripts/`) and commands name it by its path
A document the goal relies on (a design, a spec): to freeze it with the run
(editing it then makes `resume` refuse), keep it in the experiment folder or
`autohelix/` and link it; an ignored one elsewhere (under `notes/`) is copied
-into the folder. To keep it live, name it by its path in the goal.
+into the folder.
Preserve other configs and the run state in `.autohelix/`. A config in the
first format (`constraints:`, `metrics:`, `reviewer:`, ...) no longer loads:
diff --git a/src/autohelix/skills/autohelix/references/loop-design.md b/src/autohelix/skills/autohelix/references/loop-design.md
index 1194e25..3ca0fc2 100644
--- a/src/autohelix/skills/autohelix/references/loop-design.md
+++ b/src/autohelix/skills/autohelix/references/loop-design.md
@@ -36,7 +36,7 @@ and pair it with existing output-equality tests. State that its conclusions
cover those cases, estimate CPU time from available evidence (or label it
unknown), and propose observing runtime before choosing any regression gate.
This makes the implementation agreement concrete without requiring a fixed
-interview. Follow the entrypoint's authorization distinction before coding
+interview. Follow SKILL.md's authorization distinction before coding
the evaluator or executing it.
Use representative cases and protect evaluation criteria by default, while
diff --git a/src/autohelix/skills/autohelix/references/managed-runs.md b/src/autohelix/skills/autohelix/references/managed-runs.md
index 65755fa..55c1ba8 100644
--- a/src/autohelix/skills/autohelix/references/managed-runs.md
+++ b/src/autohelix/skills/autohelix/references/managed-runs.md
@@ -7,8 +7,8 @@ without ongoing supervision.
## Launch and observe
-Use the agreed configuration, agent/model, and effort limits. Follow the
-entrypoint's evaluator-implementation and execution rules. Before launching,
+Use the agreed configuration, agent/model, and effort limits. Follow
+SKILL.md's evaluator-implementation and execution rules. Before launching,
inspect git state and include only the intended setup changes in any authorized
commit; preserve unrelated work. Resolve routine startup problems within scope,
and explain or ask about repairs that would change the agreed experiment.
@@ -92,7 +92,7 @@ Observe the run's `ended` (or `crashed`) event and the process exit, and inspect
the final saved outcomes before reporting completion. Account for background work you launched; do not leave it running
without explaining its state. Report accepted/rejected attempts, actual
measurements, retained changes, failures, and useful evidence paths. Execute
-post-run checks only under the entrypoint's existing cheap/authorized policy.
+post-run checks only under SKILL.md's existing cheap/authorized policy.
Use available usage records and what each limit counts (the docs' `concepts.md`,
Cost Tracking).
@@ -109,8 +109,9 @@ same run (its stored config, its own tip): to apply an edited config, to keep
going after the target branch moved past the run (it landed and the user
committed more), or to fork from an old run (`git switch -c
autohelix/` first), start a new run that continues from it, `autohelix run --import
-`: it sees that run's notes and history read-only and continues its
-observations at the baseline. When the branch lacks that run's accepted
+`: it sees that run's notes and history read-only, and takes its last
+observations as the previous ones until each observe entry has run in the new
+run (normally at the baseline). When the branch lacks that run's accepted
commits, `run --import` says "land it first" with the commands; do that
unless the user wants to start without them. A run whose first baseline
failed is a disposable attempt: fix the config and `autohelix run` again
@@ -125,8 +126,8 @@ iterations only: `--cost` and `--time` start fresh on each segment, so track
the total yourself (`run.progress.cost_usd` in `autohelix view ID --json`) and
pass only the remainder. `run` and `resume` exit 0 when the segment ended
by a budget, a `stop:` condition or `autohelix stop`; 1 on an error (no run to
-resume, failed preflight checks, the agent failing three times in a row, a
-landing that failed); 130 when interrupted (Ctrl-C, `autohelix stop --now`). A failed actual main-agent call consumes its number; resume at the next
+resume, failed preflight checks, the agent failing three times in a row or once
+for a rejected key or credentials, a landing that failed); 130 when interrupted (Ctrl-C, `autohelix stop --now`). A failed actual main-agent call consumes its number; resume at the next
iteration. Do not archive or delete runs, reset accepted code, or extend the
agreed effort without authorization. Record why you start or archive a run, one
line each, so `autohelix view` explains it: `autohelix run a --why "baseline for the
diff --git a/tests/test_cli_entry.py b/tests/test_cli_entry.py
index c3767b2..6fd9eb7 100644
--- a/tests/test_cli_entry.py
+++ b/tests/test_cli_entry.py
@@ -445,8 +445,9 @@ def test_claude_gets_the_skill_and_the_docs(project, monkeypatch, execs, tty):
assert prompt.startswith(f"Read `{skill_dir / 'SKILL.md'}` and follow it")
assert f"AutoHelix's user docs are in `{docs}`: read them when needed." in prompt
launcher = cli._launcher()
- assert (f"`autohelix` below means `{launcher}`, and AutoHelix's Python is `{sys.executable}`" if launcher
- else f"AutoHelix's Python is `{sys.executable}`: use it") in prompt
+ if launcher:
+ assert f"`autohelix` below means `{launcher}`: use it" in prompt
+ assert "AutoHelix's Python" not in prompt
def test_the_prompt_names_the_launcher_it_was_started_as(project, monkeypatch, execs, tty, tmp_path):
@@ -456,7 +457,7 @@ def test_the_prompt_names_the_launcher_it_was_started_as(project, monkeypatch, e
launcher.write_text("#!/usr/bin/env python\n")
monkeypatch.setattr(sys, "argv", [str(launcher)])
assert entry(input="\n").exit_code == 0
- assert f"`autohelix` below means `{launcher.resolve()}`, and AutoHelix's Python" in execs[0][1][-1]
+ assert f"`autohelix` below means `{launcher.resolve()}`: use it" in execs[0][1][-1]
def test_an_agent_that_cannot_start(project, monkeypatch, tty):
diff --git a/tests/test_skill.py b/tests/test_skill.py
index 9b81972..81468ad 100644
--- a/tests/test_skill.py
+++ b/tests/test_skill.py
@@ -50,9 +50,9 @@ def resources(bundled):
from autohelix.terminal import version
front, body = bundled["SKILL.md"].decode().split("\n---\n", 1)
- line = (f"> Written for AutoHelix {version()}. If `autohelix --version` prints another version, "
- "tell the user this copy of the skill may be out of date and suggest reinstalling it "
- "(`autohelix skill install --force` with the same `--agent` and `--scope`).\n")
+ line = (f"> Written for AutoHelix {version()}. Run `autohelix --version` first: if it prints another "
+ "version, tell the user this copy of the skill may be out of date and suggest reinstalling "
+ "it (`autohelix skill install --force` with the same `--agent` and `--scope`).\n")
return {**bundled, "SKILL.md": f"{front}\n---\n\n{line}{body}".encode()}