project-autopilot 0.0.0-stage → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +835 -2
- package/SKILL.md +334 -0
- package/THIRD-PARTY-NOTICES.md +7 -0
- package/adapters/agents.json +326 -0
- package/adapters/documented-effort/codex.json +6 -0
- package/adapters/documented-models/claude.json +61 -0
- package/adapters/gsd.mjs +116 -0
- package/adapters/planning-state.mjs +119 -0
- package/adapters/speckit.mjs +86 -0
- package/adapters/standalone.mjs +161 -0
- package/bin/_dispatch.cjs +27 -0
- package/bin/ap +73 -0
- package/bin/ap.cjs +496 -0
- package/bin/ap.cmd +29 -0
- package/config.example.json +190 -0
- package/config.schema.json +1850 -0
- package/docs/configuration.md +255 -0
- package/docs/safety.md +42 -0
- package/docs/troubleshooting.md +40 -0
- package/package.json +39 -4
- package/references/first-run.md +14 -0
- package/references/gsd-integration.md +51 -0
- package/references/parallel-waves.md +32 -0
- package/references/workflow-mapping.md +27 -0
- package/scripts/adapter-cli.mjs +48 -0
- package/scripts/adapter-drivers.mjs +1127 -0
- package/scripts/adapter-transport.mjs +95 -0
- package/scripts/adhoc-arg-parse.mjs +294 -0
- package/scripts/adhoc-cmd-evidence.mjs +185 -0
- package/scripts/adhoc-prompts.mjs +145 -0
- package/scripts/adhoc-runner.mjs +292 -0
- package/scripts/adhoc-summary.mjs +141 -0
- package/scripts/agent-command-registry.mjs +495 -0
- package/scripts/agent-contract.mjs +98 -0
- package/scripts/agent-environment.mjs +505 -0
- package/scripts/agent-invocation.mjs +110 -0
- package/scripts/agent-process.mjs +172 -0
- package/scripts/agy-events.mjs +294 -0
- package/scripts/anchored-tests.mjs +71 -0
- package/scripts/atomic-state-write.mjs +212 -0
- package/scripts/autopilot.mjs +10858 -0
- package/scripts/bounded-process-tree.mjs +281 -0
- package/scripts/capability-contract.mjs +233 -0
- package/scripts/changed-files-stat.mjs +52 -0
- package/scripts/code-review-rounds.mjs +85 -0
- package/scripts/config-fill.mjs +268 -0
- package/scripts/config-layout.mjs +949 -0
- package/scripts/config-migration.mjs +462 -0
- package/scripts/config-reference.mjs +125 -0
- package/scripts/config-schema-ref.mjs +90 -0
- package/scripts/config-show.mjs +316 -0
- package/scripts/config-validation.mjs +1333 -0
- package/scripts/detect-test-command.mjs +131 -0
- package/scripts/doctor.mjs +72 -0
- package/scripts/escalation-model.mjs +158 -0
- package/scripts/escalation-naming.mjs +70 -0
- package/scripts/event-paths.mjs +70 -0
- package/scripts/execution-envelope.mjs +689 -0
- package/scripts/failure-contract.mjs +657 -0
- package/scripts/failure-handoff.mjs +32 -0
- package/scripts/final-review-fix-rounds.mjs +465 -0
- package/scripts/finding-task-locality.mjs +607 -0
- package/scripts/free-fallback-discovery.mjs +78 -0
- package/scripts/free-model.mjs +7 -0
- package/scripts/gate-baseline-locality.mjs +208 -0
- package/scripts/gate-failure-locality.mjs +224 -0
- package/scripts/gate-locality-imports.mjs +161 -0
- package/scripts/gen-config-schema.mjs +454 -0
- package/scripts/gsd-unit-reset.mjs +62 -0
- package/scripts/guarded-command.mjs +128 -0
- package/scripts/idle-hang-watchdog.mjs +931 -0
- package/scripts/implementation-baseline.mjs +568 -0
- package/scripts/launch-plan.mjs +85 -0
- package/scripts/manual-live-opencode-symref-probe.mjs +240 -0
- package/scripts/mission-naming.mjs +540 -0
- package/scripts/mission-scratch-cleanup.mjs +39 -0
- package/scripts/model-discovery.mjs +456 -0
- package/scripts/model-extract.mjs +131 -0
- package/scripts/opencode-cache.mjs +1189 -0
- package/scripts/opencode-runtime-config.mjs +176 -0
- package/scripts/owner-pid.mjs +370 -0
- package/scripts/paths.mjs +7 -0
- package/scripts/pending-checkbox-snapshot.mjs +59 -0
- package/scripts/per-task-budget.mjs +2192 -0
- package/scripts/phase-delta-rebase.mjs +106 -0
- package/scripts/phase-stage-checkpoint.mjs +1177 -0
- package/scripts/plan-approval.mjs +79 -0
- package/scripts/plan-mode-model-note.mjs +27 -0
- package/scripts/plan-review-rounds.mjs +74 -0
- package/scripts/plan-revision-budget.mjs +17 -0
- package/scripts/planning-artifact-digest.mjs +27 -0
- package/scripts/planning-boundary.mjs +296 -0
- package/scripts/planning-continuation.mjs +184 -0
- package/scripts/planning-request.mjs +9 -0
- package/scripts/planning-review-checkpoint.mjs +724 -0
- package/scripts/planning-review-decision.mjs +178 -0
- package/scripts/planning-review-wiring.mjs +234 -0
- package/scripts/platform-capabilities.mjs +350 -0
- package/scripts/playwright-runtime.mjs +420 -0
- package/scripts/playwright-status-block.mjs +36 -0
- package/scripts/preflight.mjs +0 -0
- package/scripts/process-group-stop.mjs +121 -0
- package/scripts/relay-guard.mjs +56 -0
- package/scripts/relay-guards.mjs +2210 -0
- package/scripts/renumber-runs.mjs +51 -0
- package/scripts/reset-plan-revision.mjs +80 -0
- package/scripts/reset-request-queue.mjs +92 -0
- package/scripts/review-canary.mjs +529 -0
- package/scripts/review-feedback.mjs +214 -0
- package/scripts/reviewer-workspace.mjs +716 -0
- package/scripts/role-deadline.mjs +107 -0
- package/scripts/role-fallback-edit.mjs +167 -0
- package/scripts/role-fallback.mjs +343 -0
- package/scripts/role-progress-brief.mjs +162 -0
- package/scripts/role-progress-commit.mjs +408 -0
- package/scripts/role-progress-ids.mjs +105 -0
- package/scripts/role-progress-prompt.mjs +558 -0
- package/scripts/role-requirements.mjs +128 -0
- package/scripts/run-history.mjs +667 -0
- package/scripts/run-observability.mjs +339 -0
- package/scripts/run-recovery.mjs +139 -0
- package/scripts/runtime-mode-capabilities.mjs +0 -0
- package/scripts/runtime-mode-router.mjs +488 -0
- package/scripts/runtime-mode-selection.mjs +320 -0
- package/scripts/scratch-file-locality.mjs +66 -0
- package/scripts/security-checklist.mjs +59 -0
- package/scripts/session-reset.mjs +26 -0
- package/scripts/setup-discovery.mjs +17 -0
- package/scripts/setup.mjs +2361 -0
- package/scripts/shell-guard.mjs +537 -0
- package/scripts/snapshot-reuse-cache.mjs +226 -0
- package/scripts/speckit-planning-postconditions.mjs +320 -0
- package/scripts/speckit-task-state.mjs +126 -0
- package/scripts/stage-guards.mjs +178 -0
- package/scripts/standalone-handoff.mjs +714 -0
- package/scripts/subprocess-relay.mjs +130 -0
- package/scripts/suite-live-file-guard.mjs +53 -0
- package/scripts/suite-schedule.mjs +54 -0
- package/scripts/task-attribution.mjs +77 -0
- package/scripts/task-requirements.mjs +23 -0
- package/scripts/task-result-contract.mjs +143 -0
- package/scripts/tmp-so-cleanup.mjs +91 -0
- package/scripts/uninstall.mjs +187 -0
- package/scripts/verifier-brief.mjs +449 -0
- package/scripts/verifier-red-gate-override.mjs +88 -0
- package/scripts/verify-denylist.mjs +322 -0
- package/scripts/watch-events.mjs +35 -0
- package/scripts/watch-report.mjs +2791 -0
- package/scripts/watch-summary.mjs +410 -0
- package/scripts/windows-verifier-playwright-bridge.mjs +282 -0
package/README.md
CHANGED
|
@@ -1,3 +1,836 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>Project Autopilot</h1>
|
|
3
|
+
<h3><em>Give it a request. It plans, codes, reviews and tests the work with your coding agents, until it passes.</em></h3>
|
|
4
|
+
</div>
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"/></a>
|
|
8
|
+
<img src="https://img.shields.io/badge/version-12.0.0-informational" alt="Version 12.0.0"/>
|
|
9
|
+
<img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="Node 18 or newer"/>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img src="docs/media/demo.gif" alt="ap run on a small Node project: the planner, coder, reviewers and tests run in turn until the change passes" width="900"/>
|
|
14
|
+
<br/><sub>A real 14-minute run, sped up. Left: <code>ap run</code>; right: the live watch report.</sub>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
Project Autopilot (`ap`) runs a team of AI coding agents on your repository.
|
|
18
|
+
You write what you want in one sentence. Autopilot gives each step to a
|
|
19
|
+
different agent and checks every result before it moves on:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
Planning → Plan Review → Implementation → Code Review → Gate (your tests) → Verification → Final Review → you commit
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- A **planner** writes the plan and a task list.
|
|
26
|
+
- A **plan reviewer** checks the plan. The planner fixes it until the reviewer approves.
|
|
27
|
+
- An **implementer** codes the tasks, one task per session.
|
|
28
|
+
- A **code reviewer** checks each phase. The implementer fixes what it finds.
|
|
29
|
+
- Your **test suite** (the gate) runs after each phase.
|
|
30
|
+
- A **verifier** checks the phase against the plan and the test results.
|
|
31
|
+
- A **final review** checks the whole change once at the end.
|
|
32
|
+
|
|
33
|
+
Each role can be a different CLI and model, for example Claude Code for
|
|
34
|
+
planning and review and a free opencode model for coding. The reviewers run
|
|
35
|
+
read-only, and **Autopilot never commits or pushes**: when the mission is done,
|
|
36
|
+
the changes wait in your working tree for you to review and commit.
|
|
37
|
+
|
|
38
|
+
**Works with:**
|
|
39
|
+
|
|
40
|
+
- **[SpecKit](https://github.com/github/spec-kit)** — if your project uses
|
|
41
|
+
SpecKit (`.specify/`, `specs/*/tasks.md`), Autopilot picks up its tasks and
|
|
42
|
+
implements, reviews and tests them. Without SpecKit it writes its own plan
|
|
43
|
+
(`PLAN.md` + `TASKS.md`) — nothing else to install.
|
|
44
|
+
- **[Playwright](https://playwright.dev)** — built in: the verifier checks
|
|
45
|
+
browser tasks in a real browser (install the browser once with
|
|
46
|
+
`npm run playwright:install`).
|
|
47
|
+
- **Agent CLIs** — Claude Code, opencode, Codex and Antigravity, mixed freely
|
|
48
|
+
across the roles.
|
|
49
|
+
|
|
50
|
+
## Install
|
|
51
|
+
|
|
52
|
+
Needs Node.js 18+, Git and at least one signed-in agent CLI
|
|
53
|
+
([details](#get-started)).
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm install -g github:mmetwally-dev/project-autopilot
|
|
57
|
+
cd your-project && ap setup
|
|
58
|
+
ap run "your request"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`ap` is installed **once per machine**; each project is set up **once with
|
|
62
|
+
`ap setup`** (its own settings, slash commands and missions in `.autopilot/`).
|
|
63
|
+
If you forget, the first `ap run` in a project starts the setup by itself.
|
|
64
|
+
To update to a new version, run the same `npm install -g` command again; your
|
|
65
|
+
projects keep their settings. (Version 12 is the first public release; earlier
|
|
66
|
+
versions were private development.)
|
|
67
|
+
|
|
68
|
+
## Contents
|
|
69
|
+
|
|
70
|
+
- [Install](#install)
|
|
71
|
+
- [Choose how to use it](#choose-how-to-use-it)
|
|
72
|
+
- [Get started](#get-started)
|
|
73
|
+
- [How a mission works](#how-a-mission-works)
|
|
74
|
+
- [What runs where: support status](#what-runs-where-support-status)
|
|
75
|
+
- [Commands](#commands)
|
|
76
|
+
- [Slash commands in your agent](#slash-commands-in-your-agent)
|
|
77
|
+
- [Adhoc reviews (plan-review, code-review, verify-file)](#adhoc-reviews-plan-review-code-review-verify-file)
|
|
78
|
+
- [Mission control: stop, cancel, reset, rebase, finding](#mission-control-stop-cancel-reset-rebase-finding)
|
|
79
|
+
- [Watching a mission: the WATCH-REPORT](#watching-a-mission-the-watch-report)
|
|
80
|
+
- [Roles, models and fallbacks](#roles-models-and-fallbacks)
|
|
81
|
+
- [Limits: caps, retries and timeouts](#limits-caps-retries-and-timeouts)
|
|
82
|
+
- [Safety model](docs/safety.md)
|
|
83
|
+
- [Platforms and runtime modes](#platforms-and-runtime-modes)
|
|
84
|
+
- [Planning frameworks: standalone, SpecKit, GSD](#planning-frameworks-standalone-speckit-gsd)
|
|
85
|
+
- [Configuration](#configuration)
|
|
86
|
+
- [Files Autopilot creates](#files-autopilot-creates)
|
|
87
|
+
- [Troubleshooting and FAQ](docs/troubleshooting.md)
|
|
88
|
+
- [Known limitations](#known-limitations)
|
|
89
|
+
- [Development and tests](#development-and-tests)
|
|
90
|
+
- [Configuration reference](docs/configuration.md)
|
|
91
|
+
|
|
92
|
+
## Choose how to use it
|
|
93
|
+
|
|
94
|
+
| What you need | Run | Outcome |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| Build a feature or fix a bug from start to finish | `ap run "<request>"` | A reviewed plan, coded and tested phase by phase, waiting in your working tree |
|
|
97
|
+
| Only a reviewed plan, to read before any code is written | `ap run --stage planning "<request>"` | `PLAN.md` + `TASKS.md` approved by the plan reviewer |
|
|
98
|
+
| Run one step of an open mission yourself | `ap run --stage implement \| review \| verify` | That one step for the current phase, then it stops |
|
|
99
|
+
| A second opinion on a plan you already have | `ap plan-review <plan-file>` | A verdict and findings; nothing is changed |
|
|
100
|
+
| A review of a commit, a range, a diff or a folder | `ap code-review <target>` | A verdict and findings; nothing is changed |
|
|
101
|
+
| Check code against a list of requirements | `ap verify-file <criteria-file> [--cmd "<tests>"]` | A verdict per requirement, with the test output as evidence |
|
|
102
|
+
|
|
103
|
+
The same commands are available as `/ap.*` slash commands inside Claude Code,
|
|
104
|
+
opencode and Antigravity (see [Slash commands](#slash-commands-in-your-agent)).
|
|
105
|
+
|
|
106
|
+
## Get started
|
|
107
|
+
|
|
108
|
+
**You need:** Node.js 18 or newer, Git, and at least one supported coding-agent
|
|
109
|
+
CLI that is installed and signed in (Claude Code, opencode, Codex or Antigravity).
|
|
110
|
+
On Linux and WSL2 you also need `bubblewrap` for the read-only reviewers
|
|
111
|
+
(`sudo apt install bubblewrap` on Debian/Ubuntu).
|
|
112
|
+
|
|
113
|
+
**1. Install** — one command, then `ap` works in every terminal:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm install -g github:mmetwally-dev/project-autopilot
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**2. Set up a project** — from the project folder (a Git repository):
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
cd my-project
|
|
123
|
+
ap setup
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The setup wizard finds the installed CLIs and planning frameworks, asks which
|
|
127
|
+
CLI and model each role uses, suggests a test command for the gate, saves
|
|
128
|
+
`.autopilot/config.json`, adds `.autopilot/` to `.gitignore`, and installs the
|
|
129
|
+
`/ap.*` slash commands for the agents it found. If you skip this step,
|
|
130
|
+
`ap run` starts the wizard by itself the first time.
|
|
131
|
+
|
|
132
|
+
**3. Run a mission:**
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
ap run "Add a dark-mode toggle to the settings page"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**4. Watch it** — open `.autopilot/missions/<NNN-name>/WATCH-REPORT.md`. It
|
|
139
|
+
refreshes as the mission runs (see [WATCH-REPORT](#watching-a-mission-the-watch-report)).
|
|
140
|
+
|
|
141
|
+
**5. Review and commit** — the mission ends with
|
|
142
|
+
`ALL WORK COMPLETE — HUMAN COMMIT REQUIRED`. Read the diff (`git diff`) and
|
|
143
|
+
commit it yourself.
|
|
144
|
+
|
|
145
|
+
A mission can take a long time (tens of minutes to hours). To keep it running
|
|
146
|
+
after you close the terminal, use `ap run --detach "<request>"` on Linux/WSL2;
|
|
147
|
+
it runs under `systemd-run` when available (otherwise `setsid`) and writes
|
|
148
|
+
its output to the mission's `orchestrator.log`.
|
|
149
|
+
|
|
150
|
+
### Other ways to install
|
|
151
|
+
|
|
152
|
+
- **Update:** run the same `npm install -g …` command again.
|
|
153
|
+
- **Remove the CLI:** `npm uninstall -g project-autopilot`. To remove Autopilot from
|
|
154
|
+
one project instead, run `ap uninstall` there (see [Commands](#commands)).
|
|
155
|
+
- **From a local folder:** `npm install -g <path-to-project-autopilot>`.
|
|
156
|
+
- **Developing the skill itself:** run `npm link` once inside the checkout; `ap`
|
|
157
|
+
then runs that folder, so every edit is live. `npm unlink -g project-autopilot` undoes it.
|
|
158
|
+
- **No global install:** `node <path>/bin/ap.cjs <command>` always works.
|
|
159
|
+
Two thin launchers ship beside it: `bin/ap.cmd` for Native Windows (uses the
|
|
160
|
+
Windows `node`) and `bin/ap` for Linux/WSL2 (uses the distro's `node`). They
|
|
161
|
+
only forward the arguments and the exit code. On WSL2, `bin/ap` refuses a
|
|
162
|
+
Windows `node.exe` reached through interop instead of running the wrong runtime.
|
|
163
|
+
- **WSL2:** a Windows `ap` hands WSL2 missions over to WSL by itself. To type
|
|
164
|
+
`ap` inside a WSL shell too, run the same `npm install -g` there with the Linux `npm`.
|
|
165
|
+
- **Coding-agent skill discovery (optional):** to let an agent find the skill
|
|
166
|
+
through its `SKILL.md`, place the folder in your agent's skills directory
|
|
167
|
+
(for example `npx skills add mmetwally-dev/project-autopilot`). Typing `ap`
|
|
168
|
+
yourself does not need this.
|
|
169
|
+
- **Browser checks:** the verifier can use Playwright when a task needs a
|
|
170
|
+
browser. Install the browser once with `npm run playwright:install` from the
|
|
171
|
+
package folder.
|
|
172
|
+
|
|
173
|
+
If Node.js is missing, the launchers say that Node.js 18 or newer is required
|
|
174
|
+
and exit with code `127`; nothing is downloaded or changed.
|
|
175
|
+
|
|
176
|
+
There is no signing, certification or admin install. Each `ap run` does a quick
|
|
177
|
+
**preflight** instead: it checks that each configured CLI exists and answers
|
|
178
|
+
`--version`/`--help`, that the configured model/effort/variant flags exist for
|
|
179
|
+
that CLI, and that the repository and scratch paths are usable. A failed
|
|
180
|
+
preflight is a plain error message. (`ap adapter certify` and `ap adapter status`
|
|
181
|
+
still exist for old scripts; they only print that certification is no longer needed.)
|
|
182
|
+
|
|
183
|
+
## How a mission works
|
|
184
|
+
|
|
185
|
+
A **mission** is one request carried from plan to finished code. Each mission
|
|
186
|
+
has its own folder, `.autopilot/missions/<NNN>-<slug>/`, which keeps the plan,
|
|
187
|
+
the task list, the logs and the report after the mission ends.
|
|
188
|
+
|
|
189
|
+
### 1. Planning and plan review
|
|
190
|
+
|
|
191
|
+
The planner reads the repository and writes `PLAN.md` (goal, scope, design)
|
|
192
|
+
and `TASKS.md` (phases of small tasks). Every task is one concrete action on
|
|
193
|
+
about one file, names the exact paths, and says how it is accepted and how to
|
|
194
|
+
verify it, for example:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
- [ ] **1.2** Add `fillConfigFile()` to `scripts/config-fill.mjs` with a timestamped backup
|
|
198
|
+
— accept: the file gains the defaults and the backup matches the original
|
|
199
|
+
; verify: node scripts/test-config-fill-file.mjs
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The read-only plan reviewer then reads the plan against the request and the
|
|
203
|
+
code. If it finds problems (verdict **DENIED**), the planner revises and the
|
|
204
|
+
reviewer looks again, up to `retries.plan_revisions` rounds (default 8). An
|
|
205
|
+
**APPROVED** plan moves on to coding. With `ap run --stage planning` the mission
|
|
206
|
+
stops here so you can read the plan first.
|
|
207
|
+
|
|
208
|
+
### 2. Implementation, phase by phase
|
|
209
|
+
|
|
210
|
+
For each phase:
|
|
211
|
+
|
|
212
|
+
1. **Implementer** — each task runs in its own fresh session. If a task hits
|
|
213
|
+
its turn or token cap, the implementer writes a hand-off note
|
|
214
|
+
(`handoff/<task>.md`: what is done, what is next) and a new session continues
|
|
215
|
+
from it, up to `caps.implementer.extra_sessions` more sessions (default 5).
|
|
216
|
+
2. **Code review** — the read-only code reviewer checks the phase's changes. On
|
|
217
|
+
DENIED, only the tasks named by the findings are re-run with the findings
|
|
218
|
+
attached, and the reviewer then checks just its earlier findings plus the fix.
|
|
219
|
+
3. **Gate** — Autopilot itself runs your test commands (`tests.gate_commands`,
|
|
220
|
+
for example `npm test`). If tests fail, it re-runs them against the code as it
|
|
221
|
+
was before the phase: tests that also failed before are not blamed on this
|
|
222
|
+
phase; new failures go back to the implementer as a fix round.
|
|
223
|
+
4. **Verifier** — the read-only verifier checks every task of the phase against
|
|
224
|
+
its acceptance line, using the gate's results as evidence, and only then
|
|
225
|
+
ticks the tasks done in `TASKS.md`. Browser tasks can be checked with Playwright.
|
|
226
|
+
|
|
227
|
+
A failed review or verification sends the work back to the implementer. Each
|
|
228
|
+
kind of failure has its own budget (`retries.implementation`,
|
|
229
|
+
`retries.verification`, default 4). When a budget runs out the mission
|
|
230
|
+
**escalates** (see below) instead of looping forever.
|
|
231
|
+
|
|
232
|
+
### 3. Final review
|
|
233
|
+
|
|
234
|
+
When every phase has passed, the code reviewer reads the whole mission's
|
|
235
|
+
change once more. Findings get up to `retries.final_review_fix_rounds` fix
|
|
236
|
+
rounds (default 2). When it approves, the mission is **COMPLETED** and prints
|
|
237
|
+
`ALL WORK COMPLETE — HUMAN COMMIT REQUIRED`.
|
|
238
|
+
|
|
239
|
+
### When a mission stops: escalation
|
|
240
|
+
|
|
241
|
+
If Autopilot cannot finish safely — a budget is spent, a task stops making
|
|
242
|
+
progress, a CLI keeps failing, or something unexpected touched the repository —
|
|
243
|
+
it **escalates**: it saves its state, prints the reason and
|
|
244
|
+
`STOP — human intervention required`, and the report shows `ESCALATED`. Nothing
|
|
245
|
+
is reverted. Read the reason (the last lines of the run, or the WATCH-REPORT),
|
|
246
|
+
fix the cause, then:
|
|
247
|
+
|
|
248
|
+
- `ap run` (no request) resumes the same mission where it stopped;
|
|
249
|
+
- `ap reset` first, if the stop was a spent budget, gives it fresh attempts;
|
|
250
|
+
- `ap cancel` ends the mission if you want to give up on it.
|
|
251
|
+
|
|
252
|
+
The messages name the exact command when one is needed, for example
|
|
253
|
+
`Resume: ap reset --scope <key> then ap run`.
|
|
254
|
+
|
|
255
|
+
### Resuming and starting over
|
|
256
|
+
|
|
257
|
+
- `ap run` with **no request** resumes the open mission from its last checkpoint
|
|
258
|
+
and re-runs only unfinished work. The same happens with the **same** request.
|
|
259
|
+
- `ap run "<a different request>"` while a mission is open **abandons** that
|
|
260
|
+
mission and starts a new one. It does not ask (a question would break
|
|
261
|
+
unattended runs); it prints a clear takeover block instead: which mission is
|
|
262
|
+
abandoned, at which step, what survives (the mission folder, your files, your
|
|
263
|
+
Git tree — nothing is reverted) and which spent failure counters are cleared
|
|
264
|
+
for the new mission. Use `ap cancel` to end a mission without starting another.
|
|
265
|
+
|
|
266
|
+
### Smarter retries
|
|
267
|
+
|
|
268
|
+
- **Escalation model.** The planner and implementer can have a stronger
|
|
269
|
+
`escalation_model`. If a reviewer reports the same finding as *not fixed*
|
|
270
|
+
`retries.escalate_after_not_fixed` times in a row (default 2), the next fix
|
|
271
|
+
round runs on the escalation model, once per scope, then the role returns to
|
|
272
|
+
its normal model.
|
|
273
|
+
- **No-progress stop.** A continuation session that changes no project file is
|
|
274
|
+
"no progress". After `retries.no_progress_sessions` of them in a row
|
|
275
|
+
(default 2) the task stops early instead of using up all its sessions. The next
|
|
276
|
+
session's brief quotes the code lines the hand-off note points at, so it can
|
|
277
|
+
edit right away.
|
|
278
|
+
- **Hung sessions.** A session that prints nothing, runs nothing and writes
|
|
279
|
+
nothing for `time_limits.silent_run_minutes` (default 10) is stopped as
|
|
280
|
+
`IDLE_HANG`; a provider rate-limit storm is caught as `RATE_LIMITED`. Both count
|
|
281
|
+
as retryable infrastructure failures, not as the agent's fault.
|
|
282
|
+
|
|
283
|
+
## What runs where: support status
|
|
284
|
+
|
|
285
|
+
**Fully supported and tested in this version** — standalone and SpecKit
|
|
286
|
+
projects; the Claude Code, opencode, Codex and Antigravity CLIs as roles; Linux,
|
|
287
|
+
WSL2 and Native Windows.
|
|
288
|
+
|
|
289
|
+
**Not yet reviewed in this version — coming in a future version:**
|
|
290
|
+
|
|
291
|
+
- **GSD** projects. The GSD adapter is in the code (phase PLANs, waves,
|
|
292
|
+
planning-review stages), but it has not been reviewed and tested end to end
|
|
293
|
+
for this release. Its documentation and support will be completed in a future
|
|
294
|
+
version; use standalone or SpecKit for now.
|
|
295
|
+
- **Cursor** (`cursor-agent`). It is accepted as a role CLI and appears in the
|
|
296
|
+
setup list, but it has not been reviewed or tested yet. Full support and
|
|
297
|
+
documentation are planned for a future version.
|
|
298
|
+
|
|
299
|
+
| | Role CLI (runs planner/implementer/reviewers) | `/ap.*` slash commands | Model list in `ap config` |
|
|
300
|
+
| --- | --- | --- | --- |
|
|
301
|
+
| Claude Code (`claude`) | Yes | Yes — `.claude/commands/ap.<cmd>.md` | Documented aliases (no live list command) |
|
|
302
|
+
| opencode (`opencode`) | Yes, incl. free `*-free` models | Yes — `.opencode/command/ap.<cmd>.md` | Live (`opencode models`) |
|
|
303
|
+
| Codex (`codex`) | Yes | No (see below) | Live (app-server `model/list`) |
|
|
304
|
+
| Antigravity (`agy`) | Yes | Yes, in the `agy` CLI — `.agents/skills/ap.<cmd>/SKILL.md` | Manual entry |
|
|
305
|
+
| Cursor (`cursor-agent`) | Not yet reviewed — future version | No (see below) | Not yet reviewed |
|
|
306
|
+
|
|
307
|
+
| Framework | Status |
|
|
308
|
+
| --- | --- |
|
|
309
|
+
| Standalone (no framework) | Supported — the default; plans live in the mission folder |
|
|
310
|
+
| SpecKit | Supported |
|
|
311
|
+
| GSD | Not yet reviewed — future version (needs Strong mode) |
|
|
312
|
+
|
|
313
|
+
| Platform | Mode | Read-only reviewers |
|
|
314
|
+
| --- | --- | --- |
|
|
315
|
+
| Linux | `linux-strong` | OS-enforced with bubblewrap |
|
|
316
|
+
| WSL2 (Windows) | `wsl2-strong` (recommended on Windows) | OS-enforced with bubblewrap |
|
|
317
|
+
| Native Windows | `windows-compatibility` | Disposable-copy isolation (not OS-enforced) |
|
|
318
|
+
| macOS | not tested — [help wanted (#1)](https://github.com/mmetwally-dev/project-autopilot/issues/1) | — |
|
|
319
|
+
|
|
320
|
+
## Commands
|
|
321
|
+
|
|
322
|
+
Every command takes `--repo <path>`; the default is the current folder.
|
|
323
|
+
|
|
324
|
+
| Command | What it does |
|
|
325
|
+
| --- | --- |
|
|
326
|
+
| `ap setup` | First-time setup wizard for this project (roles, models, gate, runtime mode); also installs the slash commands |
|
|
327
|
+
| `ap run ["<request>"]` | Run a mission from start to finish; with no request, resume the open one |
|
|
328
|
+
| `ap run --stage <planning\|implement\|review\|verify>` | Run one stage only, then stop |
|
|
329
|
+
| `ap run --detach ["<request>"]` | Run in the background (Linux/WSL2) |
|
|
330
|
+
| `ap stop [--yes] [--dry-run]` | Stop the running mission but keep it; `ap run` continues it |
|
|
331
|
+
| `ap cancel ["<reason>"] [--yes] [--dry-run]` | End the mission for good (stops a live run first) |
|
|
332
|
+
| `ap reset [--scope <key>]` | Give spent retry counters a fresh start |
|
|
333
|
+
| `ap rebase [--note "<why>"] [--yes]` | Accept your own edits made while a mission was paused |
|
|
334
|
+
| `ap finding list` / `ap finding drop <n> [--note "<why>"] [--yes]` | List the current review findings / drop one you disagree with |
|
|
335
|
+
| `ap config [--role <role>]` | Change roles, models, the test command and other options interactively |
|
|
336
|
+
| `ap config show [--path <key.path>] [--explain]` | Print the effective settings, each marked `[default]` or `[from config.json]`; `--explain` adds a one-line explanation under each setting |
|
|
337
|
+
| `ap config fill [--dry-run]` | Add every missing setting at its default (after an upgrade) |
|
|
338
|
+
| `ap commands` | Re-install the `/ap.*` slash-command files |
|
|
339
|
+
| `ap plan-review <plan-file>` | Review a plan file, outside any mission |
|
|
340
|
+
| `ap code-review <target>` | Review a commit, range, diff file or folder, outside any mission |
|
|
341
|
+
| `ap verify-file <criteria-file> [--cmd "<tests>"]` | Check the code against a list of requirements, outside any mission |
|
|
342
|
+
| `ap uninstall [--dry-run] [--yes] [--keep-missions]` | Remove Autopilot from this project only |
|
|
343
|
+
| `ap help` | Print the command list |
|
|
344
|
+
|
|
345
|
+
**Exit codes:** `0` success, a dry-run preview, or nothing to do; `1` a refusal or
|
|
346
|
+
failure (prompt answered `N`, `--yes` missing without a terminal, kill failed,
|
|
347
|
+
several live runs, reset with nothing to clear); `2` usage errors such as
|
|
348
|
+
`Unknown command`; `127` a launcher found no Node.js 18+.
|
|
349
|
+
|
|
350
|
+
**Confirmations.** `stop`, `cancel`, `rebase`, `finding drop` and `uninstall`
|
|
351
|
+
print exactly what they will do and ask `y/N`. `--dry-run` shows the plan and
|
|
352
|
+
changes nothing; `--yes` skips the question and is required when there is no
|
|
353
|
+
terminal (a script never changes state silently). `run` and `reset` never ask.
|
|
354
|
+
|
|
355
|
+
**Windows + WSL2.** With a saved `wsl2-strong` mode, `run`, `stop` and `cancel`
|
|
356
|
+
typed on Windows hand over to WSL, so they act where the mission really runs.
|
|
357
|
+
|
|
358
|
+
**From a batch file,** call any `.cmd` shim as `call ap ...`, otherwise CMD does
|
|
359
|
+
not return to your script.
|
|
360
|
+
|
|
361
|
+
`ap status` and `ap watch` are not commands; the WATCH-REPORT is the status view.
|
|
362
|
+
|
|
363
|
+
## Slash commands in your agent
|
|
364
|
+
|
|
365
|
+
`ap setup` (or `ap commands`) installs one set of `/ap.*` commands, with the
|
|
366
|
+
same SpecKit-style dot names in every supported agent, for the agents it finds
|
|
367
|
+
on your PATH. Open a new session in that agent afterwards. Type them in the
|
|
368
|
+
agent's **chat**; each one runs the matching terminal command, and anything you
|
|
369
|
+
type after the command is passed on as its arguments.
|
|
370
|
+
|
|
371
|
+
| Slash command | Does | Same as |
|
|
372
|
+
| --- | --- | --- |
|
|
373
|
+
| `/ap.run` | The whole job: plan, code, review, test until done. All phases, with fix rounds | `ap run` |
|
|
374
|
+
| `/ap.plan` | Step 1 only: write a reviewed plan + task list, then stop (includes the plan review) | `ap run --stage planning` |
|
|
375
|
+
| `/ap.implement` | Step 2 only: code the current phase, then stop (no review) | `ap run --stage implement` |
|
|
376
|
+
| `/ap.review` | Step 3 only: review the code just written, then stop | `ap run --stage review` |
|
|
377
|
+
| `/ap.verify` | Step 4 only: test the code just reviewed and tick its tasks done | `ap run --stage verify` |
|
|
378
|
+
| `/ap.plan-review` | Review a plan file you give (outside any mission) | `ap plan-review <plan-file>` |
|
|
379
|
+
| `/ap.code-review` | Review a commit, range, diff or folder (outside any mission) | `ap code-review <target>` |
|
|
380
|
+
| `/ap.verify-file` | Check the code against your requirements list (outside any mission) | `ap verify-file <criteria-file> [--cmd "..."]` |
|
|
381
|
+
| `/ap.stop` | Pause the running mission (continue later with `/ap.run`) — user-only | `ap stop --yes` |
|
|
382
|
+
| `/ap.cancel` | End the current mission for good — user-only | `ap cancel --yes` |
|
|
383
|
+
|
|
384
|
+
- `/ap.plan` and `/ap.run` can start a new mission from a request or resume the
|
|
385
|
+
open one. `/ap.implement`, `/ap.review` and `/ap.verify` need an already-planned
|
|
386
|
+
mission, act on its current phase only, and work with standalone missions only.
|
|
387
|
+
- **User-only:** `/ap.stop` and `/ap.cancel` can only be typed by you, never
|
|
388
|
+
started by the model (Claude Code: `disable-model-invocation: true`; opencode
|
|
389
|
+
commands are user-typed by design). Typing them is the confirmation, so they
|
|
390
|
+
pass `--yes`. `ap stop` stops only the mission's own process, never your chat session.
|
|
391
|
+
- `reset`, `rebase`, `uninstall`, `setup` and `config` are terminal-only.
|
|
392
|
+
|
|
393
|
+
Where the files go: Claude Code `.claude/commands/ap.<cmd>.md`, opencode
|
|
394
|
+
`.opencode/command/ap.<cmd>.md`, Antigravity `.agents/skills/ap.<cmd>/SKILL.md`.
|
|
395
|
+
Generated files carry a marker; your own files are never touched, and older
|
|
396
|
+
generated names (`.claude/commands/ap/*.md`, `.opencode/command/ap-*.md`) are
|
|
397
|
+
cleaned up by `ap setup`, `ap commands` and `ap uninstall`.
|
|
398
|
+
|
|
399
|
+
**Agents without slash commands:**
|
|
400
|
+
|
|
401
|
+
- **Codex** — no verifiable custom-prompt loader in codex 0.150.1 (no
|
|
402
|
+
`~/.codex/prompts` support found in the binary). Codex still works as a role
|
|
403
|
+
CLI; use the terminal commands.
|
|
404
|
+
- **Cursor** — the `.cursor/commands` format is not verifiable offline (no Cursor
|
|
405
|
+
CLI installed when this was built). Planned for a future version together with
|
|
406
|
+
Cursor role support.
|
|
407
|
+
|
|
408
|
+
**Antigravity notes.** `/ap.*` commands are verified in the `agy` CLI (1.3.4+).
|
|
409
|
+
The Antigravity IDE (2.5.x) shows no slash commands at all when the workspace
|
|
410
|
+
is in WSL, so IDE-over-WSL is not supported yet. `/ap.stop` and `/ap.cancel` are
|
|
411
|
+
not generated for Antigravity, because its skills can be started by the model
|
|
412
|
+
with no way to turn that off; use `ap stop --yes` / `ap cancel --yes` in a terminal.
|
|
413
|
+
Headless `agy` runs use `--mode accept-edits` for writing roles and
|
|
414
|
+
`--mode plan` for read-only roles, never `--dangerously-skip-permissions`; a
|
|
415
|
+
write run that needs a command permission fails clearly with `PERMISSION_DENIED`.
|
|
416
|
+
|
|
417
|
+
## Adhoc reviews (plan-review, code-review, verify-file)
|
|
418
|
+
|
|
419
|
+
One-shot reviews that run **outside any mission**: they change no mission
|
|
420
|
+
state and never commit. They use the same role configuration as missions.
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
ap plan-review docs/PLAN.md # role plan_reviewer
|
|
424
|
+
ap code-review HEAD~3..HEAD # a range
|
|
425
|
+
ap code-review --commit 1a2b3c4 # one commit
|
|
426
|
+
ap code-review --diff-file my-change.diff # a diff file
|
|
427
|
+
ap code-review src/payments # a folder
|
|
428
|
+
ap verify-file requirements.md --cmd "npm test" # role verifier, with test evidence
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
- `ap code-review` takes `<range> | <commit> | <diff-file> | <path>`, or the
|
|
432
|
+
explicit `--range <a..b>`, `--commit <sha>`, `--diff-file <file>`.
|
|
433
|
+
- `ap verify-file` reads a criteria file (one requirement per line or bullet).
|
|
434
|
+
With `--cmd`, Autopilot runs that command first, outside the reviewer's
|
|
435
|
+
sandbox and never in a way that can write to your repository, and gives its
|
|
436
|
+
output to the verifier as evidence.
|
|
437
|
+
|
|
438
|
+
**Refusals** (exit 2, nothing runs): missing or unreadable input, `verify-file`
|
|
439
|
+
with no checkable criteria, `code-review` with an invalid range/commit or a diff
|
|
440
|
+
it cannot resolve, and `--cmd` on anything but `verify-file`. Agent/runtime
|
|
441
|
+
failures exit 1.
|
|
442
|
+
|
|
443
|
+
**Output** goes to `.autopilot/adhoc/<timestamp>-<role>/summary.md` (verdict,
|
|
444
|
+
findings and the `--cmd` evidence), plus `cmd-evidence.txt` when `--cmd` was used.
|
|
445
|
+
The agent run's own files are in a `NN-<role>-<id8>/` subfolder named in the summary.
|
|
446
|
+
|
|
447
|
+
## Mission control: stop, cancel, reset, rebase, finding
|
|
448
|
+
|
|
449
|
+
Five operator-only commands act on the **active** mission. Every one records
|
|
450
|
+
what it did in `state.json` and in the WATCH-REPORT, so the history stays readable.
|
|
451
|
+
|
|
452
|
+
| You want to… | Use |
|
|
453
|
+
| --- | --- |
|
|
454
|
+
| pause now and continue later | `ap stop` |
|
|
455
|
+
| give up on this mission | `ap cancel` |
|
|
456
|
+
| retry after a budget ran out | `ap reset`, then `ap run` |
|
|
457
|
+
| keep your own edits made during a pause | `ap rebase --note "<why>"`, then `ap run` |
|
|
458
|
+
| reject a review finding you disagree with | `ap finding list`, `ap finding drop <n>` |
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
ap stop --dry-run # show the live process; kill nothing
|
|
462
|
+
ap stop --yes # stop now, keep the mission
|
|
463
|
+
ap cancel "superseded by a new request" # shows the plan, asks y/N
|
|
464
|
+
ap cancel --dry-run
|
|
465
|
+
ap reset # clear every spent counter
|
|
466
|
+
ap reset --scope infrastructureRetryBudget:mission
|
|
467
|
+
ap reset --scope standalone:P2:T1:7d1f10325a73 # one task's session allowance (bare task id)
|
|
468
|
+
ap rebase --note "fixed the import path by hand" --yes
|
|
469
|
+
ap finding list
|
|
470
|
+
ap finding drop 4 --note "operator code, not phase work" --yes
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### `ap stop` — pause, keep the mission
|
|
474
|
+
|
|
475
|
+
Stops the live run and keeps everything: state, checkpoints, counters. It sends
|
|
476
|
+
SIGTERM, waits 10 seconds so the run can save its state, and only then SIGKILL
|
|
477
|
+
(`taskkill /T`, then `/T /F` on Windows). The runs it stopped are marked
|
|
478
|
+
`INTERRUPTED`. `ap run` with no request resumes. With nothing running it says
|
|
479
|
+
`No mission is running.` (or names the idle mission and points at `ap cancel`)
|
|
480
|
+
and changes nothing.
|
|
481
|
+
|
|
482
|
+
### `ap cancel [reason]` — end the mission
|
|
483
|
+
|
|
484
|
+
Prints the plan first — the mission, its phase/step, the fields it will clear,
|
|
485
|
+
what it keeps — then asks `y/N`. If a run is alive, the same single prompt covers
|
|
486
|
+
stopping it, and the process is confirmed dead before any state is cleared (a
|
|
487
|
+
failed kill leaves the mission untouched). Answering `N` prints
|
|
488
|
+
`aborted — nothing was changed.` and exits 1.
|
|
489
|
+
|
|
490
|
+
After `y`: the mission's phase/step become `cancelled`, its mission-scoped state
|
|
491
|
+
is cleared (checkpoints, current phase/task, feedback, last failure and the like),
|
|
492
|
+
and the reason is saved in `lastCancelled`. It does **not** revert any file or
|
|
493
|
+
Git change and does **not** delete the mission folder, which stays as the record.
|
|
494
|
+
Failure counters are left alone and cleared when the next mission starts.
|
|
495
|
+
The next `ap run "<request>"` starts a new mission.
|
|
496
|
+
|
|
497
|
+
### `ap reset [--scope <key>]` — fresh attempts
|
|
498
|
+
|
|
499
|
+
When a retry budget runs out, the mission escalates. `ap reset` gives it one
|
|
500
|
+
more chance without starting over:
|
|
501
|
+
|
|
502
|
+
- **No `--scope`:** clears every spent counter — all failure budgets, all task
|
|
503
|
+
session allowances and their dead-ends, and the plan revision counter. Review
|
|
504
|
+
feedback, the stage position and hand-off notes are kept.
|
|
505
|
+
- **`--scope <key>`:** clears one thing only:
|
|
506
|
+
- a failure budget, e.g. `infrastructureRetryBudget:mission`;
|
|
507
|
+
- a task's session allowance — the full key, the scope
|
|
508
|
+
(`task:standalone:phase-1:<taskId>`) or just the task id. It keeps the task's
|
|
509
|
+
hand-off note, which is the useful context for the next session. After a
|
|
510
|
+
"did not converge" stop, a bare `ap reset` targets that task automatically;
|
|
511
|
+
- `standalone-plan-revision`, the plan review round counter;
|
|
512
|
+
- `fallback:<role>`, to drop a role's sticky fallback model and go back to its primary.
|
|
513
|
+
|
|
514
|
+
While a mission is **stopped**, the reset applies at once. While a mission is
|
|
515
|
+
**running**, it is queued (`.autopilot/reset-request.json`) and the running
|
|
516
|
+
mission applies it at its next failure decision, so it continues instead of
|
|
517
|
+
escalating — no stop or restart. A reset buys more attempts; it does not fix the
|
|
518
|
+
cause, so a revoked login, a denied path or a real test failure will come back.
|
|
519
|
+
With nothing to clear it exits 1 and lists the kinds of target it accepts.
|
|
520
|
+
|
|
521
|
+
### `ap rebase [--note "<why>"] [--yes]` — accept your own edits
|
|
522
|
+
|
|
523
|
+
Autopilot fingerprints the files of the current phase. If you edit or commit
|
|
524
|
+
something while the mission is paused, the next `ap run` stops with a
|
|
525
|
+
checkpoint drift (`PHASE_CHECKPOINT_DRIFT`) instead of mixing your change into
|
|
526
|
+
the agents' work unnoticed. `ap rebase` accepts your change: it re-points the
|
|
527
|
+
checkpoint at the current files, moves the phase's baseline onto `HEAD` (so your
|
|
528
|
+
commits stop showing up as phase work), and records your edit. The `--note` text
|
|
529
|
+
is shown to the next implementer and reviewer as
|
|
530
|
+
`Operator note: … (from ap rebase)`. The stage position does not change. It
|
|
531
|
+
refuses while a run is live; with no drift it still re-bases the baseline, or
|
|
532
|
+
prints `nothing to rebase`.
|
|
533
|
+
|
|
534
|
+
### `ap finding list` / `ap finding drop <n>` — reject a finding
|
|
535
|
+
|
|
536
|
+
`ap finding list` numbers the open review findings of the current phase.
|
|
537
|
+
`ap finding drop <n>` removes finding *n* from the saved feedback and the
|
|
538
|
+
review history, so the next fix round no longer asks the implementer to change
|
|
539
|
+
it. The dropped finding, your note and the time are recorded. `--scope <key>`
|
|
540
|
+
targets another feedback scope. Refuses while a run is live.
|
|
541
|
+
|
|
542
|
+
## Watching a mission: the WATCH-REPORT
|
|
543
|
+
|
|
544
|
+
`.autopilot/missions/<mission>/WATCH-REPORT.md` is the live status page. It
|
|
545
|
+
opens with the pipeline state:
|
|
546
|
+
|
|
547
|
+
```text
|
|
548
|
+
=== PIPELINE STATE ===
|
|
549
|
+
Mission: 097-implement-backlog-item
|
|
550
|
+
Status: COMPLETED
|
|
551
|
+
Stage: done
|
|
552
|
+
Budgets: implementation=0/4 (2 in earlier phases) verification=0/4 adapter=0/3 infrastructure=0/3
|
|
553
|
+
Total: 9.27M · elapsed 04:57:30 wall (planning 1.32M · phase 1 2.17M · …)
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
**Status** is one of `RUNNING`, `STOPPED`, `ESCALATED`, `COMPLETED`, `CANCELLED`.
|
|
557
|
+
Then one section per stage (planning, each phase with its attempts, final
|
|
558
|
+
review), and one row per agent run:
|
|
559
|
+
|
|
560
|
+
```text
|
|
561
|
+
ROLE MODEL TASK STATUS DURATION PRICE CONTEXT TURNS NOTE
|
|
562
|
+
07-implementer-eac2b56a deepseek-v4.1-flash-free T1.1 COMPLETED 00:01:04 92.1K 31.2K 15 session 1 of 6
|
|
563
|
+
14-code_reviewer-f0061b9e opus-5.5 T1.1 > T1.7 DENIED 00:01:53 182.2K 66.4K 15 phase review · 3 findings
|
|
564
|
+
GATE (orchestrator) - T1.1 > T1.7 PASS 00:27:07 - - - full test suite
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
- **STATUS** — `COMPLETED` (a writing role finished), `APPROVED`/`DENIED` (a
|
|
568
|
+
reviewer's verdict), `PASS`/`FAIL` (the gate), `INTERRUPTED` (stopped by `ap stop`).
|
|
569
|
+
- **PRICE** — tokens used; it starts with `~` while the run is still going.
|
|
570
|
+
**CONTEXT** — the largest context the session reached. **TURNS** — model turns.
|
|
571
|
+
`-` means the CLI reports no usage.
|
|
572
|
+
- **NOTE** — the session number, the number of findings, and warnings such as
|
|
573
|
+
`⚠ high usage` (over the role's cap) or `haiku→sonnet !` (see below).
|
|
574
|
+
|
|
575
|
+
The same folder has `orchestrator.log` (the full log), `gates/` (each gate's
|
|
576
|
+
output), `handoff/` (hand-off notes), `phase-briefs/` and `runs/` (each agent
|
|
577
|
+
run's brief, output and result).
|
|
578
|
+
|
|
579
|
+
## Roles, models and fallbacks
|
|
580
|
+
|
|
581
|
+
| Role | Writes to the repo? | Job |
|
|
582
|
+
| --- | --- | --- |
|
|
583
|
+
| `planner` | Yes (the plan files) | Writes `PLAN.md` and `TASKS.md`, revises them after review |
|
|
584
|
+
| `plan_reviewer` | No — read-only | Approves or denies the plan with findings |
|
|
585
|
+
| `implementer` | Yes | Codes one task per session; fixes findings |
|
|
586
|
+
| `code_reviewer` | No — read-only | Reviews each phase, and the whole change in the final review |
|
|
587
|
+
| `verifier` | No — read-only | Checks each task's acceptance line with the gate results; ticks tasks done |
|
|
588
|
+
|
|
589
|
+
Each role has a `cli`, `model`, `reasoning` (effort), `variant`, and optional
|
|
590
|
+
`fallbacks`; the planner and implementer can also have an `escalation_model`.
|
|
591
|
+
Set them with `ap setup`, or later with `ap config` (all roles, or one with
|
|
592
|
+
`ap config --role implementer`).
|
|
593
|
+
|
|
594
|
+
**Keep the reviewers independent.** Never use the same model for
|
|
595
|
+
`code_reviewer` as for `implementer`, or for `plan_reviewer` as for `planner` —
|
|
596
|
+
not as primary and not as fallback. A model reviewing its own work misses its
|
|
597
|
+
own mistakes. `ap setup` and `ap config` warn about it.
|
|
598
|
+
|
|
599
|
+
**Fallbacks.** Each role can list fallback models, tried in order **only** when
|
|
600
|
+
the current model is rate-limited or out of quota — never for other failures.
|
|
601
|
+
The chosen fallback stays in use (sticky); the primary model is tried again
|
|
602
|
+
after `advanced.fallback_retry_primary_minutes` (default 60). A model that one
|
|
603
|
+
role found rate-limited is skipped by the other roles for the same window.
|
|
604
|
+
`ap reset --scope fallback:<role>` returns a role to its primary at once.
|
|
605
|
+
|
|
606
|
+
**Free models (opencode `*-free`).** When a free model has used up its
|
|
607
|
+
configured fallbacks on a rate limit, Autopilot tries the other free models it
|
|
608
|
+
discovers — never paid ones (turn this off with
|
|
609
|
+
`roles.free_models.auto_fallback: false`). Roles on a free model get at least
|
|
610
|
+
`roles.free_models.max_turns` turns (default 45), because free models often need
|
|
611
|
+
more turns; token caps and paid models are unchanged.
|
|
612
|
+
|
|
613
|
+
**How `ap config` finds models.** It asks the installed CLI first: opencode
|
|
614
|
+
`opencode models`, Codex its app-server `model/list`. These are your real,
|
|
615
|
+
live lists. When a CLI has no machine-readable list, Autopilot does not invent
|
|
616
|
+
one: it offers a dated, sourced list of documented options where one ships (for
|
|
617
|
+
Claude Code, its published aliases such as `opus`, `sonnet`, `haiku`, `fable`,
|
|
618
|
+
`opusplan`; see [anthropics/claude-code#12612](https://github.com/anthropics/claude-code/issues/12612)),
|
|
619
|
+
marked as **non-live**, and always lets you type a model name or leave it blank
|
|
620
|
+
for the CLI default. Effort levels come from the same sources (Codex has a
|
|
621
|
+
documented fallback list). Before saving, each role is checked: a live model must
|
|
622
|
+
be in the live list and unsupported flags are refused. `node scripts/doctor.mjs`
|
|
623
|
+
flags a documented list older than 180 days.
|
|
624
|
+
|
|
625
|
+
**Haiku on read-only Claude roles runs as Sonnet.** The read-only roles start
|
|
626
|
+
Claude with `--permission-mode plan`, and Claude Code runs plan mode on Sonnet
|
|
627
|
+
when Haiku is selected. A reviewer set to `haiku` therefore really runs (and
|
|
628
|
+
bills) Sonnet. Setup, `ap config` and `ap run` warn about it, and the report
|
|
629
|
+
marks it `haiku→sonnet !`. Haiku as implementer runs as Haiku.
|
|
630
|
+
|
|
631
|
+
**What really ran.** For every run Autopilot records the exact CLI command and
|
|
632
|
+
checks before launch that the configured model, effort and variant are really in
|
|
633
|
+
it. Each run writes a result file (`autopilot-relay.result.v3`) with the
|
|
634
|
+
requested model, the final arguments, the exit, the session id, the touched files
|
|
635
|
+
and the policy status. Autopilot does not claim the provider used the model
|
|
636
|
+
unless the provider reports it. No separate API key is needed; Autopilot uses
|
|
637
|
+
each CLI's own sign-in.
|
|
638
|
+
|
|
639
|
+
## Limits: caps, retries and timeouts
|
|
640
|
+
|
|
641
|
+
Every limit is a setting; see the [Configuration reference](docs/configuration.md)
|
|
642
|
+
for all of them with their defaults.
|
|
643
|
+
|
|
644
|
+
- **Caps (per session):** `caps.<role>.max_turns`, `max_tokens` and
|
|
645
|
+
`wrap_up_at_tokens`. Near the token cap the role is told to wrap up and write
|
|
646
|
+
its hand-off; at the cap the session ends and `extra_sessions` decides whether
|
|
647
|
+
a fresh session continues. `caps.mission_token_backstop` (default 6M tokens)
|
|
648
|
+
stops a runaway mission. `caps.task_size_target_turns` (default 30) tells the
|
|
649
|
+
planner how big one task may be.
|
|
650
|
+
- **Retries:** plan revisions (8), implementation failures (4), verification
|
|
651
|
+
failures (4), final-review fix rounds (2), CLI errors (3), infrastructure
|
|
652
|
+
failures (3), no-progress sessions (2).
|
|
653
|
+
- **Timeouts:** `time_limits.role_timeout_minutes` (60 per session, 180 for the
|
|
654
|
+
verifier, which waits for the full test suite), `time_limits.call_backstop_minutes`
|
|
655
|
+
(200, a hard stop for one call; the old name `mission_timeout_minutes` is still
|
|
656
|
+
read and renamed by `ap config fill`), `silent_run_minutes` (10),
|
|
657
|
+
`no_first_output_minutes` (3), `read_only_max_silence_minutes` (15) and
|
|
658
|
+
`retry_wait_seconds` (60).
|
|
659
|
+
|
|
660
|
+
## Safety model
|
|
661
|
+
|
|
662
|
+
Autopilot never commits or pushes, and the read-only reviewers cannot change
|
|
663
|
+
your repository: on Linux and WSL2 bubblewrap mounts it read-only, while Native
|
|
664
|
+
Windows uses a throwaway copy. Every role is snapshotted, touched files are
|
|
665
|
+
recorded, and a read-only violation stops the mission.
|
|
666
|
+
|
|
667
|
+
See [docs/safety.md](docs/safety.md) for the full safety model.
|
|
668
|
+
|
|
669
|
+
## Platforms and runtime modes
|
|
670
|
+
|
|
671
|
+
`runtime.mode` decides how the read-only roles are contained. `ap setup`
|
|
672
|
+
detects what the machine can do: on Native Windows it asks only when both WSL2
|
|
673
|
+
and Windows Compatibility are usable (WSL2 Strong needs node, bubblewrap and your
|
|
674
|
+
agent CLIs signed in inside WSL); with one usable mode it picks that mode and
|
|
675
|
+
says so.
|
|
676
|
+
|
|
677
|
+
| Mode | Where | Reviewers |
|
|
678
|
+
| --- | --- | --- |
|
|
679
|
+
| `linux-strong` | Native Linux | bubblewrap, OS-enforced |
|
|
680
|
+
| `wsl2-strong` | Windows with WSL2 (recommended) | bubblewrap inside the WSL distro (`runtime.wsl_distro`) |
|
|
681
|
+
| `windows-compatibility` | Native Windows, SpecKit and standalone only | disposable-copy isolation, not OS-enforced |
|
|
682
|
+
|
|
683
|
+
With `wsl2-strong`, you can type `ap` in Windows (PowerShell or CMD); `run`,
|
|
684
|
+
`stop` and `cancel` are handed to WSL automatically, and the mission runs there.
|
|
685
|
+
The planner and implementer write to the repository in every mode.
|
|
686
|
+
|
|
687
|
+
## Planning frameworks: standalone, SpecKit, GSD
|
|
688
|
+
|
|
689
|
+
`project.planning_framework` is `standalone`, `speckit`, `gsd` or `auto`
|
|
690
|
+
(detect). `ap setup` detects what the project uses.
|
|
691
|
+
|
|
692
|
+
**Standalone** (the default — nothing else to install). Each mission keeps its
|
|
693
|
+
plan in `.autopilot/missions/<NNN>-<slug>/PLAN.md` and `TASKS.md`. All
|
|
694
|
+
features, including `--stage`, work here.
|
|
695
|
+
|
|
696
|
+
**SpecKit.** `.specify/workflows/speckit/workflow.yml` is the source of truth.
|
|
697
|
+
Its command steps (`specify`, `plan`, `tasks`) go to the planner, its gate
|
|
698
|
+
steps (`review-spec`, `review-plan`) to the plan reviewer, and implementation
|
|
699
|
+
is run by Autopilot's own engine, with the same code review, gate and
|
|
700
|
+
verification as standalone. Task files are found with
|
|
701
|
+
`frameworks.speckit.task_files` (default `specs/*/tasks.md` and friends).
|
|
702
|
+
|
|
703
|
+
**Entering a project that is already planned.** `ap run` first looks at the
|
|
704
|
+
existing SpecKit, GSD or Autopilot state and decides where to start:
|
|
705
|
+
|
|
706
|
+
- **missing** — no plan yet: start planning from the beginning;
|
|
707
|
+
- **partial** — some planning done: check it, then continue from the first
|
|
708
|
+
unfinished planning step;
|
|
709
|
+
- **complete** — spec/plan/tasks are there: run an independent read-only check of
|
|
710
|
+
the plan, then go straight to coding;
|
|
711
|
+
- **ambiguous** — conflicting evidence: stop and ask rather than guess.
|
|
712
|
+
|
|
713
|
+
Existing planning files are kept. Autopilot's own checkpoints take precedence
|
|
714
|
+
for work it started itself.
|
|
715
|
+
|
|
716
|
+
**GSD — not yet reviewed in this version, coming in a future version.** The
|
|
717
|
+
code contains a GSD adapter: it reads `.planning/` (PLAN frontmatter for
|
|
718
|
+
phase/plan/wave/dependencies), runs PLAN tasks through the same engine, can review
|
|
719
|
+
each planning stage (`frameworks.gsd.planning_review`), and can run independent
|
|
720
|
+
PLANs of one wave in separate worktrees. It requires Strong mode. It has not been
|
|
721
|
+
reviewed and tested end to end for this release, so it is not documented as
|
|
722
|
+
supported yet, and `ap setup` / `ap config` do not offer it; full documentation
|
|
723
|
+
will follow in a future version.
|
|
724
|
+
|
|
725
|
+
## Configuration
|
|
726
|
+
|
|
727
|
+
Settings live in `.autopilot/config.json`, in the v4 layout
|
|
728
|
+
(`schema_version: "4.0"`) with these sections: `project`, `roles`, `caps`,
|
|
729
|
+
`retries`, `time_limits`, `workflow`, `tests`, `safety`, `runtime`,
|
|
730
|
+
`frameworks`, `advanced`. Every setting, its default and its allowed values are
|
|
731
|
+
listed in the [Configuration reference](docs/configuration.md) at the end
|
|
732
|
+
of this page, generated from `config.schema.json`.
|
|
733
|
+
|
|
734
|
+
- **`ap config`** edits the file interactively: it shows the current roles,
|
|
735
|
+
then lets you change all of them or one (`ap config --role <role>`). It edits
|
|
736
|
+
the existing file and never reinstalls anything.
|
|
737
|
+
- **`ap config show [--path <key.path>] [--explain]`** prints the effective configuration:
|
|
738
|
+
your values plus the code defaults, each marked `[default]` or `[from config.json]`.
|
|
739
|
+
`--explain` adds a one-line explanation under each setting.
|
|
740
|
+
- **`ap config fill [--dry-run]`** adds every missing setting at its default
|
|
741
|
+
(useful after an upgrade or a hand edit). It keeps every existing value
|
|
742
|
+
(including `null` and empty lists), renames old setting names in place (for
|
|
743
|
+
example `mission_timeout_minutes` → `call_backstop_minutes`, value kept), and
|
|
744
|
+
repairs the `$schema` path so editors find `config.schema.json`. `--dry-run`
|
|
745
|
+
only prints what would change. A timestamped `config.json.bak-<time>` backup is
|
|
746
|
+
written before any change. It never invents a `runtime` mode you did not choose.
|
|
747
|
+
- **Editor help.** The `$schema` line points at the installed
|
|
748
|
+
`config.schema.json`, so editors such as VS Code show descriptions,
|
|
749
|
+
defaults and allowed values while you edit, and flag typos. Keys starting with
|
|
750
|
+
`_` are allowed for your own comments.
|
|
751
|
+
- **Upgrades.** Older 2.x/3.x configs are migrated automatically on first use,
|
|
752
|
+
with one timestamped backup. Removed fields (for example the old certification
|
|
753
|
+
settings) are dropped; this never blocks the migration.
|
|
754
|
+
- **Full example:** [`config.example.json`](config.example.json) shows every setting.
|
|
755
|
+
|
|
756
|
+
Most-changed settings:
|
|
757
|
+
|
|
758
|
+
| Setting | Why you would change it |
|
|
759
|
+
| --- | --- |
|
|
760
|
+
| `roles.<role>.cli` / `.model` / `.reasoning` | Which agent and model does each job |
|
|
761
|
+
| `tests.gate_commands` | The test commands the gate runs, e.g. `["npm test"]` |
|
|
762
|
+
| `workflow.plan_review`, `workflow.code_review_per_phase`, `workflow.final_review` | Turn a review stage off (all on by default) |
|
|
763
|
+
| `retries.*` | More or fewer attempts before a mission escalates |
|
|
764
|
+
| `time_limits.role_timeout_minutes` | Longer sessions for a slow test suite |
|
|
765
|
+
| `tests.require_browser`, `tests.browser` | When and how the verifier uses a browser |
|
|
766
|
+
|
|
767
|
+
## Files Autopilot creates
|
|
768
|
+
|
|
769
|
+
Everything lives in `.autopilot/` (git-ignored by setup):
|
|
770
|
+
|
|
771
|
+
```text
|
|
772
|
+
.autopilot/
|
|
773
|
+
config.json your settings
|
|
774
|
+
state.json mission state and checkpoints (do not edit by hand)
|
|
775
|
+
missions/<NNN>-<slug>/ one folder per mission, kept after it ends
|
|
776
|
+
PLAN.md, TASKS.md the plan and the task list (ticked as tasks pass)
|
|
777
|
+
WATCH-REPORT.md live status
|
|
778
|
+
orchestrator.log full log
|
|
779
|
+
gates/ handoff/ phase-briefs/ runs/
|
|
780
|
+
adhoc/<time>-<role>/ adhoc review results
|
|
781
|
+
runs/ shared run records
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
Outside `.autopilot/` it only writes the slash-command files and one
|
|
785
|
+
`.autopilot/` line in `.gitignore`. **`ap uninstall`** removes exactly those:
|
|
786
|
+
the `.autopilot/` folder and that one `.gitignore` line (matched exactly; a
|
|
787
|
+
similar line of yours is kept). Your code and Git tree are untouched.
|
|
788
|
+
`--keep-missions` first copies `missions/` to `autopilot-missions-archive-<date>`
|
|
789
|
+
at the repository root. It refuses while a run is live, and on a project that is
|
|
790
|
+
not set up it prints `Autopilot is not set up here.` and exits 0.
|
|
791
|
+
|
|
792
|
+
## Troubleshooting and FAQ
|
|
793
|
+
|
|
794
|
+
Short answers for the common stops: STOP human intervention required,
|
|
795
|
+
READ_ONLY_CONTAINMENT_UNAVAILABLE, PHASE_CHECKPOINT_DRIFT, rate limits, idle
|
|
796
|
+
hangs and gate failures. Autopilot never commits and needs no API key.
|
|
797
|
+
|
|
798
|
+
See [docs/troubleshooting.md](docs/troubleshooting.md) for the full troubleshooting guide and FAQ.
|
|
799
|
+
|
|
800
|
+
## Known limitations
|
|
801
|
+
|
|
802
|
+
- **OS-enforced read-only containment is Linux/WSL2 only.** Native Windows uses
|
|
803
|
+
disposable-copy isolation, which is not OS-enforced; GSD needs Strong mode.
|
|
804
|
+
- **Containment covers the filesystem, not the network.** Agents keep their
|
|
805
|
+
normal network access. For network-restricted unattended runs, run the whole
|
|
806
|
+
process in a container or VM.
|
|
807
|
+
- **The preflight is a quick check, not a security boundary.** It confirms that
|
|
808
|
+
each CLI runs and that the flags exist; it proves nothing about containment.
|
|
809
|
+
- **GSD and Cursor** are not yet reviewed — planned for a future version.
|
|
810
|
+
- **Antigravity IDE over WSL** shows no slash commands; use the `agy` CLI.
|
|
811
|
+
- **macOS** has not been tested yet. If you use a Mac, a short test run helps a
|
|
812
|
+
lot: see [Help wanted: macOS testing (#1)](https://github.com/mmetwally-dev/project-autopilot/issues/1).
|
|
813
|
+
|
|
814
|
+
## Development and tests
|
|
815
|
+
|
|
816
|
+
```bash
|
|
817
|
+
npm test # the full deterministic suite (scripts/test-all.mjs)
|
|
818
|
+
node scripts/doctor.mjs # check Node, Git, CLIs, bubblewrap, network isolation
|
|
819
|
+
node scripts/gen-config-schema.mjs # regenerate config.schema.json and the reference in docs/configuration.md
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
The suite covers the shell guard, planning, configuration and migration,
|
|
823
|
+
static safety checks, the capability schema, the failure taxonomy and more.
|
|
824
|
+
It includes `scripts/test-no-unguarded-shell.mjs`, a structural check that no
|
|
825
|
+
code runs `spawn`/`exec`/`execFile` (or `shell: true`) outside the guarded executor.
|
|
826
|
+
|
|
827
|
+
Project Autopilot is MIT licensed. See [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).
|
|
828
|
+
|
|
829
|
+
## Configuration reference
|
|
830
|
+
|
|
831
|
+
Every setting, its default and its allowed values are generated from
|
|
832
|
+
config.schema.json into a per-section reference. Each group (project, roles,
|
|
833
|
+
caps, retries, time_limits, workflow, tests, safety, runtime, frameworks,
|
|
834
|
+
advanced) has its own table.
|
|
835
|
+
|
|
836
|
+
See [docs/configuration.md](docs/configuration.md) for the full configuration reference.
|