roadmap-skill 0.2.0 → 0.2.3

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/dist/index.js CHANGED
@@ -276,6 +276,9 @@ 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 === false && task.status === "done") {
280
+ continue;
281
+ }
279
282
  results.push({ task, project: data.project });
280
283
  }
281
284
  } catch {
@@ -508,7 +511,8 @@ var listTasksTool = {
508
511
  tags: z2.array(z2.string()).optional(),
509
512
  assignee: z2.string().optional(),
510
513
  dueBefore: z2.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
511
- dueAfter: z2.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()
514
+ dueAfter: z2.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),
515
+ includeCompleted: z2.boolean().optional()
512
516
  }),
513
517
  async execute(input) {
514
518
  try {
@@ -519,7 +523,8 @@ var listTasksTool = {
519
523
  tags: input.tags,
520
524
  assignee: input.assignee,
521
525
  dueBefore: input.dueBefore,
522
- dueAfter: input.dueAfter
526
+ dueAfter: input.dueAfter,
527
+ includeCompleted: input.includeCompleted
523
528
  });
524
529
  return {
525
530
  success: true,
@@ -1020,170 +1025,205 @@ init_esm_shims();
1020
1025
  import express from "express";
1021
1026
  import * as path4 from "path";
1022
1027
  function createServer(port = 7860) {
1023
- const app = express();
1024
- app.use(express.json());
1025
- app.get("/api/projects", async (_req, res) => {
1026
- try {
1027
- const projects = await storage.listProjects();
1028
- res.json(projects);
1029
- } catch (error) {
1030
- res.status(500).json({ error: error.message });
1031
- }
1032
- });
1033
- app.get("/api/projects/:id", async (req, res) => {
1034
- try {
1035
- const project = await storage.readProject(req.params.id);
1036
- if (!project) {
1037
- res.status(404).json({ error: "Project not found" });
1038
- return;
1028
+ return new Promise((resolve, reject) => {
1029
+ const app = express();
1030
+ app.use(express.json());
1031
+ app.get("/api/projects", async (_req, res) => {
1032
+ try {
1033
+ const projects = await storage.listProjects();
1034
+ res.json(projects);
1035
+ } catch (error) {
1036
+ res.status(500).json({ error: error.message });
1039
1037
  }
1040
- res.json(project);
1041
- } catch (error) {
1042
- res.status(500).json({ error: error.message });
1043
- }
1044
- });
1045
- app.get("/api/tasks", async (req, res) => {
1046
- try {
1047
- const filters = req.query;
1048
- const tasks = await storage.searchTasks(filters);
1049
- res.json(tasks);
1050
- } catch (error) {
1051
- res.status(500).json({ error: error.message });
1052
- }
1053
- });
1054
- app.post("/api/projects", async (req, res) => {
1055
- try {
1056
- const project = await storage.createProject(req.body);
1057
- res.json({ success: true, data: project });
1058
- } catch (error) {
1059
- res.status(500).json({ error: error.message });
1060
- }
1061
- });
1062
- app.put("/api/projects", async (req, res) => {
1063
- try {
1064
- const { projectId, ...updateData } = req.body;
1065
- const project = await storage.updateProject(projectId, updateData);
1066
- res.json({ success: true, data: project });
1067
- } catch (error) {
1068
- res.status(500).json({ error: error.message });
1069
- }
1070
- });
1071
- app.delete("/api/projects", async (req, res) => {
1072
- try {
1073
- const { projectId } = req.query;
1074
- await storage.deleteProject(projectId);
1075
- res.json({ success: true });
1076
- } catch (error) {
1077
- res.status(500).json({ error: error.message });
1078
- }
1079
- });
1080
- app.post("/api/tasks", async (req, res) => {
1081
- try {
1082
- const { projectId, ...taskData } = req.body;
1083
- const projectData = await storage.readProject(projectId);
1084
- if (!projectData) {
1085
- res.status(404).json({ error: "Project not found" });
1086
- return;
1038
+ });
1039
+ app.get("/api/projects/:id", async (req, res) => {
1040
+ try {
1041
+ const project = await storage.readProject(req.params.id);
1042
+ if (!project) {
1043
+ res.status(404).json({ error: "Project not found" });
1044
+ return;
1045
+ }
1046
+ res.json(project);
1047
+ } catch (error) {
1048
+ res.status(500).json({ error: error.message });
1087
1049
  }
1088
- const now = (/* @__PURE__ */ new Date()).toISOString();
1089
- const task = {
1090
- id: `task_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`,
1091
- projectId,
1092
- ...taskData,
1093
- status: taskData.status || "todo",
1094
- priority: taskData.priority || "medium",
1095
- tags: taskData.tags || [],
1096
- dueDate: taskData.dueDate || null,
1097
- assignee: taskData.assignee || null,
1098
- createdAt: now,
1099
- updatedAt: now,
1100
- completedAt: null
1101
- };
1102
- projectData.tasks.push(task);
1103
- projectData.project.updatedAt = now;
1104
- const filePath = storage.getFilePath(projectId);
1105
- const { writeJsonFile: writeJsonFile2 } = await Promise.resolve().then(() => (init_file_helpers(), file_helpers_exports));
1106
- await writeJsonFile2(filePath, projectData);
1107
- res.json({ success: true, data: task });
1108
- } catch (error) {
1109
- res.status(500).json({ error: error.message });
1110
- }
1111
- });
1112
- app.put("/api/tasks", async (req, res) => {
1113
- try {
1114
- const { projectId, taskId, ...updateData } = req.body;
1115
- const projectData = await storage.readProject(projectId);
1116
- if (!projectData) {
1117
- res.status(404).json({ error: "Project not found" });
1118
- return;
1050
+ });
1051
+ app.get("/api/tasks", async (req, res) => {
1052
+ try {
1053
+ const filters = { ...req.query };
1054
+ if (filters.includeCompleted !== void 0) {
1055
+ filters.includeCompleted = filters.includeCompleted === "true";
1056
+ }
1057
+ const tasks = await storage.searchTasks(filters);
1058
+ res.json(tasks);
1059
+ } catch (error) {
1060
+ res.status(500).json({ error: error.message });
1119
1061
  }
1120
- const taskIndex = projectData.tasks.findIndex((t) => t.id === taskId);
1121
- if (taskIndex === -1) {
1122
- res.status(404).json({ error: "Task not found" });
1123
- return;
1062
+ });
1063
+ app.post("/api/projects", async (req, res) => {
1064
+ try {
1065
+ const project = await storage.createProject(req.body);
1066
+ res.json({ success: true, data: project });
1067
+ } catch (error) {
1068
+ res.status(500).json({ error: error.message });
1124
1069
  }
1125
- const now = (/* @__PURE__ */ new Date()).toISOString();
1126
- const existingTask = projectData.tasks[taskIndex];
1127
- const updatedTask = {
1128
- ...existingTask,
1129
- ...updateData,
1130
- id: existingTask.id,
1131
- projectId: existingTask.projectId,
1132
- createdAt: existingTask.createdAt,
1133
- updatedAt: now,
1134
- completedAt: updateData.status === "done" && existingTask.status !== "done" ? now : updateData.status && updateData.status !== "done" ? null : existingTask.completedAt
1135
- };
1136
- projectData.tasks[taskIndex] = updatedTask;
1137
- projectData.project.updatedAt = now;
1138
- const filePath = storage.getFilePath(projectId);
1139
- const { writeJsonFile: writeJsonFile2 } = await Promise.resolve().then(() => (init_file_helpers(), file_helpers_exports));
1140
- await writeJsonFile2(filePath, projectData);
1141
- res.json({ success: true, data: updatedTask });
1142
- } catch (error) {
1143
- res.status(500).json({ error: error.message });
1144
- }
1145
- });
1146
- app.delete("/api/tasks", async (req, res) => {
1147
- try {
1148
- const { projectId, taskId } = req.query;
1149
- const projectData = await storage.readProject(projectId);
1150
- if (!projectData) {
1151
- res.status(404).json({ error: "Project not found" });
1070
+ });
1071
+ app.put("/api/projects", async (req, res) => {
1072
+ try {
1073
+ const { projectId, ...updateData } = req.body;
1074
+ const project = await storage.updateProject(projectId, updateData);
1075
+ res.json({ success: true, data: project });
1076
+ } catch (error) {
1077
+ res.status(500).json({ error: error.message });
1078
+ }
1079
+ });
1080
+ app.delete("/api/projects", async (req, res) => {
1081
+ try {
1082
+ const { projectId } = req.query;
1083
+ await storage.deleteProject(projectId);
1084
+ res.json({ success: true });
1085
+ } catch (error) {
1086
+ res.status(500).json({ error: error.message });
1087
+ }
1088
+ });
1089
+ app.post("/api/tasks", async (req, res) => {
1090
+ try {
1091
+ const { projectId, ...taskData } = req.body;
1092
+ const projectData = await storage.readProject(projectId);
1093
+ if (!projectData) {
1094
+ res.status(404).json({ error: "Project not found" });
1095
+ return;
1096
+ }
1097
+ const now = (/* @__PURE__ */ new Date()).toISOString();
1098
+ const task = {
1099
+ id: `task_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`,
1100
+ projectId,
1101
+ ...taskData,
1102
+ status: taskData.status || "todo",
1103
+ priority: taskData.priority || "medium",
1104
+ tags: taskData.tags || [],
1105
+ dueDate: taskData.dueDate || null,
1106
+ assignee: taskData.assignee || null,
1107
+ createdAt: now,
1108
+ updatedAt: now,
1109
+ completedAt: null
1110
+ };
1111
+ projectData.tasks.push(task);
1112
+ projectData.project.updatedAt = now;
1113
+ const filePath = storage.getFilePath(projectId);
1114
+ const { writeJsonFile: writeJsonFile2 } = await Promise.resolve().then(() => (init_file_helpers(), file_helpers_exports));
1115
+ await writeJsonFile2(filePath, projectData);
1116
+ res.json({ success: true, data: task });
1117
+ } catch (error) {
1118
+ res.status(500).json({ error: error.message });
1119
+ }
1120
+ });
1121
+ app.put("/api/tasks", async (req, res) => {
1122
+ try {
1123
+ const { projectId, taskId, ...updateData } = req.body;
1124
+ const projectData = await storage.readProject(projectId);
1125
+ if (!projectData) {
1126
+ res.status(404).json({ error: "Project not found" });
1127
+ return;
1128
+ }
1129
+ const taskIndex = projectData.tasks.findIndex((t) => t.id === taskId);
1130
+ if (taskIndex === -1) {
1131
+ res.status(404).json({ error: "Task not found" });
1132
+ return;
1133
+ }
1134
+ const now = (/* @__PURE__ */ new Date()).toISOString();
1135
+ const existingTask = projectData.tasks[taskIndex];
1136
+ const updatedTask = {
1137
+ ...existingTask,
1138
+ ...updateData,
1139
+ id: existingTask.id,
1140
+ projectId: existingTask.projectId,
1141
+ createdAt: existingTask.createdAt,
1142
+ updatedAt: now,
1143
+ completedAt: updateData.status === "done" && existingTask.status !== "done" ? now : updateData.status && updateData.status !== "done" ? null : existingTask.completedAt
1144
+ };
1145
+ projectData.tasks[taskIndex] = updatedTask;
1146
+ projectData.project.updatedAt = now;
1147
+ const filePath = storage.getFilePath(projectId);
1148
+ const { writeJsonFile: writeJsonFile2 } = await Promise.resolve().then(() => (init_file_helpers(), file_helpers_exports));
1149
+ await writeJsonFile2(filePath, projectData);
1150
+ res.json({ success: true, data: updatedTask });
1151
+ } catch (error) {
1152
+ res.status(500).json({ error: error.message });
1153
+ }
1154
+ });
1155
+ app.delete("/api/tasks", async (req, res) => {
1156
+ try {
1157
+ const { projectId, taskId } = req.query;
1158
+ const projectData = await storage.readProject(projectId);
1159
+ if (!projectData) {
1160
+ res.status(404).json({ error: "Project not found" });
1161
+ return;
1162
+ }
1163
+ const taskIndex = projectData.tasks.findIndex((t) => t.id === taskId);
1164
+ if (taskIndex === -1) {
1165
+ res.status(404).json({ error: "Task not found" });
1166
+ return;
1167
+ }
1168
+ projectData.tasks.splice(taskIndex, 1);
1169
+ projectData.project.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
1170
+ const filePath = storage.getFilePath(projectId);
1171
+ const { writeJsonFile: writeJsonFile2 } = await Promise.resolve().then(() => (init_file_helpers(), file_helpers_exports));
1172
+ await writeJsonFile2(filePath, projectData);
1173
+ res.json({ success: true });
1174
+ } catch (error) {
1175
+ res.status(500).json({ error: error.message });
1176
+ }
1177
+ });
1178
+ const distPath = path4.join(process.cwd(), "dist", "web", "app");
1179
+ app.use(express.static(distPath));
1180
+ app.get("*", (req, res) => {
1181
+ if (req.path.startsWith("/api")) {
1182
+ res.status(404).json({ error: "API not found" });
1152
1183
  return;
1153
1184
  }
1154
- const taskIndex = projectData.tasks.findIndex((t) => t.id === taskId);
1155
- if (taskIndex === -1) {
1156
- res.status(404).json({ error: "Task not found" });
1185
+ res.sendFile(path4.join(distPath, "index.html"));
1186
+ });
1187
+ const server = app.listen(port, "127.0.0.1");
1188
+ server.once("listening", () => {
1189
+ console.log(`Web interface server running at http://localhost:${port}`);
1190
+ resolve(server);
1191
+ });
1192
+ server.once("error", (error) => {
1193
+ if (error.code === "EADDRINUSE") {
1194
+ reject(new Error(`Port ${port} is already in use`));
1157
1195
  return;
1158
1196
  }
1159
- projectData.tasks.splice(taskIndex, 1);
1160
- projectData.project.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
1161
- const filePath = storage.getFilePath(projectId);
1162
- const { writeJsonFile: writeJsonFile2 } = await Promise.resolve().then(() => (init_file_helpers(), file_helpers_exports));
1163
- await writeJsonFile2(filePath, projectData);
1164
- res.json({ success: true });
1165
- } catch (error) {
1166
- res.status(500).json({ error: error.message });
1167
- }
1168
- });
1169
- const distPath = path4.join(process.cwd(), "dist", "web", "app");
1170
- app.use(express.static(distPath));
1171
- app.get("*", (req, res) => {
1172
- if (req.path.startsWith("/api")) {
1173
- res.status(404).json({ error: "API not found" });
1174
- return;
1175
- }
1176
- res.sendFile(path4.join(distPath, "index.html"));
1177
- });
1178
- const server = app.listen(port, "0.0.0.0", () => {
1179
- console.log(`Web interface server running at http://0.0.0.0:${port}`);
1197
+ reject(error);
1198
+ });
1180
1199
  });
1181
- return server;
1182
1200
  }
1183
1201
 
1184
1202
  // src/tools/web-tools.ts
1185
1203
  import open from "open";
1186
1204
  var activeServer = null;
1205
+ var activePort = null;
1206
+ function getServerPort(server) {
1207
+ const address = server.address();
1208
+ if (address && typeof address === "object" && "port" in address) {
1209
+ return typeof address.port === "number" ? address.port : null;
1210
+ }
1211
+ return null;
1212
+ }
1213
+ async function closeServer(server) {
1214
+ await new Promise((resolve, reject) => {
1215
+ server.close((error) => {
1216
+ if (error) {
1217
+ reject(error);
1218
+ return;
1219
+ }
1220
+ resolve();
1221
+ });
1222
+ const forceCloseServer = server;
1223
+ forceCloseServer.closeIdleConnections?.();
1224
+ forceCloseServer.closeAllConnections?.();
1225
+ });
1226
+ }
1187
1227
  async function openBrowser(url) {
1188
1228
  try {
1189
1229
  await open(url);
@@ -1204,20 +1244,34 @@ var openWebInterfaceTool = {
1204
1244
  }
1205
1245
  },
1206
1246
  async execute(args) {
1247
+ const requestedPort = args.port || 7860;
1207
1248
  if (activeServer) {
1249
+ const runningPort = getServerPort(activeServer) ?? activePort;
1250
+ if (runningPort !== requestedPort) {
1251
+ throw new Error(`Web interface is already running on port ${runningPort ?? "unknown"}. Please close it before opening a different port.`);
1252
+ }
1253
+ const url2 = `http://localhost:${runningPort ?? requestedPort}`;
1254
+ await openBrowser(url2);
1208
1255
  return {
1209
1256
  message: "Web interface is already running",
1210
- url: `http://localhost:${activeServer.address().port}`
1257
+ url: url2
1211
1258
  };
1212
1259
  }
1213
- const port = args.port || 7860;
1214
- activeServer = createServer(port);
1215
- const url = `http://localhost:${port}`;
1216
- void openBrowser(url);
1217
- return {
1218
- message: "Web interface started successfully and opened in browser",
1219
- url
1220
- };
1260
+ const url = `http://localhost:${requestedPort}`;
1261
+ try {
1262
+ activeServer = await createServer(requestedPort);
1263
+ activePort = requestedPort;
1264
+ await openBrowser(url);
1265
+ return {
1266
+ message: "Web interface started successfully and opened in browser",
1267
+ url
1268
+ };
1269
+ } catch (error) {
1270
+ activeServer = null;
1271
+ activePort = null;
1272
+ const errorMessage = error instanceof Error ? error.message : String(error);
1273
+ throw new Error(`Failed to start web interface: ${errorMessage}`);
1274
+ }
1221
1275
  }
1222
1276
  };
1223
1277
  var closeWebInterfaceTool = {
@@ -1231,12 +1285,15 @@ var closeWebInterfaceTool = {
1231
1285
  if (!activeServer) {
1232
1286
  return { message: "Web interface is not running" };
1233
1287
  }
1234
- return new Promise((resolve) => {
1235
- activeServer.close(() => {
1236
- activeServer = null;
1237
- resolve({ message: "Web interface stopped" });
1238
- });
1239
- });
1288
+ try {
1289
+ await closeServer(activeServer);
1290
+ activeServer = null;
1291
+ activePort = null;
1292
+ return { message: "Web interface stopped" };
1293
+ } catch (error) {
1294
+ const errorMessage = error instanceof Error ? error.message : String(error);
1295
+ throw new Error(`Failed to stop web interface: ${errorMessage}`);
1296
+ }
1240
1297
  }
1241
1298
  };
1242
1299
 
@@ -1650,115 +1707,115 @@ init_esm_shims();
1650
1707
  var projectPrompts = [
1651
1708
  {
1652
1709
  name: "recommendNextTasks",
1653
- description: "\u667A\u80FD\u63A8\u8350\u63A5\u4E0B\u6765\u8981\u5B8C\u6210\u7684\u4F18\u5148\u4EFB\u52A1\uFF0C\u57FA\u4E8E\u4F18\u5148\u7EA7\u3001\u622A\u6B62\u65E5\u671F\u548C\u9879\u76EE\u72B6\u6001",
1710
+ description: "Intelligently recommend the next priority tasks based on urgency, due dates, and project status",
1654
1711
  arguments: [
1655
1712
  {
1656
1713
  name: "projectId",
1657
- description: "\u7279\u5B9A\u9879\u76EE\u7684ID\uFF08\u53EF\u9009\uFF0C\u4E0D\u63D0\u4F9B\u5219\u5206\u6790\u6240\u6709\u9879\u76EE\uFF09",
1714
+ description: "Specific project ID (optional; if not provided, analyze all projects)",
1658
1715
  required: false
1659
1716
  },
1660
1717
  {
1661
1718
  name: "limit",
1662
- description: "\u63A8\u8350\u4EFB\u52A1\u6570\u91CF\uFF08\u9ED8\u8BA43\u4E2A\uFF09",
1719
+ description: "Number of tasks to recommend (default: 3)",
1663
1720
  required: false
1664
1721
  }
1665
1722
  ]
1666
1723
  },
1667
1724
  {
1668
1725
  name: "autoPrioritize",
1669
- description: "\u81EA\u52A8\u5206\u6790\u4EFB\u52A1\u5E76\u667A\u80FD\u8C03\u6574\u4F18\u5148\u7EA7\uFF0C\u8003\u8651\u622A\u6B62\u65E5\u671F\u3001\u4EFB\u52A1\u4F9D\u8D56\u548C\u9879\u76EE\u91CD\u8981\u6027",
1726
+ description: "Automatically analyze tasks and intelligently adjust priorities, considering due dates, dependencies, and project importance",
1670
1727
  arguments: [
1671
1728
  {
1672
1729
  name: "projectId",
1673
- description: "\u7279\u5B9A\u9879\u76EE\u7684ID\uFF08\u53EF\u9009\uFF0C\u4E0D\u63D0\u4F9B\u5219\u5206\u6790\u6240\u6709\u9879\u76EE\uFF09",
1730
+ description: "Specific project ID (optional; if not provided, analyze all projects)",
1674
1731
  required: false
1675
1732
  }
1676
1733
  ]
1677
1734
  },
1678
1735
  {
1679
1736
  name: "enhanceTaskDetails",
1680
- description: "\u667A\u80FD\u8865\u5145\u4EFB\u52A1\u7EC6\u8282\uFF0C\u5305\u62EC\u63CF\u8FF0\u3001\u9A8C\u6536\u6807\u51C6\u3001\u5B50\u4EFB\u52A1\u548C\u6240\u9700\u8D44\u6E90",
1737
+ description: "Intelligently enhance task details, including description, acceptance criteria, subtasks, and required resources",
1681
1738
  arguments: [
1682
1739
  {
1683
1740
  name: "taskId",
1684
- description: "\u8981\u5B8C\u5584\u7684\u4EFB\u52A1ID",
1741
+ description: "Task ID to be enhanced",
1685
1742
  required: true
1686
1743
  }
1687
1744
  ]
1688
1745
  },
1689
1746
  {
1690
1747
  name: "quickCapture",
1691
- description: "\u5FEB\u901F\u6355\u6349\u60F3\u6CD5/\u4EFB\u52A1\uFF0C\u81EA\u52A8\u5206\u7C7B\u5E76\u5EFA\u8BAE\u4F18\u5148\u7EA7",
1748
+ description: "Quickly capture ideas/tasks, auto-categorize and suggest priorities",
1692
1749
  arguments: [
1693
1750
  {
1694
1751
  name: "idea",
1695
- description: "\u8981\u6355\u6349\u7684\u60F3\u6CD5\u6216\u4EFB\u52A1\u63CF\u8FF0",
1752
+ description: "Idea or task description to be captured",
1696
1753
  required: true
1697
1754
  },
1698
1755
  {
1699
1756
  name: "projectId",
1700
- description: "\u76EE\u6807\u9879\u76EEID\uFF08\u53EF\u9009\uFF09",
1757
+ description: "Target project ID (optional)",
1701
1758
  required: false
1702
1759
  }
1703
1760
  ]
1704
1761
  }
1705
1762
  ];
1706
1763
  function getRecommendNextTasksPrompt(projectId, limit) {
1707
- const context = projectId ? `\u5206\u6790\u9879\u76EE ${projectId} \u7684\u4EFB\u52A1` : "\u5206\u6790\u6240\u6709\u6D3B\u8DC3\u9879\u76EE\u7684\u4EFB\u52A1";
1764
+ const context = projectId ? `Analyze tasks for project ${projectId}` : "Analyze tasks for all active projects";
1708
1765
  const taskLimit = limit ? parseInt(limit, 10) : 3;
1709
1766
  return {
1710
- description: "\u667A\u80FD\u4EFB\u52A1\u63A8\u8350\u52A9\u624B",
1767
+ description: "Intelligent Task Recommendation Assistant",
1711
1768
  messages: [
1712
1769
  {
1713
1770
  role: "user",
1714
1771
  content: {
1715
1772
  type: "text",
1716
- text: `${context}\uFF0C\u8BF7\u5E2E\u6211\u63A8\u8350\u63A5\u4E0B\u6765\u5E94\u8BE5\u4F18\u5148\u5B8C\u6210\u7684${taskLimit}\u4E2A\u4EFB\u52A1\u3002
1773
+ text: `${context}, please recommend the ${taskLimit} tasks I should prioritize next.
1717
1774
 
1718
- ## \u63A8\u8350\u903B\u8F91\uFF08\u6309\u4F18\u5148\u7EA7\u6392\u5E8F\uFF09\uFF1A
1775
+ ## Recommendation Logic (sorted by priority):
1719
1776
 
1720
- ### 1. \u7D27\u6025\u4E14\u91CD\u8981\uFF08Critical\u4F18\u5148\u7EA7 + \u622A\u6B62\u65E5\u671F\u8FD1\uFF09
1721
- - \u4ECA\u5929\u6216\u660E\u5929\u5230\u671F\u7684Critical\u4EFB\u52A1
1722
- - \u5DF2\u903E\u671F\u7684\u9AD8\u4F18\u5148\u7EA7\u4EFB\u52A1
1777
+ ### 1. Urgent and Important (Critical priority + Near due date)
1778
+ - Critical tasks due today or tomorrow
1779
+ - Overdue high-priority tasks
1723
1780
 
1724
- ### 2. \u9AD8\u4EF7\u503C\u4EFB\u52A1\uFF08High\u4F18\u5148\u7EA7 + \u6709\u660E\u786E\u622A\u6B62\u65E5\u671F\uFF09
1725
- - \u672C\u5468\u5185\u5230\u671F\u7684High\u4F18\u5148\u7EA7\u4EFB\u52A1
1726
- - \u963B\u585E\u5176\u4ED6\u4EFB\u52A1\u7684\u5173\u952E\u8DEF\u5F84\u4EFB\u52A1
1781
+ ### 2. High-Value Tasks (High priority + Clear due date)
1782
+ - High priority tasks due this week
1783
+ - Critical path tasks blocking other work
1727
1784
 
1728
- ### 3. \u5FEB\u901F\u83B7\u80DC\uFF08Medium\u4F18\u5148\u7EA7 + \u9884\u8BA1\u8017\u65F6\u77ED\uFF09
1729
- - \u53EF\u4EE5\u57281-2\u5C0F\u65F6\u5185\u5B8C\u6210\u7684Medium\u4EFB\u52A1
1730
- - \u80FD\u660E\u663E\u63D0\u5347\u9879\u76EE\u8FDB\u5EA6\u7684\u4EFB\u52A1
1785
+ ### 3. Quick Wins (Medium priority + Short estimated time)
1786
+ - Medium tasks completable in 1-2 hours
1787
+ - Tasks that can significantly boost project progress
1731
1788
 
1732
- ### 4. \u8BA1\u5212\u5185\u5DE5\u4F5C
1733
- - \u5DF2\u6807\u8BB0\u4E3A"in-progress"\u4F46\u672A\u5B8C\u6210\u7684\u4EFB\u52A1
1734
- - \u5373\u5C06\u5230\u671F\u7684Normal\u4F18\u5148\u7EA7\u4EFB\u52A1
1789
+ ### 4. Planned Work
1790
+ - Tasks marked "in-progress" but not yet completed
1791
+ - Normal priority tasks due soon
1735
1792
 
1736
- ## \u8BF7\u6267\u884C\u4EE5\u4E0B\u6B65\u9AA4\uFF1A
1793
+ ## Please perform the following steps:
1737
1794
 
1738
- 1. **\u5217\u51FA\u6240\u6709\u5F85\u529E\u4EFB\u52A1**\uFF08status = todo \u6216 in-progress\uFF09
1739
- 2. **\u7B5B\u9009\u51FA\u9AD8\u4F18\u5148\u7EA7\u4EFB\u52A1**\uFF1Acritical \u548C high
1740
- 3. **\u68C0\u67E5\u622A\u6B62\u65E5\u671F**\uFF1A\u627E\u51FA\u5373\u5C06\u5230\u671F\u6216\u5DF2\u903E\u671F\u7684\u4EFB\u52A1
1741
- 4. **\u5206\u6790\u963B\u585E\u5173\u7CFB**\uFF1A\u8BC6\u522B\u54EA\u4E9B\u4EFB\u52A1\u963B\u585E\u4E86\u5176\u4ED6\u4EFB\u52A1
1742
- 5. **\u751F\u6210\u63A8\u8350\u5217\u8868**\uFF1A\u7ED9\u51FA${taskLimit}\u4E2A\u6700\u5E94\u8BE5\u4F18\u5148\u5904\u7406\u7684\u4EFB\u52A1\uFF0C\u5305\u542B\u7406\u7531
1795
+ 1. **List all pending tasks** (status = todo or in-progress)
1796
+ 2. **Filter high-priority tasks**: critical and high
1797
+ 3. **Check due dates**: Identify tasks due soon or overdue
1798
+ 4. **Analyze blocking relationships**: Identify tasks blocking others
1799
+ 5. **Generate recommendation list**: Provide ${taskLimit} tasks to prioritize with reasons
1743
1800
 
1744
- ## \u8F93\u51FA\u683C\u5F0F\uFF1A
1801
+ ## Output Format:
1745
1802
 
1746
- ### \u7ACB\u5373\u5904\u7406\uFF08Critical\uFF09
1747
- 1. **\u4EFB\u52A1\u540D** (\u9879\u76EE\u540D)
1748
- - \u539F\u56E0\uFF1A[\u4E3A\u4EC0\u4E48\u8FD9\u4E2A\u4EFB\u52A1\u6700\u7D27\u6025]
1749
- - \u5EFA\u8BAE\u884C\u52A8\uFF1A[\u5177\u4F53\u505A\u4EC0\u4E48]
1803
+ ### Immediate Action (Critical)
1804
+ 1. **Task Name** (Project Name)
1805
+ - Reason: [Why this task is most urgent]
1806
+ - Suggested Action: [What specifically to do]
1750
1807
 
1751
- ### \u4ECA\u65E5\u91CD\u70B9\uFF08High\uFF09
1752
- 2. **\u4EFB\u52A1\u540D** (\u9879\u76EE\u540D)
1753
- - \u539F\u56E0\uFF1A[\u4E3A\u4EC0\u4E48\u8FD9\u4E2A\u4EFB\u52A1\u91CD\u8981]
1754
- - \u5EFA\u8BAE\u884C\u52A8\uFF1A[\u5177\u4F53\u505A\u4EC0\u4E48]
1808
+ ### Today's Focus (High)
1809
+ 2. **Task Name** (Project Name)
1810
+ - Reason: [Why this task is important]
1811
+ - Suggested Action: [What specifically to do]
1755
1812
 
1756
- ### \u540E\u7EED\u8DDF\u8FDB
1757
- 3. **\u4EFB\u52A1\u540D** (\u9879\u76EE\u540D)
1758
- - \u539F\u56E0\uFF1A[\u4E3A\u4EC0\u4E48\u5E94\u8BE5\u63A5\u4E0B\u6765\u505A]
1759
- - \u5EFA\u8BAE\u884C\u52A8\uFF1A[\u5177\u4F53\u505A\u4EC0\u4E48]
1813
+ ### Follow-up
1814
+ 3. **Task Name** (Project Name)
1815
+ - Reason: [Why this should be done next]
1816
+ - Suggested Action: [What specifically to do]
1760
1817
 
1761
- \u8BF7\u4F7F\u7528 list_tasks \u5DE5\u5177\u83B7\u53D6\u4EFB\u52A1\u6570\u636E\uFF0C\u7136\u540E\u7ED9\u51FA\u667A\u80FD\u63A8\u8350\u3002
1818
+ Please use the list_tasks tool to fetch task data, then provide intelligent recommendations.
1762
1819
 
1763
1820
  ## Important Reminder
1764
1821
  When you start working on recommended tasks, please:
@@ -1773,71 +1830,71 @@ Keep task status synchronized with actual progress!`
1773
1830
  };
1774
1831
  }
1775
1832
  function getAutoPrioritizePrompt(projectId) {
1776
- const context = projectId ? `\u5206\u6790\u9879\u76EE ${projectId} \u7684\u4EFB\u52A1\u4F18\u5148\u7EA7` : "\u5206\u6790\u6240\u6709\u9879\u76EE\u7684\u4EFB\u52A1\u4F18\u5148\u7EA7";
1833
+ const context = projectId ? `Analyze task priorities for project ${projectId}` : "Analyze task priorities for all projects";
1777
1834
  return {
1778
- description: "\u667A\u80FD\u4F18\u5148\u7EA7\u4F18\u5316\u52A9\u624B",
1835
+ description: "Intelligent Priority Optimization Assistant",
1779
1836
  messages: [
1780
1837
  {
1781
1838
  role: "user",
1782
1839
  content: {
1783
1840
  type: "text",
1784
- text: `${context}\uFF0C\u8BF7\u81EA\u52A8\u5206\u6790\u5E76\u5EFA\u8BAE\u4F18\u5148\u7EA7\u8C03\u6574\u3002
1785
-
1786
- ## \u4F18\u5148\u7EA7\u8C03\u6574\u89C4\u5219\uFF1A
1787
-
1788
- ### \u5347\u7EA7\u4E3A Critical \u7684\u6761\u4EF6\uFF1A
1789
- - [ ] \u622A\u6B62\u65E5\u671F\u572848\u5C0F\u65F6\u5185\u4E14\u672A\u5B8C\u6210
1790
- - [ ] \u963B\u585E\u4E86\u5176\u4ED6high/critical\u4EFB\u52A1
1791
- - [ ] \u662F\u9879\u76EE\u5173\u952E\u8DEF\u5F84\u4E0A\u7684\u4EFB\u52A1\u4E14\u8FDB\u5EA6\u843D\u540E
1792
- - [ ] \u6709\u5916\u90E8\u4F9D\u8D56\uFF08\u5982\u5BA2\u6237\u3001\u5408\u4F5C\u65B9\uFF09\u4E14\u65F6\u95F4\u7D27\u8FEB
1793
-
1794
- ### \u5347\u7EA7\u4E3A High \u7684\u6761\u4EF6\uFF1A
1795
- - [ ] \u622A\u6B62\u65E5\u671F\u57281\u5468\u5185
1796
- - [ ] \u662F\u91CD\u8981\u91CC\u7A0B\u7891\u7684\u524D\u7F6E\u4EFB\u52A1
1797
- - [ ] \u957F\u671F\u5361\u5728"in-progress"\u72B6\u6001\uFF08\u8D85\u8FC73\u5929\uFF09
1798
- - [ ] \u5F71\u54CD\u591A\u4E2A\u56E2\u961F\u6210\u5458\u7684\u5DE5\u4F5C
1799
-
1800
- ### \u964D\u7EA7\u4E3A Medium/Low \u7684\u6761\u4EF6\uFF1A
1801
- - [ ] \u622A\u6B62\u65E5\u671F\u8FD8\u5F88\u8FDC\uFF08>2\u5468\uFF09\u4E14\u6CA1\u6709\u4F9D\u8D56
1802
- - [ ] \u662F"nice to have"\u529F\u80FD\u800C\u975E\u6838\u5FC3\u529F\u80FD
1803
- - [ ] \u5F53\u524D\u9636\u6BB5\u4E0D\u9700\u8981\uFF0C\u53EF\u4EE5\u5EF6\u540E
1804
-
1805
- ### \u5176\u4ED6\u8003\u8651\u56E0\u7D20\uFF1A
1806
- - **\u9879\u76EE\u6574\u4F53\u8FDB\u5EA6**\uFF1A\u8FDB\u5EA6\u843D\u540E\u7684\u9879\u76EE\u4EFB\u52A1\u5E94\u63D0\u5347\u4F18\u5148\u7EA7
1807
- - **\u8D44\u6E90\u53EF\u7528\u6027**\uFF1A\u5982\u679C\u8D44\u6E90\u7D27\u5F20\uFF0C\u805A\u7126\u6700\u9AD8\u4F18\u5148\u7EA7
1808
- - **\u98CE\u9669\u56E0\u7D20**\uFF1A\u98CE\u9669\u9AD8\u7684\u4EFB\u52A1\u5E94\u63D0\u524D\u5904\u7406
1809
-
1810
- ## \u8BF7\u6267\u884C\u4EE5\u4E0B\u6B65\u9AA4\uFF1A
1811
-
1812
- 1. **\u83B7\u53D6\u6240\u6709\u4EFB\u52A1**\uFF1A\u4F7F\u7528 list_tasks \u83B7\u53D6\u4EFB\u52A1\u5217\u8868
1813
- 2. **\u5206\u6790\u6BCF\u4E2A\u4EFB\u52A1**\uFF1A
1814
- - \u68C0\u67E5\u622A\u6B62\u65E5\u671F\u4E0E\u5F53\u524D\u65E5\u671F\u7684\u5DEE\u8DDD
1815
- - \u8BC6\u522B\u4EFB\u52A1\u4F9D\u8D56\u5173\u7CFB
1816
- - \u8BC4\u4F30\u9879\u76EE\u6574\u4F53\u5065\u5EB7\u5EA6
1817
- 3. **\u751F\u6210\u8C03\u6574\u5EFA\u8BAE**\uFF1A\u5217\u51FA\u9700\u8981\u8C03\u6574\u4F18\u5148\u7EA7\u7684\u4EFB\u52A1\u53CA\u7406\u7531
1818
- 4. **\u6279\u91CF\u66F4\u65B0**\uFF1A\u4F7F\u7528 batch_update_tasks \u6267\u884C\u4F18\u5148\u7EA7\u8C03\u6574
1819
-
1820
- ## \u8F93\u51FA\u683C\u5F0F\uFF1A
1821
-
1822
- ### \u5EFA\u8BAE\u5347\u7EA7\u4E3A Critical
1823
- | \u4EFB\u52A1 | \u5F53\u524D\u4F18\u5148\u7EA7 | \u5EFA\u8BAE\u4F18\u5148\u7EA7 | \u7406\u7531 |
1824
- |------|-----------|-----------|------|
1825
- | XXX | high \u2192 critical | \u660E\u5929\u5230\u671F |
1826
-
1827
- ### \u5EFA\u8BAE\u5347\u7EA7\u4E3A High
1828
- | \u4EFB\u52A1 | \u5F53\u524D\u4F18\u5148\u7EA7 | \u5EFA\u8BAE\u4F18\u5148\u7EA7 | \u7406\u7531 |
1829
- |------|-----------|-----------|------|
1830
- | XXX | medium \u2192 high | \u963B\u585E\u540E\u7EED\u4EFB\u52A1 |
1831
-
1832
- ### \u5EFA\u8BAE\u964D\u7EA7
1833
- | \u4EFB\u52A1 | \u5F53\u524D\u4F18\u5148\u7EA7 | \u5EFA\u8BAE\u4F18\u5148\u7EA7 | \u7406\u7531 |
1834
- |------|-----------|-----------|------|
1835
- | XXX | high \u2192 medium | \u53EF\u5EF6\u540E\u5904\u7406 |
1836
-
1837
- ### \u4FDD\u6301\u4E0D\u53D8\uFF08\u4F18\u5148\u7EA7\u5408\u7406\uFF09
1838
- - \u5217\u51FA\u4F18\u5148\u7EA7\u8BBE\u7F6E\u5408\u7406\u7684\u4EFB\u52A1
1839
-
1840
- \u8BF7\u7ED9\u51FA\u5206\u6790\u7ED3\u679C\uFF0C\u5E76\u5728\u7528\u6237\u786E\u8BA4\u540E\u6267\u884C\u6279\u91CF\u66F4\u65B0\u3002`
1841
+ text: `${context}, please automatically analyze and suggest priority adjustments.
1842
+
1843
+ ## Priority Adjustment Rules:
1844
+
1845
+ ### Conditions to Upgrade to Critical:
1846
+ - [ ] Due within 48 hours and not completed
1847
+ - [ ] Blocking other high/critical tasks
1848
+ - [ ] On project critical path and behind schedule
1849
+ - [ ] Has external dependencies (e.g., clients, partners) and time is tight
1850
+
1851
+ ### Conditions to Upgrade to High:
1852
+ - [ ] Due within 1 week
1853
+ - [ ] Prerequisite for important milestone
1854
+ - [ ] Stuck in "in-progress" state for too long (over 3 days)
1855
+ - [ ] Affects work of multiple team members
1856
+
1857
+ ### Conditions to Downgrade to Medium/Low:
1858
+ - [ ] Due date is far away (>2 weeks) and no dependencies
1859
+ - [ ] "Nice to have" feature rather than core functionality
1860
+ - [ ] Not needed in current phase, can be postponed
1861
+
1862
+ ### Other Considerations:
1863
+ - **Overall project progress**: Tasks for behind-schedule projects should be prioritized higher
1864
+ - **Resource availability**: If resources are tight, focus on highest priority
1865
+ - **Risk factors**: High-risk tasks should be addressed earlier
1866
+
1867
+ ## Please perform the following steps:
1868
+
1869
+ 1. **Get all tasks**: Use list_tasks to fetch task list
1870
+ 2. **Analyze each task**:
1871
+ - Check gap between due date and current date
1872
+ - Identify task dependency relationships
1873
+ - Evaluate overall project health
1874
+ 3. **Generate adjustment suggestions**: List tasks needing priority changes with reasons
1875
+ 4. **Batch update**: Use batch_update_tasks to execute priority adjustments
1876
+
1877
+ ## Output Format:
1878
+
1879
+ ### Suggested Upgrade to Critical
1880
+ | Task | Current Priority | Suggested Priority | Reason |
1881
+ |------|-----------------|-------------------|--------|
1882
+ | XXX | high \u2192 critical | Due tomorrow |
1883
+
1884
+ ### Suggested Upgrade to High
1885
+ | Task | Current Priority | Suggested Priority | Reason |
1886
+ |------|-----------------|-------------------|--------|
1887
+ | XXX | medium \u2192 high | Blocking follow-up tasks |
1888
+
1889
+ ### Suggested Downgrade
1890
+ | Task | Current Priority | Suggested Priority | Reason |
1891
+ |------|-----------------|-------------------|--------|
1892
+ | XXX | high \u2192 medium | Can be postponed |
1893
+
1894
+ ### Keep Unchanged (Priorities are reasonable)
1895
+ - List tasks with reasonable priority settings
1896
+
1897
+ Please provide analysis results, then execute batch update after user confirmation.`
1841
1898
  }
1842
1899
  }
1843
1900
  ]
@@ -1845,139 +1902,139 @@ function getAutoPrioritizePrompt(projectId) {
1845
1902
  }
1846
1903
  function getEnhanceTaskDetailsPrompt(taskId) {
1847
1904
  return {
1848
- description: "\u4EFB\u52A1\u7EC6\u8282\u5B8C\u5584\u52A9\u624B",
1905
+ description: "Task Detail Enhancement Assistant",
1849
1906
  messages: [
1850
1907
  {
1851
1908
  role: "user",
1852
1909
  content: {
1853
1910
  type: "text",
1854
- text: `\u8BF7\u5E2E\u6211\u5B8C\u5584\u4EFB\u52A1 ${taskId} \u7684\u7EC6\u8282\u3002
1855
-
1856
- ## \u5B8C\u5584\u5185\u5BB9\uFF1A
1857
-
1858
- ### 1. \u8BE6\u7EC6\u63CF\u8FF0
1859
- - \u4EFB\u52A1\u7684\u5177\u4F53\u5185\u5BB9\u548C\u80CC\u666F
1860
- - \u4E3A\u4EC0\u4E48\u8981\u505A\u8FD9\u4E2A\u4EFB\u52A1
1861
- - \u9884\u671F\u7684\u4E1A\u52A1\u4EF7\u503C\u6216\u6280\u672F\u4EF7\u503C
1862
-
1863
- ### 2. \u9A8C\u6536\u6807\u51C6\uFF08Definition of Done\uFF09
1864
- \u5217\u51FA\u660E\u786E\u7684\u5B8C\u6210\u6807\u51C6\uFF0C\u4F8B\u5982\uFF1A
1865
- - [ ] \u529F\u80FD\u5B9E\u73B0\u5E76\u672C\u5730\u6D4B\u8BD5\u901A\u8FC7
1866
- - [ ] \u4EE3\u7801\u901A\u8FC7Code Review
1867
- - [ ] \u76F8\u5173\u6587\u6863\u5DF2\u66F4\u65B0
1868
- - [ ] \u5355\u5143\u6D4B\u8BD5\u8986\u76D6\u7387>80%
1869
-
1870
- ### 3. \u6280\u672F/\u5B9E\u73B0\u7EC6\u8282
1871
- - \u6D89\u53CA\u7684\u6280\u672F\u6808\u6216\u6A21\u5757
1872
- - \u53EF\u80FD\u9700\u8981\u4FEE\u6539\u7684\u6587\u4EF6
1873
- - \u6F5C\u5728\u7684\u6311\u6218\u6216\u6CE8\u610F\u4E8B\u9879
1874
-
1875
- ### 4. \u76F8\u5173\u8D44\u6E90
1876
- - \u76F8\u5173\u6587\u6863\u94FE\u63A5
1877
- - \u53C2\u8003\u5B9E\u73B0\u6216\u793A\u4F8B\u4EE3\u7801
1878
- - \u9700\u8981\u54A8\u8BE2\u7684\u4EBA\u5458
1879
-
1880
- ### 5. \u5B50\u4EFB\u52A1\u5EFA\u8BAE\uFF08\u5982\u679C\u9700\u8981\uFF09
1881
- \u5982\u679C\u4EFB\u52A1\u8F83\u590D\u6742\uFF0C\u5EFA\u8BAE\u62C6\u5206\u4E3A\u5B50\u4EFB\u52A1\uFF1A
1882
- - \u5B50\u4EFB\u52A11\uFF1A...
1883
- - \u5B50\u4EFB\u52A12\uFF1A...
1884
- - \u5B50\u4EFB\u52A13\uFF1A...
1885
-
1886
- ## \u8BF7\u6267\u884C\u4EE5\u4E0B\u6B65\u9AA4\uFF1A
1887
-
1888
- 1. **\u83B7\u53D6\u4EFB\u52A1\u4FE1\u606F**\uFF1A\u4F7F\u7528 get_task \u67E5\u770B\u5F53\u524D\u4EFB\u52A1\u8BE6\u60C5
1889
- 2. **\u83B7\u53D6\u9879\u76EE\u4E0A\u4E0B\u6587**\uFF1A\u4F7F\u7528 get_project \u4E86\u89E3\u9879\u76EE\u80CC\u666F
1890
- 3. **\u5206\u6790\u4EFB\u52A1\u7C7B\u578B**\uFF1A
1891
- - \u5982\u679C\u662F\u5F00\u53D1\u4EFB\u52A1\uFF1A\u8865\u5145\u6280\u672F\u7EC6\u8282\u3001\u4EE3\u7801\u4F4D\u7F6E
1892
- - \u5982\u679C\u662F\u8BBE\u8BA1\u4EFB\u52A1\uFF1A\u8865\u5145\u8BBE\u8BA1\u89C4\u8303\u3001\u8BC4\u5BA1\u6807\u51C6
1893
- - \u5982\u679C\u662F\u6587\u6863\u4EFB\u52A1\uFF1A\u8865\u5145\u6587\u6863\u7ED3\u6784\u3001\u53C2\u8003\u8D44\u6599
1894
- - \u5982\u679C\u662F\u6D4B\u8BD5\u4EFB\u52A1\uFF1A\u8865\u5145\u6D4B\u8BD5\u573A\u666F\u3001\u8986\u76D6\u8303\u56F4
1895
- 4. **\u751F\u6210\u5B8C\u5584\u5185\u5BB9**\uFF1A\u4F7F\u7528 update_task \u66F4\u65B0\u4EFB\u52A1\u63CF\u8FF0
1896
-
1897
- ## \u66F4\u65B0\u540E\u4EFB\u52A1\u5E94\u5305\u542B\uFF1A
1911
+ text: `Please help me enhance the details for task ${taskId}.
1912
+
1913
+ ## Enhancement Content:
1914
+
1915
+ ### 1. Detailed Description
1916
+ - Specific content and background of the task
1917
+ - Why this task needs to be done
1918
+ - Expected business or technical value
1919
+
1920
+ ### 2. Acceptance Criteria (Definition of Done)
1921
+ List clear completion standards, for example:
1922
+ - [ ] Feature implemented and locally tested
1923
+ - [ ] Code passes Code Review
1924
+ - [ ] Related documentation updated
1925
+ - [ ] Unit test coverage > 80%
1926
+
1927
+ ### 3. Technical/Implementation Details
1928
+ - Tech stack or modules involved
1929
+ - Files that may need modification
1930
+ - Potential challenges or considerations
1931
+
1932
+ ### 4. Related Resources
1933
+ - Related documentation links
1934
+ - Reference implementations or example code
1935
+ - People to consult
1936
+
1937
+ ### 5. Subtask Suggestions (if needed)
1938
+ If the task is complex, suggest breaking it down:
1939
+ - Subtask 1: ...
1940
+ - Subtask 2: ...
1941
+ - Subtask 3: ...
1942
+
1943
+ ## Please perform the following steps:
1944
+
1945
+ 1. **Get task info**: Use get_task to view current task details
1946
+ 2. **Get project context**: Use get_project to understand project background
1947
+ 3. **Analyze task type**:
1948
+ - If development task: Add technical details, code locations
1949
+ - If design task: Add design specs, review criteria
1950
+ - If documentation task: Add doc structure, references
1951
+ - If testing task: Add test scenarios, coverage scope
1952
+ 4. **Generate enhancement content**: Use update_task to update task description
1953
+
1954
+ ## Updated task should include:
1898
1955
 
1899
1956
  \`\`\`
1900
- ## \u80CC\u666F
1901
- [\u4EFB\u52A1\u80CC\u666F\u548C\u76EE\u7684]
1902
-
1903
- ## \u9A8C\u6536\u6807\u51C6
1904
- - [ ] [\u6807\u51C61]
1905
- - [ ] [\u6807\u51C62]
1906
- - [ ] [\u6807\u51C63]
1907
-
1908
- ## \u6280\u672F\u7EC6\u8282
1909
- - \u6D89\u53CA\u6A21\u5757\uFF1A[\u6A21\u5757\u540D]
1910
- - \u5173\u952E\u6587\u4EF6\uFF1A[\u6587\u4EF6\u8DEF\u5F84]
1911
- - \u6CE8\u610F\u4E8B\u9879\uFF1A[\u91CD\u8981\u63D0\u9192]
1912
-
1913
- ## \u76F8\u5173\u8D44\u6E90
1914
- - \u6587\u6863\uFF1A[\u94FE\u63A5]
1915
- - \u53C2\u8003\uFF1A[\u94FE\u63A5]
1957
+ ## Background
1958
+ [Task background and purpose]
1959
+
1960
+ ## Acceptance Criteria
1961
+ - [ ] [Standard 1]
1962
+ - [ ] [Standard 2]
1963
+ - [ ] [Standard 3]
1964
+
1965
+ ## Technical Details
1966
+ - Modules: [module name]
1967
+ - Key files: [file path]
1968
+ - Notes: [important reminders]
1969
+
1970
+ ## Related Resources
1971
+ - Documentation: [link]
1972
+ - References: [link]
1916
1973
  \`\`\`
1917
1974
 
1918
- \u8BF7\u83B7\u53D6\u4EFB\u52A1\u4FE1\u606F\u540E\uFF0C\u7ED9\u51FA\u8BE6\u7EC6\u7684\u5B8C\u5584\u5EFA\u8BAE\u3002`
1975
+ Please fetch task info first, then provide detailed enhancement suggestions.`
1919
1976
  }
1920
1977
  }
1921
1978
  ]
1922
1979
  };
1923
1980
  }
1924
1981
  function getQuickCapturePrompt(idea, projectId) {
1925
- const projectContext = projectId ? `\u6DFB\u52A0\u5230\u9879\u76EE ${projectId}` : "\u81EA\u52A8\u9009\u62E9\u6700\u5408\u9002\u7684\u9879\u76EE";
1982
+ const projectContext = projectId ? `Add to project ${projectId}` : "Auto-select the most suitable project";
1926
1983
  return {
1927
- description: "\u5FEB\u901F\u6355\u6349\u52A9\u624B",
1984
+ description: "Quick Capture Assistant",
1928
1985
  messages: [
1929
1986
  {
1930
1987
  role: "user",
1931
1988
  content: {
1932
1989
  type: "text",
1933
- text: `\u6211\u8981\u5FEB\u901F\u6355\u6349\u4E00\u4E2A\u60F3\u6CD5/\u4EFB\u52A1\uFF1A"${idea}"
1990
+ text: `I want to quickly capture an idea/task: "${idea}"
1934
1991
 
1935
1992
  ${projectContext}
1936
1993
 
1937
- ## \u8BF7\u5E2E\u6211\u5B8C\u6210\u4EE5\u4E0B\u6B65\u9AA4\uFF1A
1994
+ ## Please help me complete the following steps:
1938
1995
 
1939
- ### 1. \u4EFB\u52A1\u4FE1\u606F\u63D0\u53D6
1940
- \u4ECE\u63CF\u8FF0\u4E2D\u63D0\u53D6\uFF1A
1941
- - **\u4EFB\u52A1\u6807\u9898**\uFF1A\u7B80\u6D01\u660E\u786E\u7684\u6807\u9898\uFF08\u52A8\u8BCD\u5F00\u5934\uFF09
1942
- - **\u4EFB\u52A1\u63CF\u8FF0**\uFF1A\u8865\u5145\u4E0A\u4E0B\u6587\u548C\u7EC6\u8282
1943
- - **\u4EFB\u52A1\u7C7B\u578B**\uFF1Abug / feature / refactor / docs / chore
1944
- - **\u9884\u4F30\u4F18\u5148\u7EA7**\uFF1Acritical / high / medium / low\uFF08\u57FA\u4E8E\u63CF\u8FF0\u5224\u65AD\u7D27\u6025\u7A0B\u5EA6\uFF09
1996
+ ### 1. Task Information Extraction
1997
+ Extract from description:
1998
+ - **Task Title**: Concise and clear title (start with verb)
1999
+ - **Task Description**: Add context and details
2000
+ - **Task Type**: bug / feature / refactor / docs / chore
2001
+ - **Estimated Priority**: critical / high / medium / low (based on urgency in description)
1945
2002
 
1946
- ### 2. \u9879\u76EE\u63A8\u8350\uFF08\u5982\u679C\u672A\u6307\u5B9A\u9879\u76EE\uFF09
1947
- \u5982\u679C\u7528\u6237\u6CA1\u6709\u6307\u5B9A\u9879\u76EE\uFF0C\u8BF7\uFF1A
1948
- - \u5217\u51FA\u6240\u6709\u6D3B\u8DC3\u9879\u76EE
1949
- - \u5206\u6790\u4EFB\u52A1\u5185\u5BB9\u4E0E\u54EA\u4E2A\u9879\u76EE\u6700\u76F8\u5173
1950
- - \u63A8\u8350\u6700\u5408\u9002\u7684\u9879\u76EE
2003
+ ### 2. Project Recommendation (if no project specified)
2004
+ If user didn't specify a project, please:
2005
+ - List all active projects
2006
+ - Analyze which project the task content is most relevant to
2007
+ - Recommend the most suitable project
1951
2008
 
1952
- ### 3. \u6807\u7B7E\u5EFA\u8BAE
1953
- \u5EFA\u8BAE\u76F8\u5173\u7684\u6807\u7B7E\uFF1A
1954
- - \u7C7B\u578B\u6807\u7B7E\uFF1Abug, feature, refactor, docs
1955
- - \u4F18\u5148\u7EA7\u6807\u7B7E\uFF1Aurgent, important
1956
- - \u9886\u57DF\u6807\u7B7E\uFF1Afrontend, backend, design, testing\uFF08\u5982\u9002\u7528\uFF09
2009
+ ### 3. Tag Suggestions
2010
+ Suggest relevant tags:
2011
+ - Type tags: bug, feature, refactor, docs
2012
+ - Priority tags: urgent, important
2013
+ - Domain tags: frontend, backend, design, testing (if applicable)
1957
2014
 
1958
- ### 4. \u751F\u6210\u4EFB\u52A1
1959
- \u4F7F\u7528 create_task \u521B\u5EFA\u4EFB\u52A1
2015
+ ### 4. Generate Task
2016
+ Use create_task to create the task
1960
2017
 
1961
2018
  ### 5. Status Recommendation
1962
2019
  After creating the task, if you start working on it immediately, consider setting the status to in-progress. Use update_task to keep progress updated during work, and mark as done when completed.
1963
2020
 
1964
- ## \u793A\u4F8B\uFF1A
2021
+ ## Example:
1965
2022
 
1966
- **\u8F93\u5165**\uFF1A"\u7528\u6237\u53CD\u9988\u767B\u5F55\u9875\u9762\u5728\u624B\u673A\u4E0A\u663E\u793A\u4E0D\u5BF9"
2023
+ **Input**: "User reported login page doesn't display correctly on mobile"
1967
2024
 
1968
- **\u8F93\u51FA**\uFF1A
1969
- - \u6807\u9898\uFF1A\u4FEE\u590D\u767B\u5F55\u9875\u9762\u79FB\u52A8\u7AEF\u9002\u914D\u95EE\u9898
1970
- - \u63CF\u8FF0\uFF1A\u7528\u6237\u53CD\u9988\u767B\u5F55\u9875\u9762\u5728\u79FB\u52A8\u8BBE\u5907\u4E0A\u663E\u793A\u5F02\u5E38\uFF0C\u9700\u8981\u68C0\u67E5\u54CD\u5E94\u5F0F\u5E03\u5C40\u3002
1971
- - \u7C7B\u578B\uFF1ABug
1972
- - \u4F18\u5148\u7EA7\uFF1AHigh\uFF08\u5F71\u54CD\u7528\u6237\u4F53\u9A8C\uFF09
1973
- - \u5EFA\u8BAE\u6807\u7B7E\uFF1Abug, frontend, mobile
1974
- - \u63A8\u8350\u9879\u76EE\uFF1A[\u5982\u679C\u6709web\u9879\u76EE\u5219\u63A8\u8350]
2025
+ **Output**:
2026
+ - Title: Fix login page mobile responsiveness issue
2027
+ - Description: User reported the login page displays abnormally on mobile devices, need to check responsive layout.
2028
+ - Type: Bug
2029
+ - Priority: High (affects user experience)
2030
+ - Suggested Tags: bug, frontend, mobile
2031
+ - Recommended Project: [Recommend if there's a web project]
1975
2032
 
1976
- ## \u5F53\u524D\u60F3\u6CD5\u5206\u6790\uFF1A
2033
+ ## Current Idea Analysis:
1977
2034
 
1978
- \u60F3\u6CD5\uFF1A"${idea}"
2035
+ Idea: "${idea}"
1979
2036
 
1980
- \u8BF7\u5206\u6790\u5E76\u751F\u6210\u4EFB\u52A1\u5EFA\u8BAE\u3002\u7528\u6237\u786E\u8BA4\u540E\uFF0C\u6267\u884C create_task \u521B\u5EFA\u4EFB\u52A1\u3002`
2037
+ Please analyze and generate task suggestions. After user confirmation, execute create_task to create the task.`
1981
2038
  }
1982
2039
  }
1983
2040
  ]
@@ -2027,7 +2084,7 @@ function createServer2() {
2027
2084
  const server = new Server(
2028
2085
  {
2029
2086
  name: "roadmap-skill",
2030
- version: "0.2.0"
2087
+ version: "0.2.1"
2031
2088
  },
2032
2089
  {
2033
2090
  capabilities: {