chore: task management and small bug fix.

This commit is contained in:
Eyal Toledano
2025-05-25 01:03:58 -04:00
parent b60e1cf835
commit 235371ff47
12 changed files with 12991 additions and 525 deletions

View File

@@ -0,0 +1,367 @@
---
description: Git workflow integrated with Task Master for feature development and collaboration
globs: "**/*"
alwaysApply: true
---
# Git Workflow with Task Master Integration
## **Branch Strategy**
### **Main Branch Protection**
- **main** branch contains production-ready code
- All feature development happens on task-specific branches
- Direct commits to main are prohibited
- All changes merge via Pull Requests
### **Task Branch Naming**
```bash
# ✅ DO: Use consistent task branch naming
task-001 # For Task 1
task-004 # For Task 4
task-015 # For Task 15
# ❌ DON'T: Use inconsistent naming
feature/user-auth
fix-database-issue
random-branch-name
```
## **Workflow Overview**
```mermaid
flowchart TD
A[Start: On main branch] --> B[Pull latest changes]
B --> C[Create task branch<br/>git checkout -b task-XXX]
C --> D[Set task status: in-progress]
D --> E[Get task context & expand if needed]
E --> F[Identify next subtask]
F --> G[Set subtask: in-progress]
G --> H[Research & collect context<br/>update_subtask with findings]
H --> I[Implement subtask]
I --> J[Update subtask with completion]
J --> K[Set subtask: done]
K --> L[Git commit subtask]
L --> M{More subtasks?}
M -->|Yes| F
M -->|No| N[Run final tests]
N --> O[Commit tests if added]
O --> P[Push task branch]
P --> Q[Create Pull Request]
Q --> R[Human review & merge]
R --> S[Switch to main & pull]
S --> T[Delete task branch]
T --> U[Ready for next task]
style A fill:#e1f5fe
style C fill:#f3e5f5
style G fill:#fff3e0
style L fill:#e8f5e8
style Q fill:#fce4ec
style R fill:#f1f8e9
style U fill:#e1f5fe
```
## **Complete Task Development Workflow**
### **Phase 1: Task Preparation**
```bash
# 1. Ensure you're on main branch and pull latest
git checkout main
git pull origin main
# 2. Check current branch status
git branch # Verify you're on main
# 3. Create task-specific branch
git checkout -b task-004 # For Task 4
# 4. Set task status in Task Master
# Use: set_task_status tool or `task-master set-status --id=4 --status=in-progress`
```
### **Phase 2: Task Analysis & Planning**
```bash
# 5. Get task context and expand if needed
# Use: get_task tool or `task-master show 4`
# Use: expand_task tool or `task-master expand --id=4 --research --force` (if complex)
# 6. Identify next subtask to work on
# Use: next_task tool or `task-master next`
```
### **Phase 3: Subtask Implementation Loop**
For each subtask, follow this pattern:
```bash
# 7. Mark subtask as in-progress
# Use: set_task_status tool or `task-master set-status --id=4.1 --status=in-progress`
# 8. Gather context and research (if needed)
# Use: update_subtask tool with research flag or:
# `task-master update-subtask --id=4.1 --prompt="Research findings..." --research`
# 9. Collect code context through AI exploration
# Document findings in subtask using update_subtask
# 10. Implement the subtask
# Write code, tests, documentation
# 11. Update subtask with completion details
# Use: update_subtask tool or:
# `task-master update-subtask --id=4.1 --prompt="Implementation complete..."`
# 12. Mark subtask as done
# Use: set_task_status tool or `task-master set-status --id=4.1 --status=done`
# 13. Commit the subtask implementation
git add .
git commit -m "feat(task-4): Complete subtask 4.1 - [Subtask Title]
- Implementation details
- Key changes made
- Any important notes
Subtask 4.1: [Brief description of what was accomplished]
Relates to Task 4: [Main task title]"
```
### **Phase 4: Task Completion**
```bash
# 14. When all subtasks are complete, run final testing
# Create test file if needed, ensure all tests pass
npm test # or jest, or manual testing
# 15. If tests were added/modified, commit them
git add .
git commit -m "test(task-4): Add comprehensive tests for Task 4
- Unit tests for core functionality
- Integration tests for API endpoints
- All tests passing
Task 4: [Main task title] - Testing complete"
# 16. Push the task branch
git push origin task-004
# 17. Create Pull Request
# Title: "Task 4: [Task Title]"
# Description should include:
# - Task overview
# - Subtasks completed
# - Testing approach
# - Any breaking changes or considerations
```
### **Phase 5: PR Merge & Cleanup**
```bash
# 18. Human reviews and merges PR into main
# 19. Switch back to main and pull merged changes
git checkout main
git pull origin main
# 20. Delete the feature branch (optional cleanup)
git branch -d task-004
git push origin --delete task-004
```
## **Commit Message Standards**
### **Subtask Commits**
```bash
# ✅ DO: Consistent subtask commit format
git commit -m "feat(task-4): Complete subtask 4.1 - Initialize Express server
- Set up Express.js with TypeScript configuration
- Added CORS and body parsing middleware
- Implemented health check endpoints
- Basic error handling middleware
Subtask 4.1: Initialize project with npm and install dependencies
Relates to Task 4: Setup Express.js Server Project"
# ❌ DON'T: Vague or inconsistent commits
git commit -m "fixed stuff"
git commit -m "working on task"
```
### **Test Commits**
```bash
# ✅ DO: Separate test commits when substantial
git commit -m "test(task-4): Add comprehensive tests for Express server setup
- Unit tests for middleware configuration
- Integration tests for health check endpoints
- Mock tests for database connection
- All tests passing with 95% coverage
Task 4: Setup Express.js Server Project - Testing complete"
```
### **Commit Type Prefixes**
- `feat(task-X):` - New feature implementation
- `fix(task-X):` - Bug fixes
- `test(task-X):` - Test additions/modifications
- `docs(task-X):` - Documentation updates
- `refactor(task-X):` - Code refactoring
- `chore(task-X):` - Build/tooling changes
## **Task Master Commands Integration**
### **Essential Commands for Git Workflow**
```bash
# Task management
task-master show <id> # Get task/subtask details
task-master next # Find next task to work on
task-master set-status --id=<id> --status=<status>
task-master update-subtask --id=<id> --prompt="..." --research
# Task expansion (for complex tasks)
task-master expand --id=<id> --research --force
# Progress tracking
task-master list # View all tasks and status
task-master list --status=in-progress # View active tasks
```
### **MCP Tool Equivalents**
When using Cursor or other MCP-integrated tools:
- `get_task` instead of `task-master show`
- `next_task` instead of `task-master next`
- `set_task_status` instead of `task-master set-status`
- `update_subtask` instead of `task-master update-subtask`
## **Branch Management Rules**
### **Branch Protection**
```bash
# ✅ DO: Always work on task branches
git checkout -b task-005
# Make changes
git commit -m "..."
git push origin task-005
# ❌ DON'T: Commit directly to main
git checkout main
git commit -m "..." # NEVER do this
```
### **Keeping Branches Updated**
```bash
# ✅ DO: Regularly sync with main (for long-running tasks)
git checkout task-005
git fetch origin
git rebase origin/main # or merge if preferred
# Resolve any conflicts and continue
```
## **Pull Request Guidelines**
### **PR Title Format**
```
Task <ID>: <Task Title>
Examples:
Task 4: Setup Express.js Server Project
Task 7: Implement User Authentication
Task 12: Add Stripe Payment Integration
```
### **PR Description Template**
```markdown
## Task Overview
Brief description of the main task objective.
## Subtasks Completed
- [x] 4.1: Initialize project with npm and install dependencies
- [x] 4.2: Configure TypeScript, ESLint and Prettier
- [x] 4.3: Create basic Express app with middleware and health check route
## Implementation Details
- Key architectural decisions made
- Important code changes
- Any deviations from original plan
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests passing
- [ ] Manual testing completed
## Breaking Changes
List any breaking changes or migration requirements.
## Related Tasks
Mention any dependent tasks or follow-up work needed.
```
## **Conflict Resolution**
### **Task Conflicts**
```bash
# If multiple people work on overlapping tasks:
# 1. Use Task Master's move functionality to reorganize
task-master move --from=5 --to=25 # Move conflicting task
# 2. Update task dependencies
task-master add-dependency --id=6 --depends-on=5
# 3. Coordinate through PR comments and task updates
```
### **Code Conflicts**
```bash
# Standard Git conflict resolution
git fetch origin
git rebase origin/main
# Resolve conflicts in files
git add .
git rebase --continue
```
## **Emergency Procedures**
### **Hotfixes**
```bash
# For urgent production fixes:
git checkout main
git pull origin main
git checkout -b hotfix-urgent-issue
# Make minimal fix
git commit -m "hotfix: Fix critical production issue
- Specific fix description
- Minimal impact change
- Requires immediate deployment"
git push origin hotfix-urgent-issue
# Create emergency PR for immediate review
```
### **Task Abandonment**
```bash
# If task needs to be abandoned or significantly changed:
# 1. Update task status
task-master set-status --id=<id> --status=cancelled
# 2. Clean up branch
git checkout main
git branch -D task-<id>
git push origin --delete task-<id>
# 3. Document reasoning in task
task-master update-task --id=<id> --prompt="Task cancelled due to..."
```
---
**References:**
- [Task Master Workflow](mdc:.cursor/rules/dev_workflow.mdc)
- [Architecture Guidelines](mdc:.cursor/rules/architecture.mdc)
- [Task Master Commands](mdc:.cursor/rules/taskmaster.mdc)

11438
context/chats/task-004.md Normal file

File diff suppressed because it is too large Load Diff

51
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "task-master-ai",
"version": "0.14.0",
"version": "0.15.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "task-master-ai",
"version": "0.14.0",
"version": "0.15.0",
"license": "MIT WITH Commons-Clause",
"dependencies": {
"@ai-sdk/anthropic": "^1.2.10",
@@ -37,6 +37,7 @@
"ollama-ai-provider": "^1.2.0",
"openai": "^4.89.0",
"ora": "^8.2.0",
"task-master-ai": "^0.15.0",
"uuid": "^11.1.0",
"zod": "^3.23.8"
},
@@ -9320,6 +9321,52 @@
"react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
},
"node_modules/task-master-ai": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/task-master-ai/-/task-master-ai-0.15.0.tgz",
"integrity": "sha512-eOekJUdFFuJBt0Q4BMD0qO18UuPLh9qloNDs5YG4JK8YsxP6yRUnvxXL7wShOJZ2rNKE9Q0jnKPbvcGafupd8w==",
"license": "MIT WITH Commons-Clause",
"dependencies": {
"@ai-sdk/anthropic": "^1.2.10",
"@ai-sdk/azure": "^1.3.17",
"@ai-sdk/google": "^1.2.13",
"@ai-sdk/mistral": "^1.2.7",
"@ai-sdk/openai": "^1.3.20",
"@ai-sdk/perplexity": "^1.1.7",
"@ai-sdk/xai": "^1.2.15",
"@anthropic-ai/sdk": "^0.39.0",
"@openrouter/ai-sdk-provider": "^0.4.5",
"ai": "^4.3.10",
"boxen": "^8.0.1",
"chalk": "^5.4.1",
"cli-table3": "^0.6.5",
"commander": "^11.1.0",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.21.2",
"fastmcp": "^1.20.5",
"figlet": "^1.8.0",
"fuse.js": "^7.1.0",
"gradient-string": "^3.0.0",
"helmet": "^8.1.0",
"inquirer": "^12.5.0",
"jsonwebtoken": "^9.0.2",
"lru-cache": "^10.2.0",
"ollama-ai-provider": "^1.2.0",
"openai": "^4.89.0",
"ora": "^8.2.0",
"uuid": "^11.1.0",
"zod": "^3.23.8"
},
"bin": {
"task-master": "bin/task-master.js",
"task-master-ai": "mcp-server/server.js",
"task-master-mcp": "mcp-server/server.js"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/term-size": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz",

View File

@@ -67,6 +67,7 @@
"ollama-ai-provider": "^1.2.0",
"openai": "^4.89.0",
"ora": "^8.2.0",
"task-master-ai": "^0.15.0",
"uuid": "^11.1.0",
"zod": "^3.23.8"
},

