sf-agent-framework
Version:
AI Agent Orchestration Framework for Salesforce Development - Two-phase architecture with 70% context reduction
107 lines (87 loc) • 2.43 kB
Markdown
# Pattern Recommendation
## Purpose
Recommend appropriate design patterns and best practices for Salesforce
implementations based on requirements and constraints.
## Instructions
1. **Requirements Analysis**
- Review functional requirements
- Analyze non-functional needs
- Identify constraints
- Assess complexity factors
- Document assumptions
2. **Pattern Categories**
- **Structural Patterns**
- Object model design
- Relationship patterns
- Data model patterns
- **Behavioral Patterns**
- Trigger frameworks
- Batch processing
- Async patterns
- **Integration Patterns**
- API patterns
- Event patterns
- ETL patterns
3. **Pattern Evaluation**
- Match patterns to requirements
- Assess implementation complexity
- Review performance implications
- Consider maintenance needs
- Evaluate scalability
4. **Best Practice Selection**
- Identify applicable practices
- Review platform limits
- Consider governor limits
- Assess security implications
- Plan for growth
5. **Architecture Patterns**
- Service layer design
- Domain model patterns
- Repository patterns
- Factory patterns
- Builder patterns
6. **Recommendation Development**
- Document pattern selection
- Provide implementation guidance
- Include code examples
- Define anti-patterns
- Create decision matrix
## Input Requirements
- Business requirements
- Technical constraints
- Performance requirements
- Integration needs
- Security requirements
- Scalability projections
## Output Format
- Pattern Recommendation Document:
- Executive summary
- Pattern catalog
- Selection rationale
- Implementation guide
- Code templates
- Anti-pattern warnings
- Best practices checklist
## Common Patterns
- **Trigger Handler**: Bulkified processing
- **Service Layer**: Business logic separation
- **Selector Layer**: Query optimization
- **Domain Layer**: Object-oriented design
- **Unit of Work**: Transaction management
- **Strategy Pattern**: Algorithm selection
## Selection Criteria
- Requirement fit
- Performance impact
- Maintainability
- Reusability
- Platform alignment
- Team skills
- Time to implement
## Best Practices
- Use established patterns
- Document pattern usage
- Train team members
- Create reusable components
- Monitor pattern effectiveness
- Evolve patterns over time
- Share knowledge