- Version
0.1.0 - Purity server-only (shells out to the
gitCLI vianode:child_process, reads/writes files vianode:fs) - Purpose Provision per-task git worktrees, write the runtime-agnostic system-of-record scaffold, and validate the structured
AGENT_HANDOFF.jsonso any runtime, or a human, can pick up a task cold. - Workspace deps none
- External deps
zod^3.25.0
container tier, which this package never provisions. The package exposes a single . entry point (no subpath exports). DB-bound bookkeeping (the workspaces row, the task status drive) lives server-side in apps/web/server/lib/worktrees.ts; this package is purely the git/file mechanism.
Public API
Functions
isolation (./isolation)
scaffold (
./scaffold)
handoff (
./handoff)
lifecycle (
./lifecycle)
git (
./git, low-level plumbing, exported for the server orchestrator + tests)
Types & interfaces
Constants
Classes
Used by
apps/web(server):lib/worktrees.ts(the board orchestrator: provision/load/pause/resume/complete/GC, scaffold, handoff round-trip,SOR_FILES,IsolationLevel),lib/executorRunner.ts(claim → worktree → run → verify → handoff),lib/verification/{index,critic,deterministicGate}.ts(commitWorktreeWork,provisionReviewWorktree/removeReviewWorktree,DiffStat/Worktree,SOR_FILES),lib/routines/openclawDispatch.ts(KeyedMutex),api/board.ts(agentHandoffSchema).
Source
Barrel:packages/worktrees/src/index.ts (re-exports ./types, ./isolation, ./scaffold, ./handoff, ./lifecycle, ./git).
See also
- Worktrees & cross-runtime handoff
- Cross-runtime handoff guide
- Executor runner internals
- Verification (builder≠judge)
@clawboo/executor, theRuntimeAdapterwhose runs work inside a worktree@clawboo/governance, the verify gate that reviews a worktree’s diff- Package overview