Analyze architectural patterns and create an architecture improvement plan
Analyzes architectural patterns and creates a comprehensive improvement plan for codebases.
/plugin marketplace add dgriffith/bad-daves-robot-army/plugin install dgriffith-bad-daves-robot-army@dgriffith/bad-daves-robot-armyUsing @agent-architect prepare an architectural review report. You must analyze the codebase architecture and create a comprehensive improvement plan WITHOUT making any changes.
The user invoked: /arch-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:
Architecture Assessment
Identify Architectural Issues
Future-Proofing Analysis
Create a markdown file at /reports/architecture-review-{timestamp}.md with:
# Architecture Review Plan
Generated: {timestamp}
Scope: {full_path_or_entire_project}
## Executive Summary
Brief overview of architectural state and key findings
## Current Architecture
### Overview
- Architecture style: (e.g., layered, microservices, monolithic)
- Key components: List
- Design patterns used: List
### Architecture Diagram
[ASCII or description of component relationships]
## Architectural Issues
### Critical Issues
- [ ] Circular dependency: Between X and Y
- [ ] Layer violation: Component A accessing Z directly
### Design Flaws
- [ ] Missing abstraction: For X functionality
- [ ] Tight coupling: Between services A and B
### Pattern Inconsistencies
- [ ] Mixed patterns: In module X
- [ ] Anti-pattern usage: In component Y
## SOLID Principles Assessment
- Single Responsibility: X/5
- Open/Closed: X/5
- Liskov Substitution: X/5
- Interface Segregation: X/5
- Dependency Inversion: X/5
## Improvement Plan
### High Priority (Structural Fixes)
1. Break circular dependency between X and Y
2. Introduce abstraction layer for Z
### Medium Priority (Design Improvements)
1. Refactor module A to follow pattern B
2. Decouple services X and Y
### Low Priority (Consistency)
1. Standardize naming conventions
2. Align pattern usage
## Migration Strategy
### Phase 1: Foundation
- Steps to prepare for changes
### Phase 2: Core Refactoring
- Major architectural changes
### Phase 3: Optimization
- Fine-tuning and consistency
## Impact Analysis
- Development velocity impact
- Testing requirements
- Risk assessment
## Recommendations
- Architectural patterns to adopt
- Tools and frameworks
- Documentation needs
## Estimated Effort
- Total tasks: X
- Critical fixes: Y hours
- Full refactoring: 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.