Skip to content

Package Dependency Upgrade Agent

The Package Dependency Upgrade Agent plugin runs on a schedule, analyzes the repository’s dependency manifests and lockfiles, applies a configurable upgrade policy to decide which bumps are worth proposing, and opens a single consolidated pull request only when there are meaningful changes. By default it favours security fixes, EOL migrations, and low-risk patch/minor bumps on runtime dependencies, and defers everything else.

AnalyzerWhat it looks for
Dependency FreshnessOutdated direct and transitive dependencies, latest stable versions, EOL releases
Framework VersionsMajor/minor upgrades available for frameworks (e.g. Node, .NET, Spring, Django, React, Angular)
Security AdvisoriesKnown CVEs in pinned versions that are fixed in newer releases
Breaking ChangesRelease notes and migration impact for each recommended bump

Works with GitHub, Azure DevOps, Bitbucket, and any generic git repository. Supports npm, pnpm, yarn, pip, poetry, uv, maven, gradle, nuget, go mod, cargo, bundler, and composer.


flowchart TD
    A[Scheduled trigger] --> B[Detect platform & clone repo]
    B --> C[Discover manifests & lockfiles]
    C --> D[Resolve current versions]
    D --> E[Query registries for latest stable]
    E --> F[Classify upgrades<br/>patch / minor / major]
    F --> F1[Apply Upgrade Policy<br/>drop noise, keep signal]
    F1 --> G[Read changelogs & advisories]
    G --> H[Group into an upgrade plan]
    H --> I[Create branch & apply bumps]
    I --> J{Platform?}
    J -->|GitHub / Azure DevOps| K[Open PR with recommendations]
    J -->|Other| L[Write package-upgrade-report.md]
  1. Scheduled trigger — a cron / synthetic webhook fires (e.g. weekly) and the Xianix Agent spawns the plugin.
  2. Discover manifests — the plugin walks the repo and identifies every ecosystem in use (package.json, requirements.txt, pyproject.toml, pom.xml, build.gradle, *.csproj, go.mod, Cargo.toml, Gemfile, composer.json, etc.).
  3. Resolve current versions — reads lockfiles to pin the exact version of each dependency, including transitive ones where relevant.
  4. Query registries — looks up the latest stable version for each dependency and compares against what is pinned.
  5. Classify upgrades — tags each recommendation as patch, minor, or major, and flags anything with an open CVE.
  6. Apply upgrade policy — filters the candidate list against the default policy and any overrides in .package-upgrade.yml (see Configuration). Candidates are dropped if they fail a policy rule (soak period, cooldown, scope, ignore list, etc.) so the agent only advances meaningful upgrades.
  7. Summarize impact — fetches release notes / changelogs for the surviving bumps and highlights breaking changes and required migration steps.
  8. Open PR — creates a dedicated branch, applies safe bumps (patch / minor by default), commits manifest + lockfile changes, and opens a PR with the full upgrade plan. Major bumps are listed in the PR body as recommendations with migration notes rather than applied automatically, unless --include-major is set.
  9. Fallback — on unsupported platforms, the plan is written to package-upgrade-report.md instead.

The agent’s goal is to propose meaningful upgrades, not every upgrade. Each candidate is evaluated against the following default policy. Anything that fails a rule is dropped from the PR and listed in the PR body under Deferred with the reason, so the decision is auditable.

SignalDefault behaviourRationale
Open CVE (CVSS ≥ 7.0, or EPSS ≥ 0.1) fixed in newer versionAlways propose, regardless of other filtersSecurity trumps noise concerns
Package is end-of-life / deprecatedPropose with a migration noteEOL is a latent incident
Patch bump on a direct runtime dependencyProposeLow-risk, high-signal
Minor bump on a direct runtime dependencyPropose if release is ≥ 7 days oldAvoid bleeding-edge regressions
Major bump on a direct runtime dependencyOnly list as recommendation, don’t apply — unless --include-majorRequires human migration review
Any bump on a dev / test-only dependencyBatch into a monthly PR; skip weekly runsLow blast radius, not worth weekly churn
Transitive-only bumpSkip unless it resolves a CVELockfile noise
Pre-release / RC / beta tagSkipNot stable
Package has < soak_days since release (default: 7)SkipAvoid bleeding-edge / unvetted releases
Same bump proposed and closed in the last cooldown.same_package_days (default: 30)SkipDon’t re-litigate upgrades the team already declined
Max upgrades per PR exceeded (default: 25)Split or defer the restKeeps PRs reviewable

