Introduction¶
DeepSeek Harness (DSH) uses an “everything is a plugin” architecture. When developing tasks that involve multiple Git repositories, working directly in the source repositories can easily lead to confusing workflows. The dsh-worktree-space plugin uses an isolation mechanism to place the work items for one or more repositories into an independent task space directory. Each repository gets its own worktree on the same task branch, enabling parallel progress on multiple tasks.
Plugin Overview¶
dsh-worktree-space is a workflow plugin maintained by kangtsang and licensed under the MIT License.
The core value of the plugin is: it places a work item involving one or more Git repositories into an independent task space directory, with each participating repository getting its own worktree on the same task branch. The task space is automatically registered as a DSH workspace, and the Agent session starts work directly in the task space.
Core Features¶
-
Create tasks from the session
Select the source root, name the task, choose a branch prefix, and check the repositories that should participate. Each repository gets a worktree located at<branch prefix><task name>. The task space directory generates record files and documentation. -
Automatic registration and startup
The task space is automatically registered as a DSH workspace with the name<parent>/<task name>. The Agent session starts work directly in the task space; the working directory is this task space, so the source checkout is not modified. -
Management views
The management page has three views:- Workspace view: View which workspaces can create task spaces and how many repositories each workspace contains.
- Git repository view: View each Git repository and its linked worktrees.
- Task space view: List the repositories under each task (branch, number of changes, locked status, and whether it can be cleaned up).
-
Add repositories to a task
Supports adding repositories to an existing task. Click Add Repository on the task row. The new repository creates a worktree on the task’s existing branch, with the starting point defaulting to the current HEAD of each repository. -
Bilingual support and logging
The interface fully supports Chinese and English. It has no additional service dependencies and supports toggling operation logs.
Installation and Enabling¶
Web client installation:
dsh plugin --profile web add dsh-worktree-space
Desktop client installation:
In the sidebar, go to Plugins, enter dsh-worktree-space in the Plugin package name field, and click Install.
Typical Usage¶
- Create a task space: On the management page, create a task, specifying the branch prefix and participating repositories.
- Agent work: The Agent session starts work directly in the task space and makes code changes in its respective worktrees.
- End the task: After the task is complete, click End Task on the task row. By default, the repository branches are merged back into their target branches, the worktrees are deleted, and any remaining documents in the task space are archived to the specified directory.
Cautions¶
-
Environment requirements
- Node.js >= 22.19.0
- Git
- DSH >= 0.1.7-rc.1 < 0.3.0-0
-
Commits and conflicts
- The plugin does not commit on your behalf; uncommitted changes will pause that repository.
- Experimental feature: The feature of letting the Agent handle commits and merge conflicts is in the experimental validation phase (Beta). It is shown by default. To hide it, set Hide the entry for delegating conflict resolution to the Agent to Hidden in the plugin settings.
-
Limitations
- Removing repositories from a task is not supported.
- The container root directory is recommended to be located one level below the root workspace.
Summary¶
By using the worktree mechanism, this plugin achieves physical isolation for multi-repository tasks and is well suited for scenarios that require handling complex, cross-repository development tasks in the DSH environment. For more details, see the GitHub repository.