dsh-worktree-flow
Multi-repository feature worktree orchestration for DeepSeek Harness: create grouped git worktrees and register the feature root as a DSH workspace so every session can pick it at creation.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TY-ang/dsh-worktree-flow说明文档
阅读完整 README ↗Usage
Primary entry: the Settings → Worktree Flow page
- Two primary tabs only: 配置 (config) and 功能工作区 (feature workspaces)
- Config: set list + editor. Create a set with「+ 新建仓库组」(the name becomes part of feature directory names and is immutable); initial content is prefilled once from the "new-set template". Then bind components: a collapsed row shows just "name → path"; expand to edit — pick a directory with「选择…」and it is probed immediately (is it a git repo? what is the base branch?); picking a non-git directory offers an inline「初始化 git 仓库」button. Saving runs inline validation (path exists / is a git repo / base branch resolvable / worktree root writable), and a dry-run create preview sits at the bottom.
- 自动发现 (auto-discover): anchored at a reference directory, scans its neighbouring git repositories for bulk binding (renameable component names, manual opt-in checkboxes, search + pagination); with nothing bound yet, pick a reference directory first.
- 新仓库组模板: a collapsed card at the bottom of the config tab editing
$DSH_HOME/worktree-flow.json— read ONCE when a set is created (worktree root, default base branch, component vocabulary); never affects existing sets. - Feature workspaces: pick a set, then browse feature groups (branch / dirty / ahead-behind / unpushed / registration state / session count), archive and cleanup; only fully-configured sets (worktree root + all components bound) can be used for creation.
- Branch types: a collapsed card on the config tab editing the global vocabulary
$DSH_HOME/worktree-flow/branch-types.json— built-in Bugfix/功能/Hotfix/发布 on first install, fully editable; the create wizard composes the full branch name from type + topic (or「自定义」for a verbatim name). - Component paths support a leading
~. - The sidebar「新增工作区」flow offers「功能工作区」: pick the target set, and the creation wizard lists all of its components.
Commands (fallback, scriptable; the set is inferred from the session cwd by path matching, --set overrides):
/worktree status [feature]
/worktree create [name] --branch [--components a,b] [--base ref] [--set name] [--dry-run] [--register-components]
/worktree sync # adopt existing features + migrate .pi-era manifests + report orphans
/worktree open # ensure registered, print the path
/worktree finish [--cleanup] [--force] [--keep-registered]
/worktree config show [--set name]