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 +426 -369
- package/dist/index.js.map +1 -1
- package/dist/web/app/assets/main-DZvNWN99.js +9 -0
- package/dist/web/app/index.html +38 -0
- package/dist/web/server.js +452 -0
- package/dist/web/server.js.map +1 -0
- package/package.json +2 -2
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
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
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
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
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
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
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
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
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
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
...
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
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
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
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
|
-
|
|
1160
|
-
|
|
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:
|
|
1257
|
+
url: url2
|
|
1211
1258
|
};
|
|
1212
1259
|
}
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
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
|
-
|
|
1235
|
-
activeServer
|
|
1236
|
-
|
|
1237
|
-
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
1748
|
+
description: "Quickly capture ideas/tasks, auto-categorize and suggest priorities",
|
|
1692
1749
|
arguments: [
|
|
1693
1750
|
{
|
|
1694
1751
|
name: "idea",
|
|
1695
|
-
description: "
|
|
1752
|
+
description: "Idea or task description to be captured",
|
|
1696
1753
|
required: true
|
|
1697
1754
|
},
|
|
1698
1755
|
{
|
|
1699
1756
|
name: "projectId",
|
|
1700
|
-
description: "
|
|
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 ?
|
|
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: "
|
|
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}
|
|
1773
|
+
text: `${context}, please recommend the ${taskLimit} tasks I should prioritize next.
|
|
1717
1774
|
|
|
1718
|
-
##
|
|
1775
|
+
## Recommendation Logic (sorted by priority):
|
|
1719
1776
|
|
|
1720
|
-
### 1.
|
|
1721
|
-
-
|
|
1722
|
-
-
|
|
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.
|
|
1725
|
-
-
|
|
1726
|
-
-
|
|
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.
|
|
1729
|
-
-
|
|
1730
|
-
-
|
|
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.
|
|
1733
|
-
-
|
|
1734
|
-
-
|
|
1789
|
+
### 4. Planned Work
|
|
1790
|
+
- Tasks marked "in-progress" but not yet completed
|
|
1791
|
+
- Normal priority tasks due soon
|
|
1735
1792
|
|
|
1736
|
-
##
|
|
1793
|
+
## Please perform the following steps:
|
|
1737
1794
|
|
|
1738
|
-
1.
|
|
1739
|
-
2.
|
|
1740
|
-
3.
|
|
1741
|
-
4.
|
|
1742
|
-
5.
|
|
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
|
-
##
|
|
1801
|
+
## Output Format:
|
|
1745
1802
|
|
|
1746
|
-
###
|
|
1747
|
-
1.
|
|
1748
|
-
-
|
|
1749
|
-
-
|
|
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
|
-
###
|
|
1752
|
-
2.
|
|
1753
|
-
-
|
|
1754
|
-
-
|
|
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
|
-
###
|
|
1757
|
-
3.
|
|
1758
|
-
-
|
|
1759
|
-
-
|
|
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
|
-
|
|
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 ?
|
|
1833
|
+
const context = projectId ? `Analyze task priorities for project ${projectId}` : "Analyze task priorities for all projects";
|
|
1777
1834
|
return {
|
|
1778
|
-
description: "
|
|
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}
|
|
1785
|
-
|
|
1786
|
-
##
|
|
1787
|
-
|
|
1788
|
-
###
|
|
1789
|
-
- [ ]
|
|
1790
|
-
- [ ]
|
|
1791
|
-
- [ ]
|
|
1792
|
-
- [ ]
|
|
1793
|
-
|
|
1794
|
-
###
|
|
1795
|
-
- [ ]
|
|
1796
|
-
- [ ]
|
|
1797
|
-
- [ ]
|
|
1798
|
-
- [ ]
|
|
1799
|
-
|
|
1800
|
-
###
|
|
1801
|
-
- [ ]
|
|
1802
|
-
- [ ]
|
|
1803
|
-
- [ ]
|
|
1804
|
-
|
|
1805
|
-
###
|
|
1806
|
-
-
|
|
1807
|
-
-
|
|
1808
|
-
-
|
|
1809
|
-
|
|
1810
|
-
##
|
|
1811
|
-
|
|
1812
|
-
1.
|
|
1813
|
-
2.
|
|
1814
|
-
-
|
|
1815
|
-
-
|
|
1816
|
-
-
|
|
1817
|
-
3.
|
|
1818
|
-
4.
|
|
1819
|
-
|
|
1820
|
-
##
|
|
1821
|
-
|
|
1822
|
-
###
|
|
1823
|
-
|
|
|
1824
|
-
|
|
1825
|
-
| XXX | high \u2192 critical |
|
|
1826
|
-
|
|
1827
|
-
###
|
|
1828
|
-
|
|
|
1829
|
-
|
|
1830
|
-
| XXX | medium \u2192 high |
|
|
1831
|
-
|
|
1832
|
-
###
|
|
1833
|
-
|
|
|
1834
|
-
|
|
1835
|
-
| XXX | high \u2192 medium |
|
|
1836
|
-
|
|
1837
|
-
###
|
|
1838
|
-
-
|
|
1839
|
-
|
|
1840
|
-
|
|
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: "
|
|
1905
|
+
description: "Task Detail Enhancement Assistant",
|
|
1849
1906
|
messages: [
|
|
1850
1907
|
{
|
|
1851
1908
|
role: "user",
|
|
1852
1909
|
content: {
|
|
1853
1910
|
type: "text",
|
|
1854
|
-
text:
|
|
1855
|
-
|
|
1856
|
-
##
|
|
1857
|
-
|
|
1858
|
-
### 1.
|
|
1859
|
-
-
|
|
1860
|
-
-
|
|
1861
|
-
-
|
|
1862
|
-
|
|
1863
|
-
### 2.
|
|
1864
|
-
|
|
1865
|
-
- [ ]
|
|
1866
|
-
- [ ]
|
|
1867
|
-
- [ ]
|
|
1868
|
-
- [ ]
|
|
1869
|
-
|
|
1870
|
-
### 3.
|
|
1871
|
-
-
|
|
1872
|
-
-
|
|
1873
|
-
-
|
|
1874
|
-
|
|
1875
|
-
### 4.
|
|
1876
|
-
-
|
|
1877
|
-
-
|
|
1878
|
-
-
|
|
1879
|
-
|
|
1880
|
-
### 5.
|
|
1881
|
-
|
|
1882
|
-
-
|
|
1883
|
-
-
|
|
1884
|
-
-
|
|
1885
|
-
|
|
1886
|
-
##
|
|
1887
|
-
|
|
1888
|
-
1.
|
|
1889
|
-
2.
|
|
1890
|
-
3.
|
|
1891
|
-
-
|
|
1892
|
-
-
|
|
1893
|
-
-
|
|
1894
|
-
-
|
|
1895
|
-
4.
|
|
1896
|
-
|
|
1897
|
-
##
|
|
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
|
-
##
|
|
1901
|
-
[
|
|
1902
|
-
|
|
1903
|
-
##
|
|
1904
|
-
- [ ] [
|
|
1905
|
-
- [ ] [
|
|
1906
|
-
- [ ] [
|
|
1907
|
-
|
|
1908
|
-
##
|
|
1909
|
-
-
|
|
1910
|
-
-
|
|
1911
|
-
-
|
|
1912
|
-
|
|
1913
|
-
##
|
|
1914
|
-
-
|
|
1915
|
-
-
|
|
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
|
-
|
|
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 ?
|
|
1982
|
+
const projectContext = projectId ? `Add to project ${projectId}` : "Auto-select the most suitable project";
|
|
1926
1983
|
return {
|
|
1927
|
-
description: "
|
|
1984
|
+
description: "Quick Capture Assistant",
|
|
1928
1985
|
messages: [
|
|
1929
1986
|
{
|
|
1930
1987
|
role: "user",
|
|
1931
1988
|
content: {
|
|
1932
1989
|
type: "text",
|
|
1933
|
-
text:
|
|
1990
|
+
text: `I want to quickly capture an idea/task: "${idea}"
|
|
1934
1991
|
|
|
1935
1992
|
${projectContext}
|
|
1936
1993
|
|
|
1937
|
-
##
|
|
1994
|
+
## Please help me complete the following steps:
|
|
1938
1995
|
|
|
1939
|
-
### 1.
|
|
1940
|
-
|
|
1941
|
-
-
|
|
1942
|
-
-
|
|
1943
|
-
-
|
|
1944
|
-
-
|
|
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.
|
|
1947
|
-
|
|
1948
|
-
-
|
|
1949
|
-
-
|
|
1950
|
-
-
|
|
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.
|
|
1953
|
-
|
|
1954
|
-
-
|
|
1955
|
-
-
|
|
1956
|
-
-
|
|
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.
|
|
1959
|
-
|
|
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
|
-
##
|
|
2021
|
+
## Example:
|
|
1965
2022
|
|
|
1966
|
-
|
|
2023
|
+
**Input**: "User reported login page doesn't display correctly on mobile"
|
|
1967
2024
|
|
|
1968
|
-
|
|
1969
|
-
-
|
|
1970
|
-
-
|
|
1971
|
-
-
|
|
1972
|
-
-
|
|
1973
|
-
-
|
|
1974
|
-
-
|
|
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
|
-
##
|
|
2033
|
+
## Current Idea Analysis:
|
|
1977
2034
|
|
|
1978
|
-
|
|
2035
|
+
Idea: "${idea}"
|
|
1979
2036
|
|
|
1980
|
-
|
|
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.
|
|
2087
|
+
version: "0.2.1"
|
|
2031
2088
|
},
|
|
2032
2089
|
{
|
|
2033
2090
|
capabilities: {
|