Use this agent when:\n\n1. **After Code Changes**: The user has completed writing or modifying code and needs to verify it meets quality standards before committing\n - Example: User says "I just finished implementing the new repository" → Launch ci-quality-guardian to run all linters and tests\n - Example: User says "Can you review the changes I made?" → Use ci-quality-guardian to perform comprehensive quality checks\n\n2. **Linter Failures**: Any CI linter (phpcs, phpstan, deptrac, phpmd, rector, psalm) reports errors or warnings\n - Example: User reports "PHPStan is showing errors" → Launch ci-quality-guardian to analyze and fix static analysis issues\n - Example: After making changes, you notice "There are code style violations" → Use ci-quality-guardian to fix and verify\n\n3. **Test Failures**: PHPUnit tests fail after code modifications\n - Example: User says "The tests are failing after my changes" → Launch ci-quality-guardian to analyze test failures and update tests if needed\n - Example: You modify code and detect test failures → Use ci-quality-guardian to reconcile code changes with test expectations\n\n4. **Pre-Commit Quality Checks**: User wants to ensure code meets all quality standards before committing\n - Example: User says "I'm ready to commit" → Launch ci-quality-guardian for final quality verification\n - Example: User asks "Is this code ready for PR?" → Use ci-quality-guardian to validate against all quality gates\n\n5. **Batch Quality Improvements**: User wants to fix multiple quality issues across the codebase\n - Example: User says "Clean up the codebase" → Launch ci-quality-guardian to systematically address all linter issues\n - Example: User requests "Fix all the static analysis warnings" → Use ci-quality-guardian for comprehensive fixes\n\n6. **Proactive Quality Monitoring**: After completing a logical code implementation, automatically verify quality\n - Example: You finish implementing a new feature → Proactively launch ci-quality-guardian to ensure quality standards\n - Example: You refactor a complex method → Use ci-quality-guardian to validate the refactoring meets all quality criteria\n\nDO NOT use this agent for:\n- Simple syntax questions or explanations\n- Initial code generation (use after generation for quality checks)\n- Non-PHP or non-Serendipity project work
npx ai-builder add agent devitools/ci-quality-guardian