From 7112a1d10b1af333f02e41ecf68be192cf6fee6f Mon Sep 17 00:00:00 2001
From: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
Date: Thu, 28 Aug 2025 18:00:10 +0200
Subject: [PATCH] chore: fix test
---
.taskmaster/tasks/tasks.json | 1907 +++++++++++++----
.../task-manager/analyze-task-complexity.js | 9 +-
.../complexity-report-tag-isolation.test.js | 3 +-
3 files changed, 1504 insertions(+), 415 deletions(-)
diff --git a/.taskmaster/tasks/tasks.json b/.taskmaster/tasks/tasks.json
index e9179e0f..baf73c66 100644
--- a/.taskmaster/tasks/tasks.json
+++ b/.taskmaster/tasks/tasks.json
@@ -27,7 +27,9 @@
"title": "Implement Basic Task Operations",
"description": "Create core functionality for managing tasks including listing, creating, updating, and deleting tasks.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"priority": "high",
"details": "Implement the following task operations:\n- List tasks with filtering options\n- Create new tasks with required fields\n- Update existing task properties\n- Delete tasks\n- Change task status (pending/done/deferred)\n- Handle dependencies between tasks\n- Manage task priorities",
"testStrategy": "Test each operation with valid and invalid inputs. Verify that dependencies are properly tracked and that status changes are reflected correctly in the tasks.json file."
@@ -37,7 +39,10 @@
"title": "Create Task File Generation System",
"description": "Implement the system for generating individual task files from the tasks.json data structure.",
"status": "done",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"priority": "medium",
"details": "Build the task file generation system including:\n- Create task file templates\n- Implement generation of task files from tasks.json\n- Add bi-directional synchronization between task files and tasks.json\n- Implement proper file naming and organization\n- Handle updates to task files reflecting back to tasks.json",
"testStrategy": "Generate task files from sample tasks.json data and verify the content matches the expected format. Test synchronization by modifying task files and ensuring changes are reflected in tasks.json.",
@@ -55,7 +60,9 @@
"title": "Implement Task File Generation Logic",
"description": "Develop the core functionality to generate individual task files from the tasks.json data structure. This includes reading the tasks.json file, iterating through each task, applying the template to each task's data, and writing the resulting content to appropriately named files in the tasks directory. Ensure proper error handling for file operations and data validation.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- Successfully reads tasks from tasks.json\n- Correctly applies template to each task's data\n- Generates files with proper naming convention (e.g., task_001.txt)\n- Creates the tasks directory if it doesn't exist\n- Handles errors gracefully (file not found, permission issues, etc.)\n- Validates task data before generation to prevent errors\n- Logs generation process with appropriate verbosity levels"
},
{
@@ -63,7 +70,9 @@
"title": "Implement File Naming and Organization System",
"description": "Create a consistent system for naming and organizing task files. Implement a function that generates standardized filenames based on task IDs (e.g., task_001.txt for task ID 1). Design the directory structure for storing task files according to the PRD specification. Ensure the system handles task ID formatting consistently and prevents filename collisions.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- Generates consistent filenames based on task IDs with proper zero-padding\n- Creates and maintains the correct directory structure as specified in the PRD\n- Handles special characters or edge cases in task IDs appropriately\n- Prevents filename collisions between different tasks\n- Provides utility functions for converting between task IDs and filenames\n- Maintains backward compatibility if the naming scheme needs to evolve"
},
{
@@ -71,7 +80,11 @@
"title": "Implement Task File to JSON Synchronization",
"description": "Develop functionality to read modified task files and update the corresponding entries in tasks.json. This includes parsing the task file format, extracting structured data, validating the changes, and updating the tasks.json file accordingly. Ensure the system can handle concurrent modifications and resolve conflicts appropriately.",
"status": "done",
- "dependencies": [1, 3, 2],
+ "dependencies": [
+ 1,
+ 3,
+ 2
+ ],
"acceptanceCriteria": "- Successfully parses task files to extract structured data\n- Validates parsed data against the task model schema\n- Updates tasks.json with changes from task files\n- Handles conflicts when the same task is modified in both places\n- Preserves task relationships and dependencies during synchronization\n- Provides clear error messages for parsing or validation failures\n- Updates the \"updatedAt\" timestamp in tasks.json metadata"
},
{
@@ -79,7 +92,12 @@
"title": "Implement Change Detection and Update Handling",
"description": "Create a system to detect changes in task files and tasks.json, and handle updates bidirectionally. This includes implementing file watching or comparison mechanisms, determining which version is newer, and applying changes in the appropriate direction. Ensure the system handles edge cases like deleted files, new tasks, and conflicting changes.",
"status": "done",
- "dependencies": [1, 3, 4, 2],
+ "dependencies": [
+ 1,
+ 3,
+ 4,
+ 2
+ ],
"acceptanceCriteria": "- Detects changes in both task files and tasks.json\n- Determines which version is newer based on modification timestamps or content\n- Applies changes in the appropriate direction (file to JSON or JSON to file)\n- Handles edge cases like deleted files, new tasks, and renamed tasks\n- Provides options for manual conflict resolution when necessary\n- Maintains data integrity during the synchronization process\n- Includes a command to force synchronization in either direction\n- Logs all synchronization activities for troubleshooting\n\nEach of these subtasks addresses a specific component of the task file generation system, following a logical progression from template design to bidirectional synchronization. The dependencies ensure that prerequisites are completed before dependent work begins, and the acceptance criteria provide clear guidelines for verifying each subtask's completion.",
"details": "\n\n\n{\n \"id\": 5,\n \"title\": \"Implement Change Detection and Update Handling\",\n \"description\": \"Create a system to detect changes in task files and tasks.json, and handle updates bidirectionally. This includes implementing file watching or comparison mechanisms, determining which version is newer, and applying changes in the appropriate direction. Ensure the system handles edge cases like deleted files, new tasks, and conflicting changes.\",\n \"status\": \"done\",\n \"dependencies\": [\n 1,\n 3,\n 4,\n 2\n ],\n \"acceptanceCriteria\": \"- Detects changes in both task files and tasks.json\\n- Determines which version is newer based on modification timestamps or content\\n- Applies changes in the appropriate direction (file to JSON or JSON to file)\\n- Handles edge cases like deleted files, new tasks, and renamed tasks\\n- Provides options for manual conflict resolution when necessary\\n- Maintains data integrity during the synchronization process\\n- Includes a command to force synchronization in either direction\\n- Logs all synchronization activities for troubleshooting\\n\\nEach of these subtasks addresses a specific component of the task file generation system, following a logical progression from template design to bidirectional synchronization. The dependencies ensure that prerequisites are completed before dependent work begins, and the acceptance criteria provide clear guidelines for verifying each subtask's completion.\",\n \"details\": \"[2025-05-01 21:59:07] Adding another note via MCP test.\"\n}\n"
}
@@ -90,7 +108,9 @@
"title": "Integrate Anthropic Claude API",
"description": "Set up the integration with Claude API for AI-powered task generation and expansion.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"priority": "high",
"details": "Implement Claude API integration including:\n- API authentication using environment variables\n- Create prompt templates for various operations\n- Implement response handling and parsing\n- Add error management with retries and exponential backoff\n- Implement token usage tracking\n- Create configurable model parameters",
"testStrategy": "Test API connectivity with sample prompts. Verify authentication works correctly with different API keys. Test error handling by simulating API failures.",
@@ -108,7 +128,9 @@
"title": "Develop Prompt Template System",
"description": "Create a flexible prompt template system for Claude API interactions. Implement a PromptTemplate class that can handle variable substitution, system and user messages, and proper formatting according to Claude's requirements. Include templates for different operations (task generation, task expansion, etc.) with appropriate instructions and constraints for each use case.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- PromptTemplate class supports variable substitution\n- System and user message separation is properly implemented\n- Templates exist for all required operations (task generation, expansion, etc.)\n- Templates include appropriate constraints and formatting instructions\n- Template system is unit tested with various inputs"
},
{
@@ -116,7 +138,10 @@
"title": "Implement Response Handling and Parsing",
"description": "Create a response handling system that processes Claude API responses. Implement JSON parsing for structured outputs, error detection in responses, and extraction of relevant information. Build utility functions to transform Claude's responses into the application's data structures. Include validation to ensure responses meet expected formats.",
"status": "done",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"acceptanceCriteria": "- Response parsing functions handle both JSON and text formats\n- Error detection identifies malformed or unexpected responses\n- Utility functions transform responses into task data structures\n- Validation ensures responses meet expected schemas\n- Edge cases like empty or partial responses are handled gracefully"
},
{
@@ -124,7 +149,10 @@
"title": "Build Error Management with Retry Logic",
"description": "Implement a robust error handling system for Claude API interactions. Create middleware that catches API errors, network issues, and timeout problems. Implement exponential backoff retry logic that increases wait time between retries. Add configurable retry limits and timeout settings. Include detailed logging for troubleshooting API issues.",
"status": "done",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"acceptanceCriteria": "- All API errors are caught and handled appropriately\n- Exponential backoff retry logic is implemented\n- Retry limits and timeouts are configurable\n- Detailed error logging provides actionable information\n- System degrades gracefully when API is unavailable\n- Unit tests verify retry behavior with mocked API failures"
},
{
@@ -132,7 +160,10 @@
"title": "Implement Token Usage Tracking",
"description": "Create a token tracking system to monitor Claude API usage. Implement functions to count tokens in prompts and responses. Build a logging system that records token usage per operation. Add reporting capabilities to show token usage trends and costs. Implement configurable limits to prevent unexpected API costs.",
"status": "done",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"acceptanceCriteria": "- Token counting functions accurately estimate usage\n- Usage logging records tokens per operation type\n- Reporting functions show usage statistics and estimated costs\n- Configurable limits can prevent excessive API usage\n- Warning system alerts when approaching usage thresholds\n- Token tracking data is persisted between application runs"
},
{
@@ -140,7 +171,10 @@
"title": "Create Model Parameter Configuration System",
"description": "Implement a flexible system for configuring Claude model parameters. Create a configuration module that manages model selection, temperature, top_p, max_tokens, and other parameters. Build functions to customize parameters based on operation type. Add validation to ensure parameters are within acceptable ranges. Include preset configurations for different use cases (creative, precise, etc.).",
"status": "done",
- "dependencies": [1, 5],
+ "dependencies": [
+ 1,
+ 5
+ ],
"acceptanceCriteria": "- Configuration module manages all Claude model parameters\n- Parameter customization functions exist for different operations\n- Validation ensures parameters are within acceptable ranges\n- Preset configurations exist for different use cases\n- Parameters can be overridden at runtime when needed\n- Documentation explains parameter effects and recommended values\n- Unit tests verify parameter validation and configuration loading"
}
]
@@ -150,7 +184,10 @@
"title": "Build PRD Parsing System",
"description": "Create the system for parsing Product Requirements Documents into structured task lists.",
"status": "done",
- "dependencies": [1, 5],
+ "dependencies": [
+ 1,
+ 5
+ ],
"priority": "high",
"details": "Implement PRD parsing functionality including:\n- PRD file reading from specified path\n- Prompt engineering for effective PRD parsing\n- Convert PRD content to task structure via Claude API\n- Implement intelligent dependency inference\n- Add priority assignment logic\n- Handle large PRDs by chunking if necessary",
"testStrategy": "Test with sample PRDs of varying complexity. Verify that generated tasks accurately reflect the requirements in the PRD. Check that dependencies and priorities are logically assigned.",
@@ -176,7 +213,9 @@
"title": "Implement PRD to Task Conversion System",
"description": "Develop the core functionality that sends PRD content to Claude API and converts the response into the task data structure. This includes sending the engineered prompts with PRD content to Claude, parsing the structured response, and transforming it into valid task objects that conform to the task model. Implement validation to ensure the generated tasks meet all requirements.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- Successfully sends PRD content to Claude API with appropriate prompts\n- Parses Claude's response into structured task objects\n- Validates generated tasks against the task model schema\n- Handles API errors and response parsing failures gracefully\n- Generates unique and sequential task IDs"
},
{
@@ -184,7 +223,10 @@
"title": "Build Intelligent Dependency Inference System",
"description": "Create an algorithm that analyzes the generated tasks and infers logical dependencies between them. The system should identify which tasks must be completed before others based on the content and context of each task. Implement both explicit dependency detection (from Claude's output) and implicit dependency inference (based on task relationships and logical ordering).",
"status": "done",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"acceptanceCriteria": "- Correctly identifies explicit dependencies mentioned in task descriptions\n- Infers implicit dependencies based on task context and relationships\n- Prevents circular dependencies in the task graph\n- Provides confidence scores for inferred dependencies\n- Allows for manual override/adjustment of detected dependencies"
},
{
@@ -192,7 +234,10 @@
"title": "Implement Priority Assignment Logic",
"description": "Develop a system that assigns appropriate priorities (high, medium, low) to tasks based on their content, dependencies, and position in the PRD. Create algorithms that analyze task descriptions, identify critical path tasks, and consider factors like technical risk and business value. Implement both automated priority assignment and manual override capabilities.",
"status": "done",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"acceptanceCriteria": "- Assigns priorities based on multiple factors (dependencies, critical path, risk)\n- Identifies foundation/infrastructure tasks as high priority\n- Balances priorities across the project (not everything is high priority)\n- Provides justification for priority assignments\n- Allows for manual adjustment of priorities"
},
{
@@ -200,7 +245,11 @@
"title": "Implement PRD Chunking for Large Documents",
"description": "Create a system that can handle large PRDs by breaking them into manageable chunks for processing. Implement intelligent document segmentation that preserves context across chunks, tracks section relationships, and maintains coherence in the generated tasks. Develop a mechanism to reassemble and deduplicate tasks generated from different chunks into a unified task list.",
"status": "done",
- "dependencies": [1, 5, 3],
+ "dependencies": [
+ 1,
+ 5,
+ 3
+ ],
"acceptanceCriteria": "- Successfully processes PRDs larger than Claude's context window\n- Intelligently splits documents at logical boundaries (sections, chapters)\n- Preserves context when processing individual chunks\n- Reassembles tasks from multiple chunks into a coherent task list\n- Detects and resolves duplicate or overlapping tasks\n- Maintains correct dependency relationships across chunks"
}
]
@@ -210,7 +259,10 @@
"title": "Implement Task Expansion with Claude",
"description": "Create functionality to expand tasks into subtasks using Claude's AI capabilities.",
"status": "done",
- "dependencies": [3, 5],
+ "dependencies": [
+ 3,
+ 5
+ ],
"priority": "medium",
"details": "Build task expansion functionality including:\n- Create subtask generation prompts\n- Implement workflow for expanding a task into subtasks\n- Add context-aware expansion capabilities\n- Implement parent-child relationship management\n- Allow specification of number of subtasks to generate\n- Provide mechanism to regenerate unsatisfactory subtasks",
"testStrategy": "Test expanding various types of tasks into subtasks. Verify that subtasks are properly linked to parent tasks. Check that context is properly incorporated into generated subtasks.",
@@ -228,7 +280,9 @@
"title": "Develop Task Expansion Workflow and UI",
"description": "Implement the command-line interface and workflow for expanding tasks into subtasks. Create a new command that allows users to select a task, specify the number of subtasks, and add optional context. Design the interaction flow to handle the API request, process the response, and update the tasks.json file with the newly generated subtasks.",
"status": "done",
- "dependencies": [5],
+ "dependencies": [
+ 5
+ ],
"acceptanceCriteria": "- Command `node scripts/dev.js expand --id= --count=` is implemented\n- Optional parameters for additional context (`--context=\"...\"`) are supported\n- User is shown progress indicators during API calls\n- Generated subtasks are displayed for review before saving\n- Command handles errors gracefully with helpful error messages\n- Help documentation for the expand command is comprehensive"
},
{
@@ -236,7 +290,9 @@
"title": "Implement Context-Aware Expansion Capabilities",
"description": "Enhance the task expansion functionality to incorporate project context when generating subtasks. Develop a system to gather relevant information from the project, such as related tasks, dependencies, and previously completed work. Implement logic to include this context in the Claude prompts to improve the relevance and quality of generated subtasks.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- System automatically gathers context from related tasks and dependencies\n- Project metadata is incorporated into expansion prompts\n- Implementation details from dependent tasks are included in context\n- Context gathering is configurable (amount and type of context)\n- Generated subtasks show awareness of existing project structure and patterns\n- Context gathering has reasonable performance even with large task collections"
},
{
@@ -244,7 +300,9 @@
"title": "Build Parent-Child Relationship Management",
"description": "Implement the data structure and operations for managing parent-child relationships between tasks and subtasks. Create functions to establish these relationships in the tasks.json file, update the task model to support subtask arrays, and develop utilities to navigate, filter, and display task hierarchies. Ensure all basic task operations (update, delete, etc.) properly handle subtask relationships.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- Task model is updated to include subtasks array\n- Subtasks have proper ID format (parent.sequence)\n- Parent tasks track their subtasks with proper references\n- Task listing command shows hierarchical structure\n- Completing all subtasks automatically updates parent task status\n- Deleting a parent task properly handles orphaned subtasks\n- Task file generation includes subtask information"
},
{
@@ -252,7 +310,11 @@
"title": "Implement Subtask Regeneration Mechanism",
"description": "Create functionality that allows users to regenerate unsatisfactory subtasks. Implement a command that can target specific subtasks for regeneration, preserve satisfactory subtasks, and incorporate feedback to improve the new generation. Design the system to maintain proper parent-child relationships and task IDs during regeneration.",
"status": "done",
- "dependencies": [1, 2, 4],
+ "dependencies": [
+ 1,
+ 2,
+ 4
+ ],
"acceptanceCriteria": "- Command `node scripts/dev.js regenerate --id=` is implemented\n- Option to regenerate all subtasks for a parent (`--all`)\n- Feedback parameter allows user to guide regeneration (`--feedback=\"...\"`)\n- Original subtask details are preserved in prompt context\n- Regenerated subtasks maintain proper ID sequence\n- Task relationships remain intact after regeneration\n- Command provides clear before/after comparison of subtasks"
}
]
@@ -262,7 +324,11 @@
"title": "Develop Implementation Drift Handling",
"description": "Create system to handle changes in implementation that affect future tasks.",
"status": "done",
- "dependencies": [3, 5, 7],
+ "dependencies": [
+ 3,
+ 5,
+ 7
+ ],
"priority": "medium",
"details": "Implement drift handling including:\n- Add capability to update future tasks based on completed work\n- Implement task rewriting based on new context\n- Create dependency chain updates when tasks change\n- Preserve completed work while updating future tasks\n- Add command to analyze and suggest updates to future tasks",
"testStrategy": "Simulate implementation changes and test the system's ability to update future tasks appropriately. Verify that completed tasks remain unchanged while pending tasks are updated correctly.",
@@ -296,7 +362,9 @@
"title": "Implement Completed Work Preservation",
"description": "Develop a mechanism to ensure that updates to future tasks don't affect completed work. This includes creating a versioning system for tasks, tracking task history, and implementing safeguards to prevent modifications to completed tasks. The system should maintain a record of task changes while ensuring that completed work remains stable.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- Implementation of task versioning to track changes\n- Safeguards that prevent modifications to tasks marked as \"done\"\n- System to store and retrieve task history\n- Clear visual indicators in the CLI for tasks that have been modified\n- Ability to view the original version of a modified task\n- Unit tests for completed work preservation"
},
{
@@ -304,7 +372,9 @@
"title": "Create Update Analysis and Suggestion Command",
"description": "Implement a CLI command that analyzes the current state of tasks, identifies potential drift between completed and pending tasks, and suggests updates. This command should provide a comprehensive report of potential inconsistencies and offer recommendations for task updates without automatically applying them. It should include options to apply all suggested changes, select specific changes to apply, or ignore suggestions.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- New CLI command \"analyze-drift\" implemented\n- Comprehensive analysis of potential implementation drift\n- Detailed report of suggested task updates\n- Interactive mode to select which suggestions to apply\n- Batch mode to apply all suggested changes\n- Option to export suggestions to a file for review\n- Documentation of the command usage and options\n- Integration tests that verify the end-to-end workflow"
}
]
@@ -314,7 +384,9 @@
"title": "Integrate Perplexity API",
"description": "Add integration with Perplexity API for research-backed task generation.",
"status": "done",
- "dependencies": [5],
+ "dependencies": [
+ 5
+ ],
"priority": "low",
"details": "Implement Perplexity integration including:\n- API authentication via OpenAI client\n- Create research-oriented prompt templates\n- Implement response handling for Perplexity\n- Add fallback to Claude when Perplexity is unavailable\n- Implement response quality comparison logic\n- Add configuration for model selection",
"testStrategy": "Test connectivity to Perplexity API. Verify research-oriented prompts return useful information. Test fallback mechanism by simulating Perplexity API unavailability.",
@@ -366,7 +438,10 @@
"title": "Create Research-Backed Subtask Generation",
"description": "Enhance subtask generation with research capabilities from Perplexity API.",
"status": "done",
- "dependencies": [7, 9],
+ "dependencies": [
+ 7,
+ 9
+ ],
"priority": "low",
"details": "Implement research-backed generation including:\n- Create specialized research prompts for different domains\n- Implement context enrichment from research results\n- Add domain-specific knowledge incorporation\n- Create more detailed subtask generation with best practices\n- Include references to relevant libraries and tools",
"testStrategy": "Compare subtasks generated with and without research backing. Verify that research-backed subtasks include more specific technical details and best practices.",
@@ -392,7 +467,9 @@
"title": "Develop Context Enrichment Pipeline",
"description": "Create a pipeline that processes research results and enriches the task context with relevant information. This should include filtering irrelevant information, organizing research findings by category (tools, libraries, best practices, etc.), and formatting the enriched context for use in subtask generation. Implement a scoring mechanism to prioritize the most relevant research findings.",
"status": "done",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"acceptanceCriteria": "- Context enrichment function that takes raw research results and task details as input\n- Filtering system to remove irrelevant or low-quality information\n- Categorization of research findings into distinct sections (tools, libraries, patterns, etc.)\n- Relevance scoring algorithm to prioritize the most important findings\n- Formatted output that can be directly used in subtask generation prompts\n- Tests comparing enriched context quality against baseline"
},
{
@@ -400,7 +477,9 @@
"title": "Implement Domain-Specific Knowledge Incorporation",
"description": "Develop a system to incorporate domain-specific knowledge into the subtask generation process. This should include identifying key domain concepts, technical requirements, and industry standards from the research results. Create a knowledge base structure that organizes domain information and can be referenced during subtask generation.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- Domain knowledge extraction function that identifies key technical concepts\n- Knowledge base structure for organizing domain-specific information\n- Integration with the subtask generation prompt to incorporate relevant domain knowledge\n- Support for technical terminology and concept explanation in generated subtasks\n- Mechanism to link domain concepts to specific implementation recommendations\n- Tests verifying improved technical accuracy in generated subtasks"
},
{
@@ -408,7 +487,10 @@
"title": "Enhance Subtask Generation with Technical Details",
"description": "Extend the existing subtask generation functionality to incorporate research findings and produce more technically detailed subtasks. This includes modifying the Claude prompt templates to leverage the enriched context, implementing specific sections for technical approach, implementation notes, and potential challenges. Ensure generated subtasks include concrete technical details rather than generic steps.",
"status": "done",
- "dependencies": [3, 4],
+ "dependencies": [
+ 3,
+ 4
+ ],
"acceptanceCriteria": "- Enhanced prompt templates for Claude that incorporate research-backed context\n- Generated subtasks include specific technical approaches and implementation details\n- Each subtask contains references to relevant tools, libraries, or frameworks\n- Implementation notes section with code patterns or architectural recommendations\n- Potential challenges and mitigation strategies are included where appropriate\n- Comparative tests showing improvement over baseline subtask generation"
},
{
@@ -416,7 +498,10 @@
"title": "Implement Reference and Resource Inclusion",
"description": "Create a system to include references to relevant libraries, tools, documentation, and other resources in generated subtasks. This should extract specific references from research results, validate their relevance, and format them as actionable links or citations within subtasks. Implement a verification step to ensure referenced resources are current and applicable.",
"status": "done",
- "dependencies": [3, 5],
+ "dependencies": [
+ 3,
+ 5
+ ],
"acceptanceCriteria": "- Reference extraction function that identifies tools, libraries, and resources from research\n- Validation mechanism to verify reference relevance and currency\n- Formatting system for including references in subtask descriptions\n- Support for different reference types (GitHub repos, documentation, articles, etc.)\n- Optional version specification for referenced libraries and tools\n- Tests verifying that included references are relevant and accessible"
}
]
@@ -426,7 +511,9 @@
"title": "Implement Batch Operations",
"description": "Add functionality for performing operations on multiple tasks simultaneously.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"priority": "medium",
"details": "Create batch operations including:\n- Implement multi-task status updates\n- Add bulk subtask generation\n- Create task filtering and querying capabilities\n- Implement advanced dependency management\n- Add batch prioritization\n- Create commands for operating on filtered task sets",
"testStrategy": "Test batch operations with various filters and operations. Verify that operations are applied correctly to all matching tasks. Test with large task sets to ensure performance.",
@@ -436,7 +523,9 @@
"title": "Implement Multi-Task Status Update Functionality",
"description": "Create a command-line interface command that allows users to update the status of multiple tasks simultaneously. Implement the backend logic to process batch status changes, validate the requested changes, and update the tasks.json file accordingly. The implementation should include options for filtering tasks by various criteria (ID ranges, status, priority, etc.) and applying status changes to the filtered set.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- Command accepts parameters for filtering tasks (e.g., `--status=pending`, `--priority=high`, `--id=1,2,3-5`)\n- Command accepts a parameter for the new status value (e.g., `--new-status=done`)\n- All matching tasks are updated in the tasks.json file\n- Command provides a summary of changes made (e.g., \"Updated 5 tasks from 'pending' to 'done'\")\n- Command handles errors gracefully (e.g., invalid status values, no matching tasks)\n- Changes are persisted correctly to tasks.json"
},
{
@@ -444,7 +533,10 @@
"title": "Develop Bulk Subtask Generation System",
"description": "Create functionality to generate multiple subtasks across several parent tasks at once. This should include a command-line interface that accepts filtering parameters to select parent tasks and either a template for subtasks or an AI-assisted generation option. The system should validate parent tasks, generate appropriate subtasks with proper ID assignments, and update the tasks.json file.",
"status": "done",
- "dependencies": [3, 4],
+ "dependencies": [
+ 3,
+ 4
+ ],
"acceptanceCriteria": "- Command accepts parameters for filtering parent tasks\n- Command supports template-based subtask generation with variable substitution\n- Command supports AI-assisted subtask generation using Claude API\n- Generated subtasks have proper IDs following the parent.sequence format (e.g., 1.1, 1.2)\n- Subtasks inherit appropriate properties from parent tasks (e.g., dependencies)\n- Generated subtasks are added to the tasks.json file\n- Task files are regenerated to include the new subtasks\n- Command provides a summary of subtasks created"
},
{
@@ -460,7 +552,9 @@
"title": "Create Advanced Dependency Management System",
"description": "Implement batch operations for managing dependencies between tasks. This includes commands for adding, removing, and updating dependencies across multiple tasks simultaneously. The system should validate dependency changes to prevent circular dependencies, update the tasks.json file, and regenerate task files to reflect the changes.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- Command for adding dependencies to multiple tasks at once\n- Command for removing dependencies from multiple tasks\n- Command for replacing dependencies across multiple tasks\n- Validation to prevent circular dependencies\n- Validation to ensure referenced tasks exist\n- Automatic update of affected task files\n- Summary report of dependency changes made\n- Error handling for invalid dependency operations"
},
{
@@ -468,7 +562,9 @@
"title": "Implement Batch Task Prioritization and Command System",
"description": "Create a system for batch prioritization of tasks and a command framework for operating on filtered task sets. This includes commands for changing priorities of multiple tasks at once and a generic command execution system that can apply custom operations to filtered task sets. The implementation should include a plugin architecture that allows for extending the system with new batch operations.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- Command for changing priorities of multiple tasks at once\n- Support for relative priority changes (e.g., increase/decrease priority)\n- Generic command execution framework that works with the filtering system\n- Plugin architecture for registering new batch operations\n- At least three example plugins (e.g., batch tagging, batch assignment, batch export)\n- Command for executing arbitrary operations on filtered task sets\n- Documentation for creating new batch operation plugins\n- Performance testing with large task sets (100+ tasks)"
}
]
@@ -478,7 +574,12 @@
"title": "Develop Project Initialization System",
"description": "Create functionality for initializing new projects with task structure and configuration.",
"status": "done",
- "dependencies": [1, 3, 4, 6],
+ "dependencies": [
+ 1,
+ 3,
+ 4,
+ 6
+ ],
"priority": "medium",
"details": "Implement project initialization including:\n- Create project templating system\n- Implement interactive setup wizard\n- Add environment configuration generation\n- Create initial directory structure\n- Generate example tasks.json\n- Set up default configuration",
"testStrategy": "Test project initialization in empty directories. Verify that all required files and directories are created correctly. Test the interactive setup with various inputs.",
@@ -488,7 +589,9 @@
"title": "Create Project Template Structure",
"description": "Design and implement a flexible project template system that will serve as the foundation for new project initialization. This should include creating a base directory structure, template files (e.g., default tasks.json, .env.example), and a configuration file to define customizable aspects of the template.",
"status": "done",
- "dependencies": [4],
+ "dependencies": [
+ 4
+ ],
"acceptanceCriteria": "- A `templates` directory is created with at least one default project template"
},
{
@@ -496,7 +599,9 @@
"title": "Implement Interactive Setup Wizard",
"description": "Develop an interactive command-line wizard using a library like Inquirer.js to guide users through the project initialization process. The wizard should prompt for project name, description, initial task structure, and other configurable options defined in the template configuration.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- Interactive wizard prompts for essential project information"
},
{
@@ -504,7 +609,9 @@
"title": "Generate Environment Configuration",
"description": "Create functionality to generate environment-specific configuration files based on user input and template defaults. This includes creating a .env file with necessary API keys and configuration values, and updating the tasks.json file with project-specific metadata.",
"status": "done",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"acceptanceCriteria": "- .env file is generated with placeholders for required API keys"
},
{
@@ -512,7 +619,9 @@
"title": "Implement Directory Structure Creation",
"description": "Develop the logic to create the initial directory structure for new projects based on the selected template and user inputs. This should include creating necessary subdirectories (e.g., tasks/, scripts/, .cursor/rules/) and copying template files to appropriate locations.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- Directory structure is created according to the template specification"
},
{
@@ -520,7 +629,9 @@
"title": "Generate Example Tasks.json",
"description": "Create functionality to generate an initial tasks.json file with example tasks based on the project template and user inputs from the setup wizard. This should include creating a set of starter tasks that demonstrate the task structure and provide a starting point for the project.",
"status": "done",
- "dependencies": [6],
+ "dependencies": [
+ 6
+ ],
"acceptanceCriteria": "- An initial tasks.json file is generated with at least 3 example tasks"
},
{
@@ -538,7 +649,10 @@
"title": "Create Cursor Rules Implementation",
"description": "Develop the Cursor AI integration rules and documentation.",
"status": "done",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"priority": "medium",
"details": "Implement Cursor rules including:\n- Create dev_workflow.mdc documentation\n- Implement cursor_rules.mdc\n- Add self_improve.mdc\n- Design rule integration documentation\n- Set up .cursor directory structure\n- Document how Cursor AI should interact with the system",
"testStrategy": "Review rules documentation for clarity and completeness. Test with Cursor AI to verify the rules are properly interpreted and followed.",
@@ -556,7 +670,9 @@
"title": "Create dev_workflow.mdc Documentation",
"description": "Develop the dev_workflow.mdc file that documents the development workflow for Cursor AI. This file should outline how Cursor AI should assist with task discovery, implementation, and verification within the project. Include specific examples of commands and interactions that demonstrate the optimal workflow.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- dev_workflow.mdc file created in .cursor/rules directory\n- Document clearly explains the development workflow with Cursor AI\n- Workflow documentation includes task discovery process\n- Implementation guidance for Cursor AI is detailed\n- Verification procedures are documented\n- Examples of typical interactions are provided"
},
{
@@ -564,7 +680,9 @@
"title": "Implement cursor_rules.mdc",
"description": "Create the cursor_rules.mdc file that defines specific rules and guidelines for how Cursor AI should interact with the codebase. This should include code style preferences, architectural patterns to follow, documentation requirements, and any project-specific conventions that Cursor AI should adhere to when generating or modifying code.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- cursor_rules.mdc file created in .cursor/rules directory\n- Rules document clearly defines code style guidelines\n- Architectural patterns and principles are specified\n- Documentation requirements for generated code are outlined\n- Project-specific naming conventions are documented\n- Rules for handling dependencies and imports are defined\n- Guidelines for test implementation are included"
},
{
@@ -572,7 +690,11 @@
"title": "Add self_improve.mdc Documentation",
"description": "Develop the self_improve.mdc file that instructs Cursor AI on how to continuously improve its assistance capabilities within the project context. This document should outline how Cursor AI should learn from feedback, adapt to project evolution, and enhance its understanding of the codebase over time.",
"status": "done",
- "dependencies": [1, 2, 3],
+ "dependencies": [
+ 1,
+ 2,
+ 3
+ ],
"acceptanceCriteria": "- self_improve.mdc file created in .cursor/rules directory\n- Document outlines feedback incorporation mechanisms\n- Guidelines for adapting to project evolution are included\n- Instructions for enhancing codebase understanding over time\n- Strategies for improving code suggestions based on past interactions\n- Methods for refining prompt responses based on user feedback\n- Approach for maintaining consistency with evolving project patterns"
},
{
@@ -580,7 +702,12 @@
"title": "Create Cursor AI Integration Documentation",
"description": "Develop comprehensive documentation on how Cursor AI integrates with the task management system. This should include detailed instructions on how Cursor AI should interpret tasks.json, individual task files, and how it should assist with implementation. Document the specific commands and workflows that Cursor AI should understand and support.",
"status": "done",
- "dependencies": [1, 2, 3, 4],
+ "dependencies": [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
"acceptanceCriteria": "- Integration documentation created and stored in an appropriate location\n- Documentation explains how Cursor AI should interpret tasks.json structure\n- Guidelines for Cursor AI to understand task dependencies and priorities\n- Instructions for Cursor AI to assist with task implementation\n- Documentation of specific commands Cursor AI should recognize\n- Examples of effective prompts for working with the task system\n- Troubleshooting section for common Cursor AI integration issues\n- Documentation references all created rule files and explains their purpose"
}
]
@@ -590,7 +717,9 @@
"title": "Develop Agent Workflow Guidelines",
"description": "Create comprehensive guidelines for how AI agents should interact with the task system.",
"status": "done",
- "dependencies": [13],
+ "dependencies": [
+ 13
+ ],
"priority": "medium",
"details": "Create agent workflow guidelines including:\n- Document task discovery workflow\n- Create task selection guidelines\n- Implement implementation guidance\n- Add verification procedures\n- Define how agents should prioritize work\n- Create guidelines for handling dependencies",
"testStrategy": "Review guidelines with actual AI agents to verify they can follow the procedures. Test various scenarios to ensure the guidelines cover all common workflows.",
@@ -608,7 +737,9 @@
"title": "Implement Task Selection Algorithm",
"description": "Develop an algorithm for AI agents to select the most appropriate task to work on based on priority, dependencies, and current project status. This should include logic for evaluating task urgency, managing blocked tasks, and optimizing workflow efficiency. Implement the algorithm in JavaScript and integrate it with the existing task management system.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- JavaScript module implementing the task selection algorithm"
},
{
@@ -616,7 +747,9 @@
"title": "Create Implementation Guidance Generator",
"description": "Develop a system that generates detailed implementation guidance for AI agents based on task descriptions and project context. This should leverage the Anthropic Claude API to create step-by-step instructions, suggest relevant libraries or tools, and provide code snippets or pseudocode where appropriate. Implement caching to reduce API calls and improve performance.",
"status": "done",
- "dependencies": [5],
+ "dependencies": [
+ 5
+ ],
"acceptanceCriteria": "- Node.js module for generating implementation guidance using Claude API"
},
{
@@ -624,7 +757,10 @@
"title": "Develop Verification Procedure Framework",
"description": "Create a flexible framework for defining and executing verification procedures for completed tasks. This should include a DSL (Domain Specific Language) for specifying acceptance criteria, automated test generation where possible, and integration with popular testing frameworks. Implement hooks for both automated and manual verification steps.",
"status": "done",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"acceptanceCriteria": "- JavaScript module implementing the verification procedure framework"
},
{
@@ -632,7 +768,11 @@
"title": "Implement Dynamic Task Prioritization System",
"description": "Develop a system that dynamically adjusts task priorities based on project progress, dependencies, and external factors. This should include an algorithm for recalculating priorities, a mechanism for propagating priority changes through dependency chains, and an API for external systems to influence priorities. Implement this as a background process that periodically updates the tasks.json file.",
"status": "done",
- "dependencies": [1, 2, 3],
+ "dependencies": [
+ 1,
+ 2,
+ 3
+ ],
"acceptanceCriteria": "- Node.js module implementing the dynamic prioritization system"
}
]
@@ -642,7 +782,9 @@
"title": "Optimize Agent Integration with Cursor and dev.js Commands",
"description": "Document and enhance existing agent interaction patterns through Cursor rules and dev.js commands.",
"status": "done",
- "dependencies": [14],
+ "dependencies": [
+ 14
+ ],
"priority": "medium",
"details": "Optimize agent integration including:\n- Document and improve existing agent interaction patterns in Cursor rules\n- Enhance integration between Cursor agent capabilities and dev.js commands\n- Improve agent workflow documentation in cursor rules (dev_workflow.mdc, cursor_rules.mdc)\n- Add missing agent-specific features to existing commands\n- Leverage existing infrastructure rather than building a separate system",
"testStrategy": "Test the enhanced commands with AI agents to verify they can correctly interpret and use them. Verify that agents can effectively interact with the task system using the documented patterns in Cursor rules.",
@@ -668,7 +810,9 @@
"title": "Optimize Command Responses for Agent Consumption",
"description": "Refine the output format of existing commands to ensure they are easily parseable by AI agents. Focus on consistent, structured outputs that agents can reliably interpret without requiring a separate parsing system.",
"status": "done",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"acceptanceCriteria": "- Command outputs optimized for agent consumption"
},
{
@@ -676,7 +820,10 @@
"title": "Improve Agent Workflow Documentation in Cursor Rules",
"description": "Enhance the agent workflow documentation in dev_workflow.mdc and cursor_rules.mdc to provide clear guidance on how agents should interact with the task system. Include example interactions and best practices for agents.",
"status": "done",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"acceptanceCriteria": "- Enhanced agent workflow documentation in Cursor rules"
},
{
@@ -684,7 +831,9 @@
"title": "Add Agent-Specific Features to Existing Commands",
"description": "Identify and implement any missing agent-specific features in the existing command system. This may include additional flags, parameters, or output formats that are particularly useful for agent interactions.",
"status": "done",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"acceptanceCriteria": "- Agent-specific features added to existing commands"
},
{
@@ -692,7 +841,10 @@
"title": "Create Agent Usage Examples and Patterns",
"description": "Develop a set of example interactions and usage patterns that demonstrate how agents should effectively use the task system. Include these examples in the documentation to guide future agent implementations.",
"status": "done",
- "dependencies": [3, 4],
+ "dependencies": [
+ 3,
+ 4
+ ],
"acceptanceCriteria": "- Comprehensive set of agent usage examples and patterns"
}
]
@@ -702,7 +854,9 @@
"title": "Create Configuration Management System",
"description": "Implement robust configuration handling with environment variables and .env files.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"priority": "high",
"details": "Build configuration management including:\n- Environment variable handling\n- .env file support\n- Configuration validation\n- Sensible defaults with overrides\n- Create .env.example template\n- Add configuration documentation\n- Implement secure handling of API keys",
"testStrategy": "Test configuration loading from various sources (environment variables, .env files). Verify that validation correctly identifies invalid configurations. Test that defaults are applied when values are missing.",
@@ -720,7 +874,9 @@
"title": "Implement .env File Support",
"description": "Add support for loading configuration from .env files using dotenv or a similar library. Implement file detection, parsing, and merging with existing environment variables. Handle multiple environments (.env.development, .env.production, etc.) and implement proper error handling for file reading issues.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- Integration with dotenv or equivalent library\n- Support for multiple environment-specific .env files (.env.development, .env.production)\n- Proper error handling for missing or malformed .env files\n- Priority order established (process.env overrides .env values)\n- Unit tests verifying .env file loading and overriding behavior"
},
{
@@ -728,7 +884,10 @@
"title": "Implement Configuration Validation",
"description": "Create a validation system for configuration values using a schema validation library like Joi, Zod, or Ajv. Define schemas for all configuration categories (API keys, file paths, feature flags, etc.). Implement validation that runs at startup and provides clear error messages for invalid configurations.",
"status": "done",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"acceptanceCriteria": "- Schema validation implemented for all configuration values\n- Type checking and format validation for different value types\n- Comprehensive error messages that clearly identify validation failures\n- Support for custom validation rules for complex configuration requirements\n- Unit tests covering validation of valid and invalid configurations"
},
{
@@ -736,7 +895,11 @@
"title": "Create Configuration Defaults and Override System",
"description": "Implement a system of sensible defaults for all configuration values with the ability to override them via environment variables or .env files. Create a unified configuration object that combines defaults, .env values, and environment variables with proper precedence. Implement a caching mechanism to avoid repeated environment lookups.",
"status": "done",
- "dependencies": [1, 2, 3],
+ "dependencies": [
+ 1,
+ 2,
+ 3
+ ],
"acceptanceCriteria": "- Default configuration values defined for all settings\n- Clear override precedence (env vars > .env files > defaults)\n- Configuration object accessible throughout the application\n- Caching mechanism to improve performance\n- Unit tests verifying override behavior works correctly"
},
{
@@ -744,7 +907,12 @@
"title": "Create .env.example Template",
"description": "Generate a comprehensive .env.example file that documents all supported environment variables, their purpose, format, and default values. Include comments explaining the purpose of each variable and provide examples. Ensure sensitive values are not included but have clear placeholders.",
"status": "done",
- "dependencies": [1, 2, 3, 4],
+ "dependencies": [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
"acceptanceCriteria": "- Complete .env.example file with all supported variables\n- Detailed comments explaining each variable's purpose and format\n- Clear placeholders for sensitive values (API_KEY=your-api-key-here)\n- Categorization of variables by function (API, logging, features, etc.)\n- Documentation on how to use the .env.example file"
},
{
@@ -752,7 +920,12 @@
"title": "Implement Secure API Key Handling",
"description": "Create a secure mechanism for handling sensitive configuration values like API keys. Implement masking of sensitive values in logs and error messages. Add validation for API key formats and implement a mechanism to detect and warn about insecure storage of API keys (e.g., committed to git). Add support for key rotation and refresh.",
"status": "done",
- "dependencies": [1, 2, 3, 4],
+ "dependencies": [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
"acceptanceCriteria": "- Secure storage of API keys and sensitive configuration\n- Masking of sensitive values in logs and error messages\n- Validation of API key formats (length, character set, etc.)\n- Warning system for potentially insecure configuration practices\n- Support for key rotation without application restart\n- Unit tests verifying secure handling of sensitive configuration\n\nThese subtasks provide a comprehensive approach to implementing the configuration management system with a focus on security, validation, and developer experience. The tasks are sequenced to build upon each other logically, starting with basic environment variable support and progressing to more advanced features like secure API key handling."
}
]
@@ -762,7 +935,9 @@
"title": "Implement Comprehensive Logging System",
"description": "Create a flexible logging system with configurable levels and output formats.",
"status": "done",
- "dependencies": [16],
+ "dependencies": [
+ 16
+ ],
"priority": "medium",
"details": "Implement logging system including:\n- Multiple log levels (debug, info, warn, error)\n- Configurable output destinations\n- Command execution logging\n- API interaction logging\n- Error tracking\n- Performance metrics\n- Log file rotation",
"testStrategy": "Test logging at different verbosity levels. Verify that logs contain appropriate information for debugging. Test log file rotation with large volumes of logs.",
@@ -780,7 +955,9 @@
"title": "Implement Configurable Output Destinations",
"description": "Extend the logging framework to support multiple output destinations simultaneously. Implement adapters for console output, file output, and potentially other destinations (like remote logging services). Create a configuration system that allows specifying which log levels go to which destinations. Ensure thread-safe writing to prevent log corruption.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- Abstract destination interface that can be implemented by different output types\n- Console output adapter with color-coding based on log level\n- File output adapter with proper file handling and path configuration\n- Configuration options to route specific log levels to specific destinations\n- Ability to add custom output destinations through the adapter pattern\n- Tests verifying logs are correctly routed to configured destinations"
},
{
@@ -788,7 +965,10 @@
"title": "Implement Command and API Interaction Logging",
"description": "Create specialized logging functionality for command execution and API interactions. For commands, log the command name, arguments, options, and execution status. For API interactions, log request details (URL, method, headers), response status, and timing information. Implement sanitization to prevent logging sensitive data like API keys or passwords.",
"status": "done",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"acceptanceCriteria": "- Command logger that captures command execution details\n- API logger that records request/response details with timing information\n- Data sanitization to mask sensitive information in logs\n- Configuration options to control verbosity of command and API logs\n- Integration with existing command execution flow\n- Tests verifying proper logging of commands and API calls"
},
{
@@ -796,7 +976,9 @@
"title": "Implement Error Tracking and Performance Metrics",
"description": "Enhance the logging system to provide detailed error tracking and performance metrics. For errors, capture stack traces, error codes, and contextual information. For performance metrics, implement timing utilities to measure execution duration of key operations. Create a consistent format for these specialized log types to enable easier analysis.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- Error logging with full stack trace capture and error context\n- Performance timer utility for measuring operation duration\n- Standard format for error and performance log entries\n- Ability to track related errors through correlation IDs\n- Configuration options for performance logging thresholds\n- Unit tests for error tracking and performance measurement"
},
{
@@ -804,7 +986,9 @@
"title": "Implement Log File Rotation and Management",
"description": "Create a log file management system that handles rotation based on file size or time intervals. Implement compression of rotated logs, automatic cleanup of old logs, and configurable retention policies. Ensure that log rotation happens without disrupting the application and that no log messages are lost during rotation.",
"status": "done",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"acceptanceCriteria": "- Log rotation based on configurable file size or time interval\n- Compressed archive creation for rotated logs\n- Configurable retention policy for log archives\n- Zero message loss during rotation operations\n- Proper file locking to prevent corruption during rotation\n- Configuration options for rotation settings\n- Tests verifying rotation functionality with large log volumes\n- Documentation for log file location and naming conventions"
}
]
@@ -814,7 +998,17 @@
"title": "Create Comprehensive User Documentation",
"description": "Develop complete user documentation including README, examples, and troubleshooting guides.",
"status": "done",
- "dependencies": [1, 3, 4, 5, 6, 7, 11, 12, 16],
+ "dependencies": [
+ 1,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 11,
+ 12,
+ 16
+ ],
"priority": "medium",
"details": "Create user documentation including:\n- Detailed README with installation and usage instructions\n- Command reference documentation\n- Configuration guide\n- Example workflows\n- Troubleshooting guides\n- API integration documentation\n- Best practices\n- Advanced usage scenarios",
"testStrategy": "Review documentation for clarity and completeness. Have users unfamiliar with the system attempt to follow the documentation and note any confusion or issues.",
@@ -824,7 +1018,9 @@
"title": "Create Detailed README with Installation and Usage Instructions",
"description": "Develop a comprehensive README.md file that serves as the primary documentation entry point. Include project overview, installation steps for different environments, basic usage examples, and links to other documentation sections. Structure the README with clear headings, code blocks for commands, and screenshots where helpful.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- README includes project overview, features list, and system requirements\n- Installation instructions cover all supported platforms with step-by-step commands\n- Basic usage examples demonstrate core functionality with command syntax\n- Configuration section explains environment variables and .env file usage\n- Documentation includes badges for version, license, and build status\n- All sections are properly formatted with Markdown for readability"
},
{
@@ -832,7 +1028,9 @@
"title": "Develop Command Reference Documentation",
"description": "Create detailed documentation for all CLI commands, their options, arguments, and examples. Organize commands by functionality category, include syntax diagrams, and provide real-world examples for each command. Document all global options and environment variables that affect command behavior.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- All commands are documented with syntax, options, and arguments\n- Each command includes at least 2 practical usage examples\n- Commands are organized into logical categories (task management, AI integration, etc.)\n- Global options are documented with their effects on command execution\n- Exit codes and error messages are documented for troubleshooting\n- Documentation includes command output examples"
},
{
@@ -848,7 +1046,10 @@
"title": "Develop Example Workflows and Use Cases",
"description": "Create detailed documentation of common workflows and use cases, showing how to use the tool effectively for different scenarios. Include step-by-step guides with command sequences, expected outputs, and explanations. Cover basic to advanced workflows, including PRD parsing, task expansion, and implementation drift handling.",
"status": "done",
- "dependencies": [3, 6],
+ "dependencies": [
+ 3,
+ 6
+ ],
"acceptanceCriteria": "- At least 5 complete workflow examples from initialization to completion\n- Each workflow includes all commands in sequence with expected outputs\n- Screenshots or terminal recordings illustrate the workflows\n- Explanation of decision points and alternatives within workflows\n- Advanced use cases demonstrate integration with development processes\n- Examples show how to handle common edge cases and errors"
},
{
@@ -856,7 +1057,11 @@
"title": "Create Troubleshooting Guide and FAQ",
"description": "Develop a comprehensive troubleshooting guide that addresses common issues, error messages, and their solutions. Include a FAQ section covering common questions about usage, configuration, and best practices. Document known limitations and workarounds for edge cases.",
"status": "done",
- "dependencies": [1, 2, 3],
+ "dependencies": [
+ 1,
+ 2,
+ 3
+ ],
"acceptanceCriteria": "- All error messages are documented with causes and solutions\n- Common issues are organized by category (installation, configuration, execution)\n- FAQ covers at least 15 common questions with detailed answers\n- Troubleshooting decision trees help users diagnose complex issues\n- Known limitations and edge cases are clearly documented\n- Recovery procedures for data corruption or API failures are included"
},
{
@@ -864,7 +1069,9 @@
"title": "Develop API Integration and Extension Documentation",
"description": "Create technical documentation for API integrations (Claude, Perplexity) and extension points. Include details on prompt templates, response handling, token optimization, and custom integrations. Document the internal architecture to help developers extend the tool with new features or integrations.",
"status": "done",
- "dependencies": [5],
+ "dependencies": [
+ 5
+ ],
"acceptanceCriteria": "- Detailed documentation of all API integrations with authentication requirements\n- Prompt templates are documented with variables and expected responses\n- Token usage optimization strategies are explained\n- Extension points are documented with examples\n- Internal architecture diagrams show component relationships\n- Custom integration guide includes step-by-step instructions and code examples"
}
]
@@ -874,7 +1081,14 @@
"title": "Implement Error Handling and Recovery",
"description": "Create robust error handling throughout the system with helpful error messages and recovery options.",
"status": "done",
- "dependencies": [1, 3, 5, 9, 16, 17],
+ "dependencies": [
+ 1,
+ 3,
+ 5,
+ 9,
+ 16,
+ 17
+ ],
"priority": "high",
"details": "Implement error handling including:\n- Consistent error message format\n- Helpful error messages with recovery suggestions\n- API error handling with retries\n- File system error recovery\n- Data validation errors with specific feedback\n- Command syntax error guidance\n- System state recovery after failures",
"testStrategy": "Deliberately trigger various error conditions and verify that the system handles them gracefully. Check that error messages are helpful and provide clear guidance on how to resolve issues.",
@@ -900,7 +1114,9 @@
"title": "Develop File System Error Recovery Mechanisms",
"description": "Implement error handling and recovery mechanisms for file system operations, focusing on tasks.json and individual task files. This should include handling of file not found errors, permission issues, and data corruption scenarios. Implement automatic backups and recovery procedures to ensure data integrity.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- File system operations are wrapped with comprehensive error handling"
},
{
@@ -908,7 +1124,10 @@
"title": "Enhance Data Validation with Detailed Error Feedback",
"description": "Improve the existing data validation system to provide more specific and actionable error messages. Implement detailed validation checks for all user inputs and task data, with clear error messages that pinpoint the exact issue and how to resolve it. This should cover task creation, updates, and any data imported from external sources.",
"status": "done",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"acceptanceCriteria": "- Enhanced validation checks are implemented for all task properties and user inputs"
},
{
@@ -916,7 +1135,9 @@
"title": "Implement Command Syntax Error Handling and Guidance",
"description": "Enhance the CLI to provide more helpful error messages and guidance when users input invalid commands or options. Implement a \"did you mean?\" feature for close matches to valid commands, and provide context-sensitive help for command syntax errors. This should integrate with the existing Commander.js setup.",
"status": "done",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"acceptanceCriteria": "- Invalid commands trigger helpful error messages with suggestions for valid alternatives"
},
{
@@ -924,7 +1145,10 @@
"title": "Develop System State Recovery After Critical Failures",
"description": "Implement a system state recovery mechanism to handle critical failures that could leave the task management system in an inconsistent state. This should include creating periodic snapshots of the system state, implementing a recovery procedure to restore from these snapshots, and providing tools for manual intervention if automatic recovery fails.",
"status": "done",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"acceptanceCriteria": "- Periodic snapshots of the tasks.json and related state are automatically created"
}
]
@@ -934,7 +1158,11 @@
"title": "Create Token Usage Tracking and Cost Management",
"description": "Implement system for tracking API token usage and managing costs.",
"status": "done",
- "dependencies": [5, 9, 17],
+ "dependencies": [
+ 5,
+ 9,
+ 17
+ ],
"priority": "medium",
"details": "Implement token tracking including:\n- Track token usage for all API calls\n- Implement configurable usage limits\n- Add reporting on token consumption\n- Create cost estimation features\n- Implement caching to reduce API calls\n- Add token optimization for prompts\n- Create usage alerts when approaching limits",
"testStrategy": "Track token usage across various operations and verify accuracy. Test that limits properly prevent excessive usage. Verify that caching reduces token consumption for repeated operations.",
@@ -944,7 +1172,9 @@
"title": "Implement Token Usage Tracking for API Calls",
"description": "Create a middleware or wrapper function that intercepts all API calls to OpenAI, Anthropic, and Perplexity. This function should count the number of tokens used in both the request and response, storing this information in a persistent data store (e.g., SQLite database). Implement a caching mechanism to reduce redundant API calls and token usage.",
"status": "done",
- "dependencies": [5],
+ "dependencies": [
+ 5
+ ],
"acceptanceCriteria": "- Token usage is accurately tracked for all API calls"
},
{
@@ -960,7 +1190,10 @@
"title": "Implement Token Usage Reporting and Cost Estimation",
"description": "Develop a reporting module that generates detailed token usage reports. Include breakdowns by API, user, and time period. Implement cost estimation features by integrating current pricing information for each API. Create both command-line and programmatic interfaces for generating reports and estimates.",
"status": "done",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"acceptanceCriteria": "- CLI command for generating usage reports with various filters"
},
{
@@ -976,7 +1209,10 @@
"title": "Develop Token Usage Alert System",
"description": "Create an alert system that monitors token usage in real-time and sends notifications when usage approaches or exceeds defined thresholds. Implement multiple notification channels (e.g., email, Slack, system logs) and allow for customizable alert rules. Integrate this system with the existing logging and reporting modules.",
"status": "done",
- "dependencies": [2, 3],
+ "dependencies": [
+ 2,
+ 3
+ ],
"acceptanceCriteria": "- Real-time monitoring of token usage against configured limits"
}
]
@@ -986,7 +1222,11 @@
"title": "Refactor dev.js into Modular Components",
"description": "Restructure the monolithic dev.js file into separate modular components to improve code maintainability, readability, and testability while preserving all existing functionality.",
"status": "done",
- "dependencies": [3, 16, 17],
+ "dependencies": [
+ 3,
+ 16,
+ 17
+ ],
"priority": "high",
"details": "This task involves breaking down the current dev.js file into logical modules with clear responsibilities:\n\n1. Create the following module files:\n - commands.js: Handle all CLI command definitions and execution logic\n - ai-services.js: Encapsulate all AI service interactions (OpenAI, etc.)\n - task-manager.js: Manage task operations (create, read, update, delete)\n - ui.js: Handle all console output formatting, colors, and user interaction\n - utils.js: Contain helper functions, utilities, and shared code\n\n2. Refactor dev.js to serve as the entry point that:\n - Imports and initializes all modules\n - Handles command-line argument parsing\n - Sets up the execution environment\n - Orchestrates the flow between modules\n\n3. Ensure proper dependency injection between modules to avoid circular dependencies\n\n4. Maintain consistent error handling across modules\n\n5. Update import/export statements throughout the codebase\n\n6. Document each module with clear JSDoc comments explaining purpose and usage\n\n7. Ensure configuration and logging systems are properly integrated into each module\n\nThe refactoring should not change any existing functionality - this is purely a code organization task.",
"testStrategy": "Testing should verify that functionality remains identical after refactoring:\n\n1. Automated Testing:\n - Create unit tests for each new module to verify individual functionality\n - Implement integration tests that verify modules work together correctly\n - Test each command to ensure it works exactly as before\n\n2. Manual Testing:\n - Execute all existing CLI commands and verify outputs match pre-refactoring behavior\n - Test edge cases like error handling and invalid inputs\n - Verify that configuration options still work as expected\n\n3. Code Quality Verification:\n - Run linting tools to ensure code quality standards are maintained\n - Check for any circular dependencies between modules\n - Verify that each module has a single, clear responsibility\n\n4. Performance Testing:\n - Compare execution time before and after refactoring to ensure no performance regression\n\n5. Documentation Check:\n - Verify that each module has proper documentation\n - Ensure README is updated if necessary to reflect architectural changes",
@@ -1004,7 +1244,9 @@
"title": "Create Core Module Structure and Entry Point Refactoring",
"description": "Create the skeleton structure for all module files (commands.js, ai-services.js, task-manager.js, ui.js, utils.js) with proper export statements. Refactor dev.js to serve as the entry point that imports and orchestrates these modules. Implement the basic initialization flow and command-line argument parsing in the new structure.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- All module files created with appropriate JSDoc headers explaining purpose"
},
{
@@ -1012,7 +1254,9 @@
"title": "Implement Core Module Functionality with Dependency Injection",
"description": "Migrate the core functionality from dev.js into the appropriate modules following the mapping document. Implement proper dependency injection to avoid circular dependencies. Ensure each module has a clear API and properly encapsulates its internal state. Focus on the critical path functionality first.",
"status": "done",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"acceptanceCriteria": "- All core functionality migrated to appropriate modules"
},
{
@@ -1020,7 +1264,9 @@
"title": "Implement Error Handling and Complete Module Migration",
"description": "Establish a consistent error handling pattern across all modules. Complete the migration of remaining functionality from dev.js to the appropriate modules. Ensure all edge cases, error scenarios, and helper functions are properly moved and integrated. Update all import/export statements throughout the codebase to reference the new module structure.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"acceptanceCriteria": "- Consistent error handling pattern implemented across all modules"
},
{
@@ -1028,7 +1274,9 @@
"title": "Test, Document, and Finalize Modular Structure",
"description": "Perform comprehensive testing of the refactored codebase to ensure all functionality works as expected. Add detailed JSDoc comments to all modules, functions, and significant code blocks. Create or update developer documentation explaining the new modular structure, module responsibilities, and how they interact. Perform a final code review to ensure code quality, consistency, and adherence to best practices.",
"status": "done",
- "dependencies": ["21.4"],
+ "dependencies": [
+ "21.4"
+ ],
"acceptanceCriteria": "- All existing functionality works exactly as before"
}
]
@@ -1038,7 +1286,9 @@
"title": "Create Comprehensive Test Suite for Task Master CLI",
"description": "Develop a complete testing infrastructure for the Task Master CLI that includes unit, integration, and end-to-end tests to verify all core functionality and error handling.",
"status": "done",
- "dependencies": [21],
+ "dependencies": [
+ 21
+ ],
"priority": "high",
"details": "Implement a comprehensive test suite using Jest as the testing framework. The test suite should be organized into three main categories:\n\n1. Unit Tests:\n - Create tests for all utility functions and core logic components\n - Test task creation, parsing, and manipulation functions\n - Test data storage and retrieval functions\n - Test formatting and display functions\n\n2. Integration Tests:\n - Test all CLI commands (create, expand, update, list, etc.)\n - Verify command options and parameters work correctly\n - Test interactions between different components\n - Test configuration loading and application settings\n\n3. End-to-End Tests:\n - Test complete workflows (e.g., creating a task, expanding it, updating status)\n - Test error scenarios and recovery\n - Test edge cases like handling large numbers of tasks\n\nImplement proper mocking for:\n- Claude API interactions (using Jest mock functions)\n- File system operations (using mock-fs or similar)\n- User input/output (using mock stdin/stdout)\n\nEnsure tests cover both successful operations and error handling paths. Set up continuous integration to run tests automatically. Create fixtures for common test data and scenarios. Include test coverage reporting to identify untested code paths.",
"testStrategy": "Verification will involve:\n\n1. Code Review:\n - Verify test organization follows the unit/integration/end-to-end structure\n - Check that all major functions have corresponding tests\n - Verify mocks are properly implemented for external dependencies\n\n2. Test Coverage Analysis:\n - Run test coverage tools to ensure at least 80% code coverage\n - Verify critical paths have 100% coverage\n - Identify any untested code paths\n\n3. Test Quality Verification:\n - Manually review test cases to ensure they test meaningful behavior\n - Verify both positive and negative test cases exist\n - Check that tests are deterministic and don't have false positives/negatives\n\n4. CI Integration:\n - Verify tests run successfully in the CI environment\n - Ensure tests run in a reasonable amount of time\n - Check that test failures provide clear, actionable information\n\nThe task will be considered complete when all tests pass consistently, coverage meets targets, and the test suite can detect intentionally introduced bugs.",
@@ -1056,7 +1306,9 @@
"title": "Implement Unit Tests for Core Components",
"description": "Create a comprehensive set of unit tests for all utility functions, core logic components, and individual modules of the Task Master CLI. This includes tests for task creation, parsing, manipulation, data storage, retrieval, and formatting functions. Ensure all edge cases and error scenarios are covered.",
"status": "done",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"acceptanceCriteria": "- Unit tests are implemented for all utility functions in the project"
},
{
@@ -1064,7 +1316,10 @@
"title": "Develop Integration and End-to-End Tests",
"description": "Create integration tests that verify the correct interaction between different components of the CLI, including command execution, option parsing, and data flow. Implement end-to-end tests that simulate complete user workflows, such as creating a task, expanding it, and updating its status. Include tests for error scenarios, recovery processes, and handling large numbers of tasks.",
"status": "deferred",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"acceptanceCriteria": "- Integration tests cover all CLI commands (create, expand, update, list, etc.)"
}
]
@@ -1074,7 +1329,9 @@
"title": "Complete MCP Server Implementation for Task Master using FastMCP",
"description": "Finalize the MCP server functionality for Task Master by leveraging FastMCP's capabilities, transitioning from CLI-based execution to direct function imports, and optimizing performance, authentication, and context management. Ensure the server integrates seamlessly with Cursor via `mcp.json` and supports proper tool registration, efficient context handling, and transport type handling (focusing on stdio). Additionally, ensure the server can be instantiated properly when installed via `npx` or `npm i -g`. Evaluate and address gaps in the current implementation, including function imports, context management, caching, tool registration, and adherence to FastMCP best practices.",
"status": "done",
- "dependencies": [22],
+ "dependencies": [
+ 22
+ ],
"priority": "medium",
"details": "This task involves completing the Model Context Protocol (MCP) server implementation for Task Master using FastMCP. Key updates include:\n\n1. Transition from CLI-based execution (currently using `child_process.spawnSync`) to direct Task Master function imports for improved performance and reliability.\n2. Implement caching mechanisms for frequently accessed contexts to enhance performance, leveraging FastMCP's efficient transport mechanisms (e.g., stdio).\n3. Refactor context management to align with best practices for handling large context windows, metadata, and tagging.\n4. Refactor tool registration in `tools/index.js` to include clear descriptions and parameter definitions, leveraging FastMCP's decorator-based patterns for better integration.\n5. Enhance transport type handling to ensure proper stdio communication and compatibility with FastMCP.\n6. Ensure the MCP server can be instantiated and run correctly when installed globally via `npx` or `npm i -g`.\n7. Integrate the ModelContextProtocol SDK directly to streamline resource and tool registration, ensuring compatibility with FastMCP's transport mechanisms.\n8. Identify and address missing components or functionalities to meet FastMCP best practices, such as robust error handling, monitoring endpoints, and concurrency support.\n9. Update documentation to include examples of using the MCP server with FastMCP, detailed setup instructions, and client integration guides.\n10. Organize direct function implementations in a modular structure within the mcp-server/src/core/direct-functions/ directory for improved maintainability and organization.\n11. Follow consistent naming conventions: file names use kebab-case (like-this.js), direct functions use camelCase with Direct suffix (functionNameDirect), tool registration functions use camelCase with Tool suffix (registerToolNameTool), and MCP tool names exposed to clients use snake_case (tool_name).\n\nThe implementation must ensure compatibility with existing MCP clients and follow RESTful API design principles, while supporting concurrent requests and maintaining robust error handling.",
"testStrategy": "Testing for the MCP server implementation will follow a comprehensive approach based on our established testing guidelines:\n\n## Test Organization\n\n1. **Unit Tests** (`tests/unit/mcp-server/`):\n - Test individual MCP server components in isolation\n - Mock all external dependencies including FastMCP SDK\n - Test each tool implementation separately\n - Test each direct function implementation in the direct-functions directory\n - Verify direct function imports work correctly\n - Test context management and caching mechanisms\n - Example files: `context-manager.test.js`, `tool-registration.test.js`, `direct-functions/list-tasks.test.js`\n\n2. **Integration Tests** (`tests/integration/mcp-server/`):\n - Test interactions between MCP server components\n - Verify proper tool registration with FastMCP\n - Test context flow between components\n - Validate error handling across module boundaries\n - Test the integration between direct functions and their corresponding MCP tools\n - Example files: `server-tool-integration.test.js`, `context-flow.test.js`\n\n3. **End-to-End Tests** (`tests/e2e/mcp-server/`):\n - Test complete MCP server workflows\n - Verify server instantiation via different methods (direct, npx, global install)\n - Test actual stdio communication with mock clients\n - Example files: `server-startup.e2e.test.js`, `client-communication.e2e.test.js`\n\n4. **Test Fixtures** (`tests/fixtures/mcp-server/`):\n - Sample context data\n - Mock tool definitions\n - Sample MCP requests and responses\n\n## Testing Approach\n\n### Module Mocking Strategy\n```javascript\n// Mock the FastMCP SDK\njest.mock('@model-context-protocol/sdk', () => ({\n MCPServer: jest.fn().mockImplementation(() => ({\n registerTool: jest.fn(),\n registerResource: jest.fn(),\n start: jest.fn().mockResolvedValue(undefined),\n stop: jest.fn().mockResolvedValue(undefined)\n })),\n MCPError: jest.fn().mockImplementation(function(message, code) {\n this.message = message;\n this.code = code;\n })\n}));\n\n// Import modules after mocks\nimport { MCPServer, MCPError } from '@model-context-protocol/sdk';\nimport { initMCPServer } from '../../scripts/mcp-server.js';\n```\n\n### Direct Function Testing\n- Test each direct function in isolation\n- Verify proper error handling and return formats\n- Test with various input parameters and edge cases\n- Verify integration with the task-master-core.js export hub\n\n### Context Management Testing\n- Test context creation, retrieval, and manipulation\n- Verify caching mechanisms work correctly\n- Test context windowing and metadata handling\n- Validate context persistence across server restarts\n\n### Direct Function Import Testing\n- Verify Task Master functions are imported correctly\n- Test performance improvements compared to CLI execution\n- Validate error handling with direct imports\n\n### Tool Registration Testing\n- Verify tools are registered with proper descriptions and parameters\n- Test decorator-based registration patterns\n- Validate tool execution with different input types\n\n### Error Handling Testing\n- Test all error paths with appropriate MCPError types\n- Verify error propagation to clients\n- Test recovery from various error conditions\n\n### Performance Testing\n- Benchmark response times with and without caching\n- Test memory usage under load\n- Verify concurrent request handling\n\n## Test Quality Guidelines\n\n- Follow TDD approach when possible\n- Maintain test independence and isolation\n- Use descriptive test names explaining expected behavior\n- Aim for 80%+ code coverage, with critical paths at 100%\n- Follow the mock-first-then-import pattern for all Jest mocks\n- Avoid testing implementation details that might change\n- Ensure tests don't depend on execution order\n\n## Specific Test Cases\n\n1. **Server Initialization**\n - Test server creation with various configuration options\n - Verify proper tool and resource registration\n - Test server startup and shutdown procedures\n\n2. **Context Operations**\n - Test context creation, retrieval, update, and deletion\n - Verify context windowing and truncation\n - Test context metadata and tagging\n\n3. **Tool Execution**\n - Test each tool with various input parameters\n - Verify proper error handling for invalid inputs\n - Test tool execution performance\n\n4. **MCP.json Integration**\n - Test creation and updating of .cursor/mcp.json\n - Verify proper server registration in mcp.json\n - Test handling of existing mcp.json files\n\n5. **Transport Handling**\n - Test stdio communication\n - Verify proper message formatting\n - Test error handling in transport layer\n\n6. **Direct Function Structure**\n - Test the modular organization of direct functions\n - Verify proper import/export through task-master-core.js\n - Test utility functions in the utils directory\n\nAll tests will be automated and integrated into the CI/CD pipeline to ensure consistent quality.",
@@ -1092,7 +1349,9 @@
"id": 2,
"title": "Implement Context Management System",
"description": "Develop a robust context management system that can efficiently store, retrieve, and manipulate context data according to the MCP specification.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Implementation steps:\n1. Design and implement data structures for context storage\n2. Create methods for context creation, retrieval, updating, and deletion\n3. Implement context windowing and truncation algorithms for handling size limits\n4. Add support for context metadata and tagging\n5. Create utilities for context serialization and deserialization\n6. Implement efficient indexing for quick context lookups\n7. Add support for context versioning and history\n8. Develop mechanisms for context persistence (in-memory, disk-based, or database)\n\nTesting approach:\n- Unit tests for all context operations (CRUD)\n- Performance tests for context retrieval with various sizes\n- Test context windowing and truncation with edge cases\n- Verify metadata handling and tagging functionality\n- Test persistence mechanisms with simulated failures",
"status": "done",
"parentTaskId": 23
@@ -1101,7 +1360,10 @@
"id": 3,
"title": "Implement MCP Endpoints and API Handlers",
"description": "Develop the complete API handlers for all required MCP endpoints, ensuring they follow the protocol specification and integrate with the context management system.",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"details": "Implementation steps:\n1. Implement the `/context` endpoint for:\n - GET: retrieving existing context\n - POST: creating new context\n - PUT: updating existing context\n - DELETE: removing context\n2. Implement the `/models` endpoint to list available models\n3. Develop the `/execute` endpoint for performing operations with context\n4. Create request validators for each endpoint\n5. Implement response formatters according to MCP specifications\n6. Add detailed error handling for each endpoint\n7. Set up proper HTTP status codes for different scenarios\n8. Implement pagination for endpoints that return lists\n\nTesting approach:\n- Unit tests for each endpoint handler\n- Integration tests with mock context data\n- Test various request formats and edge cases\n- Verify response formats match MCP specifications\n- Test error handling with invalid inputs\n- Benchmark endpoint performance",
"status": "done",
"parentTaskId": 23
@@ -1110,7 +1372,11 @@
"id": 6,
"title": "Refactor MCP Server to Leverage ModelContextProtocol SDK",
"description": "Integrate the ModelContextProtocol SDK directly into the MCP server implementation to streamline tool registration and resource handling.",
- "dependencies": [1, 2, 3],
+ "dependencies": [
+ 1,
+ 2,
+ 3
+ ],
"details": "Implementation steps:\n1. Replace manual tool registration with ModelContextProtocol SDK methods.\n2. Use SDK utilities to simplify resource and template management.\n3. Ensure compatibility with FastMCP's transport mechanisms.\n4. Update server initialization to include SDK-based configurations.\n\nTesting approach:\n- Verify SDK integration with all MCP endpoints.\n- Test resource and template registration using SDK methods.\n- Validate compatibility with existing MCP clients.\n- Benchmark performance improvements from SDK integration.\n\n\nThe subtask is being cancelled because FastMCP already serves as a higher-level abstraction over the Model Context Protocol SDK. Direct integration with the MCP SDK would be redundant and potentially counterproductive since:\n\n1. FastMCP already encapsulates the necessary SDK functionality for tool registration and resource handling\n2. The existing FastMCP abstractions provide a more streamlined developer experience\n3. Adding another layer of SDK integration would increase complexity without clear benefits\n4. The transport mechanisms in FastMCP are already optimized for the current architecture\n\nInstead, we should focus on extending and enhancing the existing FastMCP abstractions where needed, rather than attempting to bypass them with direct SDK integration.\n",
"status": "done",
"parentTaskId": 23
@@ -1119,7 +1385,9 @@
"id": 8,
"title": "Implement Direct Function Imports and Replace CLI-based Execution",
"description": "Refactor the MCP server implementation to use direct Task Master function imports instead of the current CLI-based execution using child_process.spawnSync. This will improve performance, reliability, and enable better error handling.",
- "dependencies": ["23.13"],
+ "dependencies": [
+ "23.13"
+ ],
"details": "\n\n\n```\n# Refactoring Strategy for Direct Function Imports\n\n## Core Approach\n1. Create a clear separation between data retrieval/processing and presentation logic\n2. Modify function signatures to accept `outputFormat` parameter ('cli'|'json', default: 'cli')\n3. Implement early returns for JSON format to bypass CLI-specific code\n\n## Implementation Details for `listTasks`\n```javascript\nfunction listTasks(tasksPath, statusFilter, withSubtasks = false, outputFormat = 'cli') {\n try {\n // Existing data retrieval logic\n const filteredTasks = /* ... */;\n \n // Early return for JSON format\n if (outputFormat === 'json') return filteredTasks;\n \n // Existing CLI output logic\n } catch (error) {\n if (outputFormat === 'json') {\n throw {\n code: 'TASK_LIST_ERROR',\n message: error.message,\n details: error.stack\n };\n } else {\n console.error(error);\n process.exit(1);\n }\n }\n}\n```\n\n## Testing Strategy\n- Create integration tests in `tests/integration/mcp-server/`\n- Use FastMCP InMemoryTransport for direct client-server testing\n- Test both JSON and CLI output formats\n- Verify structure consistency with schema validation\n\n## Additional Considerations\n- Update JSDoc comments to document new parameters and return types\n- Ensure backward compatibility with default CLI behavior\n- Add JSON schema validation for consistent output structure\n- Apply similar pattern to other core functions (expandTask, updateTaskById, etc.)\n\n## Error Handling Improvements\n- Standardize error format for JSON returns:\n```javascript\n{\n code: 'ERROR_CODE',\n message: 'Human-readable message',\n details: {}, // Additional context when available\n stack: process.env.NODE_ENV === 'development' ? error.stack : undefined\n}\n```\n- Enrich JSON errors with error codes and debug info\n- Ensure validation failures return proper objects in JSON mode\n```\n",
"status": "done",
"parentTaskId": 23
@@ -1128,7 +1396,9 @@
"id": 9,
"title": "Implement Context Management and Caching Mechanisms",
"description": "Enhance the MCP server with proper context management and caching to improve performance and user experience, especially for frequently accessed data and contexts.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "1. Implement a context manager class that leverages FastMCP's Context object\n2. Add caching for frequently accessed task data with configurable TTL settings\n3. Implement context tagging for better organization of context data\n4. Add methods to efficiently handle large context windows\n5. Create helper functions for storing and retrieving context data\n6. Implement cache invalidation strategies for task updates\n7. Add cache statistics for monitoring performance\n8. Create unit tests for context management and caching functionality",
"status": "done",
"parentTaskId": 23
@@ -1137,7 +1407,10 @@
"id": 10,
"title": "Enhance Tool Registration and Resource Management",
"description": "Refactor tool registration to follow FastMCP best practices, using decorators and improving the overall structure. Implement proper resource management for task templates and other shared resources.",
- "dependencies": [1, "23.8"],
+ "dependencies": [
+ 1,
+ "23.8"
+ ],
"details": "1. Update registerTaskMasterTools function to use FastMCP's decorator pattern\n2. Implement @mcp.tool() decorators for all existing tools\n3. Add proper type annotations and documentation for all tools\n4. Create resource handlers for task templates using @mcp.resource()\n5. Implement resource templates for common task patterns\n6. Update the server initialization to properly register all tools and resources\n7. Add validation for tool inputs using FastMCP's built-in validation\n8. Create comprehensive tests for tool registration and resource access\n\n\nHere is additional information to enhance the subtask regarding resources and resource templates in FastMCP:\n\nResources in FastMCP are used to expose static or dynamic data to LLM clients. For the Task Master MCP server, we should implement resources to provide:\n\n1. Task templates: Predefined task structures that can be used as starting points\n2. Workflow definitions: Reusable workflow patterns for common task sequences\n3. User preferences: Stored user settings for task management\n4. Project metadata: Information about active projects and their attributes\n\nResource implementation should follow this structure:\n\n```python\n@mcp.resource(\"tasks://templates/{template_id}\")\ndef get_task_template(template_id: str) -> dict:\n # Fetch and return the specified task template\n ...\n\n@mcp.resource(\"workflows://definitions/{workflow_id}\")\ndef get_workflow_definition(workflow_id: str) -> dict:\n # Fetch and return the specified workflow definition\n ...\n\n@mcp.resource(\"users://{user_id}/preferences\")\ndef get_user_preferences(user_id: str) -> dict:\n # Fetch and return user preferences\n ...\n\n@mcp.resource(\"projects://metadata\")\ndef get_project_metadata() -> List[dict]:\n # Fetch and return metadata for all active projects\n ...\n```\n\nResource templates in FastMCP allow for dynamic generation of resources based on patterns. For Task Master, we can implement:\n\n1. Dynamic task creation templates\n2. Customizable workflow templates\n3. User-specific resource views\n\nExample implementation:\n\n```python\n@mcp.resource(\"tasks://create/{task_type}\")\ndef get_task_creation_template(task_type: str) -> dict:\n # Generate and return a task creation template based on task_type\n ...\n\n@mcp.resource(\"workflows://custom/{user_id}/{workflow_name}\")\ndef get_custom_workflow_template(user_id: str, workflow_name: str) -> dict:\n # Generate and return a custom workflow template for the user\n ...\n\n@mcp.resource(\"users://{user_id}/dashboard\")\ndef get_user_dashboard(user_id: str) -> dict:\n # Generate and return a personalized dashboard view for the user\n ...\n```\n\nBest practices for integrating resources with Task Master functionality:\n\n1. Use resources to provide context and data for tools\n2. Implement caching for frequently accessed resources\n3. Ensure proper error handling and not-found cases for all resources\n4. Use resource templates to generate dynamic, personalized views of data\n5. Implement access control to ensure users only access authorized resources\n\nBy properly implementing these resources and resource templates, we can provide rich, contextual data to LLM clients, enhancing the Task Master's capabilities and user experience.\n",
"status": "done",
"parentTaskId": 23
@@ -1148,7 +1421,10 @@
"description": "Implement robust error handling using FastMCP's MCPError, including custom error types for different categories and standardized error responses.",
"details": "1. Create custom error types extending MCPError for different categories (validation, auth, etc.)\\n2. Implement standardized error responses following MCP protocol\\n3. Add error handling middleware for all MCP endpoints\\n4. Ensure proper error propagation from tools to client\\n5. Add debug mode with detailed error information\\n6. Document error types and handling patterns",
"status": "done",
- "dependencies": ["23.1", "23.3"],
+ "dependencies": [
+ "23.1",
+ "23.3"
+ ],
"parentTaskId": 23
},
{
@@ -1157,7 +1433,10 @@
"description": "Implement a comprehensive logging system for the MCP server with different log levels, structured logging format, and request/response tracking.",
"details": "1. Design structured log format for consistent parsing\\n2. Implement different log levels (debug, info, warn, error)\\n3. Add request/response logging middleware\\n4. Implement correlation IDs for request tracking\\n5. Add performance metrics logging\\n6. Configure log output destinations (console, file)\\n7. Document logging patterns and usage",
"status": "done",
- "dependencies": ["23.1", "23.3"],
+ "dependencies": [
+ "23.1",
+ "23.3"
+ ],
"parentTaskId": 23
},
{
@@ -1166,7 +1445,10 @@
"description": "Implement a comprehensive testing framework for the MCP server, including unit tests, integration tests, and end-to-end tests.",
"details": "1. Set up Jest testing framework with proper configuration\\n2. Create MCPTestClient for testing FastMCP server interaction\\n3. Implement unit tests for individual tool functions\\n4. Create integration tests for end-to-end request/response cycles\\n5. Set up test fixtures and mock data\\n6. Implement test coverage reporting\\n7. Document testing guidelines and examples",
"status": "done",
- "dependencies": ["23.1", "23.3"],
+ "dependencies": [
+ "23.1",
+ "23.3"
+ ],
"parentTaskId": 23
},
{
@@ -1175,7 +1457,10 @@
"description": "Implement functionality to create or update .cursor/mcp.json during project initialization, handling cases where: 1) If there's no mcp.json, create it with the appropriate configuration; 2) If there is an mcp.json, intelligently append to it without syntax errors like trailing commas",
"details": "1. Create functionality to detect if .cursor/mcp.json exists in the project\\n2. Implement logic to create a new mcp.json file with proper structure if it doesn't exist\\n3. Add functionality to read and parse existing mcp.json if it exists\\n4. Create method to add a new taskmaster-ai server entry to the mcpServers object\\n5. Implement intelligent JSON merging that avoids trailing commas and syntax errors\\n6. Ensure proper formatting and indentation in the generated/updated JSON\\n7. Add validation to verify the updated configuration is valid JSON\\n8. Include this functionality in the init workflow\\n9. Add error handling for file system operations and JSON parsing\\n10. Document the mcp.json structure and integration process",
"status": "done",
- "dependencies": ["23.1", "23.3"],
+ "dependencies": [
+ "23.1",
+ "23.3"
+ ],
"parentTaskId": 23
},
{
@@ -1184,7 +1469,11 @@
"description": "Add Server-Sent Events (SSE) capabilities to the MCP server to enable real-time updates and streaming of task execution progress, logs, and status changes to clients",
"details": "1. Research and implement SSE protocol for the MCP server\\n2. Create dedicated SSE endpoints for event streaming\\n3. Implement event emitter pattern for internal event management\\n4. Add support for different event types (task status, logs, errors)\\n5. Implement client connection management with proper keep-alive handling\\n6. Add filtering capabilities to allow subscribing to specific event types\\n7. Create in-memory event buffer for clients reconnecting\\n8. Document SSE endpoint usage and client implementation examples\\n9. Add robust error handling for dropped connections\\n10. Implement rate limiting and backpressure mechanisms\\n11. Add authentication for SSE connections",
"status": "done",
- "dependencies": ["23.1", "23.3", "23.11"],
+ "dependencies": [
+ "23.1",
+ "23.3",
+ "23.11"
+ ],
"parentTaskId": 23
},
{
@@ -1337,7 +1626,9 @@
"description": "Move existing direct function implementations from task-master-core.js to individual files in the new directory structure.",
"details": "1. Identify all existing direct functions in task-master-core.js\n2. Create individual files for each function in mcp-server/src/core/direct-functions/\n3. Move the implementation to the new files, ensuring consistent error handling\n4. Update imports/exports in task-master-core.js\n5. Create unit tests for each individual function file\n6. Update documentation to reflect the new structure\n7. Ensure all MCP tools reference the functions through task-master-core.js\n8. Verify backward compatibility with existing code",
"status": "done",
- "dependencies": ["23.31"],
+ "dependencies": [
+ "23.31"
+ ],
"parentTaskId": 23
},
{
@@ -1400,7 +1691,9 @@
"description": "Create MCP tool implementation for the add-dependency command",
"details": "",
"status": "done",
- "dependencies": ["23.31"],
+ "dependencies": [
+ "23.31"
+ ],
"parentTaskId": 23
},
{
@@ -1409,7 +1702,9 @@
"description": "Create MCP tool implementation for the remove-dependency command",
"details": "",
"status": "done",
- "dependencies": ["23.31"],
+ "dependencies": [
+ "23.31"
+ ],
"parentTaskId": 23
},
{
@@ -1418,7 +1713,11 @@
"description": "Create MCP tool implementation for the validate-dependencies command",
"details": "",
"status": "done",
- "dependencies": ["23.31", "23.39", "23.40"],
+ "dependencies": [
+ "23.31",
+ "23.39",
+ "23.40"
+ ],
"parentTaskId": 23
},
{
@@ -1427,7 +1726,10 @@
"description": "Create MCP tool implementation for the fix-dependencies command",
"details": "",
"status": "done",
- "dependencies": ["23.31", "23.41"],
+ "dependencies": [
+ "23.31",
+ "23.41"
+ ],
"parentTaskId": 23
},
{
@@ -1436,7 +1738,9 @@
"description": "Create MCP tool implementation for the complexity-report command",
"details": "",
"status": "done",
- "dependencies": ["23.31"],
+ "dependencies": [
+ "23.31"
+ ],
"parentTaskId": 23
},
{
@@ -1473,7 +1777,9 @@
"title": "Implement AI-Powered Test Generation Command",
"description": "Create a new 'generate-test' command in Task Master that leverages AI to automatically produce Jest test files for tasks based on their descriptions and subtasks, utilizing Claude API for AI integration.",
"status": "pending",
- "dependencies": [22],
+ "dependencies": [
+ 22
+ ],
"priority": "high",
"details": "Implement a new command in the Task Master CLI that generates comprehensive Jest test files for tasks. The command should be callable as 'task-master generate-test --id=1' and should:\n\n1. Accept a task ID parameter to identify which task to generate tests for\n2. Retrieve the task and its subtasks from the task store\n3. Analyze the task description, details, and subtasks to understand implementation requirements\n4. Construct an appropriate prompt for the AI service using Claude API\n5. Process the AI response to create a well-formatted test file named 'task_XXX.test.ts' where XXX is the zero-padded task ID\n6. Include appropriate test cases that cover the main functionality described in the task\n7. Generate mocks for external dependencies identified in the task description\n8. Create assertions that validate the expected behavior\n9. Handle both parent tasks and subtasks appropriately (for subtasks, name the file 'task_XXX_YYY.test.ts' where YYY is the subtask ID)\n10. Include error handling for API failures, invalid task IDs, etc.\n11. Add appropriate documentation for the command in the help system\n\nThe implementation should utilize the Claude API for AI service integration and maintain consistency with the current command structure and error handling patterns. Consider using TypeScript for better type safety and integration with the Claude API.",
"testStrategy": "Testing for this feature should include:\n\n1. Unit tests for the command handler function to verify it correctly processes arguments and options\n2. Mock tests for the Claude API integration to ensure proper prompt construction and response handling\n3. Integration tests that verify the end-to-end flow using a mock Claude API response\n4. Tests for error conditions including:\n - Invalid task IDs\n - Network failures when contacting the AI service\n - Malformed AI responses\n - File system permission issues\n5. Verification that generated test files follow Jest conventions and can be executed\n6. Tests for both parent task and subtask handling\n7. Manual verification of the quality of generated tests by running them against actual task implementations\n\nCreate a test fixture with sample tasks of varying complexity to evaluate the test generation capabilities across different scenarios. The tests should verify that the command outputs appropriate success/error messages to the console and creates files in the expected location with proper content structure.",
@@ -1491,7 +1797,9 @@
"id": 2,
"title": "Implement AI prompt construction and FastMCP integration",
"description": "Develop the logic to analyze tasks, construct appropriate AI prompts, and interact with the AI service using FastMCP to generate test content.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Implementation steps:\n1. Create a utility function to analyze task descriptions and subtasks for test requirements\n2. Implement a prompt builder that formats task information into an effective AI prompt\n3. Use FastMCP to send the prompt and receive the response\n4. Process the FastMCP response to extract the generated test code\n5. Implement error handling for FastMCP failures, rate limits, and malformed responses\n6. Add appropriate logging for the FastMCP interaction process\n\nTesting approach:\n- Test prompt construction with various task types\n- Test FastMCP integration with mocked responses\n- Test error handling for FastMCP failures\n- Test response processing with sample FastMCP outputs\n\n## AI Integration Implementation\n\n### AI Service Integration\n- Use the unified AI service layer, not FastMCP directly\n- Implement with `generateObjectService` from '../ai-services-unified.js'\n- Define Zod schema for structured test generation output:\n - testContent: Complete Jest test file content\n - fileName: Suggested filename for the test file\n - mockRequirements: External dependencies that need mocking\n\n### Prompt Construction\n- Create system prompt defining AI's role as test generator\n- Build user prompt with task context (ID, title, description, details)\n- Include test strategy and subtasks context in the prompt\n- Follow patterns from add-task.js for prompt structure\n\n### Task Analysis\n- Retrieve task data using `findTaskById()` from utils.js\n- Build context by analyzing task description, details, and testStrategy\n- Examine project structure for import patterns\n- Parse specific testing requirements from task.testStrategy field\n\n### File System Operations\n- Determine output path in same directory as tasks.json\n- Generate standardized filename based on task ID\n- Use fs.writeFileSync for writing test content to file\n\n### Error Handling & UI\n- Implement try/catch blocks for AI service calls\n- Display user-friendly error messages with chalk\n- Use loading indicators during AI processing\n- Support both research and main AI models\n\n### Telemetry\n- Pass through telemetryData from AI service response\n- Display AI usage summary for CLI output\n\n### Required Dependencies\n- generateObjectService from ai-services-unified.js\n- UI components (loading indicators, display functions)\n- Zod for schema validation\n- Chalk for formatted console output\n",
"status": "pending",
"parentTaskId": 24
@@ -1500,7 +1808,9 @@
"id": 3,
"title": "Implement test file generation and output",
"description": "Create functionality to format AI-generated tests into proper Jest test files and save them to the appropriate location.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Implementation steps:\n1. Create a utility to format the FastMCP response into a well-structured Jest test file\n2. Implement naming logic for test files (task_XXX.test.ts for parent tasks, task_XXX_YYY.test.ts for subtasks)\n3. Add logic to determine the appropriate file path for saving the test\n4. Implement file system operations to write the test file\n5. Add validation to ensure the generated test follows Jest conventions\n6. Implement formatting of the test file for consistency with project coding standards\n7. Add user feedback about successful test generation and file location\n8. Implement handling for both parent tasks and subtasks\n\nTesting approach:\n- Test file naming logic for various task/subtask combinations\n- Test file content formatting with sample FastMCP outputs\n- Test file system operations with mocked fs module\n- Test the complete flow from command input to file output\n- Verify generated tests can be executed by Jest\n\n## Detailed Implementation Guidelines\n\n### File Naming Convention Implementation\n```javascript\nfunction generateTestFileName(taskId, isSubtask = false) {\n if (isSubtask) {\n // For subtasks like \"24.1\", generate \"task_024_001.test.js\"\n const [parentId, subtaskId] = taskId.split('.');\n return `task_${parentId.padStart(3, '0')}_${subtaskId.padStart(3, '0')}.test.js`;\n } else {\n // For parent tasks like \"24\", generate \"task_024.test.js\"\n return `task_${taskId.toString().padStart(3, '0')}.test.js`;\n }\n}\n```\n\n### File Location Strategy\n- Place generated test files in the `tasks/` directory alongside task files\n- This ensures co-location with task documentation and simplifies implementation\n\n### File Content Structure Template\n```javascript\n/**\n * Test file for Task ${taskId}: ${taskTitle}\n * Generated automatically by Task Master\n */\n\nimport { jest } from '@jest/globals';\n// Additional imports based on task requirements\n\ndescribe('Task ${taskId}: ${taskTitle}', () => {\n beforeEach(() => {\n // Setup code\n });\n\n afterEach(() => {\n // Cleanup code\n });\n\n test('should ${testDescription}', () => {\n // Test implementation\n });\n});\n```\n\n### Code Formatting Standards\n- Follow project's .prettierrc configuration:\n - Tab width: 2 spaces (useTabs: true)\n - Print width: 80 characters\n - Semicolons: Required (semi: true)\n - Quotes: Single quotes (singleQuote: true)\n - Trailing commas: None (trailingComma: \"none\")\n - Bracket spacing: True\n - Arrow parens: Always\n\n### File System Operations Implementation\n```javascript\nimport fs from 'fs';\nimport path from 'path';\n\n// Determine output path\nconst tasksDir = path.dirname(tasksPath); // Same directory as tasks.json\nconst fileName = generateTestFileName(task.id, isSubtask);\nconst filePath = path.join(tasksDir, fileName);\n\n// Ensure directory exists\nif (!fs.existsSync(tasksDir)) {\n fs.mkdirSync(tasksDir, { recursive: true });\n}\n\n// Write test file with proper error handling\ntry {\n fs.writeFileSync(filePath, formattedTestContent, 'utf8');\n} catch (error) {\n throw new Error(`Failed to write test file: ${error.message}`);\n}\n```\n\n### Error Handling for File Operations\n```javascript\ntry {\n // File writing operation\n fs.writeFileSync(filePath, testContent, 'utf8');\n} catch (error) {\n if (error.code === 'ENOENT') {\n throw new Error(`Directory does not exist: ${path.dirname(filePath)}`);\n } else if (error.code === 'EACCES') {\n throw new Error(`Permission denied writing to: ${filePath}`);\n } else if (error.code === 'ENOSPC') {\n throw new Error('Insufficient disk space to write test file');\n } else {\n throw new Error(`Failed to write test file: ${error.message}`);\n }\n}\n```\n\n### User Feedback Implementation\n```javascript\n// Success feedback\nconsole.log(chalk.green('✅ Test file generated successfully:'));\nconsole.log(chalk.cyan(` File: ${fileName}`));\nconsole.log(chalk.cyan(` Location: ${filePath}`));\nconsole.log(chalk.gray(` Size: ${testContent.length} characters`));\n\n// Additional info\nif (mockRequirements && mockRequirements.length > 0) {\n console.log(chalk.yellow(` Mocks needed: ${mockRequirements.join(', ')}`));\n}\n```\n\n### Content Validation Requirements\n1. Jest Syntax Validation:\n - Ensure proper describe/test structure\n - Validate import statements\n - Check for balanced brackets and parentheses\n\n2. Code Quality Checks:\n - Verify no syntax errors\n - Ensure proper indentation\n - Check for required imports\n\n3. Test Completeness:\n - At least one test case\n - Proper test descriptions\n - Appropriate assertions\n\n### Required Dependencies\n```javascript\nimport fs from 'fs';\nimport path from 'path';\nimport chalk from 'chalk';\nimport { log } from '../utils.js';\n```\n\n### Integration with Existing Patterns\nFollow the pattern from `generate-task-files.js`:\n1. Read task data using existing utilities\n2. Process content with proper formatting\n3. Write files with error handling\n4. Provide feedback to user\n5. Return success data for MCP integration\n\n\n## Corrected Implementation Approach\n\n### Updated File Location Strategy\n\n**CORRECTION**: Tests should go in `/tests/` directory, not `/tasks/` directory.\n\nBased on Jest configuration analysis:\n- Jest is configured with `roots: ['/tests']`\n- Test pattern: `**/?(*.)+(spec|test).js`\n- Current test structure has `/tests/unit/`, `/tests/integration/`, etc.\n\n### Recommended Directory Structure:\n```\ntests/\n├── unit/ # Manual unit tests\n├── integration/ # Manual integration tests \n├── generated/ # AI-generated tests\n│ ├── tasks/ # Generated task tests\n│ │ ├── task_024.test.js\n│ │ └── task_024_001.test.js\n│ └── README.md # Explains generated tests\n└── fixtures/ # Test fixtures\n```\n\n### Updated File Path Logic:\n```javascript\n// Determine output path - place in tests/generated/tasks/\nconst projectRoot = findProjectRoot() || '.';\nconst testsDir = path.join(projectRoot, 'tests', 'generated', 'tasks');\nconst fileName = generateTestFileName(task.id, isSubtask);\nconst filePath = path.join(testsDir, fileName);\n\n// Ensure directory structure exists\nif (!fs.existsSync(testsDir)) {\n fs.mkdirSync(testsDir, { recursive: true });\n}\n```\n\n### Testing Framework Configuration\n\nThe generate-test command should read the configured testing framework from `.taskmasterconfig`:\n\n```javascript\n// Read testing framework from config\nconst config = getConfig(projectRoot);\nconst testingFramework = config.testingFramework || 'jest'; // Default to Jest\n\n// Generate different templates based on framework\nswitch (testingFramework) {\n case 'jest':\n return generateJestTest(task, context);\n case 'mocha':\n return generateMochaTest(task, context);\n case 'vitest':\n return generateVitestTest(task, context);\n default:\n throw new Error(`Unsupported testing framework: ${testingFramework}`);\n}\n```\n\n### Framework-Specific Templates\n\n**Jest Template** (current):\n```javascript\n/**\n * Test file for Task ${taskId}: ${taskTitle}\n * Generated automatically by Task Master\n */\n\nimport { jest } from '@jest/globals';\n// Task-specific imports\n\ndescribe('Task ${taskId}: ${taskTitle}', () => {\n beforeEach(() => {\n jest.clearAllMocks();\n });\n\n test('should ${testDescription}', () => {\n // Test implementation\n });\n});\n```\n\n**Mocha Template**:\n```javascript\n/**\n * Test file for Task ${taskId}: ${taskTitle}\n * Generated automatically by Task Master\n */\n\nimport { expect } from 'chai';\nimport sinon from 'sinon';\n// Task-specific imports\n\ndescribe('Task ${taskId}: ${taskTitle}', () => {\n beforeEach(() => {\n sinon.restore();\n });\n\n it('should ${testDescription}', () => {\n // Test implementation\n });\n});\n```\n\n**Vitest Template**:\n```javascript\n/**\n * Test file for Task ${taskId}: ${taskTitle}\n * Generated automatically by Task Master\n */\n\nimport { describe, test, expect, vi, beforeEach } from 'vitest';\n// Task-specific imports\n\ndescribe('Task ${taskId}: ${taskTitle}', () => {\n beforeEach(() => {\n vi.clearAllMocks();\n });\n\n test('should ${testDescription}', () => {\n // Test implementation\n });\n});\n```\n\n### AI Prompt Enhancement for Mocking\n\nTo address the mocking challenge, enhance the AI prompt with project context:\n\n```javascript\nconst systemPrompt = `You are an expert at generating comprehensive test files. When generating tests, pay special attention to mocking external dependencies correctly.\n\nCRITICAL MOCKING GUIDELINES:\n1. Analyze the task requirements to identify external dependencies (APIs, databases, file system, etc.)\n2. Mock external dependencies at the module level, not inline\n3. Use the testing framework's mocking utilities (jest.mock(), sinon.stub(), vi.mock())\n4. Create realistic mock data that matches the expected API responses\n5. Test both success and error scenarios for mocked dependencies\n6. Ensure mocks are cleared between tests to prevent test pollution\n\nTesting Framework: ${testingFramework}\nProject Structure: ${projectStructureContext}\n`;\n```\n\n### Integration with Future Features\n\nThis primitive command design enables:\n1. **Automatic test generation**: `task-master add-task --with-test`\n2. **Batch test generation**: `task-master generate-tests --all`\n3. **Framework-agnostic**: Support multiple testing frameworks\n4. **Smart mocking**: LLM analyzes dependencies and generates appropriate mocks\n\n### Updated Implementation Requirements:\n\n1. **Read testing framework** from `.taskmasterconfig`\n2. **Create tests directory structure** if it doesn't exist\n3. **Generate framework-specific templates** based on configuration\n4. **Enhanced AI prompts** with mocking best practices\n5. **Project structure analysis** for better import resolution\n6. **Mock dependency detection** from task requirements\n",
"status": "pending",
"parentTaskId": 24
@@ -1511,7 +1821,9 @@
"description": "Create MCP server tool support for the generate-test command to enable integration with Claude Code and other MCP clients.",
"details": "Implementation steps:\n1. Create direct function wrapper in mcp-server/src/core/direct-functions/\n2. Create MCP tool registration in mcp-server/src/tools/\n3. Add tool to the main tools index\n4. Implement proper parameter validation and error handling\n5. Ensure telemetry data is properly passed through\n6. Add tool to MCP server registration\n\nThe MCP tool should support the same parameters as the CLI command:\n- id: Task ID to generate tests for\n- file: Path to tasks.json file\n- research: Whether to use research model\n- prompt: Additional context for test generation\n\nFollow the existing pattern from other MCP tools like add-task.js and expand-task.js.",
"status": "pending",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"parentTaskId": 24
},
{
@@ -1520,7 +1832,9 @@
"description": "Enhance the init.js process to let users choose their preferred testing framework (Jest, Mocha, Vitest, etc.) and store this choice in .taskmasterconfig for use by the generate-test command.",
"details": "Implementation requirements:\n\n1. **Add Testing Framework Prompt to init.js**:\n - Add interactive prompt asking users to choose testing framework\n - Support Jest (default), Mocha + Chai, Vitest, Ava, Jasmine\n - Include brief descriptions of each framework\n - Allow --testing-framework flag for non-interactive mode\n\n2. **Update .taskmasterconfig Template**:\n - Add testingFramework field to configuration file\n - Include default dependencies for each framework\n - Store framework-specific configuration options\n\n3. **Framework-Specific Setup**:\n - Generate appropriate config files (jest.config.js, vitest.config.ts, etc.)\n - Add framework dependencies to package.json suggestions\n - Create sample test file for the chosen framework\n\n4. **Integration Points**:\n - Ensure generate-test command reads testingFramework from config\n - Add validation to prevent conflicts between framework choices\n - Support switching frameworks later via models command or separate config command\n\nThis makes the generate-test command truly framework-agnostic and sets up the foundation for --with-test flags in other commands.\n\n# Implementation Plan for Testing Framework Integration\n\n## Code Structure\n\n### 1. Update init.js\n- Add testing framework prompt after addAliases prompt\n- Implement framework selection with descriptions\n- Support non-interactive mode with --testing-framework flag\n- Create setupTestingFramework() function to handle framework-specific setup\n\n### 2. Create New Module Files\n- Create `scripts/modules/testing-frameworks.js` for framework templates and setup\n- Add sample test generators for each supported framework\n- Implement config file generation for each framework\n\n### 3. Update Configuration Templates\n- Modify `assets/.taskmasterconfig` to include testing fields:\n ```json\n \"testingFramework\": \"{{testingFramework}}\",\n \"testingConfig\": {\n \"framework\": \"{{testingFramework}}\",\n \"setupFiles\": [],\n \"testDirectory\": \"tests\",\n \"testPattern\": \"**/*.test.js\",\n \"coverage\": {\n \"enabled\": false,\n \"threshold\": 80\n }\n }\n ```\n\n### 4. Create Framework-Specific Templates\n- `assets/jest.config.template.js`\n- `assets/vitest.config.template.ts`\n- `assets/.mocharc.template.json`\n- `assets/ava.config.template.js`\n- `assets/jasmine.json.template`\n\n### 5. Update commands.js\n- Add `--testing-framework ` option to init command\n- Add validation for supported frameworks\n\n## Error Handling\n- Validate selected framework against supported list\n- Handle existing config files gracefully with warning/overwrite prompt\n- Provide recovery options if framework setup fails\n- Add conflict detection for multiple testing frameworks\n\n## Integration Points\n- Ensure generate-test command reads testingFramework from config\n- Prepare for future --with-test flag in other commands\n- Support framework switching via config command\n\n## Testing Requirements\n- Unit tests for framework selection logic\n- Integration tests for config file generation\n- Validation tests for each supported framework\n",
"status": "pending",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"parentTaskId": 24
}
]
@@ -1530,7 +1844,9 @@
"title": "Implement 'add-subtask' Command for Task Hierarchy Management",
"description": "Create a command-line interface command that allows users to manually add subtasks to existing tasks, establishing a parent-child relationship between tasks.",
"status": "done",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"priority": "medium",
"details": "Implement the 'add-subtask' command that enables users to create hierarchical relationships between tasks. The command should:\n\n1. Accept parameters for the parent task ID and either the details for a new subtask or the ID of an existing task to convert to a subtask\n2. Validate that the parent task exists before proceeding\n3. If creating a new subtask, collect all necessary task information (title, description, due date, etc.)\n4. If converting an existing task, ensure it's not already a subtask of another task\n5. Update the data model to support parent-child relationships between tasks\n6. Modify the task storage mechanism to persist these relationships\n7. Ensure that when a parent task is marked complete, there's appropriate handling of subtasks (prompt user or provide options)\n8. Update the task listing functionality to display subtasks with appropriate indentation or visual hierarchy\n9. Implement proper error handling for cases like circular dependencies (a task cannot be a subtask of its own subtask)\n10. Document the command syntax and options in the help system",
"testStrategy": "Testing should verify both the functionality and edge cases of the subtask implementation:\n\n1. Unit tests:\n - Test adding a new subtask to an existing task\n - Test converting an existing task to a subtask\n - Test validation logic for parent task existence\n - Test prevention of circular dependencies\n - Test error handling for invalid inputs\n\n2. Integration tests:\n - Verify subtask relationships are correctly persisted to storage\n - Verify subtasks appear correctly in task listings\n - Test the complete workflow from adding a subtask to viewing it in listings\n\n3. Edge cases:\n - Attempt to add a subtask to a non-existent parent\n - Attempt to make a task a subtask of itself\n - Attempt to create circular dependencies (A → B → A)\n - Test with a deep hierarchy of subtasks (A → B → C → D)\n - Test handling of subtasks when parent tasks are deleted\n - Verify behavior when marking parent tasks as complete\n\n4. Manual testing:\n - Verify command usability and clarity of error messages\n - Test the command with various parameter combinations",
@@ -1548,7 +1864,9 @@
"id": 2,
"title": "Implement Core addSubtask Function in task-manager.js",
"description": "Create the core function that handles adding subtasks to parent tasks",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "1. Create a new addSubtask function in scripts/modules/task-manager.js\n2. Implement logic to validate that the parent task exists\n3. Add functionality to handle both creating new subtasks and converting existing tasks\n4. For new subtasks: collect task information and create a new task with parentId set\n5. For existing tasks: validate it's not already a subtask and update its parentId\n6. Add validation to prevent circular dependencies (a task cannot be a subtask of its own subtask)\n7. Update the parent task's subtasks array\n8. Ensure proper error handling with descriptive error messages\n9. Export the function for use by the command handler\n10. Write unit tests to verify all scenarios (new subtask, converting task, error cases)",
"status": "done",
"parentTaskId": 25
@@ -1557,7 +1875,9 @@
"id": 3,
"title": "Implement add-subtask Command in commands.js",
"description": "Create the command-line interface for the add-subtask functionality",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "1. Add a new command registration in scripts/modules/commands.js following existing patterns\n2. Define command syntax: 'add-subtask [--task-id= | --title=]'\n3. Implement command handler that calls the addSubtask function from task-manager.js\n4. Add interactive prompts to collect required information when not provided as arguments\n5. Implement validation for command arguments\n6. Add appropriate success and error messages\n7. Document the command syntax and options in the help system\n8. Test the command with various input combinations\n9. Ensure the command follows the same patterns as other commands like add-dependency",
"status": "done",
"parentTaskId": 25
@@ -1566,7 +1886,10 @@
"id": 4,
"title": "Create Unit Test for add-subtask",
"description": "Develop comprehensive unit tests for the add-subtask functionality",
- "dependencies": [2, 3],
+ "dependencies": [
+ 2,
+ 3
+ ],
"details": "1. Create a test file in tests/unit/ directory for the add-subtask functionality\n2. Write tests for the addSubtask function in task-manager.js\n3. Test all key scenarios: adding new subtasks, converting existing tasks to subtasks\n4. Test error cases: non-existent parent task, circular dependencies, invalid input\n5. Use Jest mocks to isolate the function from file system operations\n6. Test the command handler in isolation using mock functions\n7. Ensure test coverage for all branches and edge cases\n8. Document the testing approach for future reference",
"status": "done",
"parentTaskId": 25
@@ -1575,7 +1898,10 @@
"id": 5,
"title": "Implement remove-subtask Command",
"description": "Create functionality to remove a subtask from its parent, following the same approach as add-subtask",
- "dependencies": [2, 3],
+ "dependencies": [
+ 2,
+ 3
+ ],
"details": "1. Create a removeSubtask function in scripts/modules/task-manager.js\n2. Implement logic to validate the subtask exists and is actually a subtask\n3. Add options to either delete the subtask completely or convert it to a standalone task\n4. Update the parent task's subtasks array to remove the reference\n5. If converting to standalone task, clear the parentId reference\n6. Implement the remove-subtask command in scripts/modules/commands.js following patterns from add-subtask\n7. Add appropriate validation and error messages\n8. Document the command in the help system\n9. Export the function in task-manager.js\n10. Ensure proper error handling for all scenarios",
"status": "done",
"parentTaskId": 25
@@ -1587,7 +1913,11 @@
"title": "Implement Context Foundation for AI Operations",
"description": "Implement the foundation for context integration in Task Master, enabling AI operations to leverage file-based context, cursor rules, and basic code context to improve generated outputs.",
"status": "pending",
- "dependencies": [5, 6, 7],
+ "dependencies": [
+ 5,
+ 6,
+ 7
+ ],
"priority": "high",
"details": "Create a Phase 1 foundation for context integration in Task Master that provides immediate practical value:\n\n1. Add `--context-file` Flag to AI Commands:\n - Add a consistent `--context-file ` option to all AI-related commands (expand, update, add-task, etc.)\n - Implement file reading functionality that loads content from the specified file\n - Add content integration into Claude API prompts with appropriate formatting\n - Handle error conditions such as file not found gracefully\n - Update help documentation to explain the new option\n\n2. Implement Cursor Rules Integration for Context:\n - Create a `--context-rules ` option for all AI commands\n - Implement functionality to extract content from specified .cursor/rules/*.mdc files\n - Support comma-separated lists of rule names and \"all\" option\n - Add validation and error handling for non-existent rules\n - Include helpful examples in command help output\n\n3. Implement Basic Context File Extraction Utility:\n - Create utility functions in utils.js for reading context from files\n - Add proper error handling and logging\n - Implement content validation to ensure reasonable size limits\n - Add content truncation if files exceed token limits\n - Create helper functions for formatting context additions properly\n\n4. Update Command Handler Logic:\n - Modify command handlers to support the new context options\n - Update prompt construction to incorporate context content\n - Ensure backwards compatibility with existing commands\n - Add logging for context inclusion to aid troubleshooting\n\nThe focus of this phase is to provide immediate value with straightforward implementations that enable users to include relevant context in their AI operations.",
"testStrategy": "Testing should verify that the context foundation works as expected and adds value:\n\n1. Functional Tests:\n - Verify `--context-file` flag correctly reads and includes content from specified files\n - Test that `--context-rules` correctly extracts and formats content from cursor rules\n - Test with both existing and non-existent files/rules to verify error handling\n - Verify content truncation works appropriately for large files\n\n2. Integration Tests:\n - Test each AI-related command with context options\n - Verify context is properly included in API calls to Claude\n - Test combinations of multiple context options\n - Verify help documentation includes the new options\n\n3. Usability Testing:\n - Create test scenarios that show clear improvement in AI output quality with context\n - Compare outputs with and without context to measure impact\n - Document examples of effective context usage for the user documentation\n\n4. Error Handling:\n - Test invalid file paths and rule names\n - Test oversized context files\n - Verify appropriate error messages guide users to correct usage\n\nThe testing focus should be on proving immediate value to users while ensuring robust error handling.",
@@ -1635,7 +1965,9 @@
"title": "Implement Context Enhancements for AI Operations",
"description": "Enhance the basic context integration with more sophisticated code context extraction, task history awareness, and PRD integration to provide richer context for AI operations.",
"status": "pending",
- "dependencies": [26],
+ "dependencies": [
+ 26
+ ],
"priority": "high",
"details": "Building upon the foundational context implementation in Task #26, implement Phase 2 context enhancements:\n\n1. Add Code Context Extraction Feature:\n - Create a `--context-code ` option for all AI commands\n - Implement glob-based file matching to extract code from specified patterns\n - Create intelligent code parsing to extract most relevant sections (function signatures, classes, exports)\n - Implement token usage optimization by selecting key structural elements\n - Add formatting for code context with proper file paths and syntax indicators\n\n2. Implement Task History Context:\n - Add a `--context-tasks ` option for AI commands\n - Support comma-separated task IDs and a \"similar\" option to find related tasks\n - Create functions to extract context from specified tasks or find similar tasks\n - Implement formatting for task context with clear section markers\n - Add validation and error handling for non-existent task IDs\n\n3. Add PRD Context Integration:\n - Create a `--context-prd ` option for AI commands\n - Implement PRD text extraction and intelligent summarization\n - Add formatting for PRD context with appropriate section markers\n - Integrate with the existing PRD parsing functionality from Task #6\n\n4. Improve Context Formatting and Integration:\n - Create a standardized context formatting system\n - Implement type-based sectioning for different context sources\n - Add token estimation for different context types to manage total prompt size\n - Enhance prompt templates to better integrate various context types\n\nThese enhancements will provide significantly richer context for AI operations, resulting in more accurate and relevant outputs while remaining practical to implement.",
"testStrategy": "Testing should verify the enhanced context functionality:\n\n1. Code Context Testing:\n - Verify pattern matching works for different glob patterns\n - Test code extraction with various file types and sizes\n - Verify intelligent parsing correctly identifies important code elements\n - Test token optimization by comparing full file extraction vs. optimized extraction\n - Check code formatting in prompts sent to Claude API\n\n2. Task History Testing:\n - Test with different combinations of task IDs\n - Verify \"similar\" option correctly identifies relevant tasks\n - Test with non-existent task IDs to ensure proper error handling\n - Verify formatting and integration in prompts\n\n3. PRD Context Testing:\n - Test with various PRD files of different sizes\n - Verify summarization functions correctly when PRDs are too large\n - Test integration with prompts and formatting\n\n4. Performance Testing:\n - Measure the impact of context enrichment on command execution time\n - Test with large code bases to ensure reasonable performance\n - Verify token counting and optimization functions work as expected\n\n5. Quality Assessment:\n - Compare AI outputs with Phase 1 vs. Phase 2 context to measure improvements\n - Create test cases that specifically benefit from code context\n - Create test cases that benefit from task history context\n\nFocus testing on practical use cases that demonstrate clear improvements in AI-generated outputs.",
@@ -1683,7 +2015,10 @@
"title": "Implement Advanced ContextManager System",
"description": "Create a comprehensive ContextManager class to unify context handling with advanced features like context optimization, prioritization, and intelligent context selection.",
"status": "pending",
- "dependencies": [26, 27],
+ "dependencies": [
+ 26,
+ 27
+ ],
"priority": "high",
"details": "Building on Phase 1 and Phase 2 context implementations, develop Phase 3 advanced context management:\n\n1. Implement the ContextManager Class:\n - Create a unified `ContextManager` class that encapsulates all context functionality\n - Implement methods for gathering context from all supported sources\n - Create a configurable context priority system to favor more relevant context types\n - Add token management to ensure context fits within API limits\n - Implement caching for frequently used context to improve performance\n\n2. Create Context Optimization Pipeline:\n - Develop intelligent context optimization algorithms\n - Implement type-based truncation strategies (code vs. text)\n - Create relevance scoring to prioritize most useful context portions\n - Add token budget allocation that divides available tokens among context types\n - Implement dynamic optimization based on operation type\n\n3. Add Command Interface Enhancements:\n - Create the `--context-all` flag to include all available context\n - Add the `--context-max-tokens ` option to control token allocation\n - Implement unified context options across all AI commands\n - Add intelligent default values for different command types\n\n4. Integrate with AI Services:\n - Update the AI service integration to use the ContextManager\n - Create specialized context assembly for different AI operations\n - Add post-processing to capture new context from AI responses\n - Implement adaptive context selection based on operation success\n\n5. Add Performance Monitoring:\n - Create context usage statistics tracking\n - Implement logging for context selection decisions\n - Add warnings for context token limits\n - Create troubleshooting utilities for context-related issues\n\nThe ContextManager system should provide a powerful but easy-to-use interface for both users and developers, maintaining backward compatibility with earlier phases while adding substantial new capabilities.",
"testStrategy": "Testing should verify both the functionality and performance of the advanced context management:\n\n1. Unit Testing:\n - Test all ContextManager class methods with various inputs\n - Verify optimization algorithms maintain critical information\n - Test caching mechanisms for correctness and efficiency\n - Verify token allocation and budgeting functions\n - Test each context source integration separately\n\n2. Integration Testing:\n - Verify ContextManager integration with AI services\n - Test with all AI-related commands\n - Verify backward compatibility with existing context options\n - Test context prioritization across multiple context types\n - Verify logging and error handling\n\n3. Performance Testing:\n - Benchmark context gathering and optimization times\n - Test with large and complex context sources\n - Measure impact of caching on repeated operations\n - Verify memory usage remains acceptable\n - Test with token limits of different sizes\n\n4. Quality Assessment:\n - Compare AI outputs using Phase 3 vs. earlier context handling\n - Measure improvements in context relevance and quality\n - Test complex scenarios requiring multiple context types\n - Quantify the impact on token efficiency\n\n5. User Experience Testing:\n - Verify CLI options are intuitive and well-documented\n - Test error messages are helpful for troubleshooting\n - Ensure log output provides useful insights\n - Test all convenience options like `--context-all`\n\nCreate automated test suites for regression testing of the complete context system.",
@@ -1915,7 +2250,9 @@
"id": 2,
"title": "Implement updateTask command in commands.js",
"description": "Create a new command called 'updateTask' in commands.js that leverages the updateTaskById function to update a specific task by ID.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Implementation steps:\n1. Create a new command object for 'updateTask' in commands.js following the Command pattern\n2. Define command parameters including a required taskId parameter\n3. Support all options from the existing update command:\n - Research flag for Perplexity integration\n - Formatting and refinement options\n - Task context options\n4. Implement the command handler function that calls the updateTaskById function from task-manager.js\n5. Add appropriate error handling to catch and display user-friendly error messages\n6. Ensure the command follows the same pattern as other commands in the codebase\n7. Implement proper validation of input parameters\n8. Format and return appropriate success/failure messages to the user\n\nTesting approach:\n- Unit test the command handler with various input combinations\n- Test error handling scenarios\n- Verify command options are correctly passed to the updateTaskById function",
"status": "done",
"parentTaskId": 34
@@ -1924,7 +2261,10 @@
"id": 3,
"title": "Add comprehensive error handling and validation",
"description": "Implement robust error handling and validation for the updateTask command to ensure proper user feedback and system stability.",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"details": "Implementation steps:\n1. Create custom error types for different failure scenarios (TaskNotFoundError, ValidationError, etc.)\n2. Implement input validation for the taskId parameter and all options\n3. Add proper error handling for AI service failures with appropriate fallback mechanisms\n4. Implement concurrency handling to prevent conflicts when multiple updates occur simultaneously\n5. Add comprehensive logging for debugging and auditing purposes\n6. Ensure all error messages are user-friendly and actionable\n7. Implement proper HTTP status codes for API responses if applicable\n8. Add validation to ensure the task exists before attempting updates\n\nTesting approach:\n- Test various error scenarios including invalid inputs, non-existent tasks, and API failures\n- Verify error messages are clear and helpful\n- Test concurrency scenarios with multiple simultaneous updates\n- Verify logging captures appropriate information for troubleshooting",
"status": "done",
"parentTaskId": 34
@@ -1933,7 +2273,11 @@
"id": 4,
"title": "Write comprehensive tests for updateTask command",
"description": "Create a comprehensive test suite for the updateTask command to ensure it works correctly in all scenarios and maintains backward compatibility.",
- "dependencies": [1, 2, 3],
+ "dependencies": [
+ 1,
+ 2,
+ 3
+ ],
"details": "Implementation steps:\n1. Create unit tests for the updateTaskById function in task-manager.js\n - Test finding and updating tasks with various IDs\n - Test preservation of completed subtasks\n - Test different update options combinations\n - Test error handling for non-existent tasks\n2. Create unit tests for the updateTask command in commands.js\n - Test command parameter parsing\n - Test option handling\n - Test error scenarios and messages\n3. Create integration tests that verify the end-to-end flow\n - Test the command with actual AI service integration\n - Test with mock AI responses for predictable testing\n4. Implement test fixtures and mocks for consistent testing\n5. Add performance tests to ensure the command is efficient\n6. Test edge cases such as empty tasks, tasks with many subtasks, etc.\n\nTesting approach:\n- Use Jest or similar testing framework\n- Implement mocks for external dependencies like AI services\n- Create test fixtures for consistent test data\n- Use snapshot testing for command output verification",
"status": "done",
"parentTaskId": 34
@@ -1942,7 +2286,9 @@
"id": 5,
"title": "Update CLI documentation and help text",
"description": "Update the CLI help documentation to include the new updateTask command and ensure users understand its purpose and options.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Implementation steps:\n1. Add comprehensive help text for the updateTask command including:\n - Command description\n - Required and optional parameters\n - Examples of usage\n - Description of all supported options\n2. Update the main CLI help documentation to include the new command\n3. Add the command to any relevant command groups or categories\n4. Create usage examples that demonstrate common scenarios\n5. Update README.md and other documentation files to include information about the new command\n6. Add inline code comments explaining the implementation details\n7. Update any API documentation if applicable\n8. Create or update user guides with the new functionality\n\nTesting approach:\n- Verify help text is displayed correctly when running `--help`\n- Review documentation for clarity and completeness\n- Have team members review the documentation for usability\n- Test examples to ensure they work as documented",
"status": "done",
"parentTaskId": 34
@@ -2012,7 +2358,9 @@
"id": 2,
"title": "Update Source Code License Headers and Package Metadata",
"description": "Add appropriate dual license headers to all source code files and update package metadata to reflect the new licensing structure.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Implementation steps:\n1. Create a template for the new license header that references the dual license structure (BSL 1.1 / Apache 2.0).\n2. Systematically update all source code files to include the new license header, replacing any existing MIT headers.\n3. Update the license field in package.json to \"BSL 1.1 / Apache 2.0\".\n4. Update any other metadata files (composer.json, setup.py, etc.) that contain license information.\n5. Verify that any build scripts or tools that reference licensing information are updated.\n\nTesting approach:\n- Write a script to verify that all source files contain the new license header\n- Validate package.json and other metadata files have the correct license field\n- Ensure any build processes that depend on license information still function correctly\n- Run a sample build to confirm license information is properly included in any generated artifacts",
"status": "done",
"parentTaskId": 39
@@ -2021,7 +2369,10 @@
"id": 3,
"title": "Update Documentation and Create License Explanation",
"description": "Update project documentation to clearly explain the dual license structure and create comprehensive licensing guidance.",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"details": "Implementation steps:\n1. Update the README.md with a clear, concise explanation of the licensing terms:\n - Summary of what users can and cannot do with the code\n - Who holds commercial rights (Ralph & Eyal)\n - How to obtain commercial use permission\n - Links to the full license texts\n2. Create a dedicated LICENSING.md or similar document with detailed explanations of:\n - The rationale behind the dual licensing approach\n - Detailed examples of what constitutes commercial vs. non-commercial use\n - FAQs addressing common licensing questions\n3. Update any other documentation references to licensing throughout the project.\n4. Create visual aids (if appropriate) to help users understand the licensing structure.\n5. Ensure all documentation links to licensing information are updated.\n\nTesting approach:\n- Have non-technical stakeholders review the documentation for clarity and understanding\n- Verify all links to license files work correctly\n- Ensure the explanation is comprehensive but concise enough for users to understand quickly\n- Check that the documentation correctly addresses the most common use cases and questions",
"status": "done",
"parentTaskId": 39
@@ -2050,7 +2401,9 @@
"id": 2,
"title": "Generate Implementation Plan with AI",
"description": "Use an AI model (Claude or Perplexity) to generate an implementation plan based on the retrieved task content. The plan should outline the steps required to complete the task.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Implement logic to switch between Claude and Perplexity APIs. Handle API authentication and rate limiting. Prompt the AI model with the task content and request a detailed implementation plan.",
"status": "pending"
},
@@ -2058,7 +2411,9 @@
"id": 3,
"title": "Format Plan in XML",
"description": "Format the generated implementation plan within XML tags. Each step in the plan should be represented as an XML element with appropriate attributes.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Define the XML schema for the implementation plan. Implement a function to convert the AI-generated plan into the defined XML format. Ensure proper XML syntax and validation.",
"status": "pending"
},
@@ -2066,7 +2421,9 @@
"id": 4,
"title": "Error Handling and Output",
"description": "Implement error handling for all steps, including API failures and XML formatting errors. Output the formatted XML plan to the console or a file.",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Add try-except blocks to handle potential exceptions. Log errors for debugging. Provide informative error messages to the user. Output the XML plan in a user-friendly format.",
"status": "pending"
}
@@ -2094,7 +2451,9 @@
"id": 2,
"title": "Graph Layout Algorithms",
"description": "Develop or integrate algorithms to compute optimal node and edge placement for clear and readable graph layouts in a terminal environment.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Consider topological sorting, hierarchical, and force-directed layouts suitable for ASCII/Unicode rendering.\n\nCreate a new diagram-generator.js module in the scripts/modules/ directory following Task Master's module architecture pattern. The module should include:\n\n1. Core functions for generating Mermaid diagrams:\n - generateDependencyGraph(tasks, options) - creates flowchart showing task dependencies\n - generateSubtaskDiagram(task, options) - creates hierarchy diagram for subtasks\n - generateProjectFlow(tasks, options) - creates overall project workflow\n - generateGanttChart(tasks, options) - creates timeline visualization\n\n2. Integration with existing Task Master data structures:\n - Use the same task object format from task-manager.js\n - Leverage dependency analysis from dependency-manager.js\n - Support complexity scores from analyze-complexity functionality\n - Handle both main tasks and subtasks with proper ID notation (parentId.subtaskId)\n\n3. Layout algorithm considerations for Mermaid:\n - Topological sorting for dependency flows\n - Hierarchical layouts for subtask trees\n - Circular dependency detection and highlighting\n - Terminal width-aware formatting for ASCII fallback\n\n4. Export functions following the existing module pattern at the bottom of the file\n",
"status": "pending"
},
@@ -2102,7 +2461,9 @@
"id": 3,
"title": "ASCII/Unicode Rendering Engine",
"description": "Implement rendering logic to display the dependency graph using ASCII and Unicode characters in the terminal.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Support for various node and edge styles, and ensure compatibility with different terminal types.\n\nExtend ui.js with diagram display functions that integrate with Task Master's existing UI patterns:\n\n1. Implement core diagram display functions:\n - displayTaskDiagram(tasksPath, diagramType, options) as the main entry point\n - displayMermaidCode(mermaidCode, title) for formatted code output with boxen\n - displayDiagramLegend() to explain symbols and colors\n\n2. Ensure UI consistency by:\n - Using established chalk color schemes (blue/green/yellow/red)\n - Applying boxen for consistent component formatting\n - Following existing display function patterns (displayTaskById, displayComplexityReport)\n - Utilizing cli-table3 for any diagram metadata tables\n\n3. Address terminal rendering challenges:\n - Implement ASCII/Unicode fallback when Mermaid rendering isn't available\n - Respect terminal width constraints using process.stdout.columns\n - Integrate with loading indicators via startLoadingIndicator/stopLoadingIndicator\n\n4. Update task file generation to include Mermaid diagram sections in individual task files\n\n5. Support both CLI and MCP output formats through the outputFormat parameter\n",
"status": "pending"
},
@@ -2110,7 +2471,9 @@
"id": 4,
"title": "Color Coding Support",
"description": "Add color coding to nodes and edges to visually distinguish types, statuses, or other attributes in the graph.",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Use ANSI escape codes for color; provide options for colorblind-friendly palettes.\n\nIntegrate color coding with Task Master's existing status system:\n\n1. Extend getStatusWithColor() in ui.js to support diagram contexts:\n - Add 'diagram' parameter to determine rendering context\n - Modify color intensity for better visibility in graph elements\n\n2. Implement Task Master's established color scheme using ANSI codes:\n - Green (\\x1b[32m) for 'done'/'completed' tasks\n - Yellow (\\x1b[33m) for 'pending' tasks\n - Orange (\\x1b[38;5;208m) for 'in-progress' tasks\n - Red (\\x1b[31m) for 'blocked' tasks\n - Gray (\\x1b[90m) for 'deferred'/'cancelled' tasks\n - Magenta (\\x1b[35m) for 'review' tasks\n\n3. Create diagram-specific color functions:\n - getDependencyLineColor(fromTaskStatus, toTaskStatus) - color dependency arrows based on relationship status\n - getNodeBorderColor(task) - style node borders using priority/complexity indicators\n - getSubtaskGroupColor(parentTask) - visually group related subtasks\n\n4. Integrate complexity visualization:\n - Use getComplexityWithColor() for node background or border thickness\n - Map complexity scores to visual weight in the graph\n\n5. Ensure accessibility:\n - Add text-based indicators (symbols like ✓, ⚠, ⏳) alongside colors\n - Implement colorblind-friendly palettes as user-selectable option\n - Include shape variations for different statuses\n\n6. Follow existing ANSI patterns:\n - Maintain consistency with terminal UI color usage\n - Reuse color constants from the codebase\n\n7. Support graceful degradation:\n - Check terminal capabilities using existing detection\n - Provide monochrome fallbacks with distinctive patterns\n - Use bold/underline as alternatives when colors unavailable\n",
"status": "pending"
},
@@ -2118,7 +2481,9 @@
"id": 5,
"title": "Circular Dependency Detection",
"description": "Implement algorithms to detect and highlight circular dependencies within the graph.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Clearly mark cycles in the rendered output and provide warnings or errors as appropriate.\n\nIntegrate with Task Master's existing circular dependency detection:\n\n1. Import the dependency detection logic from dependency-manager.js module\n2. Utilize the findCycles function from utils.js or dependency-manager.js\n3. Extend validateDependenciesCommand functionality to highlight cycles in diagrams\n\nVisual representation in Mermaid diagrams:\n- Apply red/bold styling to nodes involved in dependency cycles\n- Add warning annotations to cyclic edges\n- Implement cycle path highlighting with distinctive line styles\n\nIntegration with validation workflow:\n- Execute dependency validation before diagram generation\n- Display cycle warnings consistent with existing CLI error messaging\n- Utilize chalk.red and boxen for error highlighting following established patterns\n\nAdd diagram legend entries that explain cycle notation and warnings\n\nEnsure detection of cycles in both:\n- Main task dependencies\n- Subtask dependencies within parent tasks\n\nFollow Task Master's error handling patterns for graceful cycle reporting and user notification\n",
"status": "pending"
},
@@ -2126,7 +2491,10 @@
"id": 6,
"title": "Filtering and Search Functionality",
"description": "Enable users to filter nodes and edges by criteria such as name, type, or dependency depth.",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"details": "Support command-line flags for filtering and interactive search if feasible.\n\nImplement MCP tool integration for task dependency visualization:\n\n1. Create task_diagram.js in mcp-server/src/tools/ following existing tool patterns\n2. Implement taskDiagramDirect.js in mcp-server/src/core/direct-functions/\n3. Use Zod schema for parameter validation:\n - diagramType (dependencies, subtasks, flow, gantt)\n - taskId (optional string)\n - format (mermaid, text, json)\n - includeComplexity (boolean)\n\n4. Structure response data with:\n - mermaidCode for client-side rendering\n - metadata (nodeCount, edgeCount, cycleWarnings)\n - support for both task-specific and project-wide diagrams\n\n5. Integrate with session management and project root handling\n6. Implement error handling using handleApiResult pattern\n7. Register the tool in tools/index.js\n\nMaintain compatibility with existing command-line flags for filtering and interactive search.\n",
"status": "pending"
},
@@ -2134,7 +2502,10 @@
"id": 7,
"title": "Accessibility Features",
"description": "Ensure the tool is accessible, including support for screen readers, high-contrast modes, and keyboard navigation.",
- "dependencies": [3, 4],
+ "dependencies": [
+ 3,
+ 4
+ ],
"details": "Provide alternative text output and ensure color is not the sole means of conveying information.\n\n# Accessibility and Export Integration\n\n## Accessibility Features\n- Provide alternative text output for visual elements\n- Ensure color is not the sole means of conveying information\n- Support keyboard navigation through the dependency graph\n- Add screen reader compatible node descriptions\n\n## Export Integration\n- Extend generateTaskFiles function in task-manager.js to include Mermaid diagram sections\n- Add Mermaid code blocks to task markdown files under ## Diagrams header\n- Follow existing task file generation patterns and markdown structure\n- Support multiple diagram types per task file:\n * Task dependencies (prerequisite relationships)\n * Subtask hierarchy visualization\n * Task flow context in project workflow\n- Integrate with existing fs module file writing operations\n- Add diagram export options to the generate command in commands.js\n- Support SVG and PNG export using Mermaid CLI when available\n- Implement error handling for diagram generation failures\n- Reference exported diagrams in task markdown with proper paths\n- Update CLI generate command with options like --include-diagrams\n",
"status": "pending"
},
@@ -2142,7 +2513,13 @@
"id": 8,
"title": "Performance Optimization",
"description": "Profile and optimize the tool for large graphs to ensure responsive rendering and low memory usage.",
- "dependencies": [2, 3, 4, 5, 6],
+ "dependencies": [
+ 2,
+ 3,
+ 4,
+ 5,
+ 6
+ ],
"details": "Implement lazy loading, efficient data structures, and parallel processing where appropriate.\n\n# Mermaid Library Integration and Terminal-Specific Handling\n\n## Package Dependencies\n- Add mermaid package as an optional dependency in package.json for generating raw Mermaid diagram code\n- Consider mermaid-cli for SVG/PNG conversion capabilities\n- Evaluate terminal-image or similar libraries for terminals with image support\n- Explore ascii-art-ansi or box-drawing character libraries for text-only terminals\n\n## Terminal Capability Detection\n- Leverage existing terminal detection from ui.js to assess rendering capabilities\n- Implement detection for:\n - iTerm2 and other terminals with image protocol support\n - Terminals with Unicode/extended character support\n - Basic terminals requiring pure ASCII output\n\n## Rendering Strategy with Fallbacks\n1. Primary: Generate raw Mermaid code for user copy/paste\n2. Secondary: Render simplified ASCII tree/flow representation using box characters\n3. Tertiary: Present dependencies in tabular format for minimal terminals\n\n## Implementation Approach\n- Use dynamic imports for optional rendering libraries to maintain lightweight core\n- Implement graceful degradation when optional packages aren't available\n- Follow Task Master's philosophy of minimal dependencies\n- Ensure performance optimization through lazy loading where appropriate\n- Design modular rendering components that can be swapped based on terminal capabilities\n",
"status": "pending"
},
@@ -2150,7 +2527,16 @@
"id": 9,
"title": "Documentation",
"description": "Write comprehensive user and developer documentation covering installation, usage, configuration, and extension.",
- "dependencies": [1, 2, 3, 4, 5, 6, 7, 8],
+ "dependencies": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8
+ ],
"details": "Include examples, troubleshooting, and contribution guidelines.",
"status": "pending"
},
@@ -2158,7 +2544,17 @@
"id": 10,
"title": "Testing and Validation",
"description": "Develop automated tests for all major features, including CLI parsing, layout correctness, rendering, color coding, filtering, and cycle detection.",
- "dependencies": [1, 2, 3, 4, 5, 6, 7, 8, 9],
+ "dependencies": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 8,
+ 9
+ ],
"details": "Include unit, integration, and regression tests; validate accessibility and performance claims.\n\n# Documentation Tasks for Visual Task Dependency Graph\n\n## User Documentation\n1. Update README.md with diagram command documentation following existing command reference format\n2. Add examples to CLI command help text in commands.js matching patterns from other commands\n3. Create docs/diagrams.md with detailed usage guide including:\n - Command examples for each diagram type\n - Mermaid code samples and output\n - Terminal compatibility notes\n - Integration with task workflow examples\n - Troubleshooting section for common diagram rendering issues\n - Accessibility features and terminal fallback options\n\n## Developer Documentation\n1. Update MCP tool documentation to include the new task_diagram tool\n2. Add JSDoc comments to all new functions following existing code standards\n3. Create contributor documentation for extending diagram types\n4. Update API documentation for any new MCP interface endpoints\n\n## Integration Documentation\n1. Document integration with existing commands (analyze-complexity, generate, etc.)\n2. Provide examples showing how diagrams complement other Task Master features\n",
"status": "pending"
}
@@ -2248,7 +2644,9 @@
"id": 2,
"title": "Implement webhook authentication and security measures",
"description": "Develop security mechanisms for webhook verification and payload signing",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Implement signature verification using HMAC, rate limiting to prevent abuse, IP whitelisting options, and webhook secret management. Create a secure token system for webhook verification and implement TLS for all webhook communications.",
"status": "pending"
},
@@ -2264,7 +2662,10 @@
"id": 4,
"title": "Build event processing and queuing system",
"description": "Implement a robust system for processing and queuing events before webhook delivery",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"details": "Create an event queue using a message broker (like RabbitMQ or Kafka) to handle high volumes of events. Implement event deduplication, prioritization, and persistence to ensure reliable delivery even during system failures.",
"status": "pending"
},
@@ -2272,7 +2673,10 @@
"id": 5,
"title": "Develop webhook delivery and retry mechanism",
"description": "Create a reliable system for webhook delivery with retry logic and failure handling",
- "dependencies": [2, 4],
+ "dependencies": [
+ 2,
+ 4
+ ],
"details": "Implement exponential backoff retry logic, configurable retry attempts, and dead letter queues for failed deliveries. Add monitoring for webhook delivery success rates and performance metrics. Include timeout handling for unresponsive webhook endpoints.",
"status": "pending"
},
@@ -2280,7 +2684,9 @@
"id": 6,
"title": "Implement comprehensive error handling and logging",
"description": "Create robust error handling, logging, and monitoring for the webhook system",
- "dependencies": [5],
+ "dependencies": [
+ 5
+ ],
"details": "Develop detailed error logging for webhook failures, including response codes, error messages, and timing information. Implement alerting for critical failures and create a dashboard for monitoring system health. Add debugging tools for webhook delivery issues.",
"status": "pending"
},
@@ -2288,7 +2694,11 @@
"id": 7,
"title": "Create webhook testing and simulation tools",
"description": "Develop tools for testing webhook integrations and simulating event triggers",
- "dependencies": [3, 5, 6],
+ "dependencies": [
+ 3,
+ 5,
+ 6
+ ],
"details": "Build a webhook testing console that allows manual triggering of events, viewing delivery history, and replaying failed webhooks. Create a webhook simulator for developers to test their endpoint implementations without generating real system events.",
"status": "pending"
}
@@ -2299,7 +2709,9 @@
"title": "Implement GitHub Issue Import Feature",
"description": "Implement a comprehensive LLM-powered 'import_task' command that can intelligently import tasks from GitHub Issues and Discussions. The system uses our existing ContextGatherer.js infrastructure to analyze the full context of GitHub content and automatically generate well-structured tasks with appropriate subtasks, priorities, and implementation details. This feature works in conjunction with the GitHub export feature (Task #97) to provide bidirectional linking between Task Master tasks and GitHub issues.",
"status": "pending",
- "dependencies": [97],
+ "dependencies": [
+ 97
+ ],
"priority": "medium",
"details": "Implement a new 'import_task' command that leverages LLM-powered analysis to create comprehensive tasks from GitHub Issues and Discussions. The system should be designed as an extensible import framework that can support multiple platforms in the future.\n\nCore functionality:\n1. **New Command Structure**: Create 'import_task' command with source-specific subcommands:\n - 'taskmaster import_task github ' for GitHub imports\n - Future: 'taskmaster import_task gitlab ', 'taskmaster import_task linear ', etc.\n\n2. **Multi-Source GitHub Support**: Automatically detect and handle:\n - GitHub Issues: https://github.com/owner/repo/issues/123\n - GitHub Discussions: https://github.com/owner/repo/discussions/456\n - Auto-detect URL type and use appropriate API endpoints\n\n3. **LLM-Powered Context Analysis**: Integrate with ContextGatherer.js to:\n - Fetch complete GitHub content (main post + all comments/replies)\n - Analyze discussion threads and extract key insights\n - Identify references to our project components and codebase\n - Generate comprehensive task descriptions based on full context\n - Automatically create relevant subtasks from complex discussions\n - Determine appropriate priority levels based on content analysis\n - Suggest dependencies based on mentioned components/features\n\n4. **Smart Content Processing**: The LLM should:\n - Parse markdown content and preserve important formatting\n - Extract actionable items from discussion threads\n - Identify implementation requirements and technical details\n - Convert complex discussions into structured task breakdowns\n - Generate appropriate test strategies based on the scope\n - Preserve important context while creating focused task descriptions\n\n5. **Enhanced GitHub API Integration**:\n - Support GITHUB_API_KEY environment variable for authentication\n - Handle both public and private repository access\n - Fetch issue/discussion metadata (labels, assignees, status)\n - Retrieve complete comment threads with proper threading\n - Implement rate limiting and error handling\n\n6. **Rich Metadata Storage**:\n - Source platform and original URL\n - Import timestamp and LLM model version used\n - Content hash for change detection and sync capabilities\n - Participant information and discussion context\n - GitHub-specific metadata (labels, assignees, status)\n - **Use consistent metadata schema with export feature (Task #97)**\n\n7. **Future-Proof Architecture**:\n - Modular design supporting multiple import sources\n - Plugin-style architecture for new platforms\n - Extensible content type handling (issues, PRs, discussions, etc.)\n - Configurable LLM prompts for different content types\n\n8. **Bidirectional Integration**:\n - Maintain compatibility with GitHub export feature\n - Enable round-trip workflows (import → modify → export)\n - Preserve source linking for synchronization capabilities\n - Support identification of imported vs. native tasks\n\n9. **Error Handling and Validation**:\n - Validate GitHub URLs and accessibility\n - Handle API rate limiting gracefully\n - Provide meaningful error messages for various failure scenarios\n - Implement retry logic for transient failures\n - Validate LLM responses and handle generation errors\n\n10. **Configuration and Customization**:\n - Allow users to customize LLM prompts for task generation\n - Support different import strategies (full vs. summary)\n - Enable filtering of comments by date, author, or relevance\n - Provide options for manual review before task creation",
"testStrategy": "Testing should cover the comprehensive LLM-powered import system:\n\n1. **Unit Tests**:\n - Test URL parsing for GitHub Issues and Discussions\n - Test GitHub API client with mocked responses\n - Test LLM integration with ContextGatherer.js\n - Test metadata schema consistency with export feature\n - Test content processing and task generation logic\n - Test error handling for various failure scenarios\n\n2. **Integration Tests**:\n - Test with real GitHub Issues and Discussions (public repos)\n - Test LLM-powered analysis with various content types\n - Test ContextGatherer integration with GitHub content\n - Test bidirectional compatibility with export feature\n - Test metadata structure and storage\n - Test with different GitHub content complexities\n\n3. **LLM and Context Analysis Tests**:\n - Test task generation quality with various GitHub content types\n - Test subtask creation from complex discussions\n - Test priority and dependency inference\n - Test handling of code references and technical discussions\n - Test content summarization and structure preservation\n - Validate LLM prompt effectiveness and response quality\n\n4. **Error Case Tests**:\n - Invalid or malformed GitHub URLs\n - Non-existent repositories or issues/discussions\n - API rate limit handling\n - Authentication failures for private repos\n - LLM service unavailability or errors\n - Network connectivity issues\n - Malformed or incomplete GitHub content\n\n5. **End-to-End Tests**:\n - Complete import workflow from GitHub URL to created task\n - Verify task quality and completeness\n - Test metadata preservation and linking\n - Test compatibility with existing task management features\n - Verify bidirectional workflow with export feature\n\n6. **Performance and Scalability Tests**:\n - Test with large GitHub discussions (many comments)\n - Test LLM processing time and resource usage\n - Test API rate limiting behavior\n - Test concurrent import operations\n\n7. **Future Platform Preparation Tests**:\n - Test modular architecture extensibility\n - Verify plugin-style platform addition capability\n - Test configuration system flexibility\n\nCreate comprehensive mock data for GitHub API responses including various issue/discussion types, comment structures, and edge cases. Use environment variables for test credentials and LLM service configuration.",
@@ -2316,7 +2728,9 @@
"id": 2,
"title": "Implement GitHub URL parsing and validation",
"description": "Create a module to parse and validate GitHub issue URLs, extracting repository owner, repository name, and issue number.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Handle various GitHub URL formats (e.g., github.com/owner/repo/issues/123, github.com/owner/repo/pull/123). Implement validation to ensure the URL points to a valid issue or pull request. Return structured data with owner, repo, and issue number for valid URLs.",
"status": "pending"
},
@@ -2324,7 +2738,10 @@
"id": 3,
"title": "Develop GitHub API client for issue fetching",
"description": "Create a service to authenticate with GitHub and fetch issue details using the GitHub REST API.",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"details": "Implement authentication using GitHub Personal Access Tokens or OAuth. Handle API responses, including error cases (rate limiting, authentication failures, not found). Extract relevant issue data: title, description, labels, assignees, and comments.",
"status": "pending"
},
@@ -2332,7 +2749,9 @@
"id": 4,
"title": "Create task formatter for GitHub issues",
"description": "Develop a formatter to convert GitHub issue data into the application's task format.",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Map GitHub issue fields to task fields (title, description, etc.). Convert GitHub markdown to the application's supported format. Handle special GitHub features like issue references and user mentions. Generate appropriate tags based on GitHub labels.",
"status": "pending"
},
@@ -2340,7 +2759,9 @@
"id": 5,
"title": "Implement end-to-end import flow with UI",
"description": "Create the user interface and workflow for importing GitHub issues, including progress indicators and error handling.",
- "dependencies": [4],
+ "dependencies": [
+ 4
+ ],
"details": "Design and implement UI for URL input and import confirmation. Show loading states during API calls. Display meaningful error messages for various failure scenarios. Allow users to review and modify imported task details before saving. Add automated tests for the entire import flow.",
"status": "pending"
},
@@ -2356,7 +2777,9 @@
"id": 7,
"title": "Add bidirectional integration with export feature",
"description": "Ensure imported tasks work seamlessly with the GitHub export feature and maintain consistent link management.",
- "dependencies": [6],
+ "dependencies": [
+ 6
+ ],
"details": "Verify that tasks imported from GitHub can be properly exported back to GitHub. Implement checks to prevent duplicate exports of imported issues. Add metadata flags to identify imported tasks and their source repositories. Test round-trip workflows (import → modify → export) to ensure data integrity.",
"status": "pending"
},
@@ -2372,7 +2795,10 @@
"id": 9,
"title": "Extend GitHub URL parsing for Issues and Discussions",
"description": "Enhance URL parsing to support both GitHub Issues and Discussions with automatic type detection.",
- "dependencies": [2, 8],
+ "dependencies": [
+ 2,
+ 8
+ ],
"details": "Extend existing URL parser to handle GitHub Discussions URLs. Implement automatic detection of content type (issue vs discussion). Update validation logic for both content types. Ensure consistent data extraction for owner, repo, and content ID regardless of type.",
"status": "pending"
},
@@ -2380,7 +2806,10 @@
"id": 10,
"title": "Implement comprehensive GitHub API client",
"description": "Create enhanced GitHub API client supporting both Issues and Discussions APIs with complete content fetching.",
- "dependencies": [3, 9],
+ "dependencies": [
+ 3,
+ 9
+ ],
"details": "Extend existing API client to support GitHub Discussions API. Implement complete content fetching including all comments and replies. Add support for GITHUB_API_KEY environment variable. Handle threaded discussions and comment hierarchies. Implement robust error handling and rate limiting for both API types.",
"status": "pending"
},
@@ -2388,7 +2817,9 @@
"id": 11,
"title": "Integrate ContextGatherer for LLM-powered analysis",
"description": "Integrate with existing ContextGatherer.js to enable LLM-powered analysis of GitHub content.",
- "dependencies": [10],
+ "dependencies": [
+ 10
+ ],
"details": "Adapt ContextGatherer.js to work with GitHub content as input source. Create GitHub-specific context gathering strategies. Implement content preprocessing for optimal LLM analysis. Add project component identification for GitHub discussions. Create prompts for task generation from GitHub content.",
"status": "pending"
},
@@ -2396,7 +2827,9 @@
"id": 12,
"title": "Implement LLM-powered task generation",
"description": "Create the core LLM integration that analyzes GitHub content and generates comprehensive tasks with subtasks.",
- "dependencies": [11],
+ "dependencies": [
+ 11
+ ],
"details": "Design LLM prompts for task generation from GitHub content. Implement automatic subtask creation from complex discussions. Add priority and dependency inference based on content analysis. Create test strategy generation from technical discussions. Implement quality validation for LLM-generated content. Add fallback mechanisms for LLM failures.",
"status": "pending"
},
@@ -2404,7 +2837,10 @@
"id": 13,
"title": "Enhance metadata system for rich import context",
"description": "Extend the metadata schema to store comprehensive import context and enable advanced features.",
- "dependencies": [6, 12],
+ "dependencies": [
+ 6,
+ 12
+ ],
"details": "Extend existing metadata schema with import-specific fields. Add source platform, import timestamp, and LLM model tracking. Implement content hash storage for change detection. Store participant information and discussion context. Add support for custom metadata per platform type. Ensure backward compatibility with existing export feature metadata.",
"status": "pending"
},
@@ -2412,7 +2848,11 @@
"id": 14,
"title": "Implement import_task command interface",
"description": "Create the user-facing command interface for the new import_task system with GitHub support.",
- "dependencies": [8, 12, 13],
+ "dependencies": [
+ 8,
+ 12,
+ 13
+ ],
"details": "Implement the main import_task command with GitHub subcommand. Add command-line argument parsing and validation. Create progress indicators for LLM processing. Implement user review and confirmation workflow. Add verbose output options for debugging. Create help documentation and usage examples.",
"status": "pending"
},
@@ -2420,7 +2860,9 @@
"id": 15,
"title": "Add comprehensive testing and validation",
"description": "Implement comprehensive testing suite covering all aspects of the LLM-powered import system.",
- "dependencies": [14],
+ "dependencies": [
+ 14
+ ],
"details": "Create unit tests for all new components. Implement integration tests with real GitHub content. Add LLM response validation and quality tests. Create performance tests for large discussions. Implement end-to-end workflow testing. Add mock data for consistent testing. Test bidirectional compatibility with export feature.",
"status": "pending"
}
@@ -2448,7 +2890,9 @@
"id": 2,
"title": "Implement AI integration for ICE scoring",
"description": "Develop the AI component that will analyze tasks and generate ICE scores",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Create prompts for the AI to evaluate Impact, Confidence, and Ease. Implement error handling for AI responses. Add caching to prevent redundant AI calls. Ensure the AI provides justification for each score component. Test with various task types to ensure consistent scoring.",
"status": "pending"
},
@@ -2456,7 +2900,9 @@
"id": 3,
"title": "Create report file generator",
"description": "Build functionality to generate a structured report file with ICE analysis results",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Design the report file format (JSON, CSV, or Markdown). Implement sorting of tasks by ICE score. Include task details, individual I/C/E scores, and final ICE score in the report. Add timestamp and project metadata. Create a function to save the report to the specified location.",
"status": "pending"
},
@@ -2464,7 +2910,9 @@
"id": 4,
"title": "Implement CLI rendering for ICE analysis",
"description": "Develop the command-line interface for displaying ICE analysis results",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Design a tabular format for displaying ICE scores in the terminal. Use color coding to highlight high/medium/low priority tasks. Implement filtering options (by score range, task type, etc.). Add sorting capabilities. Create a summary view that shows top N tasks by ICE score.",
"status": "pending"
},
@@ -2472,7 +2920,10 @@
"id": 5,
"title": "Integrate with existing complexity reports",
"description": "Connect the ICE analysis functionality with the existing complexity reporting system",
- "dependencies": [3, 4],
+ "dependencies": [
+ 3,
+ 4
+ ],
"details": "Modify the existing complexity report to include ICE scores. Ensure consistent formatting between complexity and ICE reports. Add cross-referencing between reports. Update the command-line help documentation. Test the integrated system with various project sizes and configurations.",
"status": "pending"
}
@@ -2500,7 +2951,9 @@
"id": 2,
"title": "Implement State Management for Task Expansion",
"description": "Develop the state management logic to handle expanded task states, subtask creation, and context additions.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Create state handlers for expanded/collapsed states, subtask array management, and context data. Implement proper validation for user inputs and error handling. Ensure state persistence across user sessions and synchronization with backend services.",
"status": "pending"
},
@@ -2508,7 +2961,9 @@
"id": 3,
"title": "Build Context Addition Functionality",
"description": "Create the functionality that allows users to add additional context to tasks and subtasks.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Implement context input fields with support for rich text, attachments, links, and references to other tasks. Add auto-save functionality for context changes and version history if applicable. Include context suggestion features based on task content.",
"status": "pending"
},
@@ -2516,7 +2971,9 @@
"id": 4,
"title": "Develop Task Management Controls",
"description": "Implement controls for managing tasks within the expanded card view, including prioritization, scheduling, and assignment.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Create UI controls for task prioritization (drag-and-drop ranking), deadline setting with calendar integration, assignee selection with user search, and status updates. Implement notification triggers for task changes and deadline reminders.",
"status": "pending"
},
@@ -2524,7 +2981,10 @@
"id": 5,
"title": "Integrate with Existing Task Systems",
"description": "Ensure the enhanced actions card workflow integrates seamlessly with existing task management functionality.",
- "dependencies": [3, 4],
+ "dependencies": [
+ 3,
+ 4
+ ],
"details": "Connect the new UI components to existing backend APIs. Update data models if necessary to support new features. Ensure compatibility with existing task filters, search, and reporting features. Implement data migration plan for existing tasks if needed.",
"status": "pending"
},
@@ -2532,7 +2992,9 @@
"id": 6,
"title": "Test and Optimize User Experience",
"description": "Conduct thorough testing of the enhanced workflow and optimize based on user feedback and performance metrics.",
- "dependencies": [5],
+ "dependencies": [
+ 5
+ ],
"details": "Perform usability testing with representative users. Collect metrics on task completion time, error rates, and user satisfaction. Optimize performance for large task lists and complex subtask hierarchies. Implement A/B testing for alternative UI approaches if needed.",
"status": "pending"
}
@@ -2560,7 +3022,9 @@
"id": 2,
"title": "Extract prompts into individual files",
"description": "Identify all hardcoded prompts in the codebase and extract them into individual files in the prompts directory",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Search through the codebase for all hardcoded prompt strings. For each prompt, create a new file in the appropriate subdirectory with a descriptive name (e.g., 'taskBreakdownPrompt.js'). Format each file to export the prompt string as a constant. Add JSDoc comments to document the purpose and expected usage of each prompt.",
"status": "pending"
},
@@ -2568,7 +3032,10 @@
"id": 3,
"title": "Update functions to import prompts",
"description": "Modify all functions that use hardcoded prompts to import them from the centralized structure",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"details": "For each function that previously used a hardcoded prompt, add an import statement to pull in the prompt from the centralized structure. Test each function after modification to ensure it still works correctly. Update any tests that might be affected by the refactoring. Create a pull request with the changes and document the new prompt structure in the project documentation.",
"status": "pending"
}
@@ -2596,7 +3063,9 @@
"id": 2,
"title": "Implement best practice verification",
"description": "Build verification checks against established coding standards and best practices",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Create a framework to compare code against established best practices for the specific language/framework. Include checks for naming conventions, function length, complexity metrics, comment coverage, and other industry-standard quality indicators.",
"status": "pending"
},
@@ -2604,7 +3073,10 @@
"id": 3,
"title": "Develop AI integration for code analysis",
"description": "Integrate AI capabilities to enhance code analysis and provide intelligent recommendations",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"details": "Connect to AI services (like OpenAI) to analyze code beyond rule-based checks. Configure the AI to understand context, project-specific patterns, and provide nuanced analysis that rule-based systems might miss.",
"status": "pending"
},
@@ -2612,7 +3084,10 @@
"id": 4,
"title": "Create recommendation generation system",
"description": "Build a system to generate actionable improvement recommendations based on analysis results",
- "dependencies": [2, 3],
+ "dependencies": [
+ 2,
+ 3
+ ],
"details": "Develop algorithms to transform analysis results into specific, actionable recommendations. Include priority levels, effort estimates, and potential impact assessments for each recommendation.",
"status": "pending"
},
@@ -2620,7 +3095,9 @@
"id": 5,
"title": "Implement task creation functionality",
"description": "Add capability to automatically create tasks from code quality recommendations",
- "dependencies": [4],
+ "dependencies": [
+ 4
+ ],
"details": "Build functionality to convert recommendations into tasks in the project management system. Include appropriate metadata, assignee suggestions based on code ownership, and integration with existing workflow systems.",
"status": "pending"
},
@@ -2628,7 +3105,10 @@
"id": 6,
"title": "Create comprehensive reporting interface",
"description": "Develop a user interface to display analysis results and recommendations",
- "dependencies": [4, 5],
+ "dependencies": [
+ 4,
+ 5
+ ],
"details": "Build a dashboard showing code quality metrics, identified patterns, recommendations, and created tasks. Include filtering options, trend analysis over time, and the ability to drill down into specific issues with code snippets and explanations.",
"status": "pending"
}
@@ -2657,7 +3137,9 @@
"id": 2,
"title": "Develop coverage report parser and adapter system",
"description": "Create a framework-agnostic system that can parse coverage reports from various testing tools and convert them to the standardized task-based format in tests.json.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "1. Research and document output formats for major coverage tools (Istanbul/nyc, Jest, Pytest, JaCoCo).\n2. Design a normalized intermediate coverage format that any test tool can map to.\n3. Implement adapter classes for each major testing framework that convert their reports to the intermediate format.\n4. Create a parser registry that can automatically detect and use the appropriate parser based on input format.\n5. Develop a mapping algorithm that associates coverage data with specific tasks based on file paths and code blocks.\n6. Implement file path normalization to handle different operating systems and environments.\n7. Add error handling for malformed or incomplete coverage reports.\n8. Create unit tests for each adapter using sample coverage reports.\n9. Implement a command-line interface for manual parsing and testing.\n10. Document the extension points for adding custom coverage tool adapters.",
"status": "pending",
"parentTaskId": 50
@@ -2666,7 +3148,10 @@
"id": 3,
"title": "Build coverage tracking and update generator",
"description": "Create a system that processes code coverage reports, maps them to tasks, and updates the tests.json file to maintain accurate coverage tracking over time.",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"details": "1. Implement a coverage processor that takes parsed coverage data and maps it to task IDs.\n2. Create algorithms to calculate aggregate coverage metrics at the task and subtask levels.\n3. Develop a change detection system that identifies when tests or code have changed and require updates.\n4. Implement incremental update logic to avoid reprocessing unchanged tests.\n5. Create a task-code association system that maps specific code blocks to tasks for granular tracking.\n6. Add historical tracking to monitor coverage trends over time.\n7. Implement hooks for CI/CD integration to automatically update coverage after test runs.\n8. Create a conflict resolution strategy for when multiple tests cover the same code areas.\n9. Add performance optimizations for large codebases and test suites.\n10. Develop unit tests that verify correct aggregation and mapping of coverage data.\n11. Document the update workflow with sequence diagrams and examples.",
"status": "pending",
"parentTaskId": 50
@@ -2675,7 +3160,11 @@
"id": 4,
"title": "Implement CLI commands for coverage operations",
"description": "Create a set of command-line interface tools that allow developers to view, analyze, and manage test coverage at the task level.",
- "dependencies": [1, 2, 3],
+ "dependencies": [
+ 1,
+ 2,
+ 3
+ ],
"details": "1. Design a cohesive CLI command structure with subcommands for different coverage operations.\n2. Implement 'coverage show' command to display test coverage for a specific task/subtask.\n3. Create 'coverage gaps' command to identify untested code related to a particular task.\n4. Develop 'coverage history' command to show how coverage has changed over time.\n5. Implement 'coverage generate' command that uses LLMs to suggest tests for uncovered code.\n6. Add filtering options to focus on specific test types or coverage thresholds.\n7. Create formatted output options (JSON, CSV, markdown tables) for integration with other tools.\n8. Implement colorized terminal output for better readability of coverage reports.\n9. Add batch processing capabilities for running operations across multiple tasks.\n10. Create comprehensive help documentation and examples for each command.\n11. Develop unit and integration tests for CLI commands.\n12. Document command usage patterns and example workflows.",
"status": "pending",
"parentTaskId": 50
@@ -2684,7 +3173,12 @@
"id": 5,
"title": "Develop AI-powered test generation system",
"description": "Create an intelligent system that uses LLMs to generate targeted tests for uncovered code sections within tasks, integrating with the existing task management workflow.",
- "dependencies": [1, 2, 3, 4],
+ "dependencies": [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
"details": "1. Design prompt templates for different test types (unit, integration, E2E) that incorporate task descriptions and code context.\n2. Implement code analysis to extract relevant context from uncovered code sections.\n3. Create a test generation pipeline that combines task metadata, code context, and coverage gaps.\n4. Develop strategies for maintaining test context across task changes and updates.\n5. Implement test quality evaluation to ensure generated tests are meaningful and effective.\n6. Create a feedback mechanism to improve prompts based on acceptance or rejection of generated tests.\n7. Add support for different testing frameworks and languages through templating.\n8. Implement caching to avoid regenerating similar tests.\n9. Create a workflow that integrates with the task management system to suggest tests alongside implementation requirements.\n10. Develop specialized generation modes for edge cases, regression tests, and performance tests.\n11. Add configuration options for controlling test generation style and coverage goals.\n12. Create comprehensive documentation on how to use and extend the test generation system.\n13. Implement evaluation metrics to track the effectiveness of AI-generated tests.",
"status": "pending",
"parentTaskId": 50
@@ -2723,7 +3217,10 @@
"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.",
- "dependencies": [1, 2],
+ "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\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",
"status": "pending",
"parentTaskId": 51
@@ -2732,7 +3229,10 @@
"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.",
- "dependencies": [1, 3],
+ "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\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",
"status": "pending",
"parentTaskId": 51
@@ -2741,7 +3241,10 @@
"id": 5,
"title": "Implement Caching and Results Management System",
"description": "Create a persistent caching system for research results and implement functionality to manage, retrieve, and reference previous research.",
- "dependencies": [1, 4],
+ "dependencies": [
+ 1,
+ 4
+ ],
"details": "Implementation details:\n1. Create a research results database using a simple JSON file or SQLite:\n - Store queries, timestamps, and results\n - Index by query and related task IDs\n2. Implement cache retrieval and validation:\n - Check for cached results before making API calls\n - Validate cache freshness with configurable TTL\n3. Add commands to manage research history:\n - List recent research queries\n - Retrieve past research by ID or search term\n - Clear cache or delete specific entries\n4. Create functionality to associate research results with tasks:\n - Add metadata linking research to specific tasks\n - Implement command to show all research related to a task\n5. Add configuration options for cache behavior in user settings\n6. Implement export/import functionality for research data\n\nTesting approach:\n- Test cache storage and retrieval with various queries\n- Verify cache invalidation works correctly\n- Test history management commands\n- Verify task association functionality\n- Test with large cache sizes to ensure performance\n\nImplementation details:\n1. Create a session management system for the REPL experience:\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 links (if applicable)\n6. Create session management commands:\n - Create new sessions\n - Clone existing sessions\n - Archive or delete old sessions\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\n",
"status": "cancelled",
"parentTaskId": 51
@@ -2750,7 +3253,9 @@
"id": 6,
"title": "Implement Project Context Generation",
"description": "Create functionality to generate and include project-level context such as file trees, repository structure, and codebase insights for more informed research.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Implementation details:\n1. Create a new module `utils/projectContextGenerator.js` for project-level context extraction\n2. Implement file tree generation functionality:\n - Scan project directory structure recursively\n - Filter out irrelevant files (node_modules, .git, etc.)\n - Format file tree for AI consumption\n - Include file counts and structure statistics\n3. Add code analysis capabilities:\n - Extract key imports and dependencies\n - Identify main modules and their relationships\n - Generate high-level architecture overview\n4. Implement context summarization:\n - Create concise project overview\n - Identify key technologies and patterns\n - Summarize project purpose and structure\n5. Add caching for expensive operations:\n - Cache file tree with invalidation on changes\n - Store analysis results with TTL\n6. Create integration with research REPL:\n - Add project context to system prompts\n - Support `/project` command to refresh context\n - Allow selective inclusion of project components\n\nTesting approach:\n- Test file tree generation with various project structures\n- Verify filtering logic works correctly\n- Test context summarization quality\n- Measure performance impact of context generation\n- Verify caching mechanism effectiveness",
"status": "pending",
"parentTaskId": 51
@@ -2759,7 +3264,9 @@
"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.",
- "dependencies": [3],
+ "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 ` - Load task context\n - `/file ` - 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 ` - Set detail level\n - `/clear` - Clear conversation\n - `/project` - Refresh project context\n - `/session ` - 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",
"status": "pending",
"parentTaskId": 51
@@ -2768,7 +3275,10 @@
"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.",
- "dependencies": [3, 4],
+ "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",
"status": "pending",
"parentTaskId": 51
@@ -2797,7 +3307,9 @@
"id": 2,
"title": "Implement AI integration for task suggestions",
"description": "Develop the core functionality to generate task suggestions using AI based on existing tasks",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Create an AI prompt template that effectively communicates the existing task context and request for suggestions. Implement error handling for API failures, rate limiting, and malformed responses. Include parameters for controlling suggestion quantity and specificity.",
"status": "pending"
},
@@ -2805,7 +3317,9 @@
"id": 3,
"title": "Build interactive CLI interface for suggestions",
"description": "Create the command-line interface for requesting and displaying task suggestions",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Design a user-friendly CLI command structure with appropriate flags for customization. Implement progress indicators during AI processing and format the output of suggestions in a clear, readable format. Include help text and examples in the command documentation.",
"status": "pending"
},
@@ -2813,7 +3327,9 @@
"id": 4,
"title": "Implement suggestion selection and task creation",
"description": "Allow users to interactively select suggestions to convert into actual tasks",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Create an interactive selection interface where users can review suggestions, select which ones to create as tasks, and optionally modify them before creation. Implement batch creation capabilities and validation to ensure new tasks meet system requirements.",
"status": "pending"
},
@@ -2821,7 +3337,10 @@
"id": 5,
"title": "Add configuration options and flag handling",
"description": "Implement various configuration options and command flags for customizing suggestion behavior",
- "dependencies": [3, 4],
+ "dependencies": [
+ 3,
+ 4
+ ],
"details": "Create a comprehensive set of command flags for controlling suggestion quantity, specificity, format, and other parameters. Implement persistent configuration options that users can set as defaults. Document all available options and provide examples of common usage patterns.",
"status": "pending"
}
@@ -2849,7 +3368,9 @@
"id": 2,
"title": "Build context gathering mechanism",
"description": "Develop a system to collect relevant context from parent task and existing subtasks",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Create functions to extract information from the parent task including title, description, and metadata. Also gather information about any existing subtasks to provide context for AI suggestions. Format this data appropriately for the AI prompt.",
"status": "pending"
},
@@ -2857,7 +3378,9 @@
"id": 3,
"title": "Develop AI suggestion logic for subtasks",
"description": "Create the core AI integration to generate relevant subtask suggestions",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Implement the AI prompt engineering and response handling for subtask generation. Ensure the AI provides structured output with appropriate fields for subtasks. Include error handling for API failures and malformed responses.",
"status": "pending"
},
@@ -2865,7 +3388,9 @@
"id": 4,
"title": "Create interactive CLI interface",
"description": "Build a user-friendly command-line interface for the subtask suggestion feature",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Develop CLI commands and options for requesting subtask suggestions. Include interactive elements for selecting, modifying, or rejecting suggested subtasks. Ensure clear user feedback throughout the process.",
"status": "pending"
},
@@ -2873,7 +3398,9 @@
"id": 5,
"title": "Implement subtask linking functionality",
"description": "Create system to properly link suggested subtasks to their parent task",
- "dependencies": [4],
+ "dependencies": [
+ 4
+ ],
"details": "Develop the database operations to save accepted subtasks and link them to the parent task. Include functionality for setting dependencies between subtasks. Ensure proper transaction handling to maintain data integrity.",
"status": "pending"
},
@@ -2881,7 +3408,9 @@
"id": 6,
"title": "Perform comprehensive testing",
"description": "Test the subtask suggestion feature across various scenarios",
- "dependencies": [5],
+ "dependencies": [
+ 5
+ ],
"details": "Create unit tests for each component. Develop integration tests for the full feature workflow. Test edge cases including invalid inputs, API failures, and unusual task structures. Document test results and fix any identified issues.",
"status": "pending"
}
@@ -2919,7 +3448,9 @@
"id": 2,
"title": "Design positional argument specification format",
"description": "Create a specification for how positional arguments will be defined in command definitions, including their order, required/optional status, and type validation.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Define a clear syntax for specifying positional arguments in command definitions. Consider how to handle mixed positional and named arguments, default values, and type constraints. Document the specification with examples for different command types.",
"status": "pending"
},
@@ -2927,7 +3458,10 @@
"id": 3,
"title": "Implement core positional argument parsing logic",
"description": "Modify the argument parser to recognize and process positional arguments according to the specification, while maintaining compatibility with existing named arguments.",
- "dependencies": [1, 2],
+ "dependencies": [
+ 1,
+ 2
+ ],
"details": "Update the parser to identify arguments without flags as positional, map them to the correct parameter based on order, and apply appropriate validation. Ensure the implementation handles missing required positional arguments and provides helpful error messages.",
"status": "pending"
},
@@ -2935,7 +3469,9 @@
"id": 4,
"title": "Handle edge cases and error conditions",
"description": "Implement robust handling for edge cases such as too many/few arguments, type mismatches, and ambiguous situations between positional and named arguments.",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Create comprehensive error handling for scenarios like: providing both positional and named version of the same argument, incorrect argument types, missing required positional arguments, and excess positional arguments. Ensure error messages are clear and actionable for users.",
"status": "pending"
},
@@ -2943,7 +3479,11 @@
"id": 5,
"title": "Update documentation and create usage examples",
"description": "Update CLI documentation to explain positional argument support and provide clear examples showing how to use positional arguments with different commands.",
- "dependencies": [2, 3, 4],
+ "dependencies": [
+ 2,
+ 3,
+ 4
+ ],
"details": "Revise user documentation to include positional argument syntax, update command reference with positional argument information, and create example command snippets showing both positional and named argument usage. Include a migration guide for users transitioning from named-only to positional arguments.",
"status": "pending"
}
@@ -2989,7 +3529,9 @@
"id": 3,
"title": "Implement Progress Indicators and Loading Animations",
"description": "Add visual feedback for long-running operations",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Create spinner animations for operations that take time to complete. Implement progress bars for operations with known completion percentages. Ensure animations degrade gracefully in terminals with limited capabilities. Add estimated time remaining calculations where possible.",
"status": "pending"
},
@@ -2997,7 +3539,9 @@
"id": 4,
"title": "Develop Interactive Selection Menus",
"description": "Create interactive menus for task selection and configuration",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Implement arrow-key navigation for selecting tasks from a list. Add checkbox and radio button interfaces for multi-select and single-select options. Include search/filter functionality for large task lists. Ensure keyboard shortcuts are consistent and documented.",
"status": "pending"
},
@@ -3005,7 +3549,9 @@
"id": 5,
"title": "Design Tabular and Structured Output Formats",
"description": "Improve the formatting of task lists and detailed information",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Create table layouts with proper column alignment for task lists. Implement tree views for displaying task hierarchies and dependencies. Add support for different output formats (plain text, JSON, CSV). Ensure outputs are properly paginated for large datasets.",
"status": "pending"
},
@@ -3013,7 +3559,11 @@
"id": 6,
"title": "Create Help System and Interactive Documentation",
"description": "Develop an in-CLI help system with examples and contextual assistance",
- "dependencies": [2, 4, 5],
+ "dependencies": [
+ 2,
+ 4,
+ 5
+ ],
"details": "Implement a comprehensive help command with examples for each feature. Add contextual help that suggests relevant commands based on user actions. Create interactive tutorials for new users. Include command auto-completion suggestions and syntax highlighting for command examples.",
"status": "pending"
}
@@ -3051,7 +3601,9 @@
"id": 2,
"title": "Remove Manual Dependency Modifications",
"description": "Eliminate any custom scripts or manual steps that alter dependencies outside of npm's standard workflow.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Refactor or delete code that manually installs, updates, or modifies dependencies, ensuring all dependency management is handled via npm.",
"status": "done"
},
@@ -3059,7 +3611,9 @@
"id": 3,
"title": "Update npm Dependencies",
"description": "Update all project dependencies using npm, ensuring versions are current and compatible, and resolve any conflicts.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Run npm update, audit for vulnerabilities, and adjust package.json and package-lock.json as needed.",
"status": "done"
},
@@ -3067,7 +3621,9 @@
"id": 4,
"title": "Update Initialization and Installation Commands",
"description": "Revise project setup scripts and documentation to reflect the new npm-based dependency management approach.",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Ensure that all initialization commands (e.g., npm install) are up-to-date and remove references to deprecated manual steps.",
"status": "done"
},
@@ -3075,7 +3631,9 @@
"id": 5,
"title": "Update Documentation",
"description": "Revise project documentation to describe the new dependency management process and provide clear setup instructions.",
- "dependencies": [4],
+ "dependencies": [
+ 4
+ ],
"details": "Update README, onboarding guides, and any developer documentation to align with npm best practices.",
"status": "done"
},
@@ -3083,7 +3641,9 @@
"id": 6,
"title": "Perform Regression Testing",
"description": "Run comprehensive tests to ensure that the refactor has not introduced any regressions or broken existing functionality.",
- "dependencies": [5],
+ "dependencies": [
+ 5
+ ],
"details": "Execute automated and manual tests, focusing on areas affected by dependency management changes.",
"status": "done"
}
@@ -3111,7 +3671,9 @@
"id": 2,
"title": "Implement Mentor Profile Management",
"description": "Develop the functionality for creating, editing, and managing mentor profiles in the system.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Build UI components for mentor profile creation and editing. Implement backend APIs for profile CRUD operations. Create expertise tagging system and availability calendar. Add profile verification and approval workflows for quality control.",
"status": "pending"
},
@@ -3119,7 +3681,9 @@
"id": 3,
"title": "Develop Round-Table Discussion Framework",
"description": "Create the core framework for hosting and managing round-table discussions between mentors and users.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Design the discussion room data model and state management. Implement discussion scheduling and participant management. Create discussion topic and agenda setting functionality. Develop discussion moderation tools and rules enforcement mechanisms.",
"status": "pending"
},
@@ -3127,7 +3691,9 @@
"id": 4,
"title": "Implement LLM Integration for AI Mentors",
"description": "Integrate LLM capabilities to simulate AI mentors that can participate in round-table discussions.",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Select appropriate LLM models for mentor simulation. Develop prompt engineering templates for different mentor personas and expertise areas. Implement context management to maintain conversation coherence. Create fallback mechanisms for handling edge cases in discussions.",
"status": "pending"
},
@@ -3135,7 +3701,10 @@
"id": 5,
"title": "Build Discussion Output Formatter",
"description": "Create a system to format and present round-table discussion outputs in a structured, readable format.",
- "dependencies": [3, 4],
+ "dependencies": [
+ 3,
+ 4
+ ],
"details": "Design templates for discussion summaries and transcripts. Implement real-time formatting of ongoing discussions. Create exportable formats for discussion outcomes (PDF, markdown, etc.). Develop highlighting and annotation features for key insights.",
"status": "pending"
},
@@ -3143,7 +3712,10 @@
"id": 6,
"title": "Integrate Mentor System with Task Management",
"description": "Connect the mentor system with the existing task management functionality to enable task-specific mentoring.",
- "dependencies": [2, 3],
+ "dependencies": [
+ 2,
+ 3
+ ],
"details": "Create APIs to link tasks with relevant mentors based on expertise. Implement functionality to initiate discussions around specific tasks. Develop mechanisms for mentors to provide feedback and guidance on tasks. Build notification system for task-related mentor interactions.",
"status": "pending"
},
@@ -3151,7 +3723,11 @@
"id": 7,
"title": "Test and Optimize Round-Table Discussions",
"description": "Conduct comprehensive testing of the round-table discussion feature and optimize for performance and user experience.",
- "dependencies": [4, 5, 6],
+ "dependencies": [
+ 4,
+ 5,
+ 6
+ ],
"details": "Perform load testing with multiple concurrent discussions. Test AI mentor responses for quality and relevance. Optimize LLM usage for cost efficiency. Conduct user testing sessions and gather feedback. Implement performance monitoring and analytics for ongoing optimization.",
"status": "pending"
}
@@ -3180,7 +3756,9 @@
"id": 2,
"title": "Implement CLI Command Parser for Model Management",
"description": "Extend the CLI command parser to handle the new 'models' command and associated flags for model management.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "1. Update the CLI command parser to recognize the 'models' command\n2. Add support for '--set-main' and '--set-research' flags\n3. Implement validation for command arguments\n4. Create help text and usage examples for the models command\n5. Add error handling for invalid command usage\n6. Connect CLI parser to the configuration manager\n7. Implement command output formatting for model listings\n8. Testing approach: Create integration tests that verify CLI commands correctly interact with the configuration manager",
"status": "done",
"parentTaskId": 61
@@ -3189,7 +3767,9 @@
"id": 3,
"title": "Integrate Vercel AI SDK and Create Client Factory",
"description": "Set up Vercel AI SDK integration and implement a client factory pattern to create and manage AI model clients.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "1. Install Vercel AI SDK: `npm install @vercel/ai`\n2. Create an `ai-client-factory.js` module that implements the Factory pattern\n3. Define client creation functions for each supported model (Claude, OpenAI, Ollama, Gemini, OpenRouter, Perplexity, Grok)\n4. Implement error handling for missing API keys or configuration issues\n5. Add caching mechanism to reuse existing clients\n6. Create a unified interface for all clients regardless of the underlying model\n7. Implement client validation to ensure proper initialization\n8. Testing approach: Mock API responses to test client creation and error handling\n\n\nHere's additional information for the client factory implementation:\n\nFor the client factory implementation:\n\n1. Structure the factory with a modular approach:\n```javascript\n// ai-client-factory.js\nimport { createOpenAI } from '@ai-sdk/openai';\nimport { createAnthropic } from '@ai-sdk/anthropic';\nimport { createGoogle } from '@ai-sdk/google';\nimport { createPerplexity } from '@ai-sdk/perplexity';\n\nconst clientCache = new Map();\n\nexport function createClientInstance(providerName, options = {}) {\n // Implementation details below\n}\n```\n\n2. For OpenAI-compatible providers (Ollama), implement specific configuration:\n```javascript\ncase 'ollama':\n const ollamaBaseUrl = process.env.OLLAMA_BASE_URL || 'http://localhost:11434';\n return createOpenAI({\n baseURL: ollamaBaseUrl,\n apiKey: 'ollama', // Ollama doesn't require a real API key\n ...options\n });\n```\n\n3. Add provider-specific model mapping:\n```javascript\n// Model mapping helper\nconst getModelForProvider = (provider, requestedModel) => {\n const modelMappings = {\n openai: {\n default: 'gpt-3.5-turbo',\n // Add other mappings\n },\n anthropic: {\n default: 'claude-3-opus-20240229',\n // Add other mappings\n },\n // Add mappings for other providers\n };\n \n return (modelMappings[provider] && modelMappings[provider][requestedModel]) \n || modelMappings[provider]?.default \n || requestedModel;\n};\n```\n\n4. Implement caching with provider+model as key:\n```javascript\nexport function getClient(providerName, model) {\n const cacheKey = `${providerName}:${model || 'default'}`;\n \n if (clientCache.has(cacheKey)) {\n return clientCache.get(cacheKey);\n }\n \n const modelName = getModelForProvider(providerName, model);\n const client = createClientInstance(providerName, { model: modelName });\n clientCache.set(cacheKey, client);\n \n return client;\n}\n```\n\n5. Add detailed environment variable validation:\n```javascript\nfunction validateEnvironment(provider) {\n const requirements = {\n openai: ['OPENAI_API_KEY'],\n anthropic: ['ANTHROPIC_API_KEY'],\n google: ['GOOGLE_API_KEY'],\n perplexity: ['PERPLEXITY_API_KEY'],\n openrouter: ['OPENROUTER_API_KEY'],\n ollama: ['OLLAMA_BASE_URL'],\n xai: ['XAI_API_KEY']\n };\n \n const missing = requirements[provider]?.filter(env => !process.env[env]) || [];\n \n if (missing.length > 0) {\n throw new Error(`Missing environment variables for ${provider}: ${missing.join(', ')}`);\n }\n}\n```\n\n6. Add Jest test examples:\n```javascript\n// ai-client-factory.test.js\ndescribe('AI Client Factory', () => {\n beforeEach(() => {\n // Mock environment variables\n process.env.OPENAI_API_KEY = 'test-openai-key';\n process.env.ANTHROPIC_API_KEY = 'test-anthropic-key';\n // Add other mocks\n });\n \n test('creates OpenAI client with correct configuration', () => {\n const client = getClient('openai');\n expect(client).toBeDefined();\n // Add assertions for client configuration\n });\n \n test('throws error when environment variables are missing', () => {\n delete process.env.OPENAI_API_KEY;\n expect(() => getClient('openai')).toThrow(/Missing environment variables/);\n });\n \n // Add tests for other providers\n});\n```\n",
"status": "done",
"parentTaskId": 61
@@ -3198,7 +3778,9 @@
"id": 4,
"title": "Develop Centralized AI Services Module",
"description": "Create a centralized AI services module that abstracts all AI interactions through a unified interface, using the Decorator pattern for adding functionality like logging and retries.",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "1. Create `ai-services.js` module to consolidate all AI model interactions\n2. Implement wrapper functions for text generation and streaming\n3. Add retry mechanisms for handling API rate limits and transient errors\n4. Implement logging for all AI interactions for observability\n5. Create model-specific adapters to normalize responses across different providers\n6. Add caching layer for frequently used responses to optimize performance\n7. Implement graceful fallback mechanisms when primary models fail\n8. Testing approach: Create unit tests with mocked responses to verify service behavior\n\n\nBased on the exploration findings, here's additional information for the AI services module refactoring:\n\nThe existing `ai-services.js` should be refactored to:\n\n1. Leverage the `ai-client-factory.js` for model instantiation while providing a higher-level service abstraction\n2. Implement a layered architecture:\n - Base service layer handling common functionality (retries, logging, caching)\n - Model-specific service implementations extending the base\n - Facade pattern to provide a unified API for all consumers\n\n3. Integration points:\n - Replace direct OpenAI client usage with factory-provided clients\n - Maintain backward compatibility with existing service consumers\n - Add service registration mechanism for new AI providers\n\n4. Performance considerations:\n - Implement request batching for high-volume operations\n - Add request priority queuing for critical vs non-critical operations\n - Implement circuit breaker pattern to prevent cascading failures\n\n5. Monitoring enhancements:\n - Add detailed telemetry for response times, token usage, and costs\n - Implement standardized error classification for better diagnostics\n\n6. Implementation sequence:\n - Start with abstract base service class\n - Refactor existing OpenAI implementations\n - Add adapter layer for new providers\n - Implement the unified facade\n",
"status": "done",
"parentTaskId": 61
@@ -3207,7 +3789,10 @@
"id": 5,
"title": "Implement Environment Variable Management",
"description": "Update environment variable handling to support multiple AI models and create documentation for configuration options.",
- "dependencies": [1, 3],
+ "dependencies": [
+ 1,
+ 3
+ ],
"details": "1. Update `.env.example` with all required API keys for supported models\n2. Implement environment variable validation on startup\n3. Create clear error messages for missing or invalid environment variables\n4. Add support for model-specific configuration options\n5. Document all environment variables and their purposes\n6. Implement a check to ensure required API keys are present for selected models\n7. Add support for optional configuration parameters for each model\n8. Testing approach: Create tests that verify environment variable validation logic",
"status": "done",
"parentTaskId": 61
@@ -3216,7 +3801,11 @@
"id": 6,
"title": "Implement Model Listing Command",
"description": "Implement the 'task-master models' command to display currently configured models and available options.",
- "dependencies": [1, 2, 4],
+ "dependencies": [
+ 1,
+ 2,
+ 4
+ ],
"details": "1. Create handler for the models command without flags\n2. Implement formatted output showing current model configuration\n3. Add color-coding for better readability using a library like chalk\n4. Include version information for each configured model\n5. Show API status indicators (connected/disconnected)\n6. Display usage examples for changing models\n7. Add support for verbose output with additional details\n8. Testing approach: Create integration tests that verify correct output formatting and content",
"status": "done",
"parentTaskId": 61
@@ -3225,7 +3814,12 @@
"id": 7,
"title": "Implement Model Setting Commands",
"description": "Implement the commands to set main and research models with proper validation and feedback.",
- "dependencies": [1, 2, 4, 6],
+ "dependencies": [
+ 1,
+ 2,
+ 4,
+ 6
+ ],
"details": "1. Create handlers for '--set-main' and '--set-research' flags\n2. Implement validation logic for model names\n3. Add clear error messages for invalid model selections\n4. Implement confirmation messages for successful model changes\n5. Add support for setting both models in a single command\n6. Implement dry-run option to validate without making changes\n7. Add verbose output option for debugging\n8. Testing approach: Create integration tests that verify model setting functionality with various inputs",
"status": "done",
"parentTaskId": 61
@@ -3234,7 +3828,11 @@
"id": 8,
"title": "Update Main Task Processing Logic",
"description": "Refactor the main task processing logic to use the new AI services module and support dynamic model selection.",
- "dependencies": [4, 5, "61.18"],
+ "dependencies": [
+ 4,
+ 5,
+ "61.18"
+ ],
"details": "1. Update task processing functions to use the centralized AI services\n2. Implement dynamic model selection based on configuration\n3. Add error handling for model-specific failures\n4. Implement graceful degradation when preferred models are unavailable\n5. Update prompts to be model-agnostic where possible\n6. Add telemetry for model performance monitoring\n7. Implement response validation to ensure quality across different models\n8. Testing approach: Create integration tests that verify task processing with different model configurations\n\n\nWhen updating the main task processing logic, implement the following changes to align with the new configuration system:\n\n1. Replace direct environment variable access with calls to the configuration manager:\n ```javascript\n // Before\n const apiKey = process.env.OPENAI_API_KEY;\n const modelId = process.env.MAIN_MODEL || \"gpt-4\";\n \n // After\n import { getMainProvider, getMainModelId, getMainMaxTokens, getMainTemperature } from './config-manager.js';\n \n const provider = getMainProvider();\n const modelId = getMainModelId();\n const maxTokens = getMainMaxTokens();\n const temperature = getMainTemperature();\n ```\n\n2. Implement model fallback logic using the configuration hierarchy:\n ```javascript\n async function processTaskWithFallback(task) {\n try {\n return await processWithModel(task, getMainModelId());\n } catch (error) {\n logger.warn(`Primary model failed: ${error.message}`);\n const fallbackModel = getMainFallbackModelId();\n if (fallbackModel) {\n return await processWithModel(task, fallbackModel);\n }\n throw error;\n }\n }\n ```\n\n3. Add configuration-aware telemetry points to track model usage and performance:\n ```javascript\n function trackModelPerformance(modelId, startTime, success) {\n const duration = Date.now() - startTime;\n telemetry.trackEvent('model_usage', {\n modelId,\n provider: getMainProvider(),\n duration,\n success,\n configVersion: getConfigVersion()\n });\n }\n ```\n\n4. Ensure all prompt templates are loaded through the configuration system rather than hardcoded:\n ```javascript\n const promptTemplate = getPromptTemplate('task_processing');\n const prompt = formatPrompt(promptTemplate, { task: taskData });\n ```\n",
"status": "done",
"parentTaskId": 61
@@ -3243,7 +3841,12 @@
"id": 9,
"title": "Update Research Processing Logic",
"description": "Refactor the research processing logic to use the new AI services module and support dynamic model selection for research operations.",
- "dependencies": [4, 5, 8, "61.18"],
+ "dependencies": [
+ 4,
+ 5,
+ 8,
+ "61.18"
+ ],
"details": "1. Update research functions to use the centralized AI services\n2. Implement dynamic model selection for research operations\n3. Add specialized error handling for research-specific issues\n4. Optimize prompts for research-focused models\n5. Implement result caching for research operations\n6. Add support for model-specific research parameters\n7. Create fallback mechanisms for research operations\n8. Testing approach: Create integration tests that verify research functionality with different model configurations\n\n\nWhen implementing the refactored research processing logic, ensure the following:\n\n1. Replace direct environment variable access with the new configuration system:\n ```javascript\n // Old approach\n const apiKey = process.env.OPENAI_API_KEY;\n const model = \"gpt-4\";\n \n // New approach\n import { getResearchProvider, getResearchModelId, getResearchMaxTokens, \n getResearchTemperature } from './config-manager.js';\n \n const provider = getResearchProvider();\n const modelId = getResearchModelId();\n const maxTokens = getResearchMaxTokens();\n const temperature = getResearchTemperature();\n ```\n\n2. Implement model fallback chains using the configuration system:\n ```javascript\n async function performResearch(query) {\n try {\n return await callAIService({\n provider: getResearchProvider(),\n modelId: getResearchModelId(),\n maxTokens: getResearchMaxTokens(),\n temperature: getResearchTemperature()\n });\n } catch (error) {\n logger.warn(`Primary research model failed: ${error.message}`);\n return await callAIService({\n provider: getResearchProvider('fallback'),\n modelId: getResearchModelId('fallback'),\n maxTokens: getResearchMaxTokens('fallback'),\n temperature: getResearchTemperature('fallback')\n });\n }\n }\n ```\n\n3. Add support for dynamic parameter adjustment based on research type:\n ```javascript\n function getResearchParameters(researchType) {\n // Get base parameters\n const baseParams = {\n provider: getResearchProvider(),\n modelId: getResearchModelId(),\n maxTokens: getResearchMaxTokens(),\n temperature: getResearchTemperature()\n };\n \n // Adjust based on research type\n switch(researchType) {\n case 'deep':\n return {...baseParams, maxTokens: baseParams.maxTokens * 1.5};\n case 'creative':\n return {...baseParams, temperature: Math.min(baseParams.temperature + 0.2, 1.0)};\n case 'factual':\n return {...baseParams, temperature: Math.max(baseParams.temperature - 0.2, 0)};\n default:\n return baseParams;\n }\n }\n ```\n\n4. Ensure the caching mechanism uses configuration-based TTL settings:\n ```javascript\n const researchCache = new Cache({\n ttl: getResearchCacheTTL(),\n maxSize: getResearchCacheMaxSize()\n });\n ```\n",
"status": "done",
"parentTaskId": 61
@@ -3252,7 +3855,12 @@
"id": 10,
"title": "Create Comprehensive Documentation and Examples",
"description": "Develop comprehensive documentation for the new model management features, including examples, troubleshooting guides, and best practices.",
- "dependencies": [6, 7, 8, 9],
+ "dependencies": [
+ 6,
+ 7,
+ 8,
+ 9
+ ],
"details": "1. Update README.md with new model management commands\n2. Create usage examples for all supported models\n3. Document environment variable requirements for each model\n4. Create troubleshooting guide for common issues\n5. Add performance considerations and best practices\n6. Document API key acquisition process for each supported service\n7. Create comparison chart of model capabilities and limitations\n8. Testing approach: Conduct user testing with the documentation to ensure clarity and completeness\n\n\n## Documentation Update for Configuration System Refactoring\n\n### Configuration System Architecture\n- Document the separation between environment variables and configuration file:\n - API keys: Sourced exclusively from environment variables (process.env or session.env)\n - All other settings: Centralized in `.taskmasterconfig` JSON file\n\n### `.taskmasterconfig` Structure\n```json\n{\n \"models\": {\n \"completion\": \"gpt-3.5-turbo\",\n \"chat\": \"gpt-4\",\n \"embedding\": \"text-embedding-ada-002\"\n },\n \"parameters\": {\n \"temperature\": 0.7,\n \"maxTokens\": 2000,\n \"topP\": 1\n },\n \"logging\": {\n \"enabled\": true,\n \"level\": \"info\"\n },\n \"defaults\": {\n \"outputFormat\": \"markdown\"\n }\n}\n```\n\n### Configuration Access Patterns\n- Document the getter functions in `config-manager.js`:\n - `getModelForRole(role)`: Returns configured model for a specific role\n - `getParameter(name)`: Retrieves model parameters\n - `getLoggingConfig()`: Access logging settings\n - Example usage: `const completionModel = getModelForRole('completion')`\n\n### Environment Variable Resolution\n- Explain the `resolveEnvVariable(key)` function:\n - Checks both process.env and session.env\n - Prioritizes session variables over process variables\n - Returns null if variable not found\n\n### Configuration Precedence\n- Document the order of precedence:\n 1. Command-line arguments (highest priority)\n 2. Session environment variables\n 3. Process environment variables\n 4. `.taskmasterconfig` settings\n 5. Hardcoded defaults (lowest priority)\n\n### Migration Guide\n- Steps for users to migrate from previous configuration approach\n- How to verify configuration is correctly loaded\n",
"status": "done",
"parentTaskId": 61
@@ -3263,7 +3871,9 @@
"description": "Update PRD processing logic (callClaude, processClaudeResponse, handleStreamingRequest in ai-services.js) to use the new `generateObjectService` from `ai-services-unified.js` with an appropriate Zod schema.",
"details": "\n\n\nThe PRD parsing refactoring should align with the new configuration system architecture. When implementing this change:\n\n1. Replace direct environment variable access with `resolveEnvVariable` calls for API keys.\n\n2. Remove any hardcoded model names or parameters in the PRD processing functions. Instead, use the config-manager.js getters:\n - `getModelForRole('prd')` to determine the appropriate model\n - `getModelParameters('prd')` to retrieve temperature, maxTokens, etc.\n\n3. When constructing the generateObjectService call, ensure parameters are sourced from config:\n```javascript\nconst modelConfig = getModelParameters('prd');\nconst model = getModelForRole('prd');\n\nconst result = await generateObjectService({\n model,\n temperature: modelConfig.temperature,\n maxTokens: modelConfig.maxTokens,\n // other parameters as needed\n schema: prdSchema,\n // existing prompt/context parameters\n});\n```\n\n4. Update any logging to respect the logging configuration from config-manager (e.g., `isLoggingEnabled('ai')`)\n\n5. Ensure any default values previously hardcoded are now retrieved from the configuration system.\n",
"status": "done",
- "dependencies": ["61.23"],
+ "dependencies": [
+ "61.23"
+ ],
"parentTaskId": 61
},
{
@@ -3272,7 +3882,9 @@
"description": "Update the `generateSubtasks` function in `ai-services.js` to use the new `generateObjectService` from `ai-services-unified.js` with a Zod schema for the subtask array.",
"details": "\n\n\nThe refactoring should leverage the new configuration system:\n\n1. Replace direct model references with calls to config-manager.js getters:\n ```javascript\n const { getModelForRole, getModelParams } = require('./config-manager');\n \n // Instead of hardcoded models/parameters:\n const model = getModelForRole('subtask-generator');\n const modelParams = getModelParams('subtask-generator');\n ```\n\n2. Update API key handling to use the resolveEnvVariable pattern:\n ```javascript\n const { resolveEnvVariable } = require('./utils');\n const apiKey = resolveEnvVariable('OPENAI_API_KEY');\n ```\n\n3. When calling generateObjectService, pass the configuration parameters:\n ```javascript\n const result = await generateObjectService({\n schema: subtasksArraySchema,\n prompt: subtaskPrompt,\n model: model,\n temperature: modelParams.temperature,\n maxTokens: modelParams.maxTokens,\n // Other parameters from config\n });\n ```\n\n4. Add error handling that respects logging configuration:\n ```javascript\n const { isLoggingEnabled } = require('./config-manager');\n \n try {\n // Generation code\n } catch (error) {\n if (isLoggingEnabled('errors')) {\n console.error('Subtask generation error:', error);\n }\n throw error;\n }\n ```\n",
"status": "done",
- "dependencies": ["61.23"],
+ "dependencies": [
+ "61.23"
+ ],
"parentTaskId": 61
},
{
@@ -3281,7 +3893,9 @@
"description": "Update the `generateSubtasksWithPerplexity` function in `ai-services.js` to first perform research (potentially keeping the Perplexity call separate or adapting it) and then use `generateObjectService` from `ai-services-unified.js` with research results included in the prompt.",
"details": "\n\n\nThe refactoring should align with the new configuration system by:\n\n1. Replace direct environment variable access with `resolveEnvVariable` for API keys\n2. Use the config-manager.js getters to retrieve model parameters:\n - Replace hardcoded model names with `getModelForRole('research')`\n - Use `getParametersForRole('research')` to get temperature, maxTokens, etc.\n3. Implement proper error handling that respects the `getLoggingConfig()` settings\n4. Example implementation pattern:\n```javascript\nconst { getModelForRole, getParametersForRole, getLoggingConfig } = require('./config-manager');\nconst { resolveEnvVariable } = require('./environment-utils');\n\n// In the refactored function:\nconst researchModel = getModelForRole('research');\nconst { temperature, maxTokens } = getParametersForRole('research');\nconst apiKey = resolveEnvVariable('PERPLEXITY_API_KEY');\nconst { verbose } = getLoggingConfig();\n\n// Then use these variables in the API call configuration\n```\n5. Ensure the transition to generateObjectService maintains all existing functionality while leveraging the new configuration system\n",
"status": "done",
- "dependencies": ["61.23"],
+ "dependencies": [
+ "61.23"
+ ],
"parentTaskId": 61
},
{
@@ -3290,7 +3904,9 @@
"description": "Update the `generateTaskDescriptionWithPerplexity` function in `ai-services.js` to first perform research and then use `generateObjectService` from `ai-services-unified.js` to generate the structured task description.",
"details": "\n\n\nThe refactoring should incorporate the new configuration management system:\n\n1. Update imports to include the config-manager:\n```javascript\nconst { getModelForRole, getParametersForRole } = require('./config-manager');\n```\n\n2. Replace any hardcoded model selections or parameters with config-manager calls:\n```javascript\n// Replace direct model references like:\n// const model = \"perplexity-model-7b-online\" \n// With:\nconst model = getModelForRole('research');\nconst parameters = getParametersForRole('research');\n```\n\n3. For API key handling, use the resolveEnvVariable pattern:\n```javascript\nconst apiKey = resolveEnvVariable('PERPLEXITY_API_KEY');\n```\n\n4. When calling generateObjectService, pass the configuration-derived parameters:\n```javascript\nreturn generateObjectService({\n prompt: researchResults,\n schema: taskDescriptionSchema,\n role: 'taskDescription',\n // Config-driven parameters will be applied within generateObjectService\n});\n```\n\n5. Remove any hardcoded configuration values, ensuring all settings are retrieved from the centralized configuration system.\n",
"status": "done",
- "dependencies": ["61.23"],
+ "dependencies": [
+ "61.23"
+ ],
"parentTaskId": 61
},
{
@@ -3299,7 +3915,9 @@
"description": "Update the logic that calls the AI after using `generateComplexityAnalysisPrompt` in `ai-services.js` to use the new `generateObjectService` from `ai-services-unified.js` with a Zod schema for the complexity report.",
"details": "\n\n\nThe complexity analysis AI call should be updated to align with the new configuration system architecture. When refactoring to use `generateObjectService`, implement the following changes:\n\n1. Replace direct model references with calls to the appropriate config getter:\n ```javascript\n const modelName = getComplexityAnalysisModel(); // Use the specific getter from config-manager.js\n ```\n\n2. Retrieve AI parameters from the config system:\n ```javascript\n const temperature = getAITemperature('complexityAnalysis');\n const maxTokens = getAIMaxTokens('complexityAnalysis');\n ```\n\n3. When constructing the call to `generateObjectService`, pass these configuration values:\n ```javascript\n const result = await generateObjectService({\n prompt,\n schema: complexityReportSchema,\n modelName,\n temperature,\n maxTokens,\n sessionEnv: session?.env\n });\n ```\n\n4. Ensure API key resolution uses the `resolveEnvVariable` helper:\n ```javascript\n // Don't hardcode API keys or directly access process.env\n // The generateObjectService should handle this internally with resolveEnvVariable\n ```\n\n5. Add logging configuration based on settings:\n ```javascript\n const enableLogging = getAILoggingEnabled('complexityAnalysis');\n if (enableLogging) {\n // Use the logging mechanism defined in the configuration\n }\n ```\n",
"status": "done",
- "dependencies": ["61.23"],
+ "dependencies": [
+ "61.23"
+ ],
"parentTaskId": 61
},
{
@@ -3308,7 +3926,9 @@
"description": "Update the logic that calls the AI after using `_buildAddTaskPrompt` in `ai-services.js` to use the new `generateObjectService` from `ai-services-unified.js` with a Zod schema for the single task object.",
"details": "\n\n\nTo implement this refactoring, you'll need to:\n\n1. Replace direct AI calls with the new `generateObjectService` approach:\n ```javascript\n // OLD approach\n const aiResponse = await callLLM(prompt, modelName, temperature, maxTokens);\n const task = parseAIResponseToTask(aiResponse);\n \n // NEW approach using generateObjectService with config-manager\n import { generateObjectService } from '../services/ai-services-unified.js';\n import { getAIModelForRole, getAITemperature, getAIMaxTokens } from '../config/config-manager.js';\n import { taskSchema } from '../schemas/task-schema.js'; // Create this Zod schema for a single task\n \n const modelName = getAIModelForRole('taskCreation');\n const temperature = getAITemperature('taskCreation');\n const maxTokens = getAIMaxTokens('taskCreation');\n \n const task = await generateObjectService({\n prompt: _buildAddTaskPrompt(...),\n schema: taskSchema,\n modelName,\n temperature,\n maxTokens\n });\n ```\n\n2. Create a Zod schema for the task object in a new file `schemas/task-schema.js` that defines the expected structure.\n\n3. Ensure API key resolution uses the new pattern:\n ```javascript\n // This happens inside generateObjectService, but verify it uses:\n import { resolveEnvVariable } from '../config/config-manager.js';\n // Instead of direct process.env access\n ```\n\n4. Update any error handling to match the new service's error patterns.\n",
"status": "done",
- "dependencies": ["61.23"],
+ "dependencies": [
+ "61.23"
+ ],
"parentTaskId": 61
},
{
@@ -3317,7 +3937,9 @@
"description": "Refactor functions like `sendChatWithContext` (and potentially related task update functions in `task-manager.js` if they make direct AI calls) to use `streamTextService` or `generateTextService` from `ai-services-unified.js`.",
"details": "\n\n\nWhen refactoring `sendChatWithContext` and related functions, ensure they align with the new configuration system:\n\n1. Replace direct model references with config getter calls:\n ```javascript\n // Before\n const model = \"gpt-4\";\n \n // After\n import { getModelForRole } from './config-manager.js';\n const model = getModelForRole('chat'); // or appropriate role\n ```\n\n2. Extract AI parameters from config rather than hardcoding:\n ```javascript\n import { getAIParameters } from './config-manager.js';\n const { temperature, maxTokens } = getAIParameters('chat');\n ```\n\n3. When calling `streamTextService` or `generateTextService`, pass parameters from config:\n ```javascript\n await streamTextService({\n messages,\n model: getModelForRole('chat'),\n temperature: getAIParameters('chat').temperature,\n // other parameters as needed\n });\n ```\n\n4. For logging control, check config settings:\n ```javascript\n import { isLoggingEnabled } from './config-manager.js';\n \n if (isLoggingEnabled('aiCalls')) {\n console.log('AI request:', messages);\n }\n ```\n\n5. Ensure any default behaviors respect configuration defaults rather than hardcoded values.\n",
"status": "done",
- "dependencies": ["61.23"],
+ "dependencies": [
+ "61.23"
+ ],
"parentTaskId": 61
},
{
@@ -3335,7 +3957,9 @@
"description": "Refactor the AI call within `updateSubtaskById` in `task-manager.js` (which generates additional information based on a prompt) to use the appropriate unified service function (e.g., `generateTextService`) from `ai-services-unified.js`.",
"details": "\n\n\nThe `updateSubtaskById` function currently makes direct AI calls with hardcoded parameters. When refactoring to use the unified service:\n\n1. Replace direct OpenAI calls with `generateTextService` from `ai-services-unified.js`\n2. Use configuration parameters from `config-manager.js`:\n - Replace hardcoded model with `getMainModel()`\n - Use `getMainMaxTokens()` for token limits\n - Apply `getMainTemperature()` for response randomness\n3. Ensure prompt construction remains consistent but passes these dynamic parameters\n4. Handle API key resolution through the unified service (which uses `resolveEnvVariable`)\n5. Update error handling to work with the unified service response format\n6. If the function uses any logging, ensure it respects `getLoggingEnabled()` setting\n\nExample refactoring pattern:\n```javascript\n// Before\nconst completion = await openai.chat.completions.create({\n model: \"gpt-4\",\n temperature: 0.7,\n max_tokens: 1000,\n messages: [/* prompt messages */]\n});\n\n// After\nconst completion = await generateTextService({\n model: getMainModel(),\n temperature: getMainTemperature(),\n max_tokens: getMainMaxTokens(),\n messages: [/* prompt messages */]\n});\n```\n\n\n\n- When testing the non-streaming `generateTextService` call within `updateSubtaskById`, ensure that the function awaits the full response before proceeding with subtask updates. This allows you to validate that the unified service returns the expected structure (e.g., `completion.choices.message.content`) and that error handling logic correctly interprets any error objects or status codes returned by the service.\n\n- Mock or stub the `generateTextService` in unit tests to simulate both successful and failed completions. For example, verify that when the service returns a valid completion, the subtask is updated with the generated content, and when an error is returned, the error handling path is triggered and logged appropriately.\n\n- Confirm that the non-streaming mode does not emit partial results or require event-based handling; the function should only process the final, complete response.\n\n- Example test assertion:\n ```javascript\n // Mocked response from generateTextService\n const mockCompletion = {\n choices: [{ message: { content: \"Generated subtask details.\" } }]\n };\n generateTextService.mockResolvedValue(mockCompletion);\n\n // Call updateSubtaskById and assert the subtask is updated\n await updateSubtaskById(...);\n expect(subtask.details).toBe(\"Generated subtask details.\");\n ```\n\n- If the unified service supports both streaming and non-streaming modes, explicitly set or verify the `stream` parameter is `false` (or omitted) to ensure non-streaming behavior during these tests.\n\n\n\nWhen testing the non-streaming `generateTextService` call in `updateSubtaskById`, implement these verification steps:\n\n1. Add unit tests that verify proper parameter transformation between the old and new implementation:\n ```javascript\n test('should correctly transform parameters when calling generateTextService', async () => {\n // Setup mocks for config values\n jest.spyOn(configManager, 'getMainModel').mockReturnValue('gpt-4');\n jest.spyOn(configManager, 'getMainTemperature').mockReturnValue(0.7);\n jest.spyOn(configManager, 'getMainMaxTokens').mockReturnValue(1000);\n \n const generateTextServiceSpy = jest.spyOn(aiServices, 'generateTextService')\n .mockResolvedValue({ choices: [{ message: { content: 'test content' } }] });\n \n await updateSubtaskById(/* params */);\n \n // Verify the service was called with correct transformed parameters\n expect(generateTextServiceSpy).toHaveBeenCalledWith({\n model: 'gpt-4',\n temperature: 0.7,\n max_tokens: 1000,\n messages: expect.any(Array)\n });\n });\n ```\n\n2. Implement response validation to ensure the subtask content is properly extracted:\n ```javascript\n // In updateSubtaskById function\n try {\n const completion = await generateTextService({\n // parameters\n });\n \n // Validate response structure before using\n if (!completion?.choices?.[0]?.message?.content) {\n throw new Error('Invalid response structure from AI service');\n }\n \n // Continue with updating subtask\n } catch (error) {\n // Enhanced error handling\n }\n ```\n\n3. Add integration tests that verify the end-to-end flow with actual configuration values.\n\n\n\n\nWhen testing the non-streaming `generateTextService` call in `updateSubtaskById`, implement these specific verification steps:\n\n1. Create a dedicated test fixture that isolates the AI service interaction:\n ```javascript\n describe('updateSubtaskById AI integration', () => {\n beforeEach(() => {\n // Reset all mocks and spies\n jest.clearAllMocks();\n // Setup environment with controlled config values\n process.env.OPENAI_API_KEY = 'test-key';\n });\n \n // Test cases follow...\n });\n ```\n\n2. Test error propagation from the unified service:\n ```javascript\n test('should properly handle AI service errors', async () => {\n const mockError = new Error('Service unavailable');\n mockError.status = 503;\n jest.spyOn(aiServices, 'generateTextService').mockRejectedValue(mockError);\n \n // Capture console errors if needed\n const consoleSpy = jest.spyOn(console, 'error').mockImplementation();\n \n // Execute with error expectation\n await expect(updateSubtaskById(1, { prompt: 'test' })).rejects.toThrow();\n \n // Verify error was logged with appropriate context\n expect(consoleSpy).toHaveBeenCalledWith(\n expect.stringContaining('AI service error'),\n expect.objectContaining({ status: 503 })\n );\n });\n ```\n\n3. Verify that the function correctly preserves existing subtask content when appending new AI-generated information:\n ```javascript\n test('should preserve existing content when appending AI-generated details', async () => {\n // Setup mock subtask with existing content\n const mockSubtask = {\n id: 1,\n details: 'Existing details.\\n\\n'\n };\n \n // Mock database retrieval\n getSubtaskById.mockResolvedValue(mockSubtask);\n \n // Mock AI response\n generateTextService.mockResolvedValue({\n choices: [{ message: { content: 'New AI content.' } }]\n });\n \n await updateSubtaskById(1, { prompt: 'Enhance this subtask' });\n \n // Verify the update preserves existing content\n expect(updateSubtaskInDb).toHaveBeenCalledWith(\n 1,\n expect.objectContaining({\n details: expect.stringContaining('Existing details.\\n\\n {\n // Mock date for consistent testing\n const mockDate = new Date('2025-04-22T10:00:00Z');\n jest.spyOn(global, 'Date').mockImplementation(() => mockDate);\n \n // Setup and execute test\n // ...\n \n // Verify correct formatting\n expect(updateSubtaskInDb).toHaveBeenCalledWith(\n expect.any(Number),\n expect.objectContaining({\n details: expect.stringMatching(\n /\\n.*\\n<\\/info added on 2025-04-22T10:00:00\\.000Z>/s\n )\n })\n );\n });\n ```\n\n5. Verify that the function correctly handles the case when no existing details are present:\n ```javascript\n test('should handle subtasks with no existing details', async () => {\n // Setup mock subtask with no details\n const mockSubtask = { id: 1 };\n getSubtaskById.mockResolvedValue(mockSubtask);\n \n // Execute test\n // ...\n \n // Verify details were initialized properly\n expect(updateSubtaskInDb).toHaveBeenCalledWith(\n 1,\n expect.objectContaining({\n details: expect.stringMatching(/^\n",
"status": "done",
- "dependencies": ["61.23"],
+ "dependencies": [
+ "61.23"
+ ],
"parentTaskId": 61
},
{
@@ -3442,7 +4066,9 @@
"title": "Implement Integration Tests for Unified AI Service",
"description": "Implement integration tests for `ai-services-unified.js`. These tests should verify the correct routing to different provider modules based on configuration and ensure the unified service functions (`generateTextService`, `generateObjectService`, etc.) work correctly when called from modules like `task-manager.js`. [Updated: 5/2/2025] [Updated: 5/2/2025] [Updated: 5/2/2025] [Updated: 5/2/2025]",
"status": "done",
- "dependencies": ["61.18"],
+ "dependencies": [
+ "61.18"
+ ],
"details": "\n\n\nFor the integration tests of the Unified AI Service, consider the following implementation details:\n\n1. Setup test fixtures:\n - Create a mock `.taskmasterconfig` file with different provider configurations\n - Define test cases with various model selections and parameter settings\n - Use environment variable mocks only for API keys (e.g., `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`)\n\n2. Test configuration resolution:\n - Verify that `ai-services-unified.js` correctly retrieves settings from `config-manager.js`\n - Test that model selection follows the hierarchy defined in `.taskmasterconfig`\n - Ensure fallback mechanisms work when primary providers are unavailable\n\n3. Mock the provider modules:\n ```javascript\n jest.mock('../services/openai-service.js');\n jest.mock('../services/anthropic-service.js');\n ```\n\n4. Test specific scenarios:\n - Provider selection based on configured preferences\n - Parameter inheritance from config (temperature, maxTokens)\n - Error handling when API keys are missing\n - Proper routing when specific models are requested\n\n5. Verify integration with task-manager:\n ```javascript\n test('task-manager correctly uses unified AI service with config-based settings', async () => {\n // Setup mock config with specific settings\n mockConfigManager.getAIProviderPreference.mockReturnValue(['openai', 'anthropic']);\n mockConfigManager.getModelForRole.mockReturnValue('gpt-4');\n mockConfigManager.getParametersForModel.mockReturnValue({ temperature: 0.7, maxTokens: 2000 });\n \n // Verify task-manager uses these settings when calling the unified service\n // ...\n });\n ```\n\n6. Include tests for configuration changes at runtime and their effect on service behavior.\n\n\n\n]\n{\n \"id\": 31,\n \"title\": \"Implement Integration Test for Unified AI Service\",\n \"description\": \"Implement integration tests for `ai-services-unified.js`. These tests should verify the correct routing to different provider module based on configuration and ensure the unified service function (`generateTextService`, `generateObjectService`, etc.) work correctly when called from module like `task-manager.js`.\",\n \"details\": \"\\n\\n\\nFor the integration test of the Unified AI Service, consider the following implementation details:\\n\\n1. Setup test fixture:\\n - Create a mock `.taskmasterconfig` file with different provider configuration\\n - Define test case with various model selection and parameter setting\\n - Use environment variable mock only for API key (e.g., `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`)\\n\\n2. Test configuration resolution:\\n - Verify that `ai-services-unified.js` correctly retrieve setting from `config-manager.js`\\n - Test that model selection follow the hierarchy defined in `.taskmasterconfig`\\n - Ensure fallback mechanism work when primary provider are unavailable\\n\\n3. Mock the provider module:\\n ```javascript\\n jest.mock('../service/openai-service.js');\\n jest.mock('../service/anthropic-service.js');\\n ```\\n\\n4. Test specific scenario:\\n - Provider selection based on configured preference\\n - Parameter inheritance from config (temperature, maxToken)\\n - Error handling when API key are missing\\n - Proper routing when specific model are requested\\n\\n5. Verify integration with task-manager:\\n ```javascript\\n test('task-manager correctly use unified AI service with config-based setting', async () => {\\n // Setup mock config with specific setting\\n mockConfigManager.getAIProviderPreference.mockReturnValue(['openai', 'anthropic']);\\n mockConfigManager.getModelForRole.mockReturnValue('gpt-4');\\n mockConfigManager.getParameterForModel.mockReturnValue({ temperature: 0.7, maxToken: 2000 });\\n \\n // Verify task-manager use these setting when calling the unified service\\n // ...\\n });\\n ```\\n\\n6. Include test for configuration change at runtime and their effect on service behavior.\\n\\n[2024-01-15 10:30:45] A custom e2e script was created to test all the CLI command but that we'll need one to test the MCP too and that task 76 are dedicated to that\",\n \"status\": \"pending\",\n \"dependency\": [\n \"61.18\"\n ],\n \"parentTaskId\": 61\n}\n\n[2023-11-24 20:05:45] It's my birthday today\n[2023-11-24 20:05:46] add more low level details\n[2023-11-24 20:06:45] Additional low-level details for integration tests:\n\n- Ensure that each test case logs detailed output for each step, including configuration retrieval, provider selection, and API call results.\n- Implement a utility function to reset mocks and configurations between tests to avoid state leakage.\n- Use a combination of spies and mocks to verify that internal methods are called with expected arguments, especially for critical functions like `generateTextService`.\n- Consider edge cases such as empty configurations, invalid API keys, and network failures to ensure robustness.\n- Document each test case with expected outcomes and any assumptions made during the test design.\n- Leverage parallel test execution where possible to reduce test suite runtime, ensuring that tests are independent and do not interfere with each other.\n\n\nFor the integration tests of the Unified AI Service, consider the following implementation details:\n\n1. Setup test fixtures:\n - Create a mock `.taskmasterconfig` file with different provider configurations\n - Define test cases with various model selections and parameter settings\n - Use environment variable mocks only for API keys (e.g., `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`)\n\n2. Test configuration resolution:\n - Verify that `ai-services-unified.js` correctly retrieves settings from `config-manager.js`\n - Test that model selection follows the hierarchy defined in `.taskmasterconfig`\n - Ensure fallback mechanisms work when primary providers are unavailable\n\n3. Mock the provider modules:\n ```javascript\n jest.mock('../services/openai-service.js');\n jest.mock('../services/anthropic-service.js');\n ```\n\n4. Test specific scenarios:\n - Provider selection based on configured preferences\n - Parameter inheritance from config (temperature, maxTokens)\n - Error handling when API keys are missing\n - Proper routing when specific models are requested\n\n5. Verify integration with task-manager:\n ```javascript\n test('task-manager correctly uses unified AI service with config-based settings', async () => {\n // Setup mock config with specific settings\n mockConfigManager.getAIProviderPreference.mockReturnValue(['openai', 'anthropic']);\n mockConfigManager.getModelForRole.mockReturnValue('gpt-4');\n mockConfigManager.getParametersForModel.mockReturnValue({ temperature: 0.7, maxTokens: 2000 });\n \n // Verify task-manager uses these settings when calling the unified service\n // ...\n });\n ```\n\n6. Include tests for configuration changes at runtime and their effect on service behavior.\n\n\n\n]\n{\n \"id\": 31,\n \"title\": \"Implement Integration Test for Unified AI Service\",\n \"description\": \"Implement integration tests for `ai-services-unified.js`. These tests should verify the correct routing to different provider module based on configuration and ensure the unified service function (`generateTextService`, `generateObjectService`, etc.) work correctly when called from module like `task-manager.js`.\",\n \"details\": \"\\n\\n\\nFor the integration test of the Unified AI Service, consider the following implementation details:\\n\\n1. Setup test fixture:\\n - Create a mock `.taskmasterconfig` file with different provider configuration\\n - Define test case with various model selection and parameter setting\\n - Use environment variable mock only for API key (e.g., `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`)\\n\\n2. Test configuration resolution:\\n - Verify that `ai-services-unified.js` correctly retrieve setting from `config-manager.js`\\n - Test that model selection follow the hierarchy defined in `.taskmasterconfig`\\n - Ensure fallback mechanism work when primary provider are unavailable\\n\\n3. Mock the provider module:\\n ```javascript\\n jest.mock('../service/openai-service.js');\\n jest.mock('../service/anthropic-service.js');\\n ```\\n\\n4. Test specific scenario:\\n - Provider selection based on configured preference\\n - Parameter inheritance from config (temperature, maxToken)\\n - Error handling when API key are missing\\n - Proper routing when specific model are requested\\n\\n5. Verify integration with task-manager:\\n ```javascript\\n test('task-manager correctly use unified AI service with config-based setting', async () => {\\n // Setup mock config with specific setting\\n mockConfigManager.getAIProviderPreference.mockReturnValue(['openai', 'anthropic']);\\n mockConfigManager.getModelForRole.mockReturnValue('gpt-4');\\n mockConfigManager.getParameterForModel.mockReturnValue({ temperature: 0.7, maxToken: 2000 });\\n \\n // Verify task-manager use these setting when calling the unified service\\n // ...\\n });\\n ```\\n\\n6. Include test for configuration change at runtime and their effect on service behavior.\\n\\n[2024-01-15 10:30:45] A custom e2e script was created to test all the CLI command but that we'll need one to test the MCP too and that task 76 are dedicated to that\",\n \"status\": \"pending\",\n \"dependency\": [\n \"61.18\"\n ],\n \"parentTaskId\": 61\n}\n\n[2023-11-24 20:05:45] It's my birthday today\n[2023-11-24 20:05:46] add more low level details\n[2023-11-24 20:06:45] Additional low-level details for integration tests:\n\n- Ensure that each test case logs detailed output for each step, including configuration retrieval, provider selection, and API call results.\n- Implement a utility function to reset mocks and configurations between tests to avoid state leakage.\n- Use a combination of spies and mocks to verify that internal methods are called with expected arguments, especially for critical functions like `generateTextService`.\n- Consider edge cases such as empty configurations, invalid API keys, and network failures to ensure robustness.\n- Document each test case with expected outcomes and any assumptions made during the test design.\n- Leverage parallel test execution where possible to reduce test suite runtime, ensuring that tests are independent and do not interfere with each other.\n\n\n- Implement detailed logging for each API call, capturing request and response data to facilitate debugging.\n- Create a comprehensive test matrix to cover all possible combinations of provider configurations and model selections.\n- Use snapshot testing to verify that the output of `generateTextService` and `generateObjectService` remains consistent across code changes.\n- Develop a set of utility functions to simulate network latency and failures, ensuring the service handles such scenarios gracefully.\n- Regularly review and update test cases to reflect changes in the configuration management or provider APIs.\n- Ensure that all test data is anonymized and does not contain sensitive information.\n\n"
},
{
@@ -3451,7 +4077,9 @@
"description": "Update relevant documentation files (e.g., `architecture.mdc`, `taskmaster.mdc`, environment variable guides, README) to accurately reflect the new AI service architecture using `ai-services-unified.js`, provider modules, the Vercel AI SDK, and the updated configuration approach.",
"details": "\n\n\nThe new AI architecture introduces a clear separation between sensitive credentials and configuration settings:\n\n## Environment Variables vs Configuration File\n\n- **Environment Variables (.env)**: \n - Store only sensitive API keys and credentials\n - Accessed via `resolveEnvVariable()` which checks both process.env and session.env\n - Example: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`\n - No model names, parameters, or non-sensitive settings should be here\n\n- **.taskmasterconfig File**:\n - Central location for all non-sensitive configuration\n - Structured JSON with clear sections for different aspects of the system\n - Contains:\n - Model mappings by role (e.g., `systemModels`, `userModels`)\n - Default parameters (temperature, maxTokens, etc.)\n - Logging preferences\n - Provider-specific settings\n - Accessed via getter functions from `config-manager.js` like:\n ```javascript\n import { getModelForRole, getDefaultTemperature } from './config-manager.js';\n \n // Usage examples\n const model = getModelForRole('system');\n const temp = getDefaultTemperature();\n ```\n\n## Implementation Notes\n- Document the structure of `.taskmasterconfig` with examples\n- Explain the migration path for users with existing setups\n- Include a troubleshooting section for common configuration issues\n- Add a configuration validation section explaining how the system verifies settings\n",
"status": "done",
- "dependencies": ["61.31"],
+ "dependencies": [
+ "61.31"
+ ],
"parentTaskId": 61
},
{
@@ -3460,7 +4088,10 @@
"description": "After all other migration subtasks (refactoring, provider implementation, testing, documentation) are complete and verified, remove the old `ai-services.js` and `ai-client-factory.js` files from the `scripts/modules/` directory. Ensure no code still references them.",
"details": "\n\n\nI'll provide additional technical information to enhance the \"Cleanup Old AI Service Files\" subtask:\n\n## Implementation Details\n\n**Pre-Cleanup Verification Steps:**\n- Run a comprehensive codebase search for any remaining imports or references to `ai-services.js` and `ai-client-factory.js` using grep or your IDE's search functionality[1][4]\n- Check for any dynamic imports that might not be caught by static analysis tools\n- Verify that all dependent modules have been properly migrated to the new AI service architecture\n\n**Cleanup Process:**\n- Create a backup of the files before deletion in case rollback is needed\n- Document the file removal in the migration changelog with timestamps and specific file paths[5]\n- Update any build configuration files that might reference these files (webpack configs, etc.)\n- Run a full test suite after removal to ensure no runtime errors occur[2]\n\n**Post-Cleanup Validation:**\n- Implement automated tests to verify the application functions correctly without the removed files\n- Monitor application logs and error reporting systems for 48-72 hours after deployment to catch any missed dependencies[3]\n- Perform a final code review to ensure clean architecture principles are maintained in the new implementation\n\n**Technical Considerations:**\n- Check for any circular dependencies that might have been created during the migration process\n- Ensure proper garbage collection by removing any cached instances of the old services\n- Verify that performance metrics remain stable after the removal of legacy code\n",
"status": "done",
- "dependencies": ["61.31", "61.32"],
+ "dependencies": [
+ "61.31",
+ "61.32"
+ ],
"parentTaskId": 61
},
{
@@ -3596,7 +4227,9 @@
"id": 2,
"title": "Implement conditional logic to bypass AI processing",
"description": "Modify the update logic to check for the --simple flag and conditionally skip the AI processing pipeline when the flag is present.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "In the update handlers for both commands, add a condition to check if the --simple flag is set. If it is, create a path that bypasses the normal AI processing flow. This will require modifying the update functions to accept the flag parameter and branch the execution flow accordingly.",
"status": "pending",
"testStrategy": "Test that when the --simple flag is provided, the AI processing functions are not called, and when the flag is not provided, the normal AI processing flow is maintained."
@@ -3605,7 +4238,9 @@
"id": 3,
"title": "Format user input with timestamp for simple updates",
"description": "Implement functionality to format the user's direct text input with a timestamp in the same format as AI-processed updates when the --simple flag is used.",
- "dependencies": [2],
+ "dependencies": [
+ 2
+ ],
"details": "Create a utility function that takes the user's raw input text and prepends a timestamp in the same format used for AI-generated updates. This function should be called when the --simple flag is active. Ensure the timestamp format is consistent with the existing format used throughout the application.",
"status": "pending",
"testStrategy": "Verify that the timestamp format matches the AI-generated updates and that the user's text is preserved exactly as entered."
@@ -3614,7 +4249,9 @@
"id": 4,
"title": "Add visual indicator for manual updates",
"description": "Make simple updates visually distinguishable from AI-processed updates by adding a 'manual update' indicator or other visual differentiation.",
- "dependencies": [3],
+ "dependencies": [
+ 3
+ ],
"details": "Modify the update formatting to include a visual indicator (such as '[Manual Update]' prefix or different styling) when displaying updates that were created using the --simple flag. This will help users distinguish between AI-processed and manually entered updates.",
"status": "pending",
"testStrategy": "Check that updates made with the --simple flag are visually distinct from AI-processed updates when displayed in the task or subtask history."
@@ -3623,7 +4260,10 @@
"id": 5,
"title": "Implement storage of simple updates in history",
"description": "Ensure that updates made with the --simple flag are properly saved to the task or subtask's history in the same way as AI-processed updates.",
- "dependencies": [3, 4],
+ "dependencies": [
+ 3,
+ 4
+ ],
"details": "Modify the storage logic to save the formatted simple updates to the task or subtask history. The storage format should be consistent with AI-processed updates, but include the manual indicator. Ensure that the update is properly associated with the correct task or subtask.",
"status": "pending",
"testStrategy": "Test that updates made with the --simple flag are correctly saved to the history and persist between application restarts."
@@ -3632,7 +4272,9 @@
"id": 6,
"title": "Update help documentation for the new flag",
"description": "Update the help documentation for both update-task and update-subtask commands to include information about the new --simple flag.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Add clear descriptions of the --simple flag to the help text for both commands. The documentation should explain that the flag allows users to add timestamped notes without AI processing, directly using the text from the prompt. Include examples of how to use the flag.",
"status": "pending",
"testStrategy": "Verify that the help command correctly displays information about the --simple flag for both update commands."
@@ -3641,7 +4283,13 @@
"id": 7,
"title": "Implement integration tests for the simple update feature",
"description": "Create comprehensive integration tests to verify that the --simple flag works correctly in both commands and integrates properly with the rest of the system.",
- "dependencies": [1, 2, 3, 4, 5],
+ "dependencies": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5
+ ],
"details": "Develop integration tests that verify the entire flow of using the --simple flag with both update commands. Tests should confirm that updates are correctly formatted, stored, and displayed. Include edge cases such as empty input, very long input, and special characters.",
"status": "pending",
"testStrategy": "Run integration tests that simulate user input with and without the --simple flag and verify the correct behavior in each case."
@@ -3650,7 +4298,15 @@
"id": 8,
"title": "Perform final validation and documentation",
"description": "Conduct final validation of the feature across all use cases and update the user documentation to include the new functionality.",
- "dependencies": [1, 2, 3, 4, 5, 6, 7],
+ "dependencies": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7
+ ],
"details": "Perform end-to-end testing of the feature to ensure it works correctly in all scenarios. Update the user documentation with detailed information about the new --simple flag, including its purpose, how to use it, and examples. Ensure that the documentation clearly explains the difference between AI-processed updates and simple updates.",
"status": "pending",
"testStrategy": "Manually test all use cases and review documentation for completeness and clarity."
@@ -3680,7 +4336,9 @@
"id": 2,
"title": "Ensure Package Scripts Compatibility with pnpm",
"description": "Review and update package.json scripts to ensure they work seamlessly with pnpm's execution model. Confirm that any scripts responsible for showing a website or prompt during install behave identically with pnpm and npm. Ensure compatibility with 'module' package type and correct binary definitions.",
- "dependencies": [1],
+ "dependencies": [
+ 1
+ ],
"details": "Test all scripts using `pnpm run