Create Omni/Pipeline/Workspace.hs - worktree pool management.
Depends on: Omni/Pipeline/Core.hs, Omni/Pipeline/Git.hs
Manages per-task dev worktrees and the persistent integration worktree.
Types:
- WorkspacePool: TVar (Map Text FilePath) for active workspaces, max concurrency, root path
Functions:
- newPool :: PipelineConfig -> IO WorkspacePool
- acquireWorkspace :: WorkspacePool -> Text -> Text -> IO (Either Text FilePath)
-- (pool, taskId, baseBranch) -> creates worktree, returns path
- releaseWorkspace :: WorkspacePool -> Text -> IO ()
-- removes worktree and deletes task branch
- resetWorkspace :: WorkspacePool -> Text -> Text -> IO (Either Text FilePath)
-- deletes branch, recreates from baseBranch (for retry)
- slotsAvailable :: WorkspacePool -> IO Int
- ensureIntegrationWorktree :: WorkspacePool -> Text -> IO (Either Text FilePath)
- recoverStaleWorkspaces :: WorkspacePool -> IO ()
-- startup: scan root dir, clean up orphaned worktrees
Verify: typecheck.sh Omni/Pipeline/Workspace.hs