dsh-gate-agent 0.0.0-stage → 0.1.1

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.
Files changed (65) hide show
  1. package/README.md +284 -2
  2. package/cordis.patch.yml +144 -0
  3. package/icon.svg +4 -0
  4. package/launchers/verify-notes.mjs +20 -0
  5. package/launchers/verify-notes.yml +34 -0
  6. package/lib/index.js +2202 -0
  7. package/locale/en.json +6 -0
  8. package/locale/zh.json +6 -0
  9. package/package.json +32 -4
  10. package/skills/gate-code-review/SKILL.md +115 -0
  11. package/skills/gate-code-review/assets/worker-briefs/gate-implement-review.md +19 -0
  12. package/skills/gate-diagnosing-bugs/SKILL.md +143 -0
  13. package/skills/gate-diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
  14. package/skills/gate-domain-modeling/CONTEXT-FORMAT.md +64 -0
  15. package/skills/gate-domain-modeling/GLOSSARY-FORMAT.md +64 -0
  16. package/skills/gate-domain-modeling/SKILL.md +47 -0
  17. package/skills/gate-fix-bug/SKILL.md +99 -0
  18. package/skills/gate-fix-bug/assets/worker-briefs/fix-bug-review.md +23 -0
  19. package/skills/gate-fix-bug/assets/worker-briefs/gate-fix-bug.md +33 -0
  20. package/skills/gate-handoff/SKILL.md +20 -0
  21. package/skills/gate-implement/SKILL.md +82 -0
  22. package/skills/gate-implement/assets/worker-briefs/gate-enter-implement.md +24 -0
  23. package/skills/gate-implement/tickets.md +114 -0
  24. package/skills/gate-plan-review/SKILL.md +87 -0
  25. package/skills/gate-plan-review/assets/worker-briefs/plan-review.md +19 -0
  26. package/skills/gate-planning/SKILL.md +96 -0
  27. package/skills/gate-planning/assets/worker-briefs/gate-enter-plan.md +24 -0
  28. package/skills/gate-planning/proposal.md +51 -0
  29. package/skills/gate-planning/rfc.md +73 -0
  30. package/skills/gate-playwright-e2e/SKILL.md +178 -0
  31. package/skills/gate-playwright-e2e/reference/config.md +129 -0
  32. package/skills/gate-playwright-e2e/reference/patterns.md +83 -0
  33. package/skills/gate-prd/SKILL.md +42 -0
  34. package/skills/gate-research/SKILL.md +17 -0
  35. package/skills/gate-tdd/SKILL.md +39 -0
  36. package/skills/gate-tdd/mocking.md +61 -0
  37. package/skills/gate-tdd/tests.md +79 -0
  38. package/skills/gate-user-verify/DIAGNOSE.md +75 -0
  39. package/skills/gate-user-verify/SKILL.md +185 -0
  40. package/skills/gate-user-verify/assets/worker-briefs/gate-code-verify.md +32 -0
  41. package/skills/gate-verify/SKILL.md +73 -0
  42. package/skills/gate-verify/assets/worker-briefs/gate-verify.md +21 -0
  43. package/skills/gate-write-agent-notes/SKILL.md +199 -0
  44. package/skills/gate-write-agent-notes/assets/agent-notes-board.html +1779 -0
  45. package/skills/gate-write-agent-notes/references/archiving.md +113 -0
  46. package/skills/gate-write-agent-notes/references/classification.md +34 -0
  47. package/skills/gate-write-agent-notes/references/note-format.md +72 -0
  48. package/skills/gate-write-agent-notes/references/prose-checklist.md +52 -0
  49. package/skills/gate-write-agent-notes/references/quality-gate.md +60 -0
  50. package/skills/gate-write-agent-notes/references/simplification-checklist.md +27 -0
  51. package/skills/gate-write-agent-notes/references/verification.md +47 -0
  52. package/skills/gate-write-agent-notes/references/when-to-write.md +86 -0
  53. package/skills/gate-write-agent-notes/scripts/agent-note-tree.ts +85 -0
  54. package/skills/gate-write-agent-notes/scripts/archive-agent-note.ts +218 -0
  55. package/skills/gate-write-agent-notes/scripts/build-board.ts +240 -0
  56. package/skills/gate-write-agent-notes/scripts/check-note-anchors.ts +105 -0
  57. package/skills/gate-write-agent-notes/scripts/verify-agent-note-format.ts +158 -0
  58. package/skills/gate-write-agent-notes/scripts/verify-agent-note-lifecycle.ts +74 -0
  59. package/skills/gate-write-agent-notes/scripts/verify-agent-note-tree.ts +56 -0
  60. package/skills/gate-write-agent-notes/scripts/verify-archived-agent-notes.ts +127 -0
  61. package/skills/gate-write-agent-notes/templates/implemented.md +35 -0
  62. package/skills/gate-write-agent-notes/templates/proposed.md +41 -0
  63. package/skills/gate-write-agent-notes/templates/rejected.md +30 -0
  64. package/skills/gate-writing-for-agents/SKILL-MECHANICS.md +24 -0
  65. package/skills/gate-writing-for-agents/SKILL.md +85 -0
