Analyze build systems and CI/CD pipelines to identify optimization opportunities
Analyzes build systems and CI/CD pipelines to identify optimization opportunities and performance bottlenecks.
/plugin marketplace add dgriffith/bad-daves-robot-army/plugin install dgriffith-bad-daves-robot-army@dgriffith/bad-daves-robot-armyUsing @agent-build-master prepare a comprehensive build and CI/CD review report. You must analyze build performance, dependency management, pipeline efficiency, and deployment processes WITHOUT making any changes.
The user invoked: /build-review {optional_scope}
Valid scopes:
git status and git diff)git log and git diff)gh pr view and gh pr diff)If scope is "current changes":
git status to identify changed filesgit diff to see uncommitted changesIf scope is "recent changes":
git log --oneline -10 to see recent commitsgit diff HEAD~5..HEAD or appropriate rangeIf scope starts with "PR":
gh pr view {number} to get PR detailsgh pr diff {number} to get the changesIf scope is a path:
If no scope provided:
Build System Assessment
CI/CD Pipeline Review
Performance Analysis
Best Practices Review
Create a markdown file at /reports/build-review-{timestamp}.md with:
# Build System Review Plan
Generated: {timestamp}
Scope: {full_path_or_entire_project}
## Executive Summary
Brief overview of build system health, performance metrics, and critical optimization opportunities
## Build System Findings
### Critical Issues
- [ ] Performance blocker: Description and impact
- [ ] Pipeline failure risk: Description and location
### High Priority Optimizations
- [ ] Build time improvement: Details and potential savings
- [ ] Dependency issue: Details and resolution
### Medium Priority Issues
- [ ] Caching optimization: Details
- [ ] Configuration improvement: Details
### Low Priority Enhancements
- [ ] Minor optimization: Details
## Current State Analysis
### Build Tools and Configuration
- Primary build tool: {tool_name}
- Build time: {current_time}
- Bundle size: {current_size}
- Cache hit ratio: {percentage}
### CI/CD Pipeline Status
- Pipeline execution time: {duration}
- Success rate: {percentage}
- Parallel job utilization: {assessment}
- Deployment frequency: {frequency}
### Dependencies
- Total dependencies: {count}
- Outdated packages: {count}
- Security vulnerabilities: {count}
- Bundle impact analysis: {findings}
## Build Performance Metrics
- Cold build time: {duration}
- Incremental build time: {duration}
- Test execution time: {duration}
- Pipeline total time: {duration}
- Cache effectiveness: {percentage}
## Improvement Plan
### Immediate Actions (Critical)
1. Fix pipeline stability issue X
2. Implement build caching for Y
### Short-term (1-2 weeks)
1. Optimize bundle splitting
2. Parallel test execution
3. Update build tool configuration
### Long-term Improvements (1+ months)
1. Migrate to faster build tool
2. Implement advanced caching strategies
3. Set up build monitoring and alerts
## CI/CD Pipeline Optimization
### Current Pipeline Analysis
- Stages: {list_of_stages}
- Bottlenecks: {identified_issues}
- Parallelization opportunities: {details}
### Recommended Improvements
- Pipeline restructuring: {recommendations}
- Job optimization: {specific_changes}
- Environment management: {improvements}
## Dependency Management
### Current State
- Package manager: {npm/yarn/pnpm/etc}
- Lock file status: {analysis}
- Update strategy: {current_approach}
### Recommendations
- Dependency updates: {strategy}
- Bundle optimization: {techniques}
- Security patches: {priority_list}
## Build Artifact Analysis
### Current Artifacts
- Bundle sizes: {breakdown}
- Compression: {current_state}
- Caching headers: {analysis}
### Optimization Opportunities
- Size reduction: {potential_savings}
- Format improvements: {recommendations}
- Distribution optimization: {suggestions}
## Recommendations
### Tool and Technology Updates
- Build tool migration: {if_applicable}
- CI/CD platform optimization: {suggestions}
- Monitoring tools: {recommendations}
### Process Improvements
- Build workflow optimization: {changes}
- Developer experience: {enhancements}
- Documentation updates: {needs}
### Performance Targets
- Build time target: {goal}
- Bundle size target: {goal}
- Pipeline execution target: {goal}
- Success rate target: {goal}
## Risk Assessment
- Current build reliability: Critical/High/Medium/Low
- Deployment risk level: {assessment}
- Post-optimization targets: {goals}
YOU MUST CREATE THE REPORT FILE. This is not optional.
Create the report file using the Write tool at the specified path:
/reports/{command-name}-{scope}-{timestamp}.mdYYYY-MM-DD-HHmmss/reports/architecture-review-entire-project-2025-10-14-143022.mdFill in ALL sections of the report template
Confirm completion by telling the user:
❌ DON'T: Just summarize findings in the chat ❌ DON'T: Say "I'll create a report" without actually doing it ❌ DON'T: Leave sections incomplete or with placeholders ❌ DON'T: Forget to use the Write tool
✅ DO: Always use the Write tool to create the markdown file ✅ DO: Fill in every section with real findings ✅ DO: Provide the full path to the user when done ✅ DO: Include actionable recommendations
Before responding to the user, verify:
Remember: The report is the primary deliverable. The chat summary is secondary.