workflow: id: brownfield-service name: Brownfield Service/API Enhancement description: >- Agent workflow for enhancing existing backend services and APIs with new features, modernization, or performance improvements. Handles existing system analysis and safe integration. type: brownfield project_types: - service-modernization - api-enhancement - microservice-extraction - performance-optimization - integration-enhancement sequence: - step: service_analysis agent: architect action: analyze existing project and use task document-project creates: multiple documents per the document-project template notes: "Review existing service documentation, codebase, performance metrics, and identify integration dependencies." - agent: pm creates: brownfield-prd.md uses: brownfield-prd-tmpl requires: existing_service_analysis notes: "Creates comprehensive brownfield PRD focused on service enhancement with existing system analysis. SAVE OUTPUT: Copy final brownfield-prd.md to your project's docs/ folder." - agent: architect creates: brownfield-architecture.md uses: brownfield-architecture-tmpl requires: brownfield-prd.md notes: "Creates brownfield architecture with service integration strategy and API evolution planning. SAVE OUTPUT: Copy final brownfield-architecture.md to your project's docs/ folder." - agent: po validates: all_artifacts uses: po-master-checklist notes: "Validates all brownfield documents for service integration safety and API compatibility. May require updates to any document." - 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." - workflow_end: action: move_to_ide notes: "All planning artifacts complete. Move to IDE environment to begin development. Explain to the user the IDE Development Workflow next steps: data#bmad-kb:IDE Development Workflow" flow_diagram: | ```mermaid graph TD A[Start: Service Enhancement] --> B[analyst: analyze existing service] B --> C[pm: brownfield-prd.md] C --> D[architect: brownfield-architecture.md] D --> E[po: validate with po-master-checklist] E --> F{PO finds issues?} F -->|Yes| G[Return to relevant agent for fixes] F -->|No| H[Move to IDE Environment] G --> E style H fill:#90EE90 style C fill:#FFE4B5 style D fill:#FFE4B5 ``` decision_guidance: when_to_use: - Service enhancement requires coordinated stories - API versioning or breaking changes needed - Database schema changes required - Performance or scalability improvements needed - Multiple integration points affected handoff_prompts: analyst_to_pm: "Service analysis complete. Create comprehensive brownfield PRD with service integration strategy." pm_to_architect: "Brownfield PRD ready. Save it as docs/brownfield-prd.md, then create the service architecture." architect_to_po: "Architecture complete. Save it as docs/brownfield-architecture.md. Please validate all artifacts for service integration safety." po_issues: "PO found issues with [document]. Please return to [agent] to fix and re-save the updated document." complete: "All brownfield planning artifacts validated and saved in docs/ folder. Move to IDE environment to begin development."