View File

@@ -852,7 +852,8 @@ async function addTask(
: 0;
}
// Add a visual transition to show we're moving to AI generation
// Add a visual transition to show we're moving to AI generation - only for CLI
if (outputFormat === 'text') {
console.log(
boxen(
chalk.white.bold('AI Task Generation') +
@@ -876,6 +877,7 @@ async function addTask(
)
);
console.log(); // Add spacing
}
// System Prompt - Enhanced for dependency awareness
const systemPrompt =

View File

@@ -1,9 +1,9 @@
{
"meta": {
"generatedAt": "2025-05-22T05:48:33.026Z",
"tasksAnalyzed": 6,
"generatedAt": "2025-05-24T17:50:20.773Z",
"tasksAnalyzed": 1,
"totalTasks": 88,
"analysisCount": 43,
"analysisCount": 44,
"thresholdScore": 5,
"projectName": "Taskmaster",
"usedResearch": true
@@ -352,6 +352,14 @@
"recommendedSubtasks": 5,
"expansionPrompt": "Expand this task into: (1) Implement move logic for tasks and subtasks, (2) Handle edge cases (invalid ids, non-existent parents, circular dependencies), (3) Update CLI to support move command with flags, (4) Ensure data integrity and update relationships, (5) Write and execute tests for various move scenarios.",
"reasoning": "Moving tasks and subtasks requires careful handling of hierarchical data, edge cases, and data integrity. The command must be robust and user-friendly, necessitating multiple focused subtasks for safe implementation."
},
{
"taskId": 92,
"taskTitle": "Add Global Joke Flag to All CLI Commands",
"complexityScore": 8,
"recommendedSubtasks": 7,
"expansionPrompt": "Break down the implementation of the global --joke flag into the following subtasks: (1) Update CLI foundation to support global flags, (2) Develop the joke-service module with joke management and category support, (3) Integrate joke output into existing output utilities, (4) Update all CLI commands for joke flag compatibility, (5) Add configuration options for joke categories and custom jokes, (6) Implement comprehensive testing (flag recognition, output, content, integration, performance, regression), (7) Update documentation and usage examples.",
"reasoning": "This task requires changes across the CLI foundation, output utilities, all command modules, and configuration management. It introduces a new service module, global flag handling, and output logic that must not interfere with existing features (including JSON output). The need for robust testing and backward compatibility further increases complexity. The scope spans multiple code areas and requires careful integration, justifying a high complexity score and a detailed subtask breakdown to manage risk and ensure maintainability.[2][3][5]"
}
]
}

View File

@@ -1,11 +1,11 @@
# Task ID: 51
# Title: Implement Perplexity Research Command
# Title: Implement Interactive 'Explore' Command REPL
# Status: pending
# Dependencies: None
# Priority: medium
# Description: Create an interactive REPL-style chat interface for AI-powered research that maintains conversation context, integrates project information, and provides session management capabilities.
# Description: Create an interactive 'explore' command that launches a REPL-style chat interface for AI-powered research and project exploration with conversation context and session management.
# Details:
Develop an interactive REPL-style chat interface for AI-powered research that allows users to have ongoing research conversations with context awareness. The system should:
Develop an interactive 'explore' command that provides a REPL-style chat interface for AI-powered research and project exploration. The system should:
1. Create an interactive REPL using inquirer that:
- Maintains conversation history and context
@@ -31,6 +31,7 @@ Develop an interactive REPL-style chat interface for AI-powered research that al
- `/copy` - Copy last response to clipboard
- `/summary` - Generate summary of conversation
- `/detail` - Adjust research depth level
- `/context` - Show current context information
5. Create session management capabilities:
- Generate and track unique session IDs
@@ -44,13 +45,19 @@ Develop an interactive REPL-style chat interface for AI-powered research that al
- Progressive display of AI responses
- Clear visual hierarchy and readability
7. Follow the "taskmaster way":
7. Command specification:
- Command name: `task-master explore` or `tm explore`
- Accept optional parameters: --tasks, --files, --session
- Generate project file tree for system context
- Launch interactive REPL session
8. Follow the "taskmaster way":
- Create something new and exciting
- Focus on usefulness and practicality
- Avoid over-engineering
- Maintain consistency with existing patterns
The REPL should feel like a natural conversation while providing powerful research capabilities that integrate seamlessly with the rest of the system.
The explore command should feel like a natural conversation while providing powerful research capabilities that integrate seamlessly with the rest of the system.
# Test Strategy:
1. Unit tests:
@@ -66,7 +73,7 @@ The REPL should feel like a natural conversation while providing powerful resear
- Verify context switching between different tasks and files
3. User acceptance testing:
- Have team members use the REPL for real research needs
- Have team members use the explore command for real research needs
- Test the conversation flow and command usability
- Verify the UI is intuitive and responsive
- Test with various terminal sizes and environments
@@ -83,6 +90,7 @@ The REPL should feel like a natural conversation while providing powerful resear
- Verify export features create properly formatted files
- Test session recovery from simulated crashes
- Validate handling of special characters and unicode
- Test command line parameter parsing for --tasks, --files, --session
# Subtasks:
## 1. Create Perplexity API Client Service [cancelled]
@@ -162,31 +170,30 @@ REFACTORED IMPLEMENTATION:
This approach leverages our existing sophisticated search logic rather than rebuilding from scratch, while making it more flexible and reusable across the application.
</info added on 2025-05-23T21:11:44.560Z>
## 3. Build Research Command CLI Interface [pending]
### Dependencies: 51.1, 51.2
### Description: Implement the Commander.js command structure for the 'research' command with all required options and parameters.
## 3. Build Explore Command CLI Interface [pending]
### Dependencies: 51.2
### Description: Implement the Commander.js command structure for the 'explore' command with all required options and parameters to launch the interactive REPL.
### Details:
Implementation details:
1. Create a new command file `commands/research.js`
1. Create a new command file `commands/explore.js`
2. Set up the Commander.js command structure with the following options:
- Required search query parameter
- `--task` or `-t` option for task/subtask ID
- `--prompt` or `-p` option for custom research prompt
- `--save` or `-s` option to save results to a file
- `--copy` or `-c` option to copy results to clipboard
- `--summary` or `-m` option to generate a summary
- `--detail` or `-d` option to set research depth (default: medium)
3. Implement command validation logic
4. Connect the command to the Perplexity service created in subtask 1
5. Integrate the context extraction logic from subtask 2
- `--tasks` or `-t` option for task/subtask IDs (comma-separated)
- `--files` or `-f` option for file paths (comma-separated)
- `--session` or `-s` option to resume a previous session
- `--context` or `-c` option for custom initial context
3. Implement command validation logic for parameters
4. Create entry point that launches the interactive REPL
5. Integrate context initialization from command line parameters
6. Register the command in the main CLI application
7. Add help text and examples
7. Add help text and usage examples
8. Implement parameter parsing for task IDs and file paths
Testing approach:
- Test command registration and option parsing
- Verify command validation logic works correctly
- Test with various combinations of options
- Ensure proper error messages for invalid inputs
- Test parameter parsing for complex task ID formats
<info added on 2025-05-23T21:09:08.478Z>
Implementation details:
1. Create a new module `repl/research-chat.js` for the interactive research experience
@@ -222,30 +229,45 @@ Testing approach:
- Validate UI consistency across different terminal environments
</info added on 2025-05-23T21:09:08.478Z>
## 4. Implement Results Processing and Output Formatting [pending]
### Dependencies: 51.1, 51.3
### Description: Create functionality to process, format, and display research results in the terminal with options for saving, copying, and summarizing.
## 4. Implement Chat Formatting and Display System [pending]
### Dependencies: 51.3
### Description: Create functionality to format and display conversational research interactions in the terminal with streaming responses and markdown support.
### Details:
Implementation details:
1. Create a new module `utils/researchFormatter.js`
2. Implement terminal output formatting with:
- Color-coded sections for better readability
- Proper text wrapping for terminal width
- Highlighting of key points
3. Add functionality to save results to a file:
- Create a `research-results` directory if it doesn't exist
- Save results with timestamp and query in filename
- Support multiple formats (text, markdown, JSON)
4. Implement clipboard copying using a library like `clipboardy`
5. Create a summarization function that extracts key points from research results
6. Add progress indicators during API calls
7. Implement pagination for long results
1. Create a new module `utils/chatFormatter.js` for REPL interface formatting
2. Implement terminal output formatting for conversational display:
- Color-coded messages distinguishing user inputs and AI responses
- Proper text wrapping and indentation for readability
- Support for markdown rendering in terminal
- Visual indicators for system messages and status updates
3. Implement streaming/progressive display of AI responses:
- Character-by-character or chunk-by-chunk display
- Cursor animations during response generation
- Ability to interrupt long responses
4. Design chat history visualization:
- Scrollable history with clear message boundaries
- Timestamp display options
- Session identification
5. Create specialized formatters for different content types:
- Code blocks with syntax highlighting
- Bulleted and numbered lists
- Tables and structured data
- Citations and references
6. Implement export functionality:
- Save conversations to markdown or text files
- Export individual responses
- Copy responses to clipboard
7. Adapt existing ui.js patterns for conversational context:
- Maintain consistent styling while supporting chat flow
- Handle multi-turn context appropriately
Testing approach:
- Test output formatting with various result lengths and content types
- Verify file saving functionality creates proper files with correct content
- Test clipboard functionality
- Verify summarization produces useful results
- Test streaming display with various response lengths and speeds
- Verify markdown rendering accuracy for complex formatting
- Test history navigation and scrolling functionality
- Verify export features create properly formatted files
- Test display on various terminal sizes and configurations
- Verify handling of special characters and unicode
<info added on 2025-05-23T21:10:00.181Z>
Implementation details:
1. Create a new module `utils/chatFormatter.js` for REPL interface formatting
@@ -383,7 +405,7 @@ Testing approach:
## 7. Create REPL Command System [pending]
### Dependencies: 51.3
### Description: Implement a flexible command system for the research REPL that allows users to control the conversation flow, manage sessions, and access additional functionality.
### Description: Implement a flexible command system for the explore REPL that allows users to control the conversation flow, manage sessions, and access additional functionality.
### Details:
Implementation details:
1. Create a new module `repl/commands.js` for REPL command handling
@@ -407,6 +429,7 @@ Implementation details:
- `/clear` - Clear conversation
- `/project` - Refresh project context
- `/session <id|new>` - Switch/create session
- `/context` - Show current context information
5. Add command completion and suggestions
6. Implement error handling for invalid commands
7. Create a help system with examples
@@ -420,22 +443,23 @@ Testing approach:
## 8. Integrate with AI Services Unified [pending]
### Dependencies: 51.3, 51.4
### Description: Integrate the research REPL with the existing ai-services-unified.js to leverage the unified AI service architecture with research mode.
### Description: Integrate the explore REPL with the existing ai-services-unified.js to leverage the unified AI service architecture with research mode.
### Details:
Implementation details:
1. Update `repl/research-chat.js` to integrate with ai-services-unified.js
2. Configure research mode in AI service:
- Set appropriate system prompts
- Set appropriate system prompts for exploration and research
- Configure temperature and other parameters
- Enable streaming responses
3. Implement context management:
- Format conversation history for AI context
- Include task and project context
- Handle context window limitations
4. Add support for different research styles:
4. Add support for different exploration styles:
- Exploratory research with broader context
- Focused research with specific questions
- Comparative analysis between concepts
- Code exploration and analysis
5. Implement response handling:
- Process streaming chunks
- Format and display responses
@@ -448,5 +472,44 @@ Testing approach:
- Verify context formatting and management
- Test streaming response handling
- Verify error handling and recovery
- Test with various research styles and queries
- Test with various exploration styles and queries
## 9. Implement Session Management System [pending]
### Dependencies: 51.4, 51.7
### Description: Create a comprehensive session management system for the explore REPL that handles session persistence, recovery, and switching between multiple exploration sessions.
### Details:
Implementation details:
1. Create a session management system for the explore REPL:
- Generate and track unique session IDs
- Store conversation history with timestamps
- Maintain context and state between interactions
2. Implement session persistence:
- Save sessions to disk automatically
- Load previous sessions on startup
- Handle graceful recovery from crashes
3. Build session browser and selector:
- List available sessions with preview
- Filter sessions by date, topic, or content
- Enable quick switching between sessions
4. Implement conversation state serialization:
- Capture full conversation context
- Preserve user preferences per session
- Handle state migration during updates
5. Add session sharing capabilities:
- Export sessions to portable formats
- Import sessions from files
- Generate shareable session summaries
6. Create session management commands:
- Create new sessions
- Clone existing sessions
- Archive or delete old sessions
7. Integrate with command line --session parameter
Testing approach:
- Verify session persistence across application restarts
- Test session recovery from simulated crashes
- Validate state serialization with complex conversations
- Ensure session switching maintains proper context
- Test session import/export functionality
- Verify performance with large conversation histories

