---
name: multi-agent-autopilot
description: "Launch any task in autopilot mode: skips every confirmation, runs end-to-end autonomously. Use when a task should run end to end with no confirmation prompts."
user-invocable: true
argument-hint: '"task"  -  issue URL, Jira ID, free-text, or #id (for resume)'
metadata:
  language: en
---

# multi-agent autopilot  -  Autonomous Pipeline

**Input**: $ARGUMENTS

Run the task end-to-end with no confirmations.

## Gotchas

- The guard decides within a 5-second internal deadline and fails closed when unattended. On a heavily loaded machine a correct command can be refused for time, not for policy.
- An unattended run never pushes or opens a PR itself: it records the request in `pr-request.json` and the runner publishes it.
- An unattended run cannot run `/multi-agent-stack` or write `.claude/` in the repo; a missing stack toolkit is read from a local marketplace clone instead.

## What changes

| Phase | Normal | Autopilot |
|-----|--------|-----------|
| Phase 1 (Plan) | "Shall I continue?" → wait | Go straight to Phase 2 |
| Phase 3 (User test, the tail of Review) | "Do you want to test?" → wait | Skip → Phase 4 |
| Phase 4 (Commit) | "Shall I commit?" → wait | Automatic commit + push |
| Phase 4 (PR) | "Shall I open a PR?" → wait | Create PR automatically |

## What is NEVER skipped

- 🔴 **Review-blocking finding** → auto fix + rebuild (max 3 retries)
- 💥 **Build failure** → auto fix + rebuild (max 3 retries, then pause)
- ⚠️ **Kill / Purge** → always asks for confirmation (destructive)

## Usage

```
# With a GitHub Issue
/multi-agent:autopilot https://github.com/.../issues/316

# With a Jira ID
/multi-agent:autopilot PROJ-12345

# With free-text
/multi-agent:autopilot LoginView dark mode fix

# Resume a stopped task with autopilot
/multi-agent:autopilot resume #3
```

## Steps

1. **Parse the input**  -  Normal multi-agent formats
2. **Set the autopilot flag**  -  `"autopilot": true` in `agent-state.json`
3. **Start the multi-agent pipeline**  -  All confirmations are skipped
4. **On failure**  -  After 3 retries still failing → pause, ask the user

## Required: outward-facing payload contracts

Before writing anything outward-facing  -  PR body, Jira comment, Confluence page, closing report  -  load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup  -  mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.
