pub fn isolate_worktree_specs(spec_id: &str, worktree_path: &Path) -> Result<()>Expand description
Isolates the worktree environment by removing all specs except the working spec.
This prevents agents from seeing sibling specs and getting confused about their task, especially in group scenarios where many related specs exist.
§Arguments
spec_id- The specification ID (the only spec to keep)worktree_path- The path to the worktree
§Returns
Ok(()) if the isolation was successful.
§Errors
Returns an error if:
- Directory operations fail
- The working spec doesn’t exist in the worktree