mcp-probe-kit 1.11.0 → 1.15.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 (58) hide show
  1. package/README.md +215 -21
  2. package/build/index.js +21 -1
  3. package/build/schemas/index.d.ts +234 -0
  4. package/build/schemas/index.js +4 -0
  5. package/build/schemas/interview-tools.d.ts +72 -0
  6. package/build/schemas/interview-tools.js +64 -0
  7. package/build/schemas/orchestration-tools.d.ts +58 -0
  8. package/build/schemas/orchestration-tools.js +59 -0
  9. package/build/schemas/ui-ux-schemas.d.ts +248 -0
  10. package/build/schemas/ui-ux-schemas.js +147 -0
  11. package/build/tools/__tests__/start_ui.integration.test.d.ts +6 -0
  12. package/build/tools/__tests__/start_ui.integration.test.js +179 -0
  13. package/build/tools/__tests__/start_ui.property.test.d.ts +6 -0
  14. package/build/tools/__tests__/start_ui.property.test.js +263 -0
  15. package/build/tools/__tests__/start_ui.unit.test.d.ts +6 -0
  16. package/build/tools/__tests__/start_ui.unit.test.js +109 -0
  17. package/build/tools/ask_user.d.ts +17 -0
  18. package/build/tools/ask_user.js +124 -0
  19. package/build/tools/index.d.ts +7 -0
  20. package/build/tools/index.js +9 -0
  21. package/build/tools/init_component_catalog.d.ts +22 -0
  22. package/build/tools/init_component_catalog.js +809 -0
  23. package/build/tools/interview.d.ts +18 -0
  24. package/build/tools/interview.js +418 -0
  25. package/build/tools/render_ui.d.ts +22 -0
  26. package/build/tools/render_ui.js +384 -0
  27. package/build/tools/start_ralph.d.ts +16 -0
  28. package/build/tools/start_ralph.js +779 -0
  29. package/build/tools/start_ui.d.ts +25 -0
  30. package/build/tools/start_ui.js +299 -0
  31. package/build/tools/ui-ux-tools.d.ts +116 -0
  32. package/build/tools/ui-ux-tools.js +756 -0
  33. package/build/tools/ui-ux-tools.test.d.ts +6 -0
  34. package/build/tools/ui-ux-tools.test.js +132 -0
  35. package/build/utils/ascii-box-formatter.d.ts +29 -0
  36. package/build/utils/ascii-box-formatter.js +195 -0
  37. package/build/utils/bm25.d.ts +60 -0
  38. package/build/utils/bm25.js +139 -0
  39. package/build/utils/cache-manager.d.ts +65 -0
  40. package/build/utils/cache-manager.js +156 -0
  41. package/build/utils/design-docs-generator.d.ts +1 -0
  42. package/build/utils/design-docs-generator.js +1 -0
  43. package/build/utils/design-reasoning-engine.d.ts +158 -0
  44. package/build/utils/design-reasoning-engine.js +363 -0
  45. package/build/utils/design-system-json-formatter.d.ts +41 -0
  46. package/build/utils/design-system-json-formatter.js +165 -0
  47. package/build/utils/ui-data-loader.d.ts +56 -0
  48. package/build/utils/ui-data-loader.js +164 -0
  49. package/build/utils/ui-search-engine.d.ts +57 -0
  50. package/build/utils/ui-search-engine.js +123 -0
  51. package/build/utils/ui-sync.d.ts +13 -0
  52. package/build/utils/ui-sync.js +241 -0
  53. package/docs/BEST_PRACTICES.md +456 -6
  54. package/docs/HOW_TO_TRIGGER.md +195 -64
  55. package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.html +158 -63
  56. package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.md +872 -34
  57. package/package.json +18 -5
  58. package/docs/HOW_TO_TRIGGER.html +0 -243
package/README.md CHANGED
@@ -7,7 +7,9 @@
7
7
 
8
8
  > 🚀 AI 开发增强工具集 - 让 AI 更懂你的开发流程
9
9
 
