dsh-lead-mode 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,137 +1,176 @@
1
1
  # dsh-lead-mode
2
2
 
3
- DSH 的 Lead 模式。装好后多一个 `lead-mode` 预设、一个 `lead-mode` skill、一个 `/lead-mode` 命令。
3
+ English | [中文](README.zh-CN.md)
4
4
 
5
- 它做三件事,都不碰 dsh 本体:
5
+ Adds a Lead mode to DSH. One preset, one skill, one self-check command, two reminders.
6
6
 
7
- 1. 预设:切过去,模型就按 Lead 的方式干活,拆活、派活、验收。
8
- 2. skill:Lead 工作法写在里面,模型可以自己加载,你也可以手动加载。
9
- 3. 提醒:本会话没有 Team 工具时,模型第一句就告诉你先去开官方 Agent Teams,不硬干。
7
+ 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.
10
8
 
11
- ## 装之前先开 Team 运行时
9
+ ## What you get
12
10
 
13
- Lead 模式靠 `spawn_teammate`、`send_message`、`team_task_*` 这些工具派活。它们由 dsh 官方的 Team 运行时提供,本插件不带。
11
+ Four things. None of them touch dsh itself.
14
12
 
15
- ```bash
16
- dsh plugin --profile <你的 profile 名> add @deepseek-ai/dsh-experimental-agent-team-profile@0.2.1-rc.3
17
- ```
13
+ | Capability | Entry point | What you do |
14
+ |---|---|---|
15
+ | Lead mode preset | "Lead 模式" in the preset list | Switch to it |
16
+ | Lead working method skill | `/skill lead-mode`; the model also loads it on its own | Nothing |
17
+ | Dependency self-check | `/lead-mode` | Run it when dependencies look wrong |
18
+ | Two upfront reminders | Automatic | Nothing |
19
+
20
+ ### 1. The Lead mode preset
21
+
22
+ Switch to it and the session's model becomes a Lead.
23
+
24
+ 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.
25
+
26
+ So switching to Lead mode costs you no capability. It changes how the model works, not what it can do.
27
+
28
+ ### 2. The Lead working method skill
29
+
30
+ A working method for splitting, delegating and accepting work, shipped inside the package.
31
+
32
+ It is not tied to the preset. Any session can load it, two ways:
18
33
 
19
- **必须带版本号。** 不带会装到 `latest` 上的 0.1.5-alpha.2,那是给 0.1.x 宿主用的,在 0.2.1 宿主上挂不上。`next` 指向的 0.2.1-rc.3 才对。装完重启 dsh。
34
+ - The model loads it when it judges the task needs it (the skill is marked model-invocable)
35
+ - You run `/skill lead-mode` yourself
36
+
37
+ It 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, the rules for waiting on teammates, and doing the final verification yourself.
38
+
39
+ ### 3. The dependency self-check command
40
+
41
+ `/lead-mode` reports the current dependency state.
42
+
43
+ | Reported | Content |
44
+ |---|---|
45
+ | Team runtime | Mounted or not; its `maxMembers` when mounted |
46
+ | lead-mode preset | Registered or not |
47
+ | Missing pieces | The version-pinned install command |
48
+
49
+ Everything in place returns success. Anything missing returns error. Nothing is skipped silently.
50
+
51
+ ### 4. Two upfront reminders
52
+
53
+ This is the main reason the plugin exists: **when the session has no Team tools, it tells you to enable the official Agent Teams instead of letting the model work alone.**
54
+
55
+ Two channels:
56
+
57
+ | Channel | Who sees it | When it appears |
58
+ |---|---|---|
59
+ | First persona section | The model | As soon as you switch to Lead mode. It is section 0 of the system prompt |
60
+ | Startup warn and `/lead-mode` | You | When the Team runtime is detected missing |
20
61
 
21
- 不确定装没装?进 dsh 敲 `/lead-mode`,它会报依赖状态。
62
+ Both say the same thing: without the `spawn_teammate` tool set, stop and tell the user what to install.
22
63
 
23
- ## 装本插件
64
+ The model will not pretend it can delegate, and it will not pass `subagent` off as a teammate.
24
65
 
25
- 两条路,选一条。
66
+ ## Enable the Team runtime first
26
67
 
27
- 从 npm:
68
+ Lead mode delegates through `spawn_teammate`, `send_message`, and `team_task_*`. Those come from the official dsh Team runtime, which this plugin does not ship.
28
69
 
29
70
  ```bash
30
- dsh plugin --profile <你的 profile 名> add dsh-lead-mode
71
+ dsh plugin --profile <your profile name> add @deepseek-ai/dsh-experimental-agent-team-profile@0.2.1-rc.3
31
72
  ```
32
73
 
33
- 从 GitHub(还没发 npm 时用这条):
74
+ **The version pin is required.** 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.1 host. `next` points at 0.2.1-rc.3, which is the correct one. Restart dsh afterwards.
75
+
76
+ Not sure whether it is installed? Run `/lead-mode` in dsh; it reports dependency state.
77
+
78
+ ## Install this plugin
79
+
80
+ Two routes, pick one.
81
+
82
+ From npm:
34
83
 
35
84
  ```bash
36
- dsh plugin --profile <你的 profile 名> add https://github.com/xiebaiyuan/dsh-lead-mode
85
+ dsh plugin --profile <your profile name> add dsh-lead-mode
37
86
  ```
38
87
 
39
- 装完重启 dsh。在预设列表里选「Lead 模式」。
88
+ From GitHub:
40
89
 
41
- ## 用法
90
+ ```bash
91
+ dsh plugin --profile <your profile name> add https://github.com/xiebaiyuan/dsh-lead-mode
92
+ ```
42
93
 
43
- 三步。
94
+ Restart dsh afterwards, then pick "Lead 模式" in the preset list.
44
95
 
45
- **1. 切到 Lead 模式。** 新会话的预设列表里选「Lead 模式」。切过去之后,模型的 system prompt 第一段就换成 Lead 人设,开头那段提醒跟着进去。
96
+ ## Usage
46
97
 
47
- **2. 敲 `/lead-mode` 查依赖。** 这条命令不派活,只报状态:
98
+ Three steps.
48
99
 
49
- - Team 运行时挂没挂,挂了报 `maxMembers`
50
- - `lead-mode` 预设注册没注册
51
- - 缺东西时给带版本号的安装命令
100
+ **1. Switch to Lead mode.** Pick "Lead 模式" in a new session's preset list. The first system-prompt section becomes the Lead persona, and the reminder at its top goes in with it.
52
101
 
53
- 依赖齐了返回 success,缺东西返回 error。
102
+ **2. Run `/lead-mode` to check dependencies.** This command delegates nothing; it only reports state. When something is missing it prints the version-pinned install command.
54
103
 
55
- **3. 让模型干活。** 派活的工具齐了,模型会自己拆活、派给 teammate、等齐再收尾。工具不齐,它第一句就是让你去开 Team 运行时,不会自己硬干,也不会拿 `subagent` 顶替 teammate。
104
+ **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.
56
105
 
57
- ## 依赖的官方 bundle 与版本
106
+ ## Required official bundles and versions
58
107
 
59
- 本插件不捆绑下面这些包。它们由宿主或官方 bundle 提供,本插件只在 `peerDependencies` 里声明版本要求。
108
+ This plugin ships none of the packages below. The host or an official bundle provides them; this plugin only declares version requirements in `peerDependencies`.
60
109
 
61
- | 包 | 版本要求 | 谁提供 | 缺了会怎样 |
110
+ | Package | Requirement | Provided by | When missing |
62
111
  |---|---|---|---|
63
- | `@deepseek-ai/dsh-experimental-agent-team-profile` | `0.2.1-rc.3` | 用户显式安装 | 派不了活,`/lead-mode` 报 error,启动 warn |
64
- | `@deepseek-ai/dsh` | `>=0.2.1-rc.2` | 宿主 | 装不上 |
65
- | `@deepseek-ai/cordis` | `^4.0.5` | 宿主 | 装不上 |
66
- | `@deepseek-ai/schemastery` | `^3.18.5` | 宿主 | 装不上 |
67
- | `@deepseek-ai/dsh-agent-preset-registry` | `>=0.2.1-rc.2` | 宿主 | 预设行不生效,`/lead-mode` 报「查不到」 |
68
- | `@deepseek-ai/dsh-skill` | `>=0.2.1-rc.2` | 宿主 | skill 不注册,启动 warn |
69
- | `@deepseek-ai/dsh-commands` | `>=0.2.1-rc.2` | 宿主 | `/lead-mode` 不注册,启动 warn |
112
+ | `@deepseek-ai/dsh-experimental-agent-team-profile` | `0.2.1-rc.3` | You install it explicitly | Cannot delegate; `/lead-mode` returns error; startup warn |
113
+ | `@deepseek-ai/dsh` | `>=0.2.1-rc.2` | Host | Will not install |
114
+ | `@deepseek-ai/cordis` | `^4.0.5` | Host | Will not install |
115
+ | `@deepseek-ai/schemastery` | `^3.18.5` | Host | Will not install |
116
+ | `@deepseek-ai/dsh-agent-preset-registry` | `>=0.2.1-rc.2` | Host | Preset row does not take effect; `/lead-mode` reports unknown |
117
+ | `@deepseek-ai/dsh-skill` | `>=0.2.1-rc.2` | Host | Skill not registered; startup warn |
118
+ | `@deepseek-ai/dsh-commands` | `>=0.2.1-rc.2` | Host | `/lead-mode` not registered; startup warn |
70
119
 
71
- 目标宿主版本写在 `package.json` 的 `dshTarget` 字段:`0.2.1-rc.3`。
120
+ The target host version is `dshTarget` in `package.json`: `0.2.1-rc.3`.
72
121
 
73
- ## 为什么安装命令要带版本号
122
+ ## Why the install command pins a version
74
123
 
75
- `@deepseek-ai/dsh-experimental-agent-team-profile` 在 npm 上有三个 dist-tag:
124
+ `@deepseek-ai/dsh-experimental-agent-team-profile` has three dist-tags on npm:
76
125
 
77
- | dist-tag | 版本 | 配哪个宿主 |
126
+ | dist-tag | Version | Host it fits |
78
127
  |---|---|---|
79
128
  | `latest` | 0.1.5-alpha.2 | 0.1.x |
80
- | `alpha` | 0.2.1-alpha.5 | 0.2.1 预发布线 |
129
+ | `alpha` | 0.2.1-alpha.5 | the 0.2.1 prerelease line |
81
130
  | `next` | 0.2.1-rc.3 | 0.2.1 |
82
131
 
83
- 裸写包名,npm 解析 `latest`,装到 0.1.5-alpha.2。这个版本是给 0.1.x 宿主用的,在 0.2.1 宿主上挂不上。装完 dsh 里看不到 Team 工具,`/lead-mode` 还是报「未挂载」。
132
+ 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.1 host. After installing it, no Team tools appear in dsh and `/lead-mode` still reports "not mounted".
84
133
 
85
- 实测(2026-10-26,npm 11.20.0):
134
+ Measured on 2026-10-26 with npm 11.20.0:
86
135
 
87
136
  ```
88
137
  $ npm view @deepseek-ai/dsh-experimental-agent-team-profile version
89
138
  0.1.5-alpha.2
90
139
  ```
91
140
 
92
- 所以本插件里所有出现安装命令的地方都带 `@0.2.1-rc.3`:persona prefix、`/lead-mode` 输出、启动 warn、SKILL.md。`test/preset.test.mjs` 与 `test/smoke.test.mjs` 都断言这个字符串在,防止以后被改回裸包名。
141
+ So every install command in this plugin carries `@0.2.1-rc.3`: the persona prefix, the `/lead-mode` output, the startup warn, and SKILL.md. `test/preset.test.mjs` and `test/smoke.test.mjs` both assert that string, so a future edit cannot quietly drop back to the bare name.
93
142
 
94
- 要装 `alpha` 线的话自己换成 `@0.2.1-alpha.5`,别用裸名。
143
+ For the `alpha` line, pin `@0.2.1-alpha.5` yourself; do not use the bare name.
95
144
 
96
- ## 与官方 standard 预设的差异
145
+ ## Difference from the official standard preset
97
146
 
98
- 只有 persona 一处。其余 21 行逐字段照抄 `standard`。
147
+ One place only: the persona. The other 21 rows are copied field for field from `standard`.
99
148
 
100
- | 项 | standard | lead-mode |
149
+ | Item | standard | lead-mode |
101
150
  |---|---|---|
102
- | persona prefix | `You are a coding agent powered by the {{model}} model.` | 中文 Lead 人设 + Agent Teams 前置检查 |
103
- | 其余 21 行 | — | 与 standard 逐字段相同 |
104
-
105
- classic subagent 四行(`tool-subagent-control`、`tool-subagent-list-agents`、`tool-subagent`、`tool-subagent-fork`)保持启用,没有禁用。Team 工具由 host 决定,不由预设决定。
106
-
107
- ## 为什么预设里不塞 Team 运行时
108
-
109
- `@deepseek-ai/dsh-experimental-tool-agent-team` 的 `apply()` 监听全局 `agent/created`,给每一个 agent 装 Team 工具。它是 host 平面的插件,放进预设会漏到所有会话。
110
-
111
- 所以本插件的定位是:预设 + skill + 提醒。开不开 Team 运行时,用户用官方 profile 包决定。
151
+ | persona prefix | `You are a coding agent powered by the {{model}} model.` | Chinese Lead persona plus an Agent Teams precondition check |
152
+ | other 21 rows | — | identical to standard, field for field |
112
153
 
113
- ## `/lead-mode` 输出什么
154
+ The four classic subagent rows (`tool-subagent-control`, `tool-subagent-list-agents`, `tool-subagent`, `tool-subagent-fork`) stay enabled. Nothing is disabled. The Team tools are a host decision, not a preset decision.
114
155
 
115
- 三条信息:
156
+ ## Why the preset does not carry the Team runtime
116
157
 
117
- - Team 运行时在不在,在的话报 `maxMembers`
118
- - `lead-mode` 预设注册没有
119
- - 缺东西时给带版本号的安装命令
158
+ `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.
120
159
 
121
- 依赖齐了返回 success,缺东西返回 error。缺东西不会静默。
160
+ So this plugin stays at: preset, skill, reminder. Whether the Team runtime is on is decided by the user through the official profile package.
122
161
 
123
- ## 目录
162
+ ## Layout
124
163
 
125
164
  ```
126
- package.json 包元数据,dsh.bundle.patch 指向 cordis.patch.yml
127
- cordis.patch.yml 两行 insert:本插件 + lead-mode 预设
128
- lib/index.js host 半边:注册 skill、注册命令、启动自检
129
- skills/lead-mode/ Lead 工作法正文
130
- dsh-plugin.naming.json 命名清单
131
- test/ 行为断言,零依赖
165
+ package.json package metadata; dsh.bundle.patch points at cordis.patch.yml
166
+ cordis.patch.yml two insert rows: this plugin and the lead-mode preset
167
+ lib/index.js host half: register the skill, register the command, startup check
168
+ skills/lead-mode/ the Lead working method
169
+ dsh-plugin.naming.json naming manifest
170
+ test/ behaviour assertions, zero dependencies
132
171
  ```
133
172
 
134
- ## 开发
173
+ ## Development
135
174
 
136
175
  ```bash
137
176
  node --check lib/index.js
