dsh-gate-agent 0.1.1 → 0.1.3
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 +70 -8
- package/cordis.patch.yml +144 -144
- package/icon.svg +4 -4
- package/launchers/verify-notes.mjs +20 -20
- package/launchers/verify-notes.yml +34 -34
- package/lib/index.js +261 -169
- package/locale/en.json +2 -2
- package/locale/zh.json +2 -2
- package/package.json +34 -34
- package/skills/gate-code-review/SKILL.md +2 -2
- package/skills/gate-code-review/assets/worker-briefs/gate-implement-review.md +17 -17
- package/skills/gate-domain-modeling/CONTEXT-FORMAT.md +3 -3
- package/skills/gate-domain-modeling/GLOSSARY-FORMAT.md +3 -3
- package/skills/gate-fix-bug/assets/worker-briefs/fix-bug-review.md +20 -20
- package/skills/gate-fix-bug/assets/worker-briefs/gate-fix-bug.md +30 -30
- package/skills/gate-implement/SKILL.md +78 -78
- package/skills/gate-implement/assets/worker-briefs/gate-enter-implement.md +22 -22
- package/skills/gate-plan-review/assets/worker-briefs/plan-review.md +17 -17
- package/skills/gate-planning/assets/worker-briefs/gate-enter-plan.md +24 -24
- package/skills/gate-planning/proposal.md +49 -49
- package/skills/gate-user-verify/assets/worker-briefs/gate-code-verify.md +32 -32
- package/skills/gate-verify/SKILL.md +71 -71
- package/skills/gate-verify/assets/worker-briefs/gate-verify.md +21 -21
- package/skills/gate-write-agent-notes/SKILL.md +1 -1
- package/skills/gate-write-agent-notes/scripts/verify-agent-note-lifecycle.ts +74 -74
- package/skills/gate-writing-for-agents/SKILL-MECHANICS.md +4 -4
package/README.md
CHANGED
|
@@ -6,9 +6,43 @@ Host 插件:用 phase/node 门禁组织讨论、规划、实施、评审、验
|
|
|
6
6
|
|
|
7
7
|
## 安装与启用
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
### 开发安装(link,标准方式)
|
|
10
|
+
|
|
11
|
+
1. 在仓库根构建:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
pnpm --filter dsh-gate-agent build
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
安装读取的是磁盘上的 `packages/gate/lib/`,不是 `src/`;`lib/` 被 `.gitignore` 排除。
|
|
18
|
+
|
|
19
|
+
2. 调用 `plugin_manager`,`action: install_bundle`,`target` 传包目录绝对路径:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
E:\workspace\dsh-plugin\gate\packages\gate
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
本地目录不走 npm,不带 `registry`。成功判定是 `application: applied` 且 `warnings: []`;`stage: enable` / `changed: true` 不代表装载成功。
|
|
26
|
+
|
|
27
|
+
3. profile 侧应看到:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
"dsh-gate-agent": "link:E:/workspace/dsh-plugin/gate/packages/gate"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`node_modules/dsh-gate-agent` 是指向源码目录的 Junction。源码改动后重新 `pnpm build`,重启 DSH 加载新的 `lib/index.js`。
|
|
34
|
+
|
|
35
|
+
4. 卸载用 `plugin_manager` 的 `remove_bundle`,target 为 `dsh-gate-agent`。标准卸载只改 profile 的 bundles、依赖和 Junction,不碰工作区。不要用递归删除工具清理 profile 的 `node_modules`:Windows 上 link 是 junction,递归删除可能穿过它删除源目录;`pnpm remove` 实测只移除 link。
|
|
36
|
+
|
|
37
|
+
### 生产安装(npm)
|
|
38
|
+
|
|
39
|
+
- `install_bundle` target 使用 npm 版本,例如 `dsh-gate-agent@0.1.2`。
|
|
40
|
+
- npm 安装的是独立副本,卸载不会影响本仓库源码。
|
|
41
|
+
- **不要在已有 link 的同一个 profile 上直接安装 npm 版本**:pnpm 替换/清理旧 link 时会递归删除 Junction,可能删穿到源码目录。npm 验证请用独立 profile;必须在同一 profile 切换时,先 `remove_bundle` 并确认 `node_modules/dsh-gate-agent` 已不存在,再安装 npm。
|
|
42
|
+
|
|
43
|
+
### 启用
|
|
44
|
+
|
|
45
|
+
- 安装/升级后重启 DSH。
|
|
12
46
|
- 插件由“开发者模式”preset 启用。启用后先执行 `/gate-init`。
|
|
13
47
|
|
|
14
48
|
`/gate-init` 会:
|
|
@@ -25,8 +59,8 @@ Host 插件:用 phase/node 门禁组织讨论、规划、实施、评审、验
|
|
|
25
59
|
|
|
26
60
|
| phase / node | 用途 | 主代理/worker 与技能 |
|
|
27
61
|
|---|---|---|
|
|
28
|
-
| `discuss` | 理解需求、讨论方案、确认授权 | root;不派 worker |
|
|
29
|
-
| `orchestrating/plan` | 把工作项整理成规划工件 | planning worker
|
|
62
|
+
| `discuss` | 理解需求、讨论方案、确认授权 | root;不派 worker;文件只读,可提交已有改动 |
|
|
63
|
+
| `orchestrating/plan` | 把工作项整理成规划工件 | planning worker(文件只读、只读 shell、`gate_note_write`);`gate-planning` + `gate-write-agent-notes` |
|
|
30
64
|
| `orchestrating/plan-review` | Plan Review 三轴评审 | review worker;`gate-plan-review` |
|
|
31
65
|
| `orchestrating/plan-revise` | 按 findings 修计划 | planning worker;`gate-planning` |
|
|
32
66
|
| `orchestrating/implement` | 按已确认计划实施 | implement worker;`gate-implement` |
|
|
@@ -44,6 +78,32 @@ Host 插件:用 phase/node 门禁组织讨论、规划、实施、评审、验
|
|
|
44
78
|
|
|
45
79
|
进入阶段不等于执行。主代理按当前 procedure 加载技能、派 worker,再用 `gate_record` 推进节点。
|
|
46
80
|
|
|
81
|
+
## 权限
|
|
82
|
+
|
|
83
|
+
| 阶段/角色 | 文件写 | Note 写 | shell | 仓库写 |
|
|
84
|
+
|---|---|---|---|---|
|
|
85
|
+
| discuss root | ❌ | ❌ | 只读 | add/commit/push |
|
|
86
|
+
| planning worker | ❌ | ✅ gate_note_write | 只读 | ❌ |
|
|
87
|
+
| plan-review / code-review / code-review-standalone / proposal-review worker | ❌ | ❌ | 只读 | ❌ |
|
|
88
|
+
| implement / implement-revise / fix-bug worker | ✅ | ❌ | 可写 | add/commit/push |
|
|
89
|
+
| verify / verify-standalone worker | ❌ | ❌ | 只读 | ❌ |
|
|
90
|
+
| note-lifecycle root | ✅ | ✅ lifecycle 工具 | 可写 | add/commit/push |
|
|
91
|
+
| docs root | ✅ | ❌ | 可写 | add/commit/push |
|
|
92
|
+
| blocked root | ❌ | ❌ | 只读 | add/commit/push |
|
|
93
|
+
| blocked worker | ❌ | ❌ | 只读 | ❌ |
|
|
94
|
+
| complete root | ✅ | ❌ | 可写 | add/commit/push |
|
|
95
|
+
|
|
96
|
+
- discuss 文件只读;要改文件先进入 plan/implement。提交已有改动用 git add/commit/push,不受文件只读影响。
|
|
97
|
+
- planning worker 的 shell 只读;产品文件和仓库写拒绝。
|
|
98
|
+
- implement/fix worker 保留 push。
|
|
99
|
+
- access 会显示在 gate_status、/gate-status、gate_record、gate_start_phase、命令 follow-up 和 worker prompt:
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
权限:read=yes write=none noteWrite=no shell=read repoWrite=push
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
47
107
|
## 命令
|
|
48
108
|
|
|
49
109
|
| 命令 | 参数 | 作用 |
|
|
@@ -65,7 +125,9 @@ Host 插件:用 phase/node 门禁组织讨论、规划、实施、评审、验
|
|
|
65
125
|
| `/gate-return-discuss` | 无 | 回到 discuss |
|
|
66
126
|
| `/gate-status` | 无 | 只读显示当前 phase/node 与 procedure |
|
|
67
127
|
|
|
68
|
-
|
|
128
|
+
直接 implement(`/gate-enter-implement [简单说明]` 或 `gate_start_phase({node:'implement',brief})`)会自动标记 `mechanical`,跳过 Note lifecycle;不需要 `mechanical:` 前缀。plan/plan-revise 手动选择 `mechanical` 时也不要求前缀,只需 `notePaths: []`。
|
|
129
|
+
|
|
130
|
+
离开 discuss 的授权可来自对话(包括要求用户再输入 slash command)或 `ask_user_question`;明确授权后,主代理可调用 `gate_start_phase({node:'plan'|'implement', brief})`。
|
|
69
131
|
|
|
70
132
|
## 技能
|
|
71
133
|
|
|
@@ -115,7 +177,7 @@ gate_record({
|
|
|
115
177
|
/gate-enter-implement
|
|
116
178
|
```
|
|
117
179
|
|
|
118
|
-
主代理派 `gate-implement` worker 实施;完成后 `gate_record({node:'implement', workerSessionIds})` 进入 `code-review`。review 通过后进入 `verify`;verify PASS
|
|
180
|
+
主代理派 `gate-implement` worker 实施;完成后 `gate_record({node:'implement', workerSessionIds})` 进入 `code-review`。review 通过后进入 `verify`;verify PASS 后:非 mechanical 进入 `note-lifecycle`,mechanical 直接回 discuss 并提示提交。
|
|
119
181
|
|
|
120
182
|
Note lifecycle:
|
|
121
183
|
|
|
@@ -243,7 +305,7 @@ gate_status()
|
|
|
243
305
|
|
|
244
306
|
### Note 工具
|
|
245
307
|
|
|
246
|
-
- `gate_note_write`:planning worker 写 proposed Note,或原地更新 implemented Note;通用 `write`/`edit`/`apply_patch
|
|
308
|
+
- `gate_note_write`:planning worker 写 proposed Note,或原地更新 implemented Note;通用 `write`/`edit`/`apply_patch` 和仓库写被拒绝,只读 shell 可用。
|
|
247
309
|
- `gate_note_verify`:root 在 note-lifecycle 中跑 notes 校验。
|
|
248
310
|
- `gate_note_finalize`:root 把 proposed Note 移到 implemented 并更新头块。
|
|
249
311
|
|
package/cordis.patch.yml
CHANGED
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
# Agent preset cordis: one `@deepseek-ai/dsh-agent-preset` declaration inserted
|
|
2
|
-
# after the web patch. Edits saved from the Web editor override this row's
|
|
3
|
-
# `config.plugins` by id from the profile patch.
|
|
4
|
-
- insert:
|
|
5
|
-
- id: preset-developer
|
|
6
|
-
name: '@deepseek-ai/dsh-agent-preset'
|
|
7
|
-
config:
|
|
8
|
-
id: developer
|
|
9
|
-
name: 开发者模式
|
|
10
|
-
description: 基于创造模式的开发者模式,含 gate 阶段门禁。
|
|
11
|
-
order: 5
|
|
12
|
-
plugins:
|
|
13
|
-
# Same persona as `standard`: tool descriptions and the skill catalog carry
|
|
14
|
-
# the operating detail, and the skills own the preset-authoring rules.
|
|
15
|
-
- id: persona
|
|
16
|
-
name: '@deepseek-ai/dsh-persona'
|
|
17
|
-
config:
|
|
18
|
-
prefix: >-
|
|
19
|
-
You are a coding agent powered by the {{model}} model.
|
|
20
|
-
- id: agent-instructions
|
|
21
|
-
name: '@deepseek-ai/dsh-agent-instructions'
|
|
22
|
-
config:
|
|
23
|
-
maxBytes: 65536
|
|
24
|
-
- id: time-context
|
|
25
|
-
name: '@deepseek-ai/dsh-time-context'
|
|
26
|
-
- id: tool-bash
|
|
27
|
-
name: '@deepseek-ai/dsh-tool-bash'
|
|
28
|
-
disabled: !!js process.platform === 'win32'
|
|
29
|
-
- id: tool-pwsh
|
|
30
|
-
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
31
|
-
disabled: !!js process.platform !== 'win32'
|
|
32
|
-
- id: tool-fs
|
|
33
|
-
name: '@deepseek-ai/dsh-tool-fs'
|
|
34
|
-
config:
|
|
35
|
-
# Set true to add the apply_patch tool beside edit.
|
|
36
|
-
applyPatch: false
|
|
37
|
-
- id: tool-fs-search
|
|
38
|
-
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
39
|
-
config:
|
|
40
|
-
sampleOverCapGlobResults: false
|
|
41
|
-
- id: tool-jobs
|
|
42
|
-
name: '@deepseek-ai/dsh-tool-jobs'
|
|
43
|
-
- id: tool-schedule
|
|
44
|
-
name: '@deepseek-ai/dsh-tool-schedule'
|
|
45
|
-
- id: command-goal
|
|
46
|
-
name: '@deepseek-ai/dsh-command-goal'
|
|
47
|
-
- id: tool-goal
|
|
48
|
-
name: '@deepseek-ai/dsh-tool-goal'
|
|
49
|
-
- id: planning
|
|
50
|
-
name: cordis:group
|
|
51
|
-
group: true
|
|
52
|
-
isolate:
|
|
53
|
-
planMode: true
|
|
54
|
-
config:
|
|
55
|
-
- id: plan-mode
|
|
56
|
-
name: '@deepseek-ai/dsh-plan-mode'
|
|
57
|
-
config:
|
|
58
|
-
section: |
|
|
59
|
-
You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
60
|
-
|
|
61
|
-
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
62
|
-
|
|
63
|
-
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
64
|
-
|
|
65
|
-
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
66
|
-
|
|
67
|
-
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
68
|
-
|
|
69
|
-
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
70
|
-
- id: compaction
|
|
71
|
-
name: cordis:group
|
|
72
|
-
group: true
|
|
73
|
-
isolate:
|
|
74
|
-
compaction: true
|
|
75
|
-
toolResultPruner: true
|
|
76
|
-
config:
|
|
77
|
-
- id: compaction-basic
|
|
78
|
-
name: '@deepseek-ai/dsh-compaction-basic'
|
|
79
|
-
- id: command-compact
|
|
80
|
-
name: '@deepseek-ai/dsh-command-compact'
|
|
81
|
-
- id: tool-result-pruner
|
|
82
|
-
name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
|
|
83
|
-
config:
|
|
84
|
-
thresholdChars: 8192
|
|
85
|
-
headChars: 4096
|
|
86
|
-
tailChars: 1024
|
|
87
|
-
- id: delegation
|
|
88
|
-
name: cordis:group
|
|
89
|
-
group: true
|
|
90
|
-
isolate:
|
|
91
|
-
workflowEngine: true
|
|
92
|
-
config:
|
|
93
|
-
- id: tool-subagent-control
|
|
94
|
-
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
95
|
-
- id: tool-subagent
|
|
96
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
97
|
-
config:
|
|
98
|
-
provider: spawn
|
|
99
|
-
toolName: subagent
|
|
100
|
-
modelSelection: true
|
|
101
|
-
modelDiscovery: true
|
|
102
|
-
- id: tool-subagent-fork
|
|
103
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
104
|
-
config:
|
|
105
|
-
provider: fork
|
|
106
|
-
toolName: subagent_fork
|
|
107
|
-
- id: workflow-ptc
|
|
108
|
-
name: '@deepseek-ai/dsh-workflow-ptc'
|
|
109
|
-
config:
|
|
110
|
-
provider: spawn
|
|
111
|
-
- id: tool-workflow
|
|
112
|
-
name: '@deepseek-ai/dsh-tool-workflow'
|
|
113
|
-
- id: tool-ask-user
|
|
114
|
-
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
115
|
-
- id: tool-todo
|
|
116
|
-
name: '@deepseek-ai/dsh-tool-todo'
|
|
117
|
-
config:
|
|
118
|
-
allowParallelInProgress: true
|
|
119
|
-
- id: tool-web
|
|
120
|
-
name: '@deepseek-ai/dsh-tool-web'
|
|
121
|
-
config:
|
|
122
|
-
fetch: true
|
|
123
|
-
searchTimeoutMs: 60000
|
|
124
|
-
- id: tool-cordis
|
|
125
|
-
name: '@deepseek-ai/dsh-tool-cordis'
|
|
126
|
-
- id: skill-filesystem
|
|
127
|
-
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
128
|
-
config:
|
|
129
|
-
customSkillDirs:
|
|
130
|
-
- !!js process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@deepseek-ai/dsh-agent-preset/package.json')), 'skills')
|
|
131
|
-
bundledSkillDir: !!js process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('dsh-gate-agent/package.json')), 'skills')
|
|
132
|
-
- id: tool-skill
|
|
133
|
-
name: '@deepseek-ai/dsh-tool-skill'
|
|
134
|
-
- id: present
|
|
135
|
-
name: '@deepseek-ai/dsh-tool-present'
|
|
136
|
-
- id: tool-plugin-manager
|
|
137
|
-
name: '@deepseek-ai/dsh-plugin-manager/tools'
|
|
138
|
-
disabled: !!js "!ctx.get('profileContext')"
|
|
139
|
-
- id: tool-plugin-market
|
|
140
|
-
name: '@deepseek-ai/dsh-plugin-market/tools'
|
|
141
|
-
disabled: !!js "!ctx.get('profileContext')"
|
|
142
|
-
- id: gate
|
|
143
|
-
name: 'dsh-gate-agent'
|
|
144
|
-
|
|
1
|
+
# Agent preset cordis: one `@deepseek-ai/dsh-agent-preset` declaration inserted
|
|
2
|
+
# after the web patch. Edits saved from the Web editor override this row's
|
|
3
|
+
# `config.plugins` by id from the profile patch.
|
|
4
|
+
- insert:
|
|
5
|
+
- id: preset-developer
|
|
6
|
+
name: '@deepseek-ai/dsh-agent-preset'
|
|
7
|
+
config:
|
|
8
|
+
id: developer
|
|
9
|
+
name: 开发者模式
|
|
10
|
+
description: 基于创造模式的开发者模式,含 gate 阶段门禁。
|
|
11
|
+
order: 5
|
|
12
|
+
plugins:
|
|
13
|
+
# Same persona as `standard`: tool descriptions and the skill catalog carry
|
|
14
|
+
# the operating detail, and the skills own the preset-authoring rules.
|
|
15
|
+
- id: persona
|
|
16
|
+
name: '@deepseek-ai/dsh-persona'
|
|
17
|
+
config:
|
|
18
|
+
prefix: >-
|
|
19
|
+
You are a coding agent powered by the {{model}} model.
|
|
20
|
+
- id: agent-instructions
|
|
21
|
+
name: '@deepseek-ai/dsh-agent-instructions'
|
|
22
|
+
config:
|
|
23
|
+
maxBytes: 65536
|
|
24
|
+
- id: time-context
|
|
25
|
+
name: '@deepseek-ai/dsh-time-context'
|
|
26
|
+
- id: tool-bash
|
|
27
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
28
|
+
disabled: !!js process.platform === 'win32'
|
|
29
|
+
- id: tool-pwsh
|
|
30
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
31
|
+
disabled: !!js process.platform !== 'win32'
|
|
32
|
+
- id: tool-fs
|
|
33
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
34
|
+
config:
|
|
35
|
+
# Set true to add the apply_patch tool beside edit.
|
|
36
|
+
applyPatch: false
|
|
37
|
+
- id: tool-fs-search
|
|
38
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
39
|
+
config:
|
|
40
|
+
sampleOverCapGlobResults: false
|
|
41
|
+
- id: tool-jobs
|
|
42
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
43
|
+
- id: tool-schedule
|
|
44
|
+
name: '@deepseek-ai/dsh-tool-schedule'
|
|
45
|
+
- id: command-goal
|
|
46
|
+
name: '@deepseek-ai/dsh-command-goal'
|
|
47
|
+
- id: tool-goal
|
|
48
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
49
|
+
- id: planning
|
|
50
|
+
name: cordis:group
|
|
51
|
+
group: true
|
|
52
|
+
isolate:
|
|
53
|
+
planMode: true
|
|
54
|
+
config:
|
|
55
|
+
- id: plan-mode
|
|
56
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
57
|
+
config:
|
|
58
|
+
section: |
|
|
59
|
+
You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
60
|
+
|
|
61
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
62
|
+
|
|
63
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
64
|
+
|
|
65
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
66
|
+
|
|
67
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
68
|
+
|
|
69
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
70
|
+
- id: compaction
|
|
71
|
+
name: cordis:group
|
|
72
|
+
group: true
|
|
73
|
+
isolate:
|
|
74
|
+
compaction: true
|
|
75
|
+
toolResultPruner: true
|
|
76
|
+
config:
|
|
77
|
+
- id: compaction-basic
|
|
78
|
+
name: '@deepseek-ai/dsh-compaction-basic'
|
|
79
|
+
- id: command-compact
|
|
80
|
+
name: '@deepseek-ai/dsh-command-compact'
|
|
81
|
+
- id: tool-result-pruner
|
|
82
|
+
name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
|
|
83
|
+
config:
|
|
84
|
+
thresholdChars: 8192
|
|
85
|
+
headChars: 4096
|
|
86
|
+
tailChars: 1024
|
|
87
|
+
- id: delegation
|
|
88
|
+
name: cordis:group
|
|
89
|
+
group: true
|
|
90
|
+
isolate:
|
|
91
|
+
workflowEngine: true
|
|
92
|
+
config:
|
|
93
|
+
- id: tool-subagent-control
|
|
94
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
95
|
+
- id: tool-subagent
|
|
96
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
97
|
+
config:
|
|
98
|
+
provider: spawn
|
|
99
|
+
toolName: subagent
|
|
100
|
+
modelSelection: true
|
|
101
|
+
modelDiscovery: true
|
|
102
|
+
- id: tool-subagent-fork
|
|
103
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
104
|
+
config:
|
|
105
|
+
provider: fork
|
|
106
|
+
toolName: subagent_fork
|
|
107
|
+
- id: workflow-ptc
|
|
108
|
+
name: '@deepseek-ai/dsh-workflow-ptc'
|
|
109
|
+
config:
|
|
110
|
+
provider: spawn
|
|
111
|
+
- id: tool-workflow
|
|
112
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
113
|
+
- id: tool-ask-user
|
|
114
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
115
|
+
- id: tool-todo
|
|
116
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
117
|
+
config:
|
|
118
|
+
allowParallelInProgress: true
|
|
119
|
+
- id: tool-web
|
|
120
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
121
|
+
config:
|
|
122
|
+
fetch: true
|
|
123
|
+
searchTimeoutMs: 60000
|
|
124
|
+
- id: tool-cordis
|
|
125
|
+
name: '@deepseek-ai/dsh-tool-cordis'
|
|
126
|
+
- id: skill-filesystem
|
|
127
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
128
|
+
config:
|
|
129
|
+
customSkillDirs:
|
|
130
|
+
- !!js process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@deepseek-ai/dsh-agent-preset/package.json')), 'skills')
|
|
131
|
+
bundledSkillDir: !!js process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('dsh-gate-agent/package.json')), 'skills')
|
|
132
|
+
- id: tool-skill
|
|
133
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
134
|
+
- id: present
|
|
135
|
+
name: '@deepseek-ai/dsh-tool-present'
|
|
136
|
+
- id: tool-plugin-manager
|
|
137
|
+
name: '@deepseek-ai/dsh-plugin-manager/tools'
|
|
138
|
+
disabled: !!js "!ctx.get('profileContext')"
|
|
139
|
+
- id: tool-plugin-market
|
|
140
|
+
name: '@deepseek-ai/dsh-plugin-market/tools'
|
|
141
|
+
disabled: !!js "!ctx.get('profileContext')"
|
|
142
|
+
- id: gate
|
|
143
|
+
name: 'dsh-gate-agent'
|
|
144
|
+
|
package/icon.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
|
|
2
|
-
<path d="M12 2.5 20 5.5v6.2c0 5.1-3.4 8.5-8 9.8-4.6-1.3-8-4.7-8-9.8V5.5L12 2.5Z" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/>
|
|
3
|
-
<path d="M8.5 12.2 11 14.7l4.8-5.2" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
|
|
2
|
+
<path d="M12 2.5 20 5.5v6.2c0 5.1-3.4 8.5-8 9.8-4.6-1.3-8-4.7-8-9.8V5.5L12 2.5Z" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M8.5 12.2 11 14.7l4.8-5.2" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { spawnSync } from 'node:child_process'
|
|
2
|
-
import { join } from 'node:path'
|
|
3
|
-
|
|
4
|
-
const scriptsDir = join(process.cwd(), '.agents', 'gate', 'ci')
|
|
5
|
-
const notesRoot = join(process.cwd(), '.agents', 'notes')
|
|
6
|
-
const scripts = [
|
|
7
|
-
'verify-agent-note-tree.ts',
|
|
8
|
-
'verify-agent-note-format.ts',
|
|
9
|
-
'verify-agent-note-lifecycle.ts',
|
|
10
|
-
'verify-archived-agent-notes.ts',
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
for (const name of scripts) {
|
|
14
|
-
const result = spawnSync(
|
|
15
|
-
process.execPath,
|
|
16
|
-
[join(scriptsDir, name), '--root', notesRoot],
|
|
17
|
-
{ stdio: 'inherit' },
|
|
18
|
-
)
|
|
19
|
-
if (result.status !== 0) process.exit(result.status ?? 1)
|
|
20
|
-
}
|
|
1
|
+
import { spawnSync } from 'node:child_process'
|
|
2
|
+
import { join } from 'node:path'
|
|
3
|
+
|
|
4
|
+
const scriptsDir = join(process.cwd(), '.agents', 'gate', 'ci')
|
|
5
|
+
const notesRoot = join(process.cwd(), '.agents', 'notes')
|
|
6
|
+
const scripts = [
|
|
7
|
+
'verify-agent-note-tree.ts',
|
|
8
|
+
'verify-agent-note-format.ts',
|
|
9
|
+
'verify-agent-note-lifecycle.ts',
|
|
10
|
+
'verify-archived-agent-notes.ts',
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
for (const name of scripts) {
|
|
14
|
+
const result = spawnSync(
|
|
15
|
+
process.execPath,
|
|
16
|
+
[join(scriptsDir, name), '--root', notesRoot],
|
|
17
|
+
{ stdio: 'inherit' },
|
|
18
|
+
)
|
|
19
|
+
if (result.status !== 0) process.exit(result.status ?? 1)
|
|
20
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
# 由 gate-init 生成;校验脚本在 .agents/gate/ci/,不依赖插件安装路径。
|
|
2
|
-
name: Verify Agent Notes
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
branches:
|
|
7
|
-
- main
|
|
8
|
-
pull_request:
|
|
9
|
-
|
|
10
|
-
permissions:
|
|
11
|
-
contents: read
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
verify:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout
|
|
18
|
-
uses: actions/checkout@v4
|
|
19
|
-
with:
|
|
20
|
-
fetch-depth: 0
|
|
21
|
-
|
|
22
|
-
- name: Setup Node
|
|
23
|
-
uses: actions/setup-node@v4
|
|
24
|
-
with:
|
|
25
|
-
node-version: 24
|
|
26
|
-
|
|
27
|
-
- name: Verify note tree, format, lifecycle, and archive seals
|
|
28
|
-
env:
|
|
29
|
-
AGENT_NOTE_ARCHIVE_BASE_REF: ${{ github.event.pull_request.base.sha || github.event.before }}
|
|
30
|
-
run: |
|
|
31
|
-
npx --yes tsx .agents/gate/ci/verify-agent-note-tree.ts --root .agents/notes
|
|
32
|
-
npx --yes tsx .agents/gate/ci/verify-agent-note-format.ts --root .agents/notes
|
|
33
|
-
npx --yes tsx .agents/gate/ci/verify-agent-note-lifecycle.ts --root .agents/notes
|
|
34
|
-
npx --yes tsx .agents/gate/ci/verify-archived-agent-notes.ts --root .agents/notes
|
|
1
|
+
# 由 gate-init 生成;校验脚本在 .agents/gate/ci/,不依赖插件安装路径。
|
|
2
|
+
name: Verify Agent Notes
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
pull_request:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
verify:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- name: Setup Node
|
|
23
|
+
uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: 24
|
|
26
|
+
|
|
27
|
+
- name: Verify note tree, format, lifecycle, and archive seals
|
|
28
|
+
env:
|
|
29
|
+
AGENT_NOTE_ARCHIVE_BASE_REF: ${{ github.event.pull_request.base.sha || github.event.before }}
|
|
30
|
+
run: |
|
|
31
|
+
npx --yes tsx .agents/gate/ci/verify-agent-note-tree.ts --root .agents/notes
|
|
32
|
+
npx --yes tsx .agents/gate/ci/verify-agent-note-format.ts --root .agents/notes
|
|
33
|
+
npx --yes tsx .agents/gate/ci/verify-agent-note-lifecycle.ts --root .agents/notes
|
|
34
|
+
npx --yes tsx .agents/gate/ci/verify-archived-agent-notes.ts --root .agents/notes
|