| name | upgrade-dep |
| description | Upgrade a dependency with changelog research, breaking change analysis, and verification. |
| disable-model-invocation | true |
| allowed-tools | Bash(*) Read Write Edit Grep Glob |
| arguments | ["package","target-version"] |
| argument-hint | lodash 4.18.0 |
Upgrade Dependency
Upgrade a dependency with changelog research, breaking change analysis, and full verification.
Step 1: Current State
- Find current version: Locate the dependency in manifest files (package.json, go.mod, requirements.txt, Cargo.toml, etc.).
- List importing files: Find all files that import/use this dependency.
- Run tests for baseline: Execute the test suite and record pass/fail state before any changes.
Step 2: Research Breaking Changes
- Review the changelog or release notes between the current and target versions.
- Identify breaking changes, deprecations, and migration guides.
- Check for known issues or regressions in the target version.
- Note any transitive dependency changes that may affect the project.
Step 3: Plan
Present the upgrade plan to the user:
- Breaking changes found: List each with affected files.
- Migration steps: Ordered list of code changes required.
- Risk assessment: Low/medium/high based on scope of changes.
- Estimated files affected: Count of files needing modification.
Wait for user approval before proceeding.
Step 4: Execute
- Update the dependency version in the manifest file.
- Fix each breaking change identified in the plan.
- Update lock files as needed.
- Build the project to check for compilation errors.
- Run the test suite.
Step 5: Verify
- Run the full test suite and confirm all tests pass.
- Run the linter and confirm no new warnings.
- Check for deprecation warnings in build output.
- Report the final status.