> **TLDR**  -  four entry commands, one pipeline, two axes:
>
> - **`autopilot`** skips confirmations (Plan, Test, Commit, PR prompts). Still fails safe on review blockers and build retries.
> - **Workspace** is the one question the run asks about its own shape: a worktree, or the project root on a local branch. Phase 0 Step 5b asks it; autopilot resolves it to a worktree and never asks.
>
> There is one pipeline and every mode runs its whole phase set. What a run costs follows the evidence the task carries, not an answer taken before the evidence exists.

## Autopilot Mode

<!-- toc -->
- [Autopilot Mode](#autopilot-mode)
- [Analysis Mode (`/multi-agent:analysis`)](#analysis-mode-multi-agentanalysis)
- [Local Mode](#local-mode)
<!-- /toc -->

Autopilot mode skips interactive confirmations and runs the pipeline end-to-end autonomously.

**Activation**: Add `autopilot` flag to any pipeline command:

```
/multi-agent "PROJ-12345" autopilot
/multi-agent "https://{JIRA_HOST}/browse/PROJ-12345" autopilot
/multi-agent "https://github.com/.../issues/316" autopilot
/multi-agent "#316" autopilot
/multi-agent "LoginView dark mode fix" autopilot
```

**What changes in autopilot (Tablo 1)**

Two axes, and only the first is a command: whether anything is confirmed
(`autopilot`), and where the work happens (the Step 5b answer). An autopilot run
always gets a worktree, so there is no unattended-local column.

| Phase | Interactive, worktree | Interactive, local | autopilot (always worktree) |
| --- | --- | --- | --- |
| Phase 1 (Plan Approval Gate) | Clarification (max 2 rounds) + approval loop  -  user: approve/abort/free-text edit | Same as worktree | **Gate skip**  -  log the plan, proceed directly to Phase 2 (autopilot contract: zero interaction) |
| Phase 3 (User Test step) | Interactive prompt ("Want to test?" -> wait) | **Not offered**  -  the step checks the change out of a worktree and there is none; the phase itself still runs | Skip (autopilot suppresses interactive prompts) -> proceed directly to Phase 4 |
| Phase 4 (Commit) | "Want to commit?" -> wait | "Want to commit?" -> wait | Auto commit + push |
| Phase 4 (PR) | "Want to open a PR?" -> wait | "Want to open a PR?" -> wait | Auto create PR |
| **Phase 5 (Channels)** | Multi-select channel + content menu | Multi-select (same) | **STILL PAUSES**  -  see "Phase 5 autopilot exception" |

**What NEVER skips (even in autopilot):**

- Phase 3 Review -> if blocking finding, returns to Phase 2, auto fix + rebuild (safety)
- Kill/Purge confirmations -> destructive operations always ask
- Build fail -> auto fix + rebuild (max 3 retries). After 3 retries still failing -> pause, ask user
- **Circuit-breaker** -> autopilot halts (records reason, waits for `resume`) on a no-progress stall, an identical repeated failure, a rework storm, cost drift past the `costBudget` ceiling, or a merge/rebase conflict. Full wiring: `$HOME/.claude/multi-agent-refs/features/autopilot-circuit-breaker.md`. This is the sanctioned autopilot pause  -  continuing unattended off the happy path is the less safe choice.
- **Phase 5 channels dispatch** -> always pauses for multi-select. Rationale: Jira/Confluence are externally visible; silently posting wrong-tone content leaks team-visible artifacts. See below.

**State tracking**: `agent-state.json` gets `"autopilot": true`. Autopilot continues on resume as well.

### Phase 5 autopilot exception

The generic "zero-interaction" contract covers Phases 0-4 only. Phase 5 channels dispatch is the **single exception**:

- ALL modes, `autopilot` included, pause at the channels multi-select menu.
- Menu pre-ticks from `prefs.global.reportChannels` + `prefs.global.reportContent`  -  user can accept with one keypress if prefs are stable.
- **30-minute timeout**  -  if user does not respond, session ends cleanly:
  - External delivery aborted (no silent apply  -  prevents accidental Jira comments / Confluence pages).
  - Internal capture (`agent-log.md`, telemetry, knowledge base) STILL runs.
  - State persisted as `{phase: 5, waitingFor: "user-channels-choice", channelsTimeout: true}`.
  - Resume: `/multi-agent:resume <task-id>` re-opens menu with same inputs.
- Post-hoc `/multi-agent:channels <task>` never times out  -  user invoked it explicitly.

Full contract: `$HOME/.claude/multi-agent-refs/phases/phase-5-report.md` (Autopilot pause contract) + `commands/multi-agent/channels/SKILL.md`.

## Analysis Mode (`/multi-agent:analysis`)

A different **output kind**, not a shorter pipeline. It produces the analysis document and stops; no code, no branch, no PR. The 6-phase contract holds: Phase 2 is skipped and Phases 1, 3 and 4 are reinterpreted.

```
Phase 0: Init -> Phase 1: Plan (analysis) -> Phase 3: Review -> Phase 4: Publish -> Phase 5: Report
```

| Phase | Analysis mode |
|---|---|
| 0 Init | Same intake, but **no worktree**: nothing is isolated because nothing is built, so `state.run.repoPath` is the repo itself |
| 1 Plan | The engine (`multi-agent-refs/analysis/*`): evidence, synthesis, render, humanizer, `validate-analysis-doc.mjs`. **No task decomposition** - there is no code to plan |
| 2 Dev | **SKIP** |
| 3 Review | Document review plus the open questions still marked `Acik / Open` |
| 4 Commit | **Publish** instead: Local file / Confluence / Jira. Locked 6 still forbids `git add` and `git commit` |
| 5 Report | Channels, same as every mode |

**No `autopilot` variant.** Worktree isolation buys nothing when no code is written, and the intake, the Pass B convention preview and the open-question resolution are interactive by nature; a zero-interaction analysis would be a document nobody agreed to.

**Where the document lands.** Drafts go to `/tmp/analysis-<slug>-<ts>/` first, then the Phase 4 picker decides: Local writes `<repo>/analysis/<feature>-<platform>.md` uncommitted, Confluence posts the page, Jira updates the description. In the full pipeline the same engine writes into the worktree instead and `prefs.global.analysisPhase.commitDoc` decides whether it rides along with the commit.

---

## Local Mode

Local mode skips worktree creation  -  works directly on a local branch in the project root. Useful for single-task workflows or when worktrees cause issues.

**Activation**: answer the Phase 0 Step 5b workspace question. There is no flag
and no command name for it - the answer is the only way in, which is why the
question carries what the choice costs.

```
Bu is nerede kossun? / Where should this task run?
  1. Worktree       .worktrees/{id}/ - your current checkout stays untouched
  2. Lokal / Local  the project root, on a new branch - no worktree checkout for the user test
```

Two genuine options, so it meets the two-option floor in `picker-contract.md` on
its own. **Say what local costs inside the question**: the user-test STEP inside
Phase 3 checks the change out of a worktree, so a local run does not get that
offer (the phase itself still runs), and uncommitted work in the project root is
in the way of the checkout. A user choosing local should learn both before
choosing, not after.

Every autopilot entry resolves this to **worktree** and never asks. That is not a
skipped question: an unattended run commits and pushes from wherever it stands,
and doing that in the user's own checkout is what worktrees exist to prevent. An
unattended run therefore always gets its own checkout.

**What changes in local mode:**

| Phase          | Normal (worktree)                                | Local                                                          |
| -------------- | ------------------------------------------------ | -------------------------------------------------------------- |
| Phase 0 Step 8 | Creates worktree at `.worktrees/{id}/`           | `git checkout -b {branch}` directly in `$PROJECT_ROOT`         |
| Phase 2        | Works in worktree path                           | Works in `$PROJECT_ROOT`                                       |
| Phase 3        | Review, then the user test: WIP commit -> remove worktree -> checkout branch | Review runs unchanged; the user test skips the checkout offer  -  nothing to check out, nothing to remove |
| Phase 4        | Commit in worktree, push                         | Commit in project root, push                                   |
| All paths      | `{worktreePath}` references                      | All paths use `$PROJECT_ROOT` directly                         |

**Phase 0 Step 8 in local mode:**

```bash
# Instead of creating worktree:
git -C $PROJECT_ROOT fetch origin
git -C $PROJECT_ROOT checkout -b {branch} origin/{baseBranch}
git -C $PROJECT_ROOT config user.name "{identity.name}"
git -C $PROJECT_ROOT config user.email "{identity.email}"
```

**Phase 3 in local mode:** Review runs exactly as in a worktree. Only the user test at the tail of Phase 3 changes: its checkout offer exists to hand the user a change checked out of a worktree, and in local mode the code is already on the branch in `$PROJECT_ROOT`, with nothing to check out or remove, so the offer is skipped. The workspace is a Phase 0 answer, not a mode, so the phase set in `schemas/phases.json` is the same for both.

**State tracking**: `agent-state.json` gets `"localMode": true`, `"worktreePath": null`. All path references resolve to `$PROJECT_ROOT`.

**Limitations:**

- Cannot run parallel tasks on same project (no worktree isolation)
- Uncommitted changes in PROJECT_ROOT may conflict  -  pipeline warns if dirty
- Build queue lock still applies for xcodebuild

Fast path.
