Has anyone tried teaching the agents to use jj or gitbutler-cli to do their ideas of lightweight branches? I keep feeling like that would be a huge win for the multi-branch development I'm doing much more of with agents, but I haven't yet run that experiment.
> Has anyone tried teaching the agents to use jj or gitbutler-cli to do their ideas of lightweight branches?
This is very trivial if your coding agents supports hooks like Pi. I have demo repo that goes over how rules work at https://github.com/gitsense/gsc-rules-demos
The basic idea is, you always ensure you inject the instructions for how to use jj or any other scm. LLMs are pattern matchers and they can fully map behaviour, but due to heavy training on git, they can forget.
With hooks, you can easy detect when 'git' is used and basically tell the agent "As stated earlier you must use jj". So it will try again using `jj` and you block the agent when ever it tries to use git.
It is a wasted turn but the reality is, it won't cost must since you can leverage caching and you only waste tokens on the invalid command and not the output generated from git.
Claude works with jj just fine.
I was interested in answering this question so I built a benchmark comparing git, jj and gitbutler in agentic context
https://vcbench.dev/
Disclaimer - I am a co-founder of GitButler