sf-agent-framework
Version:
AI Agent Orchestration Framework for Salesforce Development - Two-phase architecture with 70% context reduction
89 lines (71 loc) • 2.42 kB
Markdown
# Code Review
## Purpose
Conduct thorough code reviews of Salesforce implementations to ensure quality,
maintainability, security, and adherence to best practices.
## Instructions
1. **Code Quality Assessment**
- Review code structure and organization
- Check naming conventions compliance
- Assess code readability and documentation
- Evaluate error handling implementation
2. **Apex Code Review**
- Verify bulkification of all operations
- Check governor limit considerations
- Review SOQL/SOSL query optimization
- Assess trigger framework usage
- Validate security enforcement (CRUD/FLS)
3. **Lightning Component Review**
- Evaluate LWC vs Aura usage decisions
- Check component composition and reusability
- Review JavaScript best practices
- Assess performance optimizations
- Verify accessibility compliance
4. **Security Review**
- Check for SOQL injection vulnerabilities
- Verify sharing and security enforcement
- Review authentication and authorization
- Assess data exposure risks
- Validate input sanitization
5. **Test Coverage Analysis**
- Verify minimum 75% code coverage
- Review test quality and assertions
- Check bulk testing scenarios
- Assess negative test cases
- Validate test data creation patterns
6. **Performance Considerations**
- Review query selectivity
- Check for inefficient loops
- Assess batch job design
- Verify asynchronous processing usage
- Evaluate caching strategies
## Input Requirements
- Source code repositories
- Code coverage reports
- Static code analysis results
- Architecture design documents
- Coding standards documentation
## Output Format
- Code Review Report containing:
- Executive summary
- Detailed findings by category
- Security vulnerabilities
- Performance concerns
- Best practice violations
- Recommendations with severity
- Code quality metrics
## Review Checklist
- [ ] Bulkification implemented
- [ ] Governor limits considered
- [ ] Error handling comprehensive
- [ ] Security enforced properly
- [ ] Code well-documented
- [ ] Test coverage adequate
- [ ] No hardcoded values
- [ ] Proper separation of concerns
## Best Practices
- Use automated scanning tools (PMD, ESLint)
- Focus on high-risk areas first
- Provide constructive feedback
- Document patterns for reuse
- Track and measure improvements
- Share knowledge across team