This document provides comprehensive information about the GitHub Actions CI/CD pipeline for Claude Flow.
Our CI/CD pipeline consists of four main workflows designed to ensure code quality, reliability, and automated deployment management:
- 🔍 Verification Pipeline - Comprehensive code verification and quality checks
- 🎯 Truth Scoring Pipeline - Automated truth scoring on pull requests
- 🔗 Cross-Agent Integration Tests - Multi-agent system integration testing
- 🔄 Automated Rollback Manager - Intelligent rollback management
File: .github/workflows/verification-pipeline.yml
Comprehensive verification of code changes including security, quality, testing, and build validation.
- Push to
main,develop,alpha-*branches - Pull requests to
main,develop - Manual dispatch
- Generates unique verification ID
- Sets up test matrix for multi-platform testing
- Caches dependencies for faster execution
- Security audit using
npm audit - License compliance checking
- Dependency vulnerability scanning
- Generates security reports
- ESLint analysis with JSON reporting
- TypeScript type checking
- Code formatting verification
- Complexity analysis
- Multi-platform testing (Ubuntu, macOS, Windows)
- Multiple Node.js versions (18, 20)
- Unit, integration, and performance tests
- Coverage reporting
- TypeScript compilation
- Binary building (optional)
- CLI functionality testing
- Package creation
- Documentation file presence check
- Link validation in markdown files
- Package.json validation
- Performance benchmarking
- Memory leak detection
- Resource usage monitoring
- Aggregate all verification results
- Generate comprehensive reports
- Update status badges
- Post PR comments with results
- Security reports (30 days retention)
- Quality reports (30 days retention)
- Test results (30 days retention)
- Build artifacts (30 days retention)
- Performance reports (30 days retention)
- Verification summary (90 days retention)
File: .github/workflows/truth-scoring.yml
Automated scoring system to evaluate the "truthfulness" and quality of code changes using multiple metrics.
- ESLint errors and warnings analysis
- TypeScript compilation errors
- Static analysis results
- Penalty System:
- Errors: -2 points each (max -20)
- Warnings: -0.5 points each
- TypeScript errors: -3 points each (max -15)
- Line coverage (40% of score)
- Branch coverage (30% of score)
- Function coverage (20% of score)
- Statement coverage (10% of score)
- Baseline vs current performance comparison
- Regression Penalties:
- Performance degradation: -2x degradation percentage (max -50)
- Improvement Bonuses:
- Performance improvements: +improvement percentage (max +10)
- Base score: 70 points
- Bonuses:
- README.md exists: +10
- CHANGELOG.md exists: +10
- LICENSE exists: +5
- Documentation files updated: +2 per file (max +10)
- Pass Threshold: 85/100
- Failure Action: Fail the pipeline if below threshold
- PR Comments: Automatic scoring results posted to PRs
Final Score = (Code Accuracy × 0.35) + (Test Coverage × 0.25) + (Performance × 0.25) + (Documentation × 0.15)
File: .github/workflows/integration-tests.yml
Comprehensive testing of multi-agent system integration, coordination, and performance under various conditions.
- Agent Types Tested: coder, tester, reviewer, planner, researcher, backend-dev, performance-benchmarker
- Test Matrix: Configurable agent counts based on scope
- Metrics:
- Inter-agent communication latency
- Message success rates
- Task distribution efficiency
- Load balancing effectiveness
- Shared memory operations (store, retrieve, update, delete, search)
- Cross-agent memory synchronization
- Conflict resolution testing
- Data consistency verification
- Failure Scenarios:
- Agent crashes
- Network timeouts
- Memory overflow
- Task timeouts
- Communication failures
- Recovery Metrics:
- Detection time
- Recovery time
- Success rate (target: 90%+)
- Multi-agent performance under load
- Scalability limits testing (1-15 agents)
- Throughput and latency measurements
- Resource utilization monitoring
- Smoke: Basic functionality (2 coder, 1 tester)
- Core: Standard testing (7 agents total)
- Full: Comprehensive testing (14+ agents)
- Stress: Maximum load testing (15+ agents)
- All coordination tests pass
- Memory synchronization works correctly
- 90%+ fault recovery success rate
- Performance within acceptable limits
- System remains stable under load
File: .github/workflows/rollback-manager.yml
Intelligent automated rollback system that detects failures and can automatically revert to a known good state.
- Verification Pipeline failure
- Truth Scoring Pipeline failure
- Integration Tests failure
- Push to main branch (monitoring)
- Workflow dispatch with parameters:
- Rollback target (commit SHA/tag)
- Rollback reason
- Emergency mode flag
- Rollback scope (application/database/infrastructure/full)
- Analyzes workflow run conclusions
- Determines failure severity:
- High: Verification Pipeline, Integration Tests
- Medium: Truth Scoring, other workflows
- Low: Minor issues
- Identifies safe rollback target
- Validates rollback target commit exists
- Ensures target is ancestor of current HEAD
- Creates backup of current state
- Tests rollback target viability
- Creates rollback commit with metadata
- Emergency Mode: Force push with lease
- Normal Mode: Standard push
- Creates rollback tag for tracking
- Build functionality verification
- Smoke tests execution
- CLI functionality testing
- System health checks
- System stability monitoring (15 minutes default)
- Performance monitoring
- Error rate tracking
- Automated reporting
- High Severity: Automatic execution
- Emergency Mode: Automatic execution
- Medium/Low Severity: Manual approval required
- Failure detection reports (90 days)
- Pre-rollback validation (90 days)
- Rollback execution logs (90 days)
- Post-rollback monitoring (90 days)
- Stakeholder notifications (GitHub issues)
File: .github/workflows/status-badges.yml
Dynamic status badges that update based on workflow results:
[](https://github.com/ruvnet/claude-code-flow/actions/workflows/verification-pipeline.yml)
[](https://github.com/ruvnet/claude-code-flow/actions/workflows/truth-scoring.yml)
[](https://github.com/ruvnet/claude-code-flow/actions/workflows/integration-tests.yml)
[](https://github.com/ruvnet/claude-code-flow/actions/workflows/rollback-manager.yml)Security audit configuration for automated vulnerability scanning.
- Rollback Incident Report: Structured template for incident documentation
All workflows generate artifacts that can be shared between jobs:
- Test results and coverage reports
- Security and quality analysis
- Performance benchmarks
- Rollback execution logs
Key environment variables used across workflows:
NODE_VERSION: '20'TRUTH_SCORE_THRESHOLD: 85REGRESSION_THRESHOLD: 10MAX_PARALLEL_AGENTS: 8ROLLBACK_RETENTION_DAYS: 90
GITHUB_TOKEN: Automatic token for repository access- Additional secrets may be required for external integrations
- Build times and success rates
- Test execution duration and coverage
- Truth score trends over time
- Integration test performance
- Rollback frequency and success rate
- Real-time: During workflow execution
- Post-deployment: 15-minute stability window
- Long-term: Daily/weekly trend analysis
- Update Node.js versions in workflows
- Review and update truth scoring thresholds
- Adjust integration test agent matrices
- Clean up old artifacts and logs
- Review rollback targets and procedures
When updating workflows:
- Test changes in feature branches
- Use workflow dispatch for validation
- Monitor metrics after deployment
- Update documentation accordingly
- Check security audit results
- Review ESLint and TypeScript errors
- Validate test failures
- Examine build logs
- Improve code quality (reduce ESLint errors)
- Increase test coverage
- Optimize performance
- Update documentation
- Check agent coordination logs
- Review memory synchronization issues
- Analyze fault tolerance test results
- Monitor system performance
- Validate rollback target exists
- Check backup integrity
- Review approval requirements
- Monitor post-rollback stability
- Check workflow logs in GitHub Actions
- Review artifact reports
- Consult this documentation
- Create issue with rollback incident template
This documentation is automatically updated by the CI/CD pipeline. Last updated: $(date -u +%Y-%m-%d)