mcp-probe-kit 2.3.0 → 2.5.0

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 (186) hide show
  1. package/README.md +131 -48
  2. package/build/index.js +1 -7
  3. package/build/lib/guidance.d.ts +8 -0
  4. package/build/lib/guidance.js +30 -0
  5. package/build/lib/orchestration-guidance.d.ts +8 -0
  6. package/build/lib/orchestration-guidance.js +16 -0
  7. package/build/lib/template-loader.d.ts +25 -0
  8. package/build/lib/template-loader.js +473 -0
  9. package/build/lib/toolset-manager.d.ts +4 -4
  10. package/build/lib/toolset-manager.js +10 -13
  11. package/build/schemas/code-analysis-tools.d.ts +0 -18
  12. package/build/schemas/code-analysis-tools.js +0 -19
  13. package/build/schemas/doc-util-tools.d.ts +0 -9
  14. package/build/schemas/doc-util-tools.js +0 -10
  15. package/build/schemas/index.d.ts +46 -47
  16. package/build/schemas/orchestration-tools.d.ts +42 -2
  17. package/build/schemas/orchestration-tools.js +42 -2
  18. package/build/schemas/output/core-tools.d.ts +1 -117
  19. package/build/schemas/output/core-tools.js +1 -60
  20. package/build/schemas/output/index.d.ts +5 -4
  21. package/build/schemas/output/index.js +6 -4
  22. package/build/schemas/output/product-design-tools.d.ts +160 -0
  23. package/build/schemas/output/product-design-tools.js +75 -0
  24. package/build/schemas/output/project-tools.d.ts +1 -217
  25. package/build/schemas/output/project-tools.js +1 -103
  26. package/build/schemas/project-tools.d.ts +4 -18
  27. package/build/schemas/project-tools.js +4 -19
  28. package/build/schemas/structured-output.d.ts +309 -99
  29. package/build/schemas/structured-output.js +174 -72
  30. package/build/schemas/ui-ux-schemas.d.ts +26 -0
  31. package/build/schemas/ui-ux-schemas.js +26 -0
  32. package/build/tools/__tests__/add_feature.template.test.d.ts +4 -0
  33. package/build/tools/__tests__/add_feature.template.test.js +47 -0
  34. package/build/tools/__tests__/start_bugfix.unit.test.d.ts +4 -0
  35. package/build/tools/__tests__/start_bugfix.unit.test.js +85 -0
  36. package/build/tools/__tests__/start_feature.unit.test.d.ts +4 -0
  37. package/build/tools/__tests__/start_feature.unit.test.js +83 -0
  38. package/build/tools/__tests__/start_ui.integration.test.js +4 -3
  39. package/build/tools/__tests__/start_ui.loop.test.d.ts +4 -0
  40. package/build/tools/__tests__/start_ui.loop.test.js +24 -0
  41. package/build/tools/__tests__/start_ui.unit.test.js +39 -1
  42. package/build/tools/add_feature.js +184 -406
  43. package/build/tools/ask_user.js +18 -5
  44. package/build/tools/code_review.js +8 -1
  45. package/build/tools/estimate.js +9 -2
  46. package/build/tools/fix_bug.js +9 -2
  47. package/build/tools/gen_mock.js +8 -1
  48. package/build/tools/gen_prd.d.ts +1 -7
  49. package/build/tools/gen_prd.js +41 -27
  50. package/build/tools/gen_prototype.d.ts +1 -7
  51. package/build/tools/gen_prototype.js +47 -27
  52. package/build/tools/genapi.js +8 -1
  53. package/build/tools/genchangelog.js +8 -1
  54. package/build/tools/gencommit.d.ts +1 -1
  55. package/build/tools/gencommit.js +49 -18
  56. package/build/tools/gendoc.js +9 -1
  57. package/build/tools/genpr.js +8 -1
  58. package/build/tools/genreadme.js +8 -1
  59. package/build/tools/gensql.js +8 -1
  60. package/build/tools/gentest.js +8 -1
  61. package/build/tools/index.d.ts +0 -3
  62. package/build/tools/index.js +0 -3
  63. package/build/tools/interview.d.ts +1 -13
  64. package/build/tools/interview.js +96 -31
  65. package/build/tools/perf.js +8 -1
  66. package/build/tools/refactor.js +8 -1
  67. package/build/tools/resolve_conflict.js +8 -1
  68. package/build/tools/security_scan.js +9 -2
  69. package/build/tools/start_api.js +44 -4
  70. package/build/tools/start_bugfix.js +377 -15
  71. package/build/tools/start_doc.js +40 -4
  72. package/build/tools/start_feature.js +287 -92
  73. package/build/tools/start_onboard.js +83 -100
  74. package/build/tools/start_product.d.ts +1 -1
  75. package/build/tools/start_product.js +183 -6
  76. package/build/tools/start_ralph.js +51 -2
  77. package/build/tools/start_refactor.js +39 -4
  78. package/build/tools/start_release.js +33 -4
  79. package/build/tools/start_review.js +39 -4
  80. package/build/tools/start_ui.js +669 -52
  81. package/build/utils/design-reasoning-engine.d.ts +5 -0
  82. package/build/utils/design-reasoning-engine.js +85 -5
  83. package/docs/data/tools.js +308 -478
  84. package/docs/index.html +1 -1
  85. package/docs/pages/all-tools.html +37 -22
  86. package/docs/pages/examples.html +100 -35
  87. package/docs/pages/getting-started.html +43 -3
  88. package/docs/pages/migration.html +14 -8
  89. package/package.json +79 -79
  90. package/build/lib/analysis-tasks.d.ts +0 -35
  91. package/build/lib/analysis-tasks.js +0 -788
  92. package/build/lib/elicitation-helper.d.ts +0 -73
  93. package/build/lib/elicitation-helper.js +0 -130
  94. package/build/lib/task-generator.d.ts +0 -11
  95. package/build/lib/task-generator.js +0 -109
  96. package/build/lib/template-generator.d.ts +0 -14
  97. package/build/lib/template-generator.js +0 -62
  98. package/build/lib/templates/backend-templates.d.ts +0 -8
  99. package/build/lib/templates/backend-templates.js +0 -26
  100. package/build/resources/index.d.ts +0 -4
  101. package/build/resources/index.js +0 -4
  102. package/build/resources/tool-params-guide.d.ts +0 -571
  103. package/build/resources/tool-params-guide.js +0 -488
  104. package/build/tools/analyze_project.d.ts +0 -1
  105. package/build/tools/analyze_project.js +0 -566
  106. package/build/tools/check_deps.d.ts +0 -1
  107. package/build/tools/check_deps.js +0 -213
  108. package/build/tools/convert.d.ts +0 -13
  109. package/build/tools/convert.js +0 -599
  110. package/build/tools/css_order.d.ts +0 -13
  111. package/build/tools/css_order.js +0 -81
  112. package/build/tools/debug.d.ts +0 -1
  113. package/build/tools/debug.js +0 -133
  114. package/build/tools/design2code.d.ts +0 -20
  115. package/build/tools/design2code.js +0 -426
  116. package/build/tools/detect_shell.d.ts +0 -6
  117. package/build/tools/detect_shell.js +0 -151
  118. package/build/tools/explain.d.ts +0 -13
  119. package/build/tools/explain.js +0 -390
  120. package/build/tools/fix.d.ts +0 -13
  121. package/build/tools/fix.js +0 -303
  122. package/build/tools/gen_skill.d.ts +0 -13
  123. package/build/tools/gen_skill.js +0 -560
  124. package/build/tools/genui.d.ts +0 -13
  125. package/build/tools/genui.js +0 -803
  126. package/build/tools/init_setting.d.ts +0 -13
  127. package/build/tools/init_setting.js +0 -47
  128. package/build/tools/split.d.ts +0 -13
  129. package/build/tools/split.js +0 -599
  130. package/build/tools/templates/architecture-template.d.ts +0 -5
  131. package/build/tools/templates/architecture-template.js +0 -42
  132. package/build/tools/templates/coding-standards-template.d.ts +0 -5
  133. package/build/tools/templates/coding-standards-template.js +0 -41
  134. package/build/tools/templates/dependencies-template.d.ts +0 -5
  135. package/build/tools/templates/dependencies-template.js +0 -38
  136. package/build/tools/templates/index-template.d.ts +0 -5
  137. package/build/tools/templates/index-template.js +0 -64
  138. package/build/tools/templates/tech-stack-template.d.ts +0 -5
  139. package/build/tools/templates/tech-stack-template.js +0 -35
  140. package/build/tools/templates/workflows-template.d.ts +0 -5
  141. package/build/tools/templates/workflows-template.js +0 -31
  142. package/docs/specs/algorithm-enhancement/roadmap.md +0 -619
  143. package/docs/specs/project-context-modular/design.md +0 -722
  144. package/docs/specs/project-context-modular/example-output.md +0 -123
  145. package/docs/specs/project-context-modular/implementation-v2.md +0 -275
  146. package/docs/specs/project-context-modular/requirements.md +0 -234
  147. package/docs/specs/project-context-modular/tasks.md +0 -386
  148. package/docs/specs/v2.1-planning.md +0 -335
  149. package/docs/specs/vnext-upgrade/00-OVERVIEW.md +0 -258
  150. package/docs/specs/vnext-upgrade/BETA_RELEASE_GUIDE.md +0 -328
  151. package/docs/specs/vnext-upgrade/GITHUB_DISCUSSION_TEMPLATE.md +0 -236
  152. package/docs/specs/vnext-upgrade/M8.9-PROGRESS-UPDATE.md +0 -248
  153. package/docs/specs/vnext-upgrade/PROGRESS-SUMMARY.md +0 -195
  154. package/docs/specs/vnext-upgrade/QUICK_REFERENCE.md +0 -338
  155. package/docs/specs/vnext-upgrade/README.md +0 -125
  156. package/docs/specs/vnext-upgrade/STATUS-UPDATE-2026-01-26.md +0 -230
  157. package/docs/specs/vnext-upgrade/TOOL_CLEANUP.md +0 -343
  158. package/docs/specs/vnext-upgrade/completed/M1-M2-SUMMARY.md +0 -27
  159. package/docs/specs/vnext-upgrade/completed/M3_COMPLETION_SUMMARY.md +0 -273
  160. package/docs/specs/vnext-upgrade/completed/M4-SUMMARY.md +0 -19
  161. package/docs/specs/vnext-upgrade/completed/M5_COMPLETION_SUMMARY.md +0 -0
  162. package/docs/specs/vnext-upgrade/completed/M8.1-SUMMARY.md +0 -247
  163. package/docs/specs/vnext-upgrade/completed/M8.2-SUMMARY.md +0 -296
  164. package/docs/specs/vnext-upgrade/completed/M8.3-SUMMARY.md +0 -241
  165. package/docs/specs/vnext-upgrade/completed/M8.3-TEST-SUMMARY.md +0 -216
  166. package/docs/specs/vnext-upgrade/completed/M8.4-SUMMARY.md +0 -217
  167. package/docs/specs/vnext-upgrade/completed/M8.4-TEST-SUMMARY.md +0 -198
  168. package/docs/specs/vnext-upgrade/completed/M8.5-SUMMARY.md +0 -202
  169. package/docs/specs/vnext-upgrade/completed/M8.5-TEST-SUMMARY.md +0 -223
  170. package/docs/specs/vnext-upgrade/completed/M8.6-SUMMARY.md +0 -299
  171. package/docs/specs/vnext-upgrade/completed/M8.8-TEST-SUMMARY.md +0 -216
  172. package/docs/specs/vnext-upgrade/completed/TOOL-CLEANUP-SUMMARY.md +0 -210
  173. package/docs/specs/vnext-upgrade/design.md +0 -848
  174. package/docs/specs/vnext-upgrade/requirements.md +0 -221
  175. package/docs/specs/vnext-upgrade/tasks/00-INDEX.md +0 -335
  176. package/docs/specs/vnext-upgrade/tasks/M8.1-SCHEMA-DEFINITION.md +0 -300
  177. package/docs/specs/vnext-upgrade/tasks/M8.2-P1-TOOLS.md +0 -249
  178. package/docs/specs/vnext-upgrade/tasks/M8.3-GENERATION-TOOLS.md +0 -49
  179. package/docs/specs/vnext-upgrade/tasks/M8.4-ORCHESTRATION-TOOLS.md +0 -28
  180. package/docs/specs/vnext-upgrade/tasks/M8.5-PROJECT-TOOLS.md +0 -29
  181. package/docs/specs/vnext-upgrade/tasks/M8.6-UI-TOOLS.md +0 -66
  182. package/docs/specs/vnext-upgrade/tasks/M8.7-HELPER-TOOLS.md +0 -24
  183. package/docs/specs/vnext-upgrade/tasks/M8.8-INTEGRATION-TESTS.md +0 -90
  184. package/docs/specs/vnext-upgrade/tasks/M8.9-DOCUMENTATION.md +0 -103
  185. package/docs/vnext/MCP_2025-11-25_GUIDE.md +0 -276
  186. package/docs/vnext/vNext-PRD.md +0 -488
