Skip to content
Set it up

/worktree

/worktree creates, lists and removes a second folder of the repo on its own branch: a git worktree. It is the split the template offers as an option, and /setup asks about it.

Why two folders

One agent session at a time works fine in one folder. When the work and the product move in parallel, by one person in two windows or by two people, two sessions in one folder step on each other: one switches branch under the other, or both change the same file. With two folders:

Folder Branch Its files
The main one main The work (work/, sources/, docs/); the merges and the pushes
<repo> product, next to it product The roadmap (product/) and the code

Each session changes only its own area’s files, so the merge is always clean, and each reads only its area. log/ is written from both and merges by itself. The split is written in the repo’s CLAUDE.md, so every session knows it.

With one session at a time, or no code, a single folder is simpler.

What it does

/worktree new product # the folder "<repo> product" next to this one, on the branch product
/worktree list # the folders, and the commits of each branch not yet in main
/worktree remove product # only with nothing uncommitted; the branch goes only if merged

new links .env, .env.local and .venv to the main folder’s, so secrets and the local environment exist once.

A day with two folders

  • Closing items. In the second folder Plancia sees a parallel worktree: items are closed with plancia close <ID> --note "…", and after the merge plancia closing --write applies them in the main folder.
  • In the morning /today says when one branch has commits the other has not taken.
  • In the evening /close in the second folder first (commit, merge into main), then in the main one (closings applied, push).