UNPKG

sf-agent-framework

Version:

AI Agent Orchestration Framework for Salesforce Development - Two-phase architecture with 70% context reduction

193 lines (132 loc) 4.14 kB
# Execute Checklist Task This task provides a sophisticated checklist validation system with multi-level quality assurance, star ratings, and actionable feedback. ## Purpose Enable agents to execute quality checklists that: - Validate work against defined criteria - Provide star ratings for nuanced assessment - Offer ready/not-ready determinations - Generate improvement recommendations - Track quality trends over time ## Checklist Levels ### 1. Basic Validation (Level 1) - Essential completeness checks - Binary pass/fail criteria - Minimum viable quality ### 2. Comprehensive Review (Level 2) - Detailed quality assessment - Star ratings (1-5) for each criterion - Specific improvement suggestions ### 3. Expert Assessment (Level 3) - Advanced domain-specific evaluation - Best practice validation - Excellence criteria - Innovation opportunities ## Execution Process ### Step 1: Checklist Selection ``` 1. Identify appropriate checklist for context 2. Load from checklists/ directory 3. Determine validation level needed 4. Parse checklist structure ``` ### Step 2: Item Evaluation For each checklist item: ``` 1. Present criterion clearly 2. Evaluate against current work 3. Assign rating or pass/fail 4. Document specific observations 5. Note improvement opportunities ``` ### Step 3: Rating Systems **Binary Assessment**: - ✅ Pass - Criterion fully met - ❌ Fail - Criterion not met - ⚠️ Partial - Needs attention **Star Rating Assessment**: - ⭐ (1/5) - Significant issues, immediate action needed - ⭐⭐ (2/5) - Below standard, improvements required - ⭐⭐⭐ (3/5) - Meets minimum requirements - ⭐⭐⭐⭐ (4/5) - Good quality, minor improvements possible - ⭐⭐⭐⭐⭐ (5/5) - Excellent, best practice example ### Step 4: Overall Assessment **Ready/Not Ready Determination**: ``` READY FOR NEXT PHASE when: - All critical items pass - Average star rating ≥ 3.5 - No blocking issues identified NOT READY when: - Any critical item fails - Average star rating < 3.5 - Blocking issues present ``` ### Step 5: Generate Feedback **Improvement Recommendations**: 1. **Critical** - Must fix before proceeding 2. **Important** - Should address soon 3. **Suggested** - Would enhance quality 4. **Optional** - Nice to have improvements **Feedback Format**: ```markdown ## Checklist Results: [Checklist Name] ### Overall Rating: [X.X/5.0 stars] - [READY/NOT READY] ### Strengths: - [What was done well] ### Areas for Improvement: - **Critical**: [Must fix items] - **Important**: [Should fix items] - **Suggested**: [Enhancement opportunities] ### Next Steps: 1. [Specific action items in priority order] ``` ## Integration with Agents ### Pre-Execution - Agent completes work to be validated - Identifies appropriate checklist - Prepares context for evaluation ### During Execution - Agent can provide self-assessment - Interactive validation with user - Real-time feedback incorporation ### Post-Execution - Results integrated into workflow - Blocking issues prevent progression - Quality trends tracked over time ## Advanced Features ### Conditional Criteria ``` IF project_type == "enterprise" THEN Additional security criteria apply END IF ``` ### Weighted Scoring ``` Security Items: Weight = 2.0 Performance Items: Weight = 1.5 Documentation: Weight = 1.0 ``` ### Progressive Validation - Start with Level 1 for drafts - Level 2 for review ready - Level 3 for production ready ## Success Metrics - Validation completed thoroughly - Accurate ratings assigned - Actionable feedback provided - Clear next steps identified - Quality improvement over time ## Example Usage ``` Agent: "I've completed the Apex class. Let me run the code review checklist." *Executes code-review-checklist.md* Results: - Security: ⭐⭐⭐⭐⭐ (5/5) - Excellent CRUD/FLS checks - Testing: ⭐⭐⭐ (3/5) - Needs edge case coverage - Performance: ⭐⭐⭐⭐ (4/5) - Good, consider bulkification - Documentation: ⭐⭐ (2/5) - Missing method comments Overall: 3.5/5 - NOT READY Critical: Add test coverage for null inputs Important: Document all public methods ```