-
Notifications
You must be signed in to change notification settings - Fork 0
Implement workspace isolation with WorkspaceIsolationStrategy protocol (DESIGN_SPEC §6.8) #133
Copy link
Copy link
Closed
Labels
prio:highImportant, should be prioritizedImportant, should be prioritizedscope:large3+ days of work3+ days of workspec:agent-systemDESIGN_SPEC Section 3 - Agent SystemDESIGN_SPEC Section 3 - Agent Systemspec:task-workflowDESIGN_SPEC Section 6 - Task & Workflow EngineDESIGN_SPEC Section 6 - Task & Workflow Enginespec:toolsDESIGN_SPEC Section 11 - Tool & Capability SystemDESIGN_SPEC Section 11 - Tool & Capability Systemtype:featureNew feature implementationNew feature implementation
Description
Context
When multiple agents work on the same codebase concurrently, they may edit overlapping files. The framework provides a pluggable WorkspaceIsolationStrategy protocol for managing concurrent file access. The default strategy combines intelligent task decomposition with git worktree isolation.
Acceptance Criteria
WorkspaceIsolationStrategy Protocol
-
WorkspaceIsolationStrategyprotocol defined - Protocol is pluggable — new strategies can be registered via config
Planner + Git Worktrees Strategy (Default)
- Task planner decomposes work to minimize file overlap across agents
- Each agent operates in its own git worktree (shared .git, independent working tree)
-
max_concurrent_worktreesconfigurable (default: 8) - Sequential merge on completion (first done merges first, or by priority)
- Textual conflicts detected by git → escalate to human or review agent
- Semantic conflicts → review agent evaluates merged result
- Worktree cleanup after merge
State Coordination Table
- Framework state: centralized single-writer (
TaskEngine) viaasyncio.Queue - Code/files: workspace isolation via git worktrees
- Agent memory: per-agent ownership
- Org memory: single-writer with role-based access
Testing
- Unit tests for WorkspaceIsolationStrategy protocol
- Integration test: two agents edit different files → successful merge
- Integration test: two agents edit same file → conflict detected and escalated
Dependencies
- Implement agent engine core with ExecutionLoop protocol integration (DESIGN_SPEC §3.1, §6.1, §6.5) #11 — Agent engine core
- Implement parallel agent execution with async coordination #22 — Parallel agent execution
- Implement task decomposition and routing engine #14 — Task decomposition and routing
Design Spec Reference
- §6.8 — Concurrent Workspace Isolation
- §15.5 — Engineering Conventions (workspace isolation, state coordination rows)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:highImportant, should be prioritizedImportant, should be prioritizedscope:large3+ days of work3+ days of workspec:agent-systemDESIGN_SPEC Section 3 - Agent SystemDESIGN_SPEC Section 3 - Agent Systemspec:task-workflowDESIGN_SPEC Section 6 - Task & Workflow EngineDESIGN_SPEC Section 6 - Task & Workflow Enginespec:toolsDESIGN_SPEC Section 11 - Tool & Capability SystemDESIGN_SPEC Section 11 - Tool & Capability Systemtype:featureNew feature implementationNew feature implementation