DSH Team Mode: From "One Agent Doing It All" to "A Team Dividing the Work"

Introduction

The core philosophy of DSH is “everything is a plugin.” Each plugin is installed into a profile as a bundle and is not used directly as a CLI tool. Team Mode is a workflow plugin that transforms DSH from “one agent does the work” to “a team divides the work”: once a goal is set, roles and responsibilities are automatically assigned, each role executes in parallel as an independent sub-agent, and results are consolidated back to the lead (main conversation) via the reporting chain.

Installation & Activation

DSH plugins are “bundles installed into a profile.” The recommended approach is to let the agent handle it (one step to install + activate):

plugin_manager install_bundle target=dsh-team-mode registry=https://registry.npmjs.org

The equivalent manual approach (more explicit for compliance):

cd ~/.dsh/profiles/<your-profile>
pnpm add dsh-team-mode --registry https://registry.npmjs.org
# Then add dsh-team-mode to dsh.profile.bundles in that profile's package.json, and restart DSH

For local development, link the repo directory directly: plugin_manager install_bundle target=<absolute-path-to-repo> (installs via link:; after code changes, reload the bundle to take effect).

Once installed, the bundle id is team-mode (the patch id in cordis.patch.yml), and the npm package name is dsh-team-mode. To reload: plugin_manager set_plugin target=include:team-mode enabled=false → enabled=true.

Requires DSH >=0.2.2-rc.1 <0.4.0-0, Node >=20.

Core Features

Auto-Forming Teams

Describe the goal in one sentence, and the lead directly calls team_form to create a roster from a built-in template and staff all roles—no need to specify members by name. The template parameter of team_form supports: software (software development), video (video production), research (research & analysis), content (content operations), generic (general projects). You can also pass roles directly for a custom roster.

Real Division of Labor

Each role is an independent sub-agent with its own session, responsibilities, deliverables, and write scope—so all the work isn’t piled onto a single Agent. Members can delegate at a depth of only 1 level by default, keeping the team structure flat and controllable.

Reporting Chain

Roles form a tree via reportsTo. Members submit structured reports using team_report (status / summary / evidence / blockers / next), and the lead aggregates with team_status.

Visible at a Glance

In the top tabs “Chat / Trace / Context / Team,” click “Team” to see the full-page organizational structure, task board, and recent activity. There’s a team toggle on the left side of the input box.

Four Tools

Tool Used by Purpose
team_form lead Create or modify a roster by template or explicit roles; by default, also staffs all unstaffed roles
team_staff lead Staff (or re-staff) a specific role
team_report members Submit a structured report: status / summary / evidence / blockers / next
team_status lead Aggregate roster, task board, and member reports (including the latest reports from members not yet finished)

Toggle & Panel

Toggle

Action Effect
“👥 Team · Auto/On/Off” button on the left of the input box One-click toggle (equivalent to /team on, /team off)
/team off Current session stops auto-forming teams; the lead handles simple tasks directly
/team on Resumes on-demand auto team formation
/team status Prints current roster, staffing count, and report count

The button on the left of the input box has three display states, so you can tell the current status at a glance: Team · Auto (follows the default), Team · On 3/7, Team · Off. If there’s a draft, clicking it won’t overwrite what you’re typing—it only inserts /team on or /team off into the input box; press Enter to send. Only when the draft is empty does it submit directly.

The status badge next to the panel title (Auto, On, Off) is also clickable and toggles the same way. The small dot at the right end of the title row is a heartbeat indicator: yellow = a member is working, red = a task is blocked, unlit = idle.

The toggle is per-session (written into the session log, replayable and forkable); the auto value in cordis.patch.yml is only the default for all sessions.

Team Panel

The team is a View on the chat page: in the top row “Chat / Trace / Context / Team / Formation,” click “Team,” and the entire area becomes the team panel. It includes:

  • Goal / Toggle state / Progress: number of in-progress and completed tasks, number of unstaffed roles.
  • Member cards: one card per role (adaptive grid). Each member has a fixed identity color—used for the title, border, and staffing badge; body text like responsibilities stays neutral, so even a long roster doesn’t blur together. Active cards have a glowing breathing border with a light sweep; unstaffed roles show a dashed staffing badge.
  • Task queue (three sections): In Progress / Up Next / Done. Each row has a vertical color bar on the left (matching the member’s identity color) and the member name on the right. The queue re-sorts instantly when a task status changes (assigned, claimed, completed)—it reflects the current task board, not a fixed layout.
  • Recent activity: a timeline with vertical lines and glowing dots (time, role, status, conclusion, evidence, blockers, next steps).

