worktrees is a bundled Orchestrator skill that manages Git worktrees as
isolated coding lanes under .slim/worktrees/<slug>/, so agents can work on
parallel, complex, or high-risk tasks without polluting your checkout. It is
not a Git tutorial: it is the safety protocol for planning lanes, assigning
agents, validating diffs, integrating, and cleaning up without losing work.
Create a worktree lane to refactor the auth logic.
Let's use an isolated worktree to test upgrading the database packages.
The Orchestrator checks workspace state, proposes a lane plan (slug, path, base branch, purpose), and asks before creating the worktree, branch, or any mutating Git command.
Local worktrees sharing the repository's Git database. Specialists such as
@fixer or @designer write and run tests strictly inside the lane; for
example, .slim/worktrees/refactor-auth/ holds the files for the
omos/refactor-auth branch.
Local lane registry (git-ignored), e.g.:
{
"version": "1.0.0",
"updatedAt": "2026-06-14T00:00:00.000Z",
"lanes": [
{
"slug": "refactor-auth",
"branch": "omos/refactor-auth",
"path": ".slim/worktrees/refactor-auth",
"base": "main",
"purpose": "Refactor token parsing module",
"owner": "orchestrator",
"status": "active",
"areas": ["src/auth"],
"createdAt": "2026-06-14T12:00:00.000Z"
}
]
}- The Orchestrator owns lane coordination; specialists do not run lane-management Git commands unless instructed.
- No mutating Git command (
worktree add|remove,branch,merge,rebase,cherry-pick,prune) runs without confirmation, and destructive operations (reset --hard,clean, force-push, branch deletion) are never automatic. - Cleanup refuses dirty worktrees and unmerged branches without explicit approval.
.slim/worktrees/and.slim/worktrees.jsonare git-ignored via a managed.gitignoreblock; the skill writes no.ignoreallowlist and only edits its own marker blocks.
Risky implementations (package upgrades, architectural migrations, schema changes), parallel lanes for independent agents, or a hotfix while another feature is unfinished.
- Trivial modifications: single-file tweaks, documentation updates, tiny fixes.
- Non-Git repositories.
- Environments with very limited disk space.