upgrade

A maintenance guide for updating pinned project dependencies and related components. Pinned means each dependency is locked to a specific reviewed version or commit.

In plain words
What is it for?
Use it when upgrading Python packages, GitHub Actions, scanner images, OpenGrep, or referenced submodules in projects based on the template.
Why use it?
It explains how to update generated lockfiles safely without editing them directly or accidentally using unreviewed, floating versions.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/atebites-hub/pjtemplate/upgrade
Clone the repo
git clone --depth 1 https://github.com/atebites-hub/PJTemplate
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,033 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02033
Opus 5 $0.00000 $0.01017
Sonnet 5 $0.00000 $0.00407
Haiku 4.5 $0.00000 $0.00203

Measured 2d ago against content hash bec8ee40bad7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

upgrade scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

TOKEN="$(curl -s "https://ghcr.io/token?scope=repository:aquasecurity/trivy:pull" \
docs/agents/upgrade.md · 191 lines

How it starts

The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Upgrade & Maintenance Guide

Purpose. How to refresh this template's pinned artifacts (deps, actions, scanner images, the ODW and J-Space submodules) and how a project derived from this template pulls in upstream template fixes. This is a process doc, not one of the 10 core documents.

One rule above all: everything is pinned (Python deps by hash, GitHub Actions by commit SHA, scanner containers by image digest, OpenGrep by SHA-256, ODW and J-Space by submodule commit). An upgrade is a deliberate, reviewed pin rotation — never a floating reference.


1. Python dependencies

Lockfiles (requirements.txt, requirements-dev.txt, requirements-notebooks.txt) are compiled from the .in sources with hashes. Never edit a .txt directly; bump the .in and re-compile.

# Edit the source pins (e.g. bump a floor, add a dep) in requirements*.in,
# then regenerate every lockfile WITH hashes from a clean Python 3.12 env:
pip-compile --generate-hashes --allow-unsafe --resolver=backtracking \
  requirements.in -o requirements.txt
pip-compile --generate-hashes --allow-unsafe --resolver=backtracking \
  requirements-dev.in -o requirements-dev.txt
pip-compile --generate-hashes --allow-unsafe --resolver=backtracking \
  requirements-notebooks.in -o requirements-notebooks.txt

The [tool.pip-tools] block in pyproject.toml already sets those flags, so a bare pip-compile requirements.in honors them. Track CVE floors with comments in the .in files (e.g. # CVE-2026-XXXX fixed in >=X.Y.Z).

Verify before committing:

python -m pip install --require-hashes -r requirements-dev.txt && python -m pip check
./scripts/security/supply-chain-audit.sh   # pip-audit + OSV-Scanner over BOTH lockfiles

Dependabot does NOT do this. .github/dependabot.yml excludes the pip ecosystem on purpose — Dependabot mutates the compiled .txt directly and fights --require-hashes. Python bumps are always the manual .inpip-compile flow above.

Read the full file on GitHub · 191 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 191 lines · 0 tokens per session scan A bec8ee40bad7

Subscribe to this mod's changes

upgrade is an agent published in the GitHub repository atebites-hub/PJTemplate (2 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,033 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.