Skip to content

Commit 2f9d7c7

Browse files
committed
feat: TaskTracker 3.0.0 - Complete rewrite as developer context journal for AI-assisted development
1 parent ce5d2f2 commit 2f9d7c7

104 files changed

Lines changed: 7471 additions & 20905 deletions

File tree

Some content is hidden

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

.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
env: {
3+
node: true,
4+
es2021: true,
5+
mocha: true, // Assuming Mocha is used for tests
6+
},
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:node/recommended', // Enforce Node.js best practices
10+
],
11+
parserOptions: {
12+
ecmaVersion: 12,
13+
},
14+
rules: {
15+
'node/no-unpublished-require': 'off', // Allow requiring devDependencies in test/script files if needed
16+
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], // Warn about unused variables, ignore if prefixed with _
17+
'node/no-missing-require': 'off', // Often flags dynamic requires incorrectly
18+
// Add any project-specific rules here
19+
},
20+
overrides: [
21+
{
22+
files: ['tests/**/*.js'], // Specific rules for test files
23+
rules: {
24+
'node/no-unpublished-require': 'off',
25+
'node/no-unpublished-import': 'off', // Allow importing unpublished modules in tests
26+
'node/no-unsupported-features/es-syntax': ['error', {
27+
ignores: ['modules', 'dynamicImport'] // Allow dynamic imports in test files
28+
}]
29+
}
30+
}
31+
]
32+
};

.github/copilot/tasktracker-commands.md

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,77 +11,64 @@ This document helps GitHub Copilot understand TaskTracker commands and functiona
1111
- List tasks by status: `tt list todo`
1212
- View task details: `tt view <id>`
1313
- Update a task: `tt update <id> <field> <value>`
14-
- Track changes: `tt changes`
15-
- Create a release: `tt release`
16-
- Generate AI context: `tt ai-context`
17-
- View task statistics: `tt stats`
14+
- Generate AI context: `tt ai-context <id_or_path>`
1815

1916
## Task Status Commands
2017

2118
- Mark as todo: `tt update <id> status todo`
2219
- Mark as in progress: `tt update <id> status in-progress`
23-
- Mark as in review: `tt update <id> status review`
2420
- Mark as done: `tt update <id> status done`
21+
- Mark as blocked: `tt update <id> status blocked`
2522

2623
## Task Fields
2724

2825
Update these fields with the `update` command:
29-
- status: The task status (todo, in-progress, review, done)
30-
- category: The type of task (feature, bugfix, refactor, docs, test, chore)
26+
- status: The task status (e.g., todo, in_progress, done, blocked)
27+
- category: The type of task (e.g., feature, bugfix, refactor, docs, test, chore)
3128
- title: The task title
3229
- description: The task description
3330
- add-file: Add a file to the task
3431
- remove-file: Remove a file from the task
35-
- comment: Add a comment to the task
36-
- priority: Set priority (p0-critical, p1-high, p2-medium, p3-low)
37-
- effort: Set effort (1-trivial, 2-small, 3-medium, 5-large, 8-xlarge)
38-
39-
## Archive Management
40-
41-
- Archive a task: `tt archive <id> [reason]`
42-
- Restore a task: `tt restore <id>`
43-
- List archived tasks: `tt archives`
32+
- priority: Set priority (e.g., low, medium, high, urgent)
4433

4534
## Example Usage
4635

4736
```bash
4837
# Add a new feature task
49-
tt quick "Implement login page" feature
38+
tt quick "Implement login page" feature --priority high
5039

5140
# Mark task #3 as in progress
5241
tt update 3 status in-progress
5342

54-
# Add a comment to task #3
55-
tt update 3 comment "Working on this now, should be done by tomorrow"
56-
5743
# Link a file to task #3
5844
tt update 3 add-file src/components/Login.js
5945

6046
# View details of task #3
6147
tt view 3
6248

63-
# Generate AI context for Claude
64-
tt ai-context > ai-prompt.txt
49+
# Generate AI context for task 3
50+
tt ai-context 3 > ai-prompt.txt
51+
52+
# Generate AI context including file content for a specific file
53+
tt ai-context src/components/Login.js > ai-prompt.txt
6554
```
6655

6756
## Aliases
6857

6958
- Common aliases are built into the command system
7059
- `ls` is an alias for `list`
71-
- `files` is an alias for `changes`
7260
- `status` is an alias for `list`
7361

7462
## Architecture Notes
7563

