Place performance climb's worktrees under the configured worktree root

Open Beginner friendly
#20,541 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
git, github, shell

Research direction

Read plugins/performance/skills/climb/SKILL.md, especially “Set up, before the first attempt” item 3 and the cleanup at line 159, alongside plugins/source-control/reference/worktree-root-convention.md. Update setup and cleanup so both worktrees use the configured root, falling back to the system temp directory when unset, and remove the ignored-directory placement option. Add a versioned entry to plugins/performance/CHANGELOG.md and bump the plugin version; done means setup passes the containment gate and cleanup targets those worktrees.

Written by the indexing model from the issue text.

Description

needs-owner-decision

Steps to reproduce

  1. Enable both performance and source-control (its worktree-add-containment-gate.sh hook is on by default).
  2. Run /performance:climb and let it follow plugins/performance/skills/climb/SKILL.md:52-58, which allows its two worktrees "outside your checkout or in a directory its .gitignore ignores", for example <checkout>/.work/climb-a.
  3. The skill runs git worktree add -b climb/<goal-slug> <climb-path> <start-sha> with that in-checkout path.

Expected behavior

climb places both worktrees where the session's worktree convention says, by default under the root the worktreeroot.path git key names, and the setup step succeeds.

Actual behavior

The containment gate blocks the command: plugins/source-control/hooks/worktree-add-containment-gate.sh (repo_enclosing and check_segment) blocks any git worktree add target that resolves inside a git working tree, and it has no exemption for an ignored directory (no ignore handling anywhere in the hook). So one of the two placements climb offers is always denied when source-control is enabled. Even the allowed placement ("outside your checkout") leaves the location to the model, so worktrees land outside the user's configured root.

Verified this pass by reading both files on origin/main; not reproduced in a live session (no live probe was run).

Severity

Medium.

Severity justification

climb's setup step fails or improvises its worktree location for every user with source-control enabled; no data is at risk.

Suggested fix location

plugins/performance/skills/climb/SKILL.md, "Set up, before the first attempt", item 3, and the cleanup at :159.

  • Resolve the root as git -C <checkout> config --get-all --type=path worktreeroot.path | tail -n 1 (gate on rev-parse --git-dir; never scope the read without --includes), citing plugins/source-control/reference/worktree-root-convention.md by pointer. Put both worktrees under it. With the key unset, fall back to the system temp directory, never the checkout.
  • Drop "or in a directory its .gitignore ignores".
  • Owner decision (needs-decision): the audit (2026-12-01 prompt audit, claude-api prompt-audit procedure, verifier upheld as a flag) also asked to let the user name an existing or pinned branch instead of always creating climb/<goal-slug>. The skill has a real reason for its own branch (:54, :82, :194: it is the verify target), so this is a choice, not a defect. Recommendation (judgment): keep climb/<goal-slug> as the default; add a branch argument only if a user asks again.
  • Add a versioned plugins/performance/CHANGELOG.md entry and bump the plugin version per the repository's release convention.

Left out: the Low lane flag on "A copy of ratchet.py from before plugin 0.5.0 exits 2" (skills/protect/SKILL.md:39-41, skills/snapshot/SKILL.md:119-120). It concerns this plugin's own vendored copies, not an upstream fact, and still guides a user with an old copy.

Environment

Read on melodic-software/claude-code-plugins origin/main, 2026-12-02. Audit target was performance 0.17.11. Related: the same worktree-root gap in instruction-placement, #20540. Source: local handoff item 20261201-165522-performance-prompt-audit-findings.md (retired into this issue).

Dominant language
Shell
Stars
22
Forks
2
Avg merge
1h 54m
Merged PRs (30d)
938

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from melodic-software/claude-code-plugins

All issues in melodic-software/claude-code-plugins

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.