Skip to content

Commit c327b38

Browse files
committed
v2.1.0: Reorganize directory structure, add Claude integration, enhance security, and optimize premium tool call costs
1 parent a0c7ab3 commit c327b38

58 files changed

Lines changed: 9301 additions & 4467 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursorrules

Lines changed: 90 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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
88
task.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
2626
task.track_changes = tasktracker changes
2727

28-
# Show statistics (when implemented)
28+
# Show statistics
2929
task.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
3296
create_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
44126
key.ctrl+alt+t = task.get_tasks
45127
key.ctrl+alt+n = task.add_quick "New task from Cursor" feature
46128
key.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
49134
statusbar.left = "TaskTracker: ${task.current_task || 'No task'}"
135+
statusbar.right = "Priority: ${task.current_priority || 'None'}"

.github/workflows/test.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: TaskTracker Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
security_test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: '16'
18+
cache: 'npm'
19+
- name: Install dependencies
20+
run: npm ci
21+
- name: Run security tests
22+
run: node tests/security/security-checks.js
23+
24+
unit_test:
25+
runs-on: ubuntu-latest
26+
needs: security_test
27+
steps:
28+
- uses: actions/checkout@v3
29+
- name: Set up Node.js
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: '16'
33+
cache: 'npm'
34+
- name: Install dependencies
35+
run: npm ci
36+
- name: Run unit tests
37+
run: node tests/unit/tasktracker.test.js
38+
39+
integration_test:
40+
runs-on: ubuntu-latest
41+
needs: unit_test
42+
steps:
43+
- uses: actions/checkout@v3
44+
- name: Set up Node.js
45+
uses: actions/setup-node@v3
46+
with:
47+
node-version: '16'
48+
cache: 'npm'
49+
- name: Install dependencies
50+
run: npm ci
51+
- name: Run integration tests
52+
run: node tests/integration/claude-integration.test.js
53+
54+
cost_optimization_check:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v3
58+
- name: Check for batch templates
59+
run: |
60+
# Ensure Claude batch templates exist
61+
if [ ! -d "examples/claude-templates" ]; then
62+
echo "❌ Claude templates directory missing"
63+
exit 1
64+
fi
65+
66+
# Check for required template files
67+
required_templates=("daily-update.txt" "task-create.txt" "pr-prepare.txt")
68+
for template in "${required_templates[@]}"; do
69+
if [ ! -f "examples/claude-templates/$template" ]; then
70+
echo "❌ Missing template: $template"
71+
exit 1
72+
fi
73+
done
74+
75+
echo "✅ All required templates found"

.gitignore

Lines changed: 62 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17,63 +17,78 @@
1717
# Don't exclude example files
1818
!examples/tasktracker-data/
1919

20-
# Node.js
20+
# Dependencies
2121
node_modules/
22-
npm-debug.log*
23-
yarn-debug.log*
24-
yarn-error.log*
25-
.pnpm-debug.log*
26-
.npm
27-
.eslintcache
22+
npm-debug.log
23+
yarn-debug.log
24+
yarn-error.log
25+
package-lock.json
2826

29-
# Environment variables
30-
.env
31-
.env.*
32-
!.env.example
27+
# Build output
28+
dist/
29+
build/
30+
out/
3331

34-
# OS specific files
35-
.DS_Store
36-
.directory
37-
Thumbs.db
38-
ehthumbs.db
39-
Desktop.ini
40-
$RECYCLE.BIN/
32+
# Testing
33+
coverage/
34+
.nyc_output/
35+
test-results/
36+
tests/temp/*
37+
!tests/temp/.gitkeep
4138

42-
# Editor specific
43-
.vscode/
44-
!examples/.vscode/
45-
!docs/vscode-integration/.vscode/
39+
# IDE and editor files
4640
.idea/
41+
.vscode/
42+
*.sublime-*
4743
*.swp
4844
*.swo
49-
*~
50-
*.sublime-project
51-
*.sublime-workspace
52-
.project
53-
.classpath
54-
.c9/
55-
*.launch
56-
.settings/
45+
.DS_Store
46+
Thumbs.db
5747

58-
# Logs and temp files
59-
logs/
60-
*.log
48+
# Task data - excluding sensitive information
49+
.tasktracker/tasks.json
50+
.tasktracker/personal/
51+
.tasktracker/user-settings.json
52+
.tasktracker/*credentials*
53+
.tasktracker/*secret*
54+
.tasktracker/*token*
55+
.tasktracker/*password*
56+
.tasktracker/*.pem
57+
.tasktracker/*.key
58+
.tasktracker/*private*
59+
60+
# Environment variables and secrets
61+
.env
62+
.env.*
63+
*.pem
64+
*.key
65+
*credentials*
66+
*secret*
67+
*token*
68+
*password*
69+
*private*
70+
71+
# Temporary files
6172
tmp/
6273
temp/
63-
.cache/
74+
*.tmp
75+
*.temp
76+
*.bak
6477

65-
# Testing
66-
coverage/
67-
.nyc_output/
68-
# Allow .gitkeep files in test directories
69-
!tests/temp/.gitkeep
78+
# Logs
79+
logs/
80+
*.log
7081

71-
# Build outputs
72-
dist/
73-
build/
74-
out/
82+
# Cached data
83+
.cache/
84+
.npm/
85+
.eslintcache
7586

76-
# Local SSL certificates
77-
*.pem
78-
*.key
79-
*.crt
87+
# OS specific
88+
._*
89+
.Spotlight-V100
90+
.Trashes
91+
92+
# Custom exclusions
93+
snapshots/
94+
user-settings/

.taskignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,16 @@ npm-debug.log*
3131
yarn-debug.log*
3232
yarn-error.log*
3333
# Add your custom ignore patterns below
34-
test-output/**
34+
test-output/**
35+
# Additional security patterns
36+
.env.*
37+
*credentials*
38+
*secret*
39+
*token*
40+
*password*
41+
*.pem
42+
*.key
43+
*private*
44+
.tasktracker/user-settings.json
45+
# Ensure no personal/sensitive data is tracked
46+
.tasktracker/personal/

.tasktracker/archives.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"archives": [
3+
{
4+
"id": 8,
5+
"title": "Test of silent mode",
6+
"description": "",
7+
"category": "feature",
8+
"status": "todo",
9+
"created": "2025-03-29T13:56:15.651Z",
10+
"lastUpdated": "2025-03-29T13:56:15.652Z",
11+
"createdBy": "DVC2",
12+
"branch": "main",
13+
"relatedFiles": [
14+
"--silent"
15+
],
16+
"comments": [],
17+
"archived": {
18+
"date": "2025-03-30T07:24:37.877Z",
19+
"reason": "Task is no longer needed"
20+
}
21+
},
22+
{
23+
"id": 11,
24+
"title": "Fixed global options issue",
25+
"description": "",
26+
"category": "bugfix",
27+
"status": "todo",
28+
"created": "2025-03-29T14:04:25.496Z",
29+
"lastUpdated": "2025-03-29T14:04:25.498Z",
30+
"createdBy": "DVC2",
31+
"branch": "main",
32+
"relatedFiles": [],
33+
"comments": [],
34+
"archived": {
35+
"date": "2025-03-30T07:24:37.943Z",
36+
"reason": "Duplicate of another task"
37+
}
38+
}
39+
]
40+
}

0 commit comments

Comments
 (0)