An agent's description of a dependency change is generated text, so it can be plausible and still wrong about what it did. The reviewer's first job is to get a small set of facts that the description cannot distort. Three commands give you those facts in under a minute.
The first is a count of changed lockfile entries. A single bump to a popular package can resolve to new versions of several transitive packages at once, and the diff shows each one as a separate record. Count the added records and you know immediately whether you are reviewing one change or thirty.
The second is a resolved tree query. It answers "who depends on this" and "how many copies are installed." Both matter: a package you never chose, arriving two levels deep, is a supply chain decision you did not make consciously.
The third is a read of the package manifest for install-time hooks. Package managers run certain scripts automatically during install, which means they execute before your tests, your linter or your review ever touch the code.
# 1. How many lockfile records does this change add or remove?
git diff --stat origin/main...HEAD -- 'package-lock.json' 'pnpm-lock.yaml' 'yarn.lock' 'poetry.lock' 'uv.lock'
# 2. Who pulled it in, and are there duplicates?
npm ls <package-name>
# or, for a Python project
pip show <package-name>
# 3. Does it run anything at install time?
node -e "const m=require('./node_modules/<package-name>/package.json');console.log(m.scripts)"
The file list comes before all of this. Pull the changed paths with a name-only diff, because agents routinely edit files the request never named, and the Open Worldwide Application Security Project (OWASP) secure coding with AI cheat sheet calls unnoticed out-of-scope edits the most common review failure mode in agentic coding, as SpecStory's review checklist summarizes. If the lockfile changed but no manifest did, or the reverse, stop and ask why before reading further.



