# Create Architecture — Confluence Output The workflow execution engine is governed by: {project-root}/_bmad/core/tasks/workflow.xml You MUST have already loaded and processed: the workflow-jira.yaml for this workflow ## Overview Creates comprehensive architecture decisions through an 8-step collaborative workflow. All output is written to Confluence exclusively. After creation, links the architecture document to any existing Epics via Jira Remote Issue Links and posts a handoff. --- Communicate in {communication_language} with {user_name} Invoke the `read-jira-context` task with `context_type: "project_overview"` to fetch existing project context from Confluence Invoke `read-jira-context` with `context_type: "confluence_artefact"` and `scope_key: "prd"` to load the PRD Invoke `read-jira-context` with `context_type: "confluence_artefact"` and `scope_key: "product_brief"` to load the product brief Invoke `read-jira-context` with `context_type: "confluence_artefact"` and `scope_key: "ux_design"` to load the UX design (if exists) Load the architecture template from `{template}` Begin collaborative architecture facilitation as an architectural peer Ask the user to describe the technical context, constraints, and any existing systems Analyse the PRD, product brief, and UX design loaded from Confluence: 1. Identify core functional requirements with architectural implications 2. Extract non-functional requirements (performance, scalability, security) 3. Map technical constraints and integration points 4. Identify domain complexity and project type Present a technical context summary and confirm with the user Propose and discuss technology selections: 1. Programming languages and frameworks 2. Database and storage technologies 3. Infrastructure and deployment approach 4. Third-party services and integrations Present recommendations with rationale and trade-offs Confirm selections with the user Document key architecture decisions using the ADR format: For each significant decision: - **Context**: What is the situation? - **Decision**: What was decided? - **Rationale**: Why was this chosen over alternatives? - **Consequences**: What are the trade-offs? Validate each decision with the user Define the architectural patterns to be used: 1. Overall architecture style (monolith, microservices, serverless, etc.) 2. Data flow patterns 3. Authentication and authorisation patterns 4. Error handling and resilience patterns 5. Testing strategy alignment Confirm patterns with the user Define the system structure: 1. Component/module breakdown 2. Layer boundaries and responsibilities 3. API contracts between components 4. Data model and schema design 5. File and folder structure conventions Present the structure and validate with the user Validate the architecture against the PRD and UX design: 1. All functional requirements have architectural support 2. NFRs are addressed by specific patterns or decisions 3. UX requirements are technically feasible 4. No unresolved conflicts or gaps Present validation results and resolve any issues with the user Compile the complete architecture document using the template at `{template}` Generate the document in {document_output_language} Invoke the `write-to-confluence` task with: ``` space_key: "{confluence_space_key}" parent_page_id: "{confluence_parent_page_id}" title: "{project_name} — Architecture Design" content: "{compiled_architecture_content}" key_map_entry: "confluence_pages.architecture" ``` Update `{key_map_file}` with the new Confluence page ID under `confluence_pages.architecture` Link architecture to any existing Epics in Jira: Call `Search Issues` with JQL: `project = {jira_project_key} AND issuetype = Epic ORDER BY rank ASC` For each Epic found, call `Create Remote Issue Link` with: ``` issue_key: "{epic_key}" url: "{architecture_confluence_page_url}" title: "Architecture: {project_name}" relationship: "documented by" ``` Invoke the `post-handoff` task with: ``` handoff_to: "SM" handoff_type: "architecture_complete" summary: "Architecture design created and published to Confluence. Ready for epic and story creation." confluence_page: "{architecture_page_id}" ``` Report to user: **Architecture Design Complete** - **Confluence Page:** {architecture_page_url} - **Status:** Published - **ADRs Documented:** {adr_count} - **Epic Links:** {linked_epic_count} epics linked - **Handoff:** SM agent notified **Next Steps:** 1. Review the architecture document on Confluence 2. SM can create Epics and Stories with [Create Epics and Stories] 3. Run [Check Implementation Readiness] to validate completeness