Analyze code for modernization opportunities and create an update plan
Analyzes codebases for outdated patterns and creates prioritized modernization plans with migration timelines.
/plugin marketplace add dgriffith/bad-daves-robot-army/plugin install dgriffith-bad-daves-robot-army@dgriffith/bad-daves-robot-armyUsing @agent-code-modernizer prepare a modernization review report. You must analyze the codebase for outdated patterns, deprecated features, and modernization opportunities to create a comprehensive upgrade plan WITHOUT making any changes.
The user invoked: /modernization-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:
Technology Assessment
Modernization Opportunities
Risk and Compatibility Analysis
Create a markdown file at /reports/modernization-review-{timestamp}.md with:
# Modernization Review Plan
Generated: {timestamp}
Scope: {full_path_or_entire_project}
## Executive Summary
Brief overview of modernization needs and potential benefits
## Current Technology Stack
### Languages & Frameworks
- Primary language: {version}
- Framework: {version}
- Build tools: {versions}
- Key dependencies: {versions}
### Legacy Indicators
- [ ] Deprecated APIs: List
- [ ] Outdated patterns: List
- [ ] EOL dependencies: List
- [ ] Legacy syntax: List
## Modernization Opportunities
### Critical Updates (Security/EOL)
- [ ] Update X from v1 to v3 (EOL)
- [ ] Replace deprecated API Y
- [ ] Migrate from legacy library Z
### Feature Enhancements
- [ ] Adopt async/await patterns
- [ ] Use modern language features
- [ ] Implement type safety
- [ ] Update build pipeline
### Performance Improvements
- [ ] Modern bundling strategies
- [ ] Tree shaking opportunities
- [ ] Code splitting potential
- [ ] Lazy loading candidates
## Migration Plan
### Phase 1: Critical Updates (1 week)
1. Update security-critical dependencies
2. Replace EOL components
3. Fix deprecated API usage
### Phase 2: Core Modernization (2-3 weeks)
1. Update language/framework versions
2. Migrate to modern patterns
3. Refactor legacy code
### Phase 3: Enhancement (1-2 weeks)
1. Adopt new language features
2. Optimize build process
3. Improve developer experience
## Risk Assessment
### High Risk Changes
- Breaking API changes in X
- Data migration required for Y
### Medium Risk Changes
- Pattern migrations
- Build system updates
### Low Risk Changes
- Syntax updates
- Development tool updates
## Compatibility Matrix
| Component | Current | Target | Breaking Changes |
|-----------|---------|--------|------------------|
| Framework | v2.x | v5.x | Yes - API changes|
| Library X | v1.x | v3.x | No |
## Testing Strategy
- Unit test updates required
- Integration test modifications
- Performance benchmarking
- Regression test suite
## Benefits Analysis
- Performance gains: Estimated X%
- Security improvements: List
- Developer experience: List
- Maintenance reduction: List
## Recommendations
- Tooling updates
- Training needs
- Documentation updates
- Monitoring additions
## Estimated Effort
- Total modernization: X weeks
- Critical updates: Y days
- Full migration: Z weeks
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.