Skip to main content

migrate-a-web-frontend-framework

Migrate a production frontend framework while preserving behavior, accessibility, performance, URLs, state, and rollback. Use when a live web application must change rendering or component architecture without a rewrite outage.

来源信息

仓库
protosphinx/sphinxstack
最近来源活动
2026年7月29日 13:55
检测到的 SKILL.md 语言
英语
星标
3
Forks
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
migrate-a-web-frontend-framework
category
web
description
Migrate a production frontend framework while preserving behavior, accessibility, performance, URLs, state, and rollback. Use when a live web application must change rendering or component architecture without a rewrite outage.
# migrate-a-web-frontend-framework Move bounded product slices through a compatibility architecture and prove outcomes before retiring the old runtime. ## When to use - Use when changing the framework, rendering mode, router, state system, or component runtime of a live frontend. - Use a dependency upgrade when routing, rendering, state, and component contracts remain materially compatible. ## Preconditions - Confirm product, frontend, backend, design, accessibility, SEO, analytics, security, and operations owners. - Gather routes, features, browsers, components, state, APIs, performance, tests, URLs, tracking, incidents, and deployment constraints. ## Procedure 1. Build a **route and feature inventory** across entry points, states, devices, permissions, data, SEO, analytics, and owners. 2. Define outcome parity for behavior, accessibility, content, URLs, metadata, performance, security, and observability. 3. Choose a **compatibility architecture** for shared routing, shell, identity, navigation, design tokens, APIs, state, and errors. 4. Establish contract tests and visual, accessibility, browser, performance, and analytics baselines. 5. Select vertical **migration waves** that can ship, observe, and roll back independently. 6. Prevent duplicate state, handlers, telemetry, styles, and dependency payloads across runtimes. 7. Migrate shared foundations only after representative slices prove the boundary. 8. Compare old and new paths with synthetic, canary, and real outcome evidence. 9. Rehearse **rollback** of routing and assets without reversing incompatible server data. 10. Remove old code only after traffic, references, support, and rollback gates expire. ## Failure plan - Pause a wave for behavior, accessibility, URL, security, analytics, or performance regression. - Keep old routing available for compatible cohorts until the new slice passes observation. - If shared state diverges, stop dual mutation and restore one authoritative owner. - Roll back frontend delivery without claiming server-side effects were undone. ## Worked example A commerce site moves from a client-only framework to server rendering. The inventory exposes account, checkout, search, localization, tracking, and saved-cart state. A shared edge router sends one product family to the new runtime while contracts keep URLs and API state stable. Canary comparison finds duplicate purchase analytics and a focus reset after navigation, so the wave pauses. Both defects are repaired, performance and accessibility baselines pass, and a rehearsal restores the old asset route without reverting completed orders. ## Done - A migration architecture record contains route and feature inventory, compatibility architecture, contracts, waves, ownership, and rollback - A behavior parity report verifies accessibility, URLs, state, browser, performance, security, SEO, analytics, and user outcomes - A cutover and rollback rehearsal records traffic movement, asset restoration, evidence preservation, and server-state boundaries
在 GitHub 查看