bmad-autopilot-addon 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +279 -0
  3. package/_bmad-addons/.secrets-allowlist +26 -0
  4. package/_bmad-addons/BMAD.md +216 -0
  5. package/_bmad-addons/install.sh +495 -0
  6. package/_bmad-addons/manifest.yaml +22 -0
  7. package/_bmad-addons/modules/git/branching-and-pr-strategy.md +101 -0
  8. package/_bmad-addons/modules/git/config.yaml +83 -0
  9. package/_bmad-addons/modules/git/templates/commit-patch.txt +1 -0
  10. package/_bmad-addons/modules/git/templates/commit-story.txt +1 -0
  11. package/_bmad-addons/modules/git/templates/pr-body.md +20 -0
  12. package/_bmad-addons/modules/ma/config.yaml +9 -0
  13. package/_bmad-addons/scripts/create-pr.sh +198 -0
  14. package/_bmad-addons/scripts/detect-platform.sh +89 -0
  15. package/_bmad-addons/scripts/health-check.sh +107 -0
  16. package/_bmad-addons/scripts/lint-changed.sh +292 -0
  17. package/_bmad-addons/scripts/lock.sh +111 -0
  18. package/_bmad-addons/scripts/sanitize-branch.sh +83 -0
  19. package/_bmad-addons/scripts/stage-and-commit.sh +168 -0
  20. package/_bmad-addons/scripts/sync-status.sh +138 -0
  21. package/_bmad-addons/skills/bmad-autopilot-off/SKILL.md +6 -0
  22. package/_bmad-addons/skills/bmad-autopilot-off/workflow.md +154 -0
  23. package/_bmad-addons/skills/bmad-autopilot-on/SKILL.md +6 -0
  24. package/_bmad-addons/skills/bmad-autopilot-on/workflow.md +998 -0
  25. package/_bmad-addons/skills/bmad-ma-assess/SKILL.md +6 -0
  26. package/_bmad-addons/skills/bmad-ma-assess/agents/debt-classifier.md +64 -0
  27. package/_bmad-addons/skills/bmad-ma-assess/agents/dependency-auditor.md +57 -0
  28. package/_bmad-addons/skills/bmad-ma-assess/agents/migration-analyzer.md +62 -0
  29. package/_bmad-addons/skills/bmad-ma-assess/workflow.md +114 -0
  30. package/_bmad-addons/skills/bmad-ma-code-review/SKILL.md +6 -0
  31. package/_bmad-addons/skills/bmad-ma-code-review/agents/acceptance-auditor.md +51 -0
  32. package/_bmad-addons/skills/bmad-ma-code-review/agents/blind-hunter.md +39 -0
  33. package/_bmad-addons/skills/bmad-ma-code-review/agents/edge-case-hunter.md +46 -0
  34. package/_bmad-addons/skills/bmad-ma-code-review/workflow.md +111 -0
  35. package/_bmad-addons/skills/bmad-ma-codebase-map/SKILL.md +6 -0
  36. package/_bmad-addons/skills/bmad-ma-codebase-map/agents/architecture-mapper.md +129 -0
  37. package/_bmad-addons/skills/bmad-ma-codebase-map/agents/concerns-hunter.md +132 -0
  38. package/_bmad-addons/skills/bmad-ma-codebase-map/agents/integration-mapper.md +138 -0
  39. package/_bmad-addons/skills/bmad-ma-codebase-map/agents/quality-assessor.md +143 -0
  40. package/_bmad-addons/skills/bmad-ma-codebase-map/agents/stack-analyzer.md +123 -0
  41. package/_bmad-addons/skills/bmad-ma-codebase-map/workflow.md +120 -0
  42. package/_bmad-addons/skills/bmad-ma-migrate/SKILL.md +6 -0
  43. package/_bmad-addons/skills/bmad-ma-migrate/agents/dependency-analyzer.md +51 -0
  44. package/_bmad-addons/skills/bmad-ma-migrate/agents/risk-assessor.md +55 -0
  45. package/_bmad-addons/skills/bmad-ma-migrate/agents/stack-mapper.md +49 -0
  46. package/_bmad-addons/skills/bmad-ma-migrate/agents/test-parity-analyzer.md +49 -0
  47. package/_bmad-addons/skills/bmad-ma-migrate/resources/coexistence-patterns.md +59 -0
  48. package/_bmad-addons/skills/bmad-ma-migrate/resources/strategies.md +43 -0
  49. package/_bmad-addons/skills/bmad-ma-migrate/templates/component-card.md +11 -0
  50. package/_bmad-addons/skills/bmad-ma-migrate/templates/migration-epics.md +35 -0
  51. package/_bmad-addons/skills/bmad-ma-migrate/templates/migration-plan.md +66 -0
  52. package/_bmad-addons/skills/bmad-ma-migrate/workflow.md +235 -0
  53. package/_bmad-addons/skills/bmad-ma-party-mode/SKILL.md +6 -0
  54. package/_bmad-addons/skills/bmad-ma-party-mode/workflow.md +138 -0
  55. package/_bmad-addons/skills/bmad-ma-research/SKILL.md +6 -0
  56. package/_bmad-addons/skills/bmad-ma-research/workflow.md +128 -0
  57. package/_bmad-addons/skills/bmad-ma-reverse-architect/SKILL.md +6 -0
  58. package/_bmad-addons/skills/bmad-ma-reverse-architect/agents/component-mapper.md +53 -0
  59. package/_bmad-addons/skills/bmad-ma-reverse-architect/agents/data-flow-tracer.md +54 -0
  60. package/_bmad-addons/skills/bmad-ma-reverse-architect/agents/pattern-extractor.md +67 -0
  61. package/_bmad-addons/skills/bmad-ma-reverse-architect/workflow.md +119 -0
  62. package/_bmad-addons/templates/agent-rules.md +43 -0
  63. package/_bmad-addons/uninstall.sh +204 -0
  64. package/bin/bmad-autopilot-addon.sh +48 -0
  65. package/package.json +32 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Igor Kunin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,279 @@
