From 2079ee7f90d02a25d293396d5373a807ff6a44c6 Mon Sep 17 00:00:00 2001 From: Drew Ritter Date: Tue, 7 Apr 2026 16:48:51 -0700 Subject: [PATCH] fix: promote consent to own Step 0.5 with structural enforcement (PRI-974) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drill benchmark showed 0/4 consent compliance across both Claude Code and Codex. Root cause: consent was buried inline in Step 0's conditional branch. Agents anchor on the next bash command and skip prose. Fix: promote consent to its own numbered section with imperative framing ("REQUIRED STOP", "Do NOT proceed without an answer") and exact output template. Also adds explicit "no" path — users who want to work directly on their current branch skip to Step 3 with no worktree creation. Co-Authored-By: Claude Opus 4.6 (1M context) --- skills/using-git-worktrees/SKILL.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/skills/using-git-worktrees/SKILL.md b/skills/using-git-worktrees/SKILL.md index 29faaab2..9e9fe2c5 100644 --- a/skills/using-git-worktrees/SKILL.md +++ b/skills/using-git-worktrees/SKILL.md @@ -36,11 +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. Ask for consent before creating a workspace: +**If `GIT_DIR == GIT_COMMON` (or in a submodule):** You are in a normal repo checkout. Proceed to Step 0.5. -> "Would you like me to set up an isolated worktree? This protects your current branch from changes. (y/n)" +## Step 0.5: Consent — REQUIRED STOP -If yes, proceed to Step 1. If no, work in place — skip to Step 3 with no worktree. +**You MUST ask the user before creating any workspace. Do NOT proceed to Step 1 without an answer.** + +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