| name | bmad-autopilot-skill |
| description | Autonomous BMAD development orchestration |
| allowed-tools | Bash,Read |
| version | 1.2.1 |
BMAD Autopilot Skill
This skill provides autonomous development capabilities following the BMAD (Breakthrough Method for Agile Development) methodology.
When to Use
Activate this skill when the user wants to:
- Automatically process BMAD epics end-to-end
- Develop stories following TDD principles
- Create and manage pull requests automatically
- Handle CI feedback and code reviews
- Run the full BMAD development pipeline
BMAD Workflow Phases
CHECK_PENDING_PR → FIND_EPIC → CREATE_BRANCH → DEVELOP_STORIES
↓ ↓
(resume) CODE_REVIEW
↓
DONE ← MERGE_PR ← WAIT_COPILOT ← CREATE_PR ← (approved)
↓ ↓
BLOCKED FIX_ISSUES
Essential Commands
Start BMAD Autopilot
ct init
ct thread create bmad-main \
--mode automatic \
--template bmad-autopilot.yaml \
--context '{"epic_pattern": "", "base_branch": "main"}'
ct thread start bmad-main
Process Specific Epics
ct thread create bmad-7a \
--template bmad-developer.md \
--worktree \
--context '{"epic_id": "7A"}'
ct thread create bmad-7a --template bmad-developer.md --worktree --context '{"epic_id": "7A"}'
ct thread create bmad-8a --template bmad-developer.md --worktree --context '{"epic_id": "8A"}'
ct thread create bmad-10b --template bmad-developer.md --worktree --context '{"epic_id": "10B"}'
ct thread create bmad-all-10 \
--template bmad-autopilot.yaml \
--context '{"epic_pattern": "10.*"}'
Monitor Progress
ct thread status bmad-main
ct thread logs bmad-main -f
ct event list --type "EPIC_*,STORY_*,PR_*"
ct worktree list
Agent Threads
The BMAD workflow spawns specialized agent threads:
| Agent | Template | Purpose |
|---|
| Coordinator | planner.md | Find epics, manage workflow |
| Developer | bmad-developer.md | Implement stories with TDD |
| Reviewer | bmad-reviewer.md | Code review before PR |
| PR Manager | bmad-pr-manager.md | Create/manage pull requests |
| Fixer | bmad-fixer.md | Fix CI/review issues |
| Monitor | pr-monitor.md | Watch for PR status changes |
Review Process
The BMAD workflow includes two review stages:
Internal Code Review (CODE_REVIEW Phase)
After all stories in an epic are implemented, the Reviewer agent performs an internal code review before creating a PR.
Review Checklist:
Code Quality
- Code follows project style guide
- No unused imports or variables
- Functions are small and focused
- Error handling is appropriate
- No hardcoded values that should be config
Testing
- Tests cover the main functionality
- Edge cases are tested
- Tests are readable and maintainable
- No flaky tests introduced
BMAD Compliance
- Story requirements are fully implemented
- Acceptance criteria are met
- Documentation is updated if needed
- Breaking changes are documented
Security
- No sensitive data exposed
- Input validation present
- No SQL injection vulnerabilities
- Authentication/authorization correct
Performance
- No obvious performance issues
- Database queries are optimized
- No N+1 query patterns
- Caching used appropriately
Review Outcomes:
- Approved: Code meets all criteria → proceeds to CREATE_PR
- Changes Requested: Issues found → transitions to FIX_ISSUES phase
The reviewer publishes a REVIEW_COMPLETED event with status and any issues found.
External Review (WAIT_COPILOT Phase)
After PR creation, the workflow waits for:
- GitHub Copilot review
- CI checks to pass
- All review threads resolved
Auto-Approval Conditions:
PRs are auto-approved when:
- 10+ minutes since last push
- Copilot review exists
- All review threads resolved
- All CI checks passed
Review Commands:
gh pr diff <pr_number>
gh pr diff <pr_number> -- path/to/file
gh pr checks <pr_number>
gh pr view <pr_number>
Event Types
Events published during BMAD execution:
| Event | Description |
|---|
NEXT_EPIC_READY | Coordinator found next epic |
BRANCH_CREATED | Feature branch created |
WORKTREE_CREATED | Isolated worktree created |
STORY_STARTED | Developer starting story |
STORY_COMPLETED | Story implementation done |
DEVELOPMENT_COMPLETED | All stories finished |
REVIEW_COMPLETED | Code review done |
WORKTREE_PUSHED | Changes pushed from worktree |
PR_CREATED | Pull request opened |
CI_PASSED / CI_FAILED | CI status update |
COPILOT_REVIEW | Copilot review received |
FIXES_NEEDED | Issues require fixing |
PR_APPROVED | PR approved |
PR_MERGED | PR merged successfully |
WORKTREE_DELETED | Worktree cleaned up |
EPIC_COMPLETED | Epic fully processed |
Configuration
In .claude-threads/config.yaml:
bmad:
epic_pattern: ""
base_branch: main
auto_merge: true
max_concurrent_prs: 2
check_interval: 300
worktrees:
enabled: true
max_age_days: 7
auto_cleanup: true
default_base_branch: main
auto_push: true
pr_shepherd:
max_fix_attempts: 5
ci_poll_interval: 30
auto_merge: false
Story File Locations
BMAD stories are typically in:
_bmad-output/stories/epic-{id}/
docs/stories/{id}/
Commit Message Format
feat(epic-{id}): implement story X.Y
Story {id}.{story}:
- Change description
- Another change
Handling Blocked State
If autopilot becomes blocked:
ct thread status bmad-main --verbose
ct event list --source bmad-main --limit 20
ct thread logs bmad-main
ct thread resume bmad-main
GitHub Integration
For automatic PR status updates:
ct webhook start --port 31338
Auto-Approval Conditions
PRs are auto-approved when:
- 10+ minutes since last push
- Copilot review exists
- All review threads resolved
- All CI checks passed
Parallel vs Sequential Mode
Sequential (default):
- One epic at a time
- Simpler state management
- Good for small teams
Parallel (with worktrees):
- Multiple epics concurrently
- Each thread gets isolated git worktree
- No conflicts between parallel development
- Higher throughput
- Configure with
max_concurrent_prs
ct thread create epic-7a --mode automatic --template bmad-developer.md --worktree --context '{"epic_id": "7A"}'
ct thread create epic-8a --mode automatic --template bmad-developer.md --worktree --context '{"epic_id": "8A"}'
ct orchestrator start
ct worktree list
PR Shepherd Integration
The PR Shepherd automatically handles CI failures and review comments with worktree isolation:
ct pr watch 123
ct pr status 123
ct pr daemon