openmatrix 0.1.12 → 0.1.13
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 +26 -0
- package/dist/cli/commands/check.d.ts +2 -0
- package/dist/cli/commands/check.js +330 -0
- package/dist/cli/commands/upgrade.d.ts +2 -0
- package/dist/cli/commands/upgrade.js +329 -0
- package/dist/cli/index.js +2 -0
- package/dist/orchestrator/upgrade-detector.d.ts +159 -0
- package/dist/orchestrator/upgrade-detector.js +1184 -0
- package/package.json +1 -1
- package/skills/om-check.md +237 -0
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.upgradeCommand = void 0;
|
|
40
|
+
// src/cli/commands/upgrade.ts
|
|
41
|
+
const commander_1 = require("commander");
|
|
42
|
+
const upgrade_detector_js_1 = require("../../orchestrator/upgrade-detector.js");
|
|
43
|
+
const readline = __importStar(require("readline"));
|
|
44
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
45
|
+
exports.upgradeCommand = new commander_1.Command('upgrade')
|
|
46
|
+
.description('自动检测项目可改进点并提供升级建议')
|
|
47
|
+
.argument('[hint]', '用户提示 (可选,用于聚焦检测方向)')
|
|
48
|
+
.option('--json', '输出 JSON 格式 (供 Skill 解析)')
|
|
49
|
+
.option('--auto', '自动执行所有改进建议 (无需确认)')
|
|
50
|
+
.option('--categories <items>', '指定检测类别 (逗号分隔)', 'bug,quality,capability,ux,style,security,common')
|
|
51
|
+
.option('--min-priority <level>', '最小优先级 (critical|high|medium|low)', 'low')
|
|
52
|
+
.option('--max <number>', '最大建议数量', '50')
|
|
53
|
+
.option('--scan <dirs>', '扫描目录 (逗号分隔)', 'src,skills,tests,docs')
|
|
54
|
+
.option('--interactive', '交互式选择要执行的改进', false)
|
|
55
|
+
.action(async (hint, options) => {
|
|
56
|
+
const projectRoot = process.cwd();
|
|
57
|
+
// 解析配置
|
|
58
|
+
const config = {
|
|
59
|
+
userHint: hint,
|
|
60
|
+
categories: options.categories.split(',').map((c) => c.trim()),
|
|
61
|
+
minPriority: options.minPriority,
|
|
62
|
+
maxSuggestions: parseInt(options.max),
|
|
63
|
+
scanDirs: options.scan.split(',').map((d) => d.trim())
|
|
64
|
+
};
|
|
65
|
+
// 创建检测器
|
|
66
|
+
const detector = new upgrade_detector_js_1.UpgradeDetector(projectRoot, config);
|
|
67
|
+
if (!options.json) {
|
|
68
|
+
console.log(chalk_1.default.bold.cyan('\n🔍 OpenMatrix 升级检测器'));
|
|
69
|
+
console.log('━'.repeat(42));
|
|
70
|
+
console.log(`📁 项目路径: ${projectRoot}`);
|
|
71
|
+
if (hint) {
|
|
72
|
+
console.log(`💡 用户提示: ${hint}`);
|
|
73
|
+
}
|
|
74
|
+
console.log('\n⏳ 正在扫描项目...\n');
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
// 执行检测
|
|
78
|
+
const result = await detector.detect();
|
|
79
|
+
// JSON 输出
|
|
80
|
+
if (options.json) {
|
|
81
|
+
console.log(JSON.stringify(result, null, 2));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
// 显示结果
|
|
85
|
+
displayResult(result);
|
|
86
|
+
// 交互式选择
|
|
87
|
+
if (options.interactive && result.suggestions.length > 0) {
|
|
88
|
+
const selected = await interactiveSelect(result.suggestions);
|
|
89
|
+
if (selected.length > 0) {
|
|
90
|
+
await executeSelected(selected, result.projectType);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else if (options.auto && result.suggestions.length > 0) {
|
|
94
|
+
// 自动执行所有
|
|
95
|
+
await executeAll(result.suggestions, result.projectType);
|
|
96
|
+
}
|
|
97
|
+
else if (result.suggestions.length > 0) {
|
|
98
|
+
// 询问用户
|
|
99
|
+
const shouldExecute = await askForExecution();
|
|
100
|
+
if (shouldExecute) {
|
|
101
|
+
await executeAll(result.suggestions, result.projectType);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (options.json) {
|
|
107
|
+
console.log(JSON.stringify({ error: String(error) }));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
console.error(chalk_1.default.red('\n❌ 检测失败:'), error);
|
|
111
|
+
}
|
|
112
|
+
process.exit(1);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
/**
|
|
116
|
+
* 显示检测结果
|
|
117
|
+
*/
|
|
118
|
+
function displayResult(result) {
|
|
119
|
+
const { projectType, projectName, suggestions, summary } = result;
|
|
120
|
+
console.log(chalk_1.default.bold(`📦 项目: ${projectName}`));
|
|
121
|
+
console.log(` 类型: ${formatProjectType(projectType)}`);
|
|
122
|
+
console.log(` 扫描时间: ${new Date(result.timestamp).toLocaleString()}\n`);
|
|
123
|
+
// 摘要
|
|
124
|
+
console.log(chalk_1.default.bold('📊 检测摘要'));
|
|
125
|
+
console.log('━'.repeat(42));
|
|
126
|
+
const categoryLabels = {
|
|
127
|
+
bug: '🐛 代码缺陷',
|
|
128
|
+
quality: '🔧 代码质量',
|
|
129
|
+
capability: '📦 缺失能力',
|
|
130
|
+
ux: '👤 用户体验',
|
|
131
|
+
style: '🎨 代码风格',
|
|
132
|
+
security: '🔒 安全问题',
|
|
133
|
+
common: '⚠️ 常见问题',
|
|
134
|
+
prompt: '🤖 Prompt 问题',
|
|
135
|
+
skill: '⚡ Skill 问题',
|
|
136
|
+
agent: '🧠 Agent 配置'
|
|
137
|
+
};
|
|
138
|
+
for (const [cat, count] of Object.entries(summary.byCategory)) {
|
|
139
|
+
if (count > 0) {
|
|
140
|
+
console.log(` ${categoryLabels[cat]}: ${chalk_1.default.yellow(count)}`);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
console.log(`\n 总计: ${chalk_1.default.bold(summary.total)} 个建议`);
|
|
144
|
+
console.log(` 可自动修复: ${chalk_1.default.green(summary.autoFixable)} 个\n`);
|
|
145
|
+
if (suggestions.length === 0) {
|
|
146
|
+
console.log(chalk_1.default.green('✅ 未发现问题,项目状态良好!\n'));
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
// 详细建议
|
|
150
|
+
console.log(chalk_1.default.bold('📋 改进建议'));
|
|
151
|
+
console.log('━'.repeat(42) + '\n');
|
|
152
|
+
// 按优先级分组
|
|
153
|
+
const critical = suggestions.filter(s => s.priority === 'critical');
|
|
154
|
+
const high = suggestions.filter(s => s.priority === 'high');
|
|
155
|
+
const medium = suggestions.filter(s => s.priority === 'medium');
|
|
156
|
+
const low = suggestions.filter(s => s.priority === 'low');
|
|
157
|
+
if (critical.length > 0) {
|
|
158
|
+
console.log(chalk_1.default.red.bold('🚨 关键问题:\n'));
|
|
159
|
+
for (const s of critical) {
|
|
160
|
+
displaySuggestion(s);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (high.length > 0) {
|
|
164
|
+
console.log(chalk_1.default.yellow.bold('⚠️ 高优先级:\n'));
|
|
165
|
+
for (const s of high) {
|
|
166
|
+
displaySuggestion(s);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (medium.length > 0) {
|
|
170
|
+
console.log(chalk_1.default.blue.bold('📋 中优先级:\n'));
|
|
171
|
+
for (const s of medium) {
|
|
172
|
+
displaySuggestion(s);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (low.length > 0) {
|
|
176
|
+
console.log(chalk_1.default.gray.bold('💡 低优先级:\n'));
|
|
177
|
+
for (const s of low.slice(0, 10)) { // 限制显示
|
|
178
|
+
displaySuggestion(s);
|
|
179
|
+
}
|
|
180
|
+
if (low.length > 10) {
|
|
181
|
+
console.log(chalk_1.default.gray(` ... 还有 ${low.length - 10} 个低优先级建议\n`));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
// 提示
|
|
185
|
+
console.log(chalk_1.default.gray('━'.repeat(42)));
|
|
186
|
+
console.log(chalk_1.default.gray('💡 提示:'));
|
|
187
|
+
console.log(chalk_1.default.gray(' --interactive 交互式选择改进项'));
|
|
188
|
+
console.log(chalk_1.default.gray(' --auto 自动执行所有改进'));
|
|
189
|
+
console.log();
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* 显示单个建议
|
|
193
|
+
*/
|
|
194
|
+
function displaySuggestion(s) {
|
|
195
|
+
const priorityColors = {
|
|
196
|
+
critical: chalk_1.default.red,
|
|
197
|
+
high: chalk_1.default.yellow,
|
|
198
|
+
medium: chalk_1.default.blue,
|
|
199
|
+
low: chalk_1.default.gray
|
|
200
|
+
};
|
|
201
|
+
const categoryIcons = {
|
|
202
|
+
bug: '🐛',
|
|
203
|
+
quality: '🔧',
|
|
204
|
+
capability: '📦',
|
|
205
|
+
ux: '👤',
|
|
206
|
+
style: '🎨',
|
|
207
|
+
security: '🔒',
|
|
208
|
+
common: '⚠️',
|
|
209
|
+
prompt: '🤖',
|
|
210
|
+
skill: '⚡',
|
|
211
|
+
agent: '🧠'
|
|
212
|
+
};
|
|
213
|
+
const color = priorityColors[s.priority];
|
|
214
|
+
console.log(` ${color(`[${s.id}]`)} ${categoryIcons[s.category]} ${s.title}`);
|
|
215
|
+
console.log(` 位置: ${s.location.file}${s.location.line ? `:${s.location.line}` : ''}`);
|
|
216
|
+
console.log(` 建议: ${chalk_1.default.gray(s.suggestion)}`);
|
|
217
|
+
if (s.autoFixable) {
|
|
218
|
+
console.log(` ${chalk_1.default.green('✓ 可自动修复')}`);
|
|
219
|
+
}
|
|
220
|
+
console.log();
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* 格式化项目类型
|
|
224
|
+
*/
|
|
225
|
+
function formatProjectType(type) {
|
|
226
|
+
const labels = {
|
|
227
|
+
openmatrix: '🤖 OpenMatrix',
|
|
228
|
+
'ai-project': '🧠 AI 项目',
|
|
229
|
+
nodejs: '📦 Node.js',
|
|
230
|
+
typescript: '📘 TypeScript',
|
|
231
|
+
python: '🐍 Python',
|
|
232
|
+
go: '🔷 Go',
|
|
233
|
+
rust: '🦀 Rust',
|
|
234
|
+
java: '☕ Java',
|
|
235
|
+
csharp: '💜 C#',
|
|
236
|
+
cpp: '⚙️ C/C++',
|
|
237
|
+
php: '🐘 PHP',
|
|
238
|
+
unknown: '❓ 未知'
|
|
239
|
+
};
|
|
240
|
+
return labels[type];
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* 交互式选择
|
|
244
|
+
*/
|
|
245
|
+
async function interactiveSelect(suggestions) {
|
|
246
|
+
console.log(chalk_1.default.bold.cyan('\n🎯 交互式选择'));
|
|
247
|
+
console.log('━'.repeat(42));
|
|
248
|
+
console.log('选择要执行的改进项 (空格选择,回车确认):\n');
|
|
249
|
+
const rl = readline.createInterface({
|
|
250
|
+
input: process.stdin,
|
|
251
|
+
output: process.stdout
|
|
252
|
+
});
|
|
253
|
+
// 显示选项
|
|
254
|
+
suggestions.forEach((s, i) => {
|
|
255
|
+
console.log(` [ ] ${i + 1}. ${s.title} (${s.priority})`);
|
|
256
|
+
});
|
|
257
|
+
console.log('\n输入序号 (用逗号分隔),或输入 "all" 选择全部:');
|
|
258
|
+
return new Promise((resolve) => {
|
|
259
|
+
rl.question('> ', (answer) => {
|
|
260
|
+
rl.close();
|
|
261
|
+
if (answer.trim().toLowerCase() === 'all') {
|
|
262
|
+
resolve(suggestions);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
const indices = answer.split(',')
|
|
266
|
+
.map(s => parseInt(s.trim()) - 1)
|
|
267
|
+
.filter(i => i >= 0 && i < suggestions.length);
|
|
268
|
+
resolve(indices.map(i => suggestions[i]));
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* 询问是否执行
|
|
274
|
+
*/
|
|
275
|
+
async function askForExecution() {
|
|
276
|
+
const rl = readline.createInterface({
|
|
277
|
+
input: process.stdin,
|
|
278
|
+
output: process.stdout
|
|
279
|
+
});
|
|
280
|
+
return new Promise((resolve) => {
|
|
281
|
+
rl.question('\n是否执行这些改进? (y/N) ', (answer) => {
|
|
282
|
+
rl.close();
|
|
283
|
+
resolve(answer.trim().toLowerCase() === 'y');
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* 执行选中的改进
|
|
289
|
+
*/
|
|
290
|
+
async function executeSelected(suggestions, projectType) {
|
|
291
|
+
console.log(chalk_1.default.bold.cyan('\n🚀 执行改进'));
|
|
292
|
+
console.log('━'.repeat(42));
|
|
293
|
+
console.log(`选择了 ${suggestions.length} 个改进项\n`);
|
|
294
|
+
// 这里需要调用 /om:start 来执行实际的改进
|
|
295
|
+
// 输出 JSON 格式供 Skill 解析
|
|
296
|
+
console.log(JSON.stringify({
|
|
297
|
+
action: 'execute_upgrades',
|
|
298
|
+
projectType,
|
|
299
|
+
suggestions: suggestions.map(s => ({
|
|
300
|
+
id: s.id,
|
|
301
|
+
title: s.title,
|
|
302
|
+
category: s.category,
|
|
303
|
+
priority: s.priority,
|
|
304
|
+
location: s.location,
|
|
305
|
+
suggestion: s.suggestion
|
|
306
|
+
}))
|
|
307
|
+
}, null, 2));
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* 执行所有改进
|
|
311
|
+
*/
|
|
312
|
+
async function executeAll(suggestions, projectType) {
|
|
313
|
+
console.log(chalk_1.default.bold.cyan('\n🚀 自动执行所有改进'));
|
|
314
|
+
console.log('━'.repeat(42));
|
|
315
|
+
// 输出 JSON 供 Skill 处理
|
|
316
|
+
console.log(JSON.stringify({
|
|
317
|
+
action: 'execute_all_upgrades',
|
|
318
|
+
projectType,
|
|
319
|
+
count: suggestions.length,
|
|
320
|
+
suggestions: suggestions.map(s => ({
|
|
321
|
+
id: s.id,
|
|
322
|
+
title: s.title,
|
|
323
|
+
category: s.category,
|
|
324
|
+
priority: s.priority,
|
|
325
|
+
location: s.location,
|
|
326
|
+
suggestion: s.suggestion
|
|
327
|
+
}))
|
|
328
|
+
}, null, 2));
|
|
329
|
+
}
|
package/dist/cli/index.js
CHANGED
|
@@ -11,6 +11,7 @@ const report_js_1 = require("./commands/report.js");
|
|
|
11
11
|
const meeting_js_1 = require("./commands/meeting.js");
|
|
12
12
|
const auto_js_1 = require("./commands/auto.js");
|
|
13
13
|
const install_skills_js_1 = require("./commands/install-skills.js");
|
|
14
|
+
const check_js_1 = require("./commands/check.js");
|
|
14
15
|
const program = new commander_1.Command();
|
|
15
16
|
program
|
|
16
17
|
.name('openmatrix')
|
|
@@ -26,5 +27,6 @@ program.addCommand(report_js_1.reportCommand);
|
|
|
26
27
|
program.addCommand(meeting_js_1.meetingCommand);
|
|
27
28
|
program.addCommand(auto_js_1.autoCommand);
|
|
28
29
|
program.addCommand(install_skills_js_1.installSkillsCommand);
|
|
30
|
+
program.addCommand(check_js_1.checkCommand);
|
|
29
31
|
// 默认帮助
|
|
30
32
|
program.parse();
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 升级建议类型
|
|
3
|
+
*/
|
|
4
|
+
export type UpgradeCategory = 'bug' | 'quality' | 'capability' | 'ux' | 'style' | 'security' | 'common' | 'prompt' | 'skill' | 'agent';
|
|
5
|
+
/**
|
|
6
|
+
* 升级建议优先级
|
|
7
|
+
*/
|
|
8
|
+
export type UpgradePriority = 'critical' | 'high' | 'medium' | 'low';
|
|
9
|
+
/**
|
|
10
|
+
* 升级建议
|
|
11
|
+
*/
|
|
12
|
+
export interface UpgradeSuggestion {
|
|
13
|
+
id: string;
|
|
14
|
+
category: UpgradeCategory;
|
|
15
|
+
priority: UpgradePriority;
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
location: {
|
|
19
|
+
file: string;
|
|
20
|
+
line?: number;
|
|
21
|
+
column?: number;
|
|
22
|
+
};
|
|
23
|
+
suggestion: string;
|
|
24
|
+
autoFixable: boolean;
|
|
25
|
+
impact: string;
|
|
26
|
+
effort: 'trivial' | 'small' | 'medium' | 'large';
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 检测结果
|
|
30
|
+
*/
|
|
31
|
+
export interface DetectionResult {
|
|
32
|
+
projectType: ProjectType;
|
|
33
|
+
projectName: string;
|
|
34
|
+
scanPath: string;
|
|
35
|
+
timestamp: string;
|
|
36
|
+
suggestions: UpgradeSuggestion[];
|
|
37
|
+
summary: {
|
|
38
|
+
total: number;
|
|
39
|
+
byCategory: Record<UpgradeCategory, number>;
|
|
40
|
+
byPriority: Record<UpgradePriority, number>;
|
|
41
|
+
autoFixable: number;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 项目类型
|
|
46
|
+
*/
|
|
47
|
+
export type ProjectType = 'openmatrix' | 'ai-project' | 'nodejs' | 'typescript' | 'python' | 'go' | 'rust' | 'java' | 'csharp' | 'cpp' | 'php' | 'dart' | 'unknown';
|
|
48
|
+
/**
|
|
49
|
+
* 检测器配置
|
|
50
|
+
*/
|
|
51
|
+
export interface DetectorConfig {
|
|
52
|
+
/** 扫描目录 */
|
|
53
|
+
scanDirs: string[];
|
|
54
|
+
/** 排除目录 */
|
|
55
|
+
excludeDirs: string[];
|
|
56
|
+
/** 检测类别 */
|
|
57
|
+
categories: UpgradeCategory[];
|
|
58
|
+
/** 最小优先级 */
|
|
59
|
+
minPriority: UpgradePriority;
|
|
60
|
+
/** 用户提示 (可选) */
|
|
61
|
+
userHint?: string;
|
|
62
|
+
/** 最大建议数量 */
|
|
63
|
+
maxSuggestions?: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 默认配置
|
|
67
|
+
*/
|
|
68
|
+
export declare const DEFAULT_DETECTOR_CONFIG: DetectorConfig;
|
|
69
|
+
/**
|
|
70
|
+
* 升级检测器
|
|
71
|
+
*
|
|
72
|
+
* 自动扫描项目代码,检测可改进点,支持多维度分析。
|
|
73
|
+
*/
|
|
74
|
+
export declare class UpgradeDetector {
|
|
75
|
+
private config;
|
|
76
|
+
private projectRoot;
|
|
77
|
+
private suggestionIdCounter;
|
|
78
|
+
constructor(projectRoot: string, config?: Partial<DetectorConfig>);
|
|
79
|
+
/**
|
|
80
|
+
* 执行完整检测
|
|
81
|
+
*/
|
|
82
|
+
detect(): Promise<DetectionResult>;
|
|
83
|
+
/**
|
|
84
|
+
* 检测项目类型
|
|
85
|
+
*/
|
|
86
|
+
private detectProjectType;
|
|
87
|
+
/**
|
|
88
|
+
* 获取项目名称
|
|
89
|
+
*/
|
|
90
|
+
private getProjectName;
|
|
91
|
+
/**
|
|
92
|
+
* 检测代码缺陷
|
|
93
|
+
*/
|
|
94
|
+
private detectBugs;
|
|
95
|
+
/**
|
|
96
|
+
* 检测代码质量问题
|
|
97
|
+
*/
|
|
98
|
+
private detectQualityIssues;
|
|
99
|
+
/**
|
|
100
|
+
* 检测缺失能力
|
|
101
|
+
*/
|
|
102
|
+
private detectMissingCapabilities;
|
|
103
|
+
/**
|
|
104
|
+
* 检测用户体验问题
|
|
105
|
+
*/
|
|
106
|
+
private detectUXIssues;
|
|
107
|
+
/**
|
|
108
|
+
* 检测代码风格问题
|
|
109
|
+
*/
|
|
110
|
+
private detectStyleIssues;
|
|
111
|
+
/**
|
|
112
|
+
* 检测安全问题
|
|
113
|
+
*/
|
|
114
|
+
private detectSecurityIssues;
|
|
115
|
+
/**
|
|
116
|
+
* 检测常见问题
|
|
117
|
+
*/
|
|
118
|
+
private detectCommonIssues;
|
|
119
|
+
/**
|
|
120
|
+
* 检测 Prompt 问题 (AI 项目)
|
|
121
|
+
*/
|
|
122
|
+
private detectPromptIssues;
|
|
123
|
+
/**
|
|
124
|
+
* 检测 Skill 问题 (AI 项目)
|
|
125
|
+
*/
|
|
126
|
+
private detectSkillIssues;
|
|
127
|
+
/**
|
|
128
|
+
* 检测 Agent 配置问题 (AI 项目)
|
|
129
|
+
*/
|
|
130
|
+
private detectAgentConfigIssues;
|
|
131
|
+
/**
|
|
132
|
+
* 扫描文件
|
|
133
|
+
*/
|
|
134
|
+
private scanFiles;
|
|
135
|
+
/**
|
|
136
|
+
* 创建建议
|
|
137
|
+
*/
|
|
138
|
+
private createSuggestion;
|
|
139
|
+
/**
|
|
140
|
+
* 获取相对路径
|
|
141
|
+
*/
|
|
142
|
+
private getRelativePath;
|
|
143
|
+
/**
|
|
144
|
+
* 应用用户提示过滤
|
|
145
|
+
*/
|
|
146
|
+
private applyUserHint;
|
|
147
|
+
/**
|
|
148
|
+
* 计算建议与提示的相关性
|
|
149
|
+
*/
|
|
150
|
+
private calculateRelevance;
|
|
151
|
+
/**
|
|
152
|
+
* 按优先级排序
|
|
153
|
+
*/
|
|
154
|
+
private sortByPriority;
|
|
155
|
+
/**
|
|
156
|
+
* 生成摘要
|
|
157
|
+
*/
|
|
158
|
+
private generateSummary;
|
|
159
|
+
}
|