BMAD Autopilot - Autonomous Development Orchestrator
This skill runs the BMAD Autopilot bash orchestrator to automatically process epics through the full development cycle.
When to Use
Activate this skill when the user:
- •Wants to run the autopilot or orchestrator
- •Asks to process epics automatically
- •Mentions BMAD development workflow
- •Wants to automate PR creation and review cycles
Execution
Run the orchestrator from the repository root:
bash
# Process ALL epics automatically ./.autopilot/bmad-autopilot.sh # Process specific epics ./.autopilot/bmad-autopilot.sh "7A 8A" # With verbose output ./.autopilot/bmad-autopilot.sh --verbose # Resume after interruption ./.autopilot/bmad-autopilot.sh --continue
Workflow States
The orchestrator runs through these phases:
- •CHECK_PENDING_PR - Find unfinished PRs
- •FIND_EPIC - Select next epic to process
- •CREATE_BRANCH - Create feature branch
- •DEVELOP_STORIES - Claude develops the epic (interactive)
- •CODE_REVIEW - Run local checks and review (interactive)
- •CREATE_PR - Create pull request
- •→ Auto-continue to next epic (PR added to pending list)
- •Background: Pending PRs monitored, auto-merged when ready
- •FIX_ISSUES - If Copilot has comments, fix and resolve threads
- •MERGE_PR - Merge when CI passes and approved
- •Loop until all epics DONE
Auto-Approve Integration
The auto-approve.yml GitHub workflow handles PR approval with strict conditions:
Approval conditions (ALL must be met):
- •At least 10 minutes since last push
- •Copilot review exists
- •All review threads resolved
- •All CI checks passed
Flow:
- •After PR creation - Autopilot continues to next epic immediately
- •Copilot reviews - Triggers auto-approve workflow
- •Workflow waits for CI - Polls until all checks pass
- •Workflow checks conditions - 10 min wait, threads resolved
- •Dismisses stale approvals - If unresolved threads exist
- •Approves only when ready - All conditions met
- •PR becomes mergeable - Autopilot's background check merges it
If Copilot has comments (FIX_ISSUES phase):
- •Autopilot detects unresolved threads during periodic check
- •Fetches thread content (file, line, comment) via GraphQL
- •Claude fixes the issues
- •Posts reply to PR acknowledging feedback
- •Resolves all threads via GraphQL mutation
- •Pushes fixes → Copilot re-reviews → auto-approve triggers again
- •10 min wait ensures Copilot has time to re-review
Manual workflow trigger:
bash
gh workflow run auto-approve.yml -f pr_number=123
Critical requirements:
- •Never approve with unresolved threads
- •Always reply to review comments
- •Always resolve threads after fixing
- •Wait 10 min after push before approval
Logs and State
- •Log:
.autopilot/autopilot.log - •State:
.autopilot/state.json - •Debug:
.autopilot/tmp/debug.log(when --debug)
Prerequisites
The script requires: claude, gh, jq, rg, git