View File

@@ -1,67 +0,0 @@
# Task ID: 90
# Title: Implement Subtask Progress Analyzer and Reporting System
# Status: pending
# Dependencies: 1, 3
# Priority: medium
# Description: Develop a subtask analyzer that monitors the progress of all subtasks, validates their status, and generates comprehensive reports for users to track project advancement.
# Details:
The subtask analyzer should be implemented with the following components and considerations:
1. Progress Tracking Mechanism:
- Create a function to scan the task data structure and identify all tasks with subtasks
- Implement logic to determine the completion status of each subtask
- Calculate overall progress percentages for tasks with multiple subtasks
2. Status Validation:
- Develop validation rules to check if subtasks are progressing according to expected timelines
- Implement detection for stalled or blocked subtasks
- Create alerts for subtasks that are behind schedule or have dependency issues
3. Reporting System:
- Design a structured report format that clearly presents:
- Overall project progress
- Task-by-task breakdown with subtask status
- Highlighted issues or blockers
- Support multiple output formats (console, JSON, exportable text)
- Include visual indicators for progress (e.g., progress bars in CLI)
4. Integration Points:
- Hook into the existing task management system
- Ensure the analyzer can be triggered via CLI commands
- Make the reporting feature accessible through the main command interface
5. Performance Considerations:
- Optimize for large task lists with many subtasks
- Implement caching if necessary to avoid redundant calculations
- Ensure reports generate quickly even for complex project structures
The implementation should follow the existing code style and patterns, leveraging the task data structure already in place. The analyzer should be non-intrusive to existing functionality while providing valuable insights to users.
# Test Strategy:
Testing for the subtask analyzer should include:
1. Unit Tests:
- Test the progress calculation logic with various task/subtask configurations
- Verify status validation correctly identifies issues in different scenarios
- Ensure report generation produces consistent and accurate output
- Test edge cases (empty subtasks, all complete, all incomplete, mixed states)
2. Integration Tests:
- Verify the analyzer correctly integrates with the existing task data structure
- Test CLI command integration and parameter handling
- Ensure reports reflect actual changes to task/subtask status
3. Performance Tests:
- Benchmark report generation with large task sets (100+ tasks with multiple subtasks)
- Verify memory usage remains reasonable during analysis
4. User Acceptance Testing:
- Create sample projects with various subtask configurations
- Generate reports and verify they provide clear, actionable information
- Confirm visual indicators accurately represent progress
5. Regression Testing:
- Verify that the analyzer doesn't interfere with existing task management functionality
- Ensure backward compatibility with existing task data structures
Documentation should be updated to include examples of how to use the new analyzer and interpret the reports. Success criteria include accurate progress tracking, clear reporting, and performance that scales with project size.

104
tasks/task_092.txt Normal file
View File

@@ -0,0 +1,104 @@
# Task ID: 92
# Title: Add Global Joke Flag to All CLI Commands
# Status: pending
# Dependencies: 2
# Priority: medium
# Description: Implement a global --joke flag that can be added to any command to include a programming-related joke with the command's output.
# Details:
Implement a global joke feature that enhances all CLI commands with optional humor. The implementation should:
1. **Global Flag Implementation**: Add a global --joke flag (with -j shorthand) to the Commander.js configuration in the CLI foundation that can be used with any command.
2. **Joke Service Module**: Create a new module (scripts/modules/joke-service.js) that:
- Maintains a curated collection of programming, development, and tech-related jokes
- Provides a getRandomJoke() function that returns a formatted joke
- Includes categories like programming languages, debugging, project management, etc.
- Ensures jokes are appropriate and professional
3. **Output Integration**: Modify the existing output formatting utilities to:
- Check for the --joke flag in global options
- Append a formatted joke section to command results when the flag is present
- Maintain proper formatting and spacing between regular output and jokes
- Ensure jokes don't interfere with JSON output mode (--json flag)
4. **Command Integration**: Update all existing commands to support the joke flag by:
- Modifying output functions to check for the joke flag
- Ensuring consistent joke placement across all command types
- Maintaining backward compatibility with existing command behavior
5. **Configuration Options**: Add configuration support for:
- Enabling/disabling joke categories
- Custom joke collections via configuration files
- Joke frequency settings for repeated command usage
The implementation should be non-intrusive, maintaining all existing functionality while adding this optional enhancement feature.
# Test Strategy:
Verify implementation through comprehensive testing:
1. **Flag Recognition Testing**: Test that the --joke and -j flags are properly recognized across all existing commands (list, add, update, move, plan, etc.)
2. **Output Format Testing**:
- Verify jokes appear correctly formatted after normal command output
- Test that jokes don't appear when flag is not used
- Confirm JSON output mode (--json) excludes jokes or formats them appropriately
- Test joke formatting with various command output lengths and types
3. **Joke Content Testing**:
- Verify jokes are appropriate and professional
- Test that getRandomJoke() returns different jokes on multiple calls
- Confirm joke categories are working correctly
4. **Integration Testing**: Test the joke flag with:
- Simple commands (list, help)
- Complex commands with multiple outputs (update, plan)
- Error scenarios to ensure jokes don't appear with error messages
- Combination with other global flags (--quiet, --debug, --json)
5. **Performance Testing**: Ensure the joke feature doesn't impact command execution speed or memory usage significantly
6. **Regression Testing**: Run existing test suite to confirm no existing functionality is broken by the joke feature implementation
# Subtasks:
## 1. Update CLI foundation to support global flags [pending]
### Dependencies: None
### Description: Modify the core CLI framework to recognize and handle global flags like --joke across all commands, ensuring proper flag parsing and propagation throughout the application.
### Details:
Implement global flag parsing mechanism, update command dispatcher to handle global flags, ensure flag inheritance across subcommands, and maintain backward compatibility with existing flag handling.
## 2. Develop the joke-service module with joke management and category support [pending]
### Dependencies: None
### Description: Create a dedicated service module for managing jokes, including joke retrieval, categorization, and content management functionality.
### Details:
Build joke storage/retrieval system, implement category-based joke selection, create joke content validation, add support for custom joke sources, and ensure thread-safe operations.
## 3. Integrate joke output into existing output utilities [pending]
### Dependencies: 92.1, 92.2
### Description: Modify output formatting utilities to seamlessly incorporate joke content without disrupting existing output formats, especially JSON output.
### Details:
Update output formatters to handle joke injection, ensure JSON output compatibility, implement conditional joke display logic, and maintain output consistency across different formats.
## 4. Update all CLI commands for joke flag compatibility [pending]
### Dependencies: 92.1, 92.3
### Description: Modify every existing CLI command to recognize and properly handle the global --joke flag while maintaining their core functionality.
### Details:
Update command handlers to process joke flag, integrate with output utilities, ensure no interference with command-specific logic, and maintain existing command behavior when flag is not used.
## 5. Add configuration options for joke categories and custom jokes [pending]
### Dependencies: 92.2
### Description: Implement configuration management for joke preferences, including category selection, custom joke sources, and user-defined joke content.
### Details:
Create configuration schema for joke settings, implement category preference management, add custom joke import/export functionality, and ensure configuration persistence across sessions.
## 6. Implement comprehensive testing [pending]
### Dependencies: 92.1, 92.2, 92.3, 92.4, 92.5
### Description: Develop thorough test coverage including flag recognition, output verification, content validation, integration testing, performance testing, and regression testing.
### Details:
Create unit tests for joke service, integration tests for flag handling, output format validation tests, performance benchmarks, regression test suite, and end-to-end testing scenarios.
## 7. Update documentation and usage examples [pending]
### Dependencies: 92.6
### Description: Comprehensive documentation update including usage examples, configuration guides, and integration instructions for the new --joke flag functionality.
### Details:
Update CLI help text, create usage examples for different scenarios, document configuration options, add troubleshooting guide, and update API documentation for developers.

288
tasks/task_093.txt Normal file
View File

