Isolation flow · Factory
The worktree is an environment boundary, not just a branch
One ticket, one isolated worktree
Dispatching ticket WM-101 creates a worktree with its own branch, dynamic port, database, and runtime environment. Implementation and independent verification happen inside that boundary. Teardown then removes a clean worktree or retains useful evidence.
setup
inside boundary
clean
ambiguous / useful
Ticket dispatched
WM-101
worktree-up.sh WM-101
allocate before the agent starts
Isolation boundary · WM-101
FILESYSTEM
.worktrees/WM-101
ticket branch
PORT
localhost:52101
dynamic allocation
DATABASE
WM-101 isolated DB
SQLite or Postgres
RUNTIME
local environment
process + daemon state
Implement → independently verify
no shared filesystem, port, database, or process
Teardown
worktree-down.sh
Remove worktree
Retain evidence