| name | migration-migrate-module |
| description | Use when a complete module needs migration to the target architecture - runs 6 phases with approval gates. |
| user-invocable | true |
| argument-hint | [module-path] |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
Migrate an entire module to the target architecture from docs/ARCHITECTURE.md.
Module/Path: $ARGUMENTS
Steps
Use @migrator to coordinate the full migration in phases:
- Phase 0 -- Analysis: Map the module (files, patterns, dependencies, NgModule vs standalone)
- Phase 1 -- Structure: Create
src/modules/[name]/ and move files
- Phase 2 -- Types: Create
.types.ts + .contracts.ts + adapter
- Phase 3 -- Services: Migrate to pure service (HttpClient only, inject(), no try/catch)
- Phase 4 -- State: BehaviorSubject -> signals, stores with WritableSignal + asReadonly()
- Phase 5 -- Components: NgModule -> standalone, @Input/@Output -> input()/output(), constructor -> inject(), OnPush
- Phase 6 -- Review: Validate conformance
Validate build/tsc/tests after each phase. Ask for approval before each phase.