autopilot

Recipes

Four worked scenarios that map common autopilot use-cases to exact invocations and the timeline you should expect. Each recipe is independent — pick the one that matches your situation and copy the Command: block verbatim.

The recipes assume autopilot is on $PATH. If you’re running from a source checkout, swap autopilot for node packages/tui/bin/tui.mjs — the flags are identical. See the Quickstart for install paths. Open a second terminal alongside any of these and run autopilot watch to tail the live event stream — every recipe assumes you’re checking the renderer (or the JSONL log under ~/.copilot/autopilot/runs/<runId>/events.jsonl) for surprises.

Recipe 1: Refactor a module until tests pass

Use when: you know the file you want changed and you want autopilot to keep editing-and-testing until the suite is green. Best for targeted refactors with a clear success signal — one file, one outcome, hard cap on the budget so you don’t burn iterations on scope creep.

Command:

autopilot run --prompt "Refactor packages/tui/src/runner.mjs to extract the iter-loop body into a separate function. Keep behavior identical. Run \`npm test\` between edits and emit COMPLETE when 100% green." --fresh --max 20

Timeline:

Variations:

Recipe 2: Walk a backlog issue-by-issue

Use when: you’ve already populated a project backlog (open GitHub issues with the proposed or grow-project label) and want autopilot to drain it one feature at a time. Best for medium-scope projects where you’ve sketched the work in advance and want a steady, reviewable cadence of one shipped feature per iteration.

Command:

autopilot run --grow-project --continue --max 30

Timeline:

Variations:

Recipe 3: Self-improve a project across SDLC categories

Use when: you want to harden a mature project by sweeping across the full SDLC — failing CI runs, stale PRs, open human-filed issues, and latent improvements (missing tests, docs/code drift, refactor candidates, dead code) — without writing a per-issue prompt. Best for projects that have a healthy issue tracker and CI but accumulated drift over time.

Command:

autopilot run --self-improve --fresh --max 50

Timeline:

Variations:

Recipe 4: Long-running grow-project with adaptive budget

Use when: you’re planning + draining a large feature and want a base iteration cap that automatically extends if progress signals stay positive — the working tree shows uncommitted changes, or recent iter responses are not byte-identical. Best for week-long projects where you don’t know up front how many iters the work will take.

Command:

autopilot run --grow-project --focus "live-output panel for autopilot watch" \
  --continue --max 30 --adaptive-extension 20 --adaptive-max-total 100

Timeline:

Variations:

Where next?