feat(cli): e2e upgrade updates the agent skill copies
Merged
KA
20d ago+247+247+012345678901234567890123456789-30-30-01234567890123456789
e2e upgrade used to finish with "The agent skill in .agents/skills/e2e is the old version's; refresh it with e2e init". Now it updates the copies itself.
- After the install, it reads the skill from
node_modules/e2e/skills/e2e, the new version's. The process running the upgrade is still the old e2e, so its own bundled skill would be the wrong source (refreshSkillsinpackages/e2e/src/cli/upgrade.ts). - Writes go through
init'splanSkillInstall: a copy that already matches is left alone, files the new skill no longer ships stay, a symlink out of the project and an entry a write cannot pass are named and never written through. .claude/skills/e2eas the symlinkinitwrites is covered by updating.agents/skills/e2e, so it isn't reported (skillCopies).- "Already up to date" also refreshes a stale copy, for someone who upgraded with their package manager.
--dry-runnames the copies: on a version change the ones a write would reach, on the up-to-date path the ones that actually differ from the installed skill.- A copy that can't be written prints a warning naming
e2e init; the upgrade still exits 0, since the packages are installed by then. - Yarn Plug'n'Play has no
node_modulesto read, so it falls back to the old hint. readSkillFiles()inpackages/e2e/src/cli/skill.tstakes an optional directory.
$ npx e2e upgrade
Upgrading with npm:
e2e 0.20.0 → 0.21.3
package.json: "e2e": "0.21.3"
$ npm install
...
Upgraded: e2e 0.21.3
Release notes: https://github.com/tester-army/e2e/releases/tag/e2e%400.21.3
Updated the agent skill in .agents/skills/e2e/ (9 files)
Verified
Ran it locally: yes
- Scratch npm project with
e2e@0.20.0from npm, a stale.agents/skills/e2e/SKILL.md, and.claude/skills/e2e -> ../../.agents/skills/e2e, driven by the builtpackages/e2e/dist/cli/bin.jsagainst the real registry:
$ e2e upgrade --dry-run
Would upgrade with npm:
e2e 0.20.0 → 0.21.3
package.json: "e2e": "0.21.3"
$ npm install
then the agent skill in .agents/skills/e2e from the new e2e
$ e2e upgrade
...
Upgraded: e2e 0.21.3
Release notes: https://github.com/tester-army/e2e/releases/tag/e2e%400.21.3
Updated the agent skill in .agents/skills/e2e/ (9 files)
$ diff -r .agents/skills/e2e node_modules/e2e/skills/e2e && echo identical
identical
$ ls -l .claude/skills
e2e -> ../../.agents/skills/e2e
# made SKILL.md stale again, packages current
$ e2e upgrade --dry-run
Already up to date: e2e 0.21.3
Would update the agent skill in .agents/skills/e2e/
$ e2e upgrade
Already up to date: e2e 0.21.3
Updated the agent skill in .agents/skills/e2e/ (9 files)
$ e2e upgrade
Already up to date: e2e 0.21.3
- Not run locally: the testbed suite. Port 4271 was held by a testbed server from another worktree that I didn't start, so I left it running. This change doesn't reach the runner; CI's testbed job covers it.