iiRecord
Agentic AI Atlas · GAP-TOOLS-017: Git Worktree Isolation for Parallel Effect Execution
page:docs-harness-features-backlog-gaps-tools-capabilities-gap-tools-017a5c.ai
II.
Page JSON

page:docs-harness-features-backlog-gaps-tools-capabilities-gap-tools-017

Structured · live

GAP-TOOLS-017: Git Worktree Isolation for Parallel Effect Execution json

Inspect the normalized record payload exactly as the atlas UI reads it.

File · wiki/docs/harness-features-backlog/gaps/tools-capabilities/gap-tools-017.mdCluster · wiki
Record JSON
{
  "id": "page:docs-harness-features-backlog-gaps-tools-capabilities-gap-tools-017",
  "_kind": "Page",
  "_file": "wiki/docs/harness-features-backlog/gaps/tools-capabilities/gap-tools-017.md",
  "_cluster": "wiki",
  "attributes": {
    "nodeKind": "Page",
    "sourcePath": "docs/harness-features-backlog/gaps/tools-capabilities/GAP-TOOLS-017.md",
    "sourceKind": "repo-docs",
    "title": "GAP-TOOLS-017: Git Worktree Isolation for Parallel Effect Execution",
    "displayName": "GAP-TOOLS-017: Git Worktree Isolation for Parallel Effect Execution",
    "slug": "docs/harness-features-backlog/gaps/tools-capabilities/gap-tools-017",
    "articlePath": "wiki/docs/harness-features-backlog/gaps/tools-capabilities/GAP-TOOLS-017.md",
    "article": "\n# GAP-TOOLS-017: Git Worktree Isolation for Parallel Effect Execution\n\n| Field | Value |\n|-------|-------|\n| Category | tools-capabilities |\n| Priority | High |\n| Effort | L |\n| Status | Missing |\n\n## Description\nEnable parallel effect execution with git worktree isolation so that concurrent code-modifying tasks do not conflict. When the orchestrator dispatches multiple code tasks in parallel (via `ctx.parallel.all()`), each task should operate in an isolated worktree to prevent merge conflicts and file contention.\n\n## Current State\nParallel effects (`ctx.parallel.all()`, `ctx.parallel.map()`) execute concurrently but share the same working directory. Code-modifying tasks that run in parallel risk file conflicts, dirty working trees, and non-deterministic results. No worktree management exists in the SDK.\n\n## Target State\nA worktree manager that: creates isolated git worktrees for parallel code tasks, tracks worktree lifecycle tied to effect IDs, merges worktree results back to the main working tree on effect resolution, cleans up worktrees on task completion or failure. Integrated with the parallel execution model and harness invocation.\n\n## Dependencies\n- [GAP-PAR-001](../parallelization/GAP-PAR-001.md) -- concurrent effect execution\n- [GAP-AGENT-001](../agent-delegation/GAP-AGENT-001.md) -- sub-harness isolation for worktree-bound invocations\n\n## Key Files\n| Component | Path |\n|-----------|------|\n| Parallelization | `packages/sdk/src/runtime/` |\n| Harness invoker | `packages/sdk/src/harness/invoker.ts` |\n| Storage | `packages/sdk/src/storage/` |\n| Task batching | `packages/sdk/src/tasks/batching.ts` |\n\n## Recommendation\nPhase 3 implementation. Build a `WorktreeManager` module that creates/tracks/merges worktrees. Integrate with `buildParallelBatch` to auto-provision worktrees for code tasks. Add worktree cleanup to effect resolution lifecycle.\n",
    "documents": []
  },
  "outgoingEdges": [],
  "incomingEdges": [
    {
      "from": "page:docs-harness-features-backlog",
      "to": "page:docs-harness-features-backlog-gaps-tools-capabilities-gap-tools-017",
      "kind": "contains_page"
    }
  ]
}