@@ -0,0 +1,288 @@
# Task ID: 93
# Title: Implement Git Workflow Integration
# Status: pending
# Dependencies: None
# Priority: high
# Description: Add `task-master git` command suite to automate git workflows based on established patterns from Task 4, eliminating manual overhead and ensuring 100% consistency
# Details:
Create a comprehensive git workflow automation system that integrates deeply with TaskMaster's task management. The feature will:
1. **Automated Branch Management**:
- Create branches following `task-{id}` naming convention
- Validate branch names and prevent conflicts
- Handle branch switching with uncommitted changes
- Clean up local and remote branches post-merge
2. **Intelligent Commit Generation**:
- Auto-detect commit type (feat/fix/test/refactor/docs) from file changes
- Generate standardized commit messages with task context
- Support subtask-specific commits with proper references
- Include coverage delta in test commits
3. **PR Automation**:
- Generate comprehensive PR descriptions from task/subtask data
- Include implementation details, test coverage, breaking changes
- Format using GitHub markdown with task hierarchy
- Auto-populate PR template with relevant metadata
4. **Workflow State Management**:
- Track current task branch and status
- Validate task readiness before PR creation
- Ensure all subtasks completed before finishing
- Handle merge conflicts gracefully
5. **Integration Points**:
- Seamless integration with existing task commands
- MCP server support for IDE integrations
- GitHub CLI (`gh`) authentication support
- Coverage report parsing and display
**Technical Architecture**:
- Modular command structure in `scripts/modules/task-manager/git-*`
- Git operations wrapper using simple-git or native child_process
- Template engine for commit/PR generation in `scripts/modules/`
- State persistence in `.taskmaster/git-state.json`
- Error recovery and rollback mechanisms
**Key Files to Create**:
- `scripts/modules/task-manager/git-start.js` - Branch creation and task status update
- `scripts/modules/task-manager/git-commit.js` - Intelligent commit message generation
- `scripts/modules/task-manager/git-pr.js` - PR creation with auto-generated description
- `scripts/modules/task-manager/git-finish.js` - Post-merge cleanup and status update
- `scripts/modules/task-manager/git-status.js` - Current git workflow state display
- `scripts/modules/git-operations.js` - Core git functionality wrapper
- `scripts/modules/commit-analyzer.js` - File change analysis for commit types
- `scripts/modules/pr-description-generator.js` - PR description template generator
**MCP Integration Files**:
- `mcp-server/src/core/direct-functions/git-start.js`
- `mcp-server/src/core/direct-functions/git-commit.js`
- `mcp-server/src/core/direct-functions/git-pr.js`
- `mcp-server/src/core/direct-functions/git-finish.js`
- `mcp-server/src/core/direct-functions/git-status.js`
- `mcp-server/src/tools/git-start.js`
- `mcp-server/src/tools/git-commit.js`
- `mcp-server/src/tools/git-pr.js`
- `mcp-server/src/tools/git-finish.js`
- `mcp-server/src/tools/git-status.js`
**Configuration**:
- Add git workflow settings to `.taskmasterconfig`
- Support for custom commit prefixes and PR templates
- Branch naming pattern customization
- Remote repository detection and validation
# Test Strategy:
Implement comprehensive test suite following Task 4's TDD approach:
1. **Unit Tests** (target: 95%+ coverage):
- Git operations wrapper with mocked git commands
- Commit type detection with various file change scenarios
- PR description generation with different task structures
- Branch name validation and generation
- State management and persistence
2. **Integration Tests**:
- Full workflow simulation in test repository
- Error handling for git conflicts and failures
- Multi-task workflow scenarios
- Coverage integration with real test runs
- GitHub API interaction (mocked)
3. **E2E Tests**:
- Complete task lifecycle from start to finish
- Multiple developer workflow simulation
- Merge conflict resolution scenarios
- Branch protection and validation
4. **Test Implementation Details**:
- Use Jest with git repository fixtures
- Mock simple-git for isolated unit tests
- Create test tasks.json scenarios
- Validate all error messages and edge cases
- Test rollback and recovery mechanisms
5. **Coverage Requirements**:
- Minimum 90% overall coverage
- 100% coverage for critical paths (branch creation, PR generation)
- All error scenarios must be tested
- Performance tests for large task hierarchies
# Subtasks:
## 1. Design and implement core git operations wrapper [pending]
### Dependencies: None
### Description: Create a robust git operations layer that handles all git commands with proper error handling and state management
### Details:
Create `scripts/modules/git-operations.js` with methods for:
- Branch creation/deletion (local and remote)
- Commit operations with message formatting
- Status checking and conflict detection
- Remote operations (fetch, push, pull)
- Repository validation and setup
Use simple-git library or child_process for git commands. Implement comprehensive error handling with specific error types for different git failures. Include retry logic for network operations.
## 2. Implement git start command [pending]
### Dependencies: None
### Description: Create the entry point for task-based git workflows with automated branch creation and task status updates
### Details:
Implement `scripts/modules/task-manager/git-start.js` with functionality to:
- Validate task exists and is ready to start
- Check for clean working directory
- Create branch with `task-{id}` naming
- Update task status to 'in-progress'
- Store workflow state in `.taskmaster/git-state.json`
- Handle existing branch scenarios
- Support --force flag for branch recreation
Integrate with existing task-master commands and ensure MCP compatibility.
## 3. Build intelligent commit analyzer and generator [pending]
### Dependencies: None
### Description: Create a system that analyzes file changes to auto-detect commit types and generate standardized commit messages
### Details:
Develop `scripts/modules/commit-analyzer.js` with:
- File change detection and categorization
- Commit type inference rules:
- feat: new files in scripts/, new functions
- fix: changes to existing logic
- test: changes in tests/ directory
- docs: markdown and comment changes
- refactor: file moves, renames, cleanup
- Smart message generation with task context
- Support for custom commit templates
- Subtask reference inclusion
Create `scripts/modules/task-manager/git-commit.js` that uses the analyzer to generate commits with proper formatting.
## 4. Create PR description generator and command [pending]
### Dependencies: None
### Description: Build a comprehensive PR description generator that creates detailed, formatted descriptions from task data
### Details:
Implement `scripts/modules/pr-description-generator.js` to generate:
- Task overview with full context
- Subtask completion checklist
- Implementation details summary
- Test coverage metrics integration
- Breaking changes section
- Related tasks and dependencies
Create `scripts/modules/task-manager/git-pr.js` to:
- Validate all subtasks are complete
- Generate PR title and description
- Use GitHub CLI for PR creation
- Handle draft PR scenarios
- Support custom PR templates
- Include labels based on task metadata
## 5. Implement git finish command with cleanup [pending]
### Dependencies: None
### Description: Create the workflow completion command that handles post-merge cleanup and task status updates
### Details:
Build `scripts/modules/task-manager/git-finish.js` with:
- PR merge verification via GitHub API
- Local branch cleanup
- Remote branch deletion (with confirmation)
- Task status update to 'done'
- Workflow state cleanup
- Switch back to main branch
- Pull latest changes
Handle scenarios where PR isn't merged yet or merge failed. Include --skip-cleanup flag for manual branch management.
## 6. Add git status command for workflow visibility [pending]
### Dependencies: None
### Description: Create a status command that shows current git workflow state with task context
### Details:
Implement `scripts/modules/task-manager/git-status.js` to display:
- Current task and branch information
- Subtask completion status
- Uncommitted changes summary
- PR status if exists
- Coverage metrics comparison
- Suggested next actions
Integrate with existing task status displays and provide actionable guidance based on workflow state.
## 7. Integrate with Commander.js and add command routing [pending]
### Dependencies: None
### Description: Add the git command suite to TaskMaster's CLI with proper help text and option handling
### Details:
Update `scripts/modules/commands.js` to:
- Add 'git' command with subcommands
- Implement option parsing for all git commands
- Add comprehensive help text
- Ensure proper error handling and display
- Validate command prerequisites
Create proper command structure:
- `task-master git start [taskId] [options]`
- `task-master git commit [options]`
- `task-master git pr [options]`
- `task-master git finish [options]`
- `task-master git status [options]`
## 8. Add MCP server integration for git commands [pending]
### Dependencies: None
### Description: Implement MCP tools and direct functions for git workflow commands to enable IDE integration
### Details:
Create MCP integration in:
- `mcp-server/src/core/direct-functions/git-start.js`
- `mcp-server/src/core/direct-functions/git-commit.js`
- `mcp-server/src/core/direct-functions/git-pr.js`
- `mcp-server/src/core/direct-functions/git-finish.js`
- `mcp-server/src/core/direct-functions/git-status.js`
- `mcp-server/src/tools/git-start.js`
- `mcp-server/src/tools/git-commit.js`
- `mcp-server/src/tools/git-pr.js`
- `mcp-server/src/tools/git-finish.js`
- `mcp-server/src/tools/git-status.js`
Implement tools for:
- git_start_task
- git_commit_task
- git_create_pr
- git_finish_task
- git_workflow_status
Ensure proper error handling, logging, and response formatting. Include telemetry data for git operations.
## 9. Create comprehensive test suite [pending]
### Dependencies: None
### Description: Implement full test coverage following Task 4's high standards with unit, integration, and E2E tests
### Details:
Create test files:
- `tests/unit/git/` - Unit tests for all git components
- `tests/integration/git-workflow.test.js` - Full workflow tests
- `tests/e2e/git-automation.test.js` - End-to-end scenarios
Implement:
- Git repository fixtures and mocks
- Coverage tracking and reporting
- Performance benchmarks
- Error scenario coverage
- Multi-developer workflow simulations
Target 95%+ coverage with focus on critical paths.
## 10. Add configuration and documentation [pending]
### Dependencies: None
### Description: Create configuration options and comprehensive documentation for the git workflow feature
### Details:
Configuration tasks:
- Add git workflow settings to `.taskmasterconfig`
- Support environment variables for GitHub tokens
- Create default PR and commit templates
- Add branch naming customization
Documentation tasks:
- Update README with git workflow section
- Create `docs/git-workflow.md` guide
- Add examples for common scenarios
- Document configuration options
- Create troubleshooting guide
Update rule files:
- Create `.cursor/rules/git_workflow.mdc`
- Update existing workflow rules

26
tasks/task_094.txt Normal file
View File

@@ -0,0 +1,26 @@
# Task ID: 94
# Title: Implement Standalone 'research' CLI Command for AI-Powered Queries
# Status: pending
# Dependencies: 2, 4, 16
# Priority: medium
# Description: Develop a new 'task-master research' (alias 'tm research') CLI command for fast, context-aware AI research queries using the ai-services-unified.js infrastructure.
# Details:
- Add a new CLI command 'research' to commands.js, following established CLI patterns and conventions.
- Command should accept a research query as the main parameter, with optional flags for task IDs (--tasks), file paths (--files), custom context (--context), output detail level (--detail), and result saving (--save).
- Integrate with ai-services-unified.js, invoking its research mode to process the query and context, leveraging project file tree and task context as needed.
- Implement logic to gather and inject relevant context from specified tasks, files, or custom input, and generate a project file tree snapshot if required.
- Ensure output is formatted for terminal readability, including citations and references where available.
- Support saving research results to a specified file if --save is provided.
- Provide both brief and comprehensive output modes, controlled by a flag.
- Ensure the command is non-interactive (one-shot execution) and complements the existing 'explore' command.
- Update help documentation and usage examples for the new command.
# Test Strategy:
- Write unit and integration tests to verify correct parsing of command-line arguments and flags.
- Test that the command invokes ai-services-unified.js in research mode with the correct parameters and context.
- Validate that context from tasks, files, and custom input is correctly gathered and passed to the research engine.
- Confirm that output is properly formatted, includes citations, and is displayed in the terminal as expected.
- Test saving results to files and handling of file system errors.
- Ensure the command works in both brief and comprehensive modes.
- Verify that the command does not enter interactive mode and exits cleanly after execution.
- Check help output and usage documentation for accuracy and completeness.

View File

