mcp-probe-kit 2.5.0 → 3.0.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 (96) hide show
  1. package/README.md +164 -132
  2. package/build/index.js +1 -39
  3. package/build/lib/response.d.ts +9 -0
  4. package/build/lib/response.js +23 -0
  5. package/build/lib/toolset-manager.d.ts +2 -2
  6. package/build/lib/toolset-manager.js +23 -30
  7. package/build/schemas/basic-tools.d.ts +2 -2
  8. package/build/schemas/basic-tools.js +2 -2
  9. package/build/schemas/code-analysis-tools.d.ts +0 -40
  10. package/build/schemas/code-analysis-tools.js +0 -42
  11. package/build/schemas/code-gen-tools.d.ts +0 -84
  12. package/build/schemas/code-gen-tools.js +0 -88
  13. package/build/schemas/doc-util-tools.d.ts +1 -19
  14. package/build/schemas/doc-util-tools.js +1 -22
  15. package/build/schemas/git-tools.d.ts +0 -54
  16. package/build/schemas/git-tools.js +0 -57
  17. package/build/schemas/index.d.ts +46 -306
  18. package/build/schemas/orchestration-tools.d.ts +0 -98
  19. package/build/schemas/orchestration-tools.js +0 -103
  20. package/build/schemas/output/index.d.ts +9 -37
  21. package/build/schemas/output/index.js +19 -51
  22. package/build/schemas/product-design-schemas.d.ts +6 -51
  23. package/build/schemas/product-design-schemas.js +0 -46
  24. package/build/schemas/structured-output.d.ts +8 -8
  25. package/build/schemas/structured-output.js +8 -8
  26. package/build/schemas/ui-ux-schemas.d.ts +31 -37
  27. package/build/schemas/ui-ux-schemas.js +0 -30
  28. package/build/tools/add_feature.d.ts +7 -1
  29. package/build/tools/add_feature.js +5 -52
  30. package/build/tools/code_review.d.ts +7 -1
  31. package/build/tools/code_review.js +9 -23
  32. package/build/tools/estimate.d.ts +7 -1
  33. package/build/tools/estimate.js +5 -36
  34. package/build/tools/fix_bug.d.ts +7 -1
  35. package/build/tools/fix_bug.js +8 -27
  36. package/build/tools/gencommit.d.ts +3 -3
  37. package/build/tools/gencommit.js +26 -44
  38. package/build/tools/gentest.d.ts +7 -1
  39. package/build/tools/gentest.js +37 -45
  40. package/build/tools/index.d.ts +0 -19
  41. package/build/tools/index.js +0 -19
  42. package/build/tools/refactor.d.ts +7 -1
  43. package/build/tools/refactor.js +27 -30
  44. package/build/tools/start_product.js +1 -1
  45. package/build/utils/__tests__/error-handler.test.d.ts +1 -0
  46. package/build/utils/__tests__/error-handler.test.js +107 -0
  47. package/build/utils/error-handler.d.ts +83 -0
  48. package/build/utils/error-handler.js +166 -0
  49. package/docs/data/tools.js +201 -612
  50. package/docs/fix-summary.md +110 -0
  51. package/docs/index.html +27 -20
  52. package/docs/mobile-test.html +101 -0
  53. package/docs/pages/all-tools.html +815 -828
  54. package/docs/pages/examples.html +772 -761
  55. package/docs/pages/getting-started.html +245 -31
  56. package/docs/pages/migration.html +325 -314
  57. package/docs/styles/page.css +292 -21
  58. package/package.json +2 -2
  59. package/build/tools/gen_mock.d.ts +0 -4
  60. package/build/tools/gen_mock.js +0 -91
  61. package/build/tools/gen_prd.d.ts +0 -6
  62. package/build/tools/gen_prd.js +0 -297
  63. package/build/tools/gen_prototype.d.ts +0 -6
  64. package/build/tools/gen_prototype.js +0 -292
  65. package/build/tools/genapi.d.ts +0 -1
  66. package/build/tools/genapi.js +0 -184
  67. package/build/tools/genchangelog.d.ts +0 -1
  68. package/build/tools/genchangelog.js +0 -81
  69. package/build/tools/gendoc.d.ts +0 -1
  70. package/build/tools/gendoc.js +0 -243
  71. package/build/tools/genpr.d.ts +0 -1
  72. package/build/tools/genpr.js +0 -72
  73. package/build/tools/genreadme.d.ts +0 -1
  74. package/build/tools/genreadme.js +0 -68
  75. package/build/tools/gensql.d.ts +0 -1
  76. package/build/tools/gensql.js +0 -68
  77. package/build/tools/init_component_catalog.d.ts +0 -5
  78. package/build/tools/init_component_catalog.js +0 -164
  79. package/build/tools/perf.d.ts +0 -1
  80. package/build/tools/perf.js +0 -419
  81. package/build/tools/render_ui.d.ts +0 -5
  82. package/build/tools/render_ui.js +0 -238
  83. package/build/tools/resolve_conflict.d.ts +0 -1
  84. package/build/tools/resolve_conflict.js +0 -359
  85. package/build/tools/security_scan.d.ts +0 -10
  86. package/build/tools/security_scan.js +0 -341
  87. package/build/tools/start_api.d.ts +0 -7
  88. package/build/tools/start_api.js +0 -145
  89. package/build/tools/start_doc.d.ts +0 -7
  90. package/build/tools/start_doc.js +0 -150
  91. package/build/tools/start_refactor.d.ts +0 -7
  92. package/build/tools/start_refactor.js +0 -150
  93. package/build/tools/start_release.d.ts +0 -7
  94. package/build/tools/start_release.js +0 -121
  95. package/build/tools/start_review.d.ts +0 -7
  96. package/build/tools/start_review.js +0 -138
