mirror of
https://github.com/obra/superpowers.git
synced 2026-04-27 03:59:04 +08:00
Compare commits
9 Commits
72dd30d653
...
feat-add-m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b205cf0e1 | ||
|
|
884b1a5960 | ||
|
|
018f3675e5 | ||
|
|
7c4597af34 | ||
|
|
b0e08a497f | ||
|
|
ddbba8e469 | ||
|
|
f0728841d8 | ||
|
|
e3dd3b4c5a | ||
|
|
e4a15b6d52 |
@@ -251,7 +251,7 @@ Report with branch state:
|
|||||||
|
|
||||||
**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.
|
||||||
|
|
||||||
If the user has not already made their preferences about worktree isolation clear — check global and project agent instruction files (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.cursorrules`, or equivalent) — ask for consent before creating a worktree:
|
Has the user already indicated their worktree preference in your instructions? If not, ask for consent before creating a worktree:
|
||||||
|
|
||||||
> "Would you like me to set up an isolated worktree? It protects your current branch from changes."
|
> "Would you like me to set up an isolated worktree? It protects your current branch from changes."
|
||||||
|
|
||||||
@@ -289,7 +289,7 @@ Follow this priority order:
|
|||||||
```
|
```
|
||||||
If found, use it (backward compatibility with legacy global path).
|
If found, use it (backward compatibility with legacy global path).
|
||||||
|
|
||||||
3. **Check your project's agent instruction file** (CLAUDE.md, GEMINI.md, AGENTS.md, .cursorrules, or equivalent) for a worktree directory preference. If specified, use it without asking.
|
3. **Check your instructions for a worktree directory preference.** If specified, use it without asking.
|
||||||
|
|
||||||
4. **Default to `.worktrees/`.**
|
4. **Default to `.worktrees/`.**
|
||||||
|
|
||||||
|
|||||||
@@ -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?"
|
||||||
|
|
||||||
@@ -82,7 +84,7 @@ Only proceed to Step 3b if you have no native worktree tool available.
|
|||||||
|
|
||||||
Follow this priority order. Explicit user preference always beats observed filesystem state.
|
Follow this priority order. Explicit user preference always beats observed filesystem state.
|
||||||
|
|
||||||
1. **Check global and project agent instruction files** (`~/.claude/CLAUDE.md`, `~/.config/gemini/AGENTS.md`, project-level `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.cursorrules`, or equivalent) for a declared worktree directory preference. If specified, use it without asking.
|
1. **Check your instructions for a declared worktree directory preference.** If the user has already specified one, use it without asking.
|
||||||
|
|
||||||
2. **Check for an existing project-local worktree directory:**
|
2. **Check for an existing project-local worktree directory:**
|
||||||
```bash
|
```bash
|
||||||
@@ -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