10
- 一个强大的 MCP (Model Context Protocol) 服务器,提供 **40 个实用工具**(32 个基础工具 + 8 个智能编排),覆盖代码质量、开发效率、项目管理全流程。
10
+ 一个强大的 MCP (Model Context Protocol) 服务器,提供 **49 个实用工具**(37 个基础工具 + 9 个智能编排 + 3 个 UI/UX 新增),覆盖代码质量、开发效率、项目管理、UI/UX 设计全流程。
11
+
12
+ **✨ v1.14.0 新增**: UI/UX Pro Max - 完整 UI 开发工作流,从设计系统到最终代码,支持 React、Vue、Tailwind 等多种技术栈!
11
13
 
12
14
  **支持所有 MCP 客户端**:Cursor、Claude Desktop、Cline、Continue 等
13
15
 
@@ -17,10 +19,65 @@
17
19
 
18
20
  ## ✨ 功能特性
19
21
 
22
+ ### 🎨 UI/UX Pro Max(6 个工具)🆕
23
+ - **`ui_design_system`** - 设计系统生成器:基于 100 条行业规则的智能推荐,生成设计推荐和创作指导,AI 根据指导自由创作文档(输出 ASCII Box + JSON + 创作指导)
24
+ - **`init_component_catalog`** - 组件目录生成器:基于设计系统生成组件目录,定义可用的 UI 组件及其属性(占位符语法)
25
+ - **`render_ui`** - UI 渲染引擎:将 JSON 模板渲染为最终代码,自动应用设计规范(占位符替换)
26
+ - **`start_ui`** - 统一 UI 开发编排:一键完成整个 UI 开发流程(支持 `auto` 智能模式,自动推导设计参数)
27
+ - **`ui_search`** - UI/UX 智能搜索:BM25 算法搜索颜色、图标、图表、组件、设计模式等 24 类数据(支持 catalog/template 模式)
28
+ - **`sync_ui_data`** - 数据同步工具:从 npm 包 `uipro-cli` 自动同步最新 UI/UX 数据(来源:[ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill))
29
+
30
+ **完整工作流**:
31
+ ```bash
32
+ # 🚀 方式一:智能模式(推荐)
33
+ # 一句话描述需求,AI 自动推导设计风格、配色和技术栈
34
+ start_ui "SaaS 后台管理系统" --mode=auto
35
+
36
+ # 📦 方式二:手动模式
37
+ # 1. 生成设计系统 (可省略 product_type,AI 会自动从描述推导)
38
+ ui_design_system --stack="react" --description="企业级 CRM 客户管理系统"
39
+
40
+ # 2. 生成页面(自动应用设计规范)
41
+ start_ui "登录页面"
42
+ start_ui "用户列表"
43
+
44
+ # 结果:所有页面样式完全统一 ✨
45
+ ```
46
+
47
+ ### 🤖 智能模式 vs 手动模式
48
+
49
+ `start_ui` 支持两种模式,满足不同场景需求:
50
+
51
+ #### 1. 自动模式 (`--mode=auto`) - **推荐**
52
+ AI 自动分析你的自然语言描述,推导最佳参数并生成执行计划。
53
+ ```bash
54
+ start_ui "加密货币交易看板" --mode=auto
55
+ ```
56
+ **特点**:
57
+ - ✅ 自动推导产品类型 (Fintech)
58
+ - ✅ 自动推导设计风格 (Dark Mode, High Contrast)
59
+ - ✅ 自动推导技术栈
60
+ - ✅ 直接生成可执行命令
61
+
62
+ #### 2. 手动模式 (`--mode=manual`)
63
+ 生成详细的分步指南,由你手动控制每一步的执行。
64
+ ```bash
65
+ start_ui "登录页面" --mode=manual
66
+ ```
67
+ **特点**:
68
+ - ✅ 返回 4 个标准步骤的执行指南
69
+ - ✅ 适合需要精细控制参数的场景
70
+ - ✅ 适合学习和理解工作流
71
+ - ✅ 默认模式(如果不指定 --mode)
72
+
73
+ ### �🎯 访谈工具(2 个工具)
74
+ - **`interview`** - 需求访谈模式:在开发前通过结构化提问澄清需求,避免理解偏差和返工
75
+ - **`ask_user`** - 通用提问工具:AI 可随时向用户提问,澄清不确定的信息
76
+
20
77
  ### 🔍 代码质量(8 个工具)
