Worktrees
.pitway/config.yaml controls how tasks execute, generated by pitway init with explanatory comments:
execution:
strategy: parallel_worktrees # independent tasks dispatch concurrently
sequential vs. parallel_worktrees
sequentialruns one task at a time, inline.parallel_worktrees(the generated default) lets independent, dependency-free, disjoint-write_scopetasks dispatch concurrently, each into its own temporary Git worktree. PitWay validates eligibility up front and integrates each result as a diff-apply, never a merge -- so the resulting mainline history stays indistinguishable from running the same tasks sequentially.
Commands
| Command | Purpose |
|---|---|
pitway task-dispatch |
Prepare a parallel-eligible task for worktree execution. |
pitway task-integrate |
Apply a dispatched task's worktree commit to the main tree. |
pitway task-discard |
Abandon a dispatched task's worktree without integrating. |
Each worktree worker receives only its own generated task-context bundle (task definition, acceptance criteria, contract excerpt, dependency results, relevant files, verification instructions) -- never full milestone history -- and its results are persisted as concise structured summaries, never full transcripts. This is the same context isolation used for sequential task execution; parallel dispatch doesn't relax it.
No branches, stashes, or merges mid-task
Whichever strategy is set, ordinary task work never creates branches, worktrees (outside the dispatch mechanism itself), stashes, or merges as a side effect -- integration is deliberate and explicit, through the commands above.