The panel has two views, toggleable on the right side of the title row:

  • List: member card grid + three-section task queue + activity timeline. Click any member card to expand that member’s details.
  • Graph: SVG node diagram. The top is a lead (you) horizontal bar, below are role nodes (arranged by reporting hierarchy), arrow connections = reporting lines, small cards below nodes = tasks assigned to that role. Node stroke, title, chips, connections, and handoff labels all use that member’s identity color, with a color legend at the top. When a member is active, the node breathes/highlights, the connection becomes an animated dashed line, and the line shows “N handoffs.”
  • Who’s working: the sub-session running is true (the member is actually executing), or the latest report is in_progress, or there’s an in-progress task under that member’s name—satisfying any one of these causes the node to breathe/highlight, and “Working: xxx” is listed above the graph. When nobody is working, a hint appears there instead of leaving it blank.
  • Click a node for details: click any node to expand “Role Details”—responsibilities, deliverables, write scope, member name, all tasks assigned, and the last two reports (with evidence/blockers/next steps). Click again or “Collapse details” to close. The member’s full conversation is in the member menu at the session header; a hint is provided in the details as well.

All panel data comes from session projections (teamMode, agentTeam)—no caching, no extra syncing, so refreshing or switching sessions won’t cause misalignment.

To preview offline (without opening the GUI):

node tools/preview-graph.mjs --view graph   # → preview/panel-graph.html
node tools/preview-graph.mjs --view list    # → preview/panel-list.html
node tools/preview-graph.mjs --view graph --select qa   # → preview/panel-graph-qa.html (with role details)

Capacity Limits

  • Max concurrent active sub-agents: 8 (DSH maxActiveSubagents default; exceeding this prompts to wait for an idle slot).
  • Delegation depth defaults to 1 level: members cannot spawn grandchildren, keeping the team structure flat and controllable.
  • The plugin’s own maxMembers defaults to 8; exceeding it causes team_form to report an explicit error.

Configuration

In cordis.patch.yml:

config:
  maxMembers: 8    # Max roles in a single roster
  auto: true       # By default, whether the root session allows on-demand auto team formation
  autoStaff: true  # Whether to auto-staff roles after team_form creates the roster

Known Limitations

  • A member’s detailed process (each tool call) lives in that member’s own session; the lead can only see what they proactively submit via team_report.
  • Reports are mirrored into the lead session for panel display; the authoritative record always remains in the member’s own session.

Legacy Session Repair (0.1.x → plugin records)

Early 0.1.x builds used session.append('team/roster' | 'team/staff' | 'team/report') to write events. These types are not in DSH’s KNOWN_SESSION_EVENT_TYPES and lack the ignorable flag, so the session can’t be opened after a restart, reporting SessionFormatUnsupportedMigrationError: format v4 contains unknown event type "team/roster".

Writes now all go through appendPluginRecord (plugin:team-mode/*, with DSH enforcing ignorable: true).

Historical logs are converted using tools/session-repair.mjs. This must be run while DSH is closed (a running process is still appending to the same file):

# Inspect first: frame count, events to repair, before/after actual restorer verdict
node tools/session-repair.mjs --session "<session-file>"

# Batch: scan recent sessions, repair all legacy logs in one pass
node tools/session-repair.mjs --all
node tools/session-repair.mjs --all --write

# Single repair
node tools/session-repair.mjs --session "<session-file>" --write

The tool’s safety guarantees: splits by zstd frame structure (no longer magic-byte scanning, so 28 b5 2f fd in compressed data won’t cause mis-splits); only rewrites types unknown to this harness (built-in Agent Teams types team/task, team/mode, team/member, team/message/* are preserved as-is); unmodified frames are copied byte-for-byte with unchanged frame count; before writing, the result is fed to the harness’s own restoreReleasedV4Artifact self-check—if it fails, the write is refused (--force is required to bypass when the self-check is unavailable). A backup is created as *.bak-<timestamp> before writing; the write uses <file>.repairing-<pid> + rename.

If modules in the asar can’t be found, use --modules <...\app.asar\dsh\node_modules\@deepseek-ai> (needed for the self-check). After plugin load (1.5s) and on every team_status / /team status, a notice appears for any remaining legacy logs (session id + type), with the exact commands above.

Quick Start

  1. Open a session and describe what you want, e.g., “Build a landing page for the Team Mode plugin.”
  2. When multiple specialties are needed, the lead automatically calls team_form to form and staff the team. You can also explicitly request: “Form a team using the market research template.”
  3. Members work in parallel, reporting progress via team_report along the way; once all are done, the lead consolidates into a single response.
  4. For simple tasks where you don’t want a team: click the “👥 Team” button on the left of the input box, or send /team off.

Use Cases

Ideal for complex tasks requiring multi-person collaboration and clear division of labor: software development, video production, research & analysis, content operations, general projects, etc. The plugin runs with the current DSH process permissions; review the source code and license before installing.

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

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

Xiaoye