mcp-probe-kit 3.0.9 → 3.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -4
- package/build/lib/__tests__/gitnexus-bridge.unit.test.d.ts +1 -0
- package/build/lib/__tests__/gitnexus-bridge.unit.test.js +96 -0
- package/build/lib/gitnexus-bridge.d.ts +23 -0
- package/build/lib/gitnexus-bridge.js +526 -21
- package/build/schemas/code-analysis-tools.d.ts +9 -1
- package/build/schemas/code-analysis-tools.js +9 -1
- package/build/schemas/git-tools.d.ts +1 -1
- package/build/schemas/git-tools.js +1 -1
- package/build/schemas/index.d.ts +23 -3
- package/build/schemas/orchestration-tools.d.ts +13 -1
- package/build/schemas/orchestration-tools.js +13 -1
- package/build/schemas/output/core-tools.d.ts +130 -1
- package/build/schemas/output/core-tools.js +71 -1
- package/build/schemas/output/index.d.ts +2 -2
- package/build/schemas/output/index.js +2 -2
- package/build/schemas/output/project-tools.d.ts +13 -0
- package/build/schemas/output/project-tools.js +9 -0
- package/build/schemas/structured-output.d.ts +358 -5
- package/build/schemas/structured-output.js +169 -5
- package/build/tools/__tests__/code_insight.unit.test.js +81 -1
- package/build/tools/__tests__/fix_bug.unit.test.d.ts +1 -0
- package/build/tools/__tests__/fix_bug.unit.test.js +31 -0
- package/build/tools/__tests__/gencommit.unit.test.d.ts +1 -0
- package/build/tools/__tests__/gencommit.unit.test.js +41 -0
- package/build/tools/__tests__/init_project_context.unit.test.d.ts +1 -0
- package/build/tools/__tests__/init_project_context.unit.test.js +63 -0
- package/build/tools/__tests__/start_bugfix.unit.test.js +10 -0
- package/build/tools/__tests__/start_feature.unit.test.js +10 -0
- package/build/tools/code_insight.d.ts +10 -0
- package/build/tools/code_insight.js +156 -3
- package/build/tools/fix_bug.d.ts +3 -3
- package/build/tools/fix_bug.js +297 -312
- package/build/tools/gencommit.js +144 -123
- package/build/tools/init_project_context.js +211 -53
- package/build/tools/start_bugfix.js +170 -70
- package/build/tools/start_feature.js +79 -25
- package/docs/data/tools.js +33 -31
- package/docs/i18n/all-tools/en.json +9 -9
- package/docs/i18n/all-tools/ja.json +9 -9
- package/docs/i18n/all-tools/ko.json +9 -9
- package/docs/i18n/all-tools/zh-CN.json +9 -9
- package/docs/i18n/en.json +480 -481
- package/docs/i18n/ja.json +478 -479
- package/docs/i18n/ko.json +480 -481
- package/docs/i18n/zh-CN.json +480 -481
- package/docs/index.html +2 -2
- package/docs/pages/all-tools.html +2 -2
- package/docs/pages/examples.html +2 -2
- package/docs/pages/getting-started.html +2 -2
- package/docs/pages/migration.html +2 -2
- package/package.json +1 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
1
3
|
import { parseArgs, getString, getNumber } from "../utils/parseArgs.js";
|
|
2
4
|
import { okStructured } from "../lib/response.js";
|
|
3
5
|
import { renderOrchestrationHeader } from "../lib/orchestration-guidance.js";
|
|
@@ -62,12 +64,15 @@ const PROMPT_TEMPLATE = `# 🚀 新功能开发编排(委托式)
|
|
|
62
64
|
|
|
63
65
|
## ✅ 执行计划(按顺序)
|
|
64
66
|
|
|
65
|
-
### 0) 项目上下文(如缺失)
|
|
66
|
-
**检查**:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
### 0) 项目上下文(如缺失)
|
|
68
|
+
**检查**:
|
|
69
|
+
- \`{docs_dir}/project-context.md\`
|
|
70
|
+
- \`{docs_dir}/graph-insights/latest.md\`
|
|
71
|
+
- \`{docs_dir}/graph-insights/latest.json\`
|
|
72
|
+
**缺失则调用**: \`init_project_context\`
|
|
73
|
+
\`\`\`json
|
|
74
|
+
{ "docs_dir": "{docs_dir}", "project_root": "{project_root}" }
|
|
75
|
+
\`\`\`
|
|
71
76
|
|
|
72
77
|
### 1) 生成功能规格
|
|
73
78
|
**调用**: \`add_feature\`
|
|
@@ -95,11 +100,12 @@ const PROMPT_TEMPLATE = `# 🚀 新功能开发编排(委托式)
|
|
|
95
100
|
|
|
96
101
|
---
|
|
97
102
|
|
|
98
|
-
## ✅ 输出汇总(执行完成后)
|
|
99
|
-
1. 规格文档位置: \`{docs_dir}/specs/{feature_name}/\`
|
|
100
|
-
2.
|
|
101
|
-
3.
|
|
102
|
-
4.
|
|
103
|
+
## ✅ 输出汇总(执行完成后)
|
|
104
|
+
1. 规格文档位置: \`{docs_dir}/specs/{feature_name}/\`
|
|
105
|
+
2. 图谱入口: \`{docs_dir}/graph-insights/latest.md\`
|
|
106
|
+
3. 估算结果: 故事点 + 时间区间
|
|
107
|
+
4. 主要风险(如有)
|
|
108
|
+
5. 下一步: 按 tasks.md 开始开发
|
|
103
109
|
|
|
104
110
|
---
|
|
105
111
|
|
|
@@ -186,6 +192,7 @@ export async function startFeature(args, context) {
|
|
|
186
192
|
feature_name: ["name", "feature", "功能名", "功能名称"],
|
|
187
193
|
description: ["desc", "requirement", "描述", "需求"],
|
|
188
194
|
docs_dir: ["dir", "output", "目录", "文档目录"],
|
|
195
|
+
project_root: ["projectRoot", "project_path", "projectPath", "root", "project_root", "项目路径", "项目根目录"],
|
|
189
196
|
template_profile: ["profile", "template_profile", "模板档位", "模板模式"],
|
|
190
197
|
requirements_mode: ["mode", "requirements_mode", "loop", "需求模式"],
|
|
191
198
|
loop_max_rounds: ["max_rounds", "rounds", "最大轮次"],
|
|
@@ -196,6 +203,7 @@ export async function startFeature(args, context) {
|
|
|
196
203
|
let featureName = getString(parsedArgs.feature_name);
|
|
197
204
|
let description = getString(parsedArgs.description);
|
|
198
205
|
const docsDir = getString(parsedArgs.docs_dir) || "docs";
|
|
206
|
+
const projectRoot = getString(parsedArgs.project_root);
|
|
199
207
|
const templateProfile = getString(parsedArgs.template_profile) || "auto";
|
|
200
208
|
const requirementsMode = getString(parsedArgs.requirements_mode) || "steady";
|
|
201
209
|
const maxRounds = getNumber(parsedArgs.loop_max_rounds, 2);
|
|
@@ -227,30 +235,47 @@ export async function startFeature(args, context) {
|
|
|
227
235
|
"- JSON格式:{\"feature_name\": \"user-auth\", \"description\": \"用户认证功能\"}");
|
|
228
236
|
}
|
|
229
237
|
throwIfAborted(context?.signal, "start_feature 已取消");
|
|
230
|
-
await reportToolProgress(context, 55, "start_feature:
|
|
238
|
+
await reportToolProgress(context, 55, "start_feature: 刷新图谱并收敛需求范围");
|
|
239
|
+
const graphDocs = {
|
|
240
|
+
latestMarkdownPath: `${docsDir}/graph-insights/latest.md`,
|
|
241
|
+
latestJsonPath: `${docsDir}/graph-insights/latest.json`,
|
|
242
|
+
};
|
|
243
|
+
const resolvedProjectRoot = path.resolve(projectRoot || process.cwd());
|
|
244
|
+
const bootstrapState = {
|
|
245
|
+
projectContextExists: fs.existsSync(path.join(resolvedProjectRoot, docsDir, "project-context.md")),
|
|
246
|
+
latestMarkdownExists: fs.existsSync(path.join(resolvedProjectRoot, docsDir, "graph-insights", "latest.md")),
|
|
247
|
+
latestJsonExists: fs.existsSync(path.join(resolvedProjectRoot, docsDir, "graph-insights", "latest.json")),
|
|
248
|
+
};
|
|
249
|
+
const graphDocsMissing = !bootstrapState.latestMarkdownExists || !bootstrapState.latestJsonExists;
|
|
231
250
|
const graphContext = await buildFeatureGraphContext({
|
|
232
251
|
featureName,
|
|
233
252
|
description,
|
|
253
|
+
projectRoot: projectRoot || undefined,
|
|
234
254
|
signal: context?.signal,
|
|
235
255
|
});
|
|
236
256
|
const graphStatusNote = graphContext.available
|
|
237
|
-
?
|
|
238
|
-
: "
|
|
257
|
+
? `任务图谱收敛: 可用(${graphContext.mode})`
|
|
258
|
+
: "任务图谱收敛: 已降级(自动回退)";
|
|
239
259
|
const graphGuideSection = `
|
|
240
260
|
|
|
241
|
-
## 🧠
|
|
242
|
-
-
|
|
243
|
-
-
|
|
261
|
+
## 🧠 代码图谱上下文
|
|
262
|
+
- 基线入口: ${graphDocs.latestMarkdownPath}
|
|
263
|
+
- 基线结构化副本: ${graphDocs.latestJsonPath}
|
|
264
|
+
- 基线状态: ${graphDocsMissing ? "缺失(需要补初始化)" : "可用"}
|
|
265
|
+
- 任务级收敛: ${graphContext.available ? "可用" : "降级"}
|
|
266
|
+
- 任务级摘要: ${graphContext.summary}
|
|
244
267
|
${graphContext.highlights.length > 0
|
|
245
|
-
? `-
|
|
246
|
-
: "-
|
|
268
|
+
? `- 任务级线索:\n${graphContext.highlights.slice(0, 3).map((item) => ` - ${item}`).join("\n")}`
|
|
269
|
+
: "- 任务级线索: 无"}
|
|
270
|
+
- 使用方式: 先参考基线图谱,再使用本次任务图谱线索约束模块边界和改动范围
|
|
247
271
|
`;
|
|
248
272
|
const estimateCodeContext = [
|
|
249
273
|
`参考生成的 ${docsDir}/specs/${featureName}/tasks.md`,
|
|
274
|
+
`如存在 ${graphDocs.latestMarkdownPath},请一并参考其中的模块依赖和调用链摘要`,
|
|
250
275
|
...(graphContext.available
|
|
251
276
|
? [
|
|
252
|
-
graphContext.summary ?
|
|
253
|
-
...graphContext.highlights.slice(0, 2).map((item) =>
|
|
277
|
+
graphContext.summary ? `任务图谱摘要: ${graphContext.summary}` : "",
|
|
278
|
+
...graphContext.highlights.slice(0, 2).map((item) => `任务图谱线索: ${item}`),
|
|
254
279
|
]
|
|
255
280
|
: []),
|
|
256
281
|
]
|
|
@@ -281,6 +306,17 @@ ${graphContext.highlights.length > 0
|
|
|
281
306
|
const plan = {
|
|
282
307
|
mode: 'delegated',
|
|
283
308
|
steps: [
|
|
309
|
+
{
|
|
310
|
+
id: 'context',
|
|
311
|
+
tool: 'init_project_context',
|
|
312
|
+
when: `缺少 ${docsDir}/project-context.md 或 ${graphDocs.latestMarkdownPath} / ${graphDocs.latestJsonPath}`,
|
|
313
|
+
args: {
|
|
314
|
+
docs_dir: docsDir,
|
|
315
|
+
...(projectRoot ? { project_root: projectRoot } : {}),
|
|
316
|
+
},
|
|
317
|
+
outputs: [`${docsDir}/project-context.md`, graphDocs.latestMarkdownPath, graphDocs.latestJsonPath],
|
|
318
|
+
note: `兼容老项目:即使已有旧版 project-context,只要缺少图谱文档,也要先补齐 ${graphDocs.latestMarkdownPath}`,
|
|
319
|
+
},
|
|
284
320
|
{
|
|
285
321
|
id: 'loop-1',
|
|
286
322
|
tool: 'ask_user',
|
|
@@ -333,6 +369,7 @@ ${graphContext.highlights.length > 0
|
|
|
333
369
|
const guide = (header + LOOP_PROMPT_TEMPLATE
|
|
334
370
|
.replace(/{feature_name}/g, featureName)
|
|
335
371
|
.replace(/{description}/g, description)
|
|
372
|
+
.replace(/{project_root}/g, (projectRoot || process.cwd()).replace(/\\/g, "/"))
|
|
336
373
|
.replace(/{question_budget}/g, String(questionBudget))
|
|
337
374
|
.replace(/{assumption_cap}/g, String(assumptionCap)))
|
|
338
375
|
+ graphGuideSection;
|
|
@@ -361,6 +398,11 @@ ${graphContext.highlights.length > 0
|
|
|
361
398
|
},
|
|
362
399
|
metadata: {
|
|
363
400
|
plan,
|
|
401
|
+
graphDocs,
|
|
402
|
+
bootstrapState: {
|
|
403
|
+
...bootstrapState,
|
|
404
|
+
graphDocsMissing,
|
|
405
|
+
},
|
|
364
406
|
graphContext,
|
|
365
407
|
},
|
|
366
408
|
};
|
|
@@ -383,6 +425,7 @@ ${graphContext.highlights.length > 0
|
|
|
383
425
|
.replace(/{feature_name}/g, featureName)
|
|
384
426
|
.replace(/{description}/g, description)
|
|
385
427
|
.replace(/{docs_dir}/g, docsDir)
|
|
428
|
+
.replace(/{project_root}/g, (projectRoot || process.cwd()).replace(/\\/g, "/"))
|
|
386
429
|
.replace(/{template_profile}/g, templateProfile))
|
|
387
430
|
+ graphGuideSection;
|
|
388
431
|
const plan = {
|
|
@@ -391,9 +434,13 @@ ${graphContext.highlights.length > 0
|
|
|
391
434
|
{
|
|
392
435
|
id: 'context',
|
|
393
436
|
tool: 'init_project_context',
|
|
394
|
-
when: `缺少 ${docsDir}/project-context.md`,
|
|
395
|
-
args: {
|
|
396
|
-
|
|
437
|
+
when: `缺少 ${docsDir}/project-context.md 或 ${graphDocs.latestMarkdownPath} / ${graphDocs.latestJsonPath}`,
|
|
438
|
+
args: {
|
|
439
|
+
docs_dir: docsDir,
|
|
440
|
+
...(projectRoot ? { project_root: projectRoot } : {}),
|
|
441
|
+
},
|
|
442
|
+
outputs: [`${docsDir}/project-context.md`, graphDocs.latestMarkdownPath, graphDocs.latestJsonPath],
|
|
443
|
+
note: `兼容老项目:即使已有旧版 project-context,只要缺少图谱文档,也要先补齐 ${graphDocs.latestMarkdownPath}`,
|
|
397
444
|
},
|
|
398
445
|
{
|
|
399
446
|
id: 'spec',
|
|
@@ -424,7 +471,7 @@ ${graphContext.highlights.length > 0
|
|
|
424
471
|
{
|
|
425
472
|
name: '检查项目上下文',
|
|
426
473
|
status: 'pending',
|
|
427
|
-
description: `检查 ${docsDir}/project-context.md
|
|
474
|
+
description: `检查 ${docsDir}/project-context.md 与 graph-insights/latest.* 是否存在,缺失则调用 init_project_context`,
|
|
428
475
|
},
|
|
429
476
|
{
|
|
430
477
|
name: '生成功能规格',
|
|
@@ -440,6 +487,8 @@ ${graphContext.highlights.length > 0
|
|
|
440
487
|
artifacts: [],
|
|
441
488
|
nextSteps: [
|
|
442
489
|
'检查并读取项目上下文文档',
|
|
490
|
+
`如果缺少 ${graphDocs.latestMarkdownPath} / ${graphDocs.latestJsonPath},先调用 init_project_context 补齐图谱初始化`,
|
|
491
|
+
`优先读取 ${graphDocs.latestMarkdownPath} 获取模块依赖与调用链摘要`,
|
|
443
492
|
'调用 add_feature 工具生成功能规格文档',
|
|
444
493
|
'调用 estimate 工具进行工作量估算',
|
|
445
494
|
'按照 tasks.md 开始开发',
|
|
@@ -466,6 +515,11 @@ ${graphContext.highlights.length > 0
|
|
|
466
515
|
dependencies: [],
|
|
467
516
|
metadata: {
|
|
468
517
|
plan,
|
|
518
|
+
graphDocs,
|
|
519
|
+
bootstrapState: {
|
|
520
|
+
...bootstrapState,
|
|
521
|
+
graphDocsMissing,
|
|
522
|
+
},
|
|
469
523
|
graphContext,
|
|
470
524
|
},
|
|
471
525
|
};
|
package/docs/data/tools.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// MCP Probe Kit 工具数据
|
|
2
2
|
const toolsData = {
|
|
3
3
|
workflow: [
|
|
4
|
-
{
|
|
5
|
-
name: 'start_feature',
|
|
6
|
-
description: '
|
|
4
|
+
{
|
|
5
|
+
name: 'start_feature',
|
|
6
|
+
description: '完整的功能开发工作流编排:补齐图谱基线 → 刷新 GitNexus 图谱 → 收敛需求范围 → 生成规格 → 估算工作量',
|
|
7
7
|
schema: 'FeatureReportSchema',
|
|
8
8
|
params: [
|
|
9
9
|
{ name: 'description', type: 'string', required: false, desc: '功能详细描述' },
|
|
@@ -15,28 +15,29 @@ const toolsData = {
|
|
|
15
15
|
{ name: 'loop_question_budget', type: 'number', required: false, desc: '每轮最多提问数量(默认 5)' },
|
|
16
16
|
{ name: 'loop_assumption_cap', type: 'number', required: false, desc: '每轮假设上限(默认 3)' }
|
|
17
17
|
],
|
|
18
|
-
usage: '
|
|
18
|
+
usage: '用于启动完整的功能开发流程,自动补齐 graph-insights,并通过 GitNexus 的 query/context/impact 收敛需求范围后生成规格与估算',
|
|
19
19
|
example: `// 使用示例
|
|
20
20
|
你: 请使用 start_feature 工具开发用户认证功能
|
|
21
21
|
|
|
22
22
|
description: "添加用户认证功能,支持邮箱登录"
|
|
23
23
|
feature_name: "user-auth"`
|
|
24
24
|
},
|
|
25
|
-
{
|
|
26
|
-
name: 'start_bugfix',
|
|
27
|
-
description: 'Bug
|
|
28
|
-
schema: 'BugFixReportSchema',
|
|
29
|
-
params: [
|
|
30
|
-
{ name: 'error_message', type: 'string', required: true, desc: '错误信息' },
|
|
31
|
-
{ name: 'stack_trace', type: 'string', required: false, desc: '堆栈跟踪信息' },
|
|
32
|
-
{ name: 'code_context', type: 'string', required: false, desc: '相关代码上下文' },
|
|
33
|
-
{ name: '
|
|
25
|
+
{
|
|
26
|
+
name: 'start_bugfix',
|
|
27
|
+
description: 'Bug 修复工作流编排:补齐图谱基线 → 刷新 GitNexus 图谱 → 收敛故障边界 → TBP 8 步真因分析 → 修复方案 → 生成测试',
|
|
28
|
+
schema: 'BugFixReportSchema',
|
|
29
|
+
params: [
|
|
30
|
+
{ name: 'error_message', type: 'string', required: true, desc: '错误信息' },
|
|
31
|
+
{ name: 'stack_trace', type: 'string', required: false, desc: '堆栈跟踪信息' },
|
|
32
|
+
{ name: 'code_context', type: 'string', required: false, desc: '相关代码上下文' },
|
|
33
|
+
{ name: 'analysis_mode', type: 'string', required: false, desc: '分析方法,默认 tbp8(先分析再修)' },
|
|
34
|
+
{ name: 'template_profile', type: 'string', required: false, desc: '模板档位:auto、guided 或 strict' },
|
|
34
35
|
{ name: 'requirements_mode', type: 'string', required: false, desc: '需求模式:steady 或 loop' },
|
|
35
36
|
{ name: 'loop_max_rounds', type: 'number', required: false, desc: '需求 loop 最大轮次(默认 2)' },
|
|
36
37
|
{ name: 'loop_question_budget', type: 'number', required: false, desc: '每轮最多提问数量(默认 5)' },
|
|
37
38
|
{ name: 'loop_assumption_cap', type: 'number', required: false, desc: '每轮假设上限(默认 3)' }
|
|
38
39
|
],
|
|
39
|
-
usage: '
|
|
40
|
+
usage: '适用于找问题、修 bug、排查异常、定位回归;会先补齐 graph-insights 并用 GitNexus 收敛边界,再按 TBP 8 步法闭合真因后修复',
|
|
40
41
|
example: `// 使用示例
|
|
41
42
|
你: 请使用 start_bugfix 工具修复登录失败的问题
|
|
42
43
|
|
|
@@ -147,7 +148,7 @@ focus: "security"`
|
|
|
147
148
|
{ name: 'max_depth', type: 'number', required: false, desc: 'impact 最大深度,默认 3' },
|
|
148
149
|
{ name: 'include_tests', type: 'boolean', required: false, desc: 'impact 是否包含测试文件,默认 false' }
|
|
149
150
|
],
|
|
150
|
-
usage: '
|
|
151
|
+
usage: '用于刷新 GitNexus 图谱、获取任务级调用链/上下文/影响面,并把结果保存到 docs/graph-insights 与 project-context 索引',
|
|
151
152
|
example: `// 使用示例
|
|
152
153
|
你: 请使用 code_insight 工具分析登录相关调用链
|
|
153
154
|
|
|
@@ -156,14 +157,15 @@ query: "authentication middleware"`
|
|
|
156
157
|
},
|
|
157
158
|
{
|
|
158
159
|
name: 'fix_bug',
|
|
159
|
-
description: 'Bug
|
|
160
|
-
schema: 'BugAnalysisSchema',
|
|
161
|
-
params: [
|
|
162
|
-
{ name: 'error_message', type: 'string', required: true, desc: '错误信息' },
|
|
163
|
-
{ name: 'stack_trace', type: 'string', required: false, desc: '堆栈跟踪' },
|
|
164
|
-
{ name: 'code_context', type: 'string', required: false, desc: '相关代码' }
|
|
165
|
-
|
|
166
|
-
|
|
160
|
+
description: '基于 TBP 8 步法的 Bug 真因分析与修复指导,输出证据链、修复计划、测试计划和预防措施',
|
|
161
|
+
schema: 'BugAnalysisSchema',
|
|
162
|
+
params: [
|
|
163
|
+
{ name: 'error_message', type: 'string', required: true, desc: '错误信息' },
|
|
164
|
+
{ name: 'stack_trace', type: 'string', required: false, desc: '堆栈跟踪' },
|
|
165
|
+
{ name: 'code_context', type: 'string', required: false, desc: '相关代码' },
|
|
166
|
+
{ name: 'analysis_mode', type: 'string', required: false, desc: '分析方法,默认 tbp8(先分析再修)' }
|
|
167
|
+
],
|
|
168
|
+
usage: '适用于先找真因再修,帮助闭合现象、时间线、边界、真因和修复之间的因果链',
|
|
167
169
|
example: `// 使用示例
|
|
168
170
|
你: 请使用 fix_bug 工具修复这个问题
|
|
169
171
|
|
|
@@ -195,10 +197,10 @@ goal: "reduce_complexity"`
|
|
|
195
197
|
}
|
|
196
198
|
],
|
|
197
199
|
git: [
|
|
198
|
-
{
|
|
199
|
-
name: 'gencommit',
|
|
200
|
-
description: '根据代码变更自动生成符合 Conventional Commits 规范的 Git commit 消息',
|
|
201
|
-
schema: '
|
|
200
|
+
{
|
|
201
|
+
name: 'gencommit',
|
|
202
|
+
description: '根据代码变更自动生成符合 Conventional Commits 规范的 Git commit 消息',
|
|
203
|
+
schema: 'CommitGuidanceSchema',
|
|
202
204
|
params: [
|
|
203
205
|
{ name: 'changes', type: 'string', required: false, desc: '代码变更内容,可以是 git diff 输出、变更描述或自然语言' },
|
|
204
206
|
{ name: 'type', type: 'string', required: false, desc: 'Commit 类型:feat、fix、docs、style、chore、refactor、test,会自动识别' }
|
|
@@ -265,14 +267,14 @@ framework: "jest"`
|
|
|
265
267
|
input: "创建一个任务管理系统,支持任务创建、分配、跟踪"
|
|
266
268
|
project_name: "TaskManager"`
|
|
267
269
|
},
|
|
268
|
-
{
|
|
269
|
-
name: 'init_project_context',
|
|
270
|
-
description: '
|
|
270
|
+
{
|
|
271
|
+
name: 'init_project_context',
|
|
272
|
+
description: '生成或维护项目上下文文档,并补齐 graph-insights 图谱基线入口',
|
|
271
273
|
schema: 'ProjectContextSchema',
|
|
272
274
|
params: [
|
|
273
275
|
{ name: 'docs_dir', type: 'string', required: false, desc: '文档目录,默认 docs' }
|
|
274
276
|
],
|
|
275
|
-
usage: '
|
|
277
|
+
usage: '新项目生成上下文骨架;老项目若已有 project-context.md,则保留旧文档,仅补 graph-insights 图谱文档与索引入口',
|
|
276
278
|
example: `// 使用示例
|
|
277
279
|
你: 请使用 init_project_context 工具生成项目上下文`
|
|
278
280
|
},
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
},
|
|
72
72
|
"toolsData": {
|
|
73
73
|
"start_feature": {
|
|
74
|
-
"description": "Complete feature development workflow orchestration:
|
|
75
|
-
"usage": "Used to
|
|
74
|
+
"description": "Complete feature development workflow orchestration: bootstrap graph baseline → refresh GitNexus index → narrow scope → generate specs → estimate workload",
|
|
75
|
+
"usage": "Used to start the full feature flow, backfill graph-insights when missing, then use GitNexus query/context/impact analysis to narrow scope before spec and estimation"
|
|
76
76
|
},
|
|
77
77
|
"start_bugfix": {
|
|
78
|
-
"description": "Bug fix workflow orchestration:
|
|
79
|
-
"usage": "
|
|
78
|
+
"description": "Bug fix workflow orchestration: bootstrap graph baseline → refresh GitNexus index → narrow failure boundary → TBP 8-step root-cause analysis → fix plan → generate tests",
|
|
79
|
+
"usage": "Use it for bugs, regressions, and anomalies; it backfills graph-insights first and uses GitNexus to constrain boundary and impact before TBP RCA"
|
|
80
80
|
},
|
|
81
81
|
"start_onboard": {
|
|
82
82
|
"description": "Project onboarding workflow: generate context documentation to help new members quickly understand the project",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"usage": "Comprehensive code quality review, outputting structured issue list (severity/category/suggestion)"
|
|
100
100
|
},
|
|
101
101
|
"fix_bug": {
|
|
102
|
-
"description": "
|
|
103
|
-
"usage": "
|
|
102
|
+
"description": "TBP 8-step bug RCA and repair guidance with evidence chain, fix plan, test plan, and prevention measures",
|
|
103
|
+
"usage": "Use it when you need to find the true cause first and close the chain from symptom and boundary to repair"
|
|
104
104
|
},
|
|
105
105
|
"refactor": {
|
|
106
106
|
"description": "Refactoring suggestion tool, analyzing code structure, providing refactoring steps, risk assessment, and rollback plan",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"usage": "Generate requirement/design/task documents following Spec-Driven Development approach"
|
|
124
124
|
},
|
|
125
125
|
"init_project_context": {
|
|
126
|
-
"description": "Generate project context documentation
|
|
127
|
-
"usage": "
|
|
126
|
+
"description": "Generate or maintain project context documentation and bootstrap graph-insights entry points",
|
|
127
|
+
"usage": "Creates context docs for new projects; if project-context.md already exists, it preserves the old docs and only backfills graph-insights plus the index entry"
|
|
128
128
|
},
|
|
129
129
|
"add_feature": {
|
|
130
130
|
"description": "Generate new feature specification documents (requirements/design/task list) based on project context",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
},
|
|
157
157
|
"code_insight": {
|
|
158
158
|
"description": "Code graph insight tool, bridging GitNexus to analyze call chains, context, and impact (auto-degrades when unavailable)",
|
|
159
|
-
"usage": "
|
|
159
|
+
"usage": "Refresh the GitNexus index, perform task-level call-chain/context/impact analysis, and persist results to docs/graph-insights plus the project-context index"
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
},
|
|
72
72
|
"toolsData": {
|
|
73
73
|
"start_feature": {
|
|
74
|
-
"description": "
|
|
75
|
-
"usage": "
|
|
74
|
+
"description": "完全な機能開発ワークフローオーケストレーション:グラフ基線補完 → GitNexus 更新 → 範囲収束 → 仕様生成 → 作業量見積もり",
|
|
75
|
+
"usage": "不足している graph-insights を補完し、GitNexus の query/context/impact で範囲を絞ったうえで仕様と見積もりを生成します"
|
|
76
76
|
},
|
|
77
77
|
"start_bugfix": {
|
|
78
|
-
"description": "
|
|
79
|
-
"usage": "
|
|
78
|
+
"description": "バグ修正ワークフローオーケストレーション:グラフ基線補完 → GitNexus 更新 → 障害境界の収束 → TBP 8段階の真因分析 → 修正方針 → テスト生成",
|
|
79
|
+
"usage": "バグ・回帰・異常調査向け。先に graph-insights を補完し、GitNexus で境界と影響面を絞った後に TBP RCA を進めます"
|
|
80
80
|
},
|
|
81
81
|
"start_onboard": {
|
|
82
82
|
"description": "プロジェクトオンボーディングワークフロー:コンテキストドキュメントを生成し、新メンバーがプロジェクトを迅速に理解できるようにします",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"usage": "包括的なコード品質レビュー、構造化された問題リスト(severity/category/suggestion)を出力します"
|
|
100
100
|
},
|
|
101
101
|
"fix_bug": {
|
|
102
|
-
"description": "
|
|
103
|
-
"usage": "
|
|
102
|
+
"description": "TBP 8段階に基づくバグ真因分析と修正ガイダンス。証拠連鎖、修正計画、テスト計画、再発防止策を返します",
|
|
103
|
+
"usage": "真因を先に特定したいときに使います。現象・境界・真因・修正までの因果連鎖を閉じます"
|
|
104
104
|
},
|
|
105
105
|
"refactor": {
|
|
106
106
|
"description": "リファクタリング提案ツール、コード構造を分析し、リファクタリング手順、リスク評価、ロールバック計画を提供します",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"usage": "Spec-Driven Developmentアプローチに従って要件/設計/タスクドキュメントを生成します"
|
|
124
124
|
},
|
|
125
125
|
"init_project_context": {
|
|
126
|
-
"description": "
|
|
127
|
-
"usage": "
|
|
126
|
+
"description": "プロジェクトコンテキスト文書を生成・維持し、graph-insights の基線入口を補完します",
|
|
127
|
+
"usage": "新規プロジェクトでは骨組みを生成し、既存の project-context.md がある場合は上書きせず graph-insights と索引入口だけを補完します"
|
|
128
128
|
},
|
|
129
129
|
"add_feature": {
|
|
130
130
|
"description": "プロジェクトコンテキストに基づいて新機能仕様ドキュメント(要件/設計/タスクリスト)を生成します",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
},
|
|
157
157
|
"code_insight": {
|
|
158
158
|
"description": "コードグラフ洞察ツール。GitNexus をブリッジして呼び出し連鎖、コンテキスト、影響範囲を分析(利用不可時は自動で劣化)",
|
|
159
|
-
"usage": "
|
|
159
|
+
"usage": "GitNexus インデックスを更新し、タスク単位の呼び出し連鎖・コンテキスト・影響範囲を分析して docs/graph-insights と project-context 索引へ保存します"
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
},
|
|
72
72
|
"toolsData": {
|
|
73
73
|
"start_feature": {
|
|
74
|
-
"description": "완전한 기능 개발 워크플로우 오케스트레이션:
|
|
75
|
-
"usage": "
|
|
74
|
+
"description": "완전한 기능 개발 워크플로우 오케스트레이션: 그래프 베이스라인 보강 → GitNexus 갱신 → 범위 수렴 → 사양 생성 → 작업량 추정",
|
|
75
|
+
"usage": "누락된 graph-insights 를 먼저 보강하고 GitNexus query/context/impact 로 범위를 수렴시킨 뒤 사양과 추정을 생성합니다"
|
|
76
76
|
},
|
|
77
77
|
"start_bugfix": {
|
|
78
|
-
"description": "버그 수정 워크플로우 오케스트레이션:
|
|
79
|
-
"usage": "
|
|
78
|
+
"description": "버그 수정 워크플로우 오케스트레이션: 그래프 베이스라인 보강 → GitNexus 갱신 → 장애 경계 수렴 → TBP 8단계 근본원인 분석 → 수정 방안 → 테스트 생성",
|
|
79
|
+
"usage": "버그, 회귀, 이상 분석용. 먼저 graph-insights 를 보강하고 GitNexus 로 경계와 영향면을 좁힌 뒤 TBP RCA 를 진행합니다"
|
|
80
80
|
},
|
|
81
81
|
"start_onboard": {
|
|
82
82
|
"description": "프로젝트 온보딩 워크플로우: 컨텍스트 문서를 생성하여 새 구성원이 프로젝트를 빠르게 이해할 수 있도록 돕습니다",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"usage": "포괄적인 코드 품질 리뷰, 구조화된 문제 목록(severity/category/suggestion)을 출력합니다"
|
|
100
100
|
},
|
|
101
101
|
"fix_bug": {
|
|
102
|
-
"description": "버그 수정
|
|
103
|
-
"usage": "
|
|
102
|
+
"description": "TBP 8단계 기반 버그 RCA 및 수정 가이드로 증거 사슬, 수정 계획, 테스트 계획, 예방 조치를 제공합니다",
|
|
103
|
+
"usage": "먼저 진짜 원인을 찾고 싶을 때 사용하며 현상, 경계, 진짜 원인, 수정까지의 인과 사슬을 닫아줍니다"
|
|
104
104
|
},
|
|
105
105
|
"refactor": {
|
|
106
106
|
"description": "리팩토링 제안 도구, 코드 구조를 분석하고 리팩토링 단계, 위험 평가 및 롤백 계획을 제공합니다",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"usage": "Spec-Driven Development 접근 방식에 따라 요구사항/설계/작업 문서를 생성합니다"
|
|
124
124
|
},
|
|
125
125
|
"init_project_context": {
|
|
126
|
-
"description": "프로젝트 컨텍스트
|
|
127
|
-
"usage": "
|
|
126
|
+
"description": "프로젝트 컨텍스트 문서를 생성 또는 유지하고 graph-insights 베이스라인 진입점을 보강합니다",
|
|
127
|
+
"usage": "신규 프로젝트는 컨텍스트 골격을 생성하고, 기존 project-context.md 가 있으면 덮어쓰지 않고 graph-insights 와 인덱스 진입점만 보강합니다"
|
|
128
128
|
},
|
|
129
129
|
"add_feature": {
|
|
130
130
|
"description": "프로젝트 컨텍스트를 기반으로 새 기능 사양 문서(요구사항/설계/작업 목록)를 생성합니다",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
},
|
|
157
157
|
"code_insight": {
|
|
158
158
|
"description": "코드 그래프 인사이트 도구로 GitNexus를 브리지하여 호출 체인, 컨텍스트, 영향 범위를 분석합니다(사용 불가 시 자동 강등)",
|
|
159
|
-
"usage": "
|
|
159
|
+
"usage": "GitNexus 인덱스를 갱신하고 작업 단위 호출 체인/컨텍스트/영향 범위를 분석한 뒤 결과를 docs/graph-insights 와 project-context 인덱스에 저장합니다"
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
},
|
|
72
72
|
"toolsData": {
|
|
73
73
|
"start_feature": {
|
|
74
|
-
"description": "
|
|
75
|
-
"usage": "
|
|
74
|
+
"description": "完整的功能开发工作流编排:补齐图谱基线 → 刷新 GitNexus 图谱 → 收敛需求范围 → 生成规格 → 估算工作量",
|
|
75
|
+
"usage": "用于启动完整的功能开发流程,自动补齐 graph-insights,并通过 GitNexus 的 query/context/impact 收敛需求范围后生成规格与估算"
|
|
76
76
|
},
|
|
77
77
|
"start_bugfix": {
|
|
78
|
-
"description": "Bug
|
|
79
|
-
"usage": "
|
|
78
|
+
"description": "Bug 修复工作流编排:补齐图谱基线 → 刷新 GitNexus 图谱 → 收敛故障边界 → TBP 8 步真因分析 → 修复方案 → 生成测试",
|
|
79
|
+
"usage": "适用于找问题、修 bug、排查异常、定位回归;会先补齐 graph-insights 并用 GitNexus 收敛边界,再按 TBP 8 步法闭合真因后修复"
|
|
80
80
|
},
|
|
81
81
|
"start_onboard": {
|
|
82
82
|
"description": "项目上手工作流:生成上下文文档,帮助新成员快速了解项目",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"usage": "全面审查代码质量,输出结构化问题清单(severity/category/suggestion)"
|
|
100
100
|
},
|
|
101
101
|
"fix_bug": {
|
|
102
|
-
"description": "Bug
|
|
103
|
-
"usage": "
|
|
102
|
+
"description": "基于 TBP 8 步法的 Bug 真因分析与修复指导,输出证据链、修复计划、测试计划和预防措施",
|
|
103
|
+
"usage": "适用于先找真因再修,帮助闭合现象、时间线、边界、真因和修复之间的因果链"
|
|
104
104
|
},
|
|
105
105
|
"refactor": {
|
|
106
106
|
"description": "重构建议工具,分析代码结构,提供重构步骤、风险评估和回滚计划",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"usage": "按 Spec-Driven Development 方式生成需求/设计/任务文档"
|
|
124
124
|
},
|
|
125
125
|
"init_project_context": {
|
|
126
|
-
"description": "
|
|
127
|
-
"usage": "
|
|
126
|
+
"description": "生成或维护项目上下文文档,并补齐 graph-insights 图谱基线入口",
|
|
127
|
+
"usage": "新项目生成上下文骨架;老项目若已有 project-context.md,则保留旧文档,仅补 graph-insights 图谱文档与索引入口"
|
|
128
128
|
},
|
|
129
129
|
"add_feature": {
|
|
130
130
|
"description": "生成新功能规格文档(需求/设计/任务清单),基于项目上下文",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
},
|
|
157
157
|
"code_insight": {
|
|
158
158
|
"description": "代码图谱洞察工具,桥接 GitNexus 分析调用链、上下文和影响面(不可用时自动降级)",
|
|
159
|
-
"usage": "
|
|
159
|
+
"usage": "用于刷新 GitNexus 图谱、获取任务级调用链/上下文/影响面,并把结果保存到 docs/graph-insights 与 project-context 索引"
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|