Shaf Lab

Parallel workspaces

Extra working directories so you can work on several branches at once, such as Git worktrees.

A parallel workspace is an extra working directory that lets you, or an agent, work on another branch without disturbing the checkout you already have. Git worktrees are the common mechanism: one repository, several directories, each on its own branch. This is how you let more than one agent edit a repo at the same time without stepping on each other's files.

Give each agent or each task its own worktree, its own branch, and its own test command. Merge through pull requests, not by copying files between trees. When the task is done, remove the worktree so the disk does not fill with leftovers.

Worktrees do not remove merge conflicts; they only defer them to a reviewable branch. If two agents change the same module, you will still have to reconcile the diffs. A little upfront partitioning of the work saves a messy merge later.

If you only ever have one change in flight, a single branch is enough. Parallel workspaces start to pay off when people or agents routinely juggle more than one task in the same repo.