fix(cli): repair partial Claude skill copies during init (ENG-1555)
What
e2e init restores a missing Claude SKILL.md and writes its CLAUDE.md
pointer when pnpm already links the skill in .agents/skills. The pnpm link
and files added to the Claude copy stay in place. A member with a partial
copy can also repair it when init finds the pnpm link at its workspace root.
Why
The check for an existing copy required SKILL.md, so it skipped the
directory that needed repair and told users to create it.
How it works
- Use the existing skill directory check to find copies eligible for repair.
When a package link is in the same directory, require a loadable skill
before refreshing the copy. Seepackages/e2e/src/cli/init.ts:375.
Issue
ENG-1555
Verified
Ran it locally: yes. I ran the issue's fixture with the built CLI on main
7e733376e and this branch.
e2e init --yes --engine none --gateway none --skills .claude/skills --mcp none --no-install
| Check | main | this PR |
|---|---|---|
Claude copy missing SKILL.md | Skill and pointer missing | Skill and pointer restored |
| pnpm link and project note | Preserved | Preserved |
| Fresh Claude directory with a package link elsewhere | No new copy | No new copy |
| Partial Claude copy beside a pnpm link in the same directory | No duplicate created | No duplicate created |
| Partial member copy with a pnpm link at the detected workspace root | Skill and pointer missing | Skill and pointer restored |
Updated .claude/skills/e2e/ (9 files)
Created CLAUDE.md (e2e skill pointer)
The package suite at 4ab34ec86 had one failure in
parallel-workers.test.ts for a test that blocks its worker. The expected
runner exit code was 1 and the observed code was 3. That test passed in
isolation on the base and the final candidate.
VHS was unavailable for the terminal recording. The docs change is text-only. I verified it via the workspace and
same-directory checks and the docs gate, without a rendered screenshot.