bmad-auto-copilot
v1.1.0
Published
Automated BMAD story development loop using GitHub Copilot CLI — install into any BMAD project
Maintainers
Readme
bmad-auto-copilot
Automated BMAD sprint development loop using GitHub Copilot CLI.
Install into any BMAD project — runs the full story cycle automatically: create-story → dev-story → code-review → auto-commit → repeat.
Quick Start
# In any BMAD project directory:
npx bmad-auto-copilot install
# Run the automation:
npx bmad-auto-copilot run
# Or directly:
./.scripts/bmad-auto/copilot/bmad-loop.shWhat It Does
The automation loop continuously:
- Reads
sprint-status.yamlto determine story states - Opens a NEW Copilot CLI session for each action (fresh context window):
backlogstories → SM agent runs create-storyready-for-devstories → Dev agent runs dev-storyreviewstories → Dev agent runs code-review
- Auto-commits code after successful code reviews
- Repeats until all stories reach
done
Each session uses Claude Opus 4.6 by default (configurable).
Prerequisites
1. GitHub Copilot CLI
# macOS
brew install copilot-cli
# npm (all platforms)
npm install -g @github/copilot
# Windows
winget install GitHub.CopilotThen authenticate: copilot → /login
2. BMAD Method
Your project must have BMAD installed:
npx bmad-method installRequired files:
_bmad/directory.github/agents/bmad-agent-bmm-sm.md.github/agents/bmad-agent-bmm-dev.mdsprint-status.yaml(from sprint planning)
Commands
install
npx bmad-auto-copilot install # Install in current directory
npx bmad-auto-copilot install ~/my-project # Install in specific project
npx bmad-auto-copilot install --force # Overwrite existing installationAuto-detects your BMAD output folder from _bmad/bmm/config.yaml.
Installs to: .scripts/bmad-auto/copilot/
run
npx bmad-auto-copilot run # Run with defaults
npx bmad-auto-copilot run --max 100 # Limit to 100 iterations
npx bmad-auto-copilot run --model gpt-4.1 # Use different model
npx bmad-auto-copilot run --verbose --dry # Dry run with debug outputstatus
npx bmad-auto-copilot status # Check prerequisites and sprint progressuninstall
npx bmad-auto-copilot uninstall # Remove from current projectDirect Script Usage
After installation, you can run the scripts directly:
macOS / Linux
./.scripts/bmad-auto/copilot/bmad-loop.sh # Default
./.scripts/bmad-auto/copilot/bmad-loop.sh 100 # 100 iterations
./.scripts/bmad-auto/copilot/bmad-loop.sh 250 --verbose # Verbose
./.scripts/bmad-auto/copilot/bmad-loop.sh 250 --dry # Dry runWindows
.\.scripts\bmad-auto\copilot\bmad-loop.ps1
.\.scripts\bmad-auto\copilot\bmad-loop.ps1 -MaxIterations 100 -Verbose
.\.scripts\bmad-auto\copilot\bmad-loop.ps1 -DryRunConfiguration
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| COPILOT_MODEL | claude-opus-4.6 | AI model for all sessions |
| ITERATION_DELAY | 10 | Seconds between iterations |
bmad-auto-config.yaml
Auto-generated during install. Contains project-specific paths:
project_root: "/path/to/your/project"
output_folder: "_bmad-output"
implementation_artifacts: "_bmad-output/implementation-artifacts"How Sessions Work
Each step creates a completely isolated Copilot CLI session:
copilot --agent sm --model claude-opus-4.6 -p <prompt> --allow-all --no-ask-user
copilot --agent dev --model claude-opus-4.6 -p <prompt> --allow-all --no-ask-userThis ensures:
- Fresh context window per action (no context pollution between steps)
- Correct agent persona (SM for story creation, Dev for implementation/review)
- Consistent model across all sessions
Installed Files
.scripts/bmad-auto/copilot/
├── bmad-loop.sh # macOS/Linux automation script
├── bmad-loop.ps1 # Windows PowerShell script
├── bmad-auto-config.yaml # Project paths (auto-generated, gitignored)
├── bmad-progress.log # Execution log (gitignored)
└── prompts/
├── create-story.md # SM agent prompt
├── dev-story.md # Dev agent prompt
└── code-review.md # Dev agent review promptGlobal Installation
For frequent use across many projects:
npm install -g bmad-auto-copilot
bmad-auto-copilot install
bmad-auto-copilot runSafety Features
- Max iterations: Default 250, prevents infinite loops
- Session isolation: Each step = new Copilot CLI session
- Git check: Only commits when there are actual changes
- Dry run mode: Preview without executing
- Progress log: All actions logged to
bmad-progress.log - Progress tracking: Shows done/total story percentage
License
MIT
