Project
wk
Makes git worktrees for parallel coding agents with the dependencies already in place, cloned copy-on-write from a template instead of installed again. It also lands their work through a gated queue and removes the worktrees that are finished.
- Go
- Bubble Tea
- APFS
$ cd "$(wk new 21)"
wk: worktree add --no-checkout 0.02s
wk: clone node_modules 0.00s
wk: checkout 0.01s
wk: skip the post-clone commands: the clones were made at this commit
$ pwd
~/code/demo/.claude/worktrees/wk-21$ wk setup --yes
wk setup: base main
wk setup: clone dir node_modules
~/.wk/demo.toml
$ wk config show | head -6
# ~/.wk/demo.toml (found)
[template]
path = ".claude/worktrees/wk-template"
refresh_on = ""
follow_base = true
clone_dirs = ["node_modules"]$ wk gc
kept, run /land-worktrees .claude/worktrees/wk-21 it changed 0 minutes ago and a session may still be in it; 1 changed path
skip .claude/worktrees/wk-template the wk template
skip .claude/worktrees/wk-trial the wk gate trial; the landing worker reuses it
0 of 3 removable; dry run, nothing removed (wk gc --apply removes them)$ wk submit -m "add the page"
wk: includes page.txt
5fa624343778
$ wk status
landing.enabled = true
last gate run: green, 5fa624343778 on tree 5f8adee0a2ef
page pass (0.0s)
5fa624343778 landed ~/code/demo/.claude/worktrees/wk-21 add the page
commit: 17f9d6624afa995fd06ec4475ae8099314821108
reason: gates: page pass
$ git log --oneline
17f9d66 add the page
c526dfb init$ wk hooks install
~/code/demo/.claude/settings.local.json: updated
~/code/demo/.claude/worktrees/wk-template/.claude/settings.local.json: updated
$ jq '.hooks | keys' .claude/settings.local.json
[
"PreToolUse",
"SubagentStop",
"WorktreeCreate",
"WorktreeRemove"
]The workspace
One command, a warm workspace.
wk new 21 adds a worktree on branch wk/21 and clones node_modules from the template copy-on-write, so nothing is installed again. It prints only the path on stdout, so cd "$(wk new 21)" lands inside.
Setup
It reads the repo, or takes the defaults.
Run wk in a repository and a guided setup finds the manifests, lockfiles and .env files, then asks which to use. It reads file names only. An agent with no terminal runs wk setup --yes, which writes the same config from the defaults and builds nothing.
The verdicts
Every worktree gets a verdict.
Removable, kept, skipped or prunable, with every reason behind it. A worktree goes only when it is unlocked, idle and clean and the base already holds its commits. wk hive draws the verdicts in the terminal and wk viz in a browser.
The landing queue
Agents submit. wk gates, then lands.
With landing on, an agent runs wk submit and never git commit. One worker predicts the merge, runs the gates once over the final tree and lands the batch only on green. A red gate names itself and the changeset waits for a fix.
The hooks
Claude Code asks wk for its worktrees.
wk hooks install adds four hooks to the repo local settings. Every worktree a session or subagent makes then comes from the warm template, a finished subagent is marked for cleanup, and heavy gate commands take turns. It never writes ~/.claude/settings.json.