From a391e37714a897abe93eb284897c401d2d2f0185 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Tue, 7 Jul 2026 22:40:29 +0200 Subject: [PATCH] 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 --- .claude/skills/whats-next/SKILL.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.claude/skills/whats-next/SKILL.md b/.claude/skills/whats-next/SKILL.md index 444fc224d..87c435a42 100644 --- a/.claude/skills/whats-next/SKILL.md +++ b/.claude/skills/whats-next/SKILL.md @@ -188,9 +188,14 @@ git checkout -b 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/" +WORKTREE_DIR="$REPO_ROOT/.worktrees/" git worktree add "$WORKTREE_DIR" ```