summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Ritter <drew@primeradiant.com>2026-04-13 16:09:19 -0700
committerDrew Ritter <drew@primeradiant.com>2026-04-13 16:31:10 -0700
commit884b1a5960f435e670d0a3f1f5246e4a8fd54b24 (patch)
tree2e533be9e1886aafd44349a62f2005837229c078
parent018f3675e5f79467fcb9ebe482e63d85d9dfc711 (diff)
fix: treat direct worktree skill invocation as consent (PRI-974)add-worktree-consent-step
The skill previously required an explicit reply to its "do you want a worktree?" dialogue, which produced obtuse UX when the user invoked the skill by name — agents had to stop and ask "do you want a worktree?" even though the user just asked for the skill whose purpose is worktrees. Loosen Step 2 to recognize the invoking turn as consent: if the user's most recent message named the skill, asked for a worktree, or asked for an isolated workspace, proceed directly to Step 3 without re-prompting. The gate still fires for the transitive case (agent infers isolation from a feature description) — that remains the #991 failure mode. Also trim "or skill invocation" from the anti-inference Red Flag and destale the Integration section now that SDD/executing-plans no longer require a worktree. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-rw-r--r--skills/using-git-worktrees/SKILL.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/skills/using-git-worktrees/SKILL.md b/skills/using-git-worktrees/SKILL.md
index 57a0b19..6d450c4 100644
--- a/skills/using-git-worktrees/SKILL.md
+++ b/skills/using-git-worktrees/SKILL.md
@@ -48,7 +48,9 @@ echo "Current branch: $BRANCH"
echo "Repository: $(basename "$(git rev-parse --show-toplevel)")"
```
-Tell the user their options, then **wait for a reply**:
+**Check the user's most recent message first.** If they already asked for a worktree, named the worktree skill, or asked for an isolated workspace in the message that invoked you, that IS the explicit ask — proceed directly to Step 3 without re-prompting.
+
+Otherwise, tell the user their options and **wait for a reply**:
> "You're on `<branch>` in `<repo>`. I can set up an isolated worktree, or we can work directly here. What do you prefer?"
@@ -241,7 +243,7 @@ Ready to implement <feature-name>
- Create worktree without verifying it's ignored (project-local)
- Skip baseline test verification
- Proceed with failing tests without asking
-- Infer worktree consent from the task description, plan, or skill invocation — only an explicit user reply counts
+- Infer worktree consent from the task description or plan — only an explicit user request counts
**Always:**
- Run Step 1 detection first
@@ -256,9 +258,9 @@ Ready to implement <feature-name>
## Integration
**Called by:**
-- **subagent-driven-development** - Ensures isolated workspace (creates one or verifies existing)
-- **executing-plans** - Ensures isolated workspace (creates one or verifies existing)
-- Any skill needing isolated workspace
+- **subagent-driven-development** - Calls this to detect the workspace and optionally set up worktree isolation on request
+- **executing-plans** - Calls this to detect the workspace and optionally set up worktree isolation on request
+- Any skill that may use worktree isolation
**Pairs with:**
- **finishing-a-development-branch** - REQUIRED for cleanup after work complete