--- name: migration-planning description: Planning One-UI migrations with superpowers workflow integration. Ensures tool references are included in brainstorming and plan writing. license: MIT compatibility: Requires superpowers plugin and one-ui-migration skill allowed-tools: Read, Bash, Edit, Write, Glob, Grep --- # Migration Planning Skill > **Purpose**: Integrate superpowers workflow with one-ui-migration tool references to ensure compliant migration plans. ## When to Use - Before starting a migration with `superpowers:brainstorming` - When writing migration plans with `superpowers:writing-plans` - When you need to plan a feature migration --- ## Tool Reference Requirements ### Component-to-Tool Mapping | If Legacy has... | You MUST reference... | |------------------|----------------------| | Forms | `rules/tools/form-builder.md` + `rules/tools/one-validators.md` | | Tables | `rules/tools/common-table.md` + `rules/tools/transloco.md` | | Dialogs | `rules/tools/ui/dialogs.md` + `rules/tools/form-builder.md` | | State management | `rules/tools/signal-store.md` + `rules/tools/loading-states.md` | | Status display | `rules/tools/mx-components.md` | | Page layout | `rules/tools/ui/page-layout.md` + `rules/tools/transloco.md` | | Authentication | `rules/tools/auth.md` | | Translation | `rules/tools/transloco.md` | | Route configuration | `rules/tools/routing.md` | --- ## Superpowers Integration ### During `superpowers:brainstorming` Before proposing any design, identify which tools are needed: ```markdown ## Tool Analysis Legacy component uses: - [ ] Forms → Reference `form-builder.md`, `one-validators.md` - [ ] Tables → Reference `common-table.md` - [ ] Dialogs → Reference `ui/dialogs.md` - [ ] State → Reference `signal-store.md`, `loading-states.md` - [ ] MX Components → Reference `mx-components.md` - [ ] Routes → Reference `routing.md` **Required tools for this migration:** 1. `rules/tools/signal-store.md` - Store pattern 2. `rules/tools/form-builder.md` - Form creation 3. ... ``` ### During `superpowers:writing-plans` Every task MUST include a Tool References section: ```markdown ### Task N: Create {component} **Layer**: domain | features | ui | shell **Files**: libs/mxsecurity/{feature}/{layer}/src/lib/... **Tool References**: - [ ] `rules/tools/signal-store.md` - queryMethod/mutationMethod - [ ] `rules/tools/one-validators.md` - OneValidators **Implementation**: [code here] **Verification Checklist** (from tool files): - [ ] No `Validators` import (use `OneValidators`) - [ ] No `BehaviorSubject` (use `signal()`) - [ ] No `FormBuilder` (use `NonNullableFormBuilder`) ``` --- ## Tool Checklists ### signal-store.md Checklist - [ ] Use `queryMethod` for GET requests (not `rxMethod`) - [ ] Use `mutationMethod` for POST/PUT/DELETE - [ ] State interface extends `LoadingState` - [ ] No `BehaviorSubject` or `Subject<>` - [ ] Use `loading()` signal for loading state ### form-builder.md Checklist - [ ] Use `NonNullableFormBuilder` (not `FormBuilder`) - [ ] Initialize with default values - [ ] Use `getRawValue()` to submit ### one-validators.md Checklist - [ ] Import `OneValidators` from `@one-ui/shared/domain` - [ ] No `Validators` from `@angular/forms` - [ ] Use `OneValidators.required`, `OneValidators.range`, etc. ### common-table.md Checklist - [ ] Import `CommonTableComponent`, `SELECT_COLUMN_KEY`, `EDIT_COLUMN_KEY` - [ ] Custom columns (`noAutoGenerate: true`) have `filter` function - [ ] Import `MatSortModule` when using `mat-sort-header` - [ ] Text cells use `gl-ellipsis-text` + `mxAutoTooltip` - [ ] Toolbar order: Refresh -> Create -> Delete ### ui/dialogs.md Checklist - [ ] Pass `viewContainerRef` when opening dialog - [ ] Cancel button uses `mat-dialog-close` (not `(click)="cancel()"`) - [ ] `.close()` only in `next:` callback (not after mutation call) - [ ] Submit button: `[disabled]="form.invalid || loading()"` ### mx-components.md Checklist - [ ] `mxButtonIsLoading` requires `loading()` in `[disabled]` - [ ] Form errors use `oneUiFormError` directive - [ ] `mat-tab-group` has `mxTabGroup` and `animationDuration="0ms"` - [ ] Status display uses `mx-status` component ### ui/page-layout.md Checklist - [ ] Use `gl-page-content` (not `mat-card`) - [ ] Content inside `