mirror of
https://github.com/obra/superpowers.git
synced 2026-04-23 01:49:04 +08:00
fix: treat direct worktree skill invocation as consent (PRI-974)
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>
This commit is contained in:
@@ -48,7 +48,9 @@ echo "Current branch: $BRANCH"
|
|||||||
echo "Repository: $(basename "$(git rev-parse --show-toplevel)")"
|
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?"
|
> "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)
|
- Create worktree without verifying it's ignored (project-local)
|
||||||
- Skip baseline test verification
|
- Skip baseline test verification
|
||||||
- Proceed with failing tests without asking
|
- 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:**
|
**Always:**
|
||||||
- Run Step 1 detection first
|
- Run Step 1 detection first
|
||||||
@@ -256,9 +258,9 @@ Ready to implement <feature-name>
|
|||||||
## Integration
|
## Integration
|
||||||
|
|
||||||
**Called by:**
|
**Called by:**
|
||||||
- **subagent-driven-development** - Ensures isolated workspace (creates one or verifies existing)
|
- **subagent-driven-development** - Calls this to detect the workspace and optionally set up worktree isolation on request
|
||||||
- **executing-plans** - Ensures isolated workspace (creates one or verifies existing)
|
- **executing-plans** - Calls this to detect the workspace and optionally set up worktree isolation on request
|
||||||
- Any skill needing isolated workspace
|
- Any skill that may use worktree isolation
|
||||||
|
|
||||||
**Pairs with:**
|
**Pairs with:**
|
||||||
- **finishing-a-development-branch** - REQUIRED for cleanup after work complete
|
- **finishing-a-development-branch** - REQUIRED for cleanup after work complete
|
||||||
|
|||||||
Reference in New Issue
Block a user