-
Notifications
You must be signed in to change notification settings - Fork 5
docs: add Worktrunk as recommended worktree tool #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -57,7 +57,7 @@ The result: AI agents that work *with* your development process, not around it. | |||||||
| [](https://github.com/marcusquinn/aidevops/commits/main) | ||||||||
|
|
||||||||
| <!-- Repository Stats --> | ||||||||
| [](https://github.com/marcusquinn/aidevops/releases) | ||||||||
| [](https://github.com/marcusquinn/aidevops/releases) | ||||||||
| [](https://github.com/marcusquinn/aidevops) | ||||||||
| [](https://github.com/marcusquinn/aidevops) | ||||||||
| [](https://github.com/marcusquinn/aidevops) | ||||||||
|
|
@@ -1144,29 +1144,44 @@ See `.agent/scripts/commands/full-loop.md` for complete documentation. | |||||||
|
|
||||||||
| Work on multiple branches simultaneously without stashing or switching. Each branch gets its own directory. | ||||||||
|
|
||||||||
| **Quick usage:** | ||||||||
| **Recommended: [Worktrunk](https://worktrunk.dev)** (`wt`) - Git worktree management with shell integration, CI status, and PR links: | ||||||||
|
|
||||||||
| ```bash | ||||||||
| # Create worktree for a new branch | ||||||||
| ~/.aidevops/agents/scripts/worktree-helper.sh add feature/my-feature | ||||||||
| # Creates: ~/Git/aidevops-feature-my-feature/ | ||||||||
| # Install (macOS/Linux) | ||||||||
| brew install max-sixty/worktrunk/wt && wt config shell install | ||||||||
| # Restart your shell for shell integration to take effect | ||||||||
|
|
||||||||
| # List all worktrees | ||||||||
| ~/.aidevops/agents/scripts/worktree-helper.sh list | ||||||||
| # Create worktree + cd into it | ||||||||
| wt switch -c feature/my-feature | ||||||||
|
|
||||||||
| # Create worktree + start any AI CLI (-x runs command after switch) | ||||||||
| wt switch -c -x claude feature/ai-task | ||||||||
|
|
||||||||
| # List worktrees with CI status and PR links | ||||||||
| wt list | ||||||||
|
|
||||||||
| # Merge + cleanup (squash/rebase options) | ||||||||
| wt merge | ||||||||
| ``` | ||||||||
|
|
||||||||
| **Fallback** (no dependencies): | ||||||||
|
|
||||||||
| # Clean up after merge | ||||||||
| ```bash | ||||||||
| ~/.aidevops/agents/scripts/worktree-helper.sh add feature/my-feature | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous version of the documentation included a helpful comment indicating the path where the worktree is created (e.g.,
Suggested change
|
||||||||
| # Creates: ~/Git/{repo}-feature-my-feature/ (cd there manually) | ||||||||
| ~/.aidevops/agents/scripts/worktree-helper.sh list | ||||||||
| ~/.aidevops/agents/scripts/worktree-helper.sh clean | ||||||||
| ``` | ||||||||
|
|
||||||||
| **Benefits:** | ||||||||
| - Run tests on one branch while coding on another | ||||||||
| - Compare implementations side-by-side | ||||||||
| - No context switching or stash management | ||||||||
| - Each OpenCode session can work on a different branch | ||||||||
| - Each AI session can work on a different branch | ||||||||
|
|
||||||||
| **Worktree-first workflow:** The pre-edit check now **enforces** worktrees as the default when creating branches, keeping your main directory on `main`. This prevents uncommitted changes from blocking branch switches and ensures parallel sessions don't inherit wrong branch state. | ||||||||
|
|
||||||||
| See `.agent/workflows/worktree.md` for the complete guide. | ||||||||
| See `.agent/workflows/worktree.md` for the complete guide and `.agent/tools/git/worktrunk.md` for Worktrunk documentation. | ||||||||
|
|
||||||||
| ### Session Management - Parallel AI Sessions | ||||||||
|
|
||||||||
|
|
@@ -1190,9 +1205,11 @@ opencode --non-interactive --prompt "Continue with feature X" & | |||||||
| # New terminal tab (macOS) | ||||||||
| osascript -e 'tell application "Terminal" to do script "cd ~/Git/project && opencode"' | ||||||||
|
|
||||||||
| # Worktree-based (isolated branch) | ||||||||
| ~/.aidevops/agents/scripts/worktree-helper.sh add feature/next-feature | ||||||||
| cd ../project-feature-next-feature && opencode | ||||||||
| # Worktree-based (isolated branch) - recommended | ||||||||
| wt switch -c -x opencode feature/next-feature # Worktrunk: create + start AI CLI | ||||||||
| # Or fallback: | ||||||||
| # ~/.aidevops/agents/scripts/worktree-helper.sh add feature/next-feature | ||||||||
| # cd ~/Git/{repo}-feature-next-feature && opencode | ||||||||
| ``` | ||||||||
|
|
||||||||
| **Session handoff pattern:** | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the shell integration from
wt config shell installto take effect, the user needs to restart their shell. It would be helpful to add a comment mentioning this to improve the user experience.