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.

ControlQuestion
BranchWhich stream owns this branch?
DirectoryWhich working copy is active?
ScopeWhich files may change?
CleanupWhen is the worktree kept, merged, or removed?

Launch and cleanup sequence

  1. Record the stream goal and allowed paths.
  2. Create and verify the branch and worktree.
  3. Check the starting status before edits.
  4. Run the bounded work and focused checks.
  5. Inspect diff, commits, and generated files.
  6. Report the result to the owner.
  7. 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