The PR body always contains three sections so reviewers can see what was considered:

  • Proposed — bumps being applied in this PR.
  • Recommended — majors / migrations, listed with links to breaking-change notes but not applied.
  • Deferred — candidates dropped by policy, each annotated with the rule that filtered it (soak_days, cooldown, scope: dev, ignore, etc.).

The policy above is the default. Teams can override it by committing a .package-upgrade.yml file to the repository root. The agent reads this file on every run; missing fields fall back to the defaults.

.package-upgrade.yml
defaults:
soak_days: 7
max_upgrades_per_pr: 25
include_major: false
include_prereleases: false
ignore_transitive: true
security:
min_cvss: 7.0
always_propose: true
groups:
- name: runtime-minor-patch
match: { scope: runtime, bump: [patch, minor] }
cadence: weekly
- name: dev-dependencies
match: { scope: dev }
cadence: monthly
- name: majors
match: { bump: major }
mode: recommend-only # list in PR body, don't apply
cooldown:
same_package_days: 30 # don't re-propose a bump the team already closed
ignore:
- package: "left-pad"
reason: "Replaced internally"
- package: "react"
versions: ">=19.0.0 <19.1.0"
reason: "Known perf regression"
FieldTypeDefaultPurpose
defaults.soak_daysint7Minimum days since a version was released before the agent will propose it
defaults.max_upgrades_per_print25Upper bound on bumps in a single PR; extras are deferred to the next run
defaults.include_majorboolfalseIf true, majors are applied; otherwise they are only recommended
defaults.include_prereleasesboolfalseAllow -rc, -beta, -alpha tags
defaults.ignore_transitivebooltrueSkip transitive-only bumps unless they fix a CVE
security.min_cvssnumber7.0Minimum CVSS score for a security-motivated upgrade to bypass other filters
security.always_proposebooltrueSecurity upgrades ignore soak period, cooldown, and group cadence
groups[*]listsee aboveNamed groups with their own match filter, cadence, and mode (apply / recommend-only)
cooldown.same_package_daysint30Window during which a closed (non-merged) bump for the same package will not be re-proposed
ignore[*]list[]Packages (optionally version-scoped) the agent must never propose

InputSourceRequiredDescription
Repository URLAgent ruleYesThe repository to analyze — provided by the Xianix Agent rule, not typed in the prompt
EcosystemsPromptNoRestrict analysis to a subset (e.g. npm,pip). Defaults to all detected ecosystems
--include-major flagPromptNoApply major-version bumps in addition to patch/minor (by default, majors are only recommended, not applied)
--security-only flagPromptNoOnly propose upgrades that resolve a known CVE
--dry-run flagPromptNoProduce the report but skip commits and PR creation

The platform (GitHub, Azure DevOps, etc.) is auto-detected from git remote — you don’t need to specify it.


Run a full scan and open a PR with safe upgrades:

/package-upgrade-scan

Only propose upgrades for Node and Python:

/package-upgrade-scan npm,pip

Include major-version bumps and open a PR:

/package-upgrade-scan --include-major

Only security-motivated upgrades:

/package-upgrade-scan --security-only

Dry run (report only, no PR):

/package-upgrade-scan --dry-run

The Xianix Agent reads these from its secrets store and injects them at runtime via the rule’s with-envs block (see the rule examples below). For local CLI use, export them in your shell.

VariablePlatformRequiredPurpose
GITHUB-TOKENGitHubYesAuthenticate gh CLI for creating branches, pushing commits, and opening PRs
AZURE-DEVOPS-TOKENAzure DevOpsYesPAT for REST API calls and git push
NPM-TOKENOptionalNoQuery private npm registries
PIP-INDEX-URLOptionalNoQuery private PyPI indexes

The GITHUB-TOKEN requires the following repository permissions:

PermissionAccessWhy it’s needed
ContentsRead & WriteClone the repo, create a branch, and commit manifest/lockfile updates
MetadataReadList collaborators and access repository metadata
Pull requestsRead & WriteOpen the upgrade PR and post the recommendation summary

The AZURE-DEVOPS-TOKEN (Personal Access Token) requires:

PermissionAccessWhy it’s needed
CodeRead & WriteClone the repo, push the upgrade branch, and commit manifest/lockfile updates
Pull Request ThreadsRead & WriteOpen the upgrade PR and post the recommendation summary

Terminal window
# Point Claude Code at the plugin
claude --plugin-dir /path/to/xianix-plugins-official/plugins/package-dependency-upgrade-agent
# Then in the chat
/package-upgrade-scan

