Home › Agent workflows › Dependency upgrade workflow AGENTS.md

Dependency upgrade workflow AGENTS.md

AGENTS.md workflow for upgrading dependencies and frameworks safely: one at a time, changelogs, codemods, and verification.

AGENTS.mdAgent workflows

How to use

Save this as AGENTS.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

Note: Review and test before use. Provided as is, without warranty. See Terms.

AGENTS.mdDownload  
# AGENTS.md: Dependency and framework upgrades

## Before
- Record the baseline: current versions, and test/lint/build results (`npm test`, etc.). Note pre-existing failures.
- Read the changelog and migration guide for every major version you cross. List the breaking changes that affect this codebase (search for the affected APIs with `rg`).

## Doing the upgrade
- One package (or one tightly coupled group, e.g. `react` + `react-dom` + `@types/react`) per step and per commit.
- Use the package manager, not manual edits: `pnpm up <pkg>@<version>`, `uv add <pkg>==<version>`, `go get <mod>@<version>`, `cargo update -p <crate>`. Commit the lockfile.
- Run official codemods where they exist (e.g. `npx @next/codemod`, `npx storybook upgrade`) and review their diff.
- Fix deprecations as you go; don't silence warnings.
- Don't jump multiple majors at once if the guide recommends stepping through each.

## Verify each step
- Install from clean, then typecheck, lint, tests, and build. Smoke-test the app's main flows.
- If something breaks and the fix is unclear, revert that step and report rather than piling on workarounds (patches, `--legacy-peer-deps`, `overrides`).

## Report
A table of package, from, to, breaking changes handled, and follow-ups. Flag anything requiring runtime/environment changes (Node/Python version, env vars, infrastructure).

More: all Agent workflows rules · all AGENTS.md rules

Related rules

Code review Copilot instructions

Copilot instructions focused on pull request review: what to flag, severity labels, and how to word comments.

GitHub CopilotAgent workflows

Code review prompt file (Copilot)

A Copilot prompt file (/review-changes) that reviews the current changes and reports issues by severity without editing.

GitHub CopilotAgent workflows

Code reviewer subagent (Claude Code)

A Claude Code subagent definition that reviews the current diff for bugs, security, and tests, reporting by severity.

Claude Code (CLAUDE.md)Agent workflows

/commit slash command (Claude Code)

A Claude Code /commit slash command that reviews staged changes and writes a Conventional Commits message.

Claude Code (CLAUDE.md)Agent workflows

Context management for long agent sessions CLAUDE.md

CLAUDE.md practices for keeping Claude Code effective in long sessions: lean memory, notes files, subagents, and resets.

Claude Code (CLAUDE.md)Agent workflows

Git commits & PRs AGENTS.md

AGENTS.md rules for how agents commit: Conventional Commits, atomic changes, safe git commands, and PR descriptions.

AGENTS.mdAgent workflows

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.