BMAD Developer
Trigger Intents
bmad:dev-story
bmad:code-review
Workflow Variants
dev-story
- Implement one story to completion with tests.
code-review
- Review implementation quality against story acceptance criteria.
Inputs
- target story file
docs/stories/STORY-*.md
- architecture constraints from
docs/bmad/architecture.md when present
- repository coding and testing standards
Language Guard (Mandatory)
Enforce language selection separately for chat responses and generated artifacts.
Chat language (communication_language) fallback order:
language.communication_language from bmad/project.yaml
English
Rules for chat responses:
- Use the resolved chat language for all assistant responses (questions, status updates, summaries, and handoff notes).
- Do not switch chat language unless the user explicitly requests a different language in the current thread.
Artifact language (document_output_language) fallback order:
language.document_output_language from bmad/project.yaml
English
Rules for generated artifacts:
- Use the resolved artifact language for all generated BMAD documents and structured artifacts.
- write prose and field values in the resolved document language
- avoid mixed-language requirement clauses with English modal verbs (for example,
System shall followed by non-English text)
- allow English acronyms/abbreviations in non-English sentences (for example,
API, SLA, KPI, OAuth, WCAG)
- Keep code snippets, CLI commands, file paths, and identifiers in their original technical form.
Mandatory Reference Load
Before executing dev-story or code-review, read REFERENCE.md first and treat it as required context. Then load focused details from:
resources/clean-code-checklist.md
resources/testing-standards.md
Architecture Guardrails = Architecture Compliance Guardrails section
(source of truth for architecture constraints).
When docs/bmad/architecture.md exists, apply Architecture Guardrails.
Output Contract
- code and test changes in repository
- optional review artifact
docs/bmad/code-review.md
- clear pass/fail status against acceptance criteria
- for architecture-constrained stories: concise note on how key constraints were handled
Core Workflow
- Read story scope and acceptance criteria.
- Implement minimal complete solution.
- Add or update tests.
- Run quality checks and summarize outcomes.
- Report residual risks and follow-up items.
- If architecture constraints are clearly violated, return
Needs changes; otherwise report residual risks and follow-up items.
Implementation Approach
1. Understand Story and Constraints
- Parse acceptance criteria into explicit checks.
- Identify touched modules, dependencies, and data contracts.
- Load architecture constraints from
docs/bmad/architecture.md when present.
- Apply Architecture Guardrails.
- Flag ambiguities and assumptions before implementation.
2. Plan Before Coding
- Break work into small slices:
- data and schema changes
- business logic
- interfaces and adapters
- test updates
- Define edge cases, failure modes, and rollback-safe behavior.
3. Implement Incrementally
- Prefer small, reviewable changes over large rewrites.
- Preserve existing project conventions and architecture boundaries.
- Handle errors explicitly and keep behavior deterministic.
- Avoid hidden scope expansion; if scope grows, record it in the summary.
4. Test to Match Risk
- Add unit tests for new logic and edge cases.
- Add integration tests where component boundaries are crossed.
- Add end-to-end tests for critical user-facing flows when applicable.
- Verify acceptance criteria with test evidence, not assumptions.
5. Run Hard Quality Gates
- Run lint and static checks:
bash scripts/lint-check.sh
- Run pre-commit checks:
bash scripts/pre-commit-check.sh
- Run coverage validation (default 80% minimum unless project requires higher):
bash scripts/check-coverage.sh
- Do not mark complete with unresolved failing checks unless explicitly approved.
6. Close with Traceable Outcome
- Map each acceptance criterion to code and test evidence.
- Summarize relevant architecture constraints and where they are addressed in code/tests.
- Summarize changed files, key decisions, and residual risks.
- For
code-review, record findings using templates/code-review.template.md.
Script Selection
- Lint checks:
bash scripts/lint-check.sh
- Pre-commit quality checks:
bash scripts/pre-commit-check.sh
- Coverage checks:
bash scripts/check-coverage.sh
Template Map
templates/code-review.template.md
- Why: structured review output for quality and risk communication.
Reference Map
REFERENCE.md
Must read first for developer workflow and implementation discipline.
resources/clean-code-checklist.md
Use when reviewing maintainability and readability.
resources/testing-standards.md
Use when validating test completeness and quality.
Quality Gates
- acceptance criteria are explicitly verified
- architecture constraints are explicitly verified (storage, auth, idempotency when applicable)
- tests and lint pass, or failures are reported clearly
- no hidden scope expansion without note
- implementation remains maintainable and reviewable
1---2name: bmad-developer3description: Implementation skill for BMAD. Use for bmad:dev-story and bmad:code-review to deliver tested code from story specs.4---56# BMAD Developer78## Trigger Intents910- `bmad:dev-story`11- `bmad:code-review`1213## Workflow Variants14151. `dev-story`16- Implement one story to completion with tests.17182. `code-review`19- Review implementation quality against story acceptance criteria.2021## Inputs2223- target story file `docs/stories/STORY-*.md`24- architecture constraints from `docs/bmad/architecture.md` when present25- repository coding and testing standards2627## Language Guard (Mandatory)2829Enforce language selection separately for chat responses and generated artifacts.3031Chat language (`communication_language`) fallback order:32331. `language.communication_language` from `bmad/project.yaml`342. `English`3536Rules for chat responses:3738- Use the resolved chat language for all assistant responses (questions, status updates, summaries, and handoff notes).39- Do not switch chat language unless the user explicitly requests a different language in the current thread.4041Artifact language (`document_output_language`) fallback order:42431. `language.document_output_language` from `bmad/project.yaml`442. `English`4546Rules for generated artifacts:4748- Use the resolved artifact language for all generated BMAD documents and structured artifacts.49- write prose and field values in the resolved document language50- avoid mixed-language requirement clauses with English modal verbs (for example, `System shall` followed by non-English text)51- allow English acronyms/abbreviations in non-English sentences (for example, `API`, `SLA`, `KPI`, `OAuth`, `WCAG`)52- Keep code snippets, CLI commands, file paths, and identifiers in their original technical form.5354## Mandatory Reference Load5556Before executing `dev-story` or `code-review`, read `REFERENCE.md` first and treat it as required context. Then load focused details from:57- `resources/clean-code-checklist.md`58- `resources/testing-standards.md`5960Architecture Guardrails = `Architecture Compliance Guardrails` section61(source of truth for architecture constraints).6263When `docs/bmad/architecture.md` exists, apply Architecture Guardrails.6465## Output Contract6667- code and test changes in repository68- optional review artifact `docs/bmad/code-review.md`69- clear pass/fail status against acceptance criteria70- for architecture-constrained stories: concise note on how key constraints were handled7172## Core Workflow73741. Read story scope and acceptance criteria.752. Implement minimal complete solution.763. Add or update tests.774. Run quality checks and summarize outcomes.785. Report residual risks and follow-up items.796. If architecture constraints are clearly violated, return `Needs changes`; otherwise report residual risks and follow-up items.8081## Implementation Approach8283### 1. Understand Story and Constraints8485- Parse acceptance criteria into explicit checks.86- Identify touched modules, dependencies, and data contracts.87- Load architecture constraints from `docs/bmad/architecture.md` when present.88- Apply Architecture Guardrails.89- Flag ambiguities and assumptions before implementation.9091### 2. Plan Before Coding9293- Break work into small slices:94 - data and schema changes95 - business logic96 - interfaces and adapters97 - test updates98- Define edge cases, failure modes, and rollback-safe behavior.99100### 3. Implement Incrementally101102- Prefer small, reviewable changes over large rewrites.103- Preserve existing project conventions and architecture boundaries.104- Handle errors explicitly and keep behavior deterministic.105- Avoid hidden scope expansion; if scope grows, record it in the summary.106107### 4. Test to Match Risk108109- Add unit tests for new logic and edge cases.110- Add integration tests where component boundaries are crossed.111- Add end-to-end tests for critical user-facing flows when applicable.112- Verify acceptance criteria with test evidence, not assumptions.113114### 5. Run Hard Quality Gates115116- Run lint and static checks:117 ```bash118 bash scripts/lint-check.sh119 ```120- Run pre-commit checks:121 ```bash122 bash scripts/pre-commit-check.sh123 ```124- Run coverage validation (default 80% minimum unless project requires higher):125 ```bash126 bash scripts/check-coverage.sh127 ```128- Do not mark complete with unresolved failing checks unless explicitly approved.129130### 6. Close with Traceable Outcome131132- Map each acceptance criterion to code and test evidence.133- Summarize relevant architecture constraints and where they are addressed in code/tests.134- Summarize changed files, key decisions, and residual risks.135- For `code-review`, record findings using `templates/code-review.template.md`.136137## Script Selection138139- Lint checks:140 ```bash141 bash scripts/lint-check.sh142 ```143- Pre-commit quality checks:144 ```bash145 bash scripts/pre-commit-check.sh146 ```147- Coverage checks:148 ```bash149 bash scripts/check-coverage.sh150 ```151152## Template Map153154- `templates/code-review.template.md`155- Why: structured review output for quality and risk communication.156157## Reference Map158159- `REFERENCE.md`160- Must read first for developer workflow and implementation discipline.161162- `resources/clean-code-checklist.md`163- Use when reviewing maintainability and readability.164165- `resources/testing-standards.md`166- Use when validating test completeness and quality.167168## Quality Gates169170- acceptance criteria are explicitly verified171- architecture constraints are explicitly verified (storage, auth, idempotency when applicable)172- tests and lint pass, or failures are reported clearly173- no hidden scope expansion without note174- implementation remains maintainable and reviewable