7664
- TaskTracker uses a modular command registry pattern
7765
- Each command is in its own module in the `lib/commands` directory
7866
- Core services are in the `lib/core` directory
79-
- Refactored in v2.0.0 from monolithic script to modular architecture
8067

8168
## For AI Assistants
8269

8370
When asked to perform task-related actions:
8471
1. Suggest using the appropriate TaskTracker command
85-
2. Use `tt` for all commands (preferred over the longer `tasktracker`)
72+
2. Use `tt` for all commands
8673
3. Format task titles clearly with proper quotes
87-
4. Use `tt ai-context` to generate context for AI-assisted work
74+
4. Use `tt ai-context <task_id_or_file_path>` to generate context for AI-assisted work

.github/workflows/test.yml

Lines changed: 43 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -7,108 +7,8 @@ on:
77
branches: [ main ]
88

99
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/run-tests.js security
23-
24-
json_parsing_test:
25-
runs-on: ubuntu-latest
26-
steps:
27-
- uses: actions/checkout@v3
28-
- name: Set up Node.js
29-
uses: actions/setup-node@v3
30-
with:
31-
node-version: '16'
32-
cache: 'npm'
33-
- name: Install dependencies
34-
run: npm ci
35-
- name: Test JSON parsing error handling
36-
run: |
37-
# Create test script
38-
echo "
39-
/**
40-
* Simple JSON Parsing Test
41-
*/
42-
43-
const { safeJsonParse } = require('./lib/utils/security-middleware');
44-
const { formatJsonResult } = require('./lib/utils/structured-output');
45-
46-
let allTestsPassed = true;
47-
let testsRun = 0;
48-
49-
function runTest(name, testFn) {
50-
testsRun++;
51-
console.log(\`\n=== Testing \${name} ===\`);
52-
try {
53-
const passed = testFn();
54-
console.log(\`Test passed: \${passed}\`);
55-
if (!passed) allTestsPassed = false;
56-
return passed;
57-
} catch (error) {
58-
console.error(\`Test failed: \${error.message}\`);
59-
allTestsPassed = false;
60-
return false;
61-
}
62-
}
63-
64-
// Test valid JSON
65-
runTest('Valid JSON', () => {
66-
const validJson = '{\"name\":\"test\",\"value\":42}';
67-
const validResult = safeJsonParse(validJson);
68-
return validResult.name === 'test' && validResult.value === 42;
69-
});
70-
71-
// Test empty string
72-
runTest('Empty String', () => {
73-
const emptyResult = safeJsonParse('', { default: true });
74-
return emptyResult.default === true;
75-
});
76-
77-
// Test malformed JSON
78-
runTest('Malformed JSON', () => {
79-
const malformedJson = '{name: \"test\"}';
80-
const malformedResult = safeJsonParse(malformedJson, { default: true });
81-
return malformedResult.default === true;
82-
});
83-
84-
// Test non-string input
85-
runTest('Non-String Input', () => {
86-
const nullResult = safeJsonParse(null, { default: true });
87-
return nullResult.default === true;
88-
});
89-
90-
// Test circular references
91-
runTest('Circular References', () => {
92-
const obj = { name: 'circular' };
93-
obj.self = obj; // Create circular reference
94-
const circularResult = formatJsonResult(obj);
95-
return circularResult.success === true &&
96-
circularResult.data.name === 'circular' &&
97-
typeof circularResult.data.self === 'string';
98-
});
99-
100-
console.log(\`\n=== Testing Complete ===\`);
101-
console.log(\`\${testsRun} tests run, all tests passed: \${allTestsPassed}\`);
102-
103-
process.exit(allTestsPassed ? 0 : 1);
104-
" > json-parsing-test.js
105-
106-
# Run the test
107-
node json-parsing-test.js
108-
10910
unit_test:
11011
runs-on: ubuntu-latest
111-
needs: [security_test, json_parsing_test]
11212
steps:
11313
- uses: actions/checkout@v3
11414
- name: Set up Node.js
@@ -119,11 +19,10 @@ jobs:
11919
- name: Install dependencies
12020
run: npm ci
12121
- name: Run unit tests
122-
run: node tests/run-tests.js unit
22+
run: npm test
12323

124-
integration_test:
24+
lint_check:
12525
runs-on: ubuntu-latest
126-
needs: unit_test
12726
steps:
12827
- uses: actions/checkout@v3
12928
- name: Set up Node.js
@@ -133,12 +32,12 @@ jobs:
13332
cache: 'npm'
13433
- name: Install dependencies
13534
run: npm ci
136-
- name: Run integration tests
137-
run: node tests/run-tests.js integration
35+
- name: Run lint check
36+
run: npm run lint:check
13837

139-
performance_test:
38+
cli_test:
14039
runs-on: ubuntu-latest
141-
needs: integration_test
40+
needs: unit_test
14241
steps:
14342
- uses: actions/checkout@v3
14443
- name: Set up Node.js
@@ -148,8 +47,29 @@ jobs:
14847
cache: 'npm'
14948
- name: Install dependencies
15049
run: npm ci
151-
- name: Run performance tests
152-
run: node tests/run-tests.js performance
50+
- name: Test CLI commands
51+
run: |
52+
# Initialize TaskTracker
53+
node bin/tt init
54+
55+
# Test journal commands
56+
node bin/tt j "Test journal entry"
57+
node bin/tt j "Test decision" --type decision
58+
node bin/tt j "Test with tags" --tags test,ci
59+
60+
# Test context generation
61+
node bin/tt c
62+
node bin/tt cf 1
63+
64+
# Test PRD commands
65+
node bin/tt prd "Test project requirements"
66+
node bin/tt prd-show
67+
68+
# Test journal show
69+
node bin/tt journal-show
70+
node bin/tt journal-show --type decision
71+
72+
echo "✅ All CLI commands executed successfully"
15373
15474
documentation_check:
15575
runs-on: ubuntu-latest
@@ -158,50 +78,19 @@ jobs:
15878
- name: Check documentation structure
15979
run: |
16080
# Verify main documentation files exist
161-
for dir in docs/user-guides docs/dev-reference docs/ai-integration; do
162-
if [ ! -f "$dir/README.md" ]; then
163-
echo "Missing README.md in $dir"
164-
exit 1
165-
fi
166-
done
167-
168-
# Verify architecture documentation exists
169-
if [ ! -f "docs/dev-docs/ARCHITECTURE.md" ]; then
170-
echo "Missing architecture documentation"
81+
if [ ! -f "README.md" ]; then
82+
echo "Missing README.md"
17183
exit 1
17284
fi
17385
174-
# Verify CLI reference exists
175-
if [ ! -f "docs/dev-reference/cli-reference.md" ]; then
176-
echo "Missing CLI reference documentation"
86+
# Check for package.json
87+
if [ ! -f "package.json" ]; then
88+
echo "Missing package.json"
17789
exit 1
17890
fi
17991
18092
echo "✅ Documentation structure verified"
18193
182-
template_check:
183-
runs-on: ubuntu-latest
184-
steps:
185-
- uses: actions/checkout@v3
186-
- name: Check for templates
187-
run: |
188-
# Ensure Claude templates exist
189-
if [ ! -d "docs/dev-docs/claude-templates" ]; then
190-
echo "Claude templates directory not found"
191-
exit 1
192-
fi
193-
194-
# Check for required template files
195-
required_templates=("daily-update.txt" "task-create.txt" "pr-prepare.txt")
196-
for template in "${required_templates[@]}"; do
197-
if [ ! -f "docs/dev-docs/claude-templates/$template" ]; then
198-
echo "Template file $template not found"
199-
exit 1
200-
fi
201-
done
202-
203-
echo "✅ All required templates found"
204-
20594
structure_check:
20695
runs-on: ubuntu-latest
20796
steps:
@@ -223,18 +112,21 @@ jobs:
223112
fi
224113
225114
# Check for core modules
226-
core_modules=("task-manager.js" "config-manager.js" "formatting.js" "cli-parser.js")
115+
core_modules=("unified-config-manager.js" "formatting.js" "cli-parser.js" "command-registry.js")
227116
for module in "${core_modules[@]}"; do
228117
if [ ! -f "lib/core/$module" ]; then
229118
echo "Missing core module: $module"
230119
exit 1
231120
fi
232121
done
233122
234-
# Verify monolithic script is gone
235-
if [ -f "lib/core/tasktracker.js" ]; then
236-
echo "Error: Monolithic script still exists"
237-
exit 1
238-
fi
123+
# Check for main commands
124+
commands=("journal.js" "prd.js" "context.js" "context-v2.js" "help.js" "init.js")
125+
for cmd in "${commands[@]}"; do
126+
if [ ! -f "lib/commands/$cmd" ]; then
127+
echo "Missing command: $cmd"
128+
exit 1
129+
fi
130+
done
239131
240132
echo "✅ Repository structure verified"

0 commit comments

Comments
 (0)