1
+ # BMAD Autopilot Add-On v1.0.0
2
+
3
+ Autonomous end-to-end software delivery powered by the [BMAD Method](https://github.com/bmad-code-org/BMAD-METHOD). One command takes your project from sprint plan to reviewed, tested, PR-ready code — with full git workflow and multi-agent intelligence.
4
+
5
+ ## The Problem
6
+
7
+ BMAD provides a structured development workflow with 50+ skills and agent personas. But using it manually means invoking each skill one at a time, navigating menus, making routine decisions, and handling git operations yourself. For a sprint with 10 stories across 3 epics, that's dozens of manual steps, context switches, and session restarts.
8
+
9
+ ## The Solution: BMAD Autopilot
10
+
11
+ ```
12
+ /bmad-autopilot-on
13
+ ```
14
+
15
+ That's it. The autopilot takes over and drives your entire sprint to completion:
16
+
17
+ ### What it does, story by story
18
+
19
+ 1. **Reads your sprint plan** — picks the next story from `sprint-status.yaml`
20
+ 2. **Creates an isolated worktree** — each story gets its own branch via `git worktree add`, keeping `main` clean
21
+ 3. **Implements the story** — invokes `bmad-dev-story` which writes code and tests following TDD (RED then GREEN)
22
+ 4. **Lints the code** — auto-detects your language (Python, JS/TS, Rust, Go, Ruby) and runs the appropriate linter on changed files only
23
+ 5. **Stages explicitly** — never runs `git add -A`. Stages only changed files with pre-commit checks: secrets scanning, file size limits, binary detection
24
+ 6. **Commits with conventional messages** — `feat(epic): story title (story-key)` with all placeholders resolved from your sprint artifacts
25
+ 7. **Runs code review** — invokes `bmad-code-review` on the worktree diff
26
+ 8. **Applies every patch** — auto-accepts all review findings, commits each fix separately for clean git history
27
+ 9. **Pushes and creates a PR** (configurable) — auto-detects your platform (GitHub/GitLab) and creates a PR/MR with a detailed body. With `create_pr: false`, merges directly to main instead.
28
+ 10. **Moves to the next story** — syncs status, exits the worktree, commits artifacts to main, picks up the next story
29
+ 11. **Runs retrospective** — when all stories in an epic are done, runs `bmad-retrospective` and lists all PR URLs for merge
30
+
31
+ ### What makes it autonomous
32
+
33
+ The autopilot handles everything that normally requires you to be present:
34
+
35
+ - **Menu navigation** — BMAD skills present menus, confirmations, and choices. The autopilot auto-selects "Continue", "Create Mode", and makes context-appropriate decisions from your PRD and architecture docs.
36
+ - **Decision making** — when a skill asks a design question, the autopilot derives the answer from existing project artifacts (PRD, architecture, story specs). Only truly unanswerable questions pause execution.
37
+ - **Session management** — after 3 stories, the autopilot checkpoints state to disk and tells you to start a fresh session. `/bmad-autopilot-on` in the new session resumes exactly where it left off. No work is ever repeated.
38
+ - **Crash recovery** — if a session crashes mid-story, the next boot detects orphaned worktrees, recovers committed work (pushes it), and cleans up stale state.
39
+
40
+ ### When it stops (and only when)
41
+
42
+ The autopilot runs until the sprint is done or hits one of exactly 5 true blockers:
43
+
44
+ 1. A skill needs **original creative input** not in any project document (e.g., product vision for a PRD)
45
+ 2. A **new external dependency** is needed that isn't in the project
46
+ 3. **3 consecutive test failures** with no forward progress
47
+ 4. A **security vulnerability** requiring architectural decisions beyond the story scope
48
+ 5. **Conflicting acceptance criteria** that can't be resolved from project docs
49
+
50
+ Everything else — it decides, documents the decision in one sentence, and moves on.
51
+
52
+ ### The git workflow in detail
53
+
54
+ Controlled by `git.push.create_pr` in `_bmad-addons/modules/git/config.yaml`:
55
+
56
+ **PR flow** (`create_pr: true`, default) — stories are pushed and PRs are created. No auto-merge. Code reaches `main` only after PR approval.
57
+
58
+ ```
59
+ main ─────────────────────────────────────────────────────────
60
+ │ (artifacts only)
61
+ ├── story/1-1 ──→ push + PR #42 (→ main)
62
+ │ │
63
+ │ └── story/1-2 ──→ push + PR #43 (→ story/1-1)
64
+ │ │
65
+ │ └── story/1-3 ──→ push + PR #44 (→ story/1-2)
66
+
67
+ Epic 1 complete → retrospective
68
+ → "Ready to merge: PR #42, #43, #44"
69
+ ```
70
+
71
+ When previous stories have pending PRs, the autopilot creates **stacked PRs** — each story branches from the previous story's branch and targets it. When a PR is merged on the platform, subsequent PRs automatically retarget.
72
+
73
+ **Direct merge flow** (`create_pr: false`) — stories are merged to `main` immediately after push:
74
+
75
+ ```
76
+ main ── story/1-1 ──→ merge ── story/1-2 ──→ merge ── story/1-3 ──→ merge
77
+ ```
78
+
79
+ Each story is fully isolated in its own worktree. No half-finished code on `main`. The autopilot tracks git metadata in its own `git-status.yaml` (commit SHA, push status, PR URL, lint results) — it never modifies BMAD's `sprint-status.yaml`. Implementation artifacts (sprint status, story files, planning docs) are always committed to `main` after each story, regardless of merge strategy.
80
+
81
+ See [`modules/git/branching-and-pr-strategy.md`](_bmad-addons/modules/git/branching-and-pr-strategy.md) for the full branching and PR decision matrix.
82
+
83
+ ---
84
+
85
+ ## Multi-Agent Intelligence
86
+
87
+ Beyond the autopilot, the add-on includes 7 multi-agent skills that launch parallel subagents for tasks that benefit from diverse perspectives:
88
+
89
+ ### Parallel Code Review (`/bmad-ma-code-review`)
90
+
91
+ Three independent reviewers run simultaneously on the same diff:
92
+
93
+ | Agent | Perspective | Access |
94
+ |-------|------------|--------|
95
+ | **Blind Hunter** | Pure adversarial — finds bugs from code alone | Diff only, no project context |
96
+ | **Edge Case Hunter** | Boundary conditions, race conditions, missing validation | Full codebase access |
97
+ | **Acceptance Auditor** | Verifies every acceptance criterion is met | Diff + story spec |
98
+
99
+ Results are triaged: duplicates merged, contradictions flagged, findings classified as PATCH / WARN / DISMISS.
100
+
101
+ ### Brownfield Analysis Pipeline
102
+
103
+ > Codebase mapping inspired by [GSD's map-codebase](https://github.com/gsd-build/get-shit-done). Adapted with distinct output format, enriched agent prompts, and BMAD-specific downstream integration.
104
+
105
+ For existing codebases, three skills chain together:
106
+
107
+ **`/bmad-ma-codebase-map`** — 5 parallel agents scan the codebase simultaneously:
108
+ - Stack Analyzer (languages, frameworks, versions)
109
+ - Architecture Mapper (modules, patterns, data flow)
110
+ - Quality Assessor (tests, CI/CD, conventions)
111
+ - Concerns Hunter (TODOs, deprecated APIs, security issues, dead code)
112
+ - Integration Mapper (external APIs, databases, env vars)
113
+
114
+ **`/bmad-ma-assess`** — 3 parallel agents produce actionable findings:
115
+ - Dependency Auditor (CVEs, outdated packages, upgrade paths)
116
+ - Debt Classifier (prioritized tech debt with effort estimates)
117
+ - Migration Analyzer (framework upgrade paths and phased roadmap)
118
+
119
+ **`/bmad-ma-reverse-architect`** — 3 parallel agents extract architecture from code:
120
+ - Component Mapper (module boundaries, dependency graph)
121
+ - Data Flow Tracer (request lifecycle, state management)
122
+ - Pattern Extractor (design patterns, conventions, error handling)
123
+
124
+ Output: a BMAD-compatible `architecture.md` that feeds directly into `bmad-create-epics-and-stories`.
125
+
126
+ ### Migration Planning (`/bmad-ma-migrate`)
127
+
128
+ A 12-step workflow for taking a codebase from one stack to another. 4 subagent fan-outs across the process:
129
+
130
+ 1. Validate prerequisites and get target stack from user
131
+ 2. Auto-recommend migration strategy (strangler fig / big bang / branch-by-abstraction / parallel run)
132
+ 3. **Parallel**: Stack Mapper + Dependency Analyzer produce compatibility matrix
133
+ 4. Design coexistence layer (old + new code running together)
134
+ 5. Build phased roadmap ordered by dependency graph
135
+ 6. Generate per-component migration cards with effort/risk
136
+ 7. Plan data migration (schema changes, dual-write, backfill)
137
+ 8. Design API compatibility (versioning, deprecation timeline)
138
+ 9. **Parallel**: Test Parity Analyzer maps old tests to new equivalents
139
+ 10. **Parallel**: Risk Assessor produces per-phase risk matrix with rollback triggers
140
+ 11. Generate BMAD-compatible epics for sprint planning
141
+ 12. Finalize migration plan, epics, and tracking artifacts
142
+
143
+ ### Research and Discussion
144
+
145
+ **`/bmad-ma-research`** — Fan out research across multiple topics in parallel, each with web search access. Results synthesized into a unified report.
146
+
147
+ **`/bmad-ma-party-mode`** — Launch 2-3 BMAD personas (architect, PM, QA, dev, etc.) as parallel agents debating a topic. Multiple rounds where personas respond to each other. Produces consensus points, disagreements, and action items.
148
+
149
+ ---
150
+
151
+ ## Quick Start
152
+
153
+ ```bash
154
+ # 1. Install BMAD with the core method and Test Architect module
155
+ npx bmad-method install --modules bmm,tea --tools claude-code --yes
156
+ ```
157
+
158
+ This installs:
159
+ - **BMM** (BMad Method) — the core development workflow with 34+ skills
160
+ - **TEA** (Test Architect Enterprise) — risk-based test strategy, ATDD, CI quality gates, test framework scaffolding
161
+
162
+ For interactive module selection (see all available modules):
163
+ ```bash
164
+ npx bmad-method install
165
+ ```
166
+
167
+ For multiple tools:
168
+ ```bash
169
+ npx bmad-method install --modules bmm,tea --tools claude-code,cursor --yes
170
+ ```
171
+
172
+ ```bash
173
+ # 2. Install the autopilot add-on (interactive tool selection)
174
+ bash _bmad-addons/install.sh
175
+
176
+ # Or specify tools directly:
177
+ bash _bmad-addons/install.sh --tools claude-code,cursor
178
+
179
+ # Or install for all supported tools:
180
+ bash _bmad-addons/install.sh --tools all
181
+
182
+ # 3. Start the autopilot in your IDE
183
+ /bmad-autopilot-on
184
+ ```
185
+
186
+ ### BMAD Modules
187
+
188
+ | Module | Code | Description |
189
+ |--------|------|-------------|
190
+ | **BMad Method** | `bmm` | Core development workflow — analysis, planning, implementation, review |
191
+ | **Test Architect** | `tea` | Enterprise test strategy — ATDD, test design, CI setup, NFR assessment, traceability |
192
+
193
+ The TEA module adds these skills to your toolkit:
194
+
195
+ | Skill | Description |
196
+ |-------|-------------|
197
+ | `/bmad-testarch-test-design` | Risk-based test planning |
198
+ | `/bmad-testarch-framework` | Initialize production-ready test framework (Playwright, Cypress) |
199
+ | `/bmad-testarch-atdd` | Generate failing acceptance tests (TDD red phase) |
200
+ | `/bmad-testarch-automate` | Expand test automation coverage |
201
+ | `/bmad-testarch-ci` | Configure CI/CD quality pipeline with test execution |
202
+ | `/bmad-testarch-nfr` | Non-functional requirements assessment (performance, security) |
203
+ | `/bmad-testarch-test-review` | Quality audit with 0-100 scoring |
204
+ | `/bmad-testarch-trace` | Coverage traceability matrix and gate decisions |
205
+ | `/bmad-teach-me-testing` | Interactive testing education (7 sessions) |
206
+
207
+ ## Supported Tools
208
+
209
+ The add-on uses the universal SKILL.md format — same skills work across all 9 tools:
210
+
211
+ | Tool | Directory |
212
+ |------|-----------|
213
+ | Claude Code | `.claude/skills/` |
214
+ | Cursor | `.cursor/skills/` |
215
+ | Windsurf | `.windsurf/skills/` |
216
+ | Gemini CLI | `.gemini/skills/` |
217
+ | Cline | `.cline/skills/` |
218
+ | Roo Code | `.roo/skills/` |
219
+ | Trae | `.trae/skills/` |
220
+ | Kiro | `.kiro/skills/` |
221
+ | GitHub Copilot | `.github/copilot/skills/` |
222
+
223
+ ```bash
224
+ bash _bmad-addons/install.sh --tools claude-code,cursor,gemini-cli
225
+ ```
226
+
227
+ ## Git Platforms
228
+
229
+ | Platform | CLI | Auto-Detect | API Fallback |
230
+ |----------|-----|-------------|-------------|
231
+ | GitHub | `gh` | `github.com` | No |
232
+ | GitLab | `glab` | `gitlab.*` | No |
233
+ | Bitbucket | `bb` | `bitbucket.org` | Yes (`BITBUCKET_TOKEN`) |
234
+ | Gitea | `tea` | Explicit config | Yes (`GITEA_TOKEN` + `base_url`) |
235
+
236
+ No CLI installed? The addon falls back to **git_only mode** (direct merge, no PRs).
237
+
238
+ To explicitly choose between PR and direct merge regardless of platform:
239
+ ```yaml
240
+ # _bmad-addons/modules/git/config.yaml
241
+ git:
242
+ push:
243
+ create_pr: true # PR flow (default) — push + PR, no auto-merge
244
+ create_pr: false # Direct merge — merge to main after each story
245
+ ```
246
+
247
+ ## Supported Languages (Linting)
248
+
249
+ | Language | Linters | Language | Linters |
250
+ |----------|---------|----------|---------|
251
+ | Python | ruff, flake8, pylint | Java | checkstyle, pmd |
252
+ | JavaScript/TS | eslint, biome | C/C++ | cppcheck, clang-tidy |
253
+ | Rust | cargo clippy | C# | dotnet format |
254
+ | Go | golangci-lint | Swift | swiftlint |
255
+ | Ruby | rubocop | PL/SQL | sqlfluff |
256
+ | Kotlin | ktlint, detekt | PHP | phpstan, phpcs |
257
+
258
+ First found wins per language. Multi-language projects (monorepos) lint all languages in one pass. See [Extending](docs/EXTENDING.md) to add more.
259
+
260
+ ## Requirements
261
+
262
+ - [BMAD Method](https://github.com/bmad-code-org/BMAD-METHOD) v6.2.0+
263
+ - A supported AI code agent (see table above)
264
+ - Git repository with at least one commit
265
+ - Platform CLI for PR creation (optional — see table above)
266
+
267
+ ## Documentation
268
+
269
+ - [Installation Guide](docs/INSTALLATION.md)
270
+ - [Usage Guide](docs/USAGE.md)
271
+ - [Architecture](docs/ARCHITECTURE.md)
272
+ - [Configuration Reference](docs/CONFIGURATION.md)
273
+ - [Extending (Platforms & Languages)](docs/EXTENDING.md)
274
+ - [Contributing](docs/CONTRIBUTING.md)
275
+ - [Changelog](CHANGELOG.md)
276
+
277
+ ## License
278
+
279
+ MIT
@@ -0,0 +1,26 @@
1
+ # Patterns and paths exempt from secrets scanning
2
+ # One pattern per line. Supports glob syntax.
3
+
4
+ # Test files commonly contain mock secrets
5
+ test/**
6
+ tests/**
7
+ **/test_*
8
+ **/*_test.*
9
+ **/*_spec.*
10
+ spec/**
11
+
12
+ # Example/template files
13
+ *.example
14
+ *.sample
15
+ *.template
16
+ .env.example
17
+ .env.sample
18
+
19
+ # Documentation
20
+ docs/**
21
+ *.md
22
+
23
+ # Fixture/mock data
24
+ **/fixtures/**
25
+ **/mocks/**
26
+ **/testdata/**
@@ -0,0 +1,216 @@
1
+ # BMAD Workflow — Mandatory for All AI Agents
2
+
3
+ Always use the BMAD workflow for every story. Never skip steps. When unsure, invoke `bmad-help` first.
4
+
5
+ ---
6
+
7
+ ## Navigation & orientation
8
+
9
+ | Skill | When to use |
10
+ |-------|-------------|
11
+ | `bmad-help` | First resort when unsure what to do next — analyzes current state and recommends the right skill or workflow |
12
+
13
+ ---
14
+
15
+ ## Autopilot & git workflow (add-on)
16
+
17
+ | Skill | When to use |
18
+ |-------|-------------|
19
+ | `bmad-autopilot-on` | Start autonomous story execution with git branching, commits, and PRs |
20
+ | `bmad-autopilot-off` | Disengage autopilot, show sprint + git status report |
21
+
22
+ When the autopilot or git add-on is active:
23
+ - **NEVER** use `git add -A` or `git add .` — always stage files explicitly by name
24
+ - **NEVER** commit secrets, API keys, tokens, or credentials
25
+ - Each story gets its own isolated worktree and branch (`story/<key>`)
26
+ - Commits use conventional format: `feat(<epic>): <title> (<key>)`
27
+
28
+ ---
29
+
30
+ ## Full skill reference by lifecycle phase
31
+
32
+ ### Phase 0 — Project inception (new projects)
33
+
34
+ | Skill | When to use |
35
+ |-------|-------------|
36
+ | `bmad-product-brief` | Start here for a new project — collaborative discovery of goals, constraints, users |
37
+ | `bmad-create-prd` | Create a full Product Requirements Document from scratch |
38
+ | `bmad-edit-prd` | Update or revise an existing PRD |
39
+ | `bmad-validate-prd` | Validate a PRD against BMAD standards before moving to design |
40
+ | `bmad-create-architecture` | Create technical architecture and solution design decisions |
41
+ | `bmad-create-ux-design` | Plan UX patterns and design specifications |
42
+ | `bmad-create-epics-and-stories` | Break PRD + architecture into epics and story list |
43
+ | `bmad-generate-project-context` | Generate `project-context.md` with AI rules (run once after inception) |
44
+ | `bmad-document-project` | Document an existing (brownfield) project to give AI agents context |
45
+
46
+ ### Phase 1 — Sprint planning (before development starts)
47
+
48
+ | Skill | When to use |
49
+ |-------|-------------|
50
+ | `bmad-sprint-planning` | Generate `sprint-status.yaml` tracking file from epics list |
51
+ | `bmad-sprint-status` | Check current sprint status and surface risks at any time |
52
+ | `bmad-correct-course` | Manage significant scope or direction changes mid-sprint |
53
+
54
+ ### Phase 2 — Story development (the mandatory per-story loop)
55
+
56
+ See **Mandatory sequence per story** section below.
57
+
58
+ ### Phase 3 — Epic close-out
59
+
60
+ | Skill | When to use |
61
+ |-------|-------------|
62
+ | `bmad-retrospective` | Run after all stories in an epic are `done`; saves lessons, marks epic `done` |
63
+
64
+ ---
65
+
66
+ ## Quick path — for small changes without full story ceremony
67
+
68
+ | Skill | When to use |
69
+ |-------|-------------|
70
+ | `bmad-quick-dev` | Implement any user intent (bug fix, tweak, refactor) directly — follows project conventions |
71
+
72
+ > Use the quick path only for genuinely small, isolated changes. For anything touching multiple components or requiring E2E coverage, use the full story loop.
73
+
74
+ ---
75
+
76
+ ## Multi-agent skills (add-on)
77
+
78
+ These launch parallel subagents for deeper, faster analysis:
79
+
80
+ | Skill | Agents | When to use |
81
+ |-------|--------|-------------|
82
+ | `bmad-ma-code-review` | 3 | Parallel adversarial code review (Blind Hunter + Edge Case + Acceptance) |
83
+ | `bmad-ma-codebase-map` | 5 | Brownfield codebase mapping (stack, architecture, quality, concerns, integrations) |
84
+ | `bmad-ma-assess` | 3 | Tech debt assessment (dependency audit, debt classification, migration analysis) |
85
+ | `bmad-ma-reverse-architect` | 3 | Extract architecture from existing code (components, data flow, patterns) |
86
+ | `bmad-ma-migrate` | 4 | Full migration planning — 12 steps from current stack to target stack |
87
+ | `bmad-ma-research` | N | Parallel research fan-out with web search |
88
+ | `bmad-ma-party-mode` | 2-3 | Multi-persona discussion (architect, PM, QA, etc. debating in parallel) |
89
+
90
+ ### Brownfield analysis pipeline
91
+
92
+ ```
93
+ bmad-ma-codebase-map → bmad-ma-assess → bmad-ma-reverse-architect → bmad-ma-migrate
94
+ ```
95
+
96
+ Run `bmad-ma-codebase-map` first on any existing codebase. The other MA skills consume its outputs.
97
+
98
+ ---
99
+
100
+ ## Research & discovery skills
101
+
102
+ | Skill | When to use |
103
+ |-------|-------------|
104
+ | `bmad-technical-research` | Research technologies, frameworks, or architectural trade-offs |
105
+ | `bmad-domain-research` | Research a business domain or industry |
106
+ | `bmad-market-research` | Research market competition and customers |
107
+ | `bmad-brainstorming` | Facilitate structured ideation sessions |
108
+ | `bmad-advanced-elicitation` | Push the model to reconsider and refine recent output |
109
+
110
+ ---
111
+
112
+ ## QA & test architecture skills
113
+
114
+ | Skill | When to use |
115
+ |-------|-------------|
116
+ | `bmad-qa-generate-e2e-tests` | Generate E2E tests for existing features (retroactive coverage) |
117
+ | `bmad-testarch-framework` | Initialize test framework (Playwright / Cypress) |
118
+ | `bmad-testarch-atdd` | Generate failing acceptance tests (TDD cycle) |
119
+ | `bmad-testarch-test-design` | Create system-level or epic-level test plans |
120
+ | `bmad-testarch-nfr` | Assess non-functional requirements (performance, security, reliability) |
121
+ | `bmad-testarch-ci` | Scaffold CI/CD quality pipeline with test execution |
122
+ | `bmad-testarch-trace` | Generate traceability matrix and quality gate decisions |
123
+ | `bmad-testarch-test-review` | Review test quality against best practices |
124
+ | `bmad-testarch-automate` | Expand test automation coverage across the codebase |
125
+ | `bmad-teach-me-testing` | Interactive testing education sessions |
126
+
127
+ ---
128
+
129
+ ## Review skills
130
+
131
+ | Skill | When to use |
132
+ |-------|-------------|
133
+ | `bmad-code-review` | Full adversarial code review (3 layers) — mandatory step 5 of per-story loop |
134
+ | `bmad-review-adversarial-general` | Cynical critical review of any artifact (specs, designs, docs) |
135
+ | `bmad-review-edge-case-hunter` | Exhaustive edge-case and boundary analysis of code or specs |
136
+ | `bmad-editorial-review-structure` | Structural editing of documents |
137
+ | `bmad-editorial-review-prose` | Copy-editing for communication issues in documents |
138
+
139
+ ---
140
+
141
+ ## Agent role personas
142
+
143
+ These skills activate an interactive agent persona. They stay in character until given an exit command.
144
+
145
+ | Skill | Persona |
146
+ |-------|---------|
147
+ | `bmad-agent-pm` | Product Manager |
148
+ | `bmad-agent-analyst` | Business Analyst |
149
+ | `bmad-agent-architect` | Solution Architect |
150
+ | `bmad-agent-ux-designer` | UX Designer |
151
+ | `bmad-agent-dev` | Developer |
152
+ | `bmad-agent-qa` | QA Engineer |
153
+ | `bmad-agent-sm` | Scrum Master |
154
+ | `bmad-agent-tech-writer` | Technical Writer |
155
+ | `bmad-agent-quick-flow-solo-dev` | Rapid full-stack solo developer |
156
+ | `bmad-party-mode` | All agents in one group discussion |
157
+
158
+ ---
159
+
160
+ ## Document utilities
161
+
162
+ | Skill | When to use |
163
+ |-------|-------------|
164
+ | `bmad-shard-doc` | Split a large markdown document into organized smaller files |
165
+ | `bmad-index-docs` | Generate or update an `index.md` for a docs folder |
166
+ | `bmad-distillator` | Lossless LLM-optimized compression of source documents |
167
+
168
+ ---
169
+
170
+ ## Mandatory sequence per story
171
+
172
+ | Step | Skill | sprint-status.yaml transition | Definition of Done |
173
+ |------|-------|-------------------------------|--------------------|
174
+ | 1 | `bmad-create-story` | → `ready-for-dev` | Story file exists, all sections complete |
175
+ | 2 | `bmad-check-implementation-readiness` | (no change) | Readiness check passes with no blockers |
176
+ | 3 | `bmad-dev-story` (RED) | → `in-progress` | Tests written and **confirmed failing** before any implementation |
177
+ | 4 | `bmad-dev-story` (GREEN) | → `review` | All tests pass; pass count stated explicitly (e.g. "9/9 passed") |
178
+ | 5 | `bmad-code-review` | (no change) | All review layers complete; findings triaged |
179
+ | 6 | Apply `patch` findings + re-run tests | → `done` | All patch tasks completed, tests still green, pass count confirmed |
180
+ | 7 | `bmad-retrospective` (per epic, after all stories done) | epic → `done` | Retrospective output saved; epic marked done |
181
+
182
+ ## Task list hygiene
183
+
184
+ BMAD skills only update `_bmad-output/implementation-artifacts/sprint-status.yaml` — they do NOT update the Claude Code task list.
185
+
186
+ The task list must always reflect the full BMAD work breakdown. Before starting a story, create a task for **each step** above. Keep the list granular enough that anyone can see exactly where work stands at a glance.
187
+
188
+ Rules:
189
+ - Create all step-tasks for a story **before** starting work on it
190
+ - Mark each step-task `in_progress` when you begin it
191
+ - Mark each step-task `completed` immediately when done — never batch
192
+ - Do not start step N+1 until step N is `completed`
193
+ - `sprint-status.yaml` is updated automatically by BMAD skills — do NOT edit it manually
194
+
195
+ ## Issue and patch tracking
196
+
197
+ When tests fail **or** code review produces `patch` findings, each issue gets its own task:
198
+
199
+ - Create one task per distinct issue / patch item (not one task for all issues)
200
+ - Name it clearly: e.g. "Fix: `deleteTask` transaction not awaited" or "Patch P1: rollback missing on Ctrl+Down"
201
+ - Mark it `in_progress` when fixing, `completed` only after the fix is applied **and the relevant test passes**
202
+ - State the test result explicitly: "fixed — 10/10 passed"
203
+ - Do not mark the parent step-task `completed` until all its issue/patch tasks are `completed`
204
+
205
+ ## Story file updates
206
+
207
+ After `bmad-dev-story` completes, fill in the story file's `Dev Agent Record` section:
208
+ - List all files changed
209
+ - Note any non-obvious decisions or deviations from the spec
210
+ - Record final test pass count
211
+
212
+ ## Test result transparency
213
+
214
+ Every time tests are run, state the result explicitly in your response:
215
+ - `N/N passed` — or — `N passed, M failed` with failure details
216
+ - Never say "tests pass" without the count