Skip to content

j-mauro-r/SAT-Dengue-V2 / .agents/skills/deepworkplan/addons/dependency-upgrade

deepworkplan-addon-dependency-upgrade

Verified

DeepWorkPlan addon that safely upgrades a repo's dependencies — reasoning about the repo's ACTUAL package manager (npm/pnpm/yarn + ncu, pip/poetry/uv, cargo, go mod, bundler, composer, and more) rather than assuming npm — with a batched, validated, revertible workflow that detects the manager and manifests/lockfiles, classifies upgrades (patch/minor/major), upgrades in safe batches, runs the repo's real validation gate after each batch, reverts a failing batch, and summarizes. Near-default — offered for every repo with declared dependencies, and its delegator installs under the onboarding consent unless declined; upgrades themselves never run automatically, only as explicit, gated work. Never required for baseline conformance; reconciles with the repo's existing tooling. Use when the developer wants to bring dependencies up to date without breaking the build.

FileKindSize
SKILL.mdskill md10.4 KB
SPEC.mdmarkdown8.5 KB
addon.jsonconfig221 B
templates/ecosystems.mdmarkdown5.8 KB
templates/lib-upgrade-command.mdmarkdown2.0 KB
templates/upgrade-report.mdmarkdown1.4 KB

templates/ecosystems.md

View on GitHub
# Template — Per-Ecosystem Upgrade Reference (reasoning aid)

This is a **reasoning aid**, not a copy-paste script. Detect the repo's **actual**
package manager from the manifest and lockfile that exist, then drive **that**
manager's real commands. Match the row for the detected stack as a *checklist* and
verify each command against the real repo — **detected reality wins**. A repo MAY
have more than one ecosystem; handle each with its own manager, in its own batches.

## How to detect the manager (lockfile is the tell)

| Ecosystem | Manifest | Lockfile present → manager |
|-----------|----------|----------------------------|
| JS / TS | `package.json` | `pnpm-lock.yaml` → **pnpm** · `yarn.lock` → **yarn** · `package-lock.json` → **npm** |
| Python | `pyproject.toml` / `requirements*.txt` / `Pipfile` | `poetry.lock` → **poetry** · `uv.lock` → **uv** · `Pipfile.lock` → **pipenv** · pinned `requirements*.txt` → **pip / pip-tools** |
| Rust | `Cargo.toml` | `Cargo.lock` → **cargo** |
| Go | `go.mod` | `go.sum` → **go modules** |
| Ruby | `Gemfile` | `Gemfile.lock` → **bundler** |
| PHP | `composer.json` | `composer.lock` → **composer** |

> Never assume npm. Never run a manager whose lockfile is absent. If two JS
> lockfiles exist, the committed one wins; flag the inconsistency.

## Per-ecosystem command reference

> `{pkg}` = a single dependency · `{mgr}` = the detected JS manager
> (`pnpm`/`yarn`/`npm`). The **gate** in every row is the **repo's real**
> validation command set, discovered from `AGENTS.md` / `docs/` / the manifest —
> the examples below are illustrative, not prescriptive. Two further rules:
> a tier-wide verb such as `ncu -u --target patch` touches the whole tier —
> restrict actual mutations to the batch's approved set (`--filter`) per
> SPEC §4; and the **Revert** rows' `git checkout --` is valid **only when the
> pre-batch snapshot is proven identical to `HEAD`** — otherwise restore the
> recorded pre-batch snapshot, never a bare checkout over work the batch did
> not own (SPEC §6).

### JS / TS (npm · pnpm · yarn) — `ncu` is the cross-manager checker

| Step | Command |
|------|---------|
| Check outdated | `ncu` (or `ncu --format json`); fallback `{mgr} outdated` |
| Classify | parse current vs target semver from `ncu` output → patch / minor / major |
| Update manifest (patch) | `ncu -u --target patch` |
| Update manifest (minor) | `ncu -u --target minor` |
| Update manifest (chosen) | `ncu -u --filter "{pkg-a} {pkg-b}"` |
| Install / regenerate lock | `{mgr} install` (pnpm/yarn/npm) |
| Gate (example) | `pnpm run biome:check && pnpm run astro:check && pnpm run build && pnpm run test` |
| Revert a batch | `git checkout -- package.json <lockfile> && {mgr} install` |

