fix(skills): whats-next creates worktrees under the repo root (.worktrees/), not the parent dir
The parent-dir pattern put worktrees outside the permission sandbox, breaking agent file access. .gitignore already documented the in-repo convention; the skill predated it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -188,9 +188,14 @@ git checkout -b <branch-name>
|
||||
|
||||
If the user wants to work in a separate worktree:
|
||||
|
||||
Worktrees live **inside the repo** under the gitignored `.worktrees/` directory
|
||||
(see `.gitignore` — "created under the repo root"). Never place them in the repo's
|
||||
parent directory: paths outside the repo are outside the permission sandbox and
|
||||
break agent file access.
|
||||
|
||||
```bash
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
WORKTREE_DIR="$(dirname "$REPO_ROOT")/.worktrees/<branch-name>"
|
||||
WORKTREE_DIR="$REPO_ROOT/.worktrees/<branch-name>"
|
||||
git worktree add "$WORKTREE_DIR" <branch-name>
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user