For contributors: notes about working with agents and worktrees. #705
ValerianRey
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Just a few notes about how I work with claude and worktrees. I might make a better documentation of this one day, but I would like it to be not specific to claude, because I absolutely want to avoid locking in to claude.
Basically, I use wtp to manage worktrees for me.
I thus have a
.wtp.ymlfile at the root of the repo, containing the extra required steps to create the worktrees (basically to copy non-comitted files like CLAUDE.md and .claude, and to install the deps in the newly created worktree):For that to work, you need a script
reinstall-tjd.shin the$HOME/scriptsfolder:Mine looks like this (this depends on your gpu):
Lastly, I have a
CLAUDE.mdfile that links toAGENTS.md, and adds a few extra things:My
.claudeis more or less empty except for a few permissions that I added there.I think it's good that worktrees are created outside of
.claude/worktrees(where claude puts them by default) and I don't like theclaude --worktreecommand, and I also like to avoid vendor lock-in. So I think it makes perfect sense to usewtpfor worktree management. Alternatively we could do that manually, with a script, or with another tool if this one becomes deprecated.The steps to start working on a new thing are then:
There are a few claude-specific things.
CLAUDE.md,.claude/and even the.wtp.ymlhas to contain claude-specific things. We could maybe have a folder.agents/. Even my command to reinstall torchjd is gpu-specific so I can't really commit it.So there may be a few things we could commit but not much. But with this setup, it should be rather easy to switch agents. Something like:
CLAUDE.mdand.claude.wtp.ymlto make it copy the stuff that's necessary for the new agent, and non-comitted.Hopefully more and more agent providers will adopt standards to that less stuff has to be changed when changing agents. But I think it's manageable so far.
Beta Was this translation helpful? Give feedback.
All reactions