/feature-workflow:feature-autopilotfrom feature-workflow
Chains feature-plan, review-plan, implement, review-impl, and ship phases into an end-to-end autopilot from idea.md to merged PR. Auto-advances on pass, pauses on fail. Invoke with 'ship feature X' or 'autopilot X'.
Ships in feature-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
End-to-end runbook for taking an idea.md entry in docs/features/<id>/ and landing the change on the configured base branch. Chains the existing per-phase skills, gates on the configured reviewer between phases, and auto-advances when the reviewer is happy.
This skill does not replace feature-plan, feature-implement, feature-review-plan, feature-review-impl, or feature-ship. It calls them in order and adds the wait/classify/auto-advance logic between phases.
Multi-repo workspace? If the root has a .feature-workspace.yml, a single-member feature autopilots from inside that member (cd <member> first). A cross-repo epic (children as repo:id) dispatches each child into its member — see epic-dispatch.md and ../shared/workspace.md.
/feature-plan directly first, then optionally autopilot from review onwardidea.md exists → run /feature-capture firstreview: field in the feature's idea.md frontmatter (external / internal / skip) BEFORE running autopilot.Verify in this order before starting:
docs/features/<id>/idea.md exists. If not: tell the user to run /feature-capture first.
Working tree is clean on the configured base branch. Run git status — if anything unrelated is modified or untracked, ask the user before doing anything (don't auto-commit). Rationale: feature-plan branches off current HEAD, so a dirty tree drags unrelated work onto the feature branch.
Local base branch is in sync with origin. Run:
"${CLAUDE_PLUGIN_ROOT}/skills/feature-autopilot/scripts/check-base-sync.sh" <base-branch>
Exit semantics:
0 — in sync, proceed1 — local is ahead of origin (unpushed work). Pause and surface to user. Branching off an ahead-base means the upcoming PR will include those unpushed commits, which is almost certainly not what the user wants. Recommend: push first OR investigate which commits don't belong on the base.2 — local is behind origin. Run git pull origin <base> and re-check.3 — diverged. Manual resolution required; do not proceed.4 — usage error (typo in base name, branch doesn't exist locally, etc.).This catches the "parallel Claude Code session left unpushed commits" failure mode.
Read .feature-workflow.yml for the reviewer: setting. The autopilot adapts:
reviewer: gemini or reviewer: codex — review gates are active. The feature-review.yml GitHub Action fires on the plan-review / impl-review label and posts a comment classifiable by wait-for-review.sh.reviewer: none — review gates are skipped. Autopilot goes plan → implement → ship without polling for external review.Read .feature-workflow.yml for the base_branch: setting (default main). Use this as the merge target.
Before the linear pipeline below, read docs/features/<id>/idea.md and check the type: field. If type: Epic, switch to Epic Dispatch Mode — see epic-dispatch.md — and stop here. The linear pipeline below applies only to regular features.
type: value | Behavior |
|---|---|
| Feature / Enhancement / Bug Fix / Tech Debt | Standard linear plan → review → implement → review → ship (below) |
| Epic | Epic Dispatch Mode — walk children in topo order via epic-dispatch.md |
The dispatcher walks each child via its own subagent (running /feature-autopilot <child-id>) in its own worktree per the Worktree Isolation rule. Sequential by default; pass --parallel to the autopilot invocation for concurrent waves.
/feature-workflow:feature-plan <id>
Creates docs/features/<id>/plan.md with implementation steps, test approach, acceptance criteria, and open questions.
Gate before moving on. Read the plan back to yourself. Does the step list match the idea's intent? Any obvious gaps or scope creep? If the plan looks wrong, stop and surface it to the user — don't proceed to review/implement a bad plan. Edit plan.md directly or re-run the skill.
reviewer: none)/feature-workflow:feature-review-plan <id>
Creates the feature branch, opens a draft PR, and applies the plan-review label. The CI reviewer picks up the label, runs against the plan, and posts a comment prefixed ## Plan Review with a ### Verdict: PASS|CONDITIONAL PASS|FAIL line.
Don't idle-wait — poll:
"${CLAUDE_PLUGIN_ROOT}/skills/feature-autopilot/scripts/wait-for-review.sh" <PR#> plan
Blocks on gh pr checks --watch and classifies the verdict. Exit semantics:
respond.md)./feature-workflow:feature-review-plan <id> --respond immediately, push the changes, and loop back to wait-for-review. See "FAIL handling" below for the retry cap and escalation rules.gh run list --branch feature/<id> and gh run view <run-id>. Common causes: missing GEMINI_API_KEY / OPENAI_API_KEY secret, transient reviewer error, required check failing unrelated to the review. Once fixed, re-trigger by removing and re-adding the plan-review label.Autopilot's job is to drive review cycles, including FAIL → respond → re-review. Default cap: 2 consecutive FAILs on the same phase before pausing for the user.
FAIL #1 → run --respond → push → re-poll
FAIL #2 → run --respond → push → re-poll
FAIL #3 → STOP. Surface findings to user, ask for direction.
The cap exists because if the reviewer rejects the same plan/implementation twice after revisions, the issue is probably one of:
When invoking --respond autonomously, the autopilot should:
idea.md — this is the autopilot's main escape valve. See respond.md for the classification matrix.--respond (override the cap), override the verdict ("ship anyway — I disagree with finding X"), or halt.The cap is per-phase. Plan review and impl review have independent counters; a clean impl review after 2 plan-review FAILs is fine.
/feature-workflow:feature-implement <id>
Executes plan.md step by step. Between steps: run the relevant tests, then mark the step complete via /feature-workflow:tracking-progress.
Guardrails during implementation:
/feature-workflow:guarding-scope before expanding. Scope creep is the #1 reason shipments stall.plan.md describing the blocker, then surface to the user. Don't silently work around.reviewer: none)/feature-workflow:feature-review-impl <id>
Pushes the implementation to the existing feature branch and swaps the label from plan-review to impl-review. The CI reviewer runs against the diff and posts a ## Implementation Review comment with the same ### Verdict: convention.
Poll the same way:
"${CLAUDE_PLUGIN_ROOT}/skills/feature-autopilot/scripts/wait-for-review.sh" <PR#> impl
Exit semantics identical to Step 2 — 0 auto-advances to Step 5, 1 triggers the auto-respond loop (cap 2 FAILs before pausing — see "FAIL handling" above), 2 diagnoses CI.
Before invoking feature-ship, verify:
preflight: command from .feature-workflow.yml (the local CI-parity gate). See "Preflight gate" below.venv/bin/pytest tests/, npm test) is greenplan.md → Implementation Steps is checkedfeature-ship refuses dirty)CLAUDE.md, downstream consumers are updated or notedIf anything in the checklist is red, pause and surface it.
/feature-workflow:feature-ship <id>
Writes docs/features/<id>/shipped.md, commits it, pushes the branch, marks the PR ready (non-draft), merges it, and deletes the branch. Cleans up locally on the base branch.
If the base branch requires a merge queue, feature-ship enqueues the PR instead of merging directly and waits for the queue to merge it — so the merge is asynchronous and ship completes once the PR reaches MERGED. Autopilot still advances on that completion; it just may wait out the queue first.
After merge, the dashboard moves the feature from In Progress → Completed automatically.
plan ─► review-plan ─► implement ─► review-impl ─► pre-ship ─► ship
│ ▲ │ ▲
│ │ wait-for-review │ │ wait-for-review
│ │ 0 → advance │ │ 0 → advance
│ │ 1 → auto-respond ──┤ │ 1 → auto-respond ──┐
│ │ (cap 2/phase) │ │ (cap 2/phase) │
│ │ 2 → diagnose ──────┤ │ 2 → diagnose ──────┤
│ └──────── 3rd FAIL: pause for user ─────────────┘
gh pr edit <pr-number> --remove-label plan-review # or impl-review, depending on the current gate
Without this, the next git push (e.g., the impl commit) triggers a synchronize event, the workflow's job conditional still passes (label is still on the PR), and a redundant review fires.
Then continue. Don't chase Should-fix nits after a clean pass; material recommendations can become backlog items via the "Defer to backlog" classification in respond.md (see Step 5/8 of the respond flow).--respond for the current phase, classify findings (Agree / Disagree / Already addressed / Defer to backlog / Deferred), push, and re-poll. Cap at 2 consecutive FAILs per phase before pausing for human input — see "FAIL handling" in Step 2 above.gh run list --branch feature/<id> and gh run view <run-id>. Once fixed, re-trigger the review by removing and re-adding the label.Also stop and ask if:
For everything else, proceed without narration beyond the per-skill output and a one-line "wait-for-review exit N" update at each gate. The user knows the runbook; they don't need a play-by-play.
If the reviewer comes back asking for a substantial expansion that goes beyond the original idea.md scope, do not silently expand the feature. The respond flow (shared/respond.md) has an explicit "Defer to backlog" classification for this — capture a new backlog item via /feature-capture, reply on the thread pointing to the new feature ID, resolve the thread, and continue with the current feature's stated scope.
This keeps each feature focused and prevents the autopilot from getting stuck in a multi-feature refactor disguised as one PR.
plan.md directly and re-run /feature-workflow:feature-implement. It picks up from the first unchecked box.gh run view), diagnose, push a fix commit to the feature branch, re-run from the appropriate gate.git fetch origin <base> && git rebase origin/<base>), push, re-run feature-ship.shipped.md is just a marker; the merge commit is the hard-to-reverse part. Revert via a new PR, then re-open the feature (remove shipped.md) and re-plan.The autopilot's behavior at each review gate is driven by the effective review mode for the feature being processed:
| Effective mode | Step 2 (plan review) | Step 4 (impl review) |
|---|---|---|
external_gemini / external_codex | Active — apply label, wait-for-review polls CI | Active — same |
external_default (feature says external, project says none) | Error — surface to user; can't dispatch without a configured reviewer | Same — error |
internal | Dispatch internal-review subagent → post comment → wait-for-review polls comments | Same — post impl-review comment, same poll |
skip | Skip review gate entirely; advance to implement | Skip; advance to ship |
The effective mode is computed per-feature using:
.feature-workflow.yml (reviewer: setting)idea.md frontmatter (review: field)See feature-workflow/skills/shared/lib/effective_review.py for precedence rules.
Important: wait-for-review.sh works identically across external and internal modes. Internal-review comments use the same ## Plan Review / ## Implementation Review headers and ### Verdict: line that the external CI reviewer posts. No special flag is needed.
For internal mode, the autopilot's FAIL → respond loop also works unchanged: the respond flow reads PR comments, classifies findings, replies, and pushes — exactly as for external review. The subagent re-runs on the next round because the orchestrator detects the new commits and dispatches it again.
Every time the autopilot dispatches a subagent that may write to the working tree or do git operations, the dispatch MUST pass isolation: "worktree" to the Agent tool. The harness creates a temporary git worktree, runs the subagent there, and returns the worktree path on completion.
Applies to:
git commit, git push, or git checkoutDoes NOT apply to:
Why: even when only one autopilot is "running," the user may open another Claude Code session against the same repo. Worktree isolation removes the entire class of "two agents in one tree clobber each other on branch switches" bugs — the shared-tree collision where one branch's checkout overlays another's uncommitted work.
Cost: ~1-2 seconds for git worktree add per subagent, plus per-worktree setup (venv, node_modules) that varies by project. Acceptable in exchange for eliminating clobber bugs.
There is no opt-out. The autopilot does not check a config flag before isolating. If a project's worktree setup is painfully slow, fix it at the project level (shared venv via uv, pnpm content-addressable store, etc.) rather than disabling isolation.
Beyond autopilot: this rule only governs subagents this autopilot dispatches. Your own ad-hoc/quick changes and other parallel sessions in the same repo aren't covered here — for those, see the worktree-isolation skill (engineering-standards plugin), which keeps work made outside autopilot from colliding in the shared primary clone (the most common source of the very bug this rule prevents).
If .feature-workflow.yml defines a preflight: command, the autopilot MUST run it and see it pass before any push — both the impl-review push (Step 4) and the ship push (Step 6). The command reproduces the repo's required CI checks locally (build, typecheck, tests, lint), so a failure is caught here instead of after a CI round-trip.
# from the repo root / worktree, before pushing:
<the preflight: command> # e.g. npm run preflight (maxwell)
# just preflight (a cargo repo)
No preflight: key → no local gate; the push relies on CI alone (legacy behavior). feature-init scaffolds the key for new repos.
Why: pushing a tree that fails the required checks burns a full CI round-trip and can stall the autopilot's review loop on an infrastructural failure unrelated to the review. The gate also catches environment traps that make tests silently not run locally — e.g. a worktree under /tmp, where vite-node's workers fail module resolution and the suite never executes (see the worktree-isolation skill's location rule).
If your project has pre-commit hooks (skylos, fallow, ruff, prettier, husky, etc.), see pre-commit-compat.md for how autopilot interacts with them. Two rules with no exceptions:
git commit --no-verify to bypass hooks. If a hook fails, the subagent should report BLOCKED with the failure detail.// fallow-ignore-next-line complexity, # skylos: ignore, # noqa, # type: ignore, // @ts-ignore etc. without an adjacent # Why: justification will be caught by the impl-review prompt as Blocking findings. The implementer must either refactor the underlying code or write a defensible justification. See pre-commit-compat.md for the full discipline.What SKILL.md sets; muted values are Claude Code's defaults
18 skills in this plugin
/auditing-contextAuto-load active audit context when working with audited code. Use when user is working on code that has an active audit session, discussing audit findings, or making changes related to a runtime audit. Silently loads audit session data to inform responses./checking-backlogCheck project backlog when discussing feature ideas or priorities. Use when user mentions adding features, asks what's planned, discusses priorities, or proposes new functionality. Silently reads DASHBOARD.md to show relevant items and suggest /feature-capture for untracked ideas./feature-auditRuntime behavior auditing through systematic log injection. Use when user wants to understand what code is doing at runtime, debug complex flows, or audit a process./feature-captureInteractive workflow for adding items to the backlog. Use when user wants to add a new feature, track an idea, capture requirements, or mentions something that should be in the backlog./feature-deployCoordinate a multi-repo deploy across a workspace's member repos in producer-first order. Use after a cross-repo epic's children have all merged and you need to release the members in dependency order (e.g. deploy the API producer before its consumers)./feature-implementExecute a feature implementation plan from a clean context. Use when starting implementation after planning, or when resuming work on an in-progress feature. Reads plan.md and executes implementation steps.npx claudepluginhub schuettc/claude-code-plugins --plugin feature-workflowOther plugins' skills for the same job