dsh-branchman: Tree-based Branch Management Plugin for DeepSeek Harness

Preface

The concept of DeepSeek Harness (DSH) is “everything is a plugin.” In agentic development and engineering, session branching is often disconnected from code repository branching. dsh-branchman solves this problem by mapping a branch action to a git worktree, a sub-session that inherits conversation history, and a visual tree-structure edge.

Core Features

The plugin provides tree-based branching workspace management. One action includes a git worktree + a sub-session + a visual tree edge. Each main tree has an independent partition; sub-tree layout is arranged according to actual parent-child relationships. Developers can view all sessions in the sidebar “Trajectory Overview,” including nodes where a branch has not yet been created.

Feature Details

  1. Session Inheritance and Creation
    When creating a branch, the sub-session can inherit the latest completed turn or start inheriting from a specific assistant message. Each branch uses a UUID and generates an independent branchman/<UUID> branch and .branches/<UUID> worktree. Handoff notes are saved in the details and are not automatically sent to the model.

  2. Visualization and Filtering
    Provides a hierarchical list with expand/collapse support and filtering by repository or main tree. The graph view supports search, pagination (preserving ancestors), refresh, camera controls (drag, zoom, selection positioning), and a scalable graph.

  3. File Carry-over and Operation Validation
    Supports carrying uncommitted files (including Chinese file paths and binary files), but does not carry symbolic links, submodules, or .branches content. Merge, sync, and removal operations check actual worktree identity. Uncommitted changes, unmerged commits, or conflicts block the corresponding operation.

  4. Interruption Recovery
    When an operation is interrupted, the worktree and logs are retained. Use “Continue Recovery” to reconcile.

Installation and Enablement

After the npm publish is complete, you can directly use dsh-branchman@0.3.2.

Typical Usage

  1. Create a Branch: Create a branch in the bottom “Trajectory Overview” area of the sidebar.
  2. Choose History: When created from the input box, it inherits the latest completed turn; when created from an assistant message, it inherits that message and the history before it.
  3. Handle Conflicts: After resolving conflicts, use “Check Worktree”.
  4. Recover Interruption: After an interruption, use “Continue Recovery” to reconcile.

Notes

  • Host Compatibility: The verified host is @deepseek-ai/dsh-desktop@0.2.0-rc.2, and the runtime version is Electron 44. Runtime dependencies are provided by the host.
  • Data Migration: v1 data is migrated to an independent tree-v2.; the original tree. is retained. Old records missing a trusted base point are marked for recovery; downgrades must consider state versions.
  • CLI Limitations: The CLI scripts/branchman.ps1 requires an explicit -BaseUrl; write operations are submitted via -BodyFile and do not bypass operation logs.
  • Permission Risk: The plugin runs with the permissions of the current DSH process. Review the source code and license before installation.

Summary

By combining Git worktrees with sub-sessions, dsh-branchman provides a visualized engineering trajectory management approach. It is suitable for DeepSeek Harness users who need to clearly manage multi-branch sessions and code states.

Plugin Directory | GitHub Repository

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye