dsh-lead-mode 0.1.3 → 0.1.4
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 +6 -4
- package/README.zh-CN.md +6 -4
- package/cordis.patch.yml +3 -3
- package/package.json +1 -1
- package/skills/lead-mode/SKILL.md +37 -24
package/README.md
CHANGED
|
@@ -38,12 +38,14 @@ It covers: agreeing on the goal before starting, making a delegation self-contai
|
|
|
38
38
|
|
|
39
39
|
Two of those facts only show up when you read the runtime source:
|
|
40
40
|
|
|
41
|
-
| Fact |
|
|
41
|
+
| Fact | Why it matters |
|
|
42
42
|
|---|---|
|
|
43
|
-
|
|
|
44
|
-
| A task change
|
|
43
|
+
| A teammate settling notifies you automatically, carrying its closing message | Finish your turn after delegating; you do not need to sit and watch |
|
|
44
|
+
| A task change does not wake an idle Lead | Do not count on "it marked the task complete, so I know"; that path only wakes a caller currently inside `wait_agent` |
|
|
45
45
|
|
|
46
|
-
So the skill's default is: finish your turn after delegating and let the
|
|
46
|
+
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`.
|
|
47
|
+
|
|
48
|
+
Tell the teammate to put the **deliverable in its closing message** — that message is what comes back to you with the notification.
|
|
47
49
|
|
|
48
50
|
### 3. The dependency self-check command
|
|
49
51
|
|
package/README.zh-CN.md
CHANGED
|
@@ -38,12 +38,14 @@
|
|
|
38
38
|
|
|
39
39
|
其中两条是读源码才确认的,容易踩:
|
|
40
40
|
|
|
41
|
-
| 事实 |
|
|
41
|
+
| 事实 | 为什么重要 |
|
|
42
42
|
|---|---|
|
|
43
|
-
|
|
|
44
|
-
| task
|
|
43
|
+
| teammate 收工会自动通知你,通知里带它收尾那条消息 | 派完活结束回合就够,不用盯着等 |
|
|
44
|
+
| task 变更不会唤醒空闲的 Lead | 别指望「它把 task 标 complete 了我就知道了」,那条路只唤醒正在 `wait_agent` 的调用方 |
|
|
45
45
|
|
|
46
|
-
所以 skill
|
|
46
|
+
所以 skill 的默认建议是:派完活就结束回合等通知(用户立刻看到进展),只有本回合内就必须拿到结果时才用一次 `wait_agent`。不要 `wait_agent` 套循环,也不要反复 `list_agents` 轮询。
|
|
47
|
+
|
|
48
|
+
派活 prompt 里要要求 teammate **把交付物写进收尾那条消息**——那条消息会随通知回到你手上。
|
|
47
49
|
|
|
48
50
|
### 三、依赖自检命令
|
|
49
51
|
|
package/cordis.patch.yml
CHANGED
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
有这些工具,就按 Lead 工作法干活:
|
|
51
51
|
|
|
52
52
|
- 派活自包含。teammate 看不到你的上下文,把目标、约束、验收标准、已知失败、绝对路径都写进 prompt。
|
|
53
|
-
-
|
|
53
|
+
- 要求它收尾那条消息写清交付物。它收工时那条消息会随通知回到你手上。
|
|
54
54
|
- 写作用域不重叠。一人一块文件。分不开的活排成依赖。
|
|
55
|
-
- 共享任务走 list、get、claim(带 revision)、干、complete。
|
|
56
|
-
-
|
|
55
|
+
- 共享任务走 list、get、claim(带 revision)、干、complete。task 只是账本,不是唤醒通道。
|
|
56
|
+
- 等活就结束回合等通知:teammate 收工、或给你发消息,都会唤醒你。task 变更只唤醒正在 wait_agent 的调用方,不会唤醒空闲的你。
|
|
57
57
|
- 不要用 wait_agent 套循环,也不要反复 list_agents 轮询。只有本回合内就必须拿到结果时才等一次。
|
|
58
58
|
- 等齐必需的 teammate 再给最终答复。
|
|
59
59
|
- teammate 继承你的模型,spawn_teammate 没法单独指定模型。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-lead-mode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
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",
|
|
@@ -31,6 +31,29 @@ dsh plugin --profile <你的 profile 名> add @deepseek-ai/dsh-experimental-agen
|
|
|
31
31
|
|
|
32
32
|
目标或指令有疑问先问用户。别自己挑一个解释就开始干。
|
|
33
33
|
|
|
34
|
+
## 等通知,别轮询
|
|
35
|
+
|
|
36
|
+
teammate 干完你**会被唤醒**,不用自己盯着。
|
|
37
|
+
|
|
38
|
+
| 事件 | 唤醒空闲的你吗 | 带回什么 |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| teammate 一轮干完、没有新消息 | 会 | 它收尾那条消息 |
|
|
41
|
+
| teammate 主动 `send_message` 给你 | 会 | 那条消息 |
|
|
42
|
+
| task 被 claim 或 complete | **不会** | 只唤醒正在 `wait_agent` 的调用方 |
|
|
43
|
+
|
|
44
|
+
所以默认这么做:**派完活就结束回合。** 把「派了谁、等什么」写清楚,然后收工。用户立刻看到进展,你不空转。teammate 收工时你被唤醒,接着干。
|
|
45
|
+
|
|
46
|
+
`wait_agent` 只在「本回合内就必须拿到结果才能继续」时用一次。它的好处是 task 变更也能唤醒它。默认等 30 秒,上限 1 小时。
|
|
47
|
+
|
|
48
|
+
禁止这两件事:
|
|
49
|
+
|
|
50
|
+
- 用 `wait_agent` 套循环
|
|
51
|
+
- 反复 `list_agents` 轮询
|
|
52
|
+
|
|
53
|
+
`list_agents` 只用来回答「谁在跑、谁卡住了」,不用来等。
|
|
54
|
+
|
|
55
|
+
`wait_agent` 返回 `noProgress` 不是错误,是告诉你没人在跑,该换手段。
|
|
56
|
+
|
|
34
57
|
## 派活的四个参数
|
|
35
58
|
|
|
36
59
|
`spawn_teammate` 只有 `name`、`description`、`prompt`、`context` 四个参数。
|
|
@@ -49,7 +72,7 @@ dsh plugin --profile <你的 profile 名> add @deepseek-ai/dsh-experimental-agen
|
|
|
49
72
|
|
|
50
73
|
取名字前先 `list_agents` 看一眼,别撞已占用的名字。
|
|
51
74
|
|
|
52
|
-
##
|
|
75
|
+
## prompt 怎么写
|
|
53
76
|
|
|
54
77
|
teammate 看不到你的上下文。它能看到的只有 `prompt`。
|
|
55
78
|
|
|
@@ -62,37 +85,25 @@ teammate 看不到你的上下文。它能看到的只有 `prompt`。
|
|
|
62
85
|
|
|
63
86
|
写「按刚才说的做」等于没派。它不知道「刚才」。
|
|
64
87
|
|
|
65
|
-
###
|
|
88
|
+
### 收尾那条消息就是交付物
|
|
89
|
+
|
|
90
|
+
teammate 收工时,它**最后那条消息**会随通知回到你手上,格式是「Its closing message:」加正文。
|
|
66
91
|
|
|
67
|
-
|
|
92
|
+
所以派活时直接要求它收尾写清:
|
|
68
93
|
|
|
69
94
|
```
|
|
70
|
-
|
|
95
|
+
收尾那条消息写四块:结论 / 文件清单 / 验收输出 / 偏离规格的地方。
|
|
71
96
|
```
|
|
72
97
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
## 等通知,别轮询
|
|
76
|
-
|
|
77
|
-
唤醒 Lead 的路径只有一条:**teammate 主动给你 `send_message`。**
|
|
98
|
+
这比你额外要求一次 `send_message` 省事,而且是你默认拿得到的东西。
|
|
78
99
|
|
|
79
|
-
|
|
100
|
+
需要**中途**进度(干到一半问一句、或者要它先确认再继续)时,才另外要求它 `send_message` 给你。
|
|
80
101
|
|
|
81
|
-
|
|
82
|
-
|---|---|
|
|
83
|
-
| teammate 给你发消息 | 会。新回合开始 |
|
|
84
|
-
| task 被 claim 或 complete | **不会**。只唤醒正在 `wait_agent` 的调用方 |
|
|
85
|
-
| teammate 静默收工 | **不会**。teammate 是常驻的,收工不结清 |
|
|
102
|
+
### 收尾消息可能被省掉
|
|
86
103
|
|
|
87
|
-
|
|
104
|
+
如果 teammate 在收工前刚给你发过 `send_message`,通知里不会重复它的收尾正文,而是写「It sent you a message just before finishing, so its closing message is omitted.」。
|
|
88
105
|
|
|
89
|
-
|
|
90
|
-
2. **次选:本回合内就必须拿到结果才继续时,用一次 `wait_agent`。** 它的好处是 task 变更也能唤醒。默认等 30 秒,上限 1 小时。
|
|
91
|
-
3. **禁止:`wait_agent` 套循环,或反复 `list_agents` 轮询。** 那是空转。
|
|
92
|
-
|
|
93
|
-
`list_agents` 只用来回答「谁在跑、谁卡住了」,不用来等。
|
|
94
|
-
|
|
95
|
-
`wait_agent` 返回 `noProgress` 不是错误,是告诉你没人在跑,该换手段。
|
|
106
|
+
也就是说:你要么拿到收尾消息,要么拿到它发的那条,不会两个都没。
|
|
96
107
|
|
|
97
108
|
## 写作用域不重叠
|
|
98
109
|
|
|
@@ -118,6 +129,8 @@ teammate 看不到你的上下文。它能看到的只有 `prompt`。
|
|
|
118
129
|
|
|
119
130
|
task 描述就是完整规格。规格写细一点,teammate 少问一轮。
|
|
120
131
|
|
|
132
|
+
task 是给人看的账本,不是唤醒通道。别指望「它把 task 标 complete 了我就知道了」。
|
|
133
|
+
|
|
121
134
|
## teammate 用什么模型
|
|
122
135
|
|
|
123
136
|
**不能单独指定。** `spawn_teammate` 没有 model 或 provider 参数。
|
|
@@ -142,7 +155,7 @@ teammate 继承你(Lead)在 spawn 那一刻的 provider 和 model。想换
|
|
|
142
155
|
| `provisioning` | 正在创建 |
|
|
143
156
|
| `failed` | 创建失败 |
|
|
144
157
|
|
|
145
|
-
`inactive`
|
|
158
|
+
`inactive` 有两种情况:teammate 已经收工(你收到过它的通知),或者它被存档了、等你再给它发消息才醒来。
|
|
146
159
|
|
|
147
160
|
只有 Lead 能创建和打断 teammate(`interrupt_agent`)。打断不清空它排队的消息。
|
|
148
161
|
|