Dependency Upgrade Risk and Rollout Planner

Plan risky framework, library, and package upgrades with compatibility checks, regression testing, phased rollout, and rollback steps.

Prompt Template

Act as a senior software maintenance lead. Create a safe upgrade plan for moving [library/framework/package] from [current version] to [target version] in a [language/framework] application.

Project context:
- Application type: [web app, mobile app, API, CLI, monorepo, etc.]
- Current stack: [runtime, framework, package manager, build tools]
- Test coverage: [unit/integration/e2e/manual coverage level]
- Release process: [CI/CD, staging, feature flags, deployment frequency]
- Known constraints: [legacy APIs, plugins, browser support, enterprise customers, downtime limits]
- Risk tolerance: [low / medium / high]

Deliver:
1. **Upgrade scope summary** and expected breaking-change areas
2. **Dependency inventory**: direct dependencies, transitive risks, peer dependency conflicts
3. **Compatibility checklist** for runtime, framework, plugins, build tooling, and deployment
4. **Risk matrix** with likelihood, impact, detection method, and mitigation
5. **Step-by-step technical upgrade plan** with branch strategy and commit sequencing
6. **Test plan** covering automated, manual, regression, performance, and security checks
7. **Rollout plan** with staging validation, canary/release gates, monitoring, and owner assignments
8. **Rollback plan** including database/config considerations if relevant
9. **Developer communication note** summarizing what changed and what to watch

If you need more information, list the highest-risk unknowns first before making assumptions.

Example Output

Upgrade: Next.js 13 โ†’ 15

Highest-Risk Areas

| Area | Risk | Mitigation |

|---|---|---|

| App Router changes | Existing route handlers may break | Run route-level smoke tests before merge |

| React peer dependencies | Package mismatch with design system | Upgrade design system in a separate prep PR |

| Build output | CI image may use old Node version | Pin Node 22 in CI before framework bump |

Commit Sequence

1. Update Node and package manager versions.

2. Upgrade framework and peer dependencies only.

3. Fix compile errors without behavior changes.

4. Update deprecated APIs.

5. Run full regression and performance comparison.

Release Gates

- 0 TypeScript errors

- E2E suite green twice

- No increase in p95 page load above 5%

- Error rate under 0.2% during canary

Tips for Best Results

  • ๐Ÿ’กPaste the package.json or dependency manifest for much more precise upgrade sequencing.
  • ๐Ÿ’กInclude CI logs or deprecation warnings if the upgrade already failed once.
  • ๐Ÿ’กAsk for a two-PR or three-PR migration plan when the upgrade is large.
  • ๐Ÿ’กMention production rollback constraints, especially database migrations or config changes.