@@ -3089,13 +3089,13 @@
},
{
"id": 51,
"title": "Implement Perplexity Research Command",
"description": "Create an interactive REPL-style chat interface for AI-powered research that maintains conversation context, integrates project information, and provides session management capabilities.",
"title": "Implement Interactive 'Explore' Command REPL",
"description": "Create an interactive 'explore' command that launches a REPL-style chat interface for AI-powered research and project exploration with conversation context and session management.",
"status": "pending",
"dependencies": [],
"priority": "medium",
"details": "Develop an interactive REPL-style chat interface for AI-powered research that allows users to have ongoing research conversations with context awareness. The system should:\n\n1. Create an interactive REPL using inquirer that:\n - Maintains conversation history and context\n - Provides a natural chat-like experience\n - Supports special commands with the '/' prefix\n\n2. Integrate with the existing ai-services-unified.js using research mode:\n - Leverage our unified AI service architecture\n - Configure appropriate system prompts for research context\n - Handle streaming responses for real-time feedback\n\n3. Support multiple context sources:\n - Task/subtask IDs for project context\n - File paths for code or document context\n - Custom prompts for specific research directions\n - Project file tree for system context\n\n4. Implement chat commands including:\n - `/save` - Save conversation to file\n - `/task` - Associate with or load context from a task\n - `/help` - Show available commands and usage\n - `/exit` - End the research session\n - `/copy` - Copy last response to clipboard\n - `/summary` - Generate summary of conversation\n - `/detail` - Adjust research depth level\n\n5. Create session management capabilities:\n - Generate and track unique session IDs\n - Save/load sessions automatically\n - Browse and switch between previous sessions\n - Export sessions to portable formats\n\n6. Design a consistent UI using ui.js patterns:\n - Color-coded messages for user/AI distinction\n - Support for markdown rendering in terminal\n - Progressive display of AI responses\n - Clear visual hierarchy and readability\n\n7. Follow the \"taskmaster way\":\n - Create something new and exciting\n - Focus on usefulness and practicality\n - Avoid over-engineering\n - Maintain consistency with existing patterns\n\nThe REPL should feel like a natural conversation while providing powerful research capabilities that integrate seamlessly with the rest of the system.",
"testStrategy": "1. Unit tests:\n - Test the REPL command parsing and execution\n - Mock AI service responses to test different scenarios\n - Verify context extraction and integration from various sources\n - Test session serialization and deserialization\n\n2. Integration tests:\n - Test actual AI service integration with the REPL\n - Verify session persistence across application restarts\n - Test conversation state management with long interactions\n - Verify context switching between different tasks and files\n\n3. User acceptance testing:\n - Have team members use the REPL for real research needs\n - Test the conversation flow and command usability\n - Verify the UI is intuitive and responsive\n - Test with various terminal sizes and environments\n\n4. Performance testing:\n - Measure and optimize response time for queries\n - Test behavior with large conversation histories\n - Verify performance with complex context sources\n - Test under poor network conditions\n\n5. Specific test scenarios:\n - Verify markdown rendering for complex formatting\n - Test streaming display with various response lengths\n - Verify export features create properly formatted files\n - Test session recovery from simulated crashes\n - Validate handling of special characters and unicode",
"details": "Develop an interactive 'explore' command that provides a REPL-style chat interface for AI-powered research and project exploration. The system should:\n\n1. Create an interactive REPL using inquirer that:\n - Maintains conversation history and context\n - Provides a natural chat-like experience\n - Supports special commands with the '/' prefix\n\n2. Integrate with the existing ai-services-unified.js using research mode:\n - Leverage our unified AI service architecture\n - Configure appropriate system prompts for research context\n - Handle streaming responses for real-time feedback\n\n3. Support multiple context sources:\n - Task/subtask IDs for project context\n - File paths for code or document context\n - Custom prompts for specific research directions\n - Project file tree for system context\n\n4. Implement chat commands including:\n - `/save` - Save conversation to file\n - `/task` - Associate with or load context from a task\n - `/help` - Show available commands and usage\n - `/exit` - End the research session\n - `/copy` - Copy last response to clipboard\n - `/summary` - Generate summary of conversation\n - `/detail` - Adjust research depth level\n - `/context` - Show current context information\n\n5. Create session management capabilities:\n - Generate and track unique session IDs\n - Save/load sessions automatically\n - Browse and switch between previous sessions\n - Export sessions to portable formats\n\n6. Design a consistent UI using ui.js patterns:\n - Color-coded messages for user/AI distinction\n - Support for markdown rendering in terminal\n - Progressive display of AI responses\n - Clear visual hierarchy and readability\n\n7. Command specification:\n - Command name: `task-master explore` or `tm explore`\n - Accept optional parameters: --tasks, --files, --session\n - Generate project file tree for system context\n - Launch interactive REPL session\n\n8. Follow the \"taskmaster way\":\n - Create something new and exciting\n - Focus on usefulness and practicality\n - Avoid over-engineering\n - Maintain consistency with existing patterns\n\nThe explore command should feel like a natural conversation while providing powerful research capabilities that integrate seamlessly with the rest of the system.",
"testStrategy": "1. Unit tests:\n - Test the REPL command parsing and execution\n - Mock AI service responses to test different scenarios\n - Verify context extraction and integration from various sources\n - Test session serialization and deserialization\n\n2. Integration tests:\n - Test actual AI service integration with the REPL\n - Verify session persistence across application restarts\n - Test conversation state management with long interactions\n - Verify context switching between different tasks and files\n\n3. User acceptance testing:\n - Have team members use the explore command for real research needs\n - Test the conversation flow and command usability\n - Verify the UI is intuitive and responsive\n - Test with various terminal sizes and environments\n\n4. Performance testing:\n - Measure and optimize response time for queries\n - Test behavior with large conversation histories\n - Verify performance with complex context sources\n - Test under poor network conditions\n\n5. Specific test scenarios:\n - Verify markdown rendering for complex formatting\n - Test streaming display with various response lengths\n - Verify export features create properly formatted files\n - Test session recovery from simulated crashes\n - Validate handling of special characters and unicode\n - Test command line parameter parsing for --tasks, --files, --session",
"subtasks": [
{
"id": 1,
@@ -3117,25 +3117,23 @@
},
{
"id": 3,
"title": "Build Research Command CLI Interface",
"description": "Implement the Commander.js command structure for the 'research' command with all required options and parameters.",
"title": "Build Explore Command CLI Interface",
"description": "Implement the Commander.js command structure for the 'explore' command with all required options and parameters to launch the interactive REPL.",
"dependencies": [
1,
2
],
"details": "Implementation details:\n1. Create a new command file `commands/research.js`\n2. Set up the Commander.js command structure with the following options:\n - Required search query parameter\n - `--task` or `-t` option for task/subtask ID\n - `--prompt` or `-p` option for custom research prompt\n - `--save` or `-s` option to save results to a file\n - `--copy` or `-c` option to copy results to clipboard\n - `--summary` or `-m` option to generate a summary\n - `--detail` or `-d` option to set research depth (default: medium)\n3. Implement command validation logic\n4. Connect the command to the Perplexity service created in subtask 1\n5. Integrate the context extraction logic from subtask 2\n6. Register the command in the main CLI application\n7. Add help text and examples\n\nTesting approach:\n- Test command registration and option parsing\n- Verify command validation logic works correctly\n- Test with various combinations of options\n- Ensure proper error messages for invalid inputs\n<info added on 2025-05-23T21:09:08.478Z>\nImplementation details:\n1. Create a new module `repl/research-chat.js` for the interactive research experience\n2. Implement REPL-style chat interface using inquirer with:\n - Persistent conversation history management\n - Context-aware prompting system\n - Command parsing for special instructions\n3. Implement REPL commands:\n - `/save` - Save conversation to file\n - `/task` - Associate with or load context from a task\n - `/help` - Show available commands and usage\n - `/exit` - End the research session\n - `/copy` - Copy last response to clipboard\n - `/summary` - Generate summary of conversation\n - `/detail` - Adjust research depth level\n4. Create context initialization system:\n - Task/subtask context loading\n - File content integration\n - System prompt configuration\n5. Integrate with ai-services-unified.js research mode\n6. Implement conversation state management:\n - Track message history\n - Maintain context window\n - Handle context pruning for long conversations\n7. Design consistent UI patterns using ui.js library\n8. Add entry point in main CLI application\n\nTesting approach:\n- Test REPL command parsing and execution\n- Verify context initialization with various inputs\n- Test conversation state management\n- Ensure proper error handling and recovery\n- Validate UI consistency across different terminal environments\n</info added on 2025-05-23T21:09:08.478Z>",
"details": "Implementation details:\n1. Create a new command file `commands/explore.js`\n2. Set up the Commander.js command structure with the following options:\n - `--tasks` or `-t` option for task/subtask IDs (comma-separated)\n - `--files` or `-f` option for file paths (comma-separated)\n - `--session` or `-s` option to resume a previous session\n - `--context` or `-c` option for custom initial context\n3. Implement command validation logic for parameters\n4. Create entry point that launches the interactive REPL\n5. Integrate context initialization from command line parameters\n6. Register the command in the main CLI application\n7. Add help text and usage examples\n8. Implement parameter parsing for task IDs and file paths\n\nTesting approach:\n- Test command registration and option parsing\n- Verify command validation logic works correctly\n- Test with various combinations of options\n- Ensure proper error messages for invalid inputs\n- Test parameter parsing for complex task ID formats\n<info added on 2025-05-23T21:09:08.478Z>\nImplementation details:\n1. Create a new module `repl/research-chat.js` for the interactive research experience\n2. Implement REPL-style chat interface using inquirer with:\n - Persistent conversation history management\n - Context-aware prompting system\n - Command parsing for special instructions\n3. Implement REPL commands:\n - `/save` - Save conversation to file\n - `/task` - Associate with or load context from a task\n - `/help` - Show available commands and usage\n - `/exit` - End the research session\n - `/copy` - Copy last response to clipboard\n - `/summary` - Generate summary of conversation\n - `/detail` - Adjust research depth level\n4. Create context initialization system:\n - Task/subtask context loading\n - File content integration\n - System prompt configuration\n5. Integrate with ai-services-unified.js research mode\n6. Implement conversation state management:\n - Track message history\n - Maintain context window\n - Handle context pruning for long conversations\n7. Design consistent UI patterns using ui.js library\n8. Add entry point in main CLI application\n\nTesting approach:\n- Test REPL command parsing and execution\n- Verify context initialization with various inputs\n- Test conversation state management\n- Ensure proper error handling and recovery\n- Validate UI consistency across different terminal environments\n</info added on 2025-05-23T21:09:08.478Z>",
"status": "pending",
"parentTaskId": 51
},
{
"id": 4,
"title": "Implement Results Processing and Output Formatting",
"description": "Create functionality to process, format, and display research results in the terminal with options for saving, copying, and summarizing.",
"title": "Implement Chat Formatting and Display System",
"description": "Create functionality to format and display conversational research interactions in the terminal with streaming responses and markdown support.",
"dependencies": [
1,
3
],
"details": "Implementation details:\n1. Create a new module `utils/researchFormatter.js`\n2. Implement terminal output formatting with:\n - Color-coded sections for better readability\n - Proper text wrapping for terminal width\n - Highlighting of key points\n3. Add functionality to save results to a file:\n - Create a `research-results` directory if it doesn't exist\n - Save results with timestamp and query in filename\n - Support multiple formats (text, markdown, JSON)\n4. Implement clipboard copying using a library like `clipboardy`\n5. Create a summarization function that extracts key points from research results\n6. Add progress indicators during API calls\n7. Implement pagination for long results\n\nTesting approach:\n- Test output formatting with various result lengths and content types\n- Verify file saving functionality creates proper files with correct content\n- Test clipboard functionality\n- Verify summarization produces useful results\n<info added on 2025-05-23T21:10:00.181Z>\nImplementation details:\n1. Create a new module `utils/chatFormatter.js` for REPL interface formatting\n2. Implement terminal output formatting for conversational display:\n - Color-coded messages distinguishing user inputs and AI responses\n - Proper text wrapping and indentation for readability\n - Support for markdown rendering in terminal\n - Visual indicators for system messages and status updates\n3. Implement streaming/progressive display of AI responses:\n - Character-by-character or chunk-by-chunk display\n - Cursor animations during response generation\n - Ability to interrupt long responses\n4. Design chat history visualization:\n - Scrollable history with clear message boundaries\n - Timestamp display options\n - Session identification\n5. Create specialized formatters for different content types:\n - Code blocks with syntax highlighting\n - Bulleted and numbered lists\n - Tables and structured data\n - Citations and references\n6. Implement export functionality:\n - Save conversations to markdown or text files\n - Export individual responses\n - Copy responses to clipboard\n7. Adapt existing ui.js patterns for conversational context:\n - Maintain consistent styling while supporting chat flow\n - Handle multi-turn context appropriately\n\nTesting approach:\n- Test streaming display with various response lengths and speeds\n- Verify markdown rendering accuracy for complex formatting\n- Test history navigation and scrolling functionality\n- Verify export features create properly formatted files\n- Test display on various terminal sizes and configurations\n- Verify handling of special characters and unicode\n</info added on 2025-05-23T21:10:00.181Z>",
"details": "Implementation details:\n1. Create a new module `utils/chatFormatter.js` for REPL interface formatting\n2. Implement terminal output formatting for conversational display:\n - Color-coded messages distinguishing user inputs and AI responses\n - Proper text wrapping and indentation for readability\n - Support for markdown rendering in terminal\n - Visual indicators for system messages and status updates\n3. Implement streaming/progressive display of AI responses:\n - Character-by-character or chunk-by-chunk display\n - Cursor animations during response generation\n - Ability to interrupt long responses\n4. Design chat history visualization:\n - Scrollable history with clear message boundaries\n - Timestamp display options\n - Session identification\n5. Create specialized formatters for different content types:\n - Code blocks with syntax highlighting\n - Bulleted and numbered lists\n - Tables and structured data\n - Citations and references\n6. Implement export functionality:\n - Save conversations to markdown or text files\n - Export individual responses\n - Copy responses to clipboard\n7. Adapt existing ui.js patterns for conversational context:\n - Maintain consistent styling while supporting chat flow\n - Handle multi-turn context appropriately\n\nTesting approach:\n- Test streaming display with various response lengths and speeds\n- Verify markdown rendering accuracy for complex formatting\n- Test history navigation and scrolling functionality\n- Verify export features create properly formatted files\n- Test display on various terminal sizes and configurations\n- Verify handling of special characters and unicode\n<info added on 2025-05-23T21:10:00.181Z>\nImplementation details:\n1. Create a new module `utils/chatFormatter.js` for REPL interface formatting\n2. Implement terminal output formatting for conversational display:\n - Color-coded messages distinguishing user inputs and AI responses\n - Proper text wrapping and indentation for readability\n - Support for markdown rendering in terminal\n - Visual indicators for system messages and status updates\n3. Implement streaming/progressive display of AI responses:\n - Character-by-character or chunk-by-chunk display\n - Cursor animations during response generation\n - Ability to interrupt long responses\n4. Design chat history visualization:\n - Scrollable history with clear message boundaries\n - Timestamp display options\n - Session identification\n5. Create specialized formatters for different content types:\n - Code blocks with syntax highlighting\n - Bulleted and numbered lists\n - Tables and structured data\n - Citations and references\n6. Implement export functionality:\n - Save conversations to markdown or text files\n - Export individual responses\n - Copy responses to clipboard\n7. Adapt existing ui.js patterns for conversational context:\n - Maintain consistent styling while supporting chat flow\n - Handle multi-turn context appropriately\n\nTesting approach:\n- Test streaming display with various response lengths and speeds\n- Verify markdown rendering accuracy for complex formatting\n- Test history navigation and scrolling functionality\n- Verify export features create properly formatted files\n- Test display on various terminal sizes and configurations\n- Verify handling of special characters and unicode\n</info added on 2025-05-23T21:10:00.181Z>",
"status": "pending",
"parentTaskId": 51
},
@@ -3165,23 +3163,35 @@
{
"id": 7,
"title": "Create REPL Command System",
"description": "Implement a flexible command system for the research REPL that allows users to control the conversation flow, manage sessions, and access additional functionality.",
"description": "Implement a flexible command system for the explore REPL that allows users to control the conversation flow, manage sessions, and access additional functionality.",
"dependencies": [
3
],
"details": "Implementation details:\n1. Create a new module `repl/commands.js` for REPL command handling\n2. Implement a command parser that:\n - Detects commands starting with `/`\n - Parses arguments and options\n - Handles quoted strings and special characters\n3. Create a command registry system:\n - Register command handlers with descriptions\n - Support command aliases\n - Enable command discovery and help\n4. Implement core commands:\n - `/save [filename]` - Save conversation\n - `/task <taskId>` - Load task context\n - `/file <path>` - Include file content\n - `/help [command]` - Show help\n - `/exit` - End session\n - `/copy [n]` - Copy nth response\n - `/summary` - Generate conversation summary\n - `/detail <level>` - Set detail level\n - `/clear` - Clear conversation\n - `/project` - Refresh project context\n - `/session <id|new>` - Switch/create session\n5. Add command completion and suggestions\n6. Implement error handling for invalid commands\n7. Create a help system with examples\n\nTesting approach:\n- Test command parsing with various inputs\n- Verify command execution and error handling\n- Test command completion functionality\n- Verify help system provides useful information\n- Test with complex command sequences",
"details": "Implementation details:\n1. Create a new module `repl/commands.js` for REPL command handling\n2. Implement a command parser that:\n - Detects commands starting with `/`\n - Parses arguments and options\n - Handles quoted strings and special characters\n3. Create a command registry system:\n - Register command handlers with descriptions\n - Support command aliases\n - Enable command discovery and help\n4. Implement core commands:\n - `/save [filename]` - Save conversation\n - `/task <taskId>` - Load task context\n - `/file <path>` - Include file content\n - `/help [command]` - Show help\n - `/exit` - End session\n - `/copy [n]` - Copy nth response\n - `/summary` - Generate conversation summary\n - `/detail <level>` - Set detail level\n - `/clear` - Clear conversation\n - `/project` - Refresh project context\n - `/session <id|new>` - Switch/create session\n - `/context` - Show current context information\n5. Add command completion and suggestions\n6. Implement error handling for invalid commands\n7. Create a help system with examples\n\nTesting approach:\n- Test command parsing with various inputs\n- Verify command execution and error handling\n- Test command completion functionality\n- Verify help system provides useful information\n- Test with complex command sequences",
"status": "pending",
"parentTaskId": 51
},
{
"id": 8,
"title": "Integrate with AI Services Unified",
"description": "Integrate the research REPL with the existing ai-services-unified.js to leverage the unified AI service architecture with research mode.",
"description": "Integrate the explore REPL with the existing ai-services-unified.js to leverage the unified AI service architecture with research mode.",
"dependencies": [
3,
4
],
"details": "Implementation details:\n1. Update `repl/research-chat.js` to integrate with ai-services-unified.js\n2. Configure research mode in AI service:\n - Set appropriate system prompts\n - Configure temperature and other parameters\n - Enable streaming responses\n3. Implement context management:\n - Format conversation history for AI context\n - Include task and project context\n - Handle context window limitations\n4. Add support for different research styles:\n - Exploratory research with broader context\n - Focused research with specific questions\n - Comparative analysis between concepts\n5. Implement response handling:\n - Process streaming chunks\n - Format and display responses\n - Handle errors and retries\n6. Add configuration options for AI service selection\n7. Implement fallback mechanisms for service unavailability\n\nTesting approach:\n- Test integration with mocked AI services\n- Verify context formatting and management\n- Test streaming response handling\n- Verify error handling and recovery\n- Test with various research styles and queries",
"details": "Implementation details:\n1. Update `repl/research-chat.js` to integrate with ai-services-unified.js\n2. Configure research mode in AI service:\n - Set appropriate system prompts for exploration and research\n - Configure temperature and other parameters\n - Enable streaming responses\n3. Implement context management:\n - Format conversation history for AI context\n - Include task and project context\n - Handle context window limitations\n4. Add support for different exploration styles:\n - Exploratory research with broader context\n - Focused research with specific questions\n - Comparative analysis between concepts\n - Code exploration and analysis\n5. Implement response handling:\n - Process streaming chunks\n - Format and display responses\n - Handle errors and retries\n6. Add configuration options for AI service selection\n7. Implement fallback mechanisms for service unavailability\n\nTesting approach:\n- Test integration with mocked AI services\n- Verify context formatting and management\n- Test streaming response handling\n- Verify error handling and recovery\n- Test with various exploration styles and queries",
"status": "pending",
"parentTaskId": 51
},
{
"id": 9,
"title": "Implement Session Management System",
"description": "Create a comprehensive session management system for the explore REPL that handles session persistence, recovery, and switching between multiple exploration sessions.",
"dependencies": [
4,
7
],
"details": "Implementation details:\n1. Create a session management system for the explore REPL:\n - Generate and track unique session IDs\n - Store conversation history with timestamps\n - Maintain context and state between interactions\n2. Implement session persistence:\n - Save sessions to disk automatically\n - Load previous sessions on startup\n - Handle graceful recovery from crashes\n3. Build session browser and selector:\n - List available sessions with preview\n - Filter sessions by date, topic, or content\n - Enable quick switching between sessions\n4. Implement conversation state serialization:\n - Capture full conversation context\n - Preserve user preferences per session\n - Handle state migration during updates\n5. Add session sharing capabilities:\n - Export sessions to portable formats\n - Import sessions from files\n - Generate shareable session summaries\n6. Create session management commands:\n - Create new sessions\n - Clone existing sessions\n - Archive or delete old sessions\n7. Integrate with command line --session parameter\n\nTesting approach:\n- Verify session persistence across application restarts\n- Test session recovery from simulated crashes\n- Validate state serialization with complex conversations\n- Ensure session switching maintains proper context\n- Test session import/export functionality\n- Verify performance with large conversation histories",
"status": "pending",
"parentTaskId": 51
}
@@ -5370,20 +5380,6 @@
"testStrategy": "To verify task completion, perform the following tests:\n1. Test each flag (--up, --down, --priority, --id) individually and in combination to ensure they function as expected.\n2. Verify that shorthand equivalents (-u, -d, -p, -i) work correctly.\n3. Check that the new priority levels ('lowest' and 'highest') are recognized and displayed properly in CLI output.\n4. Test error handling for invalid inputs (e.g., non-existent task IDs, invalid priority levels).\n5. Ensure that the help command displays accurate information about the new prioritize command.",
"subtasks": []
},
{
"id": 90,
"title": "Implement Subtask Progress Analyzer and Reporting System",
"description": "Develop a subtask analyzer that monitors the progress of all subtasks, validates their status, and generates comprehensive reports for users to track project advancement.",
"details": "The subtask analyzer should be implemented with the following components and considerations:\n\n1. Progress Tracking Mechanism:\n - Create a function to scan the task data structure and identify all tasks with subtasks\n - Implement logic to determine the completion status of each subtask\n - Calculate overall progress percentages for tasks with multiple subtasks\n\n2. Status Validation:\n - Develop validation rules to check if subtasks are progressing according to expected timelines\n - Implement detection for stalled or blocked subtasks\n - Create alerts for subtasks that are behind schedule or have dependency issues\n\n3. Reporting System:\n - Design a structured report format that clearly presents:\n - Overall project progress\n - Task-by-task breakdown with subtask status\n - Highlighted issues or blockers\n - Support multiple output formats (console, JSON, exportable text)\n - Include visual indicators for progress (e.g., progress bars in CLI)\n\n4. Integration Points:\n - Hook into the existing task management system\n - Ensure the analyzer can be triggered via CLI commands\n - Make the reporting feature accessible through the main command interface\n\n5. Performance Considerations:\n - Optimize for large task lists with many subtasks\n - Implement caching if necessary to avoid redundant calculations\n - Ensure reports generate quickly even for complex project structures\n\nThe implementation should follow the existing code style and patterns, leveraging the task data structure already in place. The analyzer should be non-intrusive to existing functionality while providing valuable insights to users.",
"testStrategy": "Testing for the subtask analyzer should include:\n\n1. Unit Tests:\n - Test the progress calculation logic with various task/subtask configurations\n - Verify status validation correctly identifies issues in different scenarios\n - Ensure report generation produces consistent and accurate output\n - Test edge cases (empty subtasks, all complete, all incomplete, mixed states)\n\n2. Integration Tests:\n - Verify the analyzer correctly integrates with the existing task data structure\n - Test CLI command integration and parameter handling\n - Ensure reports reflect actual changes to task/subtask status\n\n3. Performance Tests:\n - Benchmark report generation with large task sets (100+ tasks with multiple subtasks)\n - Verify memory usage remains reasonable during analysis\n\n4. User Acceptance Testing:\n - Create sample projects with various subtask configurations\n - Generate reports and verify they provide clear, actionable information\n - Confirm visual indicators accurately represent progress\n\n5. Regression Testing:\n - Verify that the analyzer doesn't interfere with existing task management functionality\n - Ensure backward compatibility with existing task data structures\n\nDocumentation should be updated to include examples of how to use the new analyzer and interpret the reports. Success criteria include accurate progress tracking, clear reporting, and performance that scales with project size.",
"status": "pending",
"dependencies": [
1,
3
],
"priority": "medium",
"subtasks": []
},
{
"id": 91,
"title": "Implement Move Command for Tasks and Subtasks",
@@ -5466,6 +5462,199 @@
"parentTaskId": 91
}
]
},
{
"id": 92,
"title": "Add Global Joke Flag to All CLI Commands",
"description": "Implement a global --joke flag that can be added to any command to include a programming-related joke with the command's output.",
"details": "Implement a global joke feature that enhances all CLI commands with optional humor. The implementation should:\n\n1. **Global Flag Implementation**: Add a global --joke flag (with -j shorthand) to the Commander.js configuration in the CLI foundation that can be used with any command.\n\n2. **Joke Service Module**: Create a new module (scripts/modules/joke-service.js) that:\n - Maintains a curated collection of programming, development, and tech-related jokes\n - Provides a getRandomJoke() function that returns a formatted joke\n - Includes categories like programming languages, debugging, project management, etc.\n - Ensures jokes are appropriate and professional\n\n3. **Output Integration**: Modify the existing output formatting utilities to:\n - Check for the --joke flag in global options\n - Append a formatted joke section to command results when the flag is present\n - Maintain proper formatting and spacing between regular output and jokes\n - Ensure jokes don't interfere with JSON output mode (--json flag)\n\n4. **Command Integration**: Update all existing commands to support the joke flag by:\n - Modifying output functions to check for the joke flag\n - Ensuring consistent joke placement across all command types\n - Maintaining backward compatibility with existing command behavior\n\n5. **Configuration Options**: Add configuration support for:\n - Enabling/disabling joke categories\n - Custom joke collections via configuration files\n - Joke frequency settings for repeated command usage\n\nThe implementation should be non-intrusive, maintaining all existing functionality while adding this optional enhancement feature.",
"testStrategy": "Verify implementation through comprehensive testing:\n\n1. **Flag Recognition Testing**: Test that the --joke and -j flags are properly recognized across all existing commands (list, add, update, move, plan, etc.)\n\n2. **Output Format Testing**: \n - Verify jokes appear correctly formatted after normal command output\n - Test that jokes don't appear when flag is not used\n - Confirm JSON output mode (--json) excludes jokes or formats them appropriately\n - Test joke formatting with various command output lengths and types\n\n3. **Joke Content Testing**:\n - Verify jokes are appropriate and professional\n - Test that getRandomJoke() returns different jokes on multiple calls\n - Confirm joke categories are working correctly\n\n4. **Integration Testing**: Test the joke flag with:\n - Simple commands (list, help)\n - Complex commands with multiple outputs (update, plan)\n - Error scenarios to ensure jokes don't appear with error messages\n - Combination with other global flags (--quiet, --debug, --json)\n\n5. **Performance Testing**: Ensure the joke feature doesn't impact command execution speed or memory usage significantly\n\n6. **Regression Testing**: Run existing test suite to confirm no existing functionality is broken by the joke feature implementation",
"status": "pending",
"dependencies": [
2
],
"priority": "medium",
"subtasks": [
{
"id": 1,
"title": "Update CLI foundation to support global flags",
"description": "Modify the core CLI framework to recognize and handle global flags like --joke across all commands, ensuring proper flag parsing and propagation throughout the application.",
"dependencies": [],
"details": "Implement global flag parsing mechanism, update command dispatcher to handle global flags, ensure flag inheritance across subcommands, and maintain backward compatibility with existing flag handling.",
"status": "pending"
},
{
"id": 2,
"title": "Develop the joke-service module with joke management and category support",
"description": "Create a dedicated service module for managing jokes, including joke retrieval, categorization, and content management functionality.",
"dependencies": [],
"details": "Build joke storage/retrieval system, implement category-based joke selection, create joke content validation, add support for custom joke sources, and ensure thread-safe operations.",
"status": "pending"
},
{
"id": 3,
"title": "Integrate joke output into existing output utilities",
"description": "Modify output formatting utilities to seamlessly incorporate joke content without disrupting existing output formats, especially JSON output.",
"dependencies": [
1,
2
],
"details": "Update output formatters to handle joke injection, ensure JSON output compatibility, implement conditional joke display logic, and maintain output consistency across different formats.",
"status": "pending"
},
{
"id": 4,
"title": "Update all CLI commands for joke flag compatibility",
"description": "Modify every existing CLI command to recognize and properly handle the global --joke flag while maintaining their core functionality.",
"dependencies": [
1,
3
],
"details": "Update command handlers to process joke flag, integrate with output utilities, ensure no interference with command-specific logic, and maintain existing command behavior when flag is not used.",
"status": "pending"
},
{
"id": 5,
"title": "Add configuration options for joke categories and custom jokes",
"description": "Implement configuration management for joke preferences, including category selection, custom joke sources, and user-defined joke content.",
"dependencies": [
2
],
"details": "Create configuration schema for joke settings, implement category preference management, add custom joke import/export functionality, and ensure configuration persistence across sessions.",
"status": "pending"
},
{
"id": 6,
"title": "Implement comprehensive testing",
"description": "Develop thorough test coverage including flag recognition, output verification, content validation, integration testing, performance testing, and regression testing.",
"dependencies": [
1,
2,
3,
4,
5
],
"details": "Create unit tests for joke service, integration tests for flag handling, output format validation tests, performance benchmarks, regression test suite, and end-to-end testing scenarios.",
"status": "pending"
},
{
"id": 7,
"title": "Update documentation and usage examples",
"description": "Comprehensive documentation update including usage examples, configuration guides, and integration instructions for the new --joke flag functionality.",
"dependencies": [
6
],
"details": "Update CLI help text, create usage examples for different scenarios, document configuration options, add troubleshooting guide, and update API documentation for developers.",
"status": "pending"
}
]
},
{
"id": 93,
"title": "Implement Git Workflow Integration",
"description": "Add `task-master git` command suite to automate git workflows based on established patterns from Task 4, eliminating manual overhead and ensuring 100% consistency",
"status": "pending",
"dependencies": [],
"priority": "high",
"details": "Create a comprehensive git workflow automation system that integrates deeply with TaskMaster's task management. The feature will:\n\n1. **Automated Branch Management**:\n - Create branches following `task-{id}` naming convention\n - Validate branch names and prevent conflicts\n - Handle branch switching with uncommitted changes\n - Clean up local and remote branches post-merge\n\n2. **Intelligent Commit Generation**:\n - Auto-detect commit type (feat/fix/test/refactor/docs) from file changes\n - Generate standardized commit messages with task context\n - Support subtask-specific commits with proper references\n - Include coverage delta in test commits\n\n3. **PR Automation**:\n - Generate comprehensive PR descriptions from task/subtask data\n - Include implementation details, test coverage, breaking changes\n - Format using GitHub markdown with task hierarchy\n - Auto-populate PR template with relevant metadata\n\n4. **Workflow State Management**:\n - Track current task branch and status\n - Validate task readiness before PR creation\n - Ensure all subtasks completed before finishing\n - Handle merge conflicts gracefully\n\n5. **Integration Points**:\n - Seamless integration with existing task commands\n - MCP server support for IDE integrations\n - GitHub CLI (`gh`) authentication support\n - Coverage report parsing and display\n\n**Technical Architecture**:\n- Modular command structure in `scripts/modules/task-manager/git-*`\n- Git operations wrapper using simple-git or native child_process\n- Template engine for commit/PR generation in `scripts/modules/`\n- State persistence in `.taskmaster/git-state.json`\n- Error recovery and rollback mechanisms\n\n**Key Files to Create**:\n- `scripts/modules/task-manager/git-start.js` - Branch creation and task status update\n- `scripts/modules/task-manager/git-commit.js` - Intelligent commit message generation\n- `scripts/modules/task-manager/git-pr.js` - PR creation with auto-generated description\n- `scripts/modules/task-manager/git-finish.js` - Post-merge cleanup and status update\n- `scripts/modules/task-manager/git-status.js` - Current git workflow state display\n- `scripts/modules/git-operations.js` - Core git functionality wrapper\n- `scripts/modules/commit-analyzer.js` - File change analysis for commit types\n- `scripts/modules/pr-description-generator.js` - PR description template generator\n\n**MCP Integration Files**:\n- `mcp-server/src/core/direct-functions/git-start.js`\n- `mcp-server/src/core/direct-functions/git-commit.js`\n- `mcp-server/src/core/direct-functions/git-pr.js`\n- `mcp-server/src/core/direct-functions/git-finish.js`\n- `mcp-server/src/core/direct-functions/git-status.js`\n- `mcp-server/src/tools/git-start.js`\n- `mcp-server/src/tools/git-commit.js`\n- `mcp-server/src/tools/git-pr.js`\n- `mcp-server/src/tools/git-finish.js`\n- `mcp-server/src/tools/git-status.js`\n\n**Configuration**:\n- Add git workflow settings to `.taskmasterconfig`\n- Support for custom commit prefixes and PR templates\n- Branch naming pattern customization\n- Remote repository detection and validation",
"testStrategy": "Implement comprehensive test suite following Task 4's TDD approach:\n\n1. **Unit Tests** (target: 95%+ coverage):\n - Git operations wrapper with mocked git commands\n - Commit type detection with various file change scenarios\n - PR description generation with different task structures\n - Branch name validation and generation\n - State management and persistence\n\n2. **Integration Tests**:\n - Full workflow simulation in test repository\n - Error handling for git conflicts and failures\n - Multi-task workflow scenarios\n - Coverage integration with real test runs\n - GitHub API interaction (mocked)\n\n3. **E2E Tests**:\n - Complete task lifecycle from start to finish\n - Multiple developer workflow simulation\n - Merge conflict resolution scenarios\n - Branch protection and validation\n\n4. **Test Implementation Details**:\n - Use Jest with git repository fixtures\n - Mock simple-git for isolated unit tests\n - Create test tasks.json scenarios\n - Validate all error messages and edge cases\n - Test rollback and recovery mechanisms\n\n5. **Coverage Requirements**:\n - Minimum 90% overall coverage\n - 100% coverage for critical paths (branch creation, PR generation)\n - All error scenarios must be tested\n - Performance tests for large task hierarchies",
"subtasks": [
{
"id": 1,
"title": "Design and implement core git operations wrapper",
"description": "Create a robust git operations layer that handles all git commands with proper error handling and state management",
"status": "pending",
"details": "Create `scripts/modules/git-operations.js` with methods for:\n- Branch creation/deletion (local and remote)\n- Commit operations with message formatting\n- Status checking and conflict detection\n- Remote operations (fetch, push, pull)\n- Repository validation and setup\n\nUse simple-git library or child_process for git commands. Implement comprehensive error handling with specific error types for different git failures. Include retry logic for network operations.",
"testStrategy": "Unit test all git operations with mocked git commands. Test error scenarios including conflicts, network failures, and invalid states. Achieve 100% coverage."
},
{
"id": 2,
"title": "Implement git start command",
"description": "Create the entry point for task-based git workflows with automated branch creation and task status updates",
"status": "pending",
"details": "Implement `scripts/modules/task-manager/git-start.js` with functionality to:\n- Validate task exists and is ready to start\n- Check for clean working directory\n- Create branch with `task-{id}` naming\n- Update task status to 'in-progress'\n- Store workflow state in `.taskmaster/git-state.json`\n- Handle existing branch scenarios\n- Support --force flag for branch recreation\n\nIntegrate with existing task-master commands and ensure MCP compatibility.",
"testStrategy": "Test all scenarios including clean start, existing branches, dirty working directory, and force recreation. Mock git operations and task updates."
},
{
"id": 3,
"title": "Build intelligent commit analyzer and generator",
"description": "Create a system that analyzes file changes to auto-detect commit types and generate standardized commit messages",
"status": "pending",
"details": "Develop `scripts/modules/commit-analyzer.js` with:\n- File change detection and categorization\n- Commit type inference rules:\n - feat: new files in scripts/, new functions\n - fix: changes to existing logic\n - test: changes in tests/ directory\n - docs: markdown and comment changes\n - refactor: file moves, renames, cleanup\n- Smart message generation with task context\n- Support for custom commit templates\n- Subtask reference inclusion\n\nCreate `scripts/modules/task-manager/git-commit.js` that uses the analyzer to generate commits with proper formatting.",
"testStrategy": "Test commit type detection with various file change combinations. Validate message generation for all scenarios. Test edge cases and custom templates."
},
{
"id": 4,
"title": "Create PR description generator and command",
"description": "Build a comprehensive PR description generator that creates detailed, formatted descriptions from task data",
"status": "pending",
"details": "Implement `scripts/modules/pr-description-generator.js` to generate:\n- Task overview with full context\n- Subtask completion checklist\n- Implementation details summary\n- Test coverage metrics integration\n- Breaking changes section\n- Related tasks and dependencies\n\nCreate `scripts/modules/task-manager/git-pr.js` to:\n- Validate all subtasks are complete\n- Generate PR title and description\n- Use GitHub CLI for PR creation\n- Handle draft PR scenarios\n- Support custom PR templates\n- Include labels based on task metadata",
"testStrategy": "Test PR generation with various task structures. Validate markdown formatting and GitHub compatibility. Test with incomplete subtasks and edge cases."
},
{
"id": 5,
"title": "Implement git finish command with cleanup",
"description": "Create the workflow completion command that handles post-merge cleanup and task status updates",
"status": "pending",
"details": "Build `scripts/modules/task-manager/git-finish.js` with:\n- PR merge verification via GitHub API\n- Local branch cleanup\n- Remote branch deletion (with confirmation)\n- Task status update to 'done'\n- Workflow state cleanup\n- Switch back to main branch\n- Pull latest changes\n\nHandle scenarios where PR isn't merged yet or merge failed. Include --skip-cleanup flag for manual branch management.",
"testStrategy": "Test successful completion flow, unmerged PR handling, and cleanup failures. Mock GitHub API and git operations. Validate state cleanup."
},
{
"id": 6,
"title": "Add git status command for workflow visibility",
"description": "Create a status command that shows current git workflow state with task context",
"status": "pending",
"details": "Implement `scripts/modules/task-manager/git-status.js` to display:\n- Current task and branch information\n- Subtask completion status\n- Uncommitted changes summary\n- PR status if exists\n- Coverage metrics comparison\n- Suggested next actions\n\nIntegrate with existing task status displays and provide actionable guidance based on workflow state.",
"testStrategy": "Test status display in various workflow states. Validate suggestion logic and formatting. Test with missing or corrupted state."
},
{
"id": 7,
"title": "Integrate with Commander.js and add command routing",
"description": "Add the git command suite to TaskMaster's CLI with proper help text and option handling",
"status": "pending",
"details": "Update `scripts/modules/commands.js` to:\n- Add 'git' command with subcommands\n- Implement option parsing for all git commands\n- Add comprehensive help text\n- Ensure proper error handling and display\n- Validate command prerequisites\n\nCreate proper command structure:\n- `task-master git start [taskId] [options]`\n- `task-master git commit [options]`\n- `task-master git pr [options]`\n- `task-master git finish [options]`\n- `task-master git status [options]`",
"testStrategy": "Test command registration and routing. Validate help text and option parsing. Test error handling for invalid commands."
},
{
"id": 8,
"title": "Add MCP server integration for git commands",
"description": "Implement MCP tools and direct functions for git workflow commands to enable IDE integration",
"status": "pending",
"details": "Create MCP integration in:\n- `mcp-server/src/core/direct-functions/git-start.js`\n- `mcp-server/src/core/direct-functions/git-commit.js`\n- `mcp-server/src/core/direct-functions/git-pr.js`\n- `mcp-server/src/core/direct-functions/git-finish.js`\n- `mcp-server/src/core/direct-functions/git-status.js`\n- `mcp-server/src/tools/git-start.js`\n- `mcp-server/src/tools/git-commit.js`\n- `mcp-server/src/tools/git-pr.js`\n- `mcp-server/src/tools/git-finish.js`\n- `mcp-server/src/tools/git-status.js`\n\nImplement tools for:\n- git_start_task\n- git_commit_task\n- git_create_pr\n- git_finish_task\n- git_workflow_status\n\nEnsure proper error handling, logging, and response formatting. Include telemetry data for git operations.",
"testStrategy": "Test MCP tool registration and execution. Validate response formats and error handling. Test with various parameter combinations."
},
{
"id": 9,
"title": "Create comprehensive test suite",
"description": "Implement full test coverage following Task 4's high standards with unit, integration, and E2E tests",
"status": "pending",
"details": "Create test files:\n- `tests/unit/git/` - Unit tests for all git components\n- `tests/integration/git-workflow.test.js` - Full workflow tests\n- `tests/e2e/git-automation.test.js` - End-to-end scenarios\n\nImplement:\n- Git repository fixtures and mocks\n- Coverage tracking and reporting\n- Performance benchmarks\n- Error scenario coverage\n- Multi-developer workflow simulations\n\nTarget 95%+ coverage with focus on critical paths.",
"testStrategy": "Follow TDD approach. Write tests before implementation. Use Jest with proper mocking. Validate all edge cases and error scenarios."
},
{
"id": 10,
"title": "Add configuration and documentation",
"description": "Create configuration options and comprehensive documentation for the git workflow feature",
"status": "pending",
"details": "Configuration tasks:\n- Add git workflow settings to `.taskmasterconfig`\n- Support environment variables for GitHub tokens\n- Create default PR and commit templates\n- Add branch naming customization\n\nDocumentation tasks:\n- Update README with git workflow section\n- Create `docs/git-workflow.md` guide\n- Add examples for common scenarios\n- Document configuration options\n- Create troubleshooting guide\n\nUpdate rule files:\n- Create `.cursor/rules/git_workflow.mdc`\n- Update existing workflow rules",
"testStrategy": "Test configuration loading and validation. Verify documentation accuracy with real usage scenarios. Test template rendering."
}
]
},
{
"id": 94,
"title": "Implement Standalone 'research' CLI Command for AI-Powered Queries",
"description": "Develop a new 'task-master research' (alias 'tm research') CLI command for fast, context-aware AI research queries using the ai-services-unified.js infrastructure.",
"details": "- Add a new CLI command 'research' to commands.js, following established CLI patterns and conventions.\n- Command should accept a research query as the main parameter, with optional flags for task IDs (--tasks), file paths (--files), custom context (--context), output detail level (--detail), and result saving (--save).\n- Integrate with ai-services-unified.js, invoking its research mode to process the query and context, leveraging project file tree and task context as needed.\n- Implement logic to gather and inject relevant context from specified tasks, files, or custom input, and generate a project file tree snapshot if required.\n- Ensure output is formatted for terminal readability, including citations and references where available.\n- Support saving research results to a specified file if --save is provided.\n- Provide both brief and comprehensive output modes, controlled by a flag.\n- Ensure the command is non-interactive (one-shot execution) and complements the existing 'explore' command.\n- Update help documentation and usage examples for the new command.",
"testStrategy": "- Write unit and integration tests to verify correct parsing of command-line arguments and flags.\n- Test that the command invokes ai-services-unified.js in research mode with the correct parameters and context.\n- Validate that context from tasks, files, and custom input is correctly gathered and passed to the research engine.\n- Confirm that output is properly formatted, includes citations, and is displayed in the terminal as expected.\n- Test saving results to files and handling of file system errors.\n- Ensure the command works in both brief and comprehensive modes.\n- Verify that the command does not enter interactive mode and exits cleanly after execution.\n- Check help output and usage documentation for accuracy and completeness.",
"status": "pending",
"dependencies": [
2,
4,
16
],
"priority": "medium",
"subtasks": []
}
]
}