[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CR82CNJPRCQ15DKX07F4SH":3,"skill-same:01M6CR82CNJPRCQ15DKX07F4SH":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":52,"install":53,"resources":65},"01M6CR82CNJPRCQ15DKX07F4SH","fm-delta",null,"Use 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.","ohmyhotelco\u002Fhare-cc-plugins","ohmyhotelco","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F258133233?v=4","01M6CR4HP2N9F9ZWNX1KRHQ2W1","01M6CR4HSJC5J80RVQMD5K9QRN",2,"MIT","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Ffrontend-migration-plugin\u002Fskills\u002Ffm-delta\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"fm delta","delta","via","changes","gates","-app","true","re","for","fixes","app","plan","migrate","drift","Bash","angular","Legacy","use","only","page","2026-11-10 10:12:30",false,"---\nname: fm-delta\ndescription: \"Use 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.\"\nargument-hint: \"\u003Cpage> [--app pc|mobile|hana]\"\nuser-invocable: true\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent\n---\n\n# Incremental Re-migration\n\nRe-migrates only what changed when the legacy source drifts, instead of regenerating the whole\npage — preserving the fixes accumulated through earlier gate loops. All user-facing output in\n`workingLanguage`.\n\n## Instructions\n\n### Step 0: Config & state\nRead config (absent → run `fm-init`; stop). Resolve `app`, `targetDir`, `appDir`, `packagesDir`,\n`legacyDir`, `workingLanguage`, and the app's `legacyPort` \u002F `port` \u002F `domain` — Step 4 hands all\nthree to `style-spec-extractor` for provenance side-resolution, and an unresolved one makes every\ncapture `unresolved`. The page should already be at `generated` or beyond (else this is\na first migration → use `fm-analyze`\u002F`fm-style-spec`\u002F`fm-plan`\u002F`fm-gen`).\n\n**Confirm `apps[app]` before using it** (${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Configuration): the app entry must exist and carry the keys this stage reads. Config-file presence is not app presence — `mobile`\u002F`hana` are scaffolded, and a `--app` naming an unconfigured one must stop here with a clear message rather than fail deep inside an agent on an unresolved path.\n\n**Refuse `fixing` and `escalated` too.** A fix is in progress or awaiting manual intervention;\nStep 5 resets the page to `generated`, which discards the accumulated repairs and the\n`previousStatus` the fix loop needs. Send the user to `fm-fix` (after the manual step, for\n`escalated`) and let the gate re-run first.\n\n**Refuse a `flipped` page, a `done` page, or one with a flip prepared and handed over.** `done` is past\n`flipped` — the legacy page has been deleted, so there is no legacy source left to diff a delta\nagainst and no rollback target; refuse and require manual intervention — **not** `--revert`, which\nrefuses a `done` page too. A present `flipPrOpenedAt` means the flip artifact is prepared and PR2\nhanded over against the current code: refuse and point at `fm-route --revert` first.\nIf the status is `flipped`, stop and tell the user to run\n`\u002Ffrontend-migration-plugin:fm-route {page} --revert` first — **`--revert`, not `--flag-off`**:\nflag-off keeps the current status (`fm-route` Step 4), so it would leave the page at `flipped` and\nthis refusal would repeat with no exit. `--revert` is the rollback that returns it to\n`parity-passed`. Step 5 resets the status to\n`generated` while the edge flag stays ON — nothing here touches routing — so the tracker would say\n\"not flipped\" while the production domain serves v2. Provenance resolves a capture's `side` from\nexactly that status (`${CLAUDE_PLUGIN_ROOT}\u002Ftemplates\u002Fcapture-provenance.md`), so the next capture from the production\nhost would be labelled `legacy` and accepted as the legacy baseline. Beyond the provenance damage,\napplying a delta to a page under live traffic is a change in production; taking it out of rotation\nfirst is the correct order.\n\n**Stale staging is cleared in Step 2, under the lock — not here.** Deleting it before the lock\nwould let a second session destroy the staged baseline of a delta that is *currently running*: that\nrun then reaches Step 5, finds its files gone, and aborts having already rewritten the code, leaving\na page whose tracker still says `parity-passed` over code the delta changed. Step 5's\nintegrity check is that they *exist*, so an abandoned pair from a previous run would sail through it\nand promote a baseline describing a delta nobody applied — the same reason the Full branch deletes\nthem, which is the only abort path that was covered.\n\n### Step 1: Lock\nAcquire `docs\u002Fmigration\u002F{app}\u002F{page}\u002F.lock` (stale only when its holder is gone — see ${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Lock file; JSON schema — `holder`\u002F`pid`\u002FISO-8601 `acquiredAt` — in ${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Lock file). If it is held and fresh, report who holds it and stop — do not delete anything, and do not wait.\n\n### Step 2: Clear stale staging, then compute the delta (planner incremental mode)\n**Under the lock**, first **clear the page's gate authorization** — `gateEvidence`, the legacy\n`verifiedAt`\u002F`e2ePassedAt`\u002F`parityPassedAt`, `routePrepared`\u002F`flagKey` (take `.tracker.lock`), plus\nthe `cascade` record and the page's `cascade-diff*.json` files — `fm-route` reads that file\ndirectly, so a pre-drift cascade report left on disk would still bind the flip. Do it\n*now*, before anything is computed or applied: from this point the page is known to be drifted, and\nan abort at any later step must not leave it route-authorized over code the drift already\ninvalidated. Step 5 re-clears the same set; clearing twice is harmless, clearing late is not.\n\nThen delete any `migration-plan.next.json` \u002F `analysis.next.json` left by an earlier\nrun that aborted between Step 2 and Step 5. Holding the lock is what makes this safe: the only\nstaged files that can exist here are orphans, because any live delta holds this lock. Step 5's\nintegrity check is that the staged pair *exists*, so an abandoned pair would otherwise sail\nthrough it and promote a baseline describing a delta nobody applied.\n\nThen launch the planner:\nLaunch `migration-planner` (`subagent_type: \"frontend-migration-plugin:migration-planner\"`) with only its params: `mode: \"incremental\"`, `app`, `page`,\n`analysisPath`, `planPath` (= `migration-plan.json`, the baseline), `legacyDir`,\n`outPath = docs\u002Fmigration\u002F{app}\u002F{page}\u002Fdelta-plan.json`, `workingLanguage`. It diffs the current\nlegacy source against the `analysis.json` \u002F `migration-plan.json` baseline and writes\n`delta-plan.json` (added\u002Fmodified\u002Fremoved ops + cascade).\n\n### Step 3: Offer incremental vs full\nRead `delta-plan.json.summary`. Present:\n- the change counts (added\u002Fmodified\u002Fremoved);\n- **if the delta touches > 60% of the page's files (denominator = `tracker.json` `sourcePaths[]`, the list `fm-gen` recorded; absent → report the ratio as unavailable rather than guessing)**, recommend full regeneration\n  instead (Step 4's Full branch names the chain);\notherwise default to incremental. Let the user choose.\n\n### Step 4: Apply\n\n**Style-surface prerequisite — incremental branch only.** If `delta-plan.json.styleDrift` is set (the planner\ndetected changed classes \u002F structure \u002F assets), first **replace `analysis.json.styleSurface`\nwholesale** with `delta-plan.json.styleDrift.styleSurface` — the **complete current** surface (every\nelement + structure, not the drifted subset; a merge would leave removed elements behind). Whatever\nre-extracts styles reads `analysis.json.styleSurface`, and the baseline still holds the old surface\nuntil Step 5, so this patch must land before any re-extraction. It must **not** land before the\nStep 3 choice: the Full branch stops without running Step 5, so a `styleSurface` already replaced\nthere leaves the canonical `analysis.json` describing post-drift structure while the tracker still\nsays `parity-passed` over pre-drift code and evidence. Patch it inside the incremental branch,\nafter the user has chosen it.\n\n- **Incremental** →\n  1. **Refresh the answer key in-lock — do NOT nest the `fm-style-spec` skill** (it acquires this\n     same page `.lock`, which this skill holds from Step 1 → deadlock). Because the skill is bypassed,\n     its **Step 2b is bypassed too**: ensure `.claude\u002Fsettings.local.json` (per-machine, untracked —\n     never the shared `.claude\u002Fsettings.json`) `permissions.allow` includes the\n     Playwright command (e.g. `Bash(npx playwright *)`) here, or the sub-agent probe cannot launch and\n     the refresh silently degrades to `source-derived` — defeating the point of refreshing the answer\n     key. When `styleDrift` was set,\n     launch `style-spec-extractor` (`subagent_type: \"frontend-migration-plugin:style-spec-extractor\"`) **directly**, resolving `legacyUrl` the way `fm-style-spec`\n     Step 2 does (config `stagingConfig.baseUrl` \u002F app `domain` + `analysis.target.routePath` \u002F\n     `legacyUrlCandidates`, or `null` → source-cascade fallback), passing the extractor's own params\n     (see `agents\u002Fstyle-spec-extractor.md`): `app`, `page`, `analysisPath` (now holding the patched\n     surface), `outPath` = `docs\u002Fmigration\u002F{app}\u002F{page}\u002Fstyle-spec.json`, `legacyUrl`, `legacyDir`,\n     `targetDir`, `appDir`, the app's `legacyPort` \u002F `port` \u002F `domain` and the page's flip state\n     (the extractor resolves each capture's `provenance.side` from those —\n     `${CLAUDE_PLUGIN_ROOT}\u002Ftemplates\u002Fcapture-provenance.md`; bypassing `fm-style-spec` bypasses its param list too, and an\n     unresolved side counts as absent, so the refreshed baseline would be unusable by `fm-parity`),\n     `workingLanguage`. It refreshes `style-spec.json` so the delta's style\n     ops build to **fresh** values. (Skip when `styleDrift` is unset.)\n  2. Launch `delta-modifier` (`subagent_type: \"frontend-migration-plugin:delta-modifier\"`) with only its params: `app`, `page`, `deltaPlanPath` =\n     `docs\u002Fmigration\u002F{app}\u002F{page}\u002Fdelta-plan.json`, `styleSpecPath` =\n     `docs\u002Fmigration\u002F{app}\u002F{page}\u002Fstyle-spec.json`, `targetDir`, `appDir`, `packagesDir`,\n     `workingLanguage` (create\u002Fstyle ops use `tdd-cycle-runner` semantics — build to the style-spec,\n     no eyeballing). It applies ops in cascade order and preserves fm-fix edits.\n\n    3. **Read the modifier's result before going on.** `delta-modifier` reports pass\u002Ffail rather\n       than aborting. On failing tsc\u002FVitest, first **merge its `filesChanged[]` into `sourcePaths`**\n       (under `.tracker.lock`) — the files it already created exist in the tree, and a retry that\n       reuses them unchanged will not list them again — then **release the page `.lock` and stop** — Step 5's\n       release is the only other one on this branch, so stopping without it strands the page under\n       a lock whose holder has ended. Report the failure and leave\n       `migration-plan.next.json` \u002F `analysis.next.json` staged. Step 5 promotes the staged\n       baseline and writes `generated`, and Step 5 itself states that a run which failed here\n       \"leaves the reference untouched\" — continuing unconditionally is what breaks that, and a\n       promoted baseline makes the un-applied ops unrecoverable through `fm-delta`.\n\n  Then, only on success, continue to Step 5.\n- **Full** → the page needs re-planning, not just re-generation. Do all of this **while still holding\n  the page `.lock`**, in this order:\n  1. **Clear the page's gate authorization** — `gateEvidence`, the legacy\n     `verifiedAt`\u002F`e2ePassedAt`\u002F`parityPassedAt`, and `routePrepared`\u002F`flagKey` (take `.tracker.lock`\n     for that write), plus the `cascade` record and the page's `cascade-diff*.json` files (`fm-route`\n     reads that file directly). The drift that brought you here means the recorded passes describe legacy the\n     page no longer matches, and **legacy source is not a watch-path axis**, so nothing else will\n     notice. Until this write lands the page is still route-authorized over known-stale code.\n  2. **Delete `migration-plan.next.json` and `analysis.next.json`** so a later run cannot mistake an\n     abandoned proposal for a current one.\n  3. **Only then release the page `.lock`** — the skills you point the user to need it. Releasing\n     first would leave both mutations unprotected: a second `fm-delta` could take the lock, clear\n     what it correctly reads as stale staging, and start applying its own delta while this run is\n     still deleting files and writing the tracker underneath it.\n  4. Tell the user to re-run the chain from the stage the drift invalidated:\n     `\u002Ffrontend-migration-plugin:fm-analyze {page}` → `fm-style-spec` (if `styleDrift`) → `fm-plan` →\n     `fm-gen {page} --force`. Do **not** send them straight to `fm-gen`: the canonical baseline is\n     still the pre-drift one — the planner staged its proposal and only Step 5 promotes it — so\n     `fm-gen` would regenerate against the plan the drift just invalidated.\n\n  The skill **stops here**; Step 5 does not run.\n\n### Step 5: Record (incremental path only)\n\n**Tracker lock.** Take `docs\u002Fmigration\u002F.tracker.lock` around every `tracker.json` write below —\nafter the lock this step already holds, released right after the write (${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Lock file). Write it per ${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Serialization.\n- **Promote the staged baseline.** `migration-planner` (incremental mode) wrote its proposal to\n  `migration-plan.next.json` and `analysis.next.json`; verify both parse and reflect the applied ops\n  rather than re-deriving them here (the `styleSurface` is already current from Step 4), then move\n  them over the canonical `migration-plan.json` \u002F `analysis.json` and delete the staged copies. This\n  is the only step that advances the baseline, and it runs **after** the delta actually applied — so\n  a user who chose full regeneration, or a run that failed in Step 4, leaves the reference untouched.\n  If either staged file is missing, the delta is incomplete — re-run the planner\n  before recording. Archive the delta as `delta-plan.{timestamp}.json`.\n- Update `tracker.json` (Read-Modify-Write): set status back to `generated` (the page must re-pass\n  the gates), record `deltaAppliedAt`, refresh the tracker `styleSpec` summary when Step 4 re-extracted the answer\n  key (otherwise it keeps describing the pre-drift capture), refresh `sourcePaths` from the modifier's\n  `filesChanged[]` (repo-relative — add created\u002Fmodified files, drop removed ones; a report\n  without the list is incomplete evidence: re-collect before recording), and **clear `gateEvidence` together with the legacy `verifiedAt` \u002F `e2ePassedAt` \u002F\n  `parityPassedAt`** — the page's code changed, so every prior gate PASS now rests on superseded code\n  and must not read as fresh. Clearing `gateEvidence` alone leaves exactly the fields `fm-route`\n  Step 1 hard-gates on (`verifiedAt` + both reports reading `pass`), which would re-authorize the\n  flip. **Clear `routePrepared` and `flagKey` on the same pass**, or Step 1-pre still reads the page\n  as code-PR-prepared and `--flag-on` skips the fresh `--flag-off` (${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → \"Gate Result\n  Accounting\"). **Do not clear `regenRequiredAt`** — it means a full `fm-gen`\n  is owed, and the incremental branch runs `delta-modifier`, not the foundation phase that produces\n  the i18n key-coverage spec.\n- Release the lock.\n\n### Step 6: Report (incremental path)\nIn `workingLanguage`: ops applied, tests pass\u002Ffail with evidence, confirmation that prior fixes\nwere preserved, and the re-entry point — `\u002Ffrontend-migration-plugin:fm-verify {page}` →\n(`fm-cascade` when the page injects markup it does not author) → fm-e2e → fm-parity. (On the **Full** path the skill already ended in Step 4 after releasing the lock and\nprinting the `fm-analyze` → `fm-style-spec` → `fm-plan` → `fm-gen --force` next-steps — that\ninstruction is its report.)\n","# Incremental Re-migration\n\nRe-migrates only what changed when the legacy source drifts, instead of regenerating the whole\npage — preserving the fixes accumulated through earlier gate loops. All user-facing output in\n`workingLanguage`.\n\n## Instructions\n\n### Step 0: Config & state\nRead config (absent → run `fm-init`; stop). Resolve `app`, `targetDir`, `appDir`, `packagesDir`,\n`legacyDir`, `workingLanguage`, and the app's `legacyPort` \u002F `port` \u002F `domain` — Step 4 hands all\nthree to `style-spec-extractor` for provenance side-resolution, and an unresolved one makes every\ncapture `unresolved`. The page should already be at `generated` or beyond (else this is\na first migration → use `fm-analyze`\u002F`fm-style-spec`\u002F`fm-plan`\u002F`fm-gen`).\n\n**Confirm `apps[app]` before using it** (${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Configuration): the app entry must exist and carry the keys this stage reads. Config-file presence is not app presence — `mobile`\u002F`hana` are scaffolded, and a `--app` naming an unconfigured one must stop here with a clear message rather than fail deep inside an agent on an unresolved path.\n\n**Refuse `fixing` and `escalated` too.** A fix is in progress or awaiting manual intervention;\nStep 5 resets the page to `generated`, which discards the accumulated repairs and the\n`previousStatus` the fix loop needs. Send the user to `fm-fix` (after the manual step, for\n`escalated`) and let the gate re-run first.\n\n**Refuse a `flipped` page, a `done` page, or one with a flip prepared and handed over.** `done` is past\n`flipped` — the legacy page has been deleted, so there is no legacy source left to diff a delta\nagainst and no rollback target; refuse and require manual intervention — **not** `--revert`, which\nrefuses a `done` page too. A present `flipPrOpenedAt` means the flip artifact is prepared and PR2\nhanded over against the current code: refuse and point at `fm-route --revert` first.\nIf the status is `flipped`, stop and tell the user to run\n`\u002Ffrontend-migration-plugin:fm-route {page} --revert` first — **`--revert`, not `--flag-off`**:\nflag-off keeps the current status (`fm-route` Step 4), so it would leave the page at `flipped` and\nthis refusal would repeat with no exit. `--revert` is the rollback that returns it to\n`parity-passed`. Step 5 resets the status to\n`generated` while the edge flag stays ON — nothing here touches routing — so the tracker would say\n\"not flipped\" while the production domain serves v2. Provenance resolves a capture's `side` from\nexactly that status (`${CLAUDE_PLUGIN_ROOT}\u002Ftemplates\u002Fcapture-provenance.md`), so the next capture from the production\nhost would be labelled `legacy` and accepted as the legacy baseline. Beyond the provenance damage,\napplying a delta to a page under live traffic is a change in production; taking it out of rotation\nfirst is the correct order.\n\n**Stale staging is cleared in Step 2, under the lock — not here.** Deleting it before the lock\nwould let a second session destroy the staged baseline of a delta that is *currently running*: that\nrun then reaches Step 5, finds its files gone, and aborts having already rewritten the code, leaving\na page whose tracker still says `parity-passed` over code the delta changed. Step 5's\nintegrity check is that they *exist*, so an abandoned pair from a previous run would sail through it\nand promote a baseline describing a delta nobody applied — the same reason the Full branch deletes\nthem, which is the only abort path that was covered.\n\n### Step 1: Lock\nAcquire `docs\u002Fmigration\u002F{app}\u002F{page}\u002F.lock` (stale only when its holder is gone — see ${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Lock file; JSON schema — `holder`\u002F`pid`\u002FISO-8601 `acquiredAt` — in ${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Lock file). If it is held and fresh, report who holds it and stop — do not delete anything, and do not wait.\n\n### Step 2: Clear stale staging, then compute the delta (planner incremental mode)\n**Under the lock**, first **clear the page's gate authorization** — `gateEvidence`, the legacy\n`verifiedAt`\u002F`e2ePassedAt`\u002F`parityPassedAt`, `routePrepared`\u002F`flagKey` (take `.tracker.lock`), plus\nthe `cascade` record and the page's `cascade-diff*.json` files — `fm-route` reads that file\ndirectly, so a pre-drift cascade report left on disk would still bind the flip. Do it\n*now*, before anything is computed or applied: from this point the page is known to be drifted, and\nan abort at any later step must not leave it route-authorized over code the drift already\ninvalidated. Step 5 re-clears the same set; clearing twice is harmless, clearing late is not.\n\nThen delete any `migration-plan.next.json` \u002F `analysis.next.json` left by an earlier\nrun that aborted between Step 2 and Step 5. Holding the lock is what makes this safe: the only\nstaged files that can exist here are orphans, because any live delta holds this lock. Step 5's\nintegrity check is that the staged pair *exists*, so an abandoned pair would otherwise sail\nthrough it and promote a baseline describing a delta nobody applied.\n\nThen launch the planner:\nLaunch `migration-planner` (`subagent_type: \"frontend-migration-plugin:migration-planner\"`) with only its params: `mode: \"incremental\"`, `app`, `page`,\n`analysisPath`, `planPath` (= `migration-plan.json`, the baseline), `legacyDir`,\n`outPath = docs\u002Fmigration\u002F{app}\u002F{page}\u002Fdelta-plan.json`, `workingLanguage`. It diffs the current\nlegacy source against the `analysis.json` \u002F `migration-plan.json` baseline and writes\n`delta-plan.json` (added\u002Fmodified\u002Fremoved ops + cascade).\n\n### Step 3: Offer incremental vs full\nRead `delta-plan.json.summary`. Present:\n- the change counts (added\u002Fmodified\u002Fremoved);\n- **if the delta touches > 60% of the page's files (denominator = `tracker.json` `sourcePaths[]`, the list `fm-gen` recorded; absent → report the ratio as unavailable rather than guessing)**, recommend full regeneration\n  instead (Step 4's Full branch names the chain);\notherwise default to incremental. Let the user choose.\n\n### Step 4: Apply\n\n**Style-surface prerequisite — incremental branch only.** If `delta-plan.json.styleDrift` is set (the planner\ndetected changed classes \u002F structure \u002F assets), first **replace `analysis.json.styleSurface`\nwholesale** with `delta-plan.json.styleDrift.styleSurface` — the **complete current** surface (every\nelement + structure, not the drifted subset; a merge would leave removed elements behind). Whatever\nre-extracts styles reads `analysis.json.styleSurface`, and the baseline still holds the old surface\nuntil Step 5, so this patch must land before any re-extraction. It must **not** land before the\nStep 3 choice: the Full branch stops without running Step 5, so a `styleSurface` already replaced\nthere leaves the canonical `analysis.json` describing post-drift structure while the tracker still\nsays `parity-passed` over pre-drift code and evidence. Patch it inside the incremental branch,\nafter the user has chosen it.\n\n- **Incremental** →\n  1. **Refresh the answer key in-lock — do NOT nest the `fm-style-spec` skill** (it acquires this\n     same page `.lock`, which this skill holds from Step 1 → deadlock). Because the skill is bypassed,\n     its **Step 2b is bypassed too**: ensure `.claude\u002Fsettings.local.json` (per-machine, untracked —\n     never the shared `.claude\u002Fsettings.json`) `permissions.allow` includes the\n     Playwright command (e.g. `Bash(npx playwright *)`) here, or the sub-agent probe cannot launch and\n     the refresh silently degrades to `source-derived` — defeating the point of refreshing the answer\n     key. When `styleDrift` was set,\n     launch `style-spec-extractor` (`subagent_type: \"frontend-migration-plugin:style-spec-extractor\"`) **directly**, resolving `legacyUrl` the way `fm-style-spec`\n     Step 2 does (config `stagingConfig.baseUrl` \u002F app `domain` + `analysis.target.routePath` \u002F\n     `legacyUrlCandidates`, or `null` → source-cascade fallback), passing the extractor's own params\n     (see `agents\u002Fstyle-spec-extractor.md`): `app`, `page`, `analysisPath` (now holding the patched\n     surface), `outPath` = `docs\u002Fmigration\u002F{app}\u002F{page}\u002Fstyle-spec.json`, `legacyUrl`, `legacyDir`,\n     `targetDir`, `appDir`, the app's `legacyPort` \u002F `port` \u002F `domain` and the page's flip state\n     (the extractor resolves each capture's `provenance.side` from those —\n     `${CLAUDE_PLUGIN_ROOT}\u002Ftemplates\u002Fcapture-provenance.md`; bypassing `fm-style-spec` bypasses its param list too, and an\n     unresolved side counts as absent, so the refreshed baseline would be unusable by `fm-parity`),\n     `workingLanguage`. It refreshes `style-spec.json` so the delta's style\n     ops build to **fresh** values. (Skip when `styleDrift` is unset.)\n  2. Launch `delta-modifier` (`subagent_type: \"frontend-migration-plugin:delta-modifier\"`) with only its params: `app`, `page`, `deltaPlanPath` =\n     `docs\u002Fmigration\u002F{app}\u002F{page}\u002Fdelta-plan.json`, `styleSpecPath` =\n     `docs\u002Fmigration\u002F{app}\u002F{page}\u002Fstyle-spec.json`, `targetDir`, `appDir`, `packagesDir`,\n     `workingLanguage` (create\u002Fstyle ops use `tdd-cycle-runner` semantics — build to the style-spec,\n     no eyeballing). It applies ops in cascade order and preserves fm-fix edits.\n\n    3. **Read the modifier's result before going on.** `delta-modifier` reports pass\u002Ffail rather\n       than aborting. On failing tsc\u002FVitest, first **merge its `filesChanged[]` into `sourcePaths`**\n       (under `.tracker.lock`) — the files it already created exist in the tree, and a retry that\n       reuses them unchanged will not list them again — then **release the page `.lock` and stop** — Step 5's\n       release is the only other one on this branch, so stopping without it strands the page under\n       a lock whose holder has ended. Report the failure and leave\n       `migration-plan.next.json` \u002F `analysis.next.json` staged. Step 5 promotes the staged\n       baseline and writes `generated`, and Step 5 itself states that a run which failed here\n       \"leaves the reference untouched\" — continuing unconditionally is what breaks that, and a\n       promoted baseline makes the un-applied ops unrecoverable through `fm-delta`.\n\n  Then, only on success, continue to Step 5.\n- **Full** → the page needs re-planning, not just re-generation. Do all of this **while still holding\n  the page `.lock`**, in this order:\n  1. **Clear the page's gate authorization** — `gateEvidence`, the legacy\n     `verifiedAt`\u002F`e2ePassedAt`\u002F`parityPassedAt`, and `routePrepared`\u002F`flagKey` (take `.tracker.lock`\n     for that write), plus the `cascade` record and the page's `cascade-diff*.json` files (`fm-route`\n     reads that file directly). The drift that brought you here means the recorded passes describe legacy the\n     page no longer matches, and **legacy source is not a watch-path axis**, so nothing else will\n     notice. Until this write lands the page is still route-authorized over known-stale code.\n  2. **Delete `migration-plan.next.json` and `analysis.next.json`** so a later run cannot mistake an\n     abandoned proposal for a current one.\n  3. **Only then release the page `.lock`** — the skills you point the user to need it. Releasing\n     first would leave both mutations unprotected: a second `fm-delta` could take the lock, clear\n     what it correctly reads as stale staging, and start applying its own delta while this run is\n     still deleting files and writing the tracker underneath it.\n  4. Tell the user to re-run the chain from the stage the drift invalidated:\n     `\u002Ffrontend-migration-plugin:fm-analyze {page}` → `fm-style-spec` (if `styleDrift`) → `fm-plan` →\n     `fm-gen {page} --force`. Do **not** send them straight to `fm-gen`: the canonical baseline is\n     still the pre-drift one — the planner staged its proposal and only Step 5 promotes it — so\n     `fm-gen` would regenerate against the plan the drift just invalidated.\n\n  The skill **stops here**; Step 5 does not run.\n\n### Step 5: Record (incremental path only)\n\n**Tracker lock.** Take `docs\u002Fmigration\u002F.tracker.lock` around every `tracker.json` write below —\nafter the lock this step already holds, released right after the write (${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Lock file). Write it per ${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → Serialization.\n- **Promote the staged baseline.** `migration-planner` (incremental mode) wrote its proposal to\n  `migration-plan.next.json` and `analysis.next.json`; verify both parse and reflect the applied ops\n  rather than re-deriving them here (the `styleSurface` is already current from Step 4), then move\n  them over the canonical `migration-plan.json` \u002F `analysis.json` and delete the staged copies. This\n  is the only step that advances the baseline, and it runs **after** the delta actually applied — so\n  a user who chose full regeneration, or a run that failed in Step 4, leaves the reference untouched.\n  If either staged file is missing, the delta is incomplete — re-run the planner\n  before recording. Archive the delta as `delta-plan.{timestamp}.json`.\n- Update `tracker.json` (Read-Modify-Write): set status back to `generated` (the page must re-pass\n  the gates), record `deltaAppliedAt`, refresh the tracker `styleSpec` summary when Step 4 re-extracted the answer\n  key (otherwise it keeps describing the pre-drift capture), refresh `sourcePaths` from the modifier's\n  `filesChanged[]` (repo-relative — add created\u002Fmodified files, drop removed ones; a report\n  without the list is incomplete evidence: re-collect before recording), and **clear `gateEvidence` together with the legacy `verifiedAt` \u002F `e2ePassedAt` \u002F\n  `parityPassedAt`** — the page's code changed, so every prior gate PASS now rests on superseded code\n  and must not read as fresh. Clearing `gateEvidence` alone leaves exactly the fields `fm-route`\n  Step 1 hard-gates on (`verifiedAt` + both reports reading `pass`), which would re-authorize the\n  flip. **Clear `routePrepared` and `flagKey` on the same pass**, or Step 1-pre still reads the page\n  as code-PR-prepared and `--flag-on` skips the fresh `--flag-off` (${CLAUDE_PLUGIN_ROOT}\u002FCLAUDE.md → \"Gate Result\n  Accounting\"). **Do not clear `regenRequiredAt`** — it means a full `fm-gen`\n  is owed, and the incremental branch runs `delta-modifier`, not the foundation phase that produces\n  the i18n key-coverage spec.\n- Release the lock.\n\n### Step 6: Report (incremental path)\nIn `workingLanguage`: ops applied, tests pass\u002Ffail with evidence, confirmation that prior fixes\nwere preserved, and the re-entry point — `\u002Ffrontend-migration-plugin:fm-verify {page}` →\n(`fm-cascade` when the page injects markup it does not author) → fm-e2e → fm-parity. (On the **Full** path the skill already ended in Step 4 after releasing the lock and\nprinting the `fm-analyze` → `fm-style-spec` → `fm-plan` → `fm-gen --force` next-steps — that\ninstruction is its report.)\n",{"name":5,"description":7,"allowed-tools":43,"argument-hint":44,"user-invocable":45},"Read, Write, Edit, Glob, Grep, Bash, Agent","\u003Cpage> [--app pc|mobile|hana]",true,"main","eaef2a5b6092b72972ff2f25ef79803753bc9bbf","frontend-migration-plugin\u002Fskills\u002Ffm-delta",0,"https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins","https:\u002F\u002Fgithub.com\u002Fohmyhotelco","2026-11-13 16:34:32",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":45},[55,58,61],{"tool":56,"command":57},"npx","npx skills add ohmyhotelco\u002Fhare-cc-plugins --skill fm-delta",{"tool":59,"command":60},"bunx","bunx skills add ohmyhotelco\u002Fhare-cc-plugins --skill fm-delta",{"tool":62,"command":63},"pnpm","pnpm dlx skills add ohmyhotelco\u002Fhare-cc-plugins --skill fm-delta","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Ffrontend-migration-plugin\u002Fskills\u002Ffm-delta\u002FSKILL.md",[],[67,91,109,127,146,164],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":38},"01M6M5QVXQNQMJBP1JZP9T440T","hp-shared","Shared conventions for every homepage-plugin agent and skill — stack, code conventions, state-file writes, check commands and how to report them. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fhomepage-plugin\u002Fskills\u002Fhp-shared\u002FSKILL.md",[],[74,75,76,77,78,79,26,80,81,82,83,84,85,86,87,88,89,90],"shared","hp shared","state","stack","plugin","how","report","code conventions","commands","how to","conventions","false","frontmatter","file","code","hand","check",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":38},"01M6M5PZTN1M0G4AHJV08VF1HV","fe-shared","Shared conventions for every frontend-react-plugin agent and skill — code conventions, state files and locks, accepted deviations, design principles, build working directory, router-mode command matrix, TypeScript check. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Ffrontend-react-plugin\u002Fskills\u002Ffe-shared\u002FSKILL.md",[],[74,98,26,99,81,100,101,102,103,85,88,89,104,90,105,76,78,106,107,108],"fe shared","mode","frontend","design","design principles","files","react","router","principles","command","build",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":38},"01M6M5GAW7ZZ3580DVCMH51SFQ","be-spring-shared","Shared conventions for every backend-springboot-plugin agent and skill — tech stack, CQRS architecture, naming, coding standards, TDD, commit and build rules, state files. Preloaded into agents through their `skills:` frontmatter; not meant to be invoked by hand.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fbackend-springboot-plugin\u002Fskills\u002Fbe-spring-shared\u002FSKILL.md",[],[74,116,117,103,85,118,119,89,77,120,86,121,122,123,26,124,125,76,78,126],"spring","be spring shared","commit","architecture","coding standards","coding","standards","tech","Rules","cqrs","naming",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":38},"01M6FNV58QMW8K71SA9FGTXMF4","pp-translate","Use after directly editing the working language spec to sync changes to other supported languages.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fplanning-plugin\u002Fskills\u002Fpp-translate\u002FSKILL.md",[],[134,135,136,137,138,139,140,141,142,143,144,35,87,145,24,21],"pp","pp translate","translate","feature","name","editing","read","spec","write","edit","sync","language",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":38},"01M6FNV0PGRKR2MW0AEPS6XP0Q","pp-sync-stitch","Use when wireframes were manually edited on the Stitch website and need to be re-fetched to the local project.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fplanning-plugin\u002Fskills\u002Fpp-sync-stitch\u002FSKILL.md",[],[153,134,154,144,155,156,137,157,25,158,159,35,32,160,161,162,163,138,140,24],"pp sync stitch","stitch","projects","get","project","local","MCP","id","wireframes","website","screen",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":38},"01M6FNTWW2KHS9XRAR72X33G0B","pp-sync-notion","Use when a specification needs to be published or re-synced to Notion after finalization or manual edits.","https:\u002F\u002Fgithub.com\u002Fohmyhotelco\u002Fhare-cc-plugins\u002Fblob\u002Fmain\u002Fplanning-plugin\u002Fskills\u002Fpp-sync-notion\u002FSKILL.md",[],[134,171,144,172,137,25,173,174,159,35,175,138,140,142,143,176,24],"notion","pp sync notion","search","manual","specification","grep"]