roadmap-skill 0.2.7 → 0.2.9
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 -5
- package/README.zh.md +23 -5
- package/dist/index.js +168 -65
- package/dist/index.js.map +1 -1
- package/dist/web/app/assets/main-CuvRBjau.js +9 -0
- package/dist/web/app/index.html +1 -1
- package/dist/web/server.js +13 -4
- package/dist/web/server.js.map +1 -1
- package/package.json +7 -2
- package/dist/web/app/assets/main-BJPGJG4y.js +0 -9
package/README.md
CHANGED
|
@@ -41,10 +41,7 @@
|
|
|
41
41
|
## Quick Start (Zero Config)
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
#
|
|
45
|
-
npx roadmap-skill-web
|
|
46
|
-
|
|
47
|
-
# Option 2: Integrate with your AI assistant (MCP config below)
|
|
44
|
+
# Integrate with your AI assistant (MCP config below)
|
|
48
45
|
```
|
|
49
46
|
|
|
50
47
|
<details>
|
|
@@ -246,6 +243,31 @@ Follow Windsurf MCP documentation and use:
|
|
|
246
243
|
|
|
247
244
|
</details>
|
|
248
245
|
|
|
246
|
+
<details>
|
|
247
|
+
<summary><b>Codex CLI / Codex IDE</b></summary>
|
|
248
|
+
|
|
249
|
+
**One-liner (recommended):**
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
codex mcp add roadmap -- npx -y roadmap-skill
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Manual config** — edit `~/.codex/config.toml`:
|
|
256
|
+
|
|
257
|
+
```toml
|
|
258
|
+
[mcp_servers.roadmap]
|
|
259
|
+
command = "npx"
|
|
260
|
+
args = ["-y", "roadmap-skill"]
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
> **Windows**: No `cmd /c` wrapper needed — Codex handles the subprocess directly.
|
|
264
|
+
|
|
265
|
+
> **Server name**: Must match `^[a-zA-Z0-9_-]+$`. Names with spaces or parentheses are rejected.
|
|
266
|
+
|
|
267
|
+
> **Note**: Both Codex CLI and the Codex VSCode extension share the same `~/.codex/config.toml`. A syntax error breaks both.
|
|
268
|
+
|
|
269
|
+
</details>
|
|
270
|
+
|
|
249
271
|
</details>
|
|
250
272
|
|
|
251
273
|
<br>
|
|
@@ -321,7 +343,6 @@ npm install -g roadmap-skill
|
|
|
321
343
|
### Use Without Installing
|
|
322
344
|
|
|
323
345
|
```bash
|
|
324
|
-
npx roadmap-skill-web # Web Kanban only
|
|
325
346
|
npx roadmap-skill # Full MCP server
|
|
326
347
|
```
|
|
327
348
|
|
package/README.zh.md
CHANGED
|
@@ -41,10 +41,7 @@
|
|
|
41
41
|
## 零配置快速开始
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
#
|
|
45
|
-
npx roadmap-skill-web
|
|
46
|
-
|
|
47
|
-
# 方式二:集成到你的 AI 助手(MCP 配置如下)
|
|
44
|
+
# 集成到你的 AI 助手(MCP 配置如下)
|
|
48
45
|
```
|
|
49
46
|
|
|
50
47
|
<details>
|
|
@@ -244,6 +241,28 @@ Follow Windsurf MCP documentation and use:
|
|
|
244
241
|
}
|
|
245
242
|
```
|
|
246
243
|
|
|
244
|
+
</details>
|
|
245
|
+
<details>
|
|
246
|
+
<summary><b>Codex CLI / Codex IDE</b></summary>
|
|
247
|
+
|
|
248
|
+
**一键安装(推荐):**
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
codex mcp add roadmap -- npx -y roadmap-skill
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**手动配置** — 编辑 `~/.codex/config.toml`:
|
|
255
|
+
|
|
256
|
+
```toml
|
|
257
|
+
[mcp_servers.roadmap]
|
|
258
|
+
command = "npx"
|
|
259
|
+
args = ["-y", "roadmap-skill"]
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
> **Windows**:无需 `cmd /c` 包装 — Codex 会直接管理子进程。
|
|
263
|
+
> **服务器名称**:必须匹配 `^[a-zA-Z0-9_-]+$`,含空格或括号的名称会被拒绝。
|
|
264
|
+
> **注意**:Codex CLI 和 Codex VSCode 扩展共享同一个 `~/.codex/config.toml`,语法错误会同时影响两者。
|
|
265
|
+
|
|
247
266
|
</details>
|
|
248
267
|
|
|
249
268
|
</details>
|
|
@@ -321,7 +340,6 @@ npm install -g roadmap-skill
|
|
|
321
340
|
### 免安装使用
|
|
322
341
|
|
|
323
342
|
```bash
|
|
324
|
-
npx roadmap-skill-web # 仅启动 Web 看板
|
|
325
343
|
npx roadmap-skill # 完整 MCP 服务器
|
|
326
344
|
```
|
|
327
345
|
|
package/dist/index.js
CHANGED
|
@@ -276,7 +276,7 @@ var ProjectStorage = class {
|
|
|
276
276
|
if (filters.searchText && !task.title.toLowerCase().includes(filters.searchText.toLowerCase()) && !task.description.toLowerCase().includes(filters.searchText.toLowerCase())) {
|
|
277
277
|
continue;
|
|
278
278
|
}
|
|
279
|
-
if (filters.includeCompleted
|
|
279
|
+
if (filters.includeCompleted !== true && task.status === "done") {
|
|
280
280
|
continue;
|
|
281
281
|
}
|
|
282
282
|
results.push({ task, project: data.project });
|
|
@@ -345,15 +345,37 @@ var storage = new ProjectStorage();
|
|
|
345
345
|
// src/tools/project-tools.ts
|
|
346
346
|
var ProjectTypeEnum = z.enum(["roadmap", "skill-tree", "kanban"]);
|
|
347
347
|
var ProjectStatusEnum = z.enum(["active", "completed", "archived"]);
|
|
348
|
+
function toProjectSummary(project, taskCount) {
|
|
349
|
+
return {
|
|
350
|
+
id: project.id,
|
|
351
|
+
name: project.name,
|
|
352
|
+
projectType: project.projectType,
|
|
353
|
+
status: project.status,
|
|
354
|
+
targetDate: project.targetDate,
|
|
355
|
+
taskCount
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function toTaskSummary(task) {
|
|
359
|
+
return {
|
|
360
|
+
id: task.id,
|
|
361
|
+
title: task.title,
|
|
362
|
+
status: task.status,
|
|
363
|
+
priority: task.priority,
|
|
364
|
+
dueDate: task.dueDate,
|
|
365
|
+
assignee: task.assignee,
|
|
366
|
+
tags: task.tags
|
|
367
|
+
};
|
|
368
|
+
}
|
|
348
369
|
var createProjectTool = {
|
|
349
370
|
name: "create_project",
|
|
350
|
-
description: "Create a new project roadmap",
|
|
371
|
+
description: "Create a new project roadmap. Returns summary by default; set verbose=true for full data.",
|
|
351
372
|
inputSchema: z.object({
|
|
352
373
|
name: z.string().min(1, "Project name is required"),
|
|
353
374
|
description: z.string(),
|
|
354
375
|
projectType: ProjectTypeEnum,
|
|
355
376
|
startDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be in YYYY-MM-DD format"),
|
|
356
|
-
targetDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be in YYYY-MM-DD format")
|
|
377
|
+
targetDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be in YYYY-MM-DD format"),
|
|
378
|
+
verbose: z.boolean().optional()
|
|
357
379
|
}),
|
|
358
380
|
async execute(input) {
|
|
359
381
|
try {
|
|
@@ -367,7 +389,7 @@ var createProjectTool = {
|
|
|
367
389
|
const projectData = await storage.createProject(projectInput);
|
|
368
390
|
return {
|
|
369
391
|
success: true,
|
|
370
|
-
data: projectData
|
|
392
|
+
data: input.verbose ? projectData : toProjectSummary(projectData.project, 0)
|
|
371
393
|
};
|
|
372
394
|
} catch (error) {
|
|
373
395
|
return {
|
|
@@ -379,14 +401,16 @@ var createProjectTool = {
|
|
|
379
401
|
};
|
|
380
402
|
var listProjectsTool = {
|
|
381
403
|
name: "list_projects",
|
|
382
|
-
description: "List all projects
|
|
383
|
-
inputSchema: z.object({
|
|
384
|
-
|
|
404
|
+
description: "List all projects. Returns summaries by default; set verbose=true for full project data.",
|
|
405
|
+
inputSchema: z.object({
|
|
406
|
+
verbose: z.boolean().optional()
|
|
407
|
+
}),
|
|
408
|
+
async execute(input) {
|
|
385
409
|
try {
|
|
386
410
|
const projects = await storage.listProjects();
|
|
387
411
|
return {
|
|
388
412
|
success: true,
|
|
389
|
-
data: projects
|
|
413
|
+
data: input.verbose ? projects : projects.map((p) => toProjectSummary(p.project, p.taskCount))
|
|
390
414
|
};
|
|
391
415
|
} catch (error) {
|
|
392
416
|
return {
|
|
@@ -398,9 +422,10 @@ var listProjectsTool = {
|
|
|
398
422
|
};
|
|
399
423
|
var getProjectTool = {
|
|
400
424
|
name: "get_project",
|
|
401
|
-
description: "Get a project by ID with all its data (tasks, tags, milestones)",
|
|
425
|
+
description: "Get a project by ID with all its data (tasks, tags, milestones). Tasks are returned as summaries by default; set verbose=true for full task data.",
|
|
402
426
|
inputSchema: z.object({
|
|
403
|
-
projectId: z.string().min(1, "Project ID is required")
|
|
427
|
+
projectId: z.string().min(1, "Project ID is required"),
|
|
428
|
+
verbose: z.boolean().optional()
|
|
404
429
|
}),
|
|
405
430
|
async execute(input) {
|
|
406
431
|
try {
|
|
@@ -413,7 +438,10 @@ var getProjectTool = {
|
|
|
413
438
|
}
|
|
414
439
|
return {
|
|
415
440
|
success: true,
|
|
416
|
-
data: projectData
|
|
441
|
+
data: input.verbose ? projectData : {
|
|
442
|
+
...projectData,
|
|
443
|
+
tasks: projectData.tasks.map(toTaskSummary)
|
|
444
|
+
}
|
|
417
445
|
};
|
|
418
446
|
} catch (error) {
|
|
419
447
|
return {
|
|
@@ -425,7 +453,7 @@ var getProjectTool = {
|
|
|
425
453
|
};
|
|
426
454
|
var updateProjectTool = {
|
|
427
455
|
name: "update_project",
|
|
428
|
-
description: "Update an existing project",
|
|
456
|
+
description: "Update an existing project. Returns summary by default; set verbose=true for full data.",
|
|
429
457
|
inputSchema: z.object({
|
|
430
458
|
projectId: z.string().min(1, "Project ID is required"),
|
|
431
459
|
name: z.string().min(1).optional(),
|
|
@@ -433,11 +461,12 @@ var updateProjectTool = {
|
|
|
433
461
|
projectType: ProjectTypeEnum.optional(),
|
|
434
462
|
status: ProjectStatusEnum.optional(),
|
|
435
463
|
startDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
436
|
-
targetDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
|
|
464
|
+
targetDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
465
|
+
verbose: z.boolean().optional()
|
|
437
466
|
}),
|
|
438
467
|
async execute(input) {
|
|
439
468
|
try {
|
|
440
|
-
const { projectId, ...updateData } = input;
|
|
469
|
+
const { projectId, verbose, ...updateData } = input;
|
|
441
470
|
if (Object.keys(updateData).length === 0) {
|
|
442
471
|
return {
|
|
443
472
|
success: false,
|
|
@@ -454,7 +483,7 @@ var updateProjectTool = {
|
|
|
454
483
|
}
|
|
455
484
|
return {
|
|
456
485
|
success: true,
|
|
457
|
-
data: projectData
|
|
486
|
+
data: verbose ? projectData : toProjectSummary(projectData.project, projectData.tasks.length)
|
|
458
487
|
};
|
|
459
488
|
} catch (error) {
|
|
460
489
|
return {
|
|
@@ -573,9 +602,18 @@ var TagService = class {
|
|
|
573
602
|
code: "NOT_FOUND"
|
|
574
603
|
};
|
|
575
604
|
}
|
|
605
|
+
const taskTagCounts = /* @__PURE__ */ new Map();
|
|
606
|
+
for (const task of projectData.tasks) {
|
|
607
|
+
for (const tagId of task.tags) {
|
|
608
|
+
taskTagCounts.set(tagId, (taskTagCounts.get(tagId) ?? 0) + 1);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
576
611
|
return {
|
|
577
612
|
success: true,
|
|
578
|
-
data: projectData.tags
|
|
613
|
+
data: projectData.tags.map((tag) => ({
|
|
614
|
+
...tag,
|
|
615
|
+
taskCount: taskTagCounts.get(tag.id) ?? 0
|
|
616
|
+
}))
|
|
579
617
|
};
|
|
580
618
|
} catch (error) {
|
|
581
619
|
return {
|
|
@@ -1096,9 +1134,20 @@ init_esm_shims();
|
|
|
1096
1134
|
// src/tools/task-tools.ts
|
|
1097
1135
|
var TaskStatusEnum = z2.enum(["todo", "in-progress", "review", "done"]);
|
|
1098
1136
|
var TaskPriorityEnum = z2.enum(["low", "medium", "high", "critical"]);
|
|
1137
|
+
function toTaskSummary2(task) {
|
|
1138
|
+
return {
|
|
1139
|
+
id: task.id,
|
|
1140
|
+
title: task.title,
|
|
1141
|
+
status: task.status,
|
|
1142
|
+
priority: task.priority,
|
|
1143
|
+
dueDate: task.dueDate,
|
|
1144
|
+
assignee: task.assignee,
|
|
1145
|
+
tags: task.tags
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1099
1148
|
var createTaskTool = {
|
|
1100
1149
|
name: "create_task",
|
|
1101
|
-
description: "Create a new task in a project",
|
|
1150
|
+
description: "Create a new task in a project. Returns summary by default; set verbose=true for full data.",
|
|
1102
1151
|
inputSchema: z2.object({
|
|
1103
1152
|
projectId: z2.string().min(1, "Project ID is required"),
|
|
1104
1153
|
title: z2.string().min(1, "Task title is required"),
|
|
@@ -1106,7 +1155,8 @@ var createTaskTool = {
|
|
|
1106
1155
|
priority: TaskPriorityEnum.default("medium"),
|
|
1107
1156
|
tags: z2.array(z2.string()).default([]),
|
|
1108
1157
|
dueDate: z2.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
1109
|
-
assignee: z2.string().optional()
|
|
1158
|
+
assignee: z2.string().optional(),
|
|
1159
|
+
verbose: z2.boolean().optional()
|
|
1110
1160
|
}),
|
|
1111
1161
|
async execute(input) {
|
|
1112
1162
|
const result = await TaskService.create(input.projectId, {
|
|
@@ -1117,12 +1167,16 @@ var createTaskTool = {
|
|
|
1117
1167
|
dueDate: input.dueDate,
|
|
1118
1168
|
assignee: input.assignee
|
|
1119
1169
|
});
|
|
1120
|
-
return result;
|
|
1170
|
+
if (!result.success) return result;
|
|
1171
|
+
return {
|
|
1172
|
+
success: true,
|
|
1173
|
+
data: input.verbose ? result.data : toTaskSummary2(result.data)
|
|
1174
|
+
};
|
|
1121
1175
|
}
|
|
1122
1176
|
};
|
|
1123
1177
|
var listTasksTool = {
|
|
1124
1178
|
name: "list_tasks",
|
|
1125
|
-
description: "List tasks with optional filters",
|
|
1179
|
+
description: "List tasks with optional filters. By default, completed (done) tasks are excluded. Set includeCompleted=true to include them. Returns summaries by default; set verbose=true for full task data.",
|
|
1126
1180
|
inputSchema: z2.object({
|
|
1127
1181
|
projectId: z2.string().optional(),
|
|
1128
1182
|
status: TaskStatusEnum.optional(),
|
|
@@ -1131,7 +1185,8 @@ var listTasksTool = {
|
|
|
1131
1185
|
assignee: z2.string().optional(),
|
|
1132
1186
|
dueBefore: z2.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
1133
1187
|
dueAfter: z2.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
|
|
1134
|
-
includeCompleted: z2.boolean().optional()
|
|
1188
|
+
includeCompleted: z2.boolean().optional(),
|
|
1189
|
+
verbose: z2.boolean().optional()
|
|
1135
1190
|
}),
|
|
1136
1191
|
async execute(input) {
|
|
1137
1192
|
try {
|
|
@@ -1145,9 +1200,10 @@ var listTasksTool = {
|
|
|
1145
1200
|
dueAfter: input.dueAfter,
|
|
1146
1201
|
includeCompleted: input.includeCompleted
|
|
1147
1202
|
});
|
|
1203
|
+
const tasks = results.map((r) => r.task);
|
|
1148
1204
|
return {
|
|
1149
1205
|
success: true,
|
|
1150
|
-
data:
|
|
1206
|
+
data: input.verbose ? tasks : tasks.map(toTaskSummary2)
|
|
1151
1207
|
};
|
|
1152
1208
|
} catch (error) {
|
|
1153
1209
|
return {
|
|
@@ -1171,7 +1227,7 @@ var getTaskTool = {
|
|
|
1171
1227
|
};
|
|
1172
1228
|
var updateTaskTool = {
|
|
1173
1229
|
name: "update_task",
|
|
1174
|
-
description: "Update an existing task",
|
|
1230
|
+
description: "Update an existing task. Returns summary by default; set verbose=true for full data.",
|
|
1175
1231
|
inputSchema: z2.object({
|
|
1176
1232
|
projectId: z2.string().min(1, "Project ID is required"),
|
|
1177
1233
|
taskId: z2.string().min(1, "Task ID is required"),
|
|
@@ -1181,12 +1237,17 @@ var updateTaskTool = {
|
|
|
1181
1237
|
priority: TaskPriorityEnum.optional(),
|
|
1182
1238
|
tags: z2.array(z2.string()).optional(),
|
|
1183
1239
|
dueDate: z2.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().nullable(),
|
|
1184
|
-
assignee: z2.string().optional().nullable()
|
|
1240
|
+
assignee: z2.string().optional().nullable(),
|
|
1241
|
+
verbose: z2.boolean().optional()
|
|
1185
1242
|
}),
|
|
1186
1243
|
async execute(input) {
|
|
1187
|
-
const { projectId, taskId, ...updateData } = input;
|
|
1244
|
+
const { projectId, taskId, verbose, ...updateData } = input;
|
|
1188
1245
|
const result = await TaskService.update(projectId, taskId, updateData);
|
|
1189
|
-
return result;
|
|
1246
|
+
if (!result.success) return result;
|
|
1247
|
+
return {
|
|
1248
|
+
success: true,
|
|
1249
|
+
data: verbose ? result.data : toTaskSummary2(result.data)
|
|
1250
|
+
};
|
|
1190
1251
|
}
|
|
1191
1252
|
};
|
|
1192
1253
|
var deleteTaskTool = {
|
|
@@ -1209,22 +1270,31 @@ var deleteTaskTool = {
|
|
|
1209
1270
|
};
|
|
1210
1271
|
var batchUpdateTasksTool = {
|
|
1211
1272
|
name: "batch_update_tasks",
|
|
1212
|
-
description: "Update multiple tasks at once",
|
|
1273
|
+
description: "Update multiple tasks at once. Returns summaries by default; set verbose=true for full task data.",
|
|
1213
1274
|
inputSchema: z2.object({
|
|
1214
1275
|
projectId: z2.string().min(1, "Project ID is required"),
|
|
1215
1276
|
taskIds: z2.array(z2.string()).min(1, "At least one task ID is required"),
|
|
1216
1277
|
status: TaskStatusEnum.optional(),
|
|
1217
1278
|
priority: TaskPriorityEnum.optional(),
|
|
1218
1279
|
tags: z2.array(z2.string()).optional(),
|
|
1219
|
-
tagOperation: z2.enum(["add", "remove", "replace"]).default("replace")
|
|
1280
|
+
tagOperation: z2.enum(["add", "remove", "replace"]).default("replace"),
|
|
1281
|
+
verbose: z2.boolean().optional()
|
|
1220
1282
|
}),
|
|
1221
1283
|
async execute(input) {
|
|
1222
|
-
const { projectId, taskIds, tagOperation, ...restData } = input;
|
|
1284
|
+
const { projectId, taskIds, tagOperation, verbose, ...restData } = input;
|
|
1223
1285
|
const result = await TaskService.batchUpdate(projectId, taskIds, {
|
|
1224
1286
|
...restData,
|
|
1225
1287
|
tagOperation
|
|
1226
1288
|
});
|
|
1227
|
-
return result;
|
|
1289
|
+
if (!result.success) return result;
|
|
1290
|
+
return {
|
|
1291
|
+
success: true,
|
|
1292
|
+
data: {
|
|
1293
|
+
updatedTasks: verbose ? result.data.updatedTasks : result.data.updatedTasks.map(toTaskSummary2),
|
|
1294
|
+
updatedCount: result.data.updatedCount,
|
|
1295
|
+
notFoundIds: result.data.notFoundIds
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1228
1298
|
}
|
|
1229
1299
|
};
|
|
1230
1300
|
|
|
@@ -1341,7 +1411,7 @@ function resolveAppPath() {
|
|
|
1341
1411
|
for (const { path: candidatePath, source } of candidates) {
|
|
1342
1412
|
const indexPath = path4.join(candidatePath, "index.html");
|
|
1343
1413
|
if (existsSync(indexPath)) {
|
|
1344
|
-
console.
|
|
1414
|
+
console.error(`[roadmap-skill] Static files found at: ${candidatePath} (via ${source})`);
|
|
1345
1415
|
return candidatePath;
|
|
1346
1416
|
}
|
|
1347
1417
|
}
|
|
@@ -1549,7 +1619,7 @@ function createServer(port = 7860) {
|
|
|
1549
1619
|
});
|
|
1550
1620
|
const server = app.listen(port, "127.0.0.1");
|
|
1551
1621
|
server.once("listening", () => {
|
|
1552
|
-
console.
|
|
1622
|
+
console.error(`Web interface server running at http://localhost:${port}`);
|
|
1553
1623
|
resolve(server);
|
|
1554
1624
|
});
|
|
1555
1625
|
server.once("error", (error) => {
|
|
@@ -2076,12 +2146,12 @@ init_esm_shims();
|
|
|
2076
2146
|
init_esm_shims();
|
|
2077
2147
|
var projectPrompts = [
|
|
2078
2148
|
{
|
|
2079
|
-
name: "
|
|
2149
|
+
name: "suggest-tasks",
|
|
2080
2150
|
description: "Intelligently recommend the next priority tasks based on urgency, due dates, and project status",
|
|
2081
2151
|
arguments: [
|
|
2082
2152
|
{
|
|
2083
2153
|
name: "projectId",
|
|
2084
|
-
description: "Specific project ID (optional; if not provided, analyze all projects)",
|
|
2154
|
+
description: "Specific project ID (optional; if not provided, auto-detect from current context or analyze all projects)",
|
|
2085
2155
|
required: false
|
|
2086
2156
|
},
|
|
2087
2157
|
{
|
|
@@ -2092,18 +2162,18 @@ var projectPrompts = [
|
|
|
2092
2162
|
]
|
|
2093
2163
|
},
|
|
2094
2164
|
{
|
|
2095
|
-
name: "
|
|
2165
|
+
name: "auto-prioritize",
|
|
2096
2166
|
description: "Automatically analyze tasks and intelligently adjust priorities, considering due dates, dependencies, and project importance",
|
|
2097
2167
|
arguments: [
|
|
2098
2168
|
{
|
|
2099
2169
|
name: "projectId",
|
|
2100
|
-
description: "Specific project ID (optional; if not provided, analyze all projects)",
|
|
2170
|
+
description: "Specific project ID (optional; if not provided, auto-detect from current context or analyze all projects)",
|
|
2101
2171
|
required: false
|
|
2102
2172
|
}
|
|
2103
2173
|
]
|
|
2104
2174
|
},
|
|
2105
2175
|
{
|
|
2106
|
-
name: "
|
|
2176
|
+
name: "add-task-details",
|
|
2107
2177
|
description: "Intelligently enhance task details, including description, acceptance criteria, subtasks, and required resources",
|
|
2108
2178
|
arguments: [
|
|
2109
2179
|
{
|
|
@@ -2114,7 +2184,7 @@ var projectPrompts = [
|
|
|
2114
2184
|
]
|
|
2115
2185
|
},
|
|
2116
2186
|
{
|
|
2117
|
-
name: "
|
|
2187
|
+
name: "quick-capture",
|
|
2118
2188
|
description: "Quickly capture ideas/tasks, auto-categorize and suggest priorities",
|
|
2119
2189
|
arguments: [
|
|
2120
2190
|
{
|
|
@@ -2124,14 +2194,25 @@ var projectPrompts = [
|
|
|
2124
2194
|
},
|
|
2125
2195
|
{
|
|
2126
2196
|
name: "projectId",
|
|
2127
|
-
description: "Target project ID (optional)",
|
|
2197
|
+
description: "Target project ID (optional; if not provided, auto-detect from current context)",
|
|
2198
|
+
required: false
|
|
2199
|
+
}
|
|
2200
|
+
]
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
name: "open-web-ui",
|
|
2204
|
+
description: "Open the web visualization interface for the roadmap skill",
|
|
2205
|
+
arguments: [
|
|
2206
|
+
{
|
|
2207
|
+
name: "port",
|
|
2208
|
+
description: "Port to run the web interface on (optional, default: 7860)",
|
|
2128
2209
|
required: false
|
|
2129
2210
|
}
|
|
2130
2211
|
]
|
|
2131
2212
|
}
|
|
2132
2213
|
];
|
|
2133
2214
|
function getRecommendNextTasksPrompt(projectId, limit) {
|
|
2134
|
-
const
|
|
2215
|
+
const projectHint = projectId ? `User specified project: ${projectId}. Use this project if it exists, or inform user if not found.` : "User did not specify a project. Based on the current working directory and conversation context, try to identify the most relevant project. If a clear match exists, focus on that project; otherwise, analyze all active projects";
|
|
2135
2216
|
const taskLimit = limit ? parseInt(limit, 10) : 3;
|
|
2136
2217
|
return {
|
|
2137
2218
|
description: "Intelligent Task Recommendation Assistant",
|
|
@@ -2140,7 +2221,7 @@ function getRecommendNextTasksPrompt(projectId, limit) {
|
|
|
2140
2221
|
role: "user",
|
|
2141
2222
|
content: {
|
|
2142
2223
|
type: "text",
|
|
2143
|
-
text: `${
|
|
2224
|
+
text: `${projectHint}, please recommend the ${taskLimit} tasks I should prioritize next.
|
|
2144
2225
|
|
|
2145
2226
|
## Recommendation Logic (sorted by priority):
|
|
2146
2227
|
|
|
@@ -2200,7 +2281,7 @@ Keep task status synchronized with actual progress!`
|
|
|
2200
2281
|
};
|
|
2201
2282
|
}
|
|
2202
2283
|
function getAutoPrioritizePrompt(projectId) {
|
|
2203
|
-
const
|
|
2284
|
+
const projectHint = projectId ? `User specified project: ${projectId}. Use this project if it exists, or inform user if not found.` : "User did not specify a project. Based on the current working directory and conversation context, try to identify the most relevant project. If a clear match exists, focus on that project; otherwise, analyze all active projects";
|
|
2204
2285
|
return {
|
|
2205
2286
|
description: "Intelligent Priority Optimization Assistant",
|
|
2206
2287
|
messages: [
|
|
@@ -2208,7 +2289,7 @@ function getAutoPrioritizePrompt(projectId) {
|
|
|
2208
2289
|
role: "user",
|
|
2209
2290
|
content: {
|
|
2210
2291
|
type: "text",
|
|
2211
|
-
text: `${
|
|
2292
|
+
text: `${projectHint}, please automatically analyze and adjust priorities.
|
|
2212
2293
|
|
|
2213
2294
|
## Priority Adjustment Rules:
|
|
2214
2295
|
|
|
@@ -2242,7 +2323,7 @@ function getAutoPrioritizePrompt(projectId) {
|
|
|
2242
2323
|
- Identify task dependency relationships
|
|
2243
2324
|
- Evaluate overall project health
|
|
2244
2325
|
3. **Generate adjustment suggestions**: List tasks needing priority changes with reasons
|
|
2245
|
-
4. **Batch update**: Use batch_update_tasks to execute priority adjustments
|
|
2326
|
+
4. **Batch update**: Use batch_update_tasks to execute priority adjustments immediately \u2014 no confirmation needed
|
|
2246
2327
|
|
|
2247
2328
|
## Output Format:
|
|
2248
2329
|
|
|
@@ -2264,7 +2345,7 @@ function getAutoPrioritizePrompt(projectId) {
|
|
|
2264
2345
|
### Keep Unchanged (Priorities are reasonable)
|
|
2265
2346
|
- List tasks with reasonable priority settings
|
|
2266
2347
|
|
|
2267
|
-
Please provide analysis results
|
|
2348
|
+
Please provide analysis results and immediately execute batch_update_tasks to apply the priority adjustments \u2014 no confirmation needed.`
|
|
2268
2349
|
}
|
|
2269
2350
|
}
|
|
2270
2351
|
]
|
|
@@ -2319,7 +2400,7 @@ If the task is complex, suggest breaking it down:
|
|
|
2319
2400
|
- If design task: Add design specs, review criteria
|
|
2320
2401
|
- If documentation task: Add doc structure, references
|
|
2321
2402
|
- If testing task: Add test scenarios, coverage scope
|
|
2322
|
-
4. **
|
|
2403
|
+
4. **Apply enhancement**: Use update_task to update task description immediately \u2014 no confirmation needed
|
|
2323
2404
|
|
|
2324
2405
|
## Updated task should include:
|
|
2325
2406
|
|
|
@@ -2342,14 +2423,14 @@ If the task is complex, suggest breaking it down:
|
|
|
2342
2423
|
- References: [link]
|
|
2343
2424
|
\`\`\`
|
|
2344
2425
|
|
|
2345
|
-
Please fetch task info
|
|
2426
|
+
Please fetch task info and immediately use update_task to apply the enhanced details \u2014 no confirmation needed.`
|
|
2346
2427
|
}
|
|
2347
2428
|
}
|
|
2348
2429
|
]
|
|
2349
2430
|
};
|
|
2350
2431
|
}
|
|
2351
2432
|
function getQuickCapturePrompt(idea, projectId) {
|
|
2352
|
-
const projectContext = projectId ? `
|
|
2433
|
+
const projectContext = projectId ? `User specified project: ${projectId}. Use this project if it exists, or inform user if not found.` : "User did not specify a project. Based on the current working directory and conversation context, try to identify the most relevant project. If a clear match exists, use that project; otherwise, analyze all active projects and select the best match";
|
|
2353
2434
|
return {
|
|
2354
2435
|
description: "Quick Capture Assistant",
|
|
2355
2436
|
messages: [
|
|
@@ -2361,7 +2442,7 @@ function getQuickCapturePrompt(idea, projectId) {
|
|
|
2361
2442
|
|
|
2362
2443
|
${projectContext}
|
|
2363
2444
|
|
|
2364
|
-
## Please
|
|
2445
|
+
## Please complete the following steps immediately:
|
|
2365
2446
|
|
|
2366
2447
|
### 1. Task Information Extraction
|
|
2367
2448
|
Extract from description:
|
|
@@ -2370,11 +2451,10 @@ Extract from description:
|
|
|
2370
2451
|
- **Task Type**: bug / feature / refactor / docs / chore
|
|
2371
2452
|
- **Estimated Priority**: critical / high / medium / low (based on urgency in description)
|
|
2372
2453
|
|
|
2373
|
-
### 2. Project
|
|
2374
|
-
If user didn't specify a project, please:
|
|
2454
|
+
### 2. Project Selection (if no project specified)
|
|
2375
2455
|
- List all active projects
|
|
2376
2456
|
- Analyze which project the task content is most relevant to
|
|
2377
|
-
-
|
|
2457
|
+
- Select the most suitable project automatically
|
|
2378
2458
|
|
|
2379
2459
|
### 3. Tag Suggestions
|
|
2380
2460
|
Suggest relevant tags:
|
|
@@ -2382,11 +2462,11 @@ Suggest relevant tags:
|
|
|
2382
2462
|
- Priority tags: urgent, important
|
|
2383
2463
|
- Domain tags: frontend, backend, design, testing (if applicable)
|
|
2384
2464
|
|
|
2385
|
-
### 4.
|
|
2386
|
-
Use create_task to create the task
|
|
2465
|
+
### 4. Create Task
|
|
2466
|
+
Use create_task to create the task immediately \u2014 no confirmation needed.
|
|
2387
2467
|
|
|
2388
|
-
### 5. Status
|
|
2389
|
-
After creating
|
|
2468
|
+
### 5. Status
|
|
2469
|
+
After creating, if work starts immediately, use update_task to set status to in-progress.
|
|
2390
2470
|
|
|
2391
2471
|
## Example:
|
|
2392
2472
|
|
|
@@ -2400,11 +2480,26 @@ After creating the task, if you start working on it immediately, consider settin
|
|
|
2400
2480
|
- Suggested Tags: bug, frontend, mobile
|
|
2401
2481
|
- Recommended Project: [Recommend if there's a web project]
|
|
2402
2482
|
|
|
2403
|
-
## Current Idea
|
|
2483
|
+
## Current Idea:
|
|
2404
2484
|
|
|
2405
2485
|
Idea: "${idea}"
|
|
2406
2486
|
|
|
2407
|
-
|
|
2487
|
+
Analyze the idea, select the best matching project, and immediately execute create_task \u2014 no confirmation needed.`
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
]
|
|
2491
|
+
};
|
|
2492
|
+
}
|
|
2493
|
+
function getOpenWebUIPrompt(port) {
|
|
2494
|
+
const portNum = port ? parseInt(port, 10) : 7860;
|
|
2495
|
+
return {
|
|
2496
|
+
description: "Open Web Visualization Interface",
|
|
2497
|
+
messages: [
|
|
2498
|
+
{
|
|
2499
|
+
role: "user",
|
|
2500
|
+
content: {
|
|
2501
|
+
type: "text",
|
|
2502
|
+
text: `Please open the roadmap-skill web interface by calling the open_web_interface tool with port ${portNum}. Do it immediately without asking for confirmation.`
|
|
2408
2503
|
}
|
|
2409
2504
|
}
|
|
2410
2505
|
]
|
|
@@ -2412,14 +2507,16 @@ Please analyze and generate task suggestions. After user confirmation, execute c
|
|
|
2412
2507
|
}
|
|
2413
2508
|
function getPromptByName(name, args) {
|
|
2414
2509
|
switch (name) {
|
|
2415
|
-
case "
|
|
2510
|
+
case "suggest-tasks":
|
|
2416
2511
|
return getRecommendNextTasksPrompt(args?.projectId, args?.limit);
|
|
2417
|
-
case "
|
|
2512
|
+
case "auto-prioritize":
|
|
2418
2513
|
return getAutoPrioritizePrompt(args?.projectId);
|
|
2419
|
-
case "
|
|
2514
|
+
case "add-task-details":
|
|
2420
2515
|
return getEnhanceTaskDetailsPrompt(args?.taskId || "");
|
|
2421
|
-
case "
|
|
2516
|
+
case "quick-capture":
|
|
2422
2517
|
return getQuickCapturePrompt(args?.idea || "", args?.projectId);
|
|
2518
|
+
case "open-web-ui":
|
|
2519
|
+
return getOpenWebUIPrompt(args?.port);
|
|
2423
2520
|
default:
|
|
2424
2521
|
return null;
|
|
2425
2522
|
}
|
|
@@ -2510,7 +2607,15 @@ function createServer2() {
|
|
|
2510
2607
|
};
|
|
2511
2608
|
} catch (error) {
|
|
2512
2609
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
2513
|
-
|
|
2610
|
+
return {
|
|
2611
|
+
content: [
|
|
2612
|
+
{
|
|
2613
|
+
type: "text",
|
|
2614
|
+
text: `Tool execution failed: ${errorMessage}`
|
|
2615
|
+
}
|
|
2616
|
+
],
|
|
2617
|
+
isError: true
|
|
2618
|
+
};
|
|
2514
2619
|
}
|
|
2515
2620
|
}
|
|
2516
2621
|
);
|
|
@@ -2582,11 +2687,9 @@ async function main() {
|
|
|
2582
2687
|
});
|
|
2583
2688
|
process.on("uncaughtException", (error) => {
|
|
2584
2689
|
console.error("Uncaught exception:", error);
|
|
2585
|
-
process.exit(1);
|
|
2586
2690
|
});
|
|
2587
2691
|
process.on("unhandledRejection", (reason) => {
|
|
2588
2692
|
console.error("Unhandled rejection:", reason);
|
|
2589
|
-
process.exit(1);
|
|
2590
2693
|
});
|
|
2591
2694
|
try {
|
|
2592
2695
|
await startServer();
|