dsh-lead-mode 0.1.5 → 0.1.7
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 +15 -6
- package/README.zh-CN.md +16 -7
- package/cordis.patch.yml +1 -0
- package/package.json +1 -1
- package/skills/lead-mode/SKILL.md +68 -2
package/README.md
CHANGED
|
@@ -114,15 +114,24 @@ Three steps.
|
|
|
114
114
|
|
|
115
115
|
**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.
|
|
116
116
|
|
|
117
|
-
##
|
|
117
|
+
## Friendly link: dsh-context
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
This plugin only does Lead mode. Visualising Team state and comms is **dsh-context**'s job, and that is a separate project:
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
| Item | Value |
|
|
122
|
+
|---|---|
|
|
123
|
+
| Repository | https://github.com/bowenliang123/dsh-context |
|
|
124
|
+
| Author | bowenliang123 |
|
|
125
|
+
| License | Apache-2.0 |
|
|
126
|
+
| Install | `dsh plugin --profile <your profile name> add dsh-context` |
|
|
127
|
+
|
|
128
|
+
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.
|
|
129
|
+
|
|
130
|
+
### Why point there at all
|
|
131
|
+
|
|
132
|
+
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.
|
|
124
133
|
|
|
125
|
-
|
|
134
|
+
dsh-context adds a **Fleet / 编队** tab to every session (right of **Context**), and the right sidebar's **Context** panel carries the same card.
|
|
126
135
|
|
|
127
136
|
| Surface | Shows |
|
|
128
137
|
|---|---|
|
package/README.zh-CN.md
CHANGED
|
@@ -114,15 +114,24 @@ dsh plugin --profile <你的 profile 名> add https://github.com/xiebaiyuan/dsh-
|
|
|
114
114
|
|
|
115
115
|
**3. 让模型干活。** 派活工具齐了,模型会自己拆活、派给 teammate、等齐再收尾。工具不齐,它第一句就是让你去开 Team 运行时。
|
|
116
116
|
|
|
117
|
-
##
|
|
117
|
+
## 友链:dsh-context
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
本插件只做 Lead 模式。团队状态与通信的可视化是 **dsh-context** 的活,那是另一个项目:
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
| 项 | 值 |
|
|
122
|
+
|---|---|
|
|
123
|
+
| 仓库 | https://github.com/bowenliang123/dsh-context |
|
|
124
|
+
| 作者 | bowenliang123 |
|
|
125
|
+
| 许可 | Apache-2.0 |
|
|
126
|
+
| 装法 | `dsh plugin --profile <你的 profile 名> add dsh-context` |
|
|
127
|
+
|
|
128
|
+
它不随本插件安装,也不是本插件的依赖。本插件只在文档和 skill 里指个路。
|
|
129
|
+
|
|
130
|
+
### 为什么指到这里
|
|
131
|
+
|
|
132
|
+
工具调用只能一条条读。`list_agents` 给一行状态,`team_task_list` 给任务归属。要看整队谁在干什么、谁跟谁说了什么,得开一页。
|
|
124
133
|
|
|
125
|
-
|
|
134
|
+
dsh-context 在每个会话里加一个 **编队 / Fleet** 标签页(在 **Context** 右边),右栏的 **Context** 面板里有同一张卡。
|
|
126
135
|
|
|
127
136
|
| 区块 | 看什么 |
|
|
128
137
|
|---|---|
|
|
@@ -132,7 +141,7 @@ dsh plugin --profile <你的 profile 名> add dsh-context
|
|
|
132
141
|
| Tasks | 团队任务与子代理派活放一起,按 owner 分组,带 blocked-by 链 |
|
|
133
142
|
| Agent Comms | 谁跟谁说了什么。团队消息、邮箱投递、运行时的结算通知都在这里 |
|
|
134
143
|
|
|
135
|
-
点图上的成员或成员卡,Tasks 与 Agent Comms 会收窄到那一个人。Agent Comms
|
|
144
|
+
点图上的成员或成员卡,Tasks 与 Agent Comms 会收窄到那一个人。Agent Comms 里点开一条能看到完整记录:来自哪个会话日志、第几号事件、是运行时写的结算通知还是子代理自己发的、完整收尾报告。
|
|
136
145
|
|
|
137
146
|
Lead 模式 skill 里也写了这个入口,所以派活时模型会直接让你去这儿看进度。
|
|
138
147
|
|
package/cordis.patch.yml
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
- 派活自包含。teammate 看不到你的上下文,把目标、约束、验收标准、已知失败、绝对路径都写进 prompt。
|
|
53
53
|
- 要求它收尾那条消息写清交付物。它收工时那条消息会随通知回到你手上。
|
|
54
|
+
- 派活时要求它第一步建工作日志(.scratch/<effort>/worklog-<mate>.md),收尾前补完最后一轮。
|
|
54
55
|
- 写作用域不重叠。一人一块文件。分不开的活排成依赖。
|
|
55
56
|
- 共享任务走 list、get、claim(带 revision)、干、complete。task 只是账本,不是唤醒通道。
|
|
56
57
|
- 等活就结束回合等通知:teammate 收工、或给你发消息,都会唤醒你。task 变更只唤醒正在 wait_agent 的调用方,不会唤醒空闲的你。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-lead-mode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
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",
|
|
@@ -99,12 +99,74 @@ teammate 收工时,它**最后那条消息**会随通知回到你手上,格
|
|
|
99
99
|
|
|
100
100
|
需要**中途**进度(干到一半问一句、或者要它先确认再继续)时,才另外要求它 `send_message` 给你。
|
|
101
101
|
|
|
102
|
+
还有一条硬要求,写进每张单里:开建工作日志是成员的第一件事,收尾前补完最后一轮。它是你的账本,成员被 `interrupt_agent` 打断也不丢账。格式见下面的「上下文变长怎么办」那节。
|
|
103
|
+
|
|
102
104
|
### 收尾消息可能被省掉
|
|
103
105
|
|
|
104
106
|
如果 teammate 在收工前刚给你发过 `send_message`,通知里不会重复它的收尾正文,而是写「It sent you a message just before finishing, so its closing message is omitted.」。
|
|
105
107
|
|
|
106
108
|
也就是说:你要么拿到收尾消息,要么拿到它发的那条,不会两个都没。
|
|
107
109
|
|
|
110
|
+
## 上下文变长怎么办:压缩、复用、交接、换人
|
|
111
|
+
|
|
112
|
+
### 为什么会丢
|
|
113
|
+
|
|
114
|
+
宿主对每个 agent 都自动压缩会话。压力到阈值就触发,会话 id 不变,早期节点被一条摘要替换。这就是**上下文降级**:细节只剩摘要,不再完整可见。
|
|
115
|
+
|
|
116
|
+
团队层没有关掉压缩的开关。Lead 也没有「压缩指定成员会话」的通道,只能等它自己触发。
|
|
117
|
+
|
|
118
|
+
成员活干长了,前面的细节会变薄。你不查,就当它还记得。
|
|
119
|
+
|
|
120
|
+
### 怎么检测
|
|
121
|
+
|
|
122
|
+
查这个成员的会话被压缩过几次:
|
|
123
|
+
|
|
124
|
+
1. `list_agents` 取成员的 `id`。
|
|
125
|
+
2. `session_event_search`,`session_id` 填那个 id,`event_types: ["compaction/start"]`,`surfaces: ["log-only"]`。
|
|
126
|
+
3. 命中 ≥1 次,就是该成员已被压缩,细节开始丢。
|
|
127
|
+
|
|
128
|
+
不要在 `wait_agent` 里套这个检查,也不要反复轮询。一次派活、验收之前查一次就够。
|
|
129
|
+
|
|
130
|
+
阈值不写死。各宿主不一样,写死会过期,你只需要知道怎么查。
|
|
131
|
+
|
|
132
|
+
### 交接阶梯
|
|
133
|
+
|
|
134
|
+
按代价从低到高排,能不换人就不换人。
|
|
135
|
+
|
|
136
|
+
1. 继续跑:命中 0–1 次、活快收尾,交给自动压缩兜住。
|
|
137
|
+
2. 重发窄单:用 `send_message` 给同一个成员一张更窄的单,只做剩下的部分。成员常驻,别急着换人。
|
|
138
|
+
3. 写交接文档:要求它先补完工作日志,再写 handoff,然后 `interrupt_agent`。
|
|
139
|
+
4. 换新成员:`spawn_teammate`,`context` 用 `fresh`。原因写死:`fork` 拷的是你 Lead 自己的历史,不是上一个成员的历史,所以拿不到前任的细节。
|
|
140
|
+
|
|
141
|
+
### 工作日志与交接文档放哪
|
|
142
|
+
|
|
143
|
+
位置固定在 `.scratch/<effort>/`。一人一个 `worklog-<mate>.md`,换人时写 `handoff-<mate>-<n>.md`。
|
|
144
|
+
|
|
145
|
+
`.scratch` 是 `obsidian-docs/scratch/` 的软链,笔记库能看见,不进 git。
|
|
146
|
+
|
|
147
|
+
工作日志(worklog)分两段:
|
|
148
|
+
|
|
149
|
+
| 段 | 写什么 |
|
|
150
|
+
|---|---|
|
|
151
|
+
| 状态摘要(头部,一屏内) | 任务 id 与标题、所属成员、写作用域、验收判据、当前状态 |
|
|
152
|
+
| 轮次记录(下面,只追加) | 一轮一条:做了什么、改了哪些文件、下一步、踩到的坑 |
|
|
153
|
+
|
|
154
|
+
交接文档(handoff)六块,全部用指针,不复制正文:
|
|
155
|
+
|
|
156
|
+
1. 接手关系:谁交给谁、交接原因、时间。
|
|
157
|
+
2. 任务与账本:task id、revision、owner、验收判据。
|
|
158
|
+
3. 文件账:已改、未改、只读过,全部绝对路径,加工作日志指针。
|
|
159
|
+
4. 验收:能复跑的命令,加最近一次输出摘要。
|
|
160
|
+
5. 死路与决策:试过什么不行、为什么选现在这条。
|
|
161
|
+
6. 下一步:接手第一件事、明确不做什么。
|
|
162
|
+
|
|
163
|
+
### 换人操作清单
|
|
164
|
+
|
|
165
|
+
- 先查名额:`/lead-mode` 报 `maxMembers`。换一次吃一个名额,创建失败的也占位,名字永不复用。
|
|
166
|
+
- 旧 task 你先 `team_task_update` 执行 `release`,续作成员再 `claim`。revision 会变。
|
|
167
|
+
- 续作成员名字加 `-r2` 后缀,与被接手的成员并存,不要复用旧名字。
|
|
168
|
+
- `interrupt_agent` 不清空它排队的消息,打断前确认工作日志已写完。
|
|
169
|
+
|
|
108
170
|
## 写作用域不重叠
|
|
109
171
|
|
|
110
172
|
两个 teammate 同时改一个文件,改动会互相覆盖,而且谁都发现不了。
|
|
@@ -161,7 +223,11 @@ teammate 继承你(Lead)在 spawn 那一刻的 provider 和 model。想换
|
|
|
161
223
|
|
|
162
224
|
### 想看全局,用 dsh-context 的编队页
|
|
163
225
|
|
|
164
|
-
工具调用只能一条条读。要看整队的工作与通信,让用户开 **dsh-context**
|
|
226
|
+
工具调用只能一条条读。要看整队的工作与通信,让用户开 **dsh-context** 的编队页。
|
|
227
|
+
|
|
228
|
+
那是另一个项目,不随本插件安装,也不是本插件的依赖。仓库:https://github.com/bowenliang123/dsh-context(作者 bowenliang123,Apache-2.0)。
|
|
229
|
+
|
|
230
|
+
装法:`dsh plugin --profile <你的 profile 名> add dsh-context`
|
|
165
231
|
|
|
166
232
|
| 区块 | 看什么 |
|
|
167
233
|
|---|---|
|
|
@@ -173,7 +239,7 @@ teammate 继承你(Lead)在 spawn 那一刻的 provider 和 model。想换
|
|
|
173
239
|
|
|
174
240
|
入口:任意会话点 **编队 / Fleet** 标签页(在 **Context** 右边)。右栏的 **Context** 面板里有同一张卡。
|
|
175
241
|
|
|
176
|
-
|
|
242
|
+
只有用户装了它,这个入口才存在。不确定就别让用户去找一个没有的页面。
|
|
177
243
|
|
|
178
244
|
派活时可以直接告诉用户去这儿看进度,比自己复述一遍更清楚。
|
|
179
245
|
|