by dagss · 4mo ago · 0 comments
With the long waits for agents to do stuff I really don't see how one can get anything done without multitasking with multiple worktrees in parallel. So I'd want support for listing the worktrees and then have a list of agents within each worktree.
Emdash and Nimbalyst have this kind of UI. Unfortunately both of them want to manage the state of each worktree group themselves; I'm looking for something that just would just call git worktree directly so that I can switch more seamlessly between CLI and IDE/TUI..
https://gist.github.com/iaindooley/cc8a61a1ff0fe23526c850906...
You include a script .worktree in your repo that does any copying or symlinking to setup the target directory.
It also has a headless mode so that it does the worktree operations without the tmux which I use for executing pi -p prompts in worktrees.
How do you manage that? How do you successfully navigate complex merges using ai?
But I do have many years of experience working in a larger team and it's the same problem there (just that people want to merge after some days of working). I'm not sure if AI changes the picture much vs working in a team.
Either way one has to plan ahead a bit and select tasks that are not going to trample on each other. I can typically imagine roughly what the code generated is going to be (at least what files will likely be involved in what way) and when selecting tasks to work on I take into account if it's going to likely cause conflicts.
In my experience if different branches work on different things, Claude have no issue doing "trivial" merges where you just ended up changing different aspects of the same lines. Of course, if two branches rewrite the same pieces of code there's a problem -- so don't do that..
echo “resolve conflicts” | runpi
Where runpi is my pi -p wrapper. I’ve never had a regression from it, but it gives me a report at the end so I can double check the decisions if I need to.
The skill is basically don’t use automatic resolvers, err on the side of including both sides, refer to recent commits, missions and runfiles for context and in your report to me use real branch names not HEAD and incoming because I can never remember what those refer to.
But I think git worktrees are a bit more ergonomic, I don't have to think about local vs upstream there's just one place to push.
I like to organize my projects like this:
myproject/.repo/git # bare repository .. my own convention..
myproject/main # worktrees from ../.repo/git
myproject/feature1
myproject/feature2So, I no longer use worktrees, and just copy and existing/clone a new folder.
I think all my problems go away with jujustu.