fm-analyzeUse to analyze a legacy OhMyHotel Angular target (page / component / service / store) before migrating it — produces analysis.json with the dependency graph, shared-package candidates, 3-app diff, and required gates.
fm-audit-codexUse to run an independent Codex audit of a migrated page's artifacts — analyze/plan/gen/verify/e2e/parity/route — as a second opinion alongside Claude's own gates. Advisory: records codex-audit.json and never blocks (except the soft acknowledgement at fm-route --flag-on).
fm-cascadeUse after fm-verify and before fm-e2e to diff legacy's global stylesheet against the migrated app's, node by node, on the page's real markup — catching rule-level divergences (reset collisions, dropped global rules) that element-indexed style specs and jsdom DOM tests structurally cannot see. Needs
fm-clean-codeUse to audit generated React migration code for quality (composition, naming, types, accessibility, performance, convention compliance, simplicity/over-engineering) — a standalone review, independent of the pipeline, runnable on any path.
fm-deltaUse when the legacy Angular source for an already-migrated page changes (the staleness hook flags drift) — re-migrate only the changed surface via a delta plan, preserving accumulated fixes, then re-enter the gates.
fm-e2eUse after fm-verify to run the Playwright E2E gatekeeper on a migrated page — realizes the planned scenarios, dual-runs against the legacy app for behavior parity, and runs transactional flows against staging gateways.
fm-extractUse during Phase 0 to lift pure logic out of the legacy Angular apps into framework-agnostic packages/shared-* modules with tests, reconciling PC/Mobile/Hana divergence and enforcing the shared-domain secret boundary.
fm-fixUse when a migration gate fails (fm-verify, fm-e2e, or fm-parity) — auto-detects the fix mode from the latest failure report, applies targeted repairs via the migration-fixer agent, and re-runs the gate. Also use with --mode review to fix PR review findings or QA defects on a gated, flip-prepared or
fm-genUse after fm-plan to generate the RR v7 page from migration-plan.json via a strict per-phase TDD pipeline (foundation -> api -> store -> component -> page -> integration), with resume and demotion safety.
fm-initUse when setting up Frontend Migration Plugin for a project — detects the legacy Angular apps and monorepo layout, writes the plugin config, and initializes the migration tracker.
fm-parityUse after fm-e2e to run the non-behavioral parity gates on a migrated page — visual regression vs legacy baseline, API contract freeze, WebView bridge round-trip, and telemetry dual-fire parity — the last gate before a route flip.
fm-planUse after fm-style-spec to turn a page's analysis.json + style-spec.json into a migration-plan.json — the React component tree (with style targets), shared-package deps, rendering mode, required gates, 2-PR flag plan, and E2E scenario list.
fm-progressUse any time to see migration progress — a read-only dashboard from tracker.json: per-app/per-page status, gate state (verify/e2e/parity), shared-package extraction, and the suggested next step per in-flight page.
fm-routeUse to manage the Strangler Fig route flip for a migrated page at the app's configured edge layer (nginx, CloudFront, or a project flip script spanning several artifacts) — --flag-off prepares the routing artifact + flag (default OFF) for the code PR, --flag-on flips the path to the new app once ver
fm-secret-auditUse as Phase 0 security pre-work — inventory the secrets read from the legacy environment.*.ts files, classify each by client-bundle vs server-only exposure, flag cross-environment reuse, and emit relocation guidance; re-run once pages ship to track secrets carried into the v2 apps. Read-only postur
fm-style-specUse after fm-analyze and before fm-plan to extract a page's legacy style answer key into style-spec.json — the live legacy render's per-element computed styles (Playwright probe), asset inventory, and markup structure — so fm-gen builds to real values instead of eyeballing them.
fm-test-reviewUse to audit generated migration tests (Vitest + Playwright) for test quality — assertions, Testing Library usage, async handling, coverage, timing/flakiness, anti-patterns — a standalone review, independent of the pipeline.
fm-verifyUse after fm-gen to run the technical gate on a migrated page — build, TypeScript (composite-aware), Vitest, and ESLint (hard); Prettier --check is advisory — from the app's appDir, and advance the page to verified.