package/README.md CHANGED
@@ -1,3 +1,285 @@
1
- # Temporary Holding Version
1
+ # dsh-gate-agent
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Host 插件:用 phase/node 门禁组织讨论、规划、实施、评审、验收和 Note 生命周期,提供 `/gate-*` 命令、`gate_*` 工具和专项技能。
4
+
5
+ > 这是流程门禁,不是 OS 级安全边界。硬拒绝由 `ctx.tools.guard` 提供;blocked 的写冻结是 guard/restrict 的进程级限制(显式写工具/写型 shell),真正需要隔离时仍使用 DSH 的 sandbox/approval。未知工具与任意 shell 语义不会被完整分析。
6
+
7
+ ## 安装与启用
8
+
9
+ - 插件通过 `plugin_manager` 的 `install_bundle` 安装,target 指向本包 `package.json` 所在目录的绝对路径。
10
+ - 安装前必须已生成 `lib/index.js`;构建、类型检查和测试命令由仓库根文档负责,见根 [`README.md`](../../README.md)。
11
+ - 安装/升级后重启 DSH,使 bundle 从 `lib/index.js` 加载。
12
+ - 插件由“开发者模式”preset 启用。启用后先执行 `/gate-init`。
13
+
14
+ `/gate-init` 会:
15
+
16
+ - 创建 `.agents/notes/` 的 `proposed/`、`implemented/`、`rejected/`、`archived/` 根;
17
+ - 创建/更新 `AGENTS.md` managed block;
18
+ - 生成 `.agents/gate/verify-notes.mjs`、`.agents/gate/ci/` 和 `.github/workflows/verify-notes.yml`;
19
+ - 在项目 `package.json` 中确保 `verify-notes` 脚本;
20
+ - 在非 git 工作区执行 `git init`,在 `.gitignore` 缺失时写入基础忽略项;已有 `.gitignore` 不覆盖。
21
+
22
+ ## 工作阶段与节点
23
+
24
+ `phase` 是当前工作阶段,`node` 是阶段内的具体步骤。`discuss` 之外由命令或 `gate_start_phase` 进入。
25
+
26
+ | phase / node | 用途 | 主代理/worker 与技能 |
27
+ |---|---|---|
28
+ | `discuss` | 理解需求、讨论方案、确认授权 | root;不派 worker |
29
+ | `orchestrating/plan` | 把工作项整理成规划工件 | planning worker;`gate-planning` + `gate-write-agent-notes` |
30
+ | `orchestrating/plan-review` | Plan Review 三轴评审 | review worker;`gate-plan-review` |
31
+ | `orchestrating/plan-revise` | 按 findings 修计划 | planning worker;`gate-planning` |
32
+ | `orchestrating/implement` | 按已确认计划实施 | implement worker;`gate-implement` |
33
+ | `orchestrating/code-review` | 实现 review(Standards/Spec) | review worker;`gate-code-review` |
34
+ | `orchestrating/implement-revise` | 按 review findings 修正 | implement worker;`gate-implement` |
35
+ | `orchestrating/verify` | 最终验收与证据绑定 | verify worker;`gate-verify` |
36
+ | `orchestrating/note-lifecycle` | 把 proposed Note 转 implemented、跑 notes 校验 | root;`gate-write-agent-notes` lifecycle 工具 |
37
+ | `orchestrating/fix-bug` | 修复已授权缺陷并复核 | fix worker + review worker;`gate-fix-bug` + `gate-code-review` |
38
+ | `reviewing/code-review-standalone` | 单独只读 code review | review worker;`gate-code-review` |
39
+ | `reviewing/proposal-review` | 单独提案评审 | review worker;`gate-plan-review` |
40
+ | `reviewing/verify-standalone` | 单独只读验收 | verify worker;`gate-user-verify` |
41
+ | `docs` | 文档治理 | root;不调用 gate 技能 |
42
+ | `blocked` | 冻结写入/派 worker,等待用户决定 | root;`/gate-resume` 或 `/gate-return-discuss` |
43
+ | `complete` | 工作完成 | root;可重新进入 plan/implement |
44
+
45
+ 进入阶段不等于执行。主代理按当前 procedure 加载技能、派 worker,再用 `gate_record` 推进节点。
46
+
47
+ ## 命令
48
+
49
+ | 命令 | 参数 | 作用 |
50
+ |---|---|---|
51
+ | `/gate-init` | 无 | 初始化 notes、AGENTS.md、`verify-notes`、CI、git 与基础 `.gitignore`,保持 `discuss` |
52
+ | `/gate-enter-plan [简单需求]` | 可选 | 进入 `orchestrating/plan` |
53
+ | `/gate-enter-implement [简单说明]` | 可选 | 进入 `orchestrating/implement`;复用已通过的 task,或直接用简述 |
54
+ | `/gate-docs` | 无 | 文档治理,不调用技能 |
55
+ | `/gate-implement-review [范围]` | 可选 | 单独只读 code review,只输出 findings |
56
+ | `/gate-code-verify [范围]` | 可选 | 单独只读验收;子代理使用 `gate-user-verify` |
57
+ | `/gate-fix-bug [缺陷简述]` | 可选 | 派 fix worker 修复已授权缺陷,完成后回 discuss |
58
+ | `/gate-propose-review [提案]` | 可选 | 单独提案评审,走 `gate-plan-review` 三轴 |
59
+ | `/gate-note-verify` | 无 | 只读检查 notes tree/format/lifecycle/archived |
60
+ | `/gate-note-archive <note> [--superseded-by <new>]` | 必需 Note 路径 | 归档 implemented Note,写 Archived、移动、封印、报告入站链接 |
61
+ | `/gate-note-board [输出路径] [标题]` | 可选 | 生成决策看板 `board.html` |
62
+ | `/gate-note-seal` | 无 | 只给 `archived/` 中已有 Note 补写 `manifest.json` 的 SHA-256 封印 |
63
+ | `/gate-block [原因]` | 可选 | 手动暂停,保留当前节点 |
64
+ | `/gate-resume` | 无 | 解冻 blocked,回到 block 前的节点;轮次耗尽回 discuss |
65
+ | `/gate-return-discuss` | 无 | 回到 discuss |
66
+ | `/gate-status` | 无 | 只读显示当前 phase/node 与 procedure |
67
+
68
+ 离开 discuss 不要求用户输入 slash command:用户在对话或 `ask_user_question` 中明确授权后,主代理可调用 `gate_start_phase({node:'plan'|'implement', brief})`。
69
+
70
+ ## 技能
71
+
72
+ | 技能 | 使用方 | 作用 |
73
+ |---|---|---|
74
+ | `gate-planning` | planning worker | 生成/更新规划 Note,组织工作项、验收和设计 |
75
+ | `gate-plan-review` | plan/proposal review worker | Standards/Spec/Architecture 三轴评审 |
76
+ | `gate-implement` | implement/fix worker | 按计划实施并返回改动/验证结果 |
77
+ | `gate-code-review` | code review worker | 对实现做 Standards/Spec 两轴 review |
78
+ | `gate-verify` | verify worker | 最终验收、证据收集与汇报 |
79
+ | `gate-user-verify` | standalone verify worker | 独立只读验收 |
80
+ | `gate-fix-bug` | fix worker | 已授权缺陷修复流程 |
81
+ | `gate-write-agent-notes` | planning worker / root note lifecycle | Note 检索、格式、finalize/verify |
82
+
83
+ ## 典型用法
84
+
85
+ ### 初始化
86
+
87
+ ```text
88
+ /gate-init
89
+ ```
90
+
91
+ 从 `discuss` 开始,不进入 planning/implement。
92
+
93
+ ### Planning
94
+
95
+ ```text
96
+ /gate-enter-plan
97
+ ```
98
+
99
+ 主代理派 `gate-planning` worker,创建/更新 proposed Agent Note。worker 完成后:
100
+
101
+ ```text
102
+ gate_record({
103
+ node: 'plan',
104
+ task: '工作项简述',
105
+ noteDecision: 'new' | 'update' | 'in-place' | 'mechanical',
106
+ notePaths: [{ path: '.agents/notes/proposed/feature/...', class: 'feature', lifecycle: 'proposed' }]
107
+ })
108
+ ```
109
+
110
+ 进入 `plan-review`,由 review worker 做三轴评审;findings 交回 `plan-revise`,直到通过后回 `discuss`,`planReady=true`。
111
+
112
+ ### Implementation
113
+
114
+ ```text
115
+ /gate-enter-implement
116
+ ```
117
+
118
+ 主代理派 `gate-implement` worker 实施;完成后 `gate_record({node:'implement', workerSessionIds})` 进入 `code-review`。review 通过后进入 `verify`;verify PASS 后进入 `note-lifecycle`。
119
+
120
+ Note lifecycle:
121
+
122
+ 1. `gate_note_finalize`:把 proposed Note 移到 `implemented/`,更新头块;
123
+ 2. `gate_note_verify`:跑 notes tree/format/lifecycle/archived 校验,通过后设置 `noteVerified`;
124
+ 3. `gate_record({node:'note-lifecycle'})`:完成并回 discuss。
125
+
126
+ gate 不自动 `git add`/`git commit`;完成 note-lifecycle 后由用户或主代理决定是否提交。
127
+
128
+ ### 单独 code review
129
+
130
+ ```text
131
+ /gate-implement-review [范围]
132
+ ```
133
+
134
+ 只读 review,不修改被评审对象;findings 直接输出。
135
+
136
+ ### 单独验收
137
+
138
+ ```text
139
+ /gate-code-verify [范围]
140
+ ```
141
+
142
+ 主代理派只读 verify worker,使用 `gate-user-verify`;PASS 后 `gate_record({node:'verify-standalone', verification, workerSessionIds})` 回 discuss。
143
+
144
+ ### 缺陷修复
145
+
146
+ ```text
147
+ /gate-fix-bug 修复空指针异常
148
+ ```
149
+
150
+ 主代理派 fix worker 执行修复,再派独立 review worker 复核;完成后 `gate_record({node:'fix-bug', workerSessionIds})`。
151
+
152
+ ### 提案评审
153
+
154
+ ```text
155
+ /gate-propose-review 某个提案
156
+ ```
157
+
158
+ review worker 使用 `gate-plan-review` 做 Standards/Spec/Architecture 三轴评审,不改提案。
159
+
160
+ ### 归档与封印
161
+
162
+ ```text
163
+ /gate-note-archive implemented/architecture/2026-11-10-example.md
164
+ /gate-note-archive implemented/architecture/old.md --superseded-by implemented/architecture/new.md
165
+ /gate-note-seal
166
+ ```
167
+
168
+ - 归档由用户命令触发;模型不自动移动 Note。
169
+ - `archived/manifest.json` 的封印只由 `/gate-note-seal` 写入。
170
+ - 归档后报告被新 Note 取代的入站链接。
171
+
172
+ ### 决策看板
173
+
174
+ ```text
175
+ /gate-note-board [输出路径] [标题]
176
+ ```
177
+
178
+ 生成连接本地 notes 目录的轻量 `board.html`,不改变 Note。
179
+
180
+ ### 文档治理
181
+
182
+ ```text
183
+ /gate-docs
184
+ ```
185
+
186
+ 进入 `docs` phase,不调用 gate 技能;由主代理按项目文档规范处理。
187
+
188
+ ### 暂停、恢复与讨论
189
+
190
+ ```text
191
+ /gate-block 等待产品决定
192
+ /gate-resume
193
+ /gate-return-discuss
194
+ /gate-status
195
+ ```
196
+
197
+ - `/gate-block`:保留当前节点,冻结写入与 worker 派发,对话仍可继续。
198
+ - `/gate-resume`:回到 block 前的节点;review 轮次耗尽时回 discuss。
199
+ - `/gate-return-discuss`:放弃当前节点,回 discuss。
200
+ - `/gate-status`:只读查看当前 phase/node 和 procedure。
201
+
202
+ ## 工具
203
+
204
+ ### gate_start_phase
205
+
206
+ 只允许 root 调用,在用户已授权时从 `discuss`/`complete` 进入 `plan` 或 `implement`:
207
+
208
+ ```text
209
+ gate_start_phase({ node: 'plan' | 'implement', brief })
210
+ ```
211
+
212
+ ### gate_record
213
+
214
+ 只允许 root 调用。它记录节点结果、推进状态,并返回 transition 后的当前 procedure。
215
+
216
+ ```text
217
+ gate_record({
218
+ node,
219
+ task,
220
+ workerSessionIds,
221
+ findings,
222
+ reviewAxes,
223
+ requiresDiscussion,
224
+ discussionReason,
225
+ verification
226
+ })
227
+ ```
228
+
229
+ - `node`:`plan`、`plan-review`、`proposal-review`、`plan-revise`、`implement`、`code-review`、`implement-revise`、`verify`、`verify-standalone`、`code-review-standalone`、`fix-bug`、`note-lifecycle`、`docs`。
230
+ - `plan` 必须带 `task`。
231
+ - worker 节点必须带当前 root 的、已 settled 的 child `workerSessionIds`。
232
+ - `plan-review`/`proposal-review` 需要 Standards/Spec/Architecture 三轴;`code-review`/`code-review-standalone` 需要 Standards/Spec 两轴。
233
+ - `requiresDiscussion=true` 进入 blocked,等待用户决定。
234
+ - review 达到 `reviewLimit` 仍有 findings 时 blocked,不能靠重新进入 implement 绕过。
235
+
236
+ ### gate_status
237
+
238
+ 只读,root 和 worker 可调用。root 返回当前 procedure 与状态;worker 只返回状态,不返回 root procedure。
239
+
240
+ ```text
241
+ gate_status()
242
+ ```
243
+
244
+ ### Note 工具
245
+
246
+ - `gate_note_write`:planning worker 写 proposed Note,或原地更新 implemented Note;通用 `write`/`edit`/`apply_patch`/shell 在 planning 被拒绝。
247
+ - `gate_note_verify`:root 在 note-lifecycle 中跑 notes 校验。
248
+ - `gate_note_finalize`:root 把 proposed Note 移到 implemented 并更新头块。
249
+
250
+ ## Verify 证据
251
+
252
+ ```json
253
+ {
254
+ "verification": {
255
+ "commands": ["node packages/gate/test/unit.mjs"],
256
+ "evidence": ["artifacts/verify.txt"],
257
+ "toolResults": ["call_..."],
258
+ "passed": true
259
+ }
260
+ }
261
+ ```
262
+
263
+ - `commands`、`evidence`、`toolResults` 不能为空;
264
+ - `evidence` 必须是 gate workspace 内的普通文件;
265
+ - `toolResults` 必须是 verify worker session log 中真实 `tool/result` 的 `call_...` id;
266
+ - gate 记录 evidence 的 `path`、`size`、`sha256`;
267
+ - 绑定成功后 verify 标记 `selfReported:false`、`executionBound:true`;
268
+ - `commands`/`evidence` 是主代理转述,不是完整独立执行证明。
269
+
270
+ ## 配置
271
+
272
+ 插件 Config:
273
+
274
+ ```json
275
+ { "reviewLimit": 5 }
276
+ ```
277
+
278
+ `reviewLimit` 是每个 review 节点的最大轮次;默认 5,范围 1–20。达到上限仍有 findings 时进入 blocked。
279
+
280
+ ## 使用边界
281
+
282
+ - gate 是流程门禁,不是 OS 安全边界;未知工具和任意 shell 语义不会被完整分析。
283
+ - blocked 的写冻结是 guard/restrict 的进程级限制;需要强隔离时使用 DSH sandbox/approval。
284
+ - root 在 code-review/verify 可写文件;修改被评审实现后必须重跑 review/verify。
285
+ - 旧会话不会自动恢复 gate 管理的 sandbox mode;gate 不再 append `sandbox/mode`。
@@ -0,0 +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
+
package/icon.svg ADDED
@@ -0,0 +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>
@@ -0,0 +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
+ }
@@ -0,0 +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