@@ -139,8 +178,34 @@ node --test test/*.test.mjs
139
178
  node scripts/check-patch.mjs
140
179
  ```
141
180
 
142
- 测试零依赖,不用 `npm install`。`test/` 目录形式只在 Node 22+ 被接受,Node 20 会用 glob 展开。
181
+ 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.
182
+
183
+ ## Releasing
184
+
185
+ 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.
186
+
187
+ Configure the Trusted Publisher once on npmjs.com:
188
+
189
+ | Field | Value |
190
+ |---|---|
191
+ | Organization or user | `xiebaiyuan` |
192
+ | Repository | `dsh-lead-mode` |
193
+ | Workflow filename | `release.yml` |
194
+ | Allowed actions | Tick `npm publish` |
195
+
196
+ `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.
197
+
198
+ Once configured:
199
+
200
+ ```bash
201
+ npm version patch --no-git-tag-version
202
+ git commit -am "chore: bump to 0.1.3"
203
+ git tag v0.1.3
204
+ git push origin main --tags
205
+ ```
206
+
207
+ 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.
143
208
 
144
209
  ## License
145
210
 
146
- MIT
211
+ MIT
@@ -0,0 +1,211 @@
1
+ # dsh-lead-mode
2
+
3
+ 中文 | [English](README.md)
4
+
5
+ 给 DSH 加一个 Lead 模式。一个预设、一个 skill、一个自检命令、两条前置提醒。
6
+
7
+ 装好后模型能按 Lead 的方式干活:拆活、派活、验收。动手的活尽量派出去。
8
+
9
+ ## 提供的能力
10
+
11
+ 四样东西,都不碰 dsh 本体。
12
+
13
+ | 能力 | 入口 | 你要做什么 |
14
+ |---|---|---|
15
+ | Lead 模式预设 | 预设下拉里的「Lead 模式」 | 切过去 |
16
+ | Lead 工作法 skill | `/skill lead-mode`,模型也会自己加载 | 不用管 |
17
+ | 依赖自检 | `/lead-mode` | 依赖不对时敲一下 |
18
+ | 两层前置提醒 | 自动 | 不用管 |
19
+
20
+ ### 一、Lead 模式预设
21
+
22
+ 切过去,这个会话的模型就换成 Lead 人设。
23
+
24
+ 预设内容等于官方 `standard` 预设的全部 22 行,只把 persona 换掉。工具一个不少:bash、文件读写、搜索、web、todo、skill、goal、plan、compaction、subagent、workflow 全在。
25
+
26
+ 也就是说,切到 Lead 模式不会让你少任何能力,只是换了工作方式。
27
+
28
+ ### 二、Lead 工作法 skill
29
+
30
+ 一套拆活、派活、验收的方法,随包分发。
31
+
32
+ 它不绑预设。任何会话都能加载,两条路:
33
+
34
+ - 模型判断需要时自己加载(skill 标记为模型可调用)
35
+ - 你直接敲 `/skill lead-mode`
36
+
37
+ 覆盖这些内容:开工前对齐目标、派活必须自包含、写作用域不重叠、共享任务的 list/get/claim/complete 流程、等 teammate 的规矩、最终验证自己做。
38
+
39
+ ### 三、依赖自检命令
40
+
41
+ `/lead-mode` 报告当前依赖状态。
42
+
43
+ | 报什么 | 内容 |
44
+ |---|---|
45
+ | Team 运行时 | 挂没挂;挂了报 `maxMembers` |
46
+ | lead-mode 预设 | 注册没注册 |
47
+ | 缺东西时 | 给带版本号的安装命令 |
48
+
49
+ 依赖齐全返回 success,缺东西返回 error。不会静默跳过。
50
+
51
+ ### 四、两层前置提醒
52
+
53
+ 这是本插件存在的主要理由:**本会话没有 Team 工具时,提醒你去开官方 Agent Teams,而不是让模型硬干。**
54
+
55
+ 走两条路:
56
+
57
+ | 通道 | 谁看得见 | 什么时候出现 |
58
+ |---|---|---|
59
+ | persona 第一段 | 模型 | 一切到 Lead 模式就在。system prompt 的第 0 段 |
60
+ | 启动 warn 与 `/lead-mode` | 用户 | 检测到 Team 运行时缺失时 |
61
+
62
+ 两条讲同一件事:没有 `spawn_teammate` 这套工具就先停下来,告诉你装什么、怎么装。
63
+
64
+ 模型不会假装能派活,也不会拿 `subagent` 顶替 teammate。
65
+
66
+ ## 装之前先开 Team 运行时
67
+
68
+ Lead 模式靠 `spawn_teammate`、`send_message`、`team_task_*` 这些工具派活。它们由 dsh 官方的 Team 运行时提供,本插件不带。
69
+
70
+ ```bash
71
+ dsh plugin --profile <你的 profile 名> add @deepseek-ai/dsh-experimental-agent-team-profile@0.2.1-rc.3
72
+ ```
73
+
74
+ **必须带版本号。** 不带会装到 `latest` 上的 0.1.5-alpha.2,那是给 0.1.x 宿主用的,在 0.2.1 宿主上挂不上。`next` 指向的 0.2.1-rc.3 才对。装完重启 dsh。
75
+
76
+ 不确定装没装?进 dsh 敲 `/lead-mode`,它会报依赖状态。
77
+
78
+ ## 装本插件
79
+
80
+ 两条路,选一条。
81
+
82
+ 从 npm:
83
+
84
+ ```bash
85
+ dsh plugin --profile <你的 profile 名> add dsh-lead-mode
86
+ ```
87
+
88
+ 从 GitHub:
89
+
90
+ ```bash
91
+ dsh plugin --profile <你的 profile 名> add https://github.com/xiebaiyuan/dsh-lead-mode
92
+ ```
93
+
94
+ 装完重启 dsh。在预设列表里选「Lead 模式」。
95
+
96
+ ## 用法
97
+
98
+ 三步。
99
+
100
+ **1. 切到 Lead 模式。** 新会话的预设列表里选「Lead 模式」。切过去之后,模型 system prompt 的第一段就换成 Lead 人设,开头那段提醒跟着进去。
101
+
102
+ **2. 敲 `/lead-mode` 查依赖。** 这条命令不派活,只报状态。缺东西时它给出带版本号的安装命令。
103
+
104
+ **3. 让模型干活。** 派活工具齐了,模型会自己拆活、派给 teammate、等齐再收尾。工具不齐,它第一句就是让你去开 Team 运行时。
105
+
106
+ ## 依赖的官方 bundle 与版本
107
+
108
+ 本插件不捆绑下面这些包。它们由宿主或官方 bundle 提供,本插件只在 `peerDependencies` 里声明版本要求。
109
+
110
+ | 包 | 版本要求 | 谁提供 | 缺了会怎样 |
111
+ |---|---|---|---|
112
+ | `@deepseek-ai/dsh-experimental-agent-team-profile` | `0.2.1-rc.3` | 用户显式安装 | 派不了活,`/lead-mode` 报 error,启动 warn |
113
+ | `@deepseek-ai/dsh` | `>=0.2.1-rc.2` | 宿主 | 装不上 |
114
+ | `@deepseek-ai/cordis` | `^4.0.5` | 宿主 | 装不上 |
115
+ | `@deepseek-ai/schemastery` | `^3.18.5` | 宿主 | 装不上 |
116
+ | `@deepseek-ai/dsh-agent-preset-registry` | `>=0.2.1-rc.2` | 宿主 | 预设行不生效,`/lead-mode` 报「查不到」 |
117
+ | `@deepseek-ai/dsh-skill` | `>=0.2.1-rc.2` | 宿主 | skill 不注册,启动 warn |
118
+ | `@deepseek-ai/dsh-commands` | `>=0.2.1-rc.2` | 宿主 | `/lead-mode` 不注册,启动 warn |
119
+
120
+ 目标宿主版本写在 `package.json` 的 `dshTarget` 字段:`0.2.1-rc.3`。
121
+
122
+ ## 为什么安装命令要带版本号
123
+
124
+ `@deepseek-ai/dsh-experimental-agent-team-profile` 在 npm 上有三个 dist-tag:
125
+
126
+ | dist-tag | 版本 | 配哪个宿主 |
127
+ |---|---|---|
128
+ | `latest` | 0.1.5-alpha.2 | 0.1.x |
129
+ | `alpha` | 0.2.1-alpha.5 | 0.2.1 预发布线 |
130
+ | `next` | 0.2.1-rc.3 | 0.2.1 |
131
+
132
+ 裸写包名,npm 解析 `latest`,装到 0.1.5-alpha.2。这个版本是给 0.1.x 宿主用的,在 0.2.1 宿主上挂不上。装完 dsh 里看不到 Team 工具,`/lead-mode` 还是报「未挂载」。
133
+
134
+ 实测(2026-10-26,npm 11.20.0):
135
+
136
+ ```
137
+ $ npm view @deepseek-ai/dsh-experimental-agent-team-profile version
138
+ 0.1.5-alpha.2
139
+ ```
140
+
141
+ 所以本插件里所有出现安装命令的地方都带 `@0.2.1-rc.3`:persona prefix、`/lead-mode` 输出、启动 warn、SKILL.md。`test/preset.test.mjs` 与 `test/smoke.test.mjs` 都断言这个字符串在,防止以后被改回裸包名。
142
+
143
+ 要装 `alpha` 线的话自己换成 `@0.2.1-alpha.5`,别用裸名。
144
+
145
+ ## 与官方 standard 预设的差异
146
+
147
+ 只有 persona 一处。其余 21 行逐字段照抄 `standard`。
148
+
149
+ | 项 | standard | lead-mode |
150
+ |---|---|---|
151
+ | persona prefix | `You are a coding agent powered by the {{model}} model.` | 中文 Lead 人设 + Agent Teams 前置检查 |
152
+ | 其余 21 行 | — | 与 standard 逐字段相同 |
153
+
154
+ classic subagent 四行(`tool-subagent-control`、`tool-subagent-list-agents`、`tool-subagent`、`tool-subagent-fork`)保持启用,没有禁用。Team 工具由 host 决定,不由预设决定。
155
+
156
+ ## 为什么预设里不塞 Team 运行时
157
+
158
+ `@deepseek-ai/dsh-experimental-tool-agent-team` 的 `apply()` 监听全局 `agent/created`,给每一个 agent 装 Team 工具。它是 host 平面的插件,放进预设会漏到所有会话。
159
+
160
+ 所以本插件的定位是:预设 + skill + 提醒。开不开 Team 运行时,用户用官方 profile 包决定。
161
+
162
+ ## 目录
163
+
164
+ ```
165
+ package.json 包元数据,dsh.bundle.patch 指向 cordis.patch.yml
166
+ cordis.patch.yml 两行 insert:本插件 + lead-mode 预设
167
+ lib/index.js host 半边:注册 skill、注册命令、启动自检
168
+ skills/lead-mode/ Lead 工作法正文
169
+ dsh-plugin.naming.json 命名清单
170
+ test/ 行为断言,零依赖
171
+ ```
172
+
173
+ ## 开发
174
+
175
+ ```bash
176
+ node --check lib/index.js
177
+ node --test test/*.test.mjs
178
+ node scripts/check-patch.mjs
179
+ ```
180
+
181
+ 测试零依赖,不用 `npm install`。`test/` 目录形式只在 Node 22+ 被接受,Node 20 会用 glob 展开。
182
+
183
+ ## 发新版本
184
+
185
+ 推 tag 触发 `.github/workflows/release.yml`,发布走 npm 的 Trusted Publishing(OIDC)。不存 token,也不弹 2FA。
186
+
187
+ 发之前先在 npmjs.com 配一次 Trusted Publisher:
188
+
189
+ | 字段 | 填什么 |
190
+ |---|---|
191
+ | Organization or user | `xiebaiyuan` |
192
+ | Repository | `dsh-lead-mode` |
193
+ | Workflow filename | `release.yml` |
194
+ | Allowed actions | 勾上 `npm publish` |
195
+
196
+ `npm stage publish` 是默认就允许的,只勾它的话 CI 只能暂存,还得人工 approve 才上线。
197
+
198
+ 配好后:
199
+
200
+ ```bash
201
+ npm version patch --no-git-tag-version
202
+ git commit -am "chore: bump to 0.1.3"
203
+ git tag v0.1.3
204
+ git push origin main --tags
205
+ ```
206
+
207
+ tag 的版本必须和 `package.json` 一致,否则 workflow 直接退出,不发。同一个版本发第二次会被 npm 拒掉,所以每次发都要先提版本号。
208
+
209
+ ## License
210
+
211
+ MIT
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-lead-mode",
3
- "version": "0.1.0",
4
- "description": "Lead 模式:一个 agent 预设、一个 skill、两条依赖提醒。预设与官方 standard 的差异只有 persona 一处。",
3
+ "version": "0.1.2",
4
+ "description": "Lead mode for DSH: an agent preset, a working-method skill, a dependency self-check, and two reminders that tell you to enable the official Agent Teams. | 给 DSH 加 Lead 模式:预设、skill、依赖自检、两条前置提醒。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -13,7 +13,7 @@
13
13
  "skills",
14
14
  "cordis.patch.yml",
15
15
  "README.md",
16
- "README.en.md",
16
+ "README.zh-CN.md",
17
17
  "LICENSE"
18
18
  ],
19
19
  "engines": {
package/README.en.md DELETED
@@ -1,146 +0,0 @@
1
- # dsh-lead-mode
2
-
3
- Lead mode for DSH. Adds one `lead-mode` preset, one `lead-mode` skill, and one `/lead-mode` command.
4
-
5
- It does three things, none of which touch dsh itself:
6
-
7
- 1. Preset: switch to it and the model works as a Lead — decomposing, delegating, accepting.
8
- 2. Skill: the Lead working method, loadable by the model or by you.
9
- 3. Reminder: when the session has no Team tools, the model's first move is to tell you to enable the official Agent Teams instead of doing everything alone.
10
-
11
- ## Enable the Team runtime first
12
-
13
- Lead mode delegates through `spawn_teammate`, `send_message`, and `team_task_*`. Those come from the official dsh Team runtime, which this plugin does not ship.
14
-
15
- ```bash
16
- dsh plugin --profile <your profile name> add @deepseek-ai/dsh-experimental-agent-team-profile@0.2.1-rc.3
17
- ```
18
-
19
- **The version pin is required.** 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.1 host. `next` points at 0.2.1-rc.3, which is the correct one. Restart dsh afterwards.
20
-
21
- Not sure whether it is installed? Run `/lead-mode` in dsh; it reports dependency state.
22
-
23
- ## Install this plugin
24
-
25
- Two routes, pick one.
26
-
27
- From npm:
28
-
29
- ```bash
30
- dsh plugin --profile <your profile name> add dsh-lead-mode
31
- ```
32
-
33
- From GitHub (use this before the npm release):
34
-
35
- ```bash
36
- dsh plugin --profile <your profile name> add https://github.com/xiebaiyuan/dsh-lead-mode
37
- ```
38
-
39
- Restart dsh afterwards, then pick "Lead 模式" in the preset list.
40
-
41
- ## Usage
42
-
43
- Three steps.
44
-
45
- **1. Switch to Lead mode.** Pick "Lead 模式" in a new session's preset list. The model's first system-prompt section becomes the Lead persona, and the reminder at its top goes in with it.
46
-
47
- **2. Run `/lead-mode` to check dependencies.** This command delegates nothing; it only reports state:
48
-
49
- - Whether the Team runtime is mounted, and its `maxMembers` when it is
50
- - Whether the `lead-mode` preset registered
51
- - The version-pinned install command when something is missing
52
-
53
- Returns success when everything is in place, error when something is missing.
54
-
55
- **3. Let the model work.** With the delegation tools in place, the model decomposes, 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 — it will not do everything alone, and it will not substitute `subagent` for a teammate.
56
-
57
- ## Required official bundles and versions
58
-
59
- This plugin ships none of the packages below. The host or an official bundle provides them; this plugin only declares version requirements in `peerDependencies`.
60
-
61
- | Package | Requirement | Provided by | When missing |
62
- |---|---|---|---|
63
- | `@deepseek-ai/dsh-experimental-agent-team-profile` | `0.2.1-rc.3` | You install it explicitly | Cannot delegate; `/lead-mode` returns error; startup warn |
64
- | `@deepseek-ai/dsh` | `>=0.2.1-rc.2` | Host | Will not install |
65
- | `@deepseek-ai/cordis` | `^4.0.5` | Host | Will not install |
66
- | `@deepseek-ai/schemastery` | `^3.18.5` | Host | Will not install |
67
- | `@deepseek-ai/dsh-agent-preset-registry` | `>=0.2.1-rc.2` | Host | Preset row does not take effect; `/lead-mode` reports unknown |
68
- | `@deepseek-ai/dsh-skill` | `>=0.2.1-rc.2` | Host | Skill not registered; startup warn |
69
- | `@deepseek-ai/dsh-commands` | `>=0.2.1-rc.2` | Host | `/lead-mode` not registered; startup warn |
70
-
71
- The target host version is `dshTarget` in `package.json`: `0.2.1-rc.3`.
72
-
73
- ## Why the install command pins a version
74
-
75
- `@deepseek-ai/dsh-experimental-agent-team-profile` has three dist-tags on npm:
76
-
77
- | dist-tag | Version | Host it fits |
78
- |---|---|---|
79
- | `latest` | 0.1.5-alpha.2 | 0.1.x |
80
- | `alpha` | 0.2.1-alpha.5 | the 0.2.1 prerelease line |
81
- | `next` | 0.2.1-rc.3 | 0.2.1 |
82
-
83
- 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.1 host. After installing it, no Team tools appear in dsh and `/lead-mode` still reports "not mounted".
84
-
85
- Measured on 2026-10-26 with npm 11.20.0:
86
-
87
- ```
88
- $ npm view @deepseek-ai/dsh-experimental-agent-team-profile version
89
- 0.1.5-alpha.2
90
- ```
91
-
92
- So every install command in this plugin carries `@0.2.1-rc.3`: the persona prefix, the `/lead-mode` output, the startup warn, and SKILL.md. `test/preset.test.mjs` and `test/smoke.test.mjs` both assert that string, so a future edit cannot quietly drop back to the bare name.
93
-
94
- For the `alpha` line, pin `@0.2.1-alpha.5` yourself; do not use the bare name.
95
-
96
- ## Difference from the official standard preset
97
-
98
- One place only: the persona. The other 21 rows are copied field for field from `standard`.
99
-
100
- | Item | standard | lead-mode |
101
- |---|---|---|
102
- | persona prefix | `You are a coding agent powered by the {{model}} model.` | Chinese Lead persona plus an Agent Teams precondition check |
103
- | other 21 rows | — | identical to standard, field for field |
104
-
105
- The four classic subagent rows (`tool-subagent-control`, `tool-subagent-list-agents`, `tool-subagent`, `tool-subagent-fork`) stay enabled. Nothing is disabled. The Team tools are a host decision, not a preset decision.
106
-
107
- ## Why the preset does not carry the Team runtime
108
-
109
- `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.
110
-
111
- So this plugin stays at: preset, skill, reminder. Whether the Team runtime is on is decided by the user through the official profile package.
112
-
113
- ## What `/lead-mode` reports
114
-
115
- Three facts:
116
-
117
- - Whether the Team runtime is mounted, and its `maxMembers` when it is
118
- - Whether the `lead-mode` preset registered
119
- - The version-pinned install command when something is missing
120
-
121
- Returns success when everything is in place, error when something is missing. Missing dependencies are never silent.
122
-
123
- ## Layout
124
-
125
- ```
126
- package.json package metadata; dsh.bundle.patch points at cordis.patch.yml
127
- cordis.patch.yml two insert rows: this plugin and the lead-mode preset
128
- lib/index.js host half: register the skill, register the command, startup check
129
- skills/lead-mode/ the Lead working method
130
- dsh-plugin.naming.json naming manifest
131
- test/ behaviour assertions, zero dependencies
132
- ```
133
-
134
- ## Development
135
-
136
- ```bash
137
- node --check lib/index.js
138
- node --test test/
139
- node scripts/check-patch.mjs
140
- ```
141
-
142
- Tests are zero-dependency. No `npm install` needed.
143
-
144
- ## License
145
-
146
- MIT