DeepSHPlugins
dsh-taskswarm 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-taskswarm

Agent 與自動化JavaScriptMIT

TaskPlane 的 DSH 移植版:按依賴分波、多 lane 並行執行(git worktree 隔離),任務包 + 跨模型評審 + 崩潰可恢復。

4 Starsfebruary2015 更新時間 2026-08-16
訪問 GitHub 倉庫
dsh-taskswarm 專案預覽

專案介紹

中文

TaskPlane 的 DSH 移植版:按依賴分波、多 lane 並行執行(git worktree 隔離),任務包 + 跨模型評審 + 崩潰可恢復。

English

DSH port of TaskPlane: dependency-ordered waves run in parallel git-worktree lanes, with task packets, cross-model review, and crash recovery.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
february2015
倉庫
february2015/dsh-taskswarm
GitHub Stars
4
Forks
0
開發語言
JavaScript
許可證
MIT
最近推送
2026-08-16
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

61/ 100
維護活躍
82
文件與實用資訊
100
生態關注度
20
安裝便捷訊號
100
專案宣告訊號
100

README 含完整安裝與使用說明;關注度尚低(4);標準命令一鍵安裝。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add github:february2015/dsh-taskswarm

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

TaskSwarm(蜂群)

⚠️ Temporary install notice (Aug 17–18, 2026): the npm package dsh-taskswarm was fully unpublished to clean up old versions and is subject to a 24-hour cool-down (npm's anti-squatting protection). For Aug 17 and Aug 18, install from GitHub:
dsh plugin add https://github.com/february2015/dsh-taskswarm.git
Starting Aug 19, the npm package is back: dsh plugin add dsh-taskswarm. This notice will be removed then.

Multi-agent task orchestration for DeepSeek Harness (DSH).

TaskSwarm arranges a batch of tasks into dependency-ordered waves, runs multiple AI workers in parallel lanes isolated by git worktrees, then automatically reviews and merges their output.

蜂群 (fēngqún) is a swarm of bees: the queen directs, the workers each buzz on their own task in parallel — exactly what this project does: the supervisor plans the waves, then every worker advances in its own lane.
  • License: MIT
  • Upstream: TaskPlane(Pi ecosystem multi-agent orchestration)— this project is a native port
  • 中文文档: README.zh-CN.md

Features

  • Waves / Lanes parallel orchestration — tasks are topologically layered by their dependency DAG into waves; tasks within a wave run concurrently
  • Git worktree isolation — every task (lane) works in its own worktree; results are merged into the taskswarm/orch integration branch
  • Task packets — each task is a PROMPT.md (mission / steps / constraints) + STATUS.md (progress), giving workers durable memory across context resets
  • Checkpoint discipline — automatic git commits at step boundaries; a crashed worker never loses committed work
  • Cross-model review — an independent reviewer scores each task per its Review Level; PASS merges, REVISE sends it back for revision
  • File mailbox — workers and supervisor communicate asynchronously (notify / escalate / request) without shared context
  • Conversational supervisor — shares your session: reports wave completion, lane failures, batch completion; takes verbal commands (start / pause / abort / integrate / open dashboard); notifications and the prompt are bilingual (中文 / English) — say "use English" to switch, auto-detected from your session language, persisted to .taskswarm/config.json across restarts
  • Web Dashboard — local realtime dashboard, zero-dependency node:http + SSE, multiple instances with automatic port negotiation. Auto-starts when a batch starts and prints the link in chat — one dashboard per workspace, ever (an already-running instance is reused, never duplicated)
  • Crash-recoverable — durable disk state + checkpoints + retained lane branches; after a kill/restart you can salvage work, clean up residue, and re-run
  • Orch-based lane baselines — every lane worktree is created from the taskswarm/orch integration HEAD, so it inherits all previously merged output instead of re-inventing shared code
  • Task-packet validation — /tswarm-check + npm run check:tasks surface malformed packets (bad IDs, missing steps/criteria) with actionable causes instead of silently skipping them
  • LLM merge agent — when a lane merge into taskswarm/orch conflicts, an independent merger agent resolves the conflict semantically inside the orch worktree; unresolvable conflicts land the lane in a conflict state and pause the batch for supervisor intervention

Why TaskSwarm, when DSH already has subagents?

DSH's native subagent / workflow / goal are *conversational, one-shot* scheduling — great for ad-hoc delegation. TaskSwarm is a project-level orchestration layer on top of them:

DSH native subagentsTaskSwarm
Task shapeone sentence in chattask packets (PROMPT.md / STATUS.md) — versioned, batchable, reusable
Parallelismmanualwave planning: dependency-topological waves, parallel lanes per wave
Isolationshared workspace (writes collide)git worktree isolation: per-lane branch + checkpoints, merged into taskswarm/orch
Quality gatenoneindependent Reviewer (PASS / REVISE)
Resumabilitygone when the process endsdurable batch state (.taskswarm/batches/*.json): restart / resume / skip finished lanes
Observabilitywatch the chatsupervisor event reports + Web Dashboard, auto-started with the batch, link printed in chat

Quick Start

1. Install (pick one)

# npm registry
dsh plugin --profile web add dsh-taskswarm

# GitHub
dsh plugin --profile web add https://github.com/february2015/dsh-taskswarm.git

# Local directory (development / offline)
git clone https://github.com/february2015/dsh-taskswarm.git && cd dsh-taskswarm
npm install && npm run build
dsh plugin --profile web add $(pwd)

Restart dsh web after installing — the plugin takes effect on boot.

Upgrading an existing install: dsh plugin --profile web add dsh-taskswarm
reports "Already up to date" and stays on the old version when the lockfile
version already satisfies the declared range. Pin the new version explicitly:
dsh plugin --profile web add dsh-taskswarm@<new-version> (or run
pnpm update --latest in the profile directory), then restart dsh web.

2. Scaffold example tasks

/tswarm-init        # creates two example task packets (EXAMPLE-001 / EXAMPLE-002)

3. Preview the wave plan (no execution)

/tswarm-plan all    # shows tasks grouped into waves by dependency

4. Start a batch

/tswarm all         # run all tasks in parallel; or target one: /tswarm EXAMPLE-002
/tswarm-status      # watch progress anytime

5. Open the Dashboard

Starting a batch (/tswarm) auto-starts the dashboard and prints its link in the session, so you can watch progress while waves run. Manual control is still available:

# from a DSH session (supervisor command)
/tswarm-dashboard

# or standalone CLI — after installing the plugin, the bin is on PATH:
npx taskswarm-dashboard --root <repo>

# or without installing anything, fetched on the fly (after npm publish):
npx --package dsh-taskswarm taskswarm-dashboard --root <repo> [--port 8100] [--no-open]
One dashboard per workspace: if one is already running for the same repo
(started manually or left over from an earlier session), it is detected and
reused — a second instance is never spawned.

How It Works

Four roles are orchestrated:

RoleResponsibility
SupervisorPlans waves, schedules lanes, handles events, talks to you (the session that ran /tswarm)
WorkerOne DSH agent per task, advancing its task packet step by step in an isolated lane worktree
ReviewerIndependent agent reviewing worker output, emitting PASS / REVISE
MergerMerges finished lane output into the taskswarm/orch integration branch

Git model:

taskswarm/orch            ← integration branch: all lane output lands here (persistent — don't delete)
taskswarm/<taskId>        ← per-lane working branch (holds step checkpoints; removed after merge)

Durable state (<repo>/.taskswarm/):

.taskswarm/batches/<batchId>.json   # single source of truth for a batch (phase + lanes)
.taskswarm/mailbox/<batchId>/       # agent-to-agent messages
.taskswarm/worktrees/_orch/         # integration worktree
.taskswarm/worktrees/<taskId>/      # per-lane isolated worktrees

Command Reference

CommandAction
/tswarm [scope]Start a batch (scope: all / task id / path)
/tswarm-plan [scope]Preview wave plan and dependency graph (no execution)
/tswarm-statusShow current batch / lane progress
/tswarm-pause / /tswarm-resumePause after the current wave / resume. A failed lane also auto-pauses after the wave (pauseOnLaneFailure, on by default) — resume then skips the failed lane; rerun it with /tswarm <taskId>
/tswarm-stop-lane <taskId>Stop one lane immediately (kill worker, mark failed, preserve worktree/checkpoints); sibling lanes continue, the batch pauses after the wave
/tswarm-switch-model <taskId> <model>Switch one lane to a different model: stop it, record the override, auto-rerun from the next step (checkpoints preserved). Override > workerModel > parent-session default
/tswarm-abortAbort after the current wave (kills running lanes)
/tswarm-deps [scope]Show the dependency graph
/tswarm-sessionsList active lanes and their worktrees
/tswarm-integrateMerge taskswarm/orch into the current working branch
/tswarm-dashboardStart the Web Dashboard
/tswarm-init [ID]Scaffold example task packets
Compatible aliases: /orch, /orch-status and other /orch-* commands are equivalent.

Hot Reload / HMR Behavior

  • Config hot-reload: TaskSwarm is a standard DSH bundle — config overrides layered in the profile's cordis.patch.yml are hot-reloaded by DSH without a restart. Caveat: reloading the orchestrator plugin (e.g. editing its config row) aborts all running batches via its unload cleanup — do not touch orchestrator config while a batch is running.
  • Source HMR: DSH does not enable plugin source HMR on the web profile (cordis-plugin-hmr is disabled by default); source changes require npm run build followed by a dsh web restart.
  • Batch recovery: even after a restart, .taskswarm/ disk state + checkpoints + lane branches persist; check /orch-status afterwards and resume/rerun failed lanes through the supervisor without losing completed work.
  • Wave plan is fixed at batch start: the wave structure (how many waves, which tasks in each) is persisted and never recomputed mid-flight — pause/resume, crash recovery, and single-lane reruns all continue within the original wave layout. Completed waves stay done, remaining tasks keep their original wave numbers, and the dashboard/dingo wave segmentation stays consistent.

Notifications & Token Efficiency

Supervisor notifications are designed to save tokens without losing information:

  • Complete, localized messages — every notification (periodic report, wave complete, lane

failed, stalled, batch complete) is already written in full, human-readable language (Chinese or English per the session locale), e.g.:

  [TaskSwarm] ⏱️ 定时汇报(每 5 分钟):
  批次 b-msvinu6n — running(已完成 1/4)· 波次 1/2
    lane 1 [已合并] JM-402 · 步骤 8/8,218 步
  • The supervisor agent never re-translates or restates them — the system prompt explicitly

tells it: *notifications are already complete and readable; do NOT translate or repeat them; judge only whether there is an anomaly or an action needed — if yes, handle/report briefly; if no, stay quiet or acknowledge in one short line.* This is what actually saves tokens: the notification itself is written once in the cheapest place (the engine), and the model does not burn tokens re-explaining it back to the user.

  • The design principle: don't shrink the message, eliminate the re-explanation. A terse

message forces the model to translate/expand it (expensive); a complete message lets the user read it directly and lets the model act only on anomalies.

Integration with dsh-dingo

TaskSwarm exposes a standard Cordis service for other DSH plugins:

const taskswarm = ctx.get('taskswarm')
const { batches } = taskswarm.getSnapshot()

Each batch includes ownerSessionId, so plugins like dsh-dingo can show a “waiting for background/subtasks/swarm” state on the main session card while the batch is still running.

This makes it possible to see “main conversation finished, but the swarm is still working” directly in the dsh-dingo card panel.

Clean card list — TaskSwarm's internal worker/reviewer/merger sessions never appear as user cards in dsh-dingo: no purple draft counts, no stray cards, no reminders from sub-agents. Only the main session that started the batch shows as a user card (with the "waiting for swarm" state).

Docs

  • Runbook (ops) — standard operating procedures for cleanup, error recovery, and work salvage (required reading for supervisors / AI agents)
  • Release Guide — publishing to npm, version bumps, and the 2FA/bypass-token gotcha (for maintainers)
  • Known Issues — root-cause analyses and fixes for resolved issues
  • Changelog — version-by-version release notes (中文版 CHANGELOG.zh-CN.md)

License & Credits

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案