### Python — poetry · uv · pip / pip-tools · pipenv

| Step | poetry | uv | pip-tools | pipenv |
|------|--------|-----|-----------|--------|
| Check outdated | `poetry show -o` | `uv pip list --outdated` | `pip list --outdated` | `pipenv update --outdated` |
| Update chosen | `poetry update {pkg}` | `uv lock --upgrade-package {pkg}` | bump in `requirements*.in` then `pip-compile` | `pipenv update {pkg}` |
| Install / sync | `poetry install` | `uv sync` | `pip-sync` / `pip install -r …` | `pipenv install` |
| Lockfile | `poetry.lock` | `uv.lock` | pinned `requirements*.txt` | `Pipfile.lock` |
| Revert | `git checkout -- pyproject.toml poetry.lock && poetry install` | `git checkout -- pyproject.toml uv.lock && uv sync` | `git checkout -- requirements*.txt && pip-sync` | `git checkout -- Pipfile Pipfile.lock && pipenv install` |
| Gate (example) | `ruff check && mypy && pytest` | (same) | (same) | (same) |

### Rust — cargo

| Step | Command |
|------|---------|
| Check outdated | `cargo update --dry-run` (or `cargo outdated` if installed) |
| Update chosen | `cargo update -p {pkg}` (minor/patch within semver) |
| Major bump | edit the version req in `Cargo.toml`, then `cargo update -p {pkg}` |
| Lockfile | `Cargo.lock` (regenerated by `cargo update`) |
| Gate (example) | `cargo build && cargo test && cargo clippy -- -D warnings` |
| Revert | `git checkout -- Cargo.toml Cargo.lock` |

### Go — go modules

| Step | Command |
|------|---------|
| Check outdated | `go list -u -m all` |
| Update chosen (minor/patch) | `go get {module}@latest` (or a specific tag) |
| Tidy | `go mod tidy` |
| Lockfile | `go.mod` + `go.sum` |
| Gate (example) | `go build ./... && go test ./... && go vet ./...` |
| Revert | `git checkout -- go.mod go.sum` |

### Ruby — bundler

| Step | Command |
|------|---------|
| Check outdated | `bundle outdated` |
| Update chosen | `bundle update {gem}` (conservative: `--conservative`) |
| Lockfile | `Gemfile.lock` |
| Gate (example) | `bundle exec rubocop && bundle exec rspec` |
| Revert | `git checkout -- Gemfile Gemfile.lock && bundle install` |

### PHP — composer

| Step | Command |
|------|---------|
| Check outdated | `composer outdated` |
| Update chosen | `composer update {pkg} --with-dependencies` |
| Lockfile | `composer.lock` |
| Gate (example) | `composer lint && composer test` |
| Revert | `git checkout -- composer.json composer.lock && composer install` |

## Reasoning notes

- **The lockfile is regenerated by the manager** — never hand-edit it.
- **Revert from the recorded pre-batch snapshot**, not blindly from `HEAD` —
  `git checkout --` is correct only when proven identical to that snapshot
  (no earlier uncommitted batches, no pre-existing changes in the owned files).
- **Discover the gate, don't guess it.** Read the repo's `AGENTS.md` Quick
  Commands / `docs/DEVELOPMENT_COMMANDS.md` / manifest scripts, or use the
  devcontainer addon's `codecheck`/`check`/`fix`/`test` aliases if present.
- **Batch + validate + revert** is the same loop in every ecosystem; only the
  detect / update / install / gate verbs change.
add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope.Stars: 115kUpdated Claude CodeCodexVerifiedInstall
fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks.Stars: 115kUpdated Claude CodeCodexVerifiedInstall