package/README.md CHANGED
@@ -7,157 +7,159 @@
7
7
 
8
8
  > 🚀 AI 驱动的完整研发工具集 - 覆盖开发全流程
9
9
 
10
- 一个强大的 MCP (Model Context Protocol) 服务器,提供 **39 个实用工具**,覆盖从产品分析到最终发布的全流程(需求 → 设计 → 开发 → 质量 → 发布),核心与编排工具支持**结构化输出**。
10
+ 一个强大的 MCP (Model Context Protocol) 服务器,提供 **20 个精简工具**,覆盖从产品分析到最终发布的全流程(需求 → 设计 → 开发 → 质量 → 发布),所有工具支持**结构化输出**。
11
11
 
12
- **🎉 v2.5 特性**:委托式编排协议、需求澄清 Loop、模板档位(auto/guided/strict)、产品设计工作流(PRD → 原型 → HTML)、结构化输出
13
-
14
- **支持所有 MCP 客户端**:Cursor、Claude Desktop、Cline、Continue 等
15
-
16
- **协议版本**:MCP 2025-11-25 · **SDK**:@modelcontextprotocol/sdk 1.25.3
17
-
18
- ---
12
+ **🎉 v3.0 重大更新**:精简工具数量,专注核心竞争力,消除选择困难,让 AI 做更多原生工作
13
+
14
+ **支持所有 MCP 客户端**:Cursor、Claude Desktop、Cline、Continue 等
15
+
16
+ **协议版本**:MCP 2025-11-25 · **SDK**:@modelcontextprotocol/sdk 1.25.3
17
+
18
+ ---
19
19
 
20
20
  ## 📚 完整文档
21
21
 
