2025-08-17 19:23:50 -05:00
# <!-- Powered by BMAD™ Core -->
2025-06-08 19:22:57 -05:00
workflow :
id : brownfield-service
name : Brownfield Service/API Enhancement
description : >-
2025-06-08 20:34:07 -05:00
Agent workflow for enhancing existing backend services and APIs with new features,
modernization, or performance improvements. Handles existing system analysis and safe integration.
2025-06-08 19:22:57 -05:00
type : brownfield
project_types :
- service-modernization
- api-enhancement
- microservice-extraction
- performance-optimization
2025-06-08 20:34:07 -05:00
- integration-enhancement
2025-06-08 19:22:57 -05:00
2025-06-17 22:04:24 -05:00
sequence :
2025-06-08 20:34:07 -05:00
- step : service_analysis
2025-06-19 18:07:22 -05:00
agent : architect
2025-06-17 22:04:24 -05:00
action : analyze existing project and use task document-project
creates : multiple documents per the document-project template
2025-06-08 20:34:07 -05:00
notes : "Review existing service documentation, codebase, performance metrics, and identify integration dependencies."
2025-06-08 19:22:57 -05:00
2025-06-08 20:34:07 -05:00
- agent : pm
2025-06-28 23:25:40 +03:00
creates : prd.md
2025-06-08 20:34:07 -05:00
uses : brownfield-prd-tmpl
requires : existing_service_analysis
2025-06-28 23:25:40 +03:00
notes : "Creates comprehensive PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final prd.md to your project's docs/ folder."
2025-06-08 19:22:57 -05:00
2025-06-08 20:34:07 -05:00
- agent : architect
2025-06-28 23:25:40 +03:00
creates : architecture.md
2025-06-08 20:34:07 -05:00
uses : brownfield-architecture-tmpl
2025-06-28 23:25:40 +03:00
requires : prd.md
notes : "Creates architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final architecture.md to your project's docs/ folder."
2025-06-08 19:22:57 -05:00
2025-06-08 20:34:07 -05:00
- agent : po
validates : all_artifacts
2025-06-10 07:17:19 -05:00
uses : po-master-checklist
2025-06-28 23:25:40 +03:00
notes : "Validates all documents for service integration safety and API compatibility. May require updates to any document."
2025-06-08 19:22:57 -05:00
2025-06-08 20:34:07 -05:00
- agent : various
updates : any_flagged_documents
condition : po_checklist_issues
notes : "If PO finds issues, return to relevant agent to fix and re-export updated documents to docs/ folder."
2025-06-08 19:22:57 -05:00
2025-07-01 22:46:59 -05:00
- agent : po
action : shard_documents
creates : sharded_docs
requires : all_artifacts_in_project
notes : |
Shard documents for IDE development :
- Option A: Use PO agent to shard : @po then ask to shard docs/prd.md
- Option B: Manual : Drag shard-doc task + docs/prd.md into chat
- Creates docs/prd/ and docs/architecture/ folders with sharded content
- agent : sm
action : create_story
creates : story.md
requires : sharded_docs
repeats : for_each_epic
notes : |
Story creation cycle :
- SM Agent (New Chat) : @sm → *create
- Creates next story from sharded docs
- Story starts in "Draft" status
- agent : analyst/pm
action : review_draft_story
updates : story.md
requires : story.md
optional : true
condition : user_wants_story_review
notes : |
OPTIONAL : Review and approve draft story
- NOTE : story-review task coming soon
- Review story completeness and alignment
- Update story status : Draft → Approved
- agent : dev
action : implement_story
creates : implementation_files
requires : story.md
notes : |
Dev Agent (New Chat) : @dev
- Implements approved story
- Updates File List with all changes
- Marks story as "Review" when complete
- agent : qa
action : review_implementation
updates : implementation_files
requires : implementation_files
optional : true
notes : |
OPTIONAL: QA Agent (New Chat) : @qa → review-story
- Senior dev review with refactoring ability
- Fixes small issues directly
- Leaves checklist for remaining items
- Updates story status (Review → Done or stays Review)
- agent : dev
action : address_qa_feedback
updates : implementation_files
condition : qa_left_unchecked_items
notes : |
If QA left unchecked items :
- Dev Agent (New Chat) : Address remaining items
- Return to QA for final approval
2025-08-31 20:30:52 -05:00
- step : repeat_development_cycle
2025-07-01 22:46:59 -05:00
action : continue_for_all_stories
notes : |
Repeat story cycle (SM → Dev → QA) for all epic stories
Continue until all stories in PRD are complete
- agent : po
action : epic_retrospective
creates : epic-retrospective.md
condition : epic_complete
optional : true
notes : |
OPTIONAL : After epic completion
- NOTE : epic-retrospective task coming soon
- Validate epic was completed correctly
- Document learnings and improvements
2025-08-31 20:30:52 -05:00
- step : workflow_end
2025-07-01 22:46:59 -05:00
action : project_complete
2025-06-24 23:56:57 -05:00
notes : |
2025-07-01 22:46:59 -05:00
All stories implemented and reviewed!
Project development phase complete.
2025-08-16 19:08:39 -05:00
2025-07-07 22:11:32 -05:00
Reference : {root}/data/bmad-kb.md#IDE Development Workflow
2025-06-08 19:22:57 -05:00
2025-06-08 20:34:07 -05:00
flow_diagram : |
```mermaid
graph TD
2025-06-17 22:04:24 -05:00
A[Start: Service Enhancement] --> B[analyst : analyze existing service]
2025-06-28 23:25:40 +03:00
B --> C[pm : prd.md]
C --> D[architect : architecture.md]
2025-06-17 22:04:24 -05:00
D --> E[po : validate with po-master-checklist]
E --> F{PO finds issues?}
F -->|Yes| G[Return to relevant agent for fixes]
2025-07-01 22:46:59 -05:00
F -->|No| H[po : shard documents]
2025-06-17 22:04:24 -05:00
G --> E
2025-07-01 22:46:59 -05:00
H --> I[sm : create story]
I --> J{Review draft story?}
J -->|Yes| K[analyst/pm : review & approve story]
J -->|No| L[dev : implement story]
K --> L
L --> M{QA review?}
M -->|Yes| N[qa : review implementation]
M -->|No| O{More stories?}
N --> P{QA found issues?}
P -->|Yes| Q[dev : address QA feedback]
P -->|No| O
Q --> N
O -->|Yes| I
O -->|No| R{Epic retrospective?}
R -->|Yes| S[po : epic retrospective]
R -->|No| T[Project Complete]
S --> T
2025-06-17 22:04:24 -05:00
2025-07-01 22:46:59 -05:00
style T fill:#90EE90
style H fill:#ADD8E6
style I fill:#ADD8E6
style L fill:#ADD8E6
2025-06-17 22:04:24 -05:00
style C fill:#FFE4B5
style D fill:#FFE4B5
2025-07-01 22:46:59 -05:00
style K fill:#F0E68C
style N fill:#F0E68C
style S fill:#F0E68C
2025-06-08 20:34:07 -05:00
```
2025-06-08 19:22:57 -05:00
2025-06-08 20:34:07 -05:00
decision_guidance :
2025-06-17 22:04:24 -05:00
when_to_use :
- Service enhancement requires coordinated stories
2025-06-08 20:34:07 -05:00
- API versioning or breaking changes needed
- Database schema changes required
- Performance or scalability improvements needed
- Multiple integration points affected
2025-06-08 19:22:57 -05:00
2025-06-08 20:34:07 -05:00
handoff_prompts :
2025-06-28 23:25:40 +03:00
analyst_to_pm : "Service analysis complete. Create comprehensive PRD with service integration strategy."
pm_to_architect : "PRD ready. Save it as docs/prd.md, then create the service architecture."
architect_to_po : "Architecture complete. Save it as docs/architecture.md. Please validate all artifacts for service integration safety."
2025-06-08 20:34:07 -05:00
po_issues : "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document."
2025-06-28 23:25:40 +03:00
complete : "All planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."