1- # TaskTracker cursor integration rules
2- # These rules provide enhanced TaskTracker functionality within Cursor IDE
1+ # TaskTracker Cursor Integration
2+ # This file enhances TaskTracker functionality within Cursor IDE
33
44# Get current tasktracker tasks
5- task.get_tasks = tasktracker list
5+ task.get_tasks = tasktracker list --minimal
66
77# Get task details
88task.view_task = tasktracker view $1
@@ -25,9 +25,73 @@ task.add_file = tasktracker update $1 addfile "${cursor.file}"
2525# Track file changes and link to tasks
2626task.track_changes = tasktracker changes
2727
28- # Show statistics (when implemented)
28+ # Show statistics
2929task.stats = tasktracker snapshot
3030
31+ # Generate task context for AI assistant
32+ task.context = tasktracker ai-context $1
33+
34+ # Show burndown chart
35+ task.burndown = ./lib/burndown-chart.js --format=ascii
36+
37+ # Run batch commands to save premium tool calls
38+ task.batch = ./bin/tasktracker-batch $1
39+
40+ # Show dependencies
41+ task.deps = tasktracker list --json | jq '[.tasks[] | select(.dependencies != null or .blockedBy != null)]'
42+
43+ # Create a PR description from task
44+ task.pr_desc = |
45+ function generatePrDescription() {
46+ const taskId = process.argv[2];
47+ if (!taskId) {
48+ console.log("Usage: task.pr_desc <task_id>");
49+ return;
50+ }
51+
52+ const { execSync } = require('child_process');
53+ const result = execSync(`tasktracker view ${taskId} --json`).toString();
54+ const task = JSON.parse(result);
55+
56+ let description = `## Task #${task.id}: ${task.title}\n\n`;
57+
58+ if (task.description) {
59+ description += `${task.description}\n\n`;
60+ }
61+
62+ description += `**Category:** ${task.category}\n`;
63+
64+ if (task.priority) {
65+ description += `**Priority:** ${task.priority}\n`;
66+ }
67+
68+ if (task.relatedFiles && task.relatedFiles.length > 0) {
69+ description += `\n### Files Changed\n`;
70+ task.relatedFiles.forEach(file => {
71+ description += `- \`${file}\`\n`;
72+ });
73+ }
74+
75+ if (task.checklists && task.checklists.length > 0) {
76+ description += `\n### Checklist\n`;
77+
78+ task.checklists.forEach(checklist => {
79+ description += `\n#### ${checklist.title}\n`;
80+
81+ checklist.items.forEach(item => {
82+ const checkbox = item.completed ? 'x' : ' ';
83+ description += `- [${checkbox}] ${item.text}\n`;
84+ });
85+ });
86+ }
87+
88+ description += `\nResolves #${task.id}`;
89+
90+ console.log(description);
91+ }
92+
93+ generatePrDescription();
94+
3195# When creating a cursor task with TaskTracker, this adds a helpful comment template
3296create_task.template = """
3397/**
@@ -37,13 +101,35 @@ create_task.template = """
37101 *
38102 * Description:
39103 * ${task.description}
104+ *
105+ * Related Files:
106+ * ${task.relatedFiles?.join('\n * ')}
107+ *
108+ * Dependencies:
109+ * ${task.dependencies?.map(id => `#${id}`).join(', ')}
110+ */
111+ """
112+
113+ # Generate documentation comment
114+ task.doc_comment = """
115+ /**
116+ * ${1:Function description}
117+ *
118+ * Related to Task #${2:taskId}: ${3:taskTitle}
119+ *
120+ * @param {${4:Type}} ${5:paramName} - ${6:Description}
121+ * @returns {${7:Type}} ${8:Description}
40122 */
41123"""
42124
43125# Custom key bindings for TaskTracker
44126key.ctrl+alt+t = task.get_tasks
45127key.ctrl+alt+n = task.add_quick "New task from Cursor" feature
46128key.ctrl+alt+c = task.track_changes
129+ key.ctrl+alt+v = task.view_task ${cursor.selected}
130+ key.ctrl+alt+d = task.status_done ${cursor.selected}
131+ key.ctrl+shift+b = task.burndown --format=ascii
47132
48133# Add cursor status bar integration
49134statusbar.left = "TaskTracker: ${task.current_task || 'No task'}"
135+ statusbar.right = "Priority: ${task.current_priority || 'None'}"
0 commit comments