22
22
  **👉 [https://mcp-probe-kit.bytezonex.com](https://mcp-probe-kit.bytezonex.com/)**
23
23
 
24
24
  - [快速开始](https://mcp-probe-kit.bytezonex.com/pages/getting-started.html) - 5分钟完成安装配置
25
- - [所有工具](https://mcp-probe-kit.bytezonex.com/pages/all-tools.html) - 39个工具完整列表
25
+ - [所有工具](https://mcp-probe-kit.bytezonex.com/pages/all-tools.html) - 20个工具完整列表
26
26
  - [最佳实践](https://mcp-probe-kit.bytezonex.com/pages/examples.html) - 完整研发流程实战指南
27
- - [迁移指南](https://mcp-probe-kit.bytezonex.com/pages/migration.html) - 版本升级指南
27
+ - [v3.0 迁移指南](https://mcp-probe-kit.bytezonex.com/pages/migration.html) - v2.x → v3.0 升级指南
28
28
 
29
29
  ---
30
30
 
31
31
  ## ✨ 核心特性
32
32
 
33
- ### 📦 39 个实用工具
34
-
35
- - **🔄 工作流编排** (11个) - 一键完成复杂开发流程
36
- - **🔍 代码分析** (5个) - 代码审查、安全扫描、性能优化
37
- - **🌿 Git 工具** (4个) - 自动生成 commit、PR、changelog
38
- - **✨ 生成工具** (6个) - 文档、测试、Mock 数据生成
39
- - **📋 项目管理** (6个) - 项目上下文、需求访谈、工作量估算
40
- - **🎨 UI/UX 工具** (5个) - 设计系统、组件目录、模板搜索与渲染
41
- - **🚀 产品设计** (2个) - PRD、原型设计
42
-
43
- ### 🎯 结构化输出
44
-
45
- 核心与编排工具支持**结构化输出**,返回机器可读的 JSON 数据,提高 AI 解析准确性,支持工具串联和状态追踪。
46
-
47
- ### 🧭 委托式编排协议(Delegated Plan)
48
-
49
- 所有 `start_*` 编排工具会在 `structuredContent.metadata.plan` 中返回**执行计划**。
50
- AI 需要**按步骤调用工具并落盘文件**,而不是由工具内部直接执行。
51
-
52
- **Plan Schema(核心字段)**:
53
- ```json
54
- {
55
- "mode": "delegated",
56
- "steps": [
57
- {
58
- "id": "spec",
59
- "tool": "add_feature",
60
- "args": { "feature_name": "user-auth", "description": "用户认证功能" },
61
- "outputs": ["docs/specs/user-auth/requirements.md"]
62
- }
63
- ]
64
- }
65
- ```
66
-
67
- **字段说明**:
68
- - `mode`: 固定为 `delegated`
69
- - `steps`: 执行步骤数组
70
- - `tool`: 工具名称(如 `add_feature`)
71
- - `action`: 无工具时的手动动作描述(如 `update_project_context`)
72
- - `args`: 工具参数
73
- - `outputs`: 预期产物
74
- - `when/dependsOn/note`: 可选的条件与说明
75
-
76
- ### 🧩 结构化输出字段规范(关键字段)
77
-
78
- 编排与原子工具都会返回 `structuredContent`,常用字段约定如下:
79
- - `summary`: 一句话摘要
80
- - `status`: 状态(pending/success/failed/partial)
81
- - `steps`: 执行步骤(编排工具)
82
- - `artifacts`: 产物列表(路径 + 用途)
83
- - `metadata.plan`: 委托式执行计划(仅 start_*)
84
- - `specArtifacts`: 规格文档产物(start_feature)
85
- - `estimate`: 估算结果(start_feature / estimate
86
-
87
- ### 🧠 需求澄清模式(Requirements Loop)
88
-
89
- 当需求不够清晰时,可在 `start_feature / start_bugfix / start_ui` 中使用 `requirements_mode=loop`。
90
- 该模式会先进行 1-2 轮结构化澄清,再进入规格/修复/UI 执行流程。
91
-
92
- **示例:**
93
- ```json
94
- {
95
- "feature_name": "user-auth",
96
- "description": "用户认证功能",
97
- "requirements_mode": "loop",
98
- "loop_max_rounds": 2,
99
- "loop_question_budget": 5
100
- }
101
- ```
102
-
103
- ### 🧩 模板系统(普通模型友好)
104
-
105
- `add_feature` 支持模板档位,默认 `auto` 自动选择:需求不完整时偏向 `guided`(包含更详细的填写规则与检查清单),需求较完整时选择 `strict`(结构更紧凑,适合高能力模型或归档场景)。
106
-
107
- **示例:**
108
- ```json
109
- {
110
- "description": "添加用户认证功能",
111
- "template_profile": "auto"
112
- }
113
- ```
114
-
115
- **适用工具**:
116
- - `start_feature` 会透传 `template_profile` 给 `add_feature`
117
- - `start_bugfix` / `start_ui` 也支持 `template_profile`,用于控制指导强度(auto/guided/strict)
118
-
119
- **模板档位策略**:
120
- - `guided`:需求信息少/不完整、普通模型优先
121
- - `strict`:需求已结构化、希望指引更紧凑
122
- - `auto`:默认推荐,自动选择 guided/strict
123
-
124
- ### 🔄 工作流编排
125
-
126
- 11 个智能编排工具,自动组合多个基础工具,一键完成复杂开发流程:
33
+ ### 📦 20 个精简工具
34
+
35
+ - **🔄 工作流编排** (6个) - 一键完成复杂开发流程
36
+ - `start_feature`, `start_bugfix`, `start_onboard`, `start_ui`, `start_product`, `start_ralph`
37
+ - **🔍 代码分析** (3个) - 代码质量与重构
38
+ - `code_review`, `fix_bug`, `refactor`
39
+ - **� Git 工具** (1个) - 提交消息生成
40
+ - `gencommit`
41
+ - **⚡ 代码生成** (1个) - 测试生成
42
+ - `gentest`
43
+ - **📦 项目管理** (7个) - 项目初始化与需求管理
44
+ - `init_project`, `init_project_context`, `add_feature`, `estimate`, `interview`, `ask_user`
45
+ - **🎨 UI/UX 工具** (3个) - 设计系统与数据同步
46
+ - `ui_design_system`, `ui_search`, `sync_ui_data`
47
+
48
+ ### 🎯 结构化输出
49
+
50
+ 核心与编排工具支持**结构化输出**,返回机器可读的 JSON 数据,提高 AI 解析准确性,支持工具串联和状态追踪。
51
+
52
+ ### 🧭 委托式编排协议(Delegated Plan
53
+
54
+ 所有 `start_*` 编排工具会在 `structuredContent.metadata.plan` 中返回**执行计划**。
55
+ AI 需要**按步骤调用工具并落盘文件**,而不是由工具内部直接执行。
56
+
57
+ **Plan Schema(核心字段)**:
58
+ ```json
59
+ {
60
+ "mode": "delegated",
61
+ "steps": [
62
+ {
63
+ "id": "spec",
64
+ "tool": "add_feature",
65
+ "args": { "feature_name": "user-auth", "description": "用户认证功能" },
66
+ "outputs": ["docs/specs/user-auth/requirements.md"]
67
+ }
68
+ ]
69
+ }
70
+ ```
71
+
72
+ **字段说明**:
73
+ - `mode`: 固定为 `delegated`
74
+ - `steps`: 执行步骤数组
75
+ - `tool`: 工具名称(如 `add_feature`)
76
+ - `action`: 无工具时的手动动作描述(如 `update_project_context`)
77
+ - `args`: 工具参数
78
+ - `outputs`: 预期产物
79
+ - `when/dependsOn/note`: 可选的条件与说明
80
+
81
+ ### 🧩 结构化输出字段规范(关键字段)
82
+
83
+ 编排与原子工具都会返回 `structuredContent`,常用字段约定如下:
84
+ - `summary`: 一句话摘要
85
+ - `status`: 状态(pending/success/failed/partial
86
+ - `steps`: 执行步骤(编排工具)
87
+ - `artifacts`: 产物列表(路径 + 用途)
88
+ - `metadata.plan`: 委托式执行计划(仅 start_*)
89
+ - `specArtifacts`: 规格文档产物(start_feature
90
+ - `estimate`: 估算结果(start_feature / estimate)
91
+
92
+ ### 🧠 需求澄清模式(Requirements Loop)
93
+
94
+ 当需求不够清晰时,可在 `start_feature / start_bugfix / start_ui` 中使用 `requirements_mode=loop`。
95
+ 该模式会先进行 1-2 轮结构化澄清,再进入规格/修复/UI 执行流程。
96
+
97
+ **示例:**
98
+ ```json
99
+ {
100
+ "feature_name": "user-auth",
101
+ "description": "用户认证功能",
102
+ "requirements_mode": "loop",
103
+ "loop_max_rounds": 2,
104
+ "loop_question_budget": 5
105
+ }
106
+ ```
107
+
108
+ ### 🧩 模板系统(普通模型友好)
109
+
110
+ `add_feature` 支持模板档位,默认 `auto` 自动选择:需求不完整时偏向 `guided`(包含更详细的填写规则与检查清单),需求较完整时选择 `strict`(结构更紧凑,适合高能力模型或归档场景)。
111
+
112
+ **示例:**
113
+ ```json
114
+ {
115
+ "description": "添加用户认证功能",
116
+ "template_profile": "auto"
117
+ }
118
+ ```
119
+
120
+ **适用工具**:
121
+ - `start_feature` 会透传 `template_profile` 给 `add_feature`
122
+ - `start_bugfix` / `start_ui` 也支持 `template_profile`,用于控制指导强度(auto/guided/strict
123
+
124
+ **模板档位策略**:
125
+ - `guided`:需求信息少/不完整、普通模型优先
126
+ - `strict`:需求已结构化、希望指引更紧凑
127
+ - `auto`:默认推荐,自动选择 guided/strict
128
+
129
+ ### 🔄 工作流编排
130
+
131
+ 6 个智能编排工具,自动组合多个基础工具,一键完成复杂开发流程:
127
132
  - `start_feature` - 新功能开发(需求 → 设计 → 估算)
128
- - `start_bugfix` - Bug 修复(分析 → 修复 → 测试)
129
- - `start_review` - 代码体检(质量 → 安全 → 性能)
130
- - `start_ui` - UI 开发(设计系统 → 组件 → 代码)
131
- - `start_product` - 产品设计(PRD → 原型 → 设计系统 → HTML)
132
- - 更多...
133
-
134
- ### 🚀 产品设计工作流
135
-
136
- 3 个相关工具(2 个原子 + 1 个编排),从需求到可交互原型:
137
- - `gen_prd` - 生成产品需求文档(PRD)
138
- - `gen_prototype` - 生成原型设计文档
139
- - `start_product` - 完整产品设计流程(PRD → 原型 → 设计系统 → HTML 原型)
140
-
141
- **结构化输出补充**:
142
- - `gen_prd.structuredContent.filePath`:PRD 目标路径(默认 `docs/prd/product-requirements.md`)
143
- - `gen_prototype.structuredContent.indexPath`:原型索引路径(默认 `docs/prototype/prototype-index.md`)
144
- - `interview.structuredContent.mode`:`usage` / `questions` / `record`
145
-
146
- **工作流程:**
147
- 1. **需求分析** - 生成标准 PRD 文档(产品概述、功能需求、页面清单)
148
- 2. **原型设计** - 为每个页面生成详细的原型文档
133
+ - `start_bugfix` - Bug 修复(分析 → 修复 → 测试)
134
+ - `start_onboard` - 项目上手(生成项目上下文文档)
135
+ - `start_ui` - UI 开发(设计系统 → 组件 → 代码)
136
+ - `start_product` - 产品设计(PRD → 原型 → 设计系统 → HTML)
137
+ - `start_ralph` - Ralph Loop(循环开发直到目标完成)
138
+
139
+ ### 🚀 产品设计工作流
140
+
141
+ `start_product` 是一个完整的产品设计编排工具,从需求到可交互原型:
142
+
143
+ **工作流程:**
144
+ 1. **需求分析** - 生成标准 PRD 文档(产品概述、功能需求、页面清单)
145
+ 2. **原型设计** - 为每个页面生成详细的原型文档
149
146
  3. **设计系统** - 基于产品类型生成设计规范
150
147
  4. **HTML 原型** - 生成可直接在浏览器中查看的交互原型
151
148
  5. **项目上下文** - 自动更新项目文档
152
149
 
150
+ **结构化输出补充**:
151
+ - `start_product.structuredContent.artifacts`:产出物列表(PRD、原型、设计系统等)
152
+ - `interview.structuredContent.mode`:`usage` / `questions` / `record`
153
+
153
154
  ### 🎨 UI/UX Pro Max
154
155
 
155
- 5 个 UI/UX 工具,`start_ui` 作为统一入口:
156
- - `start_ui` - 一键 UI 开发(支持智能模式)
157
- - `ui_design_system` - 智能设计系统生成
158
- - `ui_search` - UI/UX 数据搜索(BM25 算法)
159
- - `sync_ui_data` - 同步最新 UI/UX 数据到本地
160
- - `init_component_catalog` / `render_ui` - 内部渲染工具(full 模式可用)
156
+ 3 个 UI/UX 工具,`start_ui` 作为统一入口:
157
+ - `start_ui` - 一键 UI 开发(支持智能模式)(编排工具)
158
+ - `ui_design_system` - 智能设计系统生成
159
+ - `ui_search` - UI/UX 数据搜索(BM25 算法)
160
+ - `sync_ui_data` - 同步最新 UI/UX 数据到本地
161
+
162
+ **注意**:`start_ui` 会自动调用 `ui_design_system` 和 `ui_search`,您无需单独调用它们。
161
163
 
162
164
  **灵感来源:**
163
165
  - [ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) - UI/UX 设计系统理念
@@ -187,6 +189,36 @@ AI 需要**按步骤调用工具并落盘文件**,而不是由工具内部直
187
189
 
188
190
  ---
189
191
 
192
+ ## 🧭 工具选择指南
193
+
194
+ ### 何时使用编排工具 vs 单独工具?
195
+
196
+ **使用编排工具(start_*)当:**
197
+ - ✅ 需要完整的工作流程(多个步骤)
198
+ - ✅ 希望自动化执行多个任务
199
+ - ✅ 需要生成多个产物(文档、代码、测试等)
200
+
201
+ **使用单独工具当:**
202
+ - ✅ 只需要某个特定功能
203
+ - ✅ 已经有了项目上下文文档
204
+ - ✅ 需要更精细的控制
205
+
206
+ ### 常见场景选择
207
+
208
+ | 场景 | 推荐工具 | 原因 |
209
+ |------|---------|------|
210
+ | 开发新功能(完整流程) | `start_feature` | 自动完成:规格→估算 |
211
+ | 只需要功能规格文档 | `add_feature` | 更轻量,只生成文档 |
212
+ | 修复 Bug(完整流程) | `start_bugfix` | 自动完成:分析→修复→测试 |
213
+ | 只需要 Bug 分析 | `fix_bug` | 更快速,只分析问题 |
214
+ | 生成设计系统 | `ui_design_system` | 直接生成设计规范 |
215
+ | 开发 UI 组件 | `start_ui` | 完整流程:设计→组件→代码 |
216
+ | 产品设计(从需求到原型) | `start_product` | 一键完成:PRD→原型→HTML |
217
+ | 一句话需求分析 | `init_project` | 生成完整项目规格文档 |
218
+ | 项目上手文档 | `init_project_context` | 生成技术栈/架构/规范 |
219
+
220
+ ---
221
+
190
222
  ## 🚀 快速开始
191
223
 
192
224
  ### 方式一:npx 直接使用(推荐)
@@ -256,7 +288,7 @@ npm install -g mcp-probe-kit
256
288
 
257
289
  ---
258
290
 
259
- ## 💡 使用示例
291
+ ## 💡 使用示例
260
292
 
261
293
  ### 日常开发
262
294
  ```bash
package/build/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
- import { initProject, gencommit, genapi, codeReview, gentest, genpr, gendoc, genchangelog, refactor, perf, gensql, resolveConflict, genreadme, initProjectContext, addFeature, securityScan, fixBug, estimate, genMock, startFeature, startBugfix, startReview, startRelease, startRefactor, startOnboard, startApi, startDoc, startRalph, interview, askUser, uiDesignSystem, initComponentCatalog, uiSearch, syncUiData, renderUi, startUi, genPrd, genPrototype, startProduct } from "./tools/index.js";
5
+ import { initProject, gencommit, codeReview, gentest, refactor, initProjectContext, addFeature, fixBug, estimate, startFeature, startBugfix, startOnboard, startRalph, interview, askUser, uiDesignSystem, uiSearch, syncUiData, startUi, startProduct } from "./tools/index.js";
6
6
  import { VERSION, NAME } from "./version.js";
7
7
  import { allToolSchemas } from "./schemas/index.js";
8
8
  import { filterTools, getToolsetFromEnv } from "./lib/toolset-manager.js";
@@ -34,57 +34,27 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
34
34
  return await initProject(args);
35
35
  case "gencommit":
36
36
  return await gencommit(args);
37
- case "genapi":
38
- return await genapi(args);
39
37
  case "code_review":
40
38
  return await codeReview(args);
41
39
  case "gentest":
42
40
  return await gentest(args);
43
- case "genpr":
44
- return await genpr(args);
45
- case "gendoc":
46
- return await gendoc(args);
47
- case "genchangelog":
48
- return await genchangelog(args);
49
41
  case "refactor":
50
42
  return await refactor(args);
51
- case "perf":
52
- return await perf(args);
53
- case "gensql":
54
- return await gensql(args);
55
- case "resolve_conflict":
56
- return await resolveConflict(args);
57
- case "genreadme":
58
- return await genreadme(args);
59
43
  case "init_project_context":
60
44
  return await initProjectContext(args);
61
45
  case "add_feature":
62
46
  return await addFeature(args);
63
- case "security_scan":
64
- return await securityScan(args);
65
47
  case "fix_bug":
66
48
  return await fixBug(args);
67
49
  case "estimate":
68
50
  return await estimate(args);
69
- case "gen_mock":
70
- return await genMock(args);
71
51
  // 智能编排工具
72
52
  case "start_feature":
73
53
  return await startFeature(args);
74
54
  case "start_bugfix":
75
55
  return await startBugfix(args);
76
- case "start_review":
77
- return await startReview(args);
78
- case "start_release":
79
- return await startRelease(args);
80
- case "start_refactor":
81
- return await startRefactor(args);
82
56
  case "start_onboard":
83
57
  return await startOnboard(args);
84
- case "start_api":
85
- return await startApi(args);
86
- case "start_doc":
87
- return await startDoc(args);
88
58
  case "start_ralph":
89
59
  return await startRalph(args);
90
60
  // 访谈工具
@@ -95,21 +65,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
95
65
  // UI/UX Pro Max 工具
96
66
  case "ui_design_system":
97
67
  return await uiDesignSystem(args);
98
- case "init_component_catalog":
99
- return await initComponentCatalog(args);
100
68
  case "ui_search":
101
69
  return await uiSearch(args);
102
70
  case "sync_ui_data":
103
71
  return await syncUiData(args);
104
- case "render_ui":
105
- return await renderUi(args);
106
72
  case "start_ui":
107
73
  return await startUi(args);
108
74
  // 产品设计工作流
109
- case "gen_prd":
110
- return await genPrd(args || {});
111
- case "gen_prototype":
112
- return await genPrototype(args || {});
113
75
  case "start_product":
114
76
  return await startProduct(args || {});
115
77
  default:
@@ -30,3 +30,12 @@ export interface ToolResponse {
30
30
  * @returns 标准工具响应
31
31
  */
32
32
  export declare function okStructured(text: string, structuredContent: any, meta?: Record<string, any>): ToolResponse;
33
+ /**
34
+ * 返回纯文本响应(guidance-only 工具)
35
+ * 用于只返回指南而不返回结构化数据的工具
36
+ *
37
+ * @param text - 人类可读的文本内容(通常是 guidance)
38
+ * @param meta - 可选的元数据
39
+ * @returns 标准工具响应
40
+ */
41
+ export declare function okText(text: string, meta?: Record<string, any>): ToolResponse;
@@ -27,3 +27,26 @@ export function okStructured(text, structuredContent, meta) {
27
27
  }
28
28
  return response;
29
29
  }
30
+ /**
31
+ * 返回纯文本响应(guidance-only 工具)
32
+ * 用于只返回指南而不返回结构化数据的工具
33
+ *
34
+ * @param text - 人类可读的文本内容(通常是 guidance)
35
+ * @param meta - 可选的元数据
36
+ * @returns 标准工具响应
37
+ */
38
+ export function okText(text, meta) {
39
+ const response = {
40
+ content: [
41
+ {
42
+ type: 'text',
43
+ text,
44
+ },
45
+ ],
46
+ isError: false,
47
+ };
48
+ if (meta) {
49
+ response._meta = meta;
50
+ }
51
+ return response;
52
+ }
@@ -4,9 +4,9 @@
4
4
  */
5
5
  export type ToolsetType = 'core' | 'ui' | 'workflow' | 'full';
6
6
  /**
7
- * 工具集定义
7
+ * 工具集定义 (v3.0 精简版 - 20 个工具)
8
8
  *
9
- * - core: 核心工具(高频使用)
9
+ * - core: 核心工具(日常高频)
10
10
  * - ui: UI/UX 工具(推荐使用 start_ui 统一入口)
11
11
  * - workflow: 工作流工具(包含 core + 编排工具)
12
12
  * - full: 所有工具(默认)
@@ -4,68 +4,61 @@
4
4
  */
5
5
  import { allToolSchemas } from '../schemas/index.js';
6
6
  /**
7
- * 工具集定义
7
+ * 工具集定义 (v3.0 精简版 - 20 个工具)
8
8
  *
9
- * - core: 核心工具(高频使用)
9
+ * - core: 核心工具(日常高频)
10
10
  * - ui: UI/UX 工具(推荐使用 start_ui 统一入口)
11
11
  * - workflow: 工作流工具(包含 core + 编排工具)
12
12
  * - full: 所有工具(默认)
13
13
  */
14
14
  export const TOOLSET_DEFINITIONS = {
15
- // 核心工具集 - 最常用的基础工具
15
+ // 核心工具集 - 日常高频工具(9 个)
16
16
  core: [
17
17
  'gencommit',
18
18
  'code_review',
19
19
  'gentest',
20
- 'gendoc',
21
20
  'refactor',
22
- 'perf',
23
- 'security_scan',
24
21
  'fix_bug',
25
- 'genapi',
26
- 'gensql',
27
- 'genreadme',
28
- 'gen_mock',
22
+ 'add_feature',
23
+ 'init_project',
24
+ 'init_project_context',
25
+ 'estimate',
29
26
  ],
30
- // UI/UX 工具集 - 对外工具,推荐使用 start_ui 统一入口
27
+ // UI/UX 工具集 - 包含统一入口(4 个)
31
28
  ui: [
32
29
  'start_ui', // ⭐ 统一入口(编排工具)
33
- 'ui_search', // 搜索 UI/UX 数据库
34
30
  'ui_design_system', // 生成设计系统
31
+ 'ui_search', // 搜索 UI/UX 数据库
35
32
  'sync_ui_data', // 同步 UI 数据
36
- // 注意:不包含内部工具 init_component_catalog 和 render_ui
37
33
  ],
38
- // 工作流工具集 - 包含核心工具 + 编排工具
34
+ // 工作流工具集 - 包含核心 + 编排 + 交互(20 个)
39
35
  workflow: [
40
- // 核心工具(复用)
36
+ // 核心工具(9 个)
41
37
  'gencommit',
42
38
  'code_review',
43
39
  'gentest',
44
- 'gendoc',
45
40
  'refactor',
46
- 'perf',
47
- 'security_scan',
48
41
  'fix_bug',
49
- 'genapi',
50
- 'gensql',
51
- 'genreadme',
52
- 'gen_mock',
53
- // 编排工具(10 个)
42
+ 'add_feature',
43
+ 'init_project',
44
+ 'init_project_context',
45
+ 'estimate',
46
+ // 编排工具(6 个)
54
47
  'start_feature',
55
48
  'start_bugfix',
56
- 'start_review',
57
- 'start_release',
58
- 'start_refactor',
59
49
  'start_onboard',
60
- 'start_api',
61
- 'start_doc',
62
- 'start_ralph',
63
50
  'start_ui',
51
+ 'start_product',
52
+ 'start_ralph',
64
53
  // 交互工具(2 个)
65
54
  'interview',
66
55
  'ask_user',
56
+ // UI/UX 工具(3 个)
57
+ 'ui_design_system',
58
+ 'ui_search',
59
+ 'sync_ui_data',
67
60
  ],
68
- // 完整工具集 - 包含所有工具(包括内部工具)
61
+ // 完整工具集 - 所有 20 个工具
69
62
  full: 'all',
70
63
  };
71
64
  /**
@@ -3,13 +3,13 @@
3
3
  */
4
4
  export declare const basicToolSchemas: readonly [{
5
5
  readonly name: "init_project";
6
- readonly description: "当用户需要创建新项目、生成项目结构时使用。按 Spec-Driven Development 方式生成需求/设计/任务文档";
6
+ readonly description: "当用户提供一句话需求时使用。基于 Spec-Driven Development 理念,分析需求并生成完整的项目规格文档(需求分析/技术设计/任务拆解)。适合项目初期的需求澄清和规划";
7
7
  readonly inputSchema: {
8
8
  readonly type: "object";
9
9
  readonly properties: {
10
10
  readonly input: {
11
11
  readonly type: "string";
12
- readonly description: "项目需求描述。可以是简短描述(如'创建电商网站')或详细的功能需求文档";
12
+ readonly description: "项目需求描述。可以是一句话需求(如'创建电商网站')或简短的功能描述,工具会自动分析并生成详细的规格文档";
13
13
  };
14
14
  readonly project_name: {
15
15
  readonly type: "string";
@@ -4,13 +4,13 @@
4
4
  export const basicToolSchemas = [
5
5
  {
6
6
  name: "init_project",
7
- description: "当用户需要创建新项目、生成项目结构时使用。按 Spec-Driven Development 方式生成需求/设计/任务文档",
7
+ description: "当用户提供一句话需求时使用。基于 Spec-Driven Development 理念,分析需求并生成完整的项目规格文档(需求分析/技术设计/任务拆解)。适合项目初期的需求澄清和规划",
8
8
  inputSchema: {
9
9
  type: "object",
10
10
  properties: {
11
11
  input: {
12
12
  type: "string",
13
- description: "项目需求描述。可以是简短描述(如'创建电商网站')或详细的功能需求文档",
13
+ description: "项目需求描述。可以是一句话需求(如'创建电商网站')或简短的功能描述,工具会自动分析并生成详细的规格文档",
14
14
  },
15
15
  project_name: {
16
16
  type: "string",
@@ -19,46 +19,6 @@ export declare const codeAnalysisToolSchemas: readonly [{
19
19
  readonly required: readonly [];
20
20
  readonly additionalProperties: true;
21
21
  };
22
- }, {
23
- readonly name: "perf";
24
- readonly description: "当用户关注代码性能、需要优化性能时使用。分析性能瓶颈(算法/内存/数据库/React渲染),输出瓶颈清单和优化建议";
25
- readonly inputSchema: {
26
- readonly type: "object";
27
- readonly properties: {
28
- readonly code: {
29
- readonly type: "string";
30
- readonly description: "要分析性能的代码";
31
- };
32
- readonly type: {
33
- readonly type: "string";
34
- readonly description: "分析类型:algorithm(算法)、memory(内存)、database(数据库)、react(React渲染)。可选,会自动识别";
35
- };
36
- };
37
- readonly required: readonly [];
38
- readonly additionalProperties: true;
39
- };
40
- }, {
41
- readonly name: "security_scan";
42
- readonly description: "当用户关注代码安全、需要检查安全漏洞时使用。扫描安全漏洞(注入/认证/加密/敏感数据),输出风险清单和修复建议";
43
- readonly inputSchema: {
44
- readonly type: "object";
45
- readonly properties: {
46
- readonly code: {
47
- readonly type: "string";
48
- readonly description: "要扫描的代码";
49
- };
50
- readonly language: {
51
- readonly type: "string";
52
- readonly description: "编程语言。可选,会自动识别";
53
- };
54
- readonly scan_type: {
55
- readonly type: "string";
56
- readonly description: "扫描类型:injection(注入)、auth(认证)、crypto(加密)、all(全部)。可选,默认 all";
57
- };
58
- };
59
- readonly required: readonly [];
60
- readonly additionalProperties: true;
61
- };
62
22
  }, {
63
23
  readonly name: "refactor";
64
24
  readonly description: "当用户需要重构代码、改善代码结构时使用。分析代码结构,提供重构建议、重构步骤和风险评估";