BMAD-METHOD/bmad-agent/tasks/pattern-recognition-task.md

7.9 KiB

Pattern Recognition Task

Purpose

Automatically identify successful and problematic patterns across BMAD methodology execution to generate intelligent improvement suggestions.

When to Execute

  • After completing 3+ projects or major phases
  • During periodic methodology health checks
  • When performance metrics indicate declining effectiveness
  • Before implementing major methodology changes

Pattern Recognition Framework

1. Success Pattern Detection

High-Performance Indicators:

  • Projects completed ahead of schedule with high quality
  • Minimal iteration cycles needed for deliverable acceptance
  • High user satisfaction ratings (8+ out of 10)
  • Smooth handoffs between personas with minimal friction
  • Clear, implementable outputs that facilitate downstream work

Success Pattern Categories:

  • Workflow Patterns: Sequences of persona engagement that work exceptionally well
  • Communication Patterns: Handoff structures and information formats that reduce confusion
  • Technique Patterns: Specific approaches or methods that consistently produce excellent results
  • Context Patterns: Project characteristics or conditions that enable optimal performance

Pattern Analysis Method:

For each successful outcome:
1. Identify contributing factors and conditions
2. Map persona interactions and decision points
3. Analyze timing, sequencing, and resource allocation
4. Document specific techniques or approaches used
5. Correlate with project characteristics and constraints

2. Problem Pattern Detection

Failure Indicators:

  • Projects requiring significant rework or course correction
  • High iteration counts or extended timelines
  • Low satisfaction ratings or stakeholder complaints
  • Frequent misunderstandings or communication breakdowns
  • Deliverables that don't meet requirements or quality standards

Problem Pattern Categories:

  • Bottleneck Patterns: Recurring delays or efficiency problems
  • Quality Patterns: Systematic issues with deliverable quality or completeness
  • Communication Patterns: Misunderstandings or information gaps between personas
  • Scope Patterns: Requirements creep or misalignment with objectives

Root Cause Analysis:

For each problematic outcome:
1. Trace back to identify originating issues
2. Map cascading effects through the workflow
3. Identify decision points where better choices were available
4. Analyze resource constraints and external factors
5. Correlate with project complexity and team characteristics

3. Pattern Classification System

Confidence Levels:

  • High Confidence (80%+): Pattern observed in 4+ similar contexts with consistent results
  • Medium Confidence (60-79%): Pattern observed in 2-3 contexts with mostly consistent results
  • Low Confidence (40-59%): Pattern suggested by limited data, requires validation
  • Hypothesis (20-39%): Potential pattern identified, needs more data for confirmation

Pattern Types:

  • Universal: Applies across all project types and contexts
  • Contextual: Applies to specific project types, team sizes, or technical domains
  • Conditional: Applies when certain conditions or constraints are present
  • Experimental: New patterns being tested for effectiveness

4. Automatic Suggestion Generation

Improvement Suggestions:

Pattern: [Description]
Confidence Level: [High/Medium/Low/Hypothesis]
Context: [When this pattern applies]
Current State: [How things work now]
Suggested Change: [Specific improvement recommendation]
Expected Benefit: [Quantified improvement projection]
Implementation Effort: [Simple/Moderate/Complex]
Risk Assessment: [Potential negative impacts]

Suggestion Categories:

  • Process Optimization: Workflow improvements and sequence changes
  • Persona Enhancement: Specific capability or instruction improvements
  • Template Updates: Better frameworks or document structures
  • Communication Improvements: Enhanced handoff or feedback mechanisms
  • Quality Controls: Additional validation or review processes

5. Pattern-Based Learning Algorithms

Frequency Analysis:

  • Track how often specific patterns occur
  • Identify trends in pattern effectiveness over time
  • Correlate pattern frequency with overall methodology success

Context Correlation:

  • Map patterns to project characteristics (size, complexity, domain)
  • Identify which patterns work best in specific contexts
  • Build context-aware recommendation engines

Evolutionary Tracking:

  • Monitor how patterns change as methodology evolves
  • Track which improvements successfully address problematic patterns
  • Identify emergent patterns from methodology changes

Predictive Modeling:

  • Use historical patterns to predict likely issues in new projects
  • Suggest preventive measures based on project characteristics
  • Recommend optimal persona sequences and approaches

6. Implementation Priority System

Impact Assessment:

High Impact Patterns:
- Affect multiple personas or workflow stages
- Significantly improve velocity, quality, or satisfaction
- Address recurring, expensive problems

Medium Impact Patterns:
- Improve specific persona effectiveness
- Provide moderate efficiency or quality gains
- Resolve occasional but notable issues

Low Impact Patterns:
- Minor optimizations or refinements
- Address edge cases or rare scenarios
- Provide incremental improvements

Implementation Complexity:

  • Simple: Configuration or instruction changes
  • Moderate: New tasks or template modifications
  • Complex: Fundamental workflow or persona restructuring

Risk-Benefit Analysis:

  • Potential for unintended consequences
  • Effort required for implementation and validation
  • Reversibility if changes prove problematic

7. Continuous Learning Engine

Pattern Database:

  • Maintain comprehensive repository of identified patterns
  • Version control pattern evolution and effectiveness
  • Enable pattern sharing across different project teams

Learning Feedback Loop:

  • Validate pattern-based suggestions against actual outcomes
  • Refine pattern recognition accuracy based on results
  • Continuously improve suggestion generation algorithms

Adaptive Thresholds:

  • Adjust confidence levels based on pattern validation success
  • Modify suggestion criteria based on implementation effectiveness
  • Evolve pattern categories based on emerging methodology needs

Pattern Recognition Execution

1. Data Collection

  • Gather metrics from effectiveness measurement tasks
  • Collect feedback from retrospective analyses
  • Compile user satisfaction and performance data
  • Document specific techniques and approaches used

2. Pattern Analysis

  • Apply statistical analysis to identify correlations
  • Use clustering algorithms to group similar outcomes
  • Perform temporal analysis to identify trends and changes
  • Cross-reference patterns with project characteristics

3. Suggestion Generation

  • Create specific, actionable improvement recommendations
  • Prioritize suggestions based on impact and feasibility
  • Format suggestions for easy review and decision-making
  • Include implementation guidance and success metrics

4. Validation and Refinement

  • Test pattern-based suggestions in controlled environments
  • Monitor implementation results and effectiveness
  • Refine pattern recognition algorithms based on outcomes
  • Update pattern database with new learnings

Integration with BMAD Evolution

This pattern recognition capability transforms the BMAD framework from reactive improvement to predictive optimization:

  • Proactive Problem Prevention: Identify and address issues before they occur
  • Intelligent Recommendations: Suggest improvements based on proven patterns
  • Context-Aware Optimization: Tailor methodology to specific project characteristics
  • Continuous Learning: Automatically evolve based on accumulated experience

The result is a truly intelligent methodology that learns from every project and continuously optimizes itself for maximum effectiveness.