summaryrefslogtreecommitdiff
path: root/skills/using-git-worktrees
diff options
context:
space:
mode:
authorDrew Ritter <drew@ritter.dev>2026-05-12 10:24:45 -0700
committerDrew Ritter <drew@primeradiant.com>2026-06-16 10:09:43 -0700
commitd00f4ad4428e99db18619e077b99340fb7158f2f (patch)
tree364e80106ee1de5e506f3a7b75c569173c7c3ad9 /skills/using-git-worktrees
parentce95985094fdf12cf32b9f77e6439bfc9140c9c6 (diff)
fix: remove global worktree path fallback (#1476)
Diffstat (limited to 'skills/using-git-worktrees')
-rw-r--r--skills/using-git-worktrees/SKILL.md21
1 files changed, 4 insertions, 17 deletions
diff --git a/skills/using-git-worktrees/SKILL.md b/skills/using-git-worktrees/SKILL.md
index 3697a43..212c569 100644
--- a/skills/using-git-worktrees/SKILL.md
+++ b/skills/using-git-worktrees/SKILL.md
@@ -73,14 +73,7 @@ Follow this priority order. Explicit user preference always beats observed files
```
If found, use it. If both exist, `.worktrees` wins.
-3. **Check for an existing global directory:**
- ```bash
- project=$(basename "$(git rev-parse --show-toplevel)")
- ls -d ~/.config/superpowers/worktrees/$project 2>/dev/null
- ```
- If found, use it (backward compatibility with legacy global path).
-
-4. **If there is no other guidance available**, default to `.worktrees/` at the project root.
+3. **If there is no other guidance available**, default to `.worktrees/` at the project root.
#### Safety Verification (project-local directories only)
@@ -94,16 +87,11 @@ git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/d
**Why critical:** Prevents accidentally committing worktree contents to repository.
-Global directories (`~/.config/superpowers/worktrees/`) need no verification.
-
#### Create the Worktree
```bash
-project=$(basename "$(git rev-parse --show-toplevel)")
-
# Determine path based on chosen location
-# For project-local: path="$LOCATION/$BRANCH_NAME"
-# For global: path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
+path="$LOCATION/$BRANCH_NAME"
git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"
@@ -163,7 +151,6 @@ Ready to implement <feature-name>
| `worktrees/` exists | Use it (verify ignored) |
| Both exist | Use `.worktrees/` |
| Neither exists | Check instruction file, then default `.worktrees/` |
-| Global path exists | Use it (backward compat) |
| Directory not ignored | Add to .gitignore + commit |
| Permission error on create | Sandbox fallback, work in place |
| Tests fail during baseline | Report failures + ask |
@@ -189,7 +176,7 @@ Ready to implement <feature-name>
### Assuming directory location
- **Problem:** Creates inconsistency, violates project conventions
-- **Fix:** Follow priority: existing > global legacy > instruction file > default
+- **Fix:** Follow priority: explicit instructions > existing project-local directory > default
### Proceeding with failing tests
@@ -209,7 +196,7 @@ Ready to implement <feature-name>
**Always:**
- Run Step 0 detection first
- Prefer native tools over git fallback
-- Follow directory priority: existing > global legacy > instruction file > default
+- Follow directory priority: explicit instructions > existing project-local directory > default
- Verify directory is ignored for project-local
- Auto-detect and run project setup
- Verify clean test baseline