Learn BMAD workflows step by step through practical examples.
Tutorial 1: First BMAD Workflow#
Scenario#
We will use BMAD to "add an author list screen to the console app".
Step 1: Start BMAD Workflow#
/bmad " Add console author list screen "
Step 2: Analysis Phase (automatic)#
Analyst analyzes requirements and writes AC:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Analyst Review: APPROVED โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ โ
Requirements clarity: PASS โ
โ - Console app, author list screen โ
โ - Scope: feature/console module โ
โ โ
โ โ
AC BDD Gherkin format: PASS โ
โ - @happy-path: 2 โ
โ - @error-handling: 1 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Acceptance Criteria:
Feature: Console author list screen
As a publisher admin
I want to view the author list
So that I can manage author information
@happy-path
Scenario: View author list
Given I am logged in as a publisher admin
When I click the author management menu
Then the author list screen is displayed
And the registered authors are shown in a table
@happy-path
Scenario: Search authors
Given I am on the author list screen
And the author " Hong Gildong " is registered
When I enter " Hong Gildong " in the search field
Then the search results include " Hong Gildong "
@error-handling
Scenario: List loading failure
Given the server connection is unstable
When I navigate to the author list screen
Then the message " Unable to load data " is displayed
And a retry button is displayed
Step 3: Planning Phase (automatic)#
Product Manager creates the issue:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ PM Review: APPROVED โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ ๐ Issue created: #1810 โ
โ Title: [feat] Add console author list screen โ
โ Labels: feature, console, author โ
โ Story Point: 5 โ
โ โ
โ ๐ Complexity analysis: โ
โ - Screen type: List (pagination, search) โ
โ - Layers: Presentation + Domain + Data โ
โ - Expected files: 15-20 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Step 4: Solutioning Phase (parallel)#
Architect and UX Designer review simultaneously:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Phase 3: SOLUTIONING (parallel execution) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ ๐๏ธ Architect review: โ
APPROVED โ
โ โโโ โ
Clean Architecture โ
โ โ โโโ AuthorListBloC โ GetAuthorsUseCase โ IAuthorRepo โ
โ โโโ โ
Dependency wiring โ
โ โ โโโ Pure DI, BlocProvider direct creation verified โ
โ โโโ โ
API design โ
โ โโโ Uses existing AuthorEndpoint โ
โ โ
โ ๐จ UX Designer review: โ
APPROVED โ
โ โโโ โ
CoUI compliance โ
โ โ โโโ DataTable, TextField, Button used โ
โ โโโ โ
Layout โ
โ โ โโโ Standard console layout (Scaffold + headers) โ
โ โโโ โ
Accessibility โ
โ โโโ Keyboard navigation supported โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Step 5: Implementation Phase#
Flutter Developer starts implementation:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Phase 4: IMPLEMENTATION โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ ๐ฟ Branch created: feature/1810-author-list โ
โ โ
โ ๐ Created files: โ
โ feature/console/console_author/ โ
โ โโโ lib/src/ โ
โ โ โโโ data/ โ
โ โ โ โโโ repository/author_repository_impl.dart โ
โ โ โโโ domain/ โ
โ โ โ โโโ entity/author.dart โ
โ โ โ โโโ repository/i_author_repository.dart โ
โ โ โ โโโ usecase/get_authors_usecase.dart โ
โ โ โโโ presentation/ โ
โ โ โ โโโ bloc/author_list_bloc.dart โ
โ โ โ โโโ page/author_list_page.dart โ
โ โ โ โโโ widget/author_table.dart โ
โ โ โโโ route/route.dart โ
โ โโโ test/ โ
โ โโโ bloc/author_list_bloc_test.dart โ
โ โโโ bdd/author_list_test.dart โ
โ โ
โ โ
melos run analyze: PASS โ
โ โ
Tests: 12/12 passed โ
โ โ
PR #1815 created โ
โ โ
Code review: APPROVED โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Step 6: Complete#
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ BMAD Workflow Complete โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ โ
Phase 1: ANALYSIS - Approved (3 AC confirmed) โ
โ โ
Phase 2: PLANNING - Issue #1810 created โ
โ โ
Phase 3: SOLUTIONING - Design approved โ
โ โ
Phase 4: IMPLEMENTATION - PR #1815 merged โ
โ โ
โ ๐ Summary: โ
โ - Reviews passed: 7/7 personas โ
โ - Gates passed: 4/4 phases โ
โ - Retries: 0 โ
โ - Total files: 18 โ
โ โ
โ ๐งน Cleanup complete: โ
โ - Branch deleted: feature/1810-author-list โ
โ - Issue closed: #1810 โ
โ - Pipeline: Done โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Tutorial 2: Gate Failure and Re-review#
Scenario#
Covers the case when Architect review fails in the Solutioning phase.
Step 1: Gate Failure Occurs#
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Phase 3: SOLUTIONING Gate โ FAILED โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ ๐๏ธ Architect review: โ REJECTED โ
โ โโโ โ
Clean Architecture: PASS โ
โ โโโ โ Dependency wiring: FAIL โ
โ โ โโโ getIt < Bloc > () usage found - BlocProvider direct creation required โ
โ โโโ โ
API design: PASS โ
โ โ
โ ๐จ UX Designer review: โ
APPROVED โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Required actions: โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ 1. Change to direct creation in BlocProvider: โ
โ create: (_) = > AuthorBloc() โ
โ โ
โ โ ๏ธ Re-review required after completing fixes: โ
โ /bmad:review --persona architect --retry โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Step 2: Check Feedback#
# Check current status
/bmad:status --phase solutioning
Output:
Phase: Solutioning
Status: โ BLOCKED (Architect review failed)
Architect feedback:
- getIt < Bloc > () usage prohibited - BlocProvider direct creation required
- File: lib/src/presentation/page/console_author_page.dart
- Required change: create: (_) = > AuthorBloc()
UX Designer: โ
APPROVED
Next action: Apply feedback then /bmad:review --persona architect --retry
Step 3: Fix Code#
// console_author_page.dart (before fix)
class ConsoleAuthorPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (_) => getIt<AuthorBloc>() // โ getIt usage
..add(const AuthorEvent.load()),
child: const _ConsoleAuthorView(),
);
}
}
// console_author_page.dart (after fix)
class ConsoleAuthorPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (_) => AuthorBloc() // โ
Direct creation
..add(const AuthorEvent.load()),
child: const _ConsoleAuthorView(),
);
}
}
Step 4: Request Re-review#
/bmad:review --persona architect --retry
Output:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐๏ธ Architect Review (re-review): โ
APPROVED โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ โ
Clean Architecture: PASS โ
โ โ
Dependency wiring: PASS โ
โ โโโ Pure DI pattern compliance, BlocProvider direct creation verified โ โ
โ โ
API design: N/A โ
โ โ
โ Phase 3 Gate: โ
PASSED โ
โ โ Proceeding to Phase 4 (Implementation) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Tutorial 3: Emergency Mode Usage#
Scenario#
A payment bug has occurred in production and an emergency fix is needed.
Step 1: Start Emergency Mode#
/bmad --emergency " emergency fix for payment amount calculation error "
Step 2: Approval Request#
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ ๏ธ Emergency Mode Approval Request โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ Emergency mode streamlines the following gates: โ
โ - Analysis: Skipped โ
โ - Planning: Skipped โ
โ - Solutioning: Streamlined (core review only) โ
โ โ
โ โ ๏ธ Implementation gate is still mandatory: โ
โ - melos run analyze pass โ
โ - Basic tests pass โ
โ โ
โ โ ๏ธ Post-review is required within 48 hours of completion. โ
โ โ
โ [Yes, approved] [No, proceed in normal mode] โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
User selects "Yes, approved".
Step 3: Streamlined Workflow#
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐จ Emergency Mode: Emergency fix for payment amount calculation error โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ โญ๏ธ Phase 1: ANALYSIS - Skipped (emergency mode) โ
โ โญ๏ธ Phase 2: PLANNING - Skipped (emergency mode) โ
โ ๐ Phase 3: SOLUTIONING - Streamlined review in progress โ
โ โณ Phase 4: IMPLEMENTATION - Waiting โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Step 4: Completion and Post-Review Notification#
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐จ Emergency Workflow Complete โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ โ
Emergency fix complete: PR #1820 merged โ
โ โ
โ โ ๏ธ Post-review required: โ
โ - Deadline: Within 48 hours (until 2025-01-26 15:30) โ
โ - Reviewers: Architect, Product Manager โ
โ - Issue: #1821 (auto-created) โ
โ โ
โ Post-review items: โ
โ - [ ] Review impact of fix on architecture โ
โ - [ ] Check if additional tests are needed โ
โ - [ ] Check if documentation is needed โ
โ - [ ] Plan preventive measures โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Tutorial 4: Skip Specific Persona#
Scenario#
Backend-only task where UX Designer review is not needed.
Step 1: Use Persona Skip Option#
/bmad --skip-persona ux-designer " Add Serverpod migration endpoint "
Step 2: Solutioning Phase#
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Phase 3: SOLUTIONING โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ ๐๏ธ Architect review: โ
APPROVED โ
โ โโโ โ
Clean Architecture โ
โ โโโ โ
API design โ
โ โโโ โ
DB migration review โ
โ โ
โ ๐จ UX Designer review: โญ๏ธ Skipped (--skip-persona) โ
โ โ
โ Phase 3 Gate: โ
PASSED โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Tutorial 5: AC (Acceptance Criteria) Writing Guide#
BDD Gherkin Format Required#
In the Analysis phase, the Analyst must write all AC in BDD Gherkin format.
Basic Structure#
Feature: {feature name}
As a {user role}
I want to {desired capability}
So that {expected benefit}
Background:
Given {common precondition}
@happy-path
Scenario: {normal case}
Given {precondition}
When {action}
Then {verifiable result}
@error-handling
Scenario: {error case}
Given {precondition}
When {error-inducing action}
Then {error handling result}
@edge-case
Scenario: {boundary case}
Given {special condition}
When {action}
Then {result}
Required Tags#
| Tag | Required | Minimum Count |
|---|---|---|
@happy-path | โ | 1 or more |
@error-handling | โ | 1 or more |
@edge-case | Recommended | - |
Example: Form Screen#
Feature: Author registration form
As a publisher admin
I want to register a new author
So that I can manage author information
Background:
Given I am logged in as a publisher admin
And I am on the author registration screen
@happy-path
Scenario: Register author with valid information
Given all required fields are empty
When I enter " Hong Gildong " in the name field
And I enter " hong@example.com " in the email field
And I click the save button
Then the author is registered successfully
And I am navigated to the author list screen
And a success toast is displayed
@error-handling
Scenario: Required field missing
Given the name field is empty
When I click the save button
Then the error " Name is required " is displayed
And the form is not submitted
@error-handling
Scenario: Invalid email format
Given I enter " invalid-email " in the email field
When I click the save button
Then the error " Please enter a valid email " is displayed
@edge-case
Scenario: Duplicate email
Given the email " hong@example.com " is already registered
When I enter " hong@example.com " in the email field
And I click the save button
Then the error " This email is already registered " is displayed
AC Verification Failure Example#
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Analyst Review: โ REJECTED โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ โ
โ โ AC BDD Gherkin format: FAIL โ
โ - @error-handling scenario is missing โ
โ โ
โ Required actions: โ
โ 1. Add at least 1 error handling scenario โ
โ โ
โ Example: โ
โ @error-handling โ
โ Scenario: Display error on server failure โ
โ Given the server connection is unstable โ
โ When I click the save button โ
โ Then the error " Save failed " is displayed โ
โ And a retry button is displayed โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Next Steps#
- BMAD_GUIDE.md - Full guide
- BMAD_QUICKREF.md - Quick reference
- PERSONA_MATRIX.md - Persona matrix