Jelajahi Sumber

fix: promote consent to own Step 0.5 with structural enforcement (PRI-974)

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) <noreply@anthropic.com>
Drew Ritter 6 bulan lalu
induk
melakukan
b0e08a497f
1 mengubah file dengan 11 tambahan dan 4 penghapusan
  1. 11 4
      skills/using-git-worktrees/SKILL.md

+ 11 - 4
skills/using-git-worktrees/SKILL.md

@@ -36,13 +36,20 @@ Report with branch state:
 - On a branch: "Already in isolated workspace at `<path>` on branch `<name>`."
 - Detached HEAD: "Already in isolated workspace at `<path>` (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