package/README.md CHANGED
@@ -7,20 +7,22 @@
7
7
 
8
8
  > 🚀 AI 驱动的完整研发工具集 - 覆盖开发全流程
9
9
 
10
- 一个强大的 MCP (Model Context Protocol) 服务器,提供 **42 个实用工具**,覆盖代码质量、开发效率、项目管理、UI/UX 设计、产品设计全流程,所有工具都支持**结构化输出**。
10
+ 一个强大的 MCP (Model Context Protocol) 服务器,提供 **39 个实用工具**,覆盖从产品分析到最终发布的全流程(需求 → 设计 → 开发 → 质量 → 发布),核心与编排工具支持**结构化输出**。
11
11
 
12
- **🎉 v2.3 特性**:产品设计工作流(PRD → 原型 → HTML)、结构化输出、工作流编排、UI/UX Pro Max、需求访谈
13
-
14
- **支持所有 MCP 客户端**:Cursor、Claude Desktop、Cline、Continue 等
15
-
16
- ---
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
+ ---
17
19
 
18
20
  ## 📚 完整文档
19
21
 
20
22
  **👉 [https://mcp-probe-kit.bytezonex.com](https://mcp-probe-kit.bytezonex.com/)**
21
23
 
22
24
  - [快速开始](https://mcp-probe-kit.bytezonex.com/pages/getting-started.html) - 5分钟完成安装配置
23
- - [所有工具](https://mcp-probe-kit.bytezonex.com/pages/all-tools.html) - 42个工具完整列表
25
+ - [所有工具](https://mcp-probe-kit.bytezonex.com/pages/all-tools.html) - 39个工具完整列表
24
26
  - [最佳实践](https://mcp-probe-kit.bytezonex.com/pages/examples.html) - 完整研发流程实战指南
25
27
  - [迁移指南](https://mcp-probe-kit.bytezonex.com/pages/migration.html) - 版本升级指南
26
28
 
@@ -28,53 +30,134 @@
28
30
 
29
31
  ## ✨ 核心特性
30
32
 
31
- ### 📦 42 个实用工具
32
-
33
- - **🔄 工作流编排** (10个) - 一键完成复杂开发流程
34
- - **🔍 代码分析** (7个) - 代码审查、调试、性能优化
35
- - **🌿 Git 工具** (4个) - 自动生成 commit、PR、changelog
36
- - **✨ 生成工具** (7个) - 文档、测试、Mock 数据生成
37
- - **📋 项目管理** (7个) - 需求分析、工作量估算、项目分析
38
- - **🎨 UI/UX 工具** (6个) - 设计系统、组件生成、设计稿转代码
39
- - **🚀 产品设计** (3个) - PRD、原型设计、完整产品工作流
40
- - **🔧 其他工具** (7个) - 代码修复、格式转换、依赖检查
41
-
42
- ### 🎯 结构化输出
43
-
44
- 所有工具都支持**结构化输出**,返回机器可读的 JSON 数据,提高 AI 解析准确性,支持工具串联和状态追踪。
45
-
46
- ### 🔄 工作流编排
47
-
48
- 10 个智能编排工具,自动组合多个基础工具,一键完成复杂开发流程:
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 个智能编排工具,自动组合多个基础工具,一键完成复杂开发流程:
49
127
  - `start_feature` - 新功能开发(需求 → 设计 → 估算)
50
- - `start_bugfix` - Bug 修复(分析 → 修复 → 测试)
51
- - `start_review` - 代码体检(质量 → 安全 → 性能)
52
- - `start_ui` - UI 开发(设计系统 → 组件 → 代码)
53
- - 更多...
54
-
55
- ### 🚀 产品设计工作流
56
-
57
- 3 个产品设计工具,从需求到可交互原型:
58
- - `gen_prd` - 生成产品需求文档(PRD)
59
- - `gen_prototype` - 生成原型设计文档
60
- - `start_product` - 完整产品设计流程(PRD → 原型 → 设计系统 → HTML 原型)
61
-
62
- **工作流程:**
63
- 1. **需求分析** - 生成标准 PRD 文档(产品概述、功能需求、页面清单)
64
- 2. **原型设计** - 为每个页面生成详细的原型文档
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. **原型设计** - 为每个页面生成详细的原型文档
65
149
  3. **设计系统** - 基于产品类型生成设计规范
66
150
  4. **HTML 原型** - 生成可直接在浏览器中查看的交互原型
67
151
  5. **项目上下文** - 自动更新项目文档
68
152
 
69
153
  ### 🎨 UI/UX Pro Max
70
154
 
71
- 6 个 UI/UX 工具,从设计系统到代码生成:
72
- - `ui_design_system` - 智能设计系统生成
73
- - `start_ui` - 一键 UI 开发(支持智能模式)
74
- - `design2code` - 设计稿转代码
75
- - `ui_search` - UI/UX 数据搜索(BM25 算法)
76
- - `sync_ui_data` - 同步最新 UI/UX 数据到本地
77
- - 更多...
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 模式可用)
78
161
 
79
162
  **灵感来源:**
80
163
  - [ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) - UI/UX 设计系统理念
@@ -173,7 +256,7 @@ npm install -g mcp-probe-kit
173
256
 
174
257
  ---
175
258
 
176
- ## 使用示例
259
+ ## 💡 使用示例
177
260
 
178
261
  ### 日常开发
179
262
  ```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, debug, genapi, codeReview, gentest, genpr, checkDeps, gendoc, genchangelog, refactor, perf, gensql, resolveConflict, genreadme, analyzeProject, 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, 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";
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,8 +34,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
34
34
  return await initProject(args);
35
35
  case "gencommit":
36
36
  return await gencommit(args);
37
- case "debug":
38
- return await debug(args);
39
37
  case "genapi":
40
38
  return await genapi(args);
41
39
  case "code_review":
@@ -44,8 +42,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
44
42
  return await gentest(args);
45
43
  case "genpr":
46
44
  return await genpr(args);
47
- case "check_deps":
48
- return await checkDeps(args);
49
45
  case "gendoc":
50
46
  return await gendoc(args);
51
47
  case "genchangelog":
@@ -60,8 +56,6 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
60
56
  return await resolveConflict(args);
61
57
  case "genreadme":
62
58
  return await genreadme(args);
63
- case "analyze_project":
64
- return await analyzeProject(args);
65
59
  case "init_project_context":
66
60
  return await initProjectContext(args);
67
61
  case "add_feature":
@@ -0,0 +1,8 @@
1
+ export interface GuidanceHeaderOptions {
2
+ tool: string;
3
+ goal: string;
4
+ tasks: string[];
5
+ outputs?: string[];
6
+ notes?: string[];
7
+ }
8
+ export declare function renderGuidanceHeader(options: GuidanceHeaderOptions): string;
@@ -0,0 +1,30 @@
1
+ export function renderGuidanceHeader(options) {
2
+ const lines = [];
3
+ lines.push(`# 工具: ${options.tool}`);
4
+ lines.push("");
5
+ lines.push("## 🎯 目标");
6
+ lines.push(options.goal);
7
+ lines.push("");
8
+ lines.push("## ✅ 你需要做的事");
9
+ for (const task of options.tasks) {
10
+ lines.push(`- ${task}`);
11
+ }
12
+ if (options.outputs && options.outputs.length > 0) {
13
+ lines.push("");
14
+ lines.push("## 📦 输出要求");
15
+ for (const output of options.outputs) {
16
+ lines.push(`- ${output}`);
17
+ }
18
+ }
19
+ if (options.notes && options.notes.length > 0) {
20
+ lines.push("");
21
+ lines.push("## 🧭 注意事项");
22
+ for (const note of options.notes) {
23
+ lines.push(`- ${note}`);
24
+ }
25
+ }
26
+ lines.push("");
27
+ lines.push("---");
28
+ lines.push("");
29
+ return lines.join("\n");
30
+ }
@@ -0,0 +1,8 @@
1
+ export interface OrchestrationHeaderOptions {
2
+ tool: string;
3
+ goal: string;
4
+ tasks: string[];
5
+ outputs?: string[];
6
+ notes?: string[];
7
+ }
8
+ export declare function renderOrchestrationHeader(options: OrchestrationHeaderOptions): string;
@@ -0,0 +1,16 @@
1
+ import { renderGuidanceHeader } from "./guidance.js";
2
+ const DEFAULT_OUTPUTS = [
3
+ "严格按 delegated plan 顺序调用工具或执行手动步骤",
4
+ "产出内容需落盘到计划路径,或在汇总中明确说明",
5
+ "完成后输出总结:产物路径、关键结果、风险/待确认项、下一步",
6
+ ];
7
+ const DEFAULT_NOTES = ["仅生成执行计划,不直接执行工具调用"];
8
+ export function renderOrchestrationHeader(options) {
9
+ return renderGuidanceHeader({
10
+ tool: options.tool,
11
+ goal: options.goal,
12
+ tasks: options.tasks,
13
+ outputs: options.outputs ?? DEFAULT_OUTPUTS,
14
+ notes: options.notes ?? DEFAULT_NOTES,
15
+ });
16
+ }
@@ -0,0 +1,25 @@
1
+ export type TemplateProfile = 'guided' | 'strict';
2
+ export type TemplateSource = 'project' | 'repo' | 'embedded';
3
+ export interface TemplateValidationResult {
4
+ passed: boolean;
5
+ missingSections: string[];
6
+ missingFields: string[];
7
+ warnings: string[];
8
+ }
9
+ export interface TemplateLoadResult {
10
+ content: string;
11
+ source: TemplateSource;
12
+ validation: TemplateValidationResult;
13
+ }
14
+ interface TemplateRequest {
15
+ category: string;
16
+ name: string;
17
+ profile: TemplateProfile;
18
+ file: string;
19
+ variables?: Record<string, string>;
20
+ projectRoot?: string;
21
+ packageRoot?: string;
22
+ }
23
+ export declare function normalizeTemplateProfile(input?: string): TemplateProfile;
24
+ export declare function loadTemplate(request: TemplateRequest): Promise<TemplateLoadResult>;
25
+ export {};