1---2name: dependency-upgrade3description: Dependency upgrades, freshness audits, and unused-package cleanup.4---56## Workflow781. Define the exact dependency scope and create the durable report before changing versions.92. Establish the package manager, workspace and runtime boundaries, official project checks, and every in-scope dependency from manifests and10 lockfiles.113. Use current package-manager help, manifests, lockfiles, runtime metadata, vendor release notes, upgrade guides, and advisories as sources of truth.12 Load $laravel or $react when applicable.134. Upgrade with the project's package manager and apply straightforward compatibility fixes. Ask before broad migrations, architecture changes,14 many-file rewrites, unclear behavior changes, native rebuilds, or test-suite rewrites.155. Verify risky batches and the final state. Finish only when every in-scope dependency is upgraded, removed, intentionally skipped, or blocked with a16 recorded reason.1718## Unused packages1920- Require evidence from manifests, imports, configuration, scripts, providers, tests, build tooling, and runtime integration before declaring a21 package unused.22- Remove only clearly unused packages. Ask before removing anything with unclear dynamic, framework, plugin, or production-only usage.23- Record removed, retained, and unclear candidates with evidence.2425## Patching2627- Do not permanently modify vendor files, installed dependencies, generated package output, or lockfile internals.28- Remove diagnostic patches before finishing. If an upgrade requires a patch, fork, alias, Composer patch, `patch-package`, or monkey patch, skip it29 and request approval with cleaner alternatives.3031## Report3233- Create the report outside source control. Share its path early and update it after every dependency or batch.34- On resume, read the report before continuing. Link it with the latest status in every final answer; a summary does not replace it.35- Include every in-scope dependency, even when unchanged: package, ecosystem, old and new versions, reason, scan marker, dependency type, sources,36 notable changes, code/config/test changes, checks, patch status, and final status.