rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:xiebaiyuan/dsh-lead-mode
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Adds a Lead mode to DSH. One preset, two skills, one self-check command, two reminders.
The official Team runtime ships the tools. The older generation has spawn_teammate, send_message and team_task_*; the newer one builds members with subagent, and send_message, team_task_* and wait_agent come from the subagent tooling. When to delegate, whom to delegate to, how to wait for a result, how to write the closing message, how to merge several members' output: none of that is in the tools. This plugin adds that layer. It does not replace the official Team mode; it sits on top of it.
Once installed, the model works the way a Lead does: split the work, delegate it, accept the result. It delegates hands-on work instead of doing everything alone.
Five things. None of them touch dsh itself.
| Capability | Entry point | What you do |
|---|---|---|
| Lead mode preset | "Lead 模式" in the preset list | Switch to it |
| Lead working method skill | /skill lead-mode; the model also loads it on its own |
Nothing |
| Team digest skill | /skill team-digest; the model decides at wrap-up whether to write one |
Nothing |
| Dependency self-check | /lead-mode |
Run it when dependencies look wrong |
| Two upfront reminders | Automatic | Nothing |
Additive only. cordis.patch.yml holds exactly two insert rows: this plugin, and a new lead-mode preset. The official standard preset is untouched; the new one copies 21 of its rows field for field and swaps only the persona.
It registers no tools, listens to no agent lifecycle events, and intercepts no requests. lib/index.js writes to two registries only: skills (two entries) and commands (one), plus a single warn at startup. Uninstall the plugin and those entries are gone; official behaviour goes back to what it was.
The one place it can collide is a skill or command with the same name. If you already have lead-mode or team-digest, the host takes the first one it sees, warns, and ignores ours; a collision means we step aside.
Switch to it and the session's model becomes a Lead.
The preset is the official standard preset row for row, all 22 of them, with only the persona replaced. No tool is dropped: bash, file read/write, search, web, todo, skill, goal, plan, compaction, subagent and workflow are all there.
So switching to Lead mode costs you no capability. It changes how the model works, not what it can do.
A working method for splitting, delegating and accepting work, shipped inside the package.
It is not tied to the preset. Any session can load it, two ways:
/skill lead-mode yourselfIt covers: agreeing on the goal before starting, making a delegation self-contained, keeping write scopes disjoint, the list/get/claim/complete flow for shared tasks, how to wait on teammates (the two generations answer differently; see "Two generations of Agent Teams"), where a teammate's model comes from, and doing the final verification yourself.
Two of those facts only show up when you read the runtime source:
| Fact | Why it matters |
|---|---|
| A teammate settling notifies you automatically, carrying its closing message | Finish your turn after delegating; you do not need to sit and watch |
| A task change does not wake an idle Lead | Do not count on "it marked the task complete, so I know". The older generation wakes only a caller currently inside wait_agent; the newer one wakes nobody, because wait_agent only waits for your own inbox |
So the skill's default is: finish your turn after delegating and let the notification wake you (the user sees progress immediately), and use one wait_agent only when the current turn cannot continue without the result. Never loop wait_agent, and never poll with repeated list_agents.
Tell the teammate to put the deliverable in its closing message — that message is what comes back to you with the notification.
At wrap-up the team's output sits in N closing messages and N worklogs, with nothing merging them. This skill writes it into one reports/<YYYY-MM-DD>-<effort>.md.
| Item | Rule |
|---|---|
| When | Before the final answer, when the effort had 2 or more members, or ran 2 or more rounds |
| Where | reports/<YYYY-MM-DD>-<effort>.md, one path, written once at wrap-up |
| Six blocks | 结论 / 谁干了什么 / 验收证据 / 偏离与未验证 / 死路与决策 / 未决与下一步 (conclusion, who did what, acceptance evidence, deviations and unverified, dead ends and decisions, open items and next steps) |
| Source layers | Closing messages build the skeleton, worklogs add process detail, session logs as the fallback |
The six headings are fixed Chinese strings; an empty block says 无. Take the layers in order and stop at the first one that is enough. Details are in the team-digest skill.
/lead-mode reports the current dependency state.
| Reported | Content |
|---|---|
| Team runtime | Mounted or not; on the older generation, its maxMembers too |
| lead-mode preset | Registered or not |
| Missing pieces | The next step by generation: the session switch first on the newer one, the version-pinned install command on the older one |
Everything in place returns success. Anything missing returns error. Nothing is skipped silently.
When the session has no Team tools, it tells you to enable the official Agent Teams instead of letting the model work alone.
Two channels:
| Channel | Who sees it | When it appears |
|---|---|---|
| First persona section | The model | As soon as you switch to Lead mode. It is section 0 of the system prompt |
Startup warn and /lead-mode |
You | When the Team runtime is detected missing |
Both tell you to stop when the Team tools are missing. The persona only carries the check and the stop rule; the next step (the session switch on a newer host, the profile package on an older one) lives in /lead-mode output and the skill, so the per-turn context stays short.
On an older host the model will not pretend it can delegate, and it will not pass subagent off as a teammate. On a newer host subagent is how a teammate is built, so that caution does not apply.
Lead mode delegates through the official dsh Team runtime, which this plugin does not ship. That runtime comes in two shapes: the older one in the published host 0.2.2-rc.1, and the newer one on master only, not released, with no version number to point at.
| Dimension | Older generation: published host 0.2.2-rc.1 | Newer generation: master, unreleased |
|---|---|---|
| Defined in | @deepseek-ai/dsh-experimental-tool-agent-team@0.2.2-rc.1 inside the desktop app.asar |
packages/team/tool-agent-team and packages/subagent/* |
| Creating a member | spawn_teammate({ name, description, prompt, context }) |
subagent({ name?, description, prompt, cwd?, agent_preset?, provider?, model?, reasoning_effort? }); subagent_fork when the child inherits your history |
| Member identity | A durable named member carrying a target |
A session id plus an agent name; the name is a path from the root (e.g. reviewer/checker), and the root is always lead |
| Sending a message | send_message({ target, message }) |
send_message({ agent, message }), returns { messageId } |
| Interrupting | interrupt_agent({ target }) |
interrupt_agent({ agent }), returns { accepted } |
| Roster | list_agents({}) lists the Lead and its members |
list_agents({}) lists the whole tree; rows are { name, status, description? }, and status gains corrupt, unsupported, unavailable |
| Waiting semantics | Team-scoped: waits for member status, messages or task changes; returns noProgress at once when nobody can produce a change |
An ordinary subagent control tool: waits for the caller's own next input (a member message, a completion notice, the user cutting in); returns only { timedOut }, never noProgress |
| Task board owner | The four team_task_* tools; owner is a member name |
The same four tools; owner is a member name or a session id, and the check field is ownerId instead of ownerName |
| Turning it on | Install the profile package @deepseek-ai/dsh-experimental-agent-team-profile@0.2.2-rc.1 |
Do not install it: it is in RETIRED_BUNDLES, and app-boot removes it from the profile. The Team plugins ship with the base and web bundles; turn it on per session with the agent team switch in the model-and-reasoning menu (Chinese UI: 模型与推理等级 → 使用智能体团队) |
| Member model | Inherits the Lead; spawn_teammate takes no model parameter |
subagent takes provider, model and reasoning_effort (the standard preset already enables modelSelection); agent_preset picks a preset |
| Member cap | agentTeams.config.maxMembers |
The maxMembers config key is rejected, so there is no cap to read |
The newer generation drops spawn_teammate; wait_agent moves out of the Team tools into the subagent control tools, and its meaning becomes "wait for my own inbox".
Do not go by version string. Go by the tool list.
| What you see | Generation | Next step |
|---|---|---|
spawn_teammate is there |
Older | Install the profile package, next section |
No spawn_teammate, but subagent and team_task_* are there |
Newer | Nothing to install; make sure the session switch is on |
No team_task_* at all |
Team is off | Look for the session switch first; install the package only after confirming this is an older host that has no such switch |
The order matters. Telling someone on a newer host to install the profile package is wrong: app-boot removes that package, so it buys nothing.
dsh plugin --profile <your profile name> add @deepseek-ai/dsh-experimental-agent-team-profile@0.2.2-rc.1
0.2.2-rc.1 above is the current host line; replace it with your own dsh --version output.
The version pin is required, and it must equal the host version. Without it npm resolves latest, which is 0.1.5-alpha.2 — built for 0.1.x hosts, and it will not mount on a 0.2.2 host. next points at 0.2.2-rc.1, the right build for this line and the one this plugin's own text pins. The team packages pin exact dsh-* peers, so an older rc installs a peer set the newer host does not satisfy. Restart dsh afterwards.
Not sure whether it is installed? Run /lead-mode in dsh; it reports dependency state.
On a newer host, do not run the command above. @deepseek-ai/dsh-experimental-agent-team-profile sits in the official RETIRED_BUNDLES, and app-boot removes it from the profile. The Team plugins ship with the base and web bundles.
Turning it on is per session: open the model-and-reasoning menu and switch on the agent team option (Chinese UI: 模型与推理等级 → 使用智能体团队). The switch is session-scoped, not profile-scoped.
Two routes, pick one.
From npm:
dsh plugin --profile <your profile name> add dsh-lead-mode
From GitHub:
dsh plugin --profile <your profile name> add https://github.com/xiebaiyuan/dsh-lead-mode
Restart dsh afterwards, then pick "Lead 模式" in the preset list.
Three steps.
1. Switch to Lead mode. Pick "Lead 模式" in a new session's preset list. The first system-prompt section becomes the Lead persona, and its short pointer to the lead-mode skill goes in with it.
2. Run /lead-mode to check dependencies. This command delegates nothing; it only reports state. When something is missing it gives the next step by generation: the session switch on a newer host, the version-pinned install command on an older one.
3. Let the model work. With the delegation tools in place, the model splits the work, delegates to teammates, and waits for all of them before wrapping up. Without them, its first move is to tell you to enable the Team runtime.
You do not have to touch your preset. Install the plugin, keep standard or whatever you already use, and run /skill lead-mode in any session to load the method; the model also loads it when it judges the task needs it.
One thing is missing: the persona pointer only appears under the lead-mode preset. Run /lead-mode once before you start to check the dependencies; when the Team runtime is absent it gives the next step — the session switch on a newer host, the version-pinned install command on an older one.
team-digest works the same way. It is not tied to a preset, any session can use it, and the model decides at wrap-up whether a digest is worth writing.
This plugin only does Lead mode. Visualising Team state and comms is dsh-context's job, and that is a separate project:
| Item | Value |
|---|---|
| Repository | https://github.com/bowenliang123/dsh-context |
| Author | bowenliang123 |
| License | Apache-2.0 |
| Install | dsh plugin --profile <your profile name> add dsh-context |
It does not ship with this plugin, and it is not a dependency of it. This plugin only points at it from the docs and the skill.
Tool calls read one at a time. list_agents gives one line of status; team_task_list gives task ownership. Seeing who is doing what, and who said what to whom, takes a page.
dsh-context adds a Fleet / 编队 tab to every session (right of Context), and the right sidebar's Context panel carries the same card.
| Surface | Shows |
|---|---|
| Summary | Member status, live context, estimated cost, task progress |
| Agent Network | The current agent, its parents, every subagent, one card each |
| Fleet Members | Each member's role, model, latest reply, run time, steps, active task count |
| Tasks | Team tasks and subagent delegations together, grouped by owner, with blocked-by chains |
| Agent Comms | Who said what to whom. Team relays, mailbox deliveries, and the runtime's settlement notices |
Picking a member on the graph or the member board narrows Tasks and Agent Comms to that one agent. Opening a message in Agent Comms shows the full record: which session log it came from, its sequence, whether the runtime wrote the settlement notice or the child sent it, and the complete closing report.
The Lead mode skill names this entry point too, so the model points you here instead of restating progress itself.
This plugin ships none of the packages below. The host or an official bundle provides them; the ones with a version constraint are declared in peerDependencies, and the profile package is not among them — you install it yourself.
| Package | Requirement | Provided by | When missing |
|---|---|---|---|
@deepseek-ai/dsh-experimental-agent-team-profile |
0.2.2-rc.1 |
You install it explicitly, older-generation hosts only | On an older host only: cannot delegate; /lead-mode returns error; startup warn |
@deepseek-ai/dsh |
>=0.2.2-rc.1 |
Host | Will not install |
@deepseek-ai/cordis |
^4.0.5 |
Host | Will not install |
@deepseek-ai/schemastery |
^3.18.5 |
Host | Will not install |
@deepseek-ai/dsh-agent-preset-registry |
>=0.2.2-rc.1 |
Host | Preset row does not take effect; /lead-mode reports unknown |
@deepseek-ai/dsh-skill |
>=0.2.2-rc.1 |
Host | Skill not registered; startup warn |
@deepseek-ai/dsh-commands |
>=0.2.2-rc.1 |
Host | /lead-mode not registered; startup warn |
The target host version is dshTarget in package.json: 0.2.2-rc.1.
The first row holds for older-generation hosts only. On a newer host that package is in RETIRED_BUNDLES; there is nothing to install, and installing it does not stick.
@deepseek-ai/dsh-experimental-agent-team-profile has three dist-tags on npm:
| dist-tag | Version | Host it fits |
|---|---|---|
latest |
0.1.5-alpha.2 | 0.1.x |
alpha |
0.2.2-alpha.3 | an earlier preview of the 0.2.2 line |
next |
0.2.2-rc.1 | 0.2.2 |
Bare package name resolves latest, which installs 0.1.5-alpha.2. That build targets 0.1.x hosts and does not mount on a 0.2.2 host. After installing it, no Team tools appear in dsh and /lead-mode still reports "not mounted".
Measured on 2026-10-26 with npm 11.20.0:
$ npm view @deepseek-ai/dsh-experimental-agent-team-profile version
0.1.5-alpha.2
So every install command in this plugin's own text carries @0.2.2-rc.1, the current dshTarget: the /lead-mode output, the startup warn, and SKILL.md. The persona prefix deliberately carries no command, and test/preset.test.mjs asserts that, so the per-turn context stays small.
next now points at 0.2.2-rc.1, the build this plugin pins; alpha (0.2.2-alpha.3) is an earlier preview of the same line.
One place only: the persona. The other 21 rows are copied field for field from standard.
| Item | standard | lead-mode |
|---|---|---|
| persona prefix | You are a coding agent powered by the {{model}} model. |
Short Chinese Lead persona: the tool check, the stop rule, and a pointer to the lead-mode skill |
| other 21 rows | — | identical to standard, field for field |
The three classic subagent rows (tool-subagent-control, tool-subagent, tool-subagent-fork) stay enabled. list_agents now comes from tool-subagent-control itself, so there is no separate row for it. Nothing is disabled. The Team tools are a host decision, not a preset decision.
apply() in @deepseek-ai/dsh-experimental-tool-agent-team listens on the global agent/created event and installs Team tools on every agent. It is a host-plane plugin; putting it in a preset would leak it into every session.
So this plugin stays at: preset, two skills, reminder. Whether the Team runtime is on is decided by the user: through the official profile package on an older host, through the session switch on a newer one.
package.json package metadata; dsh.bundle.patch points at cordis.patch.yml
cordis.patch.yml two insert rows: this plugin and the lead-mode preset
lib/index.js host half: scan skills/, register each one, register the command, startup check
skills/lead-mode/ the Lead working method
skills/team-digest/ the team digest method
dsh-plugin.naming.json naming manifest
test/ behaviour assertions, zero dependencies
node --check lib/index.js
node --test test/*.test.mjs
node scripts/check-patch.mjs
Tests are zero-dependency. No npm install needed. The directory form of node --test is accepted only on Node 22+; on Node 20 the shell expands the glob.
Push a tag to trigger .github/workflows/release.yml. Publishing goes through npm Trusted Publishing (OIDC). No token is stored and no 2FA prompt appears.
Configure the Trusted Publisher once on npmjs.com:
| Field | Value |
|---|---|
| Organization or user | xiebaiyuan |
| Repository | dsh-lead-mode |
| Workflow filename | release.yml |
| Allowed actions | Tick npm publish |
npm stage publish is allowed by default. With only that ticked, CI can stage but a human still has to approve before the version goes live.
Once configured:
npm version patch --no-git-tag-version
git commit -am "chore: bump to 0.1.3"
git tag v0.1.3
git push origin main --tags
The tag version must equal package.json's version, or the workflow exits without publishing. npm rejects a second publish of the same version, so bump the version every time.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。