Analyze legacy scope and generate migration plan. Trigger: migrate legacy scope for {path}
Analyzes legacy Angular code and generates migration-ready specifications with implementation plans.
/plugin marketplace add michael0520/milo-claudekit/plugin install legacy-analyzer@milo-claudekitsonnetAnalyze Angular legacy codebase and produce a migration-ready specification with implementation plan.
migrate legacy scope for {path}
A single document with:
# Routes
rg -n 'path:|loadChildren|Routes' --type ts {path}
# Components
rg -l '@Component' --type ts {path}
# Modules
rg -l '@NgModule' --type ts {path}
rg -n 'this\.http\.(get|post|put|delete|patch)' --type ts {path}
rg -n 'ApiService|HttpClient' --type ts {path}
# Templates
rg -o "'\w+(\.\w+)+'" --type html {path}
rg -n '\| *translate' --type html {path}
# TypeScript
rg -n 'translate|TranslocoService|instant' --type ts {path}
rg -n 'FormGroup|FormControl|FormBuilder|Validators' --type ts {path}
rg -n 'MatDialog|DialogRef|openDialog' --type ts {path}
rg -n 'selector:' --type ts {path}
rg -n 'Store|@ngrx|BehaviorSubject|ReplaySubject' --type ts {path}
# Migration: {scope-name}
## Spec Summary
| Category | Count |
|----------|-------|
| Components | X |
| API Endpoints | X |
| i18n Keys | X |
| Forms | X |
---
## 1. Feature Specs (BDD)
### Feature: {Name}
**Scenario: {description}**
- Given {precondition}
- When {action}
- Then {result}
---
## 2. API Endpoints
| Method | Endpoint | Used In |
|--------|----------|---------|
| GET | /api/xxx | Component |
---
## 3. i18n Keys
| Key | Used In |
|-----|---------|
| SCOPE.KEY | component |
---
## 4. Forms
### {FormName}
| Field | Type | Validators |
|-------|------|------------|
| name | text | required |
---
## 5. Components
| Legacy Component | Type |
|------------------|------|
| XxxComponent | Page |
| YyyDialogComponent | Dialog |
---
## 6. Migration Plan
### New File Structure
libs/{scope}/ ├── domain/ │ ├── models/{scope}.model.ts │ └── ports/{scope}.port.ts ├── data/ │ └── {scope}.repository.ts ├── features/ │ └── {feature}/ │ ├── {feature}.store.ts │ └── {feature}.component.ts └── ui/ └── components/
### Implementation Order
1. **Domain Layer**
- [ ] Create models from API response types
- [ ] Define port interface
2. **Data Layer**
- [ ] Implement repository with endpoints:
- GET /api/xxx
- POST /api/xxx
3. **Feature Layer**
- [ ] Create SignalStore with:
- State: {list state properties}
- Computed: {list computed}
- Methods: {list methods}
- [ ] Implement components:
- [ ] {Component1} - {purpose}
- [ ] {Component2} - {purpose}
4. **UI Layer**
- [ ] Create presentational components
5. **i18n**
- [ ] Map all keys to new translation files
### Parity Checklist
- [ ] All API endpoints implemented
- [ ] All i18n keys mapped
- [ ] All form validators match
- [ ] All BDD scenarios pass
Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>
Expert cloud architect specializing in AWS/Azure/GCP multi-cloud infrastructure design, advanced IaC (Terraform/OpenTofu/CDK), FinOps cost optimization, and modern architectural patterns. Masters serverless, microservices, security, compliance, and disaster recovery. Use PROACTIVELY for cloud architecture, cost optimization, migration planning, or multi-cloud strategies.