Two pieces of work in one repository at once: a fix on one branch, a feature on another. Give each a git worktree, and each is a project of its own to Pair, with its own session, goal, chat and memory.
cd ~/src/hookd
git worktree add ../hookd-lease -b lease-outlives-attemptsStart a Neovim in the worktree, and its chat beside it: in herdr, a tab (or panes) of its own with nvim and
pair started there; without herdr, :Pair chat in that Neovim.
cd ~/src/hookd-lease && nvimThe project is the git root of the folder Neovim starts in, so this is a new session, with its own goal: the chat's header names the worktree's folder.
Go to the Neovim started in the other worktree: its herdr tab or pane, or its terminal window. Each Neovim stays in
the project it connected in. :cd to the other worktree does not move its session there; open a Neovim in that
worktree instead. Several Neovims in one worktree share its session.
Everything stays apart: each session has its own goal, tests on save (a testOnSave
entry per worktree folder), remarks, ledger and debrief.
- Board tasks work in worktrees of their own. In
:Pair agents,topens a terminal in a task's worktree; a session opened in a task's worktree leaves that task out of its news (board). /gen scaffold --branchbuilds a scaffold in a worktree on a branchgen/<n>; open it as above and it gets its own session (scaffold).
In a monorepo the git root is too big for one session. List the folders that are projects of their own in the
config, a folder ending in /* for each folder in it:
Then start Neovim and pair in the package (or below it): a Neovim started in ~/src/shop/packages/api/src pairs in
~/src/shop/packages/api. One started at the monorepo's root stays in the root's project.
Install and daily use (several projects, several Neovims) and session roots.
