roadmap-skill 0.1.4 → 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/CHANGELOG.md +29 -0
- package/README.md +111 -54
- package/README.zh.md +387 -0
- package/dist/index.js +499 -518
- package/dist/index.js.map +1 -1
- package/dist/web/app/assets/main-DZvNWN99.js +9 -0
- package/dist/web/app/index.html +15 -1
- package/dist/web/server.js +166 -150
- package/dist/web/server.js.map +1 -1
- package/package.json +3 -3
- package/dist/web/app/assets/main-Bx7N5Sfv.js +0 -9
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,
|
|
@@ -706,12 +711,13 @@ var batchUpdateTasksTool = {
|
|
|
706
711
|
const existingTask = projectData.tasks[taskIndex];
|
|
707
712
|
let updatedTags = existingTask.tags;
|
|
708
713
|
if (input.tags && input.tags.length > 0) {
|
|
714
|
+
const existingTags = existingTask.tags || [];
|
|
709
715
|
switch (input.tagOperation) {
|
|
710
716
|
case "add":
|
|
711
|
-
updatedTags = [.../* @__PURE__ */ new Set([...
|
|
717
|
+
updatedTags = [.../* @__PURE__ */ new Set([...existingTags, ...input.tags])];
|
|
712
718
|
break;
|
|
713
719
|
case "remove":
|
|
714
|
-
updatedTags =
|
|
720
|
+
updatedTags = existingTags.filter((tag) => !input.tags.includes(tag));
|
|
715
721
|
break;
|
|
716
722
|
case "replace":
|
|
717
723
|
default:
|
|
@@ -1019,170 +1025,205 @@ init_esm_shims();
|
|
|
1019
1025
|
import express from "express";
|
|
1020
1026
|
import * as path4 from "path";
|
|
1021
1027
|
function createServer(port = 7860) {
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
});
|
|
1032
|
-
app.get("/api/projects/:id", async (req, res) => {
|
|
1033
|
-
try {
|
|
1034
|
-
const project = await storage.readProject(req.params.id);
|
|
1035
|
-
if (!project) {
|
|
1036
|
-
res.status(404).json({ error: "Project not found" });
|
|
1037
|
-
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 });
|
|
1038
1037
|
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
res.status(500).json({ error: error.message });
|
|
1051
|
-
}
|
|
1052
|
-
});
|
|
1053
|
-
app.post("/api/projects", async (req, res) => {
|
|
1054
|
-
try {
|
|
1055
|
-
const project = await storage.createProject(req.body);
|
|
1056
|
-
res.json({ success: true, data: project });
|
|
1057
|
-
} catch (error) {
|
|
1058
|
-
res.status(500).json({ error: error.message });
|
|
1059
|
-
}
|
|
1060
|
-
});
|
|
1061
|
-
app.put("/api/projects", async (req, res) => {
|
|
1062
|
-
try {
|
|
1063
|
-
const { projectId, ...updateData } = req.body;
|
|
1064
|
-
const project = await storage.updateProject(projectId, updateData);
|
|
1065
|
-
res.json({ success: true, data: project });
|
|
1066
|
-
} catch (error) {
|
|
1067
|
-
res.status(500).json({ error: error.message });
|
|
1068
|
-
}
|
|
1069
|
-
});
|
|
1070
|
-
app.delete("/api/projects", async (req, res) => {
|
|
1071
|
-
try {
|
|
1072
|
-
const { projectId } = req.query;
|
|
1073
|
-
await storage.deleteProject(projectId);
|
|
1074
|
-
res.json({ success: true });
|
|
1075
|
-
} catch (error) {
|
|
1076
|
-
res.status(500).json({ error: error.message });
|
|
1077
|
-
}
|
|
1078
|
-
});
|
|
1079
|
-
app.post("/api/tasks", async (req, res) => {
|
|
1080
|
-
try {
|
|
1081
|
-
const { projectId, ...taskData } = req.body;
|
|
1082
|
-
const projectData = await storage.readProject(projectId);
|
|
1083
|
-
if (!projectData) {
|
|
1084
|
-
res.status(404).json({ error: "Project not found" });
|
|
1085
|
-
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 });
|
|
1086
1049
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
updatedAt: now,
|
|
1099
|
-
completedAt: null
|
|
1100
|
-
};
|
|
1101
|
-
projectData.tasks.push(task);
|
|
1102
|
-
projectData.project.updatedAt = now;
|
|
1103
|
-
const filePath = storage.getFilePath(projectId);
|
|
1104
|
-
const { writeJsonFile: writeJsonFile2 } = await Promise.resolve().then(() => (init_file_helpers(), file_helpers_exports));
|
|
1105
|
-
await writeJsonFile2(filePath, projectData);
|
|
1106
|
-
res.json({ success: true, data: task });
|
|
1107
|
-
} catch (error) {
|
|
1108
|
-
res.status(500).json({ error: error.message });
|
|
1109
|
-
}
|
|
1110
|
-
});
|
|
1111
|
-
app.put("/api/tasks", async (req, res) => {
|
|
1112
|
-
try {
|
|
1113
|
-
const { projectId, taskId, ...updateData } = req.body;
|
|
1114
|
-
const projectData = await storage.readProject(projectId);
|
|
1115
|
-
if (!projectData) {
|
|
1116
|
-
res.status(404).json({ error: "Project not found" });
|
|
1117
|
-
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 });
|
|
1118
1061
|
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
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 });
|
|
1123
1069
|
}
|
|
1124
|
-
|
|
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
|
-
|
|
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" });
|
|
1151
1183
|
return;
|
|
1152
1184
|
}
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
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`));
|
|
1156
1195
|
return;
|
|
1157
1196
|
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
const filePath = storage.getFilePath(projectId);
|
|
1161
|
-
const { writeJsonFile: writeJsonFile2 } = await Promise.resolve().then(() => (init_file_helpers(), file_helpers_exports));
|
|
1162
|
-
await writeJsonFile2(filePath, projectData);
|
|
1163
|
-
res.json({ success: true });
|
|
1164
|
-
} catch (error) {
|
|
1165
|
-
res.status(500).json({ error: error.message });
|
|
1166
|
-
}
|
|
1167
|
-
});
|
|
1168
|
-
const distPath = path4.join(process.cwd(), "dist", "web", "app");
|
|
1169
|
-
app.use(express.static(distPath));
|
|
1170
|
-
app.get("*", (req, res) => {
|
|
1171
|
-
if (req.path.startsWith("/api")) {
|
|
1172
|
-
res.status(404).json({ error: "API not found" });
|
|
1173
|
-
return;
|
|
1174
|
-
}
|
|
1175
|
-
res.sendFile(path4.join(distPath, "index.html"));
|
|
1176
|
-
});
|
|
1177
|
-
const server = app.listen(port, "0.0.0.0", () => {
|
|
1178
|
-
console.log(`Web interface server running at http://0.0.0.0:${port}`);
|
|
1197
|
+
reject(error);
|
|
1198
|
+
});
|
|
1179
1199
|
});
|
|
1180
|
-
return server;
|
|
1181
1200
|
}
|
|
1182
1201
|
|
|
1183
1202
|
// src/tools/web-tools.ts
|
|
1184
1203
|
import open from "open";
|
|
1185
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
|
+
}
|
|
1186
1227
|
async function openBrowser(url) {
|
|
1187
1228
|
try {
|
|
1188
1229
|
await open(url);
|
|
@@ -1203,20 +1244,34 @@ var openWebInterfaceTool = {
|
|
|
1203
1244
|
}
|
|
1204
1245
|
},
|
|
1205
1246
|
async execute(args) {
|
|
1247
|
+
const requestedPort = args.port || 7860;
|
|
1206
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);
|
|
1207
1255
|
return {
|
|
1208
1256
|
message: "Web interface is already running",
|
|
1209
|
-
url:
|
|
1257
|
+
url: url2
|
|
1210
1258
|
};
|
|
1211
1259
|
}
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
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
|
+
}
|
|
1220
1275
|
}
|
|
1221
1276
|
};
|
|
1222
1277
|
var closeWebInterfaceTool = {
|
|
@@ -1230,12 +1285,15 @@ var closeWebInterfaceTool = {
|
|
|
1230
1285
|
if (!activeServer) {
|
|
1231
1286
|
return { message: "Web interface is not running" };
|
|
1232
1287
|
}
|
|
1233
|
-
|
|
1234
|
-
activeServer
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
}
|
|
1238
|
-
})
|
|
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
|
+
}
|
|
1239
1297
|
}
|
|
1240
1298
|
};
|
|
1241
1299
|
|
|
@@ -1648,412 +1706,335 @@ init_esm_shims();
|
|
|
1648
1706
|
init_esm_shims();
|
|
1649
1707
|
var projectPrompts = [
|
|
1650
1708
|
{
|
|
1651
|
-
name: "
|
|
1652
|
-
description: "
|
|
1709
|
+
name: "recommendNextTasks",
|
|
1710
|
+
description: "Intelligently recommend the next priority tasks based on urgency, due dates, and project status",
|
|
1653
1711
|
arguments: [
|
|
1654
1712
|
{
|
|
1655
|
-
name: "
|
|
1656
|
-
description: "
|
|
1713
|
+
name: "projectId",
|
|
1714
|
+
description: "Specific project ID (optional; if not provided, analyze all projects)",
|
|
1715
|
+
required: false
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
name: "limit",
|
|
1719
|
+
description: "Number of tasks to recommend (default: 3)",
|
|
1657
1720
|
required: false
|
|
1658
1721
|
}
|
|
1659
1722
|
]
|
|
1660
1723
|
},
|
|
1661
1724
|
{
|
|
1662
|
-
name: "
|
|
1663
|
-
description: "
|
|
1725
|
+
name: "autoPrioritize",
|
|
1726
|
+
description: "Automatically analyze tasks and intelligently adjust priorities, considering due dates, dependencies, and project importance",
|
|
1664
1727
|
arguments: [
|
|
1665
1728
|
{
|
|
1666
1729
|
name: "projectId",
|
|
1667
|
-
description: "ID
|
|
1730
|
+
description: "Specific project ID (optional; if not provided, analyze all projects)",
|
|
1668
1731
|
required: false
|
|
1669
1732
|
}
|
|
1670
1733
|
]
|
|
1671
1734
|
},
|
|
1672
1735
|
{
|
|
1673
|
-
name: "
|
|
1674
|
-
description: "
|
|
1675
|
-
arguments: [
|
|
1736
|
+
name: "enhanceTaskDetails",
|
|
1737
|
+
description: "Intelligently enhance task details, including description, acceptance criteria, subtasks, and required resources",
|
|
1738
|
+
arguments: [
|
|
1739
|
+
{
|
|
1740
|
+
name: "taskId",
|
|
1741
|
+
description: "Task ID to be enhanced",
|
|
1742
|
+
required: true
|
|
1743
|
+
}
|
|
1744
|
+
]
|
|
1676
1745
|
},
|
|
1677
1746
|
{
|
|
1678
|
-
name: "
|
|
1679
|
-
description: "
|
|
1747
|
+
name: "quickCapture",
|
|
1748
|
+
description: "Quickly capture ideas/tasks, auto-categorize and suggest priorities",
|
|
1680
1749
|
arguments: [
|
|
1750
|
+
{
|
|
1751
|
+
name: "idea",
|
|
1752
|
+
description: "Idea or task description to be captured",
|
|
1753
|
+
required: true
|
|
1754
|
+
},
|
|
1681
1755
|
{
|
|
1682
1756
|
name: "projectId",
|
|
1683
|
-
description: "
|
|
1757
|
+
description: "Target project ID (optional)",
|
|
1684
1758
|
required: false
|
|
1685
1759
|
}
|
|
1686
1760
|
]
|
|
1687
1761
|
}
|
|
1688
1762
|
];
|
|
1689
|
-
function
|
|
1690
|
-
const
|
|
1763
|
+
function getRecommendNextTasksPrompt(projectId, limit) {
|
|
1764
|
+
const context = projectId ? `Analyze tasks for project ${projectId}` : "Analyze tasks for all active projects";
|
|
1765
|
+
const taskLimit = limit ? parseInt(limit, 10) : 3;
|
|
1691
1766
|
return {
|
|
1692
|
-
description: "
|
|
1767
|
+
description: "Intelligent Task Recommendation Assistant",
|
|
1693
1768
|
messages: [
|
|
1694
1769
|
{
|
|
1695
1770
|
role: "user",
|
|
1696
1771
|
content: {
|
|
1697
1772
|
type: "text",
|
|
1698
|
-
text: `${
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
-
|
|
1704
|
-
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
-
|
|
1716
|
-
-
|
|
1717
|
-
|
|
1718
|
-
##
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1773
|
+
text: `${context}, please recommend the ${taskLimit} tasks I should prioritize next.
|
|
1774
|
+
|
|
1775
|
+
## Recommendation Logic (sorted by priority):
|
|
1776
|
+
|
|
1777
|
+
### 1. Urgent and Important (Critical priority + Near due date)
|
|
1778
|
+
- Critical tasks due today or tomorrow
|
|
1779
|
+
- Overdue high-priority tasks
|
|
1780
|
+
|
|
1781
|
+
### 2. High-Value Tasks (High priority + Clear due date)
|
|
1782
|
+
- High priority tasks due this week
|
|
1783
|
+
- Critical path tasks blocking other work
|
|
1784
|
+
|
|
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
|
|
1788
|
+
|
|
1789
|
+
### 4. Planned Work
|
|
1790
|
+
- Tasks marked "in-progress" but not yet completed
|
|
1791
|
+
- Normal priority tasks due soon
|
|
1792
|
+
|
|
1793
|
+
## Please perform the following steps:
|
|
1794
|
+
|
|
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
|
|
1800
|
+
|
|
1801
|
+
## Output Format:
|
|
1802
|
+
|
|
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]
|
|
1807
|
+
|
|
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]
|
|
1812
|
+
|
|
1813
|
+
### Follow-up
|
|
1814
|
+
3. **Task Name** (Project Name)
|
|
1815
|
+
- Reason: [Why this should be done next]
|
|
1816
|
+
- Suggested Action: [What specifically to do]
|
|
1817
|
+
|
|
1818
|
+
Please use the list_tasks tool to fetch task data, then provide intelligent recommendations.
|
|
1819
|
+
|
|
1820
|
+
## Important Reminder
|
|
1821
|
+
When you start working on recommended tasks, please:
|
|
1822
|
+
1. Use update_task to set task status to in-progress
|
|
1823
|
+
2. After completing the task, use update_task to set status to done
|
|
1824
|
+
3. If blocked or have issues, document in description and update status to review
|
|
1825
|
+
|
|
1826
|
+
Keep task status synchronized with actual progress!`
|
|
1748
1827
|
}
|
|
1749
1828
|
}
|
|
1750
1829
|
]
|
|
1751
1830
|
};
|
|
1752
1831
|
}
|
|
1753
|
-
function
|
|
1754
|
-
const
|
|
1832
|
+
function getAutoPrioritizePrompt(projectId) {
|
|
1833
|
+
const context = projectId ? `Analyze task priorities for project ${projectId}` : "Analyze task priorities for all projects";
|
|
1755
1834
|
return {
|
|
1756
|
-
description: "
|
|
1835
|
+
description: "Intelligent Priority Optimization Assistant",
|
|
1757
1836
|
messages: [
|
|
1758
1837
|
{
|
|
1759
1838
|
role: "user",
|
|
1760
1839
|
content: {
|
|
1761
1840
|
type: "text",
|
|
1762
|
-
text: `${
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
-
|
|
1780
|
-
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
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
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
3. Prioritize today's work
|
|
1820
|
-
4. Update task statuses
|
|
1821
|
-
|
|
1822
|
-
**Weekly Review**:
|
|
1823
|
-
1. Review completed tasks
|
|
1824
|
-
2. Assess progress toward milestones
|
|
1825
|
-
3. Reprioritize upcoming work
|
|
1826
|
-
4. Identify blockers
|
|
1827
|
-
|
|
1828
|
-
What would you like to work on? You can:
|
|
1829
|
-
- View tasks by status
|
|
1830
|
-
- Create new tasks
|
|
1831
|
-
- Update existing tasks
|
|
1832
|
-
- Search for specific tasks
|
|
1833
|
-
- Get an overview of task distribution`
|
|
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.`
|
|
1834
1898
|
}
|
|
1835
1899
|
}
|
|
1836
1900
|
]
|
|
1837
1901
|
};
|
|
1838
1902
|
}
|
|
1839
|
-
function
|
|
1903
|
+
function getEnhanceTaskDetailsPrompt(taskId) {
|
|
1840
1904
|
return {
|
|
1841
|
-
description: "
|
|
1905
|
+
description: "Task Detail Enhancement Assistant",
|
|
1842
1906
|
messages: [
|
|
1843
1907
|
{
|
|
1844
1908
|
role: "user",
|
|
1845
1909
|
content: {
|
|
1846
1910
|
type: "text",
|
|
1847
|
-
text: `
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
-
|
|
1861
|
-
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
###
|
|
1874
|
-
|
|
1875
|
-
-
|
|
1876
|
-
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
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:
|
|
1955
|
+
|
|
1956
|
+
\`\`\`
|
|
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]
|
|
1973
|
+
\`\`\`
|
|
1974
|
+
|
|
1975
|
+
Please fetch task info first, then provide detailed enhancement suggestions.`
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
]
|
|
1979
|
+
};
|
|
1980
|
+
}
|
|
1981
|
+
function getQuickCapturePrompt(idea, projectId) {
|
|
1982
|
+
const projectContext = projectId ? `Add to project ${projectId}` : "Auto-select the most suitable project";
|
|
1983
|
+
return {
|
|
1984
|
+
description: "Quick Capture Assistant",
|
|
1985
|
+
messages: [
|
|
1986
|
+
{
|
|
1987
|
+
role: "user",
|
|
1988
|
+
content: {
|
|
1989
|
+
type: "text",
|
|
1990
|
+
text: `I want to quickly capture an idea/task: "${idea}"
|
|
1882
1991
|
|
|
1883
|
-
|
|
1884
|
-
- Critical tasks overdue
|
|
1885
|
-
- Missed milestones
|
|
1886
|
-
- No recent progress
|
|
1992
|
+
${projectContext}
|
|
1887
1993
|
|
|
1888
|
-
##
|
|
1994
|
+
## Please help me complete the following steps:
|
|
1889
1995
|
|
|
1890
|
-
###
|
|
1891
|
-
|
|
1892
|
-
-
|
|
1893
|
-
-
|
|
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)
|
|
1894
2002
|
|
|
1895
|
-
###
|
|
1896
|
-
|
|
1897
|
-
-
|
|
1898
|
-
-
|
|
1899
|
-
-
|
|
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
|
|
1900
2008
|
|
|
1901
|
-
###
|
|
1902
|
-
|
|
1903
|
-
-
|
|
1904
|
-
-
|
|
1905
|
-
-
|
|
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)
|
|
1906
2014
|
|
|
1907
|
-
|
|
2015
|
+
### 4. Generate Task
|
|
2016
|
+
Use create_task to create the task
|
|
1908
2017
|
|
|
1909
|
-
|
|
1910
|
-
|
|
2018
|
+
### 5. Status Recommendation
|
|
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.
|
|
1911
2020
|
|
|
1912
|
-
|
|
1913
|
-
Shows all tasks where due date < today and status != done
|
|
2021
|
+
## Example:
|
|
1914
2022
|
|
|
1915
|
-
**"
|
|
1916
|
-
Identifies projects with overdue critical/high priority tasks
|
|
2023
|
+
**Input**: "User reported login page doesn't display correctly on mobile"
|
|
1917
2024
|
|
|
1918
|
-
**
|
|
1919
|
-
|
|
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]
|
|
1920
2032
|
|
|
1921
|
-
##
|
|
2033
|
+
## Current Idea Analysis:
|
|
1922
2034
|
|
|
1923
|
-
|
|
1924
|
-
2. **Celebrate Wins**: Review recently completed tasks
|
|
1925
|
-
3. **Plan Ahead**: Look at upcoming milestones and deadlines
|
|
1926
|
-
4. **Clean Up**: Archive completed projects
|
|
2035
|
+
Idea: "${idea}"
|
|
1927
2036
|
|
|
1928
|
-
|
|
1929
|
-
- A summary of all projects
|
|
1930
|
-
- Overdue tasks across all projects
|
|
1931
|
-
- Progress statistics
|
|
1932
|
-
- Specific project details`
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
]
|
|
1936
|
-
};
|
|
1937
|
-
}
|
|
1938
|
-
function getMilestoneReviewPrompt(projectId) {
|
|
1939
|
-
const projectContext = projectId ? `Reviewing milestones for project: ${projectId}` : "Reviewing milestones across all projects";
|
|
1940
|
-
return {
|
|
1941
|
-
description: "Milestone Review Assistant",
|
|
1942
|
-
messages: [
|
|
1943
|
-
{
|
|
1944
|
-
role: "user",
|
|
1945
|
-
content: {
|
|
1946
|
-
type: "text",
|
|
1947
|
-
text: `${projectContext}
|
|
1948
|
-
|
|
1949
|
-
I'll help you review and evaluate your project milestones. Milestones are key checkpoints that help track significant progress.
|
|
1950
|
-
|
|
1951
|
-
## Milestone Review Framework
|
|
1952
|
-
|
|
1953
|
-
### What is a Milestone?
|
|
1954
|
-
A milestone represents a significant achievement or checkpoint in your project:
|
|
1955
|
-
- Major deliverable completion
|
|
1956
|
-
- Phase transition
|
|
1957
|
-
- Key decision point
|
|
1958
|
-
- External deadline
|
|
1959
|
-
|
|
1960
|
-
### Milestone Status Types
|
|
1961
|
-
- **Not Started**: Target date in future, no work completed
|
|
1962
|
-
- **In Progress**: Work ongoing toward milestone
|
|
1963
|
-
- **At Risk**: May not meet target date
|
|
1964
|
-
- **Completed**: Achieved and marked complete
|
|
1965
|
-
- **Missed**: Target date passed without completion
|
|
1966
|
-
|
|
1967
|
-
## Review Checklist
|
|
1968
|
-
|
|
1969
|
-
### For Each Milestone, Ask:
|
|
1970
|
-
|
|
1971
|
-
1. **Relevance**
|
|
1972
|
-
- Is this milestone still relevant to project goals?
|
|
1973
|
-
- Does it represent meaningful progress?
|
|
1974
|
-
- Are the success criteria clear?
|
|
1975
|
-
|
|
1976
|
-
2. **Timeline**
|
|
1977
|
-
- Is the target date realistic?
|
|
1978
|
-
- Are there dependencies blocking progress?
|
|
1979
|
-
- Do we need to adjust the date?
|
|
1980
|
-
|
|
1981
|
-
3. **Progress**
|
|
1982
|
-
- What percentage complete is this milestone?
|
|
1983
|
-
- Which tasks contribute to this milestone?
|
|
1984
|
-
- Are there blockers or risks?
|
|
1985
|
-
|
|
1986
|
-
4. **Completion Criteria**
|
|
1987
|
-
- What defines "complete" for this milestone?
|
|
1988
|
-
- Are there acceptance criteria?
|
|
1989
|
-
- Who needs to sign off?
|
|
1990
|
-
|
|
1991
|
-
## Milestone Management Actions
|
|
1992
|
-
|
|
1993
|
-
### Creating Milestones
|
|
1994
|
-
Best practices for new milestones:
|
|
1995
|
-
- Use clear, descriptive names
|
|
1996
|
-
- Set realistic target dates
|
|
1997
|
-
- Define completion criteria
|
|
1998
|
-
- Link related tasks
|
|
1999
|
-
|
|
2000
|
-
### Updating Milestones
|
|
2001
|
-
Common updates during review:
|
|
2002
|
-
- Adjust target dates based on progress
|
|
2003
|
-
- Update descriptions to reflect scope changes
|
|
2004
|
-
- Mark completed when criteria met
|
|
2005
|
-
- Archive obsolete milestones
|
|
2006
|
-
|
|
2007
|
-
### Tracking Progress
|
|
2008
|
-
Ways to monitor milestone health:
|
|
2009
|
-
- Percentage of linked tasks complete
|
|
2010
|
-
- Time remaining vs. work remaining
|
|
2011
|
-
- Risk assessment (low/medium/high)
|
|
2012
|
-
- Dependency status
|
|
2013
|
-
|
|
2014
|
-
## Example Milestone Review
|
|
2015
|
-
|
|
2016
|
-
**Project**: Website Redesign
|
|
2017
|
-
**Milestone**: Design Phase Complete
|
|
2018
|
-
**Target Date**: March 15, 2024
|
|
2019
|
-
|
|
2020
|
-
**Review Questions**:
|
|
2021
|
-
- \u2713 Relevance: Still critical path item
|
|
2022
|
-
- \u26A0 Timeline: 5 days remaining, 60% complete
|
|
2023
|
-
- Progress: 3 of 5 design tasks done
|
|
2024
|
-
- Risks: User research taking longer than expected
|
|
2025
|
-
|
|
2026
|
-
**Decision**: Extend target date by 3 days, add resources to user research
|
|
2027
|
-
|
|
2028
|
-
## Review Schedule Recommendations
|
|
2029
|
-
|
|
2030
|
-
### Weekly
|
|
2031
|
-
- Quick check of upcoming milestones (next 2 weeks)
|
|
2032
|
-
- Identify any at-risk items
|
|
2033
|
-
|
|
2034
|
-
### Monthly
|
|
2035
|
-
- Full review of all active milestones
|
|
2036
|
-
- Adjust timelines as needed
|
|
2037
|
-
- Celebrate completed milestones
|
|
2038
|
-
|
|
2039
|
-
### Quarterly
|
|
2040
|
-
- Strategic review of milestone alignment
|
|
2041
|
-
- Archive completed project milestones
|
|
2042
|
-
- Plan next quarter's milestones
|
|
2043
|
-
|
|
2044
|
-
## Metrics to Track
|
|
2045
|
-
|
|
2046
|
-
- **Milestone Completion Rate**: % of milestones completed on time
|
|
2047
|
-
- **Average Delay**: How often and by how much dates slip
|
|
2048
|
-
- **Scope Changes**: Number of milestones added/removed
|
|
2049
|
-
- **Predictability**: Variance between planned and actual dates
|
|
2050
|
-
|
|
2051
|
-
What would you like to do?
|
|
2052
|
-
- Review milestones for a specific project
|
|
2053
|
-
- Identify at-risk milestones
|
|
2054
|
-
- Plan new milestones
|
|
2055
|
-
- Analyze milestone performance
|
|
2056
|
-
- Update existing milestones`
|
|
2037
|
+
Please analyze and generate task suggestions. After user confirmation, execute create_task to create the task.`
|
|
2057
2038
|
}
|
|
2058
2039
|
}
|
|
2059
2040
|
]
|
|
@@ -2061,14 +2042,14 @@ What would you like to do?
|
|
|
2061
2042
|
}
|
|
2062
2043
|
function getPromptByName(name, args) {
|
|
2063
2044
|
switch (name) {
|
|
2064
|
-
case "
|
|
2065
|
-
return
|
|
2066
|
-
case "
|
|
2067
|
-
return
|
|
2068
|
-
case "
|
|
2069
|
-
return
|
|
2070
|
-
case "
|
|
2071
|
-
return
|
|
2045
|
+
case "recommendNextTasks":
|
|
2046
|
+
return getRecommendNextTasksPrompt(args?.projectId, args?.limit);
|
|
2047
|
+
case "autoPrioritize":
|
|
2048
|
+
return getAutoPrioritizePrompt(args?.projectId);
|
|
2049
|
+
case "enhanceTaskDetails":
|
|
2050
|
+
return getEnhanceTaskDetailsPrompt(args?.taskId || "");
|
|
2051
|
+
case "quickCapture":
|
|
2052
|
+
return getQuickCapturePrompt(args?.idea || "", args?.projectId);
|
|
2072
2053
|
default:
|
|
2073
2054
|
return null;
|
|
2074
2055
|
}
|
|
@@ -2103,7 +2084,7 @@ function createServer2() {
|
|
|
2103
2084
|
const server = new Server(
|
|
2104
2085
|
{
|
|
2105
2086
|
name: "roadmap-skill",
|
|
2106
|
-
version: "0.1
|
|
2087
|
+
version: "0.2.1"
|
|
2107
2088
|
},
|
|
2108
2089
|
{
|
|
2109
2090
|
capabilities: {
|