21
78
  - **`detect_shell`** - AI 模型套壳检测
22
79
  - **`code_review`** - 代码审查助手
23
- - **`security_scan`** - 安全漏洞扫描 🆕
80
+ - **`security_scan`** - 安全漏洞扫描
24
81
  - **`debug`** - 智能调试助手
25
82
  - **`gentest`** - 测试用例生成器
26
83
  - **`refactor`** - 重构建议
@@ -35,17 +92,16 @@
35
92
  - **`genchangelog`** - Changelog 生成
36
93
  - **`gensql`** - SQL 查询生成器
37
94
  - **`genui`** - UI 组件生成器(React + Vue)
38
- - **`gen_mock`** - Mock 数据生成器 🆕
39
- - **`gen_skill`** - Agent Skills 文档生成器 🆕
40
- - **`design2code`** - 设计稿转代码(图片/描述/HTML → Vue/React)🆕
95
+ - **`gen_mock`** - Mock 数据生成器
96
+ - **`gen_skill`** - Agent Skills 文档生成器
97
+ - **`design2code`** - 设计稿转代码(图片/描述/HTML → Vue/React
41
98
  - **`explain`** - 代码解释器
42
99
  - **`convert`** - 代码转换器
43
100
  - **`css_order`** - CSS 属性顺序规范
44
101
  - **`genreadme`** - README 生成器
45
102
  - **`split`** - 文件拆分工具
46
- - **`fix_bug`** - Bug 修复流程指南 🆕
47
- - **`estimate`** - 工作量估算 🆕
48
- - **`gen_skill`** - Agent Skills 文档生成器 🆕
103
+ - **`fix_bug`** - Bug 修复流程指南
104
+ - **`estimate`** - 工作量估算
49
105
 
50
106
  ### 📦 项目管理(8 个工具)
51
107
  - **`init_setting`** - Cursor AI 配置初始化
@@ -53,22 +109,23 @@
53
109
  - **`check_deps`** - 依赖健康度检查
54
110
  - **`resolve_conflict`** - Git 冲突解决助手
55
111
  - **`analyze_project`** - 项目分析工具,帮助AI快速理解老项目
56
- - **`init_project_context`** - 初始化项目上下文,生成技术栈和架构文档 🆕
57
- - **`add_feature`** - 添加新功能,生成需求/设计/任务文档 🆕
58
- - **`start_onboard`** - 快速上手项目(智能编排)🆕
112
+ - **`init_project_context`** - 初始化项目上下文,生成技术栈和架构文档
113
+ - **`add_feature`** - 添加新功能,生成需求/设计/任务文档
114
+ - **`start_onboard`** - 快速上手项目(智能编排)
59
115
 
60
- ### 🚀 智能编排(8 个工具)
116
+ ### 🚀 智能编排(9 个工具)
61
117
 
62
118
  智能编排工具自动组合多个基础工具,一键完成复杂工作流:
63
119
 
64
- - **`start_feature`** - 新功能开发:上下文 → 功能规格 → 工作量估算 🆕
65
- - **`start_bugfix`** - Bug 修复:上下文 → 分析修复 → 测试 → 提交 🆕
66
- - **`start_review`** - 代码体检:上下文 → 质量审查 → 安全扫描 → 性能分析 🆕
67
- - **`start_release`** - 发布准备:上下文 → Changelog → PR 描述 🆕
68
- - **`start_refactor`** - 代码重构:上下文 → 审查 → 重构 → 测试 🆕
69
- - **`start_onboard`** - 快速上手:项目分析 → 生成上下文文档 🆕
70
- - **`start_api`** - API 开发:上下文 → API 文档 → Mock 数据 → 测试 🆕
71
- - **`start_doc`** - 文档生成:上下文 → 代码注释 → README → API 文档 🆕
120
+ - **`start_feature`** - 新功能开发:上下文 → 功能规格 → 工作量估算
121
+ - **`start_bugfix`** - Bug 修复:上下文 → 分析修复 → 测试 → 提交
122
+ - **`start_review`** - 代码体检:上下文 → 质量审查 → 安全扫描 → 性能分析
123
+ - **`start_release`** - 发布准备:上下文 → Changelog → PR 描述
124
+ - **`start_refactor`** - 代码重构:上下文 → 审查 → 重构 → 测试
125
+ - **`start_onboard`** - 快速上手:项目分析 → 生成上下文文档
126
+ - **`start_api`** - API 开发:上下文 → API 文档 → Mock 数据 → 测试
127
+ - **`start_doc`** - 文档生成:上下文 → 代码注释 → README → API 文档
128
+ - **`start_ralph`** - Ralph Loop 循环开发:生成安全模式脚本 → 多轮迭代 → 自动保护 🆕
72
129
 
73
130
  ---
74
131
 
@@ -307,6 +364,85 @@ npm install mcp-probe-kit
307
364
 
308
365
  ## 📖 工具使用指南
309
366
 
367
+ ### 🎯 访谈工具 🆕
368
+
369
+ #### `interview` - 需求访谈模式
370
+
371
+ 在开发前通过结构化访谈澄清需求,避免理解偏差和返工。
372
+
373
+ **核心理念**: 先慢下来,把问题想清楚,反而能更快地交付正确的解决方案。
374
+
375
+ **用法**:
376
+ ```
377
+ interview "实现用户登录功能"
378
+ ```
379
+
380
+ **访谈内容**:
381
+ - **阶段 1**: 背景理解(3个问题)- 痛点、用户、业务驱动
382
+ - **阶段 2**: 功能边界(4个问题)- 核心价值、范围、输入输出
383
+ - **阶段 3**: 技术约束(4个问题)- 技术栈、性能、兼容性、安全
384
+ - **阶段 4**: 验收标准(3个问题)- 成功标准、测试场景、效果衡量
385
+
386
+ **工作流程**:
387
+ ```
388
+ 1. AI: interview "登录功能"
389
+
390
+ 2. 生成 12-15 个结构化问题
391
+
392
+ 3. 用户回答所有问题
393
+
394
+ 4. AI 生成 docs/interviews/user-login-interview.md
395
+
396
+ 5. 用户选择:
397
+ - 立即开发: start_feature --from-interview user-login
398
+ - 生成规格: add_feature --from-interview user-login
399
+ - 稍后开发: 访谈记录已保存,随时可用
400
+ ```
401
+
402
+ **适用场景**:
403
+ - ✅ 需求不明确的新功能
404
+ - ✅ 复杂的业务功能
405
+ - ✅ 涉及多方协作的功能
406
+ - ❌ 简单的 Bug 修复
407
+ - ❌ 需求非常明确的功能
408
+
409
+ **详细文档**: 查看 [Interview 使用指南](docs/INTERVIEW_GUIDE.md)
410
+
411
+ ---
412
+
413
+ #### `ask_user` - 通用提问工具
414
+
415
+ AI 可在任何时候主动向用户提问,澄清不确定的信息。
416
+
417
+ **用法**:
418
+ ```
419
+ ask_user "你希望支持哪些支付方式?"
420
+ ask_user --questions ["问题1", "问题2"] --context "背景信息"
421
+ ```
422
+
423
+ **功能特点**:
424
+ - 支持单个或多个问题
425
+ - 可提供选项供用户选择
426
+ - 可标注必答/可选
427
+ - 可在任何工具中使用
428
+
429
+ **使用场景**:
430
+ ```
431
+ 场景1: 代码审查时
432
+ AI: "发现了性能问题,但不确定优先级"
433
+ 调用: ask_user "这个性能问题的优先级如何?是否需要立即优化?"
434
+
435
+ 场景2: 技术方案选择
436
+ AI: "可以用两种方案,不确定你的偏好"
437
+ 调用: ask_user --options ["方案A: 性能优先", "方案B: 可读性优先"]
438
+
439
+ 场景3: Bug 修复时
440
+ AI: "需要确认是否向后兼容"
441
+ 调用: ask_user "修复这个 Bug 是否需要保持向后兼容?"
442
+ ```
443
+
444
+ ---
445
+
310
446
  ### 🔍 代码质量工具
311
447
 
312
448
  #### `detect_shell` - 套壳检测
@@ -1154,6 +1290,52 @@ design2code <div class="container">...</div>
1154
1290
 
1155
1291
  ## 🎯 使用场景示例
1156
1292
 
1293
+ ### 🎤 Interview 模式(推荐)🆕
1294
+
1295
+ #### 场景 1: 需求不明确时
1296
+ ```
1297
+ 用户: "我想做登录功能"
1298
+
1299
+ AI: interview "登录功能"
1300
+
1301
+ 生成 12-15 个结构化问题
1302
+
1303
+ 用户: 回答所有问题
1304
+
1305
+ AI: 生成 docs/interviews/user-login-interview.md
1306
+
1307
+ 用户: "开始开发"
1308
+
1309
+ AI: start_feature --from-interview user-login
1310
+
1311
+ 生成完整的功能规格文档 + 工作量估算
1312
+ ```
1313
+
1314
+ #### 场景 2: 分步进行
1315
+ ```
1316
+ 第1天:
1317
+ 用户: "我想做登录功能"
1318
+ AI: interview "登录功能"
1319
+ 用户: [回答问题]
1320
+ AI: 生成访谈记录
1321
+
1322
+ 第3天:
1323
+ 用户: "开始做登录功能"
1324
+ AI: start_feature --from-interview user-login
1325
+ AI: 读取之前的访谈,生成规格文档
1326
+ ```
1327
+
1328
+ #### 场景 3: AI 主动提问
1329
+ ```
1330
+ 用户: "优化这段代码"
1331
+ AI: 发现不确定因素
1332
+ AI: ask_user "优化目标是性能还是可读性?"
1333
+ 用户: "性能"
1334
+ AI: 继续优化
1335
+ ```
1336
+
1337
+ ---
1338
+
1157
1339
  ### 📝 日常开发流程
1158
1340
  ```
1159
1341
  1. code_review @feature.ts # 代码提交前审查
@@ -1187,7 +1369,19 @@ design2code <div class="container">...</div>
1187
1369
  5. 开始维护和开发...
1188
1370
  ```
1189
1371
 
1190
- ### 🎯 添加新功能(Spec-Driven)
1372
+ ### 🎯 添加新功能(两种方式)
1373
+
1374
+ #### 方式 1: Interview 模式(需求不明确时)🆕
1375
+ ```
1376
+ 1. interview "用户登录认证功能" # 访谈澄清需求
1377
+ 2. 回答 12-15 个问题
1378
+ 3. start_feature --from-interview user-auth # 基于访谈生成规格
1379
+ 4. 根据 tasks.md 逐步实现
1380
+ 5. gentest @feature.ts # 生成测试
1381
+ 6. gencommit # 提交代码
1382
+ ```
1383
+
1384
+ #### 方式 2: 直接开发(需求明确时)
1191
1385
  ```
1192
1386
  1. init_project_context # 确保项目上下文存在
1193
1387
  2. add_feature user-auth "用户登录认证功能" # 生成功能规格
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 { detectShell, initSetting, initProject, gencommit, debug, genapi, codeReview, gentest, genpr, checkDeps, gendoc, genchangelog, refactor, perf, fix, gensql, resolveConflict, genui, explain, convert, cssOrder, genreadme, split, analyzeProject, initProjectContext, addFeature, securityScan, fixBug, estimate, genMock, design2code, startFeature, startBugfix, startReview, startRelease, startRefactor, startOnboard, startApi, startDoc, genSkill } from "./tools/index.js";
5
+ import { detectShell, initSetting, initProject, gencommit, debug, genapi, codeReview, gentest, genpr, checkDeps, gendoc, genchangelog, refactor, perf, fix, gensql, resolveConflict, genui, explain, convert, cssOrder, genreadme, split, analyzeProject, initProjectContext, addFeature, securityScan, fixBug, estimate, genMock, design2code, startFeature, startBugfix, startReview, startRelease, startRefactor, startOnboard, startApi, startDoc, genSkill, startRalph, interview, askUser, uiDesignSystem, initComponentCatalog, uiSearch, syncUiData, renderUi, startUi } from "./tools/index.js";
6
6
  import { VERSION, NAME } from "./version.js";
7
7
  import { allToolSchemas } from "./schemas/index.js";
8
8
  import { getToolParamsGuide } from "./resources/index.js";
@@ -108,6 +108,26 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
108
108
  return await startDoc(args);
109
109
  case "gen_skill":
110
110
  return await genSkill(args);
111
+ case "start_ralph":
112
+ return await startRalph(args);
113
+ // 访谈工具
114
+ case "interview":
115
+ return await interview(args);
116
+ case "ask_user":
117
+ return await askUser(args);
118
+ // UI/UX Pro Max 工具
119
+ case "ui_design_system":
120
+ return await uiDesignSystem(args);
121
+ case "init_component_catalog":
122
+ return await initComponentCatalog(args);
123
+ case "ui_search":
124
+ return await uiSearch(args);
125
+ case "sync_ui_data":
126
+ return await syncUiData(args);
127
+ case "render_ui":
128
+ return await renderUi(args);
129
+ case "start_ui":
130
+ return await startUi(args);
111
131
  default:
112
132
  throw new Error(`未知工具: ${name}`);
113
133
  }
@@ -764,4 +764,238 @@ export declare const allToolSchemas: ({
764
764
  readonly required: readonly [];
765
765
  readonly additionalProperties: true;
766
766
  };
767
+ } | {
768
+ readonly name: "start_ralph";
769
+ readonly description: "当用户需要启动 Ralph Wiggum Loop 循环开发时使用。生成 .ralph/ 目录结构、安全模式脚本和执行指南。默认启用多重安全保护,防止无人值守时费用失控";
770
+ readonly inputSchema: {
771
+ readonly type: "object";
772
+ readonly properties: {
773
+ readonly goal: {
774
+ readonly type: "string";
775
+ readonly description: "本次要完成的目标/需求描述。例如:'实现用户认证功能'、'修复登录 bug'";
776
+ };
777
+ readonly mode: {
778
+ readonly type: "string";
779
+ readonly description: "运行模式:safe(安全模式,默认)、normal(普通模式)。安全模式包含多重保护机制";
780
+ };
781
+ readonly completion_promise: {
782
+ readonly type: "string";
783
+ readonly description: "完成条件描述。默认:'tests passing + requirements met'";
784
+ };
785
+ readonly test_command: {
786
+ readonly type: "string";
787
+ readonly description: "每轮执行的测试命令。默认:'npm test'(会在首轮由 agent 识别正确命令)";
788
+ };
789
+ readonly cli_command: {
790
+ readonly type: "string";
791
+ readonly description: "Claude Code CLI 命令名。默认:'claude-code'(可能需要改为 'claude')";
792
+ };
793
+ readonly max_iterations: {
794
+ readonly type: "number";
795
+ readonly description: "最大迭代轮数。safe 模式默认:8";
796
+ };
797
+ readonly max_minutes: {
798
+ readonly type: "number";
799
+ readonly description: "最大运行分钟数。safe 模式默认:25";
800
+ };
801
+ readonly confirm_every: {
802
+ readonly type: "number";
803
+ readonly description: "每几轮要求人工确认。safe 模式默认:1(每轮都确认)";
804
+ };
805
+ readonly confirm_timeout: {
806
+ readonly type: "number";
807
+ readonly description: "确认等待秒数,超时自动停止。safe 模式默认:20";
808
+ };
809
+ readonly max_same_output: {
810
+ readonly type: "number";
811
+ readonly description: "输出重复多少次停止(防卡死)。safe 模式默认:2";
812
+ };
813
+ readonly max_diff_lines: {
814
+ readonly type: "number";
815
+ readonly description: "git diff 变更行数超过此值停止(防失控)。safe 模式默认:300";
816
+ };
817
+ readonly cooldown_seconds: {
818
+ readonly type: "number";
819
+ readonly description: "每轮后冷却秒数。safe 模式默认:8";
820
+ };
821
+ };
822
+ readonly required: readonly [];
823
+ readonly additionalProperties: true;
824
+ };
825
+ } | {
826
+ readonly name: "interview";
827
+ readonly description: "当用户需求不明确、需要澄清需求时使用。需求访谈工具,在开发前通过结构化提问澄清需求,避免理解偏差和返工;生成访谈记录文件供后续 start_feature/add_feature 使用;仅支持 feature 类型";
828
+ readonly inputSchema: {
829
+ readonly type: "object";
830
+ readonly properties: {
831
+ readonly description: {
832
+ readonly type: "string";
833
+ readonly description: "功能描述(如'实现用户登录功能'),用于开始访谈。可以是简短的自然语言描述";
834
+ };
835
+ readonly feature_name: {
836
+ readonly type: "string";
837
+ readonly description: "功能名称(kebab-case 格式,如 user-login)。可选,会自动从描述中提取";
838
+ };
839
+ readonly answers: {
840
+ readonly type: "object";
841
+ readonly description: "访谈问题的回答(JSON 对象,key 为问题 ID,value 为回答内容)。用于提交访谈结果";
842
+ };
843
+ };
844
+ readonly required: readonly [];
845
+ readonly additionalProperties: true;
846
+ };
847
+ } | {
848
+ readonly name: "ask_user";
849
+ readonly description: "当 AI 需要更多信息、遇到不确定因素时使用。向用户提问工具,AI 可主动向用户提问;支持单个或多个问题、提供选项、标注重要性;可在任何时候使用";
850
+ readonly inputSchema: {
851
+ readonly type: "object";
852
+ readonly properties: {
853
+ readonly question: {
854
+ readonly type: "string";
855
+ readonly description: "单个问题(如'你希望支持哪些支付方式?')";
856
+ };
857
+ readonly questions: {
858
+ readonly type: "array";
859
+ readonly description: "多个问题列表,每个问题可包含 question、context、options、required 字段";
860
+ readonly items: {
861
+ readonly type: "object";
862
+ readonly properties: {
863
+ readonly question: {
864
+ readonly type: "string";
865
+ };
866
+ readonly context: {
867
+ readonly type: "string";
868
+ };
869
+ readonly options: {
870
+ readonly type: "array";
871
+ readonly items: {
872
+ readonly type: "string";
873
+ };
874
+ };
875
+ readonly required: {
876
+ readonly type: "boolean";
877
+ };
878
+ };
879
+ };
880
+ };
881
+ readonly context: {
882
+ readonly type: "string";
883
+ readonly description: "问题的背景信息或上下文";
884
+ };
885
+ readonly reason: {
886
+ readonly type: "string";
887
+ readonly description: "为什么要问这个问题(提问原因)";
888
+ };
889
+ };
890
+ readonly required: readonly [];
891
+ readonly additionalProperties: true;
892
+ };
893
+ } | {
894
+ name: string;
895
+ description: string;
896
+ inputSchema: {
897
+ type: string;
898
+ properties: {
899
+ product_type: {
900
+ type: string;
901
+ description: string;
902
+ };
903
+ description: {
904
+ type: string;
905
+ description: string;
906
+ };
907
+ stack: {
908
+ type: string;
909
+ description: string;
910
+ };
911
+ target_audience: {
912
+ type: string;
913
+ description: string;
914
+ };
915
+ keywords: {
916
+ type: string;
917
+ description: string;
918
+ };
919
+ };
920
+ required: string[];
921
+ };
922
+ } | {
923
+ name: string;
924
+ description: string;
925
+ inputSchema: {
926
+ type: string;
927
+ properties: {};
928
+ required: never[];
929
+ };
930
+ } | {
931
+ name: string;
932
+ description: string;
933
+ inputSchema: {
934
+ type: string;
935
+ properties: {
936
+ mode: {
937
+ type: string;
938
+ description: string;
939
+ default: string;
940
+ };
941
+ query: {
942
+ type: string;
943
+ description: string;
944
+ };
945
+ category: {
946
+ type: string;
947
+ description: string;
948
+ };
949
+ stack: {
950
+ type: string;
951
+ description: string;
952
+ };
953
+ limit: {
954
+ type: string;
955
+ description: string;
956
+ default: number;
957
+ };
958
+ min_score: {
959
+ type: string;
960
+ description: string;
961
+ default: number;
962
+ };
963
+ };
964
+ };
965
+ } | {
966
+ name: string;
967
+ description: string;
968
+ inputSchema: {
969
+ type: string;
970
+ properties: {
971
+ force: {
972
+ type: string;
973
+ description: string;
974
+ default: boolean;
975
+ };
976
+ verbose: {
977
+ type: string;
978
+ description: string;
979
+ default: boolean;
980
+ };
981
+ };
982
+ };
983
+ } | {
984
+ name: string;
985
+ description: string;
986
+ inputSchema: {
987
+ type: string;
988
+ properties: {
989
+ template: {
990
+ type: string;
991
+ description: string;
992
+ };
993
+ framework: {
994
+ type: string;
995
+ description: string;
996
+ default: string;
997
+ };
998
+ };
999
+ required: string[];
1000
+ };
767
1001
  })[];
@@ -8,6 +8,8 @@ import { codeGenToolSchemas } from "./code-gen-tools.js";
8
8
  import { docUtilToolSchemas } from "./doc-util-tools.js";
9
9
  import { projectToolSchemas } from "./project-tools.js";
10
10
  import { orchestrationToolSchemas } from "./orchestration-tools.js";
11
+ import { interviewToolSchemas } from "./interview-tools.js";
12
+ import { uiUxSchemas } from "./ui-ux-schemas.js";
11
13
  // 合并所有工具 schemas
12
14
  export const allToolSchemas = [
13
15
  ...basicToolSchemas,
@@ -17,4 +19,6 @@ export const allToolSchemas = [
17
19
  ...docUtilToolSchemas,
18
20
  ...projectToolSchemas,
19
21
  ...orchestrationToolSchemas,
22
+ ...interviewToolSchemas,
23
+ ...uiUxSchemas,
20
24
  ];
@@ -0,0 +1,72 @@
1
+ /**
2
+ * 访谈工具的 Schema 定义
3
+ */
4
+ export declare const interviewToolSchemas: readonly [{
5
+ readonly name: "interview";
6
+ readonly description: "当用户需求不明确、需要澄清需求时使用。需求访谈工具,在开发前通过结构化提问澄清需求,避免理解偏差和返工;生成访谈记录文件供后续 start_feature/add_feature 使用;仅支持 feature 类型";
7
+ readonly inputSchema: {
8
+ readonly type: "object";
9
+ readonly properties: {
10
+ readonly description: {
11
+ readonly type: "string";
12
+ readonly description: "功能描述(如'实现用户登录功能'),用于开始访谈。可以是简短的自然语言描述";
13
+ };
14
+ readonly feature_name: {
15
+ readonly type: "string";
16
+ readonly description: "功能名称(kebab-case 格式,如 user-login)。可选,会自动从描述中提取";
17
+ };
18
+ readonly answers: {
19
+ readonly type: "object";
20
+ readonly description: "访谈问题的回答(JSON 对象,key 为问题 ID,value 为回答内容)。用于提交访谈结果";
21
+ };
22
+ };
23
+ readonly required: readonly [];
24
+ readonly additionalProperties: true;
25
+ };
26
+ }, {
27
+ readonly name: "ask_user";
28
+ readonly description: "当 AI 需要更多信息、遇到不确定因素时使用。向用户提问工具,AI 可主动向用户提问;支持单个或多个问题、提供选项、标注重要性;可在任何时候使用";
29
+ readonly inputSchema: {
30
+ readonly type: "object";
31
+ readonly properties: {
32
+ readonly question: {
33
+ readonly type: "string";
34
+ readonly description: "单个问题(如'你希望支持哪些支付方式?')";
35
+ };
36
+ readonly questions: {
37
+ readonly type: "array";
38
+ readonly description: "多个问题列表,每个问题可包含 question、context、options、required 字段";
39
+ readonly items: {
40
+ readonly type: "object";
41
+ readonly properties: {
42
+ readonly question: {
43
+ readonly type: "string";
44
+ };
45
+ readonly context: {
46
+ readonly type: "string";
47
+ };
48
+ readonly options: {
49
+ readonly type: "array";
50
+ readonly items: {
51
+ readonly type: "string";
52
+ };
53
+ };
54
+ readonly required: {
55
+ readonly type: "boolean";
56
+ };
57
+ };
58
+ };
59
+ };
60
+ readonly context: {
61
+ readonly type: "string";
62
+ readonly description: "问题的背景信息或上下文";
63
+ };
64
+ readonly reason: {
65
+ readonly type: "string";
66
+ readonly description: "为什么要问这个问题(提问原因)";
67
+ };
68
+ };
69
+ readonly required: readonly [];
70
+ readonly additionalProperties: true;
71
+ };
72
+ }];