diff --git a/skills/using-git-worktrees/SKILL.md b/skills/using-git-worktrees/SKILL.md index eb27d447..73176a47 100644 --- a/skills/using-git-worktrees/SKILL.md +++ b/skills/using-git-worktrees/SKILL.md @@ -36,13 +36,20 @@ Report with branch state: - On a branch: "Already in isolated workspace at `` on branch ``." - Detached HEAD: "Already in isolated workspace at `` (detached HEAD, externally managed). Branch creation needed at finish time." -**If `GIT_DIR == GIT_COMMON` (or in a submodule):** You are in a normal repo checkout. +**If `GIT_DIR == GIT_COMMON` (or in a submodule):** You are in a normal repo checkout. Proceed to Step 0.5. -Has the user already indicated their worktree preference in your instructions? If not, ask for consent before creating a worktree: +## Step 0.5: Consent — REQUIRED STOP -> "Would you like me to set up an isolated worktree? It protects your current branch from changes." +**You MUST ask the user before creating any workspace. Do NOT proceed to Step 1 without an answer.** -Honor any existing declared preference without asking. If the user declines consent, work in place and skip to Step 3. +Output exactly this, then STOP and wait for a response: + +> "I can set up an isolated worktree for this work, or work directly on your current branch. Which do you prefer?" + +- **User wants a worktree** → proceed to Step 1 +- **User wants to work in place** → skip to Step 3 (no worktree, no directory change) + +Do NOT interpret silence or an unrelated reply as consent. If unclear, ask once more. ## Step 1: Create Isolated Workspace