bmad-autopilot-skill
Autonomous development orchestrator for processing epics. Use when the user wants to run the autopilot, process epics, or automate the development workflow with BMAD method.
When & Why to Use This Skill
The BMAD Autopilot skill is a high-level autonomous development orchestrator designed to automate the entire software engineering lifecycle. By implementing the BMAD (Batch Mode Autonomous Development) method, it manages complex workflows including epic processing, branch management, automated code generation, and pull request orchestration. This skill acts as a central agentic layer that coordinates multiple developer tools to transform high-level requirements into production-ready code with minimal manual oversight.
Use Cases
- Autonomous Epic Processing: Automatically handle the full development cycle of complex epics, from creating feature branches to developing stories and running local checks.
- Automated PR Lifecycle Management: Streamline the creation, monitoring, and merging of pull requests, including the automatic resolution of review comments and CI/CD synchronization.
- Development Workflow Automation: Orchestrate a suite of developer tools (git, gh, jq, claude) to maintain a continuous and efficient coding pipeline without manual context switching.
- Intelligent Feedback Loops: Automatically detect unresolved review threads, generate fixes based on feedback, and re-submit code for approval to ensure high-quality merges.
| name | bmad-autopilot-skill |
|---|---|
| description | Autonomous development orchestrator for processing epics. Use when the user wants to run the autopilot, process epics, or automate the development workflow with BMAD method. |
| allowed-tools | Bash, Read |
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:
# 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:
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