ai-engineering-init 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
|
|
14
|
+
// 项目根目录:__dirname 是 .cursor/hooks/,向上两级
|
|
15
|
+
const PROJECT_ROOT = path.resolve(__dirname, '..', '..');
|
|
12
16
|
|
|
13
17
|
// 从 stdin 读取用户输入
|
|
14
18
|
let inputData = '';
|
|
@@ -158,6 +162,12 @@ const skillMap = [
|
|
|
158
162
|
name: 'leniu-mealtime',
|
|
159
163
|
keywords: ['餐次', '早餐', '午餐', '下午茶', '晚餐', '夜宵', 'mealtimeTypes']
|
|
160
164
|
},
|
|
165
|
+
{
|
|
166
|
+
name: 'leniu-customization-location',
|
|
167
|
+
keywords: ['定制开发', '定制代码位置', 'Dz前缀', 'leniu-yunshitang', 'dz_表名', '定制仓库',
|
|
168
|
+
'覆盖Service', '@Primary', '迁移core文件', '定制开始', '定制结束', 'net.xnzn.yunshitang',
|
|
169
|
+
'wuhanxiehe定制', 'bootstrap-ext']
|
|
170
|
+
},
|
|
161
171
|
|
|
162
172
|
// ========== OpenSpec 工作流 ==========
|
|
163
173
|
{
|
|
@@ -313,6 +323,48 @@ const skillMap = [
|
|
|
313
323
|
{
|
|
314
324
|
name: 'store-pc',
|
|
315
325
|
keywords: ['Vuex', 'store', 'mapState', 'mapActions', '状态管理']
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: 'add-skill',
|
|
329
|
+
keywords: ['添加技能', '创建技能', '新技能', '技能开发', '写技能', 'SKILL.md', '新增skill']
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
name: 'banana-image',
|
|
333
|
+
keywords: ['生成图片', 'AI图片', '产品图', '海报', '缩略图', '4K图片', '高清图', '制作图片', '/image']
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
name: 'collaborating-with-codex',
|
|
337
|
+
keywords: ['codex协作', '委托codex', 'openai codex', 'codex分析', '多模型协作', '让codex']
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: 'collaborating-with-gemini',
|
|
341
|
+
keywords: ['gemini协作', '委托gemini', 'google gemini', 'gemini分析', '让gemini', 'gemini前端']
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
name: 'leniu-brainstorm',
|
|
345
|
+
keywords: ['leniu-头脑风暴', '云食堂方案', '云食堂设计', '云食堂功能规划', 'leniu-方案设计',
|
|
346
|
+
'云食堂怎么设计', '云食堂可行性']
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
name: 'leniu-report-customization',
|
|
350
|
+
keywords: ['定制报表', 'report_order_info', 'report_order_detail', 'report_account_flow',
|
|
351
|
+
'退款汇总', '消费金额统计', '订单报表', '流水报表', '汇总报表']
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
name: 'leniu-report-standard-customization',
|
|
355
|
+
keywords: ['标准版报表', 'core-report', 'report_refund', 'report_refund_detail',
|
|
356
|
+
'经营分析', '营业额分析', '用户活跃度', '菜品排行', '操作员统计', '账户日结',
|
|
357
|
+
'ReportOrderConsumeService', 'ReportAccountConsumeService']
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
name: 'mysql-debug',
|
|
361
|
+
keywords: ['mysql查询', '查数据库', '查表', '执行SQL', '数据库排查', '验证数据',
|
|
362
|
+
'数据库调试', 'db查询', 'mysql调试', '直接查库']
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
name: 'openspec-onboard',
|
|
366
|
+
keywords: ['openspec入门', 'opsx:onboard', 'openspec onboard', 'openspec教程',
|
|
367
|
+
'openspec新手', '学习openspec工作流']
|
|
316
368
|
}
|
|
317
369
|
];
|
|
318
370
|
|
|
@@ -335,7 +387,7 @@ if (matchedSkills.length === 0) {
|
|
|
335
387
|
}
|
|
336
388
|
|
|
337
389
|
// 构建技能文档路径列表
|
|
338
|
-
const skillPaths = matchedSkills.map(name =>
|
|
390
|
+
const skillPaths = matchedSkills.map(name => path.join(PROJECT_ROOT, '.cursor', 'skills', name, 'SKILL.md'));
|
|
339
391
|
|
|
340
392
|
const skillList = matchedSkills.map((name, i) => `- **${name}**: \`${skillPaths[i]}\``).join('\n');
|
|
341
393
|
|
package/.cursor/hooks.json
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
"beforeSubmitPrompt": [
|
|
5
5
|
{
|
|
6
6
|
"matcher": "",
|
|
7
|
-
"command": "node \"
|
|
7
|
+
"command": "node -e \"const p=require('path'),fs=require('fs');let d=process.cwd();while(!fs.existsSync(p.join(d,'.cursor/hooks/cursor-skill-eval.js'))&&d!==p.dirname(d))d=p.dirname(d);const f=p.join(d,'.cursor/hooks/cursor-skill-eval.js');if(fs.existsSync(f))require(f);\""
|
|
8
8
|
}
|
|
9
9
|
],
|
|
10
10
|
"preToolUse": [
|
|
11
11
|
{
|
|
12
12
|
"matcher": "Shell|Write|CreateFile|EditFile",
|
|
13
|
-
"command": "node \"
|
|
13
|
+
"command": "node -e \"const p=require('path'),fs=require('fs');let d=process.cwd();while(!fs.existsSync(p.join(d,'.cursor/hooks/cursor-pre-tool-use.js'))&&d!==p.dirname(d))d=p.dirname(d);const f=p.join(d,'.cursor/hooks/cursor-pre-tool-use.js');if(fs.existsSync(f))require(f);\""
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"stop": [
|
|
17
17
|
{
|
|
18
18
|
"matcher": "",
|
|
19
|
-
"command": "node \"
|
|
19
|
+
"command": "node -e \"const p=require('path'),fs=require('fs');let d=process.cwd();while(!fs.existsSync(p.join(d,'.cursor/hooks/stop.js'))&&d!==p.dirname(d))d=p.dirname(d);const f=p.join(d,'.cursor/hooks/stop.js');if(fs.existsSync(f))require(f);\""
|
|
20
20
|
}
|
|
21
21
|
]
|
|
22
22
|
}
|