Worktree workstreams isolate parallel changes
A worktree gives a stream its own working copy and branch. It reduces accidental mixing of changes, but it does not resolve overlapping ownership or decide whether a result should merge.
Create worktrees only after the workstream boundary and cleanup decision are explicit.
| Control | Question |
|---|---|
| Branch | Which stream owns this branch? |
| Directory | Which working copy is active? |
| Scope | Which files may change? |
| Cleanup | When is the worktree kept, merged, or removed? |
Launch and cleanup sequence
- Record the stream goal and allowed paths.
- Create and verify the branch and worktree.
- Check the starting status before edits.
- Run the bounded work and focused checks.
- Inspect diff, commits, and generated files.
- Report the result to the owner.
- Keep, merge, or remove the worktree only after a decision.
Workstream record
Stream: <name>
Branch: <branch>
Worktree: <path>
Allowed paths: <list>
Checks: <commands>
Decision: keep / merge / remove
Status: documented example; integration result: Unknown.Canonical lesson source · JavaRush
Open JavaRush material