Or trigger it automatically via the Xianix Agent by adding a scheduled rule — see the examples below and the Rules Configuration guide.


Add one (or more) of the execution blocks below to your rules.json so the Xianix Agent automatically runs the Package Dependency Upgrade Agent on a schedule.

The Package Dependency Upgrade Agent is schedule-driven. Unlike tag-driven plugins, it does not wait for a human to apply a label — it runs on a cadence you configure (typically weekly) and only escalates by opening a PR when it finds something worth acting on. You can also trigger it manually by dispatching the scheduled-package-upgrade event.

ScenarioWhat it covers
Weekly scheduled runThe default cadence — a synthetic webhook fires and a PR is opened if upgrades are available
Manual dispatchA human (or another rule) fires the scheduled-package-upgrade event to force an immediate scan
After lockfile changesOptionally re-run on pushes that touch manifests/lockfiles to catch newly-outdated pins

There is no label-based trigger for this agent. The cadence (and optional manual dispatch) is the single source of truth for “scan this repo for outdated packages.”

PlatformScenarioWebhook eventFilter rule
GitHubWeekly scheduledscheduledevent_type=='scheduled-package-upgrade'
GitHubManual dispatchworkflow_dispatchinputs.scanner=='package-upgrade'
Azure DevOpsWeekly scheduledscheduledevent_type=='scheduled-package-upgrade'
Azure DevOpsManual dispatchms.vss-pipelines.run-state-changed-eventresource.pipeline.name=='package-upgrade-scan'

Each execution block in rules.json follows this top-level shape:

FieldPurpose
nameHuman-readable id for the execution
platform"github" or "azuredevops" — drives which provider the plugin uses
repository.urlWebhook path to the repository URL (e.g. repository.clone_url, resource.repository.remoteUrl)
repository.refWebhook path to the default branch ref to scan
match-anyArray of trigger filters — first one to match wins. Schedule-driven scans use synthetic webhook events.
use-inputsMinimal — no entry-point id is needed for a whole-repo scan, so this can be empty.
use-pluginsThe plugin to invoke
with-envsRequired environment variables, sourced from the agent’s secrets.* store and marked mandatory: true
execute-promptThe prompt sent to the agent. Implicit interpolations: {{repository-name}} and {{git-ref}} from the repository block
{
"name": "github-package-upgrade-scan",
"platform": "github",
"repository": {
"url": "repository.clone_url",
"ref": "repository.default_branch"
},
"match-any": [
{
"name": "github-package-upgrade-scheduled",
"rule": "event_type=='scheduled-package-upgrade'"
},
{
"name": "github-package-upgrade-manual",
"rule": "event_type=='workflow_dispatch'&&inputs.scanner=='package-upgrade'"
}
],
"use-inputs": [],
"use-plugins": [
{
"plugin-name": "package-dependency-upgrade-agent@xianix-plugins-official",
"marketplace": "xianix-team/plugins-official"
}
],
"with-envs": [
{ "name": "GITHUB-TOKEN", "value": "secrets.GITHUB-TOKEN", "mandatory": true }
],
"execute-prompt": "Scheduled Package Dependency Upgrade scan for {{repository-name}} (default branch: {{git-ref}}).\n\nRun /package-upgrade-scan to analyze dependencies, propose upgrades, and open a pull request with the recommendations."
}
{
"name": "azuredevops-package-upgrade-scan",
"platform": "azuredevops",
"repository": {
"url": "resource.repository.remoteUrl",
"ref": "resource.repository.defaultBranch"
},
"match-any": [
{
"name": "azuredevops-package-upgrade-scheduled",
"rule": "event_type=='scheduled-package-upgrade'"
},
{
"name": "azuredevops-package-upgrade-manual",
"rule": "eventType=='ms.vss-pipelines.run-state-changed-event'&&resource.pipeline.name=='package-upgrade-scan'"
}
],
"use-inputs": [],
"use-plugins": [
{
"plugin-name": "package-dependency-upgrade-agent@xianix-plugins-official",
"marketplace": "xianix-team/plugins-official"
}
],
"with-envs": [
{ "name": "AZURE-DEVOPS-TOKEN", "value": "secrets.AZURE-DEVOPS-TOKEN", "mandatory": true }
],
"execute-prompt": "Scheduled Package Dependency Upgrade scan for {{repository-name}} (default branch: {{git-ref}}).\n\nRun /package-upgrade-scan to analyze dependencies, propose upgrades, and open a pull request with the recommendations."
}