BMAD-METHOD/bmad-agent/quality-tasks/architecture-udtm-analysis.md

158 lines
6.3 KiB
Markdown

# Architecture UDTM Analysis Task
## Purpose
Execute architecture-specific Ultra-Deep Thinking Mode analysis to ensure robust, scalable, and maintainable technical architectures. This specialized UDTM focuses on architectural decisions, system design patterns, and technical excellence.
## Integration with Memory System
- **What patterns to search for**: Successful architecture patterns for similar systems, technology choice outcomes, scalability solutions, architectural anti-patterns
- **What outcomes to track**: Architecture stability over time, scalability achievement, maintenance burden, technology choice satisfaction
- **What learnings to capture**: Effective architectural patterns, technology selection criteria, integration strategies, performance optimization approaches
## UDTM Protocol Adaptation for Architecture
**120-minute protocol for comprehensive architectural analysis**
### Phase 1: Multi-Perspective Architecture Analysis (45 min)
- [ ] **System Architecture**: Overall system structure and component relationships
- [ ] **Data Architecture**: Data flow, storage, and processing patterns
- [ ] **Integration Architecture**: API design, service communication, external integrations
- [ ] **Security Architecture**: Threat model, security controls, data protection
- [ ] **Performance Architecture**: Scalability patterns, caching strategies, optimization
- [ ] **Deployment Architecture**: Infrastructure, CI/CD, monitoring, operations
### Phase 2: Architectural Assumption Challenge (20 min)
1. **Technology assumptions**: Framework choices, database selections, service architectures
2. **Scalability assumptions**: Load projections, growth patterns, bottleneck predictions
3. **Integration assumptions**: Third-party reliability, API stability, data consistency
4. **Performance assumptions**: Response time targets, throughput requirements
5. **Security assumptions**: Threat model accuracy, attack vector coverage
### Phase 3: Triple Verification (30 min)
- [ ] **Industry Standards**: Architecture patterns, best practices, reference architectures
- [ ] **Technical Validation**: Proof-of-concept results, benchmark data, load testing
- [ ] **Existing System Analysis**: Current architecture constraints, migration paths
- [ ] **Cross-Reference**: Pattern consistency, technology compatibility
- [ ] **Expert Validation**: Architecture review feedback, consultation outcomes
### Phase 4: Architecture Weakness Hunting (25 min)
- [ ] Single points of failure identification
- [ ] Scalability bottleneck analysis
- [ ] Security vulnerability assessment
- [ ] Technology obsolescence risk
- [ ] Integration brittleness evaluation
- [ ] Operational complexity concerns
## Quality Gates for Architecture
### Pre-Architecture Gate
- [ ] Requirements fully analyzed and understood
- [ ] Constraints and non-functional requirements documented
- [ ] Technology landscape researched
- [ ] Proof-of-concepts for critical components completed
### Architecture Design Gate
- [ ] All architectural views documented (logical, physical, deployment)
- [ ] Technology choices justified with trade-off analysis
- [ ] Scalability strategy defined and validated
- [ ] Security architecture reviewed and approved
- [ ] Integration patterns tested and verified
### Architecture Validation Gate
- [ ] Performance models validated against requirements
- [ ] Security threat model comprehensively addressed
- [ ] Operational procedures defined and tested
- [ ] Disaster recovery strategy validated
- [ ] Architecture evolution path defined
## Success Criteria
- Architectural decisions backed by quantitative analysis
- All quality attributes addressed with specific solutions
- Technology choices validated through proof-of-concepts
- Scalability validated through load modeling
- Security validated through threat analysis
- Overall architectural confidence >95%
## Memory Integration
```python
# Architecture-specific memory queries
arch_memory_queries = [
f"architecture patterns {system_type} {scale} successful",
f"technology stack {tech_choices} production outcomes",
f"scalability solutions {expected_load} {growth_pattern}",
f"integration patterns {service_count} {communication_style}",
f"architecture failures {similar_context} lessons learned"
]
# Architecture decision memory
architecture_memory = {
"type": "architecture_decision",
"system_context": {
"type": system_type,
"scale": expected_scale,
"constraints": key_constraints
},
"decisions": {
"pattern": chosen_pattern,
"technologies": tech_stack,
"rationale": decision_rationale
},
"validation": {
"poc_results": proof_of_concept_outcomes,
"performance_modeling": model_results,
"security_assessment": threat_model_validation
},
"risks": identified_risks,
"confidence": confidence_score,
"evolution_path": future_architecture_direction
}
```
## Architecture Analysis Output Template
```markdown
# Architecture UDTM Analysis: {System Name}
**Date**: {timestamp}
**Architect**: {name}
**System Type**: {type}
**Confidence**: {percentage}%
## Architectural Views Analysis
### System Architecture
- **Pattern**: {pattern_name}
- **Rationale**: {detailed_reasoning}
- **Trade-offs**: {pros_and_cons}
### Data Architecture
- **Storage Strategy**: {approach}
- **Data Flow**: {patterns}
- **Consistency Model**: {model}
### Security Architecture
- **Threat Model**: {summary}
- **Controls**: {security_measures}
- **Risk Assessment**: {residual_risks}
## Technology Stack Validation
| Component | Technology | Rationale | Risk | Confidence |
|-----------|------------|-----------|------|------------|
| {component} | {tech} | {reason} | {risk} | {conf}% |
## Scalability Analysis
- **Current Capacity**: {baseline}
- **Growth Projection**: {expected_growth}
- **Scaling Strategy**: {approach}
- **Bottleneck Analysis**: {identified_bottlenecks}
## Architecture Risks & Mitigations
1. **{Risk}**: {description}
- Impact: {high/medium/low}
- Mitigation: {strategy}
## Recommendations
{Detailed architectural recommendations with confidence levels}
```
## Brotherhood Collaboration Protocol
- Architecture review with development team for feasibility
- Security review with security team for threat validation
- Operations review for deployment and monitoring
- Performance review with testing team for load validation