You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started recently using Superpowers, and I find it very powerful. The only issue I have is that, most of the time, Claude works on its own without creating a worktree, and I have to manually mention that it should create one to work on something, mostly when using systematic debugging.
Traditionally, auto-creation of worktrees happens as part of the brainstorming and planning process. I can see the argument for doing it during a debugging session when the debugging isn't part of an implementation plan, but I'm having a little trouble putting into words the exact right way to explain that to Claude. Thoughts?
Rule: Claude must create a worktree before modifying any file.
Conversation starts → No worktree (exploration, questions, reading code)
↓
About to modify file(s) → Check: Already in worktree?
↓
┌────┴────┐
│ │
YES NO
│ │
↓ ↓
Proceed Invoke `superpowers:using-git-worktrees`
with Create worktree → Copy env files → Then modify
edits
Detection: Check if current working directory path contains /.worktrees/.
# Example: When in worktree, cwd is:# /Users/.../peak-health/.worktrees/feat-name ← contains /.worktrees/pwd| grep -q '/.worktrees/'&&echo"In worktree"||echo"In main"
And it works fairly well, also for sure it can be improved
Closing as stale. As of v5.0, you can add instructions to your CLAUDE.md to customize when worktrees are created (e.g., "always create a worktree before modifying files"). If this is still a pain point, feel free to reopen.
Activity
coderabbitai commentedon Dec 23, 2025
📝 CodeRabbit Plan Mode
Generate an implementation plan and prompts that you can use with your favorite coding agent.
Examples
🔗 Similar Issues
Possible Duplicates
Related Issues
👤 Suggested Assignees
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord or schedule a call!
obra commentedon Dec 24, 2025
Traditionally, auto-creation of worktrees happens as part of the brainstorming and planning process. I can see the argument for doing it during a debugging session when the debugging isn't part of an implementation plan, but I'm having a little trouble putting into words the exact right way to explain that to Claude. Thoughts?
[-]Doubt: When a worktree is created?[/-][+]Worktrees for debugging[/+]erikpr1994 commentedon Dec 24, 2025
I have right now something like:
Auto-Worktree Behavior
Rule: Claude must create a worktree before modifying any file.
Detection: Check if current working directory path contains
/.worktrees/.pySilver commentedon Jan 20, 2026
@erikpr1994 where did you place that rule?
fix(skills): restore worktree step in brainstorming workflow
feat(using-git-worktrees): rework to layer on native EnterWorktree
feat(systematic-debugging): improve CSO, add fork and worktree support
feat(using-git-worktrees): rework to layer on native EnterWorktree
feat(systematic-debugging): improve CSO, add fork and worktree support
fix(skills): restore worktree step in brainstorming workflow
feat(using-git-worktrees): rework to layer on native EnterWorktree
feat(systematic-debugging): improve CSO, add fork and worktree support
fix(skills): restore worktree step in brainstorming workflow
obra commentedon Mar 10, 2026
Closing as stale. As of v5.0, you can add instructions to your CLAUDE.md to customize when worktrees are created (e.g., "always create a worktree before modifying files"). If this is still a pain point, feel free to reopen.
— Claude Opus 4.6, Claude Code 2.1.72
fix(skills): restore worktree step in brainstorming workflow
fix(skills): restore worktree step in brainstorming workflow
fix(skills): restore worktree step in brainstorming workflow
fix(skills): restore worktree step in brainstorming workflow
fix(skills): restore worktree step in brainstorming workflow
fix(skills): restore worktree step in brainstorming workflow
fix(skills): restore worktree step in brainstorming workflow
fix(skills): restore worktree step in brainstorming workflow
fix(skills): restore worktree step in brainstorming workflow
fix(skills): restore worktree step in brainstorming workflow