Compare commits
126 Commits
v0.13-touc
...
v0.16.2-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cba86510d3 | ||
|
|
86ea6d1dbc | ||
|
|
a22d2a45b5 | ||
|
|
d73c8e17ec | ||
|
|
4f23751d25 | ||
|
|
7d5c028ca0 | ||
|
|
f18df6da19 | ||
|
|
1754a31372 | ||
|
|
3096ccdfb3 | ||
|
|
6464bb11e5 | ||
|
|
edaa5fe0d5 | ||
|
|
41d9dbbe6d | ||
|
|
6e0d866756 | ||
|
|
926aa61a4e | ||
|
|
9b4168bb4e | ||
|
|
ad612763ff | ||
|
|
293b59bac6 | ||
|
|
1809c4ed7b | ||
|
|
6e406958c1 | ||
|
|
074b7ec0bc | ||
|
|
e0438c8fb8 | ||
|
|
1f6694fb3d | ||
|
|
b0dfcf345e | ||
|
|
3f64202c9f | ||
|
|
669b744ced | ||
|
|
f058543888 | ||
|
|
acd5c1ea3d | ||
|
|
682b54e103 | ||
|
|
6a8a68e1a3 | ||
|
|
80735f9e60 | ||
|
|
48732d5423 | ||
|
|
2d520de269 | ||
|
|
b60e1cf835 | ||
|
|
d1e45ff50e | ||
|
|
1513858da4 | ||
|
|
59dcf4bd64 | ||
|
|
a09ba021c5 | ||
|
|
e906166141 | ||
|
|
231e569e84 | ||
|
|
09add37423 | ||
|
|
91fc779714 | ||
|
|
8c69c0aafd | ||
|
|
43ad75c7fa | ||
|
|
a59dd037cf | ||
|
|
3293c7858b | ||
|
|
b371808524 | ||
|
|
86d8f00af8 | ||
|
|
0c55ce0165 | ||
|
|
5a91941913 | ||
|
|
04af16de27 | ||
|
|
edf0f23005 | ||
|
|
e0e1155260 | ||
|
|
70f4054f26 | ||
|
|
34c769bcd0 | ||
|
|
34df2c8bbd | ||
|
|
5e9bc28abe | ||
|
|
d2e64318e2 | ||
|
|
4c835264ac | ||
|
|
c882f89a8c | ||
|
|
20e1b72a17 | ||
|
|
db631f43a5 | ||
|
|
3b9402f1f8 | ||
|
|
c8c0fc2a57 | ||
|
|
60b8e97a1c | ||
|
|
3a6d6dd671 | ||
|
|
f4a83ec047 | ||
|
|
0699f64299 | ||
|
|
60b8f5faa3 | ||
|
|
cd6e42249e | ||
|
|
fcd80623b6 | ||
|
|
026815353f | ||
|
|
8a3b611fc2 | ||
|
|
6ba42b53dc | ||
|
|
3e304232ab | ||
|
|
70fa5b0031 | ||
|
|
314c0de8c4 | ||
|
|
58b417a8ce | ||
|
|
a8dabf4485 | ||
|
|
bc19bc7927 | ||
|
|
da317f2607 | ||
|
|
ed17cb0e0a | ||
|
|
e96734a6cc | ||
|
|
17294ff259 | ||
|
|
a96215a359 | ||
|
|
0a611843b5 | ||
|
|
a1f8d52474 | ||
|
|
da636f6681 | ||
|
|
ca5ec03cd8 | ||
|
|
c47deeb869 | ||
|
|
dd90c9cb5d | ||
|
|
c7042845d6 | ||
|
|
79a41543d5 | ||
|
|
efce37469b | ||
|
|
4117f71c18 | ||
|
|
9f4bac8d6a | ||
|
|
e53d5e1577 | ||
|
|
59230c4d91 | ||
|
|
04b6a3cb21 | ||
|
|
37178ff1b9 | ||
|
|
bbc8b9cc1f | ||
|
|
c955431753 | ||
|
|
21c3cb8cda | ||
|
|
ab84afd036 | ||
|
|
f89d2aacc0 | ||
|
|
0288311965 | ||
|
|
8ae772086d | ||
|
|
2b3ae8bf89 | ||
|
|
245c3cb398 | ||
|
|
09d839fff5 | ||
|
|
90068348d3 | ||
|
|
02e347d2d7 | ||
|
|
0527c363e3 | ||
|
|
735135efe9 | ||
|
|
4fee667a05 | ||
|
|
01963af2cb | ||
|
|
0633895f3b | ||
|
|
10442c1119 | ||
|
|
734a4fdcfc | ||
|
|
8dace2186c | ||
|
|
095e373843 | ||
|
|
0bc9bac392 | ||
|
|
0a45f4329c | ||
|
|
c4b2f7e514 | ||
|
|
9684beafc3 | ||
|
|
302b916045 | ||
|
|
e7f18f65b9 |
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
- Add support for Google Gemini models via Vercel AI SDK integration.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Add xAI provider and Grok models support
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
feat(expand): Enhance `expand` and `expand-all` commands
|
|
||||||
|
|
||||||
- Integrate `task-complexity-report.json` to automatically determine the number of subtasks and use tailored prompts for expansion based on prior analysis. You no longer need to try copy-pasting the recommended prompt. If it exists, it will use it for you. You can just run `task-master update --id=[id of task] --research` and it will use that prompt automatically. No extra prompt needed.
|
|
||||||
- Change default behavior to *append* new subtasks to existing ones. Use the `--force` flag to clear existing subtasks before expanding. This is helpful if you need to add more subtasks to a task but you want to do it by the batch from a given prompt. Use force if you want to start fresh with a task's subtasks.
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Better support for file paths on Windows, Linux & WSL.
|
|
||||||
|
|
||||||
- Standardizes handling of different path formats (URI encoded, Windows, Linux, WSL).
|
|
||||||
- Ensures tools receive a clean, absolute path suitable for the server OS.
|
|
||||||
- Simplifies tool implementation by centralizing normalization logic.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Adds support for the OpenRouter AI provider. Users can now configure models available through OpenRouter (requiring an `OPENROUTER_API_KEY`) via the `task-master models` command, granting access to a wide range of additional LLMs.
|
|
||||||
- IMPORTANT FYI ABOUT OPENROUTER: Taskmaster relies on AI SDK, which itself relies on tool use. It looks like **free** models sometimes do not include tool use. For example, Gemini 2.5 pro (free) failed via OpenRouter (no tool use) but worked fine on the paid version of the model. Custom model support for Open Router is considered experimental and likely will not be further improved for some time.
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Add integration for Roo Code
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Improved update-subtask
|
|
||||||
- Now it has context about the parent task details
|
|
||||||
- It also has context about the subtask before it and the subtask after it (if they exist)
|
|
||||||
- Not passing all subtasks to stay token efficient
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Improve and adjust `init` command for robustness and updated dependencies.
|
|
||||||
|
|
||||||
- **Update Initialization Dependencies:** Ensure newly initialized projects (`task-master init`) include all required AI SDK dependencies (`@ai-sdk/*`, `ai`, provider wrappers) in their `package.json` for out-of-the-box AI feature compatibility. Remove unnecessary dependencies (e.g., `uuid`) from the init template.
|
|
||||||
- **Silence `npm install` during `init`:** Prevent `npm install` output from interfering with non-interactive/MCP initialization by suppressing its stdio in silent mode.
|
|
||||||
- **Improve Conditional Model Setup:** Reliably skip interactive `models --setup` during non-interactive `init` runs (e.g., `init -y` or MCP) by checking `isSilentMode()` instead of passing flags.
|
|
||||||
- **Refactor `init.js`:** Remove internal `isInteractive` flag logic.
|
|
||||||
- **Update `init` Instructions:** Tweak the "Getting Started" text displayed after `init`.
|
|
||||||
- **Fix MCP Server Launch:** Update `.cursor/mcp.json` template to use `node ./mcp-server/server.js` instead of `npx task-master-mcp`.
|
|
||||||
- **Update Default Model:** Change the default main model in the `.taskmasterconfig` template.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Fixes an issue with add-task which did not use the manually defined properties and still needlessly hit the AI endpoint.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Adds model management and new configuration file .taskmasterconfig which houses the models used for main, research and fallback. Adds models command and setter flags. Adds a --setup flag with an interactive setup. We should be calling this during init. Shows a table of active and available models when models is called without flags. Includes SWE scores and token costs, which are manually entered into the supported_models.json, the new place where models are defined for support. Config-manager.js is the core module responsible for managing the new config."
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Fixes an issue that prevented remove-subtask with comma separated tasks/subtasks from being deleted (only the first ID was being deleted). Closes #140
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Improves next command to be subtask-aware
|
|
||||||
- The logic for determining the "next task" (findNextTask function, used by task-master next and the next_task MCP tool) has been significantly improved. Previously, it only considered top-level tasks, making its recommendation less useful when a parent task containing subtasks was already marked 'in-progress'.
|
|
||||||
- The updated logic now prioritizes finding the next available subtask within any 'in-progress' parent task, considering subtask dependencies and priority.
|
|
||||||
- If no suitable subtask is found within active parent tasks, it falls back to recommending the next eligible top-level task based on the original criteria (status, dependencies, priority).
|
|
||||||
|
|
||||||
This change makes the next command much more relevant and helpful during the implementation phase of complex tasks.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Adds custom model ID support for Ollama and OpenRouter providers.
|
|
||||||
- Adds the `--ollama` and `--openrouter` flags to `task-master models --set-<role>` command to set models for those providers outside of the support models list.
|
|
||||||
- Updated `task-master models --setup` interactive mode with options to explicitly enter custom Ollama or OpenRouter model IDs.
|
|
||||||
- Implemented live validation against OpenRouter API (`/api/v1/models`) when setting a custom OpenRouter model ID (via flag or setup).
|
|
||||||
- Refined logic to prioritize explicit provider flags/choices over internal model list lookups in case of ID conflicts.
|
|
||||||
- Added warnings when setting custom/unvalidated models.
|
|
||||||
- We obviously don't recommend going with a custom, unproven model. If you do and find performance is good, please let us know so we can add it to the list of supported models.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Add `--status` flag to `show` command to filter displayed subtasks.
|
|
||||||
7
.changeset/pink-houses-lay.md
Normal file
7
.changeset/pink-houses-lay.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix double .taskmaster directory paths in file resolution utilities
|
||||||
|
|
||||||
|
- Closes #636
|
||||||
5
.changeset/polite-areas-shave.md
Normal file
5
.changeset/polite-areas-shave.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add one-click MCP server installation for Cursor
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': minor
|
|
||||||
---
|
|
||||||
|
|
||||||
Integrate OpenAI as a new AI provider.
|
|
||||||
- Enhance `models` command/tool to display API key status.
|
|
||||||
- Implement model-specific `maxTokens` override based on `supported-models.json` to save you if you use an incorrect max token value.
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': minor
|
|
||||||
---
|
|
||||||
Tweaks Perplexity AI calls for research mode to max out input tokens and get day-fresh information
|
|
||||||
- Forces temp at 0.1 for highly deterministic output, no variations
|
|
||||||
- Adds a system prompt to further improve the output
|
|
||||||
- Correctly uses the maximum input tokens (8,719, used 8,700) for perplexity
|
|
||||||
- Specificies to use a high degree of research across the web
|
|
||||||
- Specifies to use information that is as fresh as today; this support stuff like capturing brand new announcements like new GPT models and being able to query for those in research. 🔥
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Fix --task to --num-tasks in ui + related tests - issue #324
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
'task-master-ai': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Adds a 'models' CLI and MCP command to get the current model configuration, available models, and gives the ability to set main/research/fallback models."
|
|
||||||
- In the CLI, `task-master models` shows the current models config. Using the `--setup` flag launches an interactive set up that allows you to easily select the models you want to use for each of the three roles. Use `q` during the interactive setup to cancel the setup.
|
|
||||||
- In the MCP, responses are simplified in RESTful format (instead of the full CLI output). The agent can use the `models` tool with different arguments, including `listAvailableModels` to get available models. Run without arguments, it will return the current configuration. Arguments are available to set the model for each of the three roles. This allows you to manage Taskmaster AI providers and models directly from either the CLI or MCP or both.
|
|
||||||
- Updated the CLI help menu when you run `task-master` to include missing commands and .taskmasterconfig information.
|
|
||||||
- Adds `--research` flag to `add-task` so you can hit up Perplexity right from the add-task flow, rather than having to add a task and then update it.
|
|
||||||
@@ -25,6 +25,7 @@ This document outlines the architecture and usage patterns for interacting with
|
|||||||
* Implements **retry logic** for specific API errors (`_attemptProviderCallWithRetries`).
|
* Implements **retry logic** for specific API errors (`_attemptProviderCallWithRetries`).
|
||||||
* Resolves API keys automatically via `_resolveApiKey` (using `resolveEnvVariable`).
|
* Resolves API keys automatically via `_resolveApiKey` (using `resolveEnvVariable`).
|
||||||
* Maps requests to the correct provider implementation (in `src/ai-providers/`) via `PROVIDER_FUNCTIONS`.
|
* Maps requests to the correct provider implementation (in `src/ai-providers/`) via `PROVIDER_FUNCTIONS`.
|
||||||
|
* Returns a structured object containing the primary AI result (`mainResult`) and telemetry data (`telemetryData`). See [`telemetry.mdc`](mdc:.cursor/rules/telemetry.mdc) for details on how this telemetry data is propagated and handled.
|
||||||
|
|
||||||
* **Provider Implementations (`src/ai-providers/*.js`):**
|
* **Provider Implementations (`src/ai-providers/*.js`):**
|
||||||
* Contain provider-specific wrappers around Vercel AI SDK functions (`generateText`, `generateObject`).
|
* Contain provider-specific wrappers around Vercel AI SDK functions (`generateText`, `generateObject`).
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ alwaysApply: false
|
|||||||
- Resolves API keys (from `.env` or `session.env`).
|
- Resolves API keys (from `.env` or `session.env`).
|
||||||
- Implements fallback and retry logic.
|
- Implements fallback and retry logic.
|
||||||
- Orchestrates calls to provider-specific implementations (`src/ai-providers/`).
|
- Orchestrates calls to provider-specific implementations (`src/ai-providers/`).
|
||||||
|
- Telemetry data generated by the AI service layer is propagated upwards through core logic, direct functions, and MCP tools. See [`telemetry.mdc`](mdc:.cursor/rules/telemetry.mdc) for the detailed integration pattern.
|
||||||
|
|
||||||
- **[`src/ai-providers/*.js`](mdc:src/ai-providers/): Provider-Specific Implementations**
|
- **[`src/ai-providers/*.js`](mdc:src/ai-providers/): Provider-Specific Implementations**
|
||||||
- **Purpose**: Provider-specific wrappers for Vercel AI SDK functions.
|
- **Purpose**: Provider-specific wrappers for Vercel AI SDK functions.
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ Task Master offers two primary ways to interact:
|
|||||||
- Maintain valid dependency structure with `add_dependency`/`remove_dependency` tools or `task-master add-dependency`/`remove-dependency` commands, `validate_dependencies` / `task-master validate-dependencies`, and `fix_dependencies` / `task-master fix-dependencies` (see [`taskmaster.mdc`](mdc:.cursor/rules/taskmaster.mdc)) when needed
|
- Maintain valid dependency structure with `add_dependency`/`remove_dependency` tools or `task-master add-dependency`/`remove-dependency` commands, `validate_dependencies` / `task-master validate-dependencies`, and `fix_dependencies` / `task-master fix-dependencies` (see [`taskmaster.mdc`](mdc:.cursor/rules/taskmaster.mdc)) when needed
|
||||||
- Respect dependency chains and task priorities when selecting work
|
- Respect dependency chains and task priorities when selecting work
|
||||||
- Report progress regularly using `get_tasks` / `task-master list`
|
- Report progress regularly using `get_tasks` / `task-master list`
|
||||||
|
- Reorganize tasks as needed using `move_task` / `task-master move --from=<id> --to=<id>` (see [`taskmaster.mdc`](mdc:.cursor/rules/taskmaster.mdc)) to change task hierarchy or ordering
|
||||||
|
|
||||||
## Task Complexity Analysis
|
## Task Complexity Analysis
|
||||||
|
|
||||||
@@ -103,7 +104,7 @@ Task Master offers two primary ways to interact:
|
|||||||
|
|
||||||
Taskmaster configuration is managed through two main mechanisms:
|
Taskmaster configuration is managed through two main mechanisms:
|
||||||
|
|
||||||
1. **`.taskmasterconfig` File (Primary):**
|
1. **`.taskmaster/config.json` File (Primary):**
|
||||||
* Located in the project root directory.
|
* Located in the project root directory.
|
||||||
* Stores most configuration settings: AI model selections (main, research, fallback), parameters (max tokens, temperature), logging level, default subtasks/priority, project name, etc.
|
* Stores most configuration settings: AI model selections (main, research, fallback), parameters (max tokens, temperature), logging level, default subtasks/priority, project name, etc.
|
||||||
* **Managed via `task-master models --setup` command.** Do not edit manually unless you know what you are doing.
|
* **Managed via `task-master models --setup` command.** Do not edit manually unless you know what you are doing.
|
||||||
@@ -116,7 +117,7 @@ Taskmaster configuration is managed through two main mechanisms:
|
|||||||
* For MCP/Cursor integration, configure these keys in the `env` section of `.cursor/mcp.json`.
|
* For MCP/Cursor integration, configure these keys in the `env` section of `.cursor/mcp.json`.
|
||||||
* Available keys/variables: See `assets/env.example` or the Configuration section in the command reference (previously linked to `taskmaster.mdc`).
|
* Available keys/variables: See `assets/env.example` or the Configuration section in the command reference (previously linked to `taskmaster.mdc`).
|
||||||
|
|
||||||
**Important:** Non-API key settings (like model selections, `MAX_TOKENS`, `LOG_LEVEL`) are **no longer configured via environment variables**. Use the `task-master models` command (or `--setup` for interactive configuration) or the `models` MCP tool.
|
**Important:** Non-API key settings (like model selections, `MAX_TOKENS`, `TASKMASTER_LOG_LEVEL`) are **no longer configured via environment variables**. Use the `task-master models` command (or `--setup` for interactive configuration) or the `models` MCP tool.
|
||||||
**If AI commands FAIL in MCP** verify that the API key for the selected provider is present in the `env` section of `.cursor/mcp.json`.
|
**If AI commands FAIL in MCP** verify that the API key for the selected provider is present in the `env` section of `.cursor/mcp.json`.
|
||||||
**If AI commands FAIL in CLI** verify that the API key for the selected provider is present in the `.env` file in the root of the project.
|
**If AI commands FAIL in CLI** verify that the API key for the selected provider is present in the `.env` file in the root of the project.
|
||||||
|
|
||||||
@@ -154,6 +155,25 @@ Taskmaster configuration is managed through two main mechanisms:
|
|||||||
- Task files are automatically regenerated after dependency changes
|
- Task files are automatically regenerated after dependency changes
|
||||||
- Dependencies are visualized with status indicators in task listings and files
|
- Dependencies are visualized with status indicators in task listings and files
|
||||||
|
|
||||||
|
## Task Reorganization
|
||||||
|
|
||||||
|
- Use `move_task` / `task-master move --from=<id> --to=<id>` to move tasks or subtasks within the hierarchy
|
||||||
|
- This command supports several use cases:
|
||||||
|
- Moving a standalone task to become a subtask (e.g., `--from=5 --to=7`)
|
||||||
|
- Moving a subtask to become a standalone task (e.g., `--from=5.2 --to=7`)
|
||||||
|
- Moving a subtask to a different parent (e.g., `--from=5.2 --to=7.3`)
|
||||||
|
- Reordering subtasks within the same parent (e.g., `--from=5.2 --to=5.4`)
|
||||||
|
- Moving a task to a new, non-existent ID position (e.g., `--from=5 --to=25`)
|
||||||
|
- Moving multiple tasks at once using comma-separated IDs (e.g., `--from=10,11,12 --to=16,17,18`)
|
||||||
|
- The system includes validation to prevent data loss:
|
||||||
|
- Allows moving to non-existent IDs by creating placeholder tasks
|
||||||
|
- Prevents moving to existing task IDs that have content (to avoid overwriting)
|
||||||
|
- Validates source tasks exist before attempting to move them
|
||||||
|
- The system maintains proper parent-child relationships and dependency integrity
|
||||||
|
- Task files are automatically regenerated after the move operation
|
||||||
|
- This provides greater flexibility in organizing and refining your task structure as project understanding evolves
|
||||||
|
- This is especially useful when dealing with potential merge conflicts arising from teams creating tasks on separate branches. Solve these conflicts very easily by moving your tasks and keeping theirs.
|
||||||
|
|
||||||
## Iterative Subtask Implementation
|
## Iterative Subtask Implementation
|
||||||
|
|
||||||
Once a task has been broken down into subtasks using `expand_task` or similar methods, follow this iterative process for implementation:
|
Once a task has been broken down into subtasks using `expand_task` or similar methods, follow this iterative process for implementation:
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ description: Glossary of other Cursor rules
|
|||||||
globs: **/*
|
globs: **/*
|
||||||
alwaysApply: true
|
alwaysApply: true
|
||||||
---
|
---
|
||||||
|
|
||||||
# Glossary of Task Master Cursor Rules
|
# Glossary of Task Master Cursor Rules
|
||||||
|
|
||||||
This file provides a quick reference to the purpose of each rule file located in the `.cursor/rules` directory.
|
This file provides a quick reference to the purpose of each rule file located in the `.cursor/rules` directory.
|
||||||
@@ -23,4 +22,5 @@ This file provides a quick reference to the purpose of each rule file located in
|
|||||||
- **[`tests.mdc`](mdc:.cursor/rules/tests.mdc)**: Guidelines for implementing and maintaining tests for Task Master CLI.
|
- **[`tests.mdc`](mdc:.cursor/rules/tests.mdc)**: Guidelines for implementing and maintaining tests for Task Master CLI.
|
||||||
- **[`ui.mdc`](mdc:.cursor/rules/ui.mdc)**: Guidelines for implementing and maintaining user interface components.
|
- **[`ui.mdc`](mdc:.cursor/rules/ui.mdc)**: Guidelines for implementing and maintaining user interface components.
|
||||||
- **[`utilities.mdc`](mdc:.cursor/rules/utilities.mdc)**: Guidelines for implementing utility functions.
|
- **[`utilities.mdc`](mdc:.cursor/rules/utilities.mdc)**: Guidelines for implementing utility functions.
|
||||||
|
- **[`telemetry.mdc`](mdc:.cursor/rules/telemetry.mdc)**: Guidelines for integrating AI usage telemetry across Task Master.
|
||||||
|
|
||||||
|
|||||||
@@ -522,3 +522,8 @@ Follow these steps to add MCP support for an existing Task Master command (see [
|
|||||||
// Add more functions as implemented
|
// Add more functions as implemented
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Telemetry Integration
|
||||||
|
|
||||||
|
- Direct functions calling core logic that involves AI should receive and pass through `telemetryData` within their successful `data` payload. See [`telemetry.mdc`](mdc:.cursor/rules/telemetry.mdc) for the standard pattern.
|
||||||
|
- MCP tools use `handleApiResult`, which ensures the `data` object (potentially including `telemetryData`) from the direct function is correctly included in the final response.
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ description: Guidelines for integrating new features into the Task Master CLI
|
|||||||
globs: scripts/modules/*.js
|
globs: scripts/modules/*.js
|
||||||
alwaysApply: false
|
alwaysApply: false
|
||||||
---
|
---
|
||||||
|
|
||||||
# Task Master Feature Integration Guidelines
|
# Task Master Feature Integration Guidelines
|
||||||
|
|
||||||
## Feature Placement Decision Process
|
## Feature Placement Decision Process
|
||||||
@@ -196,6 +195,8 @@ The standard pattern for adding a feature follows this workflow:
|
|||||||
- ✅ **DO**: If an MCP tool fails with vague errors (e.g., JSON parsing issues like `Unexpected token ... is not valid JSON`), **try running the equivalent CLI command directly in the terminal** (e.g., `task-master expand --all`). CLI output often provides much more specific error messages (like missing function definitions or stack traces from the core logic) that pinpoint the root cause.
|
- ✅ **DO**: If an MCP tool fails with vague errors (e.g., JSON parsing issues like `Unexpected token ... is not valid JSON`), **try running the equivalent CLI command directly in the terminal** (e.g., `task-master expand --all`). CLI output often provides much more specific error messages (like missing function definitions or stack traces from the core logic) that pinpoint the root cause.
|
||||||
- ❌ **DON'T**: Rely solely on MCP logs if the error is unclear; use the CLI as a complementary debugging tool for core logic issues.
|
- ❌ **DON'T**: Rely solely on MCP logs if the error is unclear; use the CLI as a complementary debugging tool for core logic issues.
|
||||||
|
|
||||||
|
- **Telemetry Integration**: Ensure AI calls correctly handle and propagate `telemetryData` as described in [`telemetry.mdc`](mdc:.cursor/rules/telemetry.mdc).
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// 1. CORE LOGIC: Add function to appropriate module (example in task-manager.js)
|
// 1. CORE LOGIC: Add function to appropriate module (example in task-manager.js)
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
|
|||||||
* `addAliases`: `Add shell aliases tm and taskmaster. Default is false.` (CLI: `--aliases`)
|
* `addAliases`: `Add shell aliases tm and taskmaster. Default is false.` (CLI: `--aliases`)
|
||||||
* `yes`: `Skip prompts and use defaults/provided arguments. Default is false.` (CLI: `-y, --yes`)
|
* `yes`: `Skip prompts and use defaults/provided arguments. Default is false.` (CLI: `-y, --yes`)
|
||||||
* **Usage:** Run this once at the beginning of a new project, typically via an integrated tool like Cursor. Operates on the current working directory of the MCP server.
|
* **Usage:** Run this once at the beginning of a new project, typically via an integrated tool like Cursor. Operates on the current working directory of the MCP server.
|
||||||
* **Important:** Once complete, you *MUST* parse a prd in order to generate tasks. There will be no tasks files until then. The next step after initializing should be to create a PRD using the example PRD in scripts/example_prd.txt.
|
* **Important:** Once complete, you *MUST* parse a prd in order to generate tasks. There will be no tasks files until then. The next step after initializing should be to create a PRD using the example PRD in .taskmaster/templates/example_prd.txt.
|
||||||
|
|
||||||
### 2. Parse PRD (`parse_prd`)
|
### 2. Parse PRD (`parse_prd`)
|
||||||
|
|
||||||
@@ -45,12 +45,12 @@ This document provides a detailed reference for interacting with Taskmaster, cov
|
|||||||
* **Description:** `Parse a Product Requirements Document, PRD, or text file with Taskmaster to automatically generate an initial set of tasks in tasks.json.`
|
* **Description:** `Parse a Product Requirements Document, PRD, or text file with Taskmaster to automatically generate an initial set of tasks in tasks.json.`
|
||||||
* **Key Parameters/Options:**
|
* **Key Parameters/Options:**
|
||||||
* `input`: `Path to your PRD or requirements text file that Taskmaster should parse for tasks.` (CLI: `[file]` positional or `-i, --input <file>`)
|
* `input`: `Path to your PRD or requirements text file that Taskmaster should parse for tasks.` (CLI: `[file]` positional or `-i, --input <file>`)
|
||||||
* `output`: `Specify where Taskmaster should save the generated 'tasks.json' file. Defaults to 'tasks/tasks.json'.` (CLI: `-o, --output <file>`)
|
* `output`: `Specify where Taskmaster should save the generated 'tasks.json' file. Defaults to '.taskmaster/tasks/tasks.json'.` (CLI: `-o, --output <file>`)
|
||||||
* `numTasks`: `Approximate number of top-level tasks Taskmaster should aim to generate from the document.` (CLI: `-n, --num-tasks <number>`)
|
* `numTasks`: `Approximate number of top-level tasks Taskmaster should aim to generate from the document.` (CLI: `-n, --num-tasks <number>`)
|
||||||
* `force`: `Use this to allow Taskmaster to overwrite an existing 'tasks.json' without asking for confirmation.` (CLI: `-f, --force`)
|
* `force`: `Use this to allow Taskmaster to overwrite an existing 'tasks.json' without asking for confirmation.` (CLI: `-f, --force`)
|
||||||
* **Usage:** Useful for bootstrapping a project from an existing requirements document.
|
* **Usage:** Useful for bootstrapping a project from an existing requirements document.
|
||||||
* **Notes:** Task Master will strictly adhere to any specific requirements mentioned in the PRD, such as libraries, database schemas, frameworks, tech stacks, etc., while filling in any gaps where the PRD isn't fully specified. Tasks are designed to provide the most direct implementation path while avoiding over-engineering.
|
* **Notes:** Task Master will strictly adhere to any specific requirements mentioned in the PRD, such as libraries, database schemas, frameworks, tech stacks, etc., while filling in any gaps where the PRD isn't fully specified. Tasks are designed to provide the most direct implementation path while avoiding over-engineering.
|
||||||
* **Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress. If the user does not have a PRD, suggest discussing their idea and then use the example PRD in `scripts/example_prd.txt` as a template for creating the PRD based on their idea, for use with `parse-prd`.
|
* **Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress. If the user does not have a PRD, suggest discussing their idea and then use the example PRD in `.taskmaster/templates/example_prd.txt` as a template for creating the PRD based on their idea, for use with `parse-prd`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -77,10 +77,10 @@ This document provides a detailed reference for interacting with Taskmaster, cov
|
|||||||
* `--setup`: `Run interactive setup to configure models, including custom Ollama/OpenRouter IDs.`
|
* `--setup`: `Run interactive setup to configure models, including custom Ollama/OpenRouter IDs.`
|
||||||
* **Usage (MCP):** Call without set flags to get current config. Use `setMain`, `setResearch`, or `setFallback` with a valid model ID to update the configuration. Use `listAvailableModels: true` to get a list of unassigned models. To set a custom model, provide the model ID and set `ollama: true` or `openrouter: true`.
|
* **Usage (MCP):** Call without set flags to get current config. Use `setMain`, `setResearch`, or `setFallback` with a valid model ID to update the configuration. Use `listAvailableModels: true` to get a list of unassigned models. To set a custom model, provide the model ID and set `ollama: true` or `openrouter: true`.
|
||||||
* **Usage (CLI):** Run without flags to view current configuration and available models. Use set flags to update specific roles. Use `--setup` for guided configuration, including custom models. To set a custom model via flags, use `--set-<role>=<model_id>` along with either `--ollama` or `--openrouter`.
|
* **Usage (CLI):** Run without flags to view current configuration and available models. Use set flags to update specific roles. Use `--setup` for guided configuration, including custom models. To set a custom model via flags, use `--set-<role>=<model_id>` along with either `--ollama` or `--openrouter`.
|
||||||
* **Notes:** Configuration is stored in `.taskmasterconfig` in the project root. This command/tool modifies that file. Use `listAvailableModels` or `task-master models` to see internally supported models. OpenRouter custom models are validated against their live API. Ollama custom models are not validated live.
|
* **Notes:** Configuration is stored in `.taskmaster/config.json` in the project root. This command/tool modifies that file. Use `listAvailableModels` or `task-master models` to see internally supported models. OpenRouter custom models are validated against their live API. Ollama custom models are not validated live.
|
||||||
* **API note:** API keys for selected AI providers (based on their model) need to exist in the mcp.json file to be accessible in MCP context. The API keys must be present in the local .env file for the CLI to be able to read them.
|
* **API note:** API keys for selected AI providers (based on their model) need to exist in the mcp.json file to be accessible in MCP context. The API keys must be present in the local .env file for the CLI to be able to read them.
|
||||||
* **Model costs:** The costs in supported models are expressed in dollars. An input/output value of 3 is $3.00. A value of 0.8 is $0.80.
|
* **Model costs:** The costs in supported models are expressed in dollars. An input/output value of 3 is $3.00. A value of 0.8 is $0.80.
|
||||||
* **Warning:** DO NOT MANUALLY EDIT THE .taskmasterconfig FILE. Use the included commands either in the MCP or CLI format as needed. Always prioritize MCP tools when available and use the CLI as a fallback.
|
* **Warning:** DO NOT MANUALLY EDIT THE .taskmaster/config.json FILE. Use the included commands either in the MCP or CLI format as needed. Always prioritize MCP tools when available and use the CLI as a fallback.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -269,11 +269,36 @@ This document provides a detailed reference for interacting with Taskmaster, cov
|
|||||||
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
|
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
|
||||||
* **Usage:** Delete unnecessary subtasks or promote a subtask to a top-level task.
|
* **Usage:** Delete unnecessary subtasks or promote a subtask to a top-level task.
|
||||||
|
|
||||||
|
### 17. Move Task (`move_task`)
|
||||||
|
|
||||||
|
* **MCP Tool:** `move_task`
|
||||||
|
* **CLI Command:** `task-master move [options]`
|
||||||
|
* **Description:** `Move a task or subtask to a new position within the task hierarchy.`
|
||||||
|
* **Key Parameters/Options:**
|
||||||
|
* `from`: `Required. ID of the task/subtask to move (e.g., "5" or "5.2"). Can be comma-separated for multiple tasks.` (CLI: `--from <id>`)
|
||||||
|
* `to`: `Required. ID of the destination (e.g., "7" or "7.3"). Must match the number of source IDs if comma-separated.` (CLI: `--to <id>`)
|
||||||
|
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
|
||||||
|
* **Usage:** Reorganize tasks by moving them within the hierarchy. Supports various scenarios like:
|
||||||
|
* Moving a task to become a subtask
|
||||||
|
* Moving a subtask to become a standalone task
|
||||||
|
* Moving a subtask to a different parent
|
||||||
|
* Reordering subtasks within the same parent
|
||||||
|
* Moving a task to a new, non-existent ID (automatically creates placeholders)
|
||||||
|
* Moving multiple tasks at once with comma-separated IDs
|
||||||
|
* **Validation Features:**
|
||||||
|
* Allows moving tasks to non-existent destination IDs (creates placeholder tasks)
|
||||||
|
* Prevents moving to existing task IDs that already have content (to avoid overwriting)
|
||||||
|
* Validates that source tasks exist before attempting to move them
|
||||||
|
* Maintains proper parent-child relationships
|
||||||
|
* **Example CLI:** `task-master move --from=5.2 --to=7.3` to move subtask 5.2 to become subtask 7.3.
|
||||||
|
* **Example Multi-Move:** `task-master move --from=10,11,12 --to=16,17,18` to move multiple tasks to new positions.
|
||||||
|
* **Common Use:** Resolving merge conflicts in tasks.json when multiple team members create tasks on different branches.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Dependency Management
|
## Dependency Management
|
||||||
|
|
||||||
### 17. Add Dependency (`add_dependency`)
|
### 18. Add Dependency (`add_dependency`)
|
||||||
|
|
||||||
* **MCP Tool:** `add_dependency`
|
* **MCP Tool:** `add_dependency`
|
||||||
* **CLI Command:** `task-master add-dependency [options]`
|
* **CLI Command:** `task-master add-dependency [options]`
|
||||||
@@ -284,7 +309,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
|
|||||||
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <path>`)
|
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <path>`)
|
||||||
* **Usage:** Establish the correct order of execution between tasks.
|
* **Usage:** Establish the correct order of execution between tasks.
|
||||||
|
|
||||||
### 18. Remove Dependency (`remove_dependency`)
|
### 19. Remove Dependency (`remove_dependency`)
|
||||||
|
|
||||||
* **MCP Tool:** `remove_dependency`
|
* **MCP Tool:** `remove_dependency`
|
||||||
* **CLI Command:** `task-master remove-dependency [options]`
|
* **CLI Command:** `task-master remove-dependency [options]`
|
||||||
@@ -295,7 +320,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
|
|||||||
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
|
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
|
||||||
* **Usage:** Update task relationships when the order of execution changes.
|
* **Usage:** Update task relationships when the order of execution changes.
|
||||||
|
|
||||||
### 19. Validate Dependencies (`validate_dependencies`)
|
### 20. Validate Dependencies (`validate_dependencies`)
|
||||||
|
|
||||||
* **MCP Tool:** `validate_dependencies`
|
* **MCP Tool:** `validate_dependencies`
|
||||||
* **CLI Command:** `task-master validate-dependencies [options]`
|
* **CLI Command:** `task-master validate-dependencies [options]`
|
||||||
@@ -304,7 +329,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
|
|||||||
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
|
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
|
||||||
* **Usage:** Audit the integrity of your task dependencies.
|
* **Usage:** Audit the integrity of your task dependencies.
|
||||||
|
|
||||||
### 20. Fix Dependencies (`fix_dependencies`)
|
### 21. Fix Dependencies (`fix_dependencies`)
|
||||||
|
|
||||||
* **MCP Tool:** `fix_dependencies`
|
* **MCP Tool:** `fix_dependencies`
|
||||||
* **CLI Command:** `task-master fix-dependencies [options]`
|
* **CLI Command:** `task-master fix-dependencies [options]`
|
||||||
@@ -317,33 +342,33 @@ This document provides a detailed reference for interacting with Taskmaster, cov
|
|||||||
|
|
||||||
## Analysis & Reporting
|
## Analysis & Reporting
|
||||||
|
|
||||||
### 21. Analyze Project Complexity (`analyze_project_complexity`)
|
### 22. Analyze Project Complexity (`analyze_project_complexity`)
|
||||||
|
|
||||||
* **MCP Tool:** `analyze_project_complexity`
|
* **MCP Tool:** `analyze_project_complexity`
|
||||||
* **CLI Command:** `task-master analyze-complexity [options]`
|
* **CLI Command:** `task-master analyze-complexity [options]`
|
||||||
* **Description:** `Have Taskmaster analyze your tasks to determine their complexity and suggest which ones need to be broken down further.`
|
* **Description:** `Have Taskmaster analyze your tasks to determine their complexity and suggest which ones need to be broken down further.`
|
||||||
* **Key Parameters/Options:**
|
* **Key Parameters/Options:**
|
||||||
* `output`: `Where to save the complexity analysis report (default: 'scripts/task-complexity-report.json').` (CLI: `-o, --output <file>`)
|
* `output`: `Where to save the complexity analysis report (default: '.taskmaster/reports/task-complexity-report.json').` (CLI: `-o, --output <file>`)
|
||||||
* `threshold`: `The minimum complexity score (1-10) that should trigger a recommendation to expand a task.` (CLI: `-t, --threshold <number>`)
|
* `threshold`: `The minimum complexity score (1-10) that should trigger a recommendation to expand a task.` (CLI: `-t, --threshold <number>`)
|
||||||
* `research`: `Enable research role for more accurate complexity analysis. Requires appropriate API key.` (CLI: `-r, --research`)
|
* `research`: `Enable research role for more accurate complexity analysis. Requires appropriate API key.` (CLI: `-r, --research`)
|
||||||
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
|
* `file`: `Path to your Taskmaster 'tasks.json' file. Default relies on auto-detection.` (CLI: `-f, --file <file>`)
|
||||||
* **Usage:** Used before breaking down tasks to identify which ones need the most attention.
|
* **Usage:** Used before breaking down tasks to identify which ones need the most attention.
|
||||||
* **Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress.
|
* **Important:** This MCP tool makes AI calls and can take up to a minute to complete. Please inform users to hang tight while the operation is in progress.
|
||||||
|
|
||||||
### 22. View Complexity Report (`complexity_report`)
|
### 23. View Complexity Report (`complexity_report`)
|
||||||
|
|
||||||
* **MCP Tool:** `complexity_report`
|
* **MCP Tool:** `complexity_report`
|
||||||
* **CLI Command:** `task-master complexity-report [options]`
|
* **CLI Command:** `task-master complexity-report [options]`
|
||||||
* **Description:** `Display the task complexity analysis report in a readable format.`
|
* **Description:** `Display the task complexity analysis report in a readable format.`
|
||||||
* **Key Parameters/Options:**
|
* **Key Parameters/Options:**
|
||||||
* `file`: `Path to the complexity report (default: 'scripts/task-complexity-report.json').` (CLI: `-f, --file <file>`)
|
* `file`: `Path to the complexity report (default: '.taskmaster/reports/task-complexity-report.json').` (CLI: `-f, --file <file>`)
|
||||||
* **Usage:** Review and understand the complexity analysis results after running analyze-complexity.
|
* **Usage:** Review and understand the complexity analysis results after running analyze-complexity.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## File Management
|
## File Management
|
||||||
|
|
||||||
### 23. Generate Task Files (`generate`)
|
### 24. Generate Task Files (`generate`)
|
||||||
|
|
||||||
* **MCP Tool:** `generate`
|
* **MCP Tool:** `generate`
|
||||||
* **CLI Command:** `task-master generate [options]`
|
* **CLI Command:** `task-master generate [options]`
|
||||||
@@ -357,7 +382,7 @@ This document provides a detailed reference for interacting with Taskmaster, cov
|
|||||||
|
|
||||||
## Environment Variables Configuration (Updated)
|
## Environment Variables Configuration (Updated)
|
||||||
|
|
||||||
Taskmaster primarily uses the **`.taskmasterconfig`** file (in project root) for configuration (models, parameters, logging level, etc.), managed via `task-master models --setup`.
|
Taskmaster primarily uses the **`.taskmaster/config.json`** file (in project root) for configuration (models, parameters, logging level, etc.), managed via `task-master models --setup`.
|
||||||
|
|
||||||
Environment variables are used **only** for sensitive API keys related to AI providers and specific overrides like the Ollama base URL:
|
Environment variables are used **only** for sensitive API keys related to AI providers and specific overrides like the Ollama base URL:
|
||||||
|
|
||||||
@@ -370,12 +395,12 @@ Environment variables are used **only** for sensitive API keys related to AI pro
|
|||||||
* `AZURE_OPENAI_API_KEY` (Requires `AZURE_OPENAI_ENDPOINT` too)
|
* `AZURE_OPENAI_API_KEY` (Requires `AZURE_OPENAI_ENDPOINT` too)
|
||||||
* `OPENROUTER_API_KEY`
|
* `OPENROUTER_API_KEY`
|
||||||
* `XAI_API_KEY`
|
* `XAI_API_KEY`
|
||||||
* `OLLANA_API_KEY` (Requires `OLLAMA_BASE_URL` too)
|
* `OLLAMA_API_KEY` (Requires `OLLAMA_BASE_URL` too)
|
||||||
* **Endpoints (Optional/Provider Specific inside .taskmasterconfig):**
|
* **Endpoints (Optional/Provider Specific inside .taskmaster/config.json):**
|
||||||
* `AZURE_OPENAI_ENDPOINT`
|
* `AZURE_OPENAI_ENDPOINT`
|
||||||
* `OLLAMA_BASE_URL` (Default: `http://localhost:11434/api`)
|
* `OLLAMA_BASE_URL` (Default: `http://localhost:11434/api`)
|
||||||
|
|
||||||
**Set API keys** in your **`.env`** file in the project root (for CLI use) or within the `env` section of your **`.cursor/mcp.json`** file (for MCP/Cursor integration). All other settings (model choice, max tokens, temperature, log level, custom endpoints) are managed in `.taskmasterconfig` via `task-master models` command or `models` MCP tool.
|
**Set API keys** in your **`.env`** file in the project root (for CLI use) or within the `env` section of your **`.cursor/mcp.json`** file (for MCP/Cursor integration). All other settings (model choice, max tokens, temperature, log level, custom endpoints) are managed in `.taskmaster/config.json` via `task-master models` command or `models` MCP tool.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
228
.cursor/rules/telemetry.mdc
Normal file
228
.cursor/rules/telemetry.mdc
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
---
|
||||||
|
description: Guidelines for integrating AI usage telemetry across Task Master.
|
||||||
|
globs: scripts/modules/**/*.js,mcp-server/src/**/*.js
|
||||||
|
alwaysApply: true
|
||||||
|
---
|
||||||
|
|
||||||
|
# AI Usage Telemetry Integration
|
||||||
|
|
||||||
|
This document outlines the standard pattern for capturing, propagating, and handling AI usage telemetry data (cost, tokens, model, etc.) across the Task Master stack. This ensures consistent telemetry for both CLI and MCP interactions.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Telemetry data is generated within the unified AI service layer ([`ai-services-unified.js`](mdc:scripts/modules/ai-services-unified.js)) and then passed upwards through the calling functions.
|
||||||
|
|
||||||
|
- **Data Source**: [`ai-services-unified.js`](mdc:scripts/modules/ai-services-unified.js) (specifically its `generateTextService`, `generateObjectService`, etc.) returns an object like `{ mainResult: AI_CALL_OUTPUT, telemetryData: TELEMETRY_OBJECT }`.
|
||||||
|
- **`telemetryData` Object Structure**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"timestamp": "ISO_STRING_DATE",
|
||||||
|
"userId": "USER_ID_FROM_CONFIG",
|
||||||
|
"commandName": "invoking_command_or_tool_name",
|
||||||
|
"modelUsed": "ai_model_id",
|
||||||
|
"providerName": "ai_provider_name",
|
||||||
|
"inputTokens": NUMBER,
|
||||||
|
"outputTokens": NUMBER,
|
||||||
|
"totalTokens": NUMBER,
|
||||||
|
"totalCost": NUMBER, // e.g., 0.012414
|
||||||
|
"currency": "USD" // e.g., "USD"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Integration Pattern by Layer
|
||||||
|
|
||||||
|
The key principle is that each layer receives telemetry data from the layer below it (if applicable) and passes it to the layer above it, or handles it for display in the case of the CLI.
|
||||||
|
|
||||||
|
### 1. Core Logic Functions (e.g., in `scripts/modules/task-manager/`)
|
||||||
|
|
||||||
|
Functions in this layer that invoke AI services are responsible for handling the `telemetryData` they receive from [`ai-services-unified.js`](mdc:scripts/modules/ai-services-unified.js).
|
||||||
|
|
||||||
|
- **Actions**:
|
||||||
|
1. Call the appropriate AI service function (e.g., `generateObjectService`).
|
||||||
|
- Pass `commandName` (e.g., `add-task`, `expand-task`) and `outputType` (e.g., `cli` or `mcp`) in the `params` object to the AI service. The `outputType` can be derived from context (e.g., presence of `mcpLog`).
|
||||||
|
2. The AI service returns an object, e.g., `aiServiceResponse = { mainResult: {/*AI output*/}, telemetryData: {/*telemetry data*/} }`.
|
||||||
|
3. Extract `aiServiceResponse.mainResult` for the core processing.
|
||||||
|
4. **Must return an object that includes `aiServiceResponse.telemetryData`**.
|
||||||
|
Example: `return { operationSpecificData: /*...*/, telemetryData: aiServiceResponse.telemetryData };`
|
||||||
|
|
||||||
|
- **CLI Output Handling (If Applicable)**:
|
||||||
|
- If the core function also handles CLI output (e.g., it has an `outputFormat` parameter that can be `'text'` or `'cli'`):
|
||||||
|
1. Check if `outputFormat === 'text'` (or `'cli'`).
|
||||||
|
2. If so, and if `aiServiceResponse.telemetryData` is available, call `displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli')` from [`scripts/modules/ui.js`](mdc:scripts/modules/ui.js).
|
||||||
|
- This ensures telemetry is displayed directly to CLI users after the main command output.
|
||||||
|
|
||||||
|
- **Example Snippet (Core Logic in `scripts/modules/task-manager/someAiAction.js`)**:
|
||||||
|
```javascript
|
||||||
|
import { generateObjectService } from '../ai-services-unified.js';
|
||||||
|
import { displayAiUsageSummary } from '../ui.js';
|
||||||
|
|
||||||
|
async function performAiRelatedAction(params, context, outputFormat = 'text') {
|
||||||
|
const { commandNameFromContext, /* other context vars */ } = context;
|
||||||
|
let aiServiceResponse = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
aiServiceResponse = await generateObjectService({
|
||||||
|
// ... other parameters for AI service ...
|
||||||
|
commandName: commandNameFromContext || 'default-action-name',
|
||||||
|
outputType: context.mcpLog ? 'mcp' : 'cli' // Derive outputType
|
||||||
|
});
|
||||||
|
|
||||||
|
const usefulAiOutput = aiServiceResponse.mainResult.object;
|
||||||
|
// ... do work with usefulAiOutput ...
|
||||||
|
|
||||||
|
if (outputFormat === 'text' && aiServiceResponse.telemetryData) {
|
||||||
|
displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli');
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
actionData: /* results of processing */,
|
||||||
|
telemetryData: aiServiceResponse.telemetryData
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
// ... handle error ...
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Direct Function Wrappers (in `mcp-server/src/core/direct-functions/`)
|
||||||
|
|
||||||
|
These functions adapt core logic for the MCP server, ensuring structured responses.
|
||||||
|
|
||||||
|
- **Actions**:
|
||||||
|
1. Call the corresponding core logic function.
|
||||||
|
- Pass necessary context (e.g., `session`, `mcpLog`, `projectRoot`).
|
||||||
|
- Provide the `commandName` (typically derived from the MCP tool name) and `outputType: 'mcp'` in the context object passed to the core function.
|
||||||
|
- If the core function supports an `outputFormat` parameter, pass `'json'` to suppress CLI-specific UI.
|
||||||
|
2. The core logic function returns an object (e.g., `coreResult = { actionData: ..., telemetryData: ... }`).
|
||||||
|
3. Include `coreResult.telemetryData` as a field within the `data` object of the successful response returned by the direct function.
|
||||||
|
|
||||||
|
- **Example Snippet (Direct Function `someAiActionDirect.js`)**:
|
||||||
|
```javascript
|
||||||
|
import { performAiRelatedAction } from '../../../../scripts/modules/task-manager/someAiAction.js'; // Core function
|
||||||
|
import { createLogWrapper } from '../../tools/utils.js'; // MCP Log wrapper
|
||||||
|
|
||||||
|
export async function someAiActionDirect(args, log, context = {}) {
|
||||||
|
const { session } = context;
|
||||||
|
// ... prepare arguments for core function from args, including args.projectRoot ...
|
||||||
|
|
||||||
|
try {
|
||||||
|
const coreResult = await performAiRelatedAction(
|
||||||
|
{ /* parameters for core function */ },
|
||||||
|
{ // Context for core function
|
||||||
|
session,
|
||||||
|
mcpLog: createLogWrapper(log),
|
||||||
|
projectRoot: args.projectRoot,
|
||||||
|
commandNameFromContext: 'mcp_tool_some_ai_action', // Example command name
|
||||||
|
outputType: 'mcp'
|
||||||
|
},
|
||||||
|
'json' // Request 'json' output format from core function
|
||||||
|
);
|
||||||
|
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
data: {
|
||||||
|
operationSpecificData: coreResult.actionData,
|
||||||
|
telemetryData: coreResult.telemetryData // Pass telemetry through
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
// ... error handling, return { success: false, error: ... } ...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. MCP Tools (in `mcp-server/src/tools/`)
|
||||||
|
|
||||||
|
These are the exposed endpoints for MCP clients.
|
||||||
|
|
||||||
|
- **Actions**:
|
||||||
|
1. Call the corresponding direct function wrapper.
|
||||||
|
2. The direct function returns an object structured like `{ success: true, data: { operationSpecificData: ..., telemetryData: ... } }` (or an error object).
|
||||||
|
3. Pass this entire result object to `handleApiResult(result, log)` from [`mcp-server/src/tools/utils.js`](mdc:mcp-server/src/tools/utils.js).
|
||||||
|
4. `handleApiResult` ensures that the `data` field from the direct function's response (which correctly includes `telemetryData`) is part of the final MCP response.
|
||||||
|
|
||||||
|
- **Example Snippet (MCP Tool `some_ai_action.js`)**:
|
||||||
|
```javascript
|
||||||
|
import { someAiActionDirect } from '../core/task-master-core.js';
|
||||||
|
import { handleApiResult, withNormalizedProjectRoot } from './utils.js';
|
||||||
|
// ... zod for parameters ...
|
||||||
|
|
||||||
|
export function registerSomeAiActionTool(server) {
|
||||||
|
server.addTool({
|
||||||
|
name: "some_ai_action",
|
||||||
|
// ... description, parameters ...
|
||||||
|
execute: withNormalizedProjectRoot(async (args, { log, session }) => {
|
||||||
|
try {
|
||||||
|
const resultFromDirectFunction = await someAiActionDirect(
|
||||||
|
{ /* args including projectRoot */ },
|
||||||
|
log,
|
||||||
|
{ session }
|
||||||
|
);
|
||||||
|
return handleApiResult(resultFromDirectFunction, log); // This passes the nested telemetryData through
|
||||||
|
} catch (error) {
|
||||||
|
// ... error handling ...
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. CLI Commands (`scripts/modules/commands.js`)
|
||||||
|
|
||||||
|
These define the command-line interface.
|
||||||
|
|
||||||
|
- **Actions**:
|
||||||
|
1. Call the appropriate core logic function.
|
||||||
|
2. Pass `outputFormat: 'text'` (or ensure the core function defaults to text-based output for CLI).
|
||||||
|
3. The core logic function (as per Section 1) is responsible for calling `displayAiUsageSummary` if telemetry data is available and it's in CLI mode.
|
||||||
|
4. The command action itself **should not** call `displayAiUsageSummary` if the core logic function already handles this. This avoids duplicate display.
|
||||||
|
|
||||||
|
- **Example Snippet (CLI Command in `commands.js`)**:
|
||||||
|
```javascript
|
||||||
|
// In scripts/modules/commands.js
|
||||||
|
import { performAiRelatedAction } from './task-manager/someAiAction.js'; // Core function
|
||||||
|
|
||||||
|
programInstance
|
||||||
|
.command('some-cli-ai-action')
|
||||||
|
// ... .option() ...
|
||||||
|
.action(async (options) => {
|
||||||
|
try {
|
||||||
|
const projectRoot = findProjectRoot() || '.'; // Example root finding
|
||||||
|
// ... prepare parameters for core function from command options ...
|
||||||
|
await performAiRelatedAction(
|
||||||
|
{ /* parameters for core function */ },
|
||||||
|
{ // Context for core function
|
||||||
|
projectRoot,
|
||||||
|
commandNameFromContext: 'some-cli-ai-action',
|
||||||
|
outputType: 'cli'
|
||||||
|
},
|
||||||
|
'text' // Explicitly request text output format for CLI
|
||||||
|
);
|
||||||
|
// Core function handles displayAiUsageSummary internally for 'text' outputFormat
|
||||||
|
} catch (error) {
|
||||||
|
// ... error handling ...
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Summary Flow
|
||||||
|
|
||||||
|
The telemetry data flows as follows:
|
||||||
|
|
||||||
|
1. **[`ai-services-unified.js`](mdc:scripts/modules/ai-services-unified.js)**: Generates `telemetryData` and returns `{ mainResult, telemetryData }`.
|
||||||
|
2. **Core Logic Function**:
|
||||||
|
* Receives `{ mainResult, telemetryData }`.
|
||||||
|
* Uses `mainResult`.
|
||||||
|
* If CLI (`outputFormat: 'text'`), calls `displayAiUsageSummary(telemetryData)`.
|
||||||
|
* Returns `{ operationSpecificData, telemetryData }`.
|
||||||
|
3. **Direct Function Wrapper**:
|
||||||
|
* Receives `{ operationSpecificData, telemetryData }` from core logic.
|
||||||
|
* Returns `{ success: true, data: { operationSpecificData, telemetryData } }`.
|
||||||
|
4. **MCP Tool**:
|
||||||
|
* Receives direct function response.
|
||||||
|
* `handleApiResult` ensures the final MCP response to the client is `{ success: true, data: { operationSpecificData, telemetryData } }`.
|
||||||
|
5. **CLI Command**:
|
||||||
|
* Calls core logic with `outputFormat: 'text'`. Display is handled by core logic.
|
||||||
|
|
||||||
|
This pattern ensures telemetry is captured and appropriately handled/exposed across all interaction modes.
|
||||||
@@ -7,3 +7,9 @@ MISTRAL_API_KEY=YOUR_MISTRAL_KEY_HERE
|
|||||||
OPENROUTER_API_KEY=YOUR_OPENROUTER_KEY_HERE
|
OPENROUTER_API_KEY=YOUR_OPENROUTER_KEY_HERE
|
||||||
XAI_API_KEY=YOUR_XAI_KEY_HERE
|
XAI_API_KEY=YOUR_XAI_KEY_HERE
|
||||||
AZURE_OPENAI_API_KEY=YOUR_AZURE_KEY_HERE
|
AZURE_OPENAI_API_KEY=YOUR_AZURE_KEY_HERE
|
||||||
|
|
||||||
|
# Google Vertex AI Configuration
|
||||||
|
VERTEX_PROJECT_ID=your-gcp-project-id
|
||||||
|
VERTEX_LOCATION=us-central1
|
||||||
|
# Optional: Path to service account credentials JSON file (alternative to API key)
|
||||||
|
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-credentials.json
|
||||||
|
|||||||
62
.github/workflows/pre-release.yml
vendored
Normal file
62
.github/workflows/pre-release.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
name: Pre-Release (RC)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # Allows manual triggering from GitHub UI/API
|
||||||
|
|
||||||
|
concurrency: pre-release-${{ github.ref }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rc:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Cache node_modules
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
node_modules
|
||||||
|
*/*/node_modules
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
timeout-minutes: 2
|
||||||
|
|
||||||
|
- name: Enter RC mode
|
||||||
|
run: |
|
||||||
|
npx changeset pre exit || true
|
||||||
|
npx changeset pre enter rc
|
||||||
|
|
||||||
|
- name: Version RC packages
|
||||||
|
run: npx changeset version
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create Release Candidate Pull Request or Publish Release Candidate to npm
|
||||||
|
uses: changesets/action@v1
|
||||||
|
with:
|
||||||
|
publish: npm run release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
- name: Exit RC mode
|
||||||
|
run: npx changeset pre exit
|
||||||
|
|
||||||
|
- name: Commit & Push changes
|
||||||
|
uses: actions-js/push@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branch: ${{ github.ref }}
|
||||||
|
message: 'chore: rc version bump'
|
||||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -33,6 +33,9 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
|
|
||||||
|
- name: Exit pre-release mode (safety check)
|
||||||
|
run: npx changeset pre exit || true
|
||||||
|
|
||||||
- name: Create Release Pull Request or Publish to npm
|
- name: Create Release Pull Request or Publish to npm
|
||||||
uses: changesets/action@v1
|
uses: changesets/action@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
40
.github/workflows/update-models-md.yml
vendored
Normal file
40
.github/workflows/update-models-md.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Update models.md from supported-models.json
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- next
|
||||||
|
paths:
|
||||||
|
- 'scripts/modules/supported-models.json'
|
||||||
|
- 'docs/scripts/models-json-to-markdown.js'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_markdown:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Run transformation script
|
||||||
|
run: node docs/scripts/models-json-to-markdown.js
|
||||||
|
|
||||||
|
- name: Format Markdown with Prettier
|
||||||
|
run: npx prettier --write docs/models.md
|
||||||
|
|
||||||
|
- name: Stage docs/models.md
|
||||||
|
run: git add docs/models.md
|
||||||
|
|
||||||
|
- name: Commit & Push docs/models.md
|
||||||
|
uses: actions-js/push@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branch: ${{ github.ref_name }}
|
||||||
|
message: 'docs: Auto-update and format models.md'
|
||||||
|
author_name: 'github-actions[bot]'
|
||||||
|
author_email: 'github-actions[bot]@users.noreply.github.com'
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -61,3 +61,6 @@ dist
|
|||||||
*.debug
|
*.debug
|
||||||
init-debug.log
|
init-debug.log
|
||||||
dev-debug.log
|
dev-debug.log
|
||||||
|
|
||||||
|
# NPMRC
|
||||||
|
.npmrc
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
# Ignore artifacts:
|
|
||||||
build
|
|
||||||
coverage
|
|
||||||
.changeset
|
|
||||||
tasks
|
|
||||||
package-lock.json
|
|
||||||
tests/fixture/*.json
|
|
||||||
11
.prettierrc
11
.prettierrc
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"printWidth": 80,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"useTabs": true,
|
|
||||||
"semi": true,
|
|
||||||
"singleQuote": true,
|
|
||||||
"trailingComma": "none",
|
|
||||||
"bracketSpacing": true,
|
|
||||||
"arrowParens": "always",
|
|
||||||
"endOfLine": "lf"
|
|
||||||
}
|
|
||||||
33
.taskmaster/config.json
Normal file
33
.taskmaster/config.json
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"models": {
|
||||||
|
"main": {
|
||||||
|
"provider": "anthropic",
|
||||||
|
"modelId": "claude-sonnet-4-20250514",
|
||||||
|
"maxTokens": 50000,
|
||||||
|
"temperature": 0.2
|
||||||
|
},
|
||||||
|
"research": {
|
||||||
|
"provider": "perplexity",
|
||||||
|
"modelId": "sonar-pro",
|
||||||
|
"maxTokens": 8700,
|
||||||
|
"temperature": 0.1
|
||||||
|
},
|
||||||
|
"fallback": {
|
||||||
|
"provider": "anthropic",
|
||||||
|
"modelId": "claude-3-7-sonnet-20250219",
|
||||||
|
"maxTokens": 128000,
|
||||||
|
"temperature": 0.2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"global": {
|
||||||
|
"logLevel": "info",
|
||||||
|
"debug": false,
|
||||||
|
"defaultSubtasks": 5,
|
||||||
|
"defaultPriority": "medium",
|
||||||
|
"projectName": "Taskmaster",
|
||||||
|
"ollamaBaseURL": "http://localhost:11434/api",
|
||||||
|
"bedrockBaseURL": "https://bedrock.us-east-1.amazonaws.com",
|
||||||
|
"userId": "1234567890",
|
||||||
|
"azureBaseURL": "https://your-endpoint.azure.com/"
|
||||||
|
}
|
||||||
|
}
|
||||||
528
.taskmaster/docs/prd.txt
Normal file
528
.taskmaster/docs/prd.txt
Normal file
@@ -0,0 +1,528 @@
|
|||||||
|
|
||||||
|
# Claude Task Master - Product Requirements Document
|
||||||
|
|
||||||
|
<PRD>
|
||||||
|
# Technical Architecture
|
||||||
|
|
||||||
|
## System Components
|
||||||
|
1. **Task Management Core**
|
||||||
|
- Tasks.json file structure (single source of truth)
|
||||||
|
- Task model with dependencies, priorities, and metadata
|
||||||
|
- Task state management system
|
||||||
|
- Task file generation subsystem
|
||||||
|
|
||||||
|
2. **AI Integration Layer**
|
||||||
|
- Anthropic Claude API integration
|
||||||
|
- Perplexity API integration (optional)
|
||||||
|
- Prompt engineering components
|
||||||
|
- Response parsing and processing
|
||||||
|
|
||||||
|
3. **Command Line Interface**
|
||||||
|
- Command parsing and execution
|
||||||
|
- Interactive user input handling
|
||||||
|
- Display and formatting utilities
|
||||||
|
- Status reporting and feedback system
|
||||||
|
|
||||||
|
4. **Cursor AI Integration**
|
||||||
|
- Cursor rules documentation
|
||||||
|
- Agent interaction patterns
|
||||||
|
- Workflow guideline specifications
|
||||||
|
|
||||||
|
## Data Models
|
||||||
|
|
||||||
|
### Task Model
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"title": "Task Title",
|
||||||
|
"description": "Brief task description",
|
||||||
|
"status": "pending|done|deferred",
|
||||||
|
"dependencies": [0],
|
||||||
|
"priority": "high|medium|low",
|
||||||
|
"details": "Detailed implementation instructions",
|
||||||
|
"testStrategy": "Verification approach details",
|
||||||
|
"subtasks": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"title": "Subtask Title",
|
||||||
|
"description": "Subtask description",
|
||||||
|
"status": "pending|done|deferred",
|
||||||
|
"dependencies": [],
|
||||||
|
"acceptanceCriteria": "Verification criteria"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Tasks Collection Model
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"projectName": "Project Name",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"prdSource": "path/to/prd.txt",
|
||||||
|
"createdAt": "ISO-8601 timestamp",
|
||||||
|
"updatedAt": "ISO-8601 timestamp"
|
||||||
|
},
|
||||||
|
"tasks": [
|
||||||
|
// Array of Task objects
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Task File Format
|
||||||
|
```
|
||||||
|
# Task ID: <id>
|
||||||
|
# Title: <title>
|
||||||
|
# Status: <status>
|
||||||
|
# Dependencies: <comma-separated list of dependency IDs>
|
||||||
|
# Priority: <priority>
|
||||||
|
# Description: <brief description>
|
||||||
|
# Details:
|
||||||
|
<detailed implementation notes>
|
||||||
|
|
||||||
|
# Test Strategy:
|
||||||
|
<verification approach>
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
1. <subtask title> - <subtask description>
|
||||||
|
```
|
||||||
|
|
||||||
|
## APIs and Integrations
|
||||||
|
1. **Anthropic Claude API**
|
||||||
|
- Authentication via API key
|
||||||
|
- Prompt construction and streaming
|
||||||
|
- Response parsing and extraction
|
||||||
|
- Error handling and retries
|
||||||
|
|
||||||
|
2. **Perplexity API (via OpenAI client)**
|
||||||
|
- Authentication via API key
|
||||||
|
- Research-oriented prompt construction
|
||||||
|
- Enhanced contextual response handling
|
||||||
|
- Fallback mechanisms to Claude
|
||||||
|
|
||||||
|
3. **File System API**
|
||||||
|
- Reading/writing tasks.json
|
||||||
|
- Managing individual task files
|
||||||
|
- Command execution logging
|
||||||
|
- Debug logging system
|
||||||
|
|
||||||
|
## Infrastructure Requirements
|
||||||
|
1. **Node.js Runtime**
|
||||||
|
- Version 14.0.0 or higher
|
||||||
|
- ES Module support
|
||||||
|
- File system access rights
|
||||||
|
- Command execution capabilities
|
||||||
|
|
||||||
|
2. **Configuration Management**
|
||||||
|
- Environment variable handling
|
||||||
|
- .env file support
|
||||||
|
- Configuration validation
|
||||||
|
- Sensible defaults with overrides
|
||||||
|
|
||||||
|
3. **Development Environment**
|
||||||
|
- Git repository
|
||||||
|
- NPM package management
|
||||||
|
- Cursor editor integration
|
||||||
|
- Command-line terminal access
|
||||||
|
|
||||||
|
# Development Roadmap
|
||||||
|
|
||||||
|
## Phase 1: Core Task Management System
|
||||||
|
1. **Task Data Structure**
|
||||||
|
- Design and implement the tasks.json structure
|
||||||
|
- Create task model validation
|
||||||
|
- Implement basic task operations (create, read, update)
|
||||||
|
- Develop file system interactions
|
||||||
|
|
||||||
|
2. **Command Line Interface Foundation**
|
||||||
|
- Implement command parsing with Commander.js
|
||||||
|
- Create help documentation
|
||||||
|
- Implement colorized console output
|
||||||
|
- Add logging system with configurable levels
|
||||||
|
|
||||||
|
3. **Basic Task Operations**
|
||||||
|
- Implement task listing functionality
|
||||||
|
- Create task status update capability
|
||||||
|
- Add dependency tracking
|
||||||
|
- Implement priority management
|
||||||
|
|
||||||
|
4. **Task File Generation**
|
||||||
|
- Create task file templates
|
||||||
|
- Implement generation from tasks.json
|
||||||
|
- Add bi-directional synchronization
|
||||||
|
- Implement proper file naming and organization
|
||||||
|
|
||||||
|
## Phase 2: AI Integration
|
||||||
|
1. **Claude API Integration**
|
||||||
|
- Implement API authentication
|
||||||
|
- Create prompt templates for PRD parsing
|
||||||
|
- Design response handlers
|
||||||
|
- Add error management and retries
|
||||||
|
|
||||||
|
2. **PRD Parsing System**
|
||||||
|
- Implement PRD file reading
|
||||||
|
- Create PRD to task conversion logic
|
||||||
|
- Add intelligent dependency inference
|
||||||
|
- Implement priority assignment logic
|
||||||
|
|
||||||
|
3. **Task Expansion With Claude**
|
||||||
|
- Create subtask generation prompts
|
||||||
|
- Implement subtask creation workflow
|
||||||
|
- Add context-aware expansion capabilities
|
||||||
|
- Implement parent-child relationship management
|
||||||
|
|
||||||
|
4. **Implementation Drift Handling**
|
||||||
|
- Add capability to update future tasks
|
||||||
|
- Implement task rewriting based on new context
|
||||||
|
- Create dependency chain updates
|
||||||
|
- Preserve completed work while updating future tasks
|
||||||
|
|
||||||
|
## Phase 3: Advanced Features
|
||||||
|
1. **Perplexity Integration**
|
||||||
|
- Implement Perplexity API authentication
|
||||||
|
- Create research-oriented prompts
|
||||||
|
- Add fallback to Claude when unavailable
|
||||||
|
- Implement response quality comparison logic
|
||||||
|
|
||||||
|
2. **Research-Backed Subtask Generation**
|
||||||
|
- Create specialized research prompts
|
||||||
|
- Implement context enrichment
|
||||||
|
- Add domain-specific knowledge incorporation
|
||||||
|
- Create more detailed subtask generation
|
||||||
|
|
||||||
|
3. **Batch Operations**
|
||||||
|
- Implement multi-task status updates
|
||||||
|
- Add bulk subtask generation
|
||||||
|
- Create task filtering and querying
|
||||||
|
- Implement advanced dependency management
|
||||||
|
|
||||||
|
4. **Project Initialization**
|
||||||
|
- Create project templating system
|
||||||
|
- Implement interactive setup
|
||||||
|
- Add environment configuration
|
||||||
|
- Create documentation generation
|
||||||
|
|
||||||
|
## Phase 4: Cursor AI Integration
|
||||||
|
1. **Cursor Rules Implementation**
|
||||||
|
- Create dev_workflow.mdc documentation
|
||||||
|
- Implement cursor_rules.mdc
|
||||||
|
- Add self_improve.mdc
|
||||||
|
- Design rule integration documentation
|
||||||
|
|
||||||
|
2. **Agent Workflow Guidelines**
|
||||||
|
- Document task discovery workflow
|
||||||
|
- Create task selection guidelines
|
||||||
|
- Implement implementation guidance
|
||||||
|
- Add verification procedures
|
||||||
|
|
||||||
|
3. **Agent Command Integration**
|
||||||
|
- Document command syntax for agents
|
||||||
|
- Create example interactions
|
||||||
|
- Implement agent response patterns
|
||||||
|
- Add context management for agents
|
||||||
|
|
||||||
|
4. **User Documentation**
|
||||||
|
- Create detailed README
|
||||||
|
- Add scripts documentation
|
||||||
|
- Implement example workflows
|
||||||
|
- Create troubleshooting guides
|
||||||
|
|
||||||
|
# Logical Dependency Chain
|
||||||
|
|
||||||
|
## Foundation Layer
|
||||||
|
1. **Task Data Structure**
|
||||||
|
- Must be implemented first as all other functionality depends on this
|
||||||
|
- Defines the core data model for the entire system
|
||||||
|
- Establishes the single source of truth concept
|
||||||
|
|
||||||
|
2. **Command Line Interface**
|
||||||
|
- Built on top of the task data structure
|
||||||
|
- Provides the primary user interaction mechanism
|
||||||
|
- Required for all subsequent operations to be accessible
|
||||||
|
|
||||||
|
3. **Basic Task Operations**
|
||||||
|
- Depends on both task data structure and CLI
|
||||||
|
- Provides the fundamental operations for task management
|
||||||
|
- Enables the minimal viable workflow
|
||||||
|
|
||||||
|
## Functional Layer
|
||||||
|
4. **Task File Generation**
|
||||||
|
- Depends on task data structure and basic operations
|
||||||
|
- Creates the individual task files for reference
|
||||||
|
- Enables the file-based workflow complementing tasks.json
|
||||||
|
|
||||||
|
5. **Claude API Integration**
|
||||||
|
- Independent of most previous components but needs the task data structure
|
||||||
|
- Provides the AI capabilities that enhance the system
|
||||||
|
- Gateway to advanced task generation features
|
||||||
|
|
||||||
|
6. **PRD Parsing System**
|
||||||
|
- Depends on Claude API integration and task data structure
|
||||||
|
- Enables the initial task generation workflow
|
||||||
|
- Creates the starting point for new projects
|
||||||
|
|
||||||
|
## Enhancement Layer
|
||||||
|
7. **Task Expansion With Claude**
|
||||||
|
- Depends on Claude API integration and basic task operations
|
||||||
|
- Enhances existing tasks with more detailed subtasks
|
||||||
|
- Improves the implementation guidance
|
||||||
|
|
||||||
|
8. **Implementation Drift Handling**
|
||||||
|
- Depends on Claude API integration and task operations
|
||||||
|
- Addresses a key challenge in AI-driven development
|
||||||
|
- Maintains the relevance of task planning as implementation evolves
|
||||||
|
|
||||||
|
9. **Perplexity Integration**
|
||||||
|
- Can be developed in parallel with other features after Claude integration
|
||||||
|
- Enhances the quality of generated content
|
||||||
|
- Provides research-backed improvements
|
||||||
|
|
||||||
|
## Advanced Layer
|
||||||
|
10. **Research-Backed Subtask Generation**
|
||||||
|
- Depends on Perplexity integration and task expansion
|
||||||
|
- Provides higher quality, more contextual subtasks
|
||||||
|
- Enhances the value of the task breakdown
|
||||||
|
|
||||||
|
11. **Batch Operations**
|
||||||
|
- Depends on basic task operations
|
||||||
|
- Improves efficiency for managing multiple tasks
|
||||||
|
- Quality-of-life enhancement for larger projects
|
||||||
|
|
||||||
|
12. **Project Initialization**
|
||||||
|
- Depends on most previous components being stable
|
||||||
|
- Provides a smooth onboarding experience
|
||||||
|
- Creates a complete project setup in one step
|
||||||
|
|
||||||
|
## Integration Layer
|
||||||
|
13. **Cursor Rules Implementation**
|
||||||
|
- Can be developed in parallel after basic functionality
|
||||||
|
- Provides the guidance for Cursor AI agent
|
||||||
|
- Enhances the AI-driven workflow
|
||||||
|
|
||||||
|
14. **Agent Workflow Guidelines**
|
||||||
|
- Depends on Cursor rules implementation
|
||||||
|
- Structures how the agent interacts with the system
|
||||||
|
- Ensures consistent agent behavior
|
||||||
|
|
||||||
|
15. **Agent Command Integration**
|
||||||
|
- Depends on agent workflow guidelines
|
||||||
|
- Provides specific command patterns for the agent
|
||||||
|
- Optimizes the agent-user interaction
|
||||||
|
|
||||||
|
16. **User Documentation**
|
||||||
|
- Should be developed alongside all features
|
||||||
|
- Must be completed before release
|
||||||
|
- Ensures users can effectively use the system
|
||||||
|
|
||||||
|
# Risks and Mitigations
|
||||||
|
|
||||||
|
## Technical Challenges
|
||||||
|
|
||||||
|
### API Reliability
|
||||||
|
**Risk**: Anthropic or Perplexity API could have downtime, rate limiting, or breaking changes.
|
||||||
|
**Mitigation**:
|
||||||
|
- Implement robust error handling with exponential backoff
|
||||||
|
- Add fallback mechanisms (Claude fallback for Perplexity)
|
||||||
|
- Cache important responses to reduce API dependency
|
||||||
|
- Support offline mode for critical functions
|
||||||
|
|
||||||
|
### Model Output Variability
|
||||||
|
**Risk**: AI models may produce inconsistent or unexpected outputs.
|
||||||
|
**Mitigation**:
|
||||||
|
- Design robust prompt templates with strict output formatting requirements
|
||||||
|
- Implement response validation and error detection
|
||||||
|
- Add self-correction mechanisms and retries with improved prompts
|
||||||
|
- Allow manual editing of generated content
|
||||||
|
|
||||||
|
### Node.js Version Compatibility
|
||||||
|
**Risk**: Differences in Node.js versions could cause unexpected behavior.
|
||||||
|
**Mitigation**:
|
||||||
|
- Clearly document minimum Node.js version requirements
|
||||||
|
- Use transpilers if needed for compatibility
|
||||||
|
- Test across multiple Node.js versions
|
||||||
|
- Handle version-specific features gracefully
|
||||||
|
|
||||||
|
## MVP Definition
|
||||||
|
|
||||||
|
### Feature Prioritization
|
||||||
|
**Risk**: Including too many features in the MVP could delay release and adoption.
|
||||||
|
**Mitigation**:
|
||||||
|
- Define MVP as core task management + basic Claude integration
|
||||||
|
- Ensure each phase delivers a complete, usable product
|
||||||
|
- Implement feature flags for easy enabling/disabling of features
|
||||||
|
- Get early user feedback to validate feature importance
|
||||||
|
|
||||||
|
### Scope Creep
|
||||||
|
**Risk**: The project could expand beyond its original intent, becoming too complex.
|
||||||
|
**Mitigation**:
|
||||||
|
- Maintain a strict definition of what the tool is and isn't
|
||||||
|
- Focus on task management for AI-driven development
|
||||||
|
- Evaluate new features against core value proposition
|
||||||
|
- Implement extensibility rather than building every feature
|
||||||
|
|
||||||
|
### User Expectations
|
||||||
|
**Risk**: Users might expect a full project management solution rather than a task tracking system.
|
||||||
|
**Mitigation**:
|
||||||
|
- Clearly communicate the tool's purpose and limitations
|
||||||
|
- Provide integration points with existing project management tools
|
||||||
|
- Focus on the unique value of AI-driven development
|
||||||
|
- Document specific use cases and example workflows
|
||||||
|
|
||||||
|
## Resource Constraints
|
||||||
|
|
||||||
|
### Development Capacity
|
||||||
|
**Risk**: Limited development resources could delay implementation.
|
||||||
|
**Mitigation**:
|
||||||
|
- Phase implementation to deliver value incrementally
|
||||||
|
- Focus on core functionality first
|
||||||
|
- Leverage open source libraries where possible
|
||||||
|
- Design for extensibility to allow community contributions
|
||||||
|
|
||||||
|
### AI Cost Management
|
||||||
|
**Risk**: Excessive API usage could lead to high costs.
|
||||||
|
**Mitigation**:
|
||||||
|
- Implement token usage tracking and reporting
|
||||||
|
- Add configurable limits to prevent unexpected costs
|
||||||
|
- Cache responses where appropriate
|
||||||
|
- Optimize prompts for token efficiency
|
||||||
|
- Support local LLM options in the future
|
||||||
|
|
||||||
|
### Documentation Overhead
|
||||||
|
**Risk**: Complexity of the system requires extensive documentation that is time-consuming to maintain.
|
||||||
|
**Mitigation**:
|
||||||
|
- Use AI to help generate and maintain documentation
|
||||||
|
- Create self-documenting commands and features
|
||||||
|
- Implement progressive documentation (basic to advanced)
|
||||||
|
- Build help directly into the CLI
|
||||||
|
|
||||||
|
# Appendix
|
||||||
|
|
||||||
|
## AI Prompt Engineering Specifications
|
||||||
|
|
||||||
|
### PRD Parsing Prompt Structure
|
||||||
|
```
|
||||||
|
You are assisting with transforming a Product Requirements Document (PRD) into a structured set of development tasks.
|
||||||
|
|
||||||
|
Given the following PRD, create a comprehensive list of development tasks that would be needed to implement the described product.
|
||||||
|
|
||||||
|
For each task:
|
||||||
|
1. Assign a short, descriptive title
|
||||||
|
2. Write a concise description
|
||||||
|
3. Identify dependencies (which tasks must be completed before this one)
|
||||||
|
4. Assign a priority (high, medium, low)
|
||||||
|
5. Include detailed implementation notes
|
||||||
|
6. Describe a test strategy to verify completion
|
||||||
|
|
||||||
|
Structure the tasks in a logical order of implementation.
|
||||||
|
|
||||||
|
PRD:
|
||||||
|
{prd_content}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Task Expansion Prompt Structure
|
||||||
|
```
|
||||||
|
You are helping to break down a development task into more manageable subtasks.
|
||||||
|
|
||||||
|
Main task:
|
||||||
|
Title: {task_title}
|
||||||
|
Description: {task_description}
|
||||||
|
Details: {task_details}
|
||||||
|
|
||||||
|
Please create {num_subtasks} specific subtasks that together would accomplish this main task.
|
||||||
|
|
||||||
|
For each subtask, provide:
|
||||||
|
1. A clear, actionable title
|
||||||
|
2. A concise description
|
||||||
|
3. Any dependencies on other subtasks
|
||||||
|
4. Specific acceptance criteria to verify completion
|
||||||
|
|
||||||
|
Additional context:
|
||||||
|
{additional_context}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Research-Backed Expansion Prompt Structure
|
||||||
|
```
|
||||||
|
You are a technical researcher and developer helping to break down a software development task into detailed, well-researched subtasks.
|
||||||
|
|
||||||
|
Main task:
|
||||||
|
Title: {task_title}
|
||||||
|
Description: {task_description}
|
||||||
|
Details: {task_details}
|
||||||
|
|
||||||
|
Research the latest best practices, technologies, and implementation patterns for this type of task. Then create {num_subtasks} specific, actionable subtasks that together would accomplish the main task.
|
||||||
|
|
||||||
|
For each subtask:
|
||||||
|
1. Provide a clear, specific title
|
||||||
|
2. Write a detailed description including technical approach
|
||||||
|
3. Identify dependencies on other subtasks
|
||||||
|
4. Include specific acceptance criteria
|
||||||
|
5. Reference any relevant libraries, tools, or resources that should be used
|
||||||
|
|
||||||
|
Consider security, performance, maintainability, and user experience in your recommendations.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Task File System Specification
|
||||||
|
|
||||||
|
### Directory Structure
|
||||||
|
```
|
||||||
|
/
|
||||||
|
├── .cursor/
|
||||||
|
│ └── rules/
|
||||||
|
│ ├── dev_workflow.mdc
|
||||||
|
│ ├── cursor_rules.mdc
|
||||||
|
│ └── self_improve.mdc
|
||||||
|
├── scripts/
|
||||||
|
│ ├── dev.js
|
||||||
|
│ └── README.md
|
||||||
|
├── tasks/
|
||||||
|
│ ├── task_001.txt
|
||||||
|
│ ├── task_002.txt
|
||||||
|
│ └── ...
|
||||||
|
├── .env
|
||||||
|
├── .env.example
|
||||||
|
├── .gitignore
|
||||||
|
├── package.json
|
||||||
|
├── README.md
|
||||||
|
└── tasks.json
|
||||||
|
```
|
||||||
|
|
||||||
|
### Task ID Specification
|
||||||
|
- Main tasks: Sequential integers (1, 2, 3, ...)
|
||||||
|
- Subtasks: Parent ID + dot + sequential integer (1.1, 1.2, 2.1, ...)
|
||||||
|
- ID references: Used in dependencies, command parameters
|
||||||
|
- ID ordering: Implies suggested implementation order
|
||||||
|
|
||||||
|
## Command-Line Interface Specification
|
||||||
|
|
||||||
|
### Global Options
|
||||||
|
- `--help`: Display help information
|
||||||
|
- `--version`: Display version information
|
||||||
|
- `--file=<file>`: Specify an alternative tasks.json file
|
||||||
|
- `--quiet`: Reduce output verbosity
|
||||||
|
- `--debug`: Increase output verbosity
|
||||||
|
- `--json`: Output in JSON format (for programmatic use)
|
||||||
|
|
||||||
|
### Command Structure
|
||||||
|
- `node scripts/dev.js <command> [options]`
|
||||||
|
- All commands operate on tasks.json by default
|
||||||
|
- Commands follow consistent parameter naming
|
||||||
|
- Common parameter styles: `--id=<id>`, `--status=<status>`, `--prompt="<text>"`
|
||||||
|
- Boolean flags: `--all`, `--force`, `--with-subtasks`
|
||||||
|
|
||||||
|
## API Integration Specifications
|
||||||
|
|
||||||
|
### Anthropic API Configuration
|
||||||
|
- Authentication: ANTHROPIC_API_KEY environment variable
|
||||||
|
- Model selection: MODEL environment variable
|
||||||
|
- Default model: claude-3-7-sonnet-20250219
|
||||||
|
- Maximum tokens: MAX_TOKENS environment variable (default: 4000)
|
||||||
|
- Temperature: TEMPERATURE environment variable (default: 0.7)
|
||||||
|
|
||||||
|
### Perplexity API Configuration
|
||||||
|
- Authentication: PERPLEXITY_API_KEY environment variable
|
||||||
|
- Model selection: PERPLEXITY_MODEL environment variable
|
||||||
|
- Default model: sonar-medium-online
|
||||||
|
- Connection: Via OpenAI client
|
||||||
|
- Fallback: Use Claude if Perplexity unavailable
|
||||||
|
</PRD>
|
||||||
357
.taskmaster/reports/task-complexity-report.json
Normal file
357
.taskmaster/reports/task-complexity-report.json
Normal file
@@ -0,0 +1,357 @@
|
|||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"generatedAt": "2025-05-22T05:48:33.026Z",
|
||||||
|
"tasksAnalyzed": 6,
|
||||||
|
"totalTasks": 88,
|
||||||
|
"analysisCount": 43,
|
||||||
|
"thresholdScore": 5,
|
||||||
|
"projectName": "Taskmaster",
|
||||||
|
"usedResearch": true
|
||||||
|
},
|
||||||
|
"complexityAnalysis": [
|
||||||
|
{
|
||||||
|
"taskId": 24,
|
||||||
|
"taskTitle": "Implement AI-Powered Test Generation Command",
|
||||||
|
"complexityScore": 7,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "Break down the implementation of the AI-powered test generation command into detailed subtasks covering: command structure setup, AI prompt engineering, test file generation logic, integration with Claude API, and comprehensive error handling.",
|
||||||
|
"reasoning": "This task involves complex integration with an AI service (Claude), requires sophisticated prompt engineering, and needs to generate structured code files. The existing 3 subtasks are a good start but could be expanded to include more detailed steps for AI integration, error handling, and test file formatting."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 26,
|
||||||
|
"taskTitle": "Implement Context Foundation for AI Operations",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 4,
|
||||||
|
"expansionPrompt": "The current 4 subtasks for implementing the context foundation appear comprehensive. Consider if any additional subtasks are needed for testing, documentation, or integration with existing systems.",
|
||||||
|
"reasoning": "This task involves creating a foundation for context integration with several well-defined components. The existing 4 subtasks cover the main implementation areas (context-file flag, cursor rules integration, context extraction utility, and command handler updates). The complexity is moderate as it requires careful integration with existing systems but has clear requirements."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 27,
|
||||||
|
"taskTitle": "Implement Context Enhancements for AI Operations",
|
||||||
|
"complexityScore": 7,
|
||||||
|
"recommendedSubtasks": 4,
|
||||||
|
"expansionPrompt": "The current 4 subtasks for implementing context enhancements appear well-structured. Consider if any additional subtasks are needed for testing, documentation, or performance optimization.",
|
||||||
|
"reasoning": "This task builds upon the foundation from Task #26 and adds more sophisticated context handling features. The 4 existing subtasks cover the main implementation areas (code context extraction, task history context, PRD context integration, and context formatting). The complexity is higher than the foundation task due to the need for intelligent context selection and optimization."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 28,
|
||||||
|
"taskTitle": "Implement Advanced ContextManager System",
|
||||||
|
"complexityScore": 8,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "The current 5 subtasks for implementing the advanced ContextManager system appear comprehensive. Consider if any additional subtasks are needed for testing, documentation, or backward compatibility with previous context implementations.",
|
||||||
|
"reasoning": "This task represents the most complex phase of the context implementation, requiring a sophisticated class design, optimization algorithms, and integration with multiple systems. The 5 existing subtasks cover the core implementation areas, but the complexity is high due to the need for intelligent context prioritization, token management, and performance monitoring."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 40,
|
||||||
|
"taskTitle": "Implement 'plan' Command for Task Implementation Planning",
|
||||||
|
"complexityScore": 5,
|
||||||
|
"recommendedSubtasks": 4,
|
||||||
|
"expansionPrompt": "The current 4 subtasks for implementing the 'plan' command appear well-structured. Consider if any additional subtasks are needed for testing, documentation, or integration with existing task management workflows.",
|
||||||
|
"reasoning": "This task involves creating a new command that leverages AI to generate implementation plans. The existing 4 subtasks cover the main implementation areas (retrieving task content, generating plans with AI, formatting in XML, and error handling). The complexity is moderate as it builds on existing patterns for task updates but requires careful AI integration."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 41,
|
||||||
|
"taskTitle": "Implement Visual Task Dependency Graph in Terminal",
|
||||||
|
"complexityScore": 8,
|
||||||
|
"recommendedSubtasks": 10,
|
||||||
|
"expansionPrompt": "The current 10 subtasks for implementing the visual task dependency graph appear comprehensive. Consider if any additional subtasks are needed for performance optimization with large graphs or additional visualization options.",
|
||||||
|
"reasoning": "This task involves creating a sophisticated visualization system for terminal display, which is inherently complex due to layout algorithms, ASCII/Unicode rendering, and handling complex dependency relationships. The 10 existing subtasks cover all major aspects of implementation, from CLI interface to accessibility features."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 42,
|
||||||
|
"taskTitle": "Implement MCP-to-MCP Communication Protocol",
|
||||||
|
"complexityScore": 9,
|
||||||
|
"recommendedSubtasks": 8,
|
||||||
|
"expansionPrompt": "The current 8 subtasks for implementing the MCP-to-MCP communication protocol appear well-structured. Consider if any additional subtasks are needed for security hardening, performance optimization, or comprehensive documentation.",
|
||||||
|
"reasoning": "This task involves designing and implementing a complex communication protocol between different MCP tools and servers. It requires sophisticated adapter patterns, client-server architecture, and handling of multiple operational modes. The complexity is very high due to the need for standardization, security, and backward compatibility."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 44,
|
||||||
|
"taskTitle": "Implement Task Automation with Webhooks and Event Triggers",
|
||||||
|
"complexityScore": 8,
|
||||||
|
"recommendedSubtasks": 7,
|
||||||
|
"expansionPrompt": "The current 7 subtasks for implementing task automation with webhooks appear comprehensive. Consider if any additional subtasks are needed for security testing, rate limiting implementation, or webhook monitoring tools.",
|
||||||
|
"reasoning": "This task involves creating a sophisticated event system with webhooks for integration with external services. The complexity is high due to the need for secure authentication, reliable delivery mechanisms, and handling of various webhook formats and protocols. The existing subtasks cover the main implementation areas but security and monitoring could be emphasized more."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 45,
|
||||||
|
"taskTitle": "Implement GitHub Issue Import Feature",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "The current 5 subtasks for implementing the GitHub issue import feature appear well-structured. Consider if any additional subtasks are needed for handling GitHub API rate limiting, caching, or supporting additional issue metadata.",
|
||||||
|
"reasoning": "This task involves integrating with the GitHub API to import issues as tasks. The complexity is moderate as it requires API authentication, data mapping, and error handling. The existing 5 subtasks cover the main implementation areas from design to end-to-end implementation."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 46,
|
||||||
|
"taskTitle": "Implement ICE Analysis Command for Task Prioritization",
|
||||||
|
"complexityScore": 7,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "The current 5 subtasks for implementing the ICE analysis command appear comprehensive. Consider if any additional subtasks are needed for visualization of ICE scores or integration with other prioritization methods.",
|
||||||
|
"reasoning": "This task involves creating an AI-powered analysis system for task prioritization using the ICE methodology. The complexity is high due to the need for sophisticated scoring algorithms, AI integration, and report generation. The existing subtasks cover the main implementation areas from algorithm design to integration with existing systems."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 47,
|
||||||
|
"taskTitle": "Enhance Task Suggestion Actions Card Workflow",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 6,
|
||||||
|
"expansionPrompt": "The current 6 subtasks for enhancing the task suggestion actions card workflow appear well-structured. Consider if any additional subtasks are needed for user testing, accessibility improvements, or performance optimization.",
|
||||||
|
"reasoning": "This task involves redesigning the UI workflow for task expansion and management. The complexity is moderate as it requires careful UX design and state management but builds on existing components. The 6 existing subtasks cover the main implementation areas from design to testing."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 48,
|
||||||
|
"taskTitle": "Refactor Prompts into Centralized Structure",
|
||||||
|
"complexityScore": 4,
|
||||||
|
"recommendedSubtasks": 3,
|
||||||
|
"expansionPrompt": "The current 3 subtasks for refactoring prompts into a centralized structure appear appropriate. Consider if any additional subtasks are needed for prompt versioning, documentation, or testing.",
|
||||||
|
"reasoning": "This task involves a straightforward refactoring to improve code organization. The complexity is relatively low as it primarily involves moving code rather than creating new functionality. The 3 existing subtasks cover the main implementation areas from directory structure to integration."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 49,
|
||||||
|
"taskTitle": "Implement Code Quality Analysis Command",
|
||||||
|
"complexityScore": 8,
|
||||||
|
"recommendedSubtasks": 6,
|
||||||
|
"expansionPrompt": "The current 6 subtasks for implementing the code quality analysis command appear comprehensive. Consider if any additional subtasks are needed for performance optimization with large codebases or integration with existing code quality tools.",
|
||||||
|
"reasoning": "This task involves creating a sophisticated code analysis system with pattern recognition, best practice verification, and AI-powered recommendations. The complexity is high due to the need for code parsing, complex analysis algorithms, and integration with AI services. The existing subtasks cover the main implementation areas from algorithm design to user interface."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 50,
|
||||||
|
"taskTitle": "Implement Test Coverage Tracking System by Task",
|
||||||
|
"complexityScore": 9,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "The current 5 subtasks for implementing the test coverage tracking system appear well-structured. Consider if any additional subtasks are needed for integration with CI/CD systems, performance optimization, or visualization tools.",
|
||||||
|
"reasoning": "This task involves creating a complex system that maps test coverage to specific tasks and subtasks. The complexity is very high due to the need for sophisticated data structures, integration with coverage tools, and AI-powered test generation. The existing subtasks are comprehensive and cover the main implementation areas from data structure design to AI integration."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 51,
|
||||||
|
"taskTitle": "Implement Perplexity Research Command",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "The current 5 subtasks for implementing the Perplexity research command appear comprehensive. Consider if any additional subtasks are needed for caching optimization, result formatting, or integration with other research tools.",
|
||||||
|
"reasoning": "This task involves creating a new command that integrates with the Perplexity AI API for research. The complexity is moderate as it requires API integration, context extraction, and result formatting. The 5 existing subtasks cover the main implementation areas from API client to caching system."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 52,
|
||||||
|
"taskTitle": "Implement Task Suggestion Command for CLI",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "The current 5 subtasks for implementing the task suggestion command appear well-structured. Consider if any additional subtasks are needed for suggestion quality evaluation, user feedback collection, or integration with existing task workflows.",
|
||||||
|
"reasoning": "This task involves creating a new CLI command that generates contextually relevant task suggestions using AI. The complexity is moderate as it requires AI integration, context collection, and interactive CLI interfaces. The existing subtasks cover the main implementation areas from data collection to user interface."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 53,
|
||||||
|
"taskTitle": "Implement Subtask Suggestion Feature for Parent Tasks",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 6,
|
||||||
|
"expansionPrompt": "The current 6 subtasks for implementing the subtask suggestion feature appear comprehensive. Consider if any additional subtasks are needed for suggestion quality metrics, user feedback collection, or performance optimization.",
|
||||||
|
"reasoning": "This task involves creating a feature that suggests contextually relevant subtasks for parent tasks. The complexity is moderate as it builds on existing task management systems but requires sophisticated AI integration and context analysis. The 6 existing subtasks cover the main implementation areas from validation to testing."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 55,
|
||||||
|
"taskTitle": "Implement Positional Arguments Support for CLI Commands",
|
||||||
|
"complexityScore": 5,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "The current 5 subtasks for implementing positional arguments support appear well-structured. Consider if any additional subtasks are needed for backward compatibility testing, documentation updates, or user experience improvements.",
|
||||||
|
"reasoning": "This task involves modifying the command parsing logic to support positional arguments alongside the existing flag-based syntax. The complexity is moderate as it requires careful handling of different argument styles and edge cases. The 5 existing subtasks cover the main implementation areas from analysis to documentation."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 57,
|
||||||
|
"taskTitle": "Enhance Task-Master CLI User Experience and Interface",
|
||||||
|
"complexityScore": 7,
|
||||||
|
"recommendedSubtasks": 6,
|
||||||
|
"expansionPrompt": "The current 6 subtasks for enhancing the CLI user experience appear comprehensive. Consider if any additional subtasks are needed for accessibility testing, internationalization, or performance optimization.",
|
||||||
|
"reasoning": "This task involves a significant overhaul of the CLI interface to improve user experience. The complexity is high due to the breadth of changes (logging, visual elements, interactive components, etc.) and the need for consistent design across all commands. The 6 existing subtasks cover the main implementation areas from log management to help systems."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 60,
|
||||||
|
"taskTitle": "Implement Mentor System with Round-Table Discussion Feature",
|
||||||
|
"complexityScore": 8,
|
||||||
|
"recommendedSubtasks": 7,
|
||||||
|
"expansionPrompt": "The current 7 subtasks for implementing the mentor system appear well-structured. Consider if any additional subtasks are needed for mentor personality consistency, discussion quality evaluation, or performance optimization with multiple mentors.",
|
||||||
|
"reasoning": "This task involves creating a sophisticated mentor simulation system with round-table discussions. The complexity is high due to the need for personality simulation, complex LLM integration, and structured discussion management. The 7 existing subtasks cover the main implementation areas from architecture to testing."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 62,
|
||||||
|
"taskTitle": "Add --simple Flag to Update Commands for Direct Text Input",
|
||||||
|
"complexityScore": 4,
|
||||||
|
"recommendedSubtasks": 8,
|
||||||
|
"expansionPrompt": "The current 8 subtasks for implementing the --simple flag appear comprehensive. Consider if any additional subtasks are needed for user experience testing or documentation updates.",
|
||||||
|
"reasoning": "This task involves adding a simple flag option to bypass AI processing for updates. The complexity is relatively low as it primarily involves modifying existing command handlers and adding a flag. The 8 existing subtasks are very detailed and cover all aspects of implementation from command parsing to testing."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 63,
|
||||||
|
"taskTitle": "Add pnpm Support for the Taskmaster Package",
|
||||||
|
"complexityScore": 5,
|
||||||
|
"recommendedSubtasks": 8,
|
||||||
|
"expansionPrompt": "The current 8 subtasks for adding pnpm support appear comprehensive. Consider if any additional subtasks are needed for CI/CD integration, performance comparison, or documentation updates.",
|
||||||
|
"reasoning": "This task involves ensuring the package works correctly with pnpm as an alternative package manager. The complexity is moderate as it requires careful testing of installation processes and scripts across different environments. The 8 existing subtasks cover all major aspects from documentation to binary verification."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 64,
|
||||||
|
"taskTitle": "Add Yarn Support for Taskmaster Installation",
|
||||||
|
"complexityScore": 5,
|
||||||
|
"recommendedSubtasks": 9,
|
||||||
|
"expansionPrompt": "The current 9 subtasks for adding Yarn support appear comprehensive. Consider if any additional subtasks are needed for performance testing, CI/CD integration, or compatibility with different Yarn versions.",
|
||||||
|
"reasoning": "This task involves ensuring the package works correctly with Yarn as an alternative package manager. The complexity is moderate as it requires careful testing of installation processes and scripts across different environments. The 9 existing subtasks are very detailed and cover all aspects from configuration to testing."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 65,
|
||||||
|
"taskTitle": "Add Bun Support for Taskmaster Installation",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 6,
|
||||||
|
"expansionPrompt": "The current 6 subtasks for adding Bun support appear well-structured. Consider if any additional subtasks are needed for handling Bun-specific issues, performance testing, or documentation updates.",
|
||||||
|
"reasoning": "This task involves adding support for the newer Bun package manager. The complexity is slightly higher than the other package manager tasks due to Bun's differences from Node.js and potential compatibility issues. The 6 existing subtasks cover the main implementation areas from research to documentation."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 67,
|
||||||
|
"taskTitle": "Add CLI JSON output and Cursor keybindings integration",
|
||||||
|
"complexityScore": 5,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "The current 5 subtasks for implementing JSON output and Cursor keybindings appear well-structured. Consider if any additional subtasks are needed for testing across different operating systems, documentation updates, or user experience improvements.",
|
||||||
|
"reasoning": "This task involves two distinct features: adding JSON output to CLI commands and creating a keybindings installation command. The complexity is moderate as it requires careful handling of different output formats and OS-specific file paths. The 5 existing subtasks cover the main implementation areas for both features."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 68,
|
||||||
|
"taskTitle": "Ability to create tasks without parsing PRD",
|
||||||
|
"complexityScore": 3,
|
||||||
|
"recommendedSubtasks": 2,
|
||||||
|
"expansionPrompt": "The current 2 subtasks for implementing task creation without PRD appear appropriate. Consider if any additional subtasks are needed for validation, error handling, or integration with existing task management workflows.",
|
||||||
|
"reasoning": "This task involves a relatively simple modification to allow task creation without requiring a PRD document. The complexity is low as it primarily involves creating a form interface and saving functionality. The 2 existing subtasks cover the main implementation areas of UI design and data saving."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 72,
|
||||||
|
"taskTitle": "Implement PDF Generation for Project Progress and Dependency Overview",
|
||||||
|
"complexityScore": 7,
|
||||||
|
"recommendedSubtasks": 6,
|
||||||
|
"expansionPrompt": "The current 6 subtasks for implementing PDF generation appear comprehensive. Consider if any additional subtasks are needed for handling large projects, additional visualization options, or integration with existing reporting tools.",
|
||||||
|
"reasoning": "This task involves creating a feature to generate PDF reports of project progress and dependency visualization. The complexity is high due to the need for PDF generation, data collection, and visualization integration. The 6 existing subtasks cover the main implementation areas from library selection to export options."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 75,
|
||||||
|
"taskTitle": "Integrate Google Search Grounding for Research Role",
|
||||||
|
"complexityScore": 5,
|
||||||
|
"recommendedSubtasks": 4,
|
||||||
|
"expansionPrompt": "The current 4 subtasks for integrating Google Search Grounding appear well-structured. Consider if any additional subtasks are needed for testing with different query types, error handling, or performance optimization.",
|
||||||
|
"reasoning": "This task involves updating the AI service layer to enable Google Search Grounding for research roles. The complexity is moderate as it requires careful integration with the existing AI service architecture and conditional logic. The 4 existing subtasks cover the main implementation areas from service layer modification to testing."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 76,
|
||||||
|
"taskTitle": "Develop E2E Test Framework for Taskmaster MCP Server (FastMCP over stdio)",
|
||||||
|
"complexityScore": 8,
|
||||||
|
"recommendedSubtasks": 7,
|
||||||
|
"expansionPrompt": "The current 7 subtasks for developing the E2E test framework appear comprehensive. Consider if any additional subtasks are needed for test result reporting, CI/CD integration, or performance benchmarking.",
|
||||||
|
"reasoning": "This task involves creating a sophisticated end-to-end testing framework for the MCP server. The complexity is high due to the need for subprocess management, protocol handling, and robust test case definition. The 7 existing subtasks cover the main implementation areas from architecture to documentation."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 77,
|
||||||
|
"taskTitle": "Implement AI Usage Telemetry for Taskmaster (with external analytics endpoint)",
|
||||||
|
"complexityScore": 7,
|
||||||
|
"recommendedSubtasks": 18,
|
||||||
|
"expansionPrompt": "The current 18 subtasks for implementing AI usage telemetry appear very comprehensive. Consider if any additional subtasks are needed for security hardening, privacy compliance, or user feedback collection.",
|
||||||
|
"reasoning": "This task involves creating a telemetry system to track AI usage metrics. The complexity is high due to the need for secure data transmission, comprehensive data collection, and integration across multiple commands. The 18 existing subtasks are extremely detailed and cover all aspects of implementation from core utility to provider-specific updates."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 80,
|
||||||
|
"taskTitle": "Implement Unique User ID Generation and Storage During Installation",
|
||||||
|
"complexityScore": 4,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "The current 5 subtasks for implementing unique user ID generation appear well-structured. Consider if any additional subtasks are needed for privacy compliance, security auditing, or integration with the telemetry system.",
|
||||||
|
"reasoning": "This task involves generating and storing a unique user identifier during installation. The complexity is relatively low as it primarily involves UUID generation and configuration file management. The 5 existing subtasks cover the main implementation areas from script structure to documentation."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 81,
|
||||||
|
"taskTitle": "Task #81: Implement Comprehensive Local Telemetry System with Future Server Integration Capability",
|
||||||
|
"complexityScore": 8,
|
||||||
|
"recommendedSubtasks": 6,
|
||||||
|
"expansionPrompt": "The current 6 subtasks for implementing the comprehensive local telemetry system appear well-structured. Consider if any additional subtasks are needed for data migration, storage optimization, or visualization tools.",
|
||||||
|
"reasoning": "This task involves expanding the telemetry system to capture additional metrics and implement local storage with future server integration capability. The complexity is high due to the breadth of data collection, storage requirements, and privacy considerations. The 6 existing subtasks cover the main implementation areas from data collection to user-facing benefits."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 82,
|
||||||
|
"taskTitle": "Update supported-models.json with token limit fields",
|
||||||
|
"complexityScore": 3,
|
||||||
|
"recommendedSubtasks": 1,
|
||||||
|
"expansionPrompt": "This task appears straightforward enough to be implemented without further subtasks. Focus on researching accurate token limit values for each model and ensuring backward compatibility.",
|
||||||
|
"reasoning": "This task involves a simple update to the supported-models.json file to include new token limit fields. The complexity is low as it primarily involves research and data entry. No subtasks are necessary as the task is well-defined and focused."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 83,
|
||||||
|
"taskTitle": "Update config-manager.js defaults and getters",
|
||||||
|
"complexityScore": 4,
|
||||||
|
"recommendedSubtasks": 1,
|
||||||
|
"expansionPrompt": "This task appears straightforward enough to be implemented without further subtasks. Focus on updating the DEFAULTS object and related getter functions while maintaining backward compatibility.",
|
||||||
|
"reasoning": "This task involves updating the config-manager.js module to replace maxTokens with more specific token limit fields. The complexity is relatively low as it primarily involves modifying existing code rather than creating new functionality. No subtasks are necessary as the task is well-defined and focused."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 84,
|
||||||
|
"taskTitle": "Implement token counting utility",
|
||||||
|
"complexityScore": 5,
|
||||||
|
"recommendedSubtasks": 1,
|
||||||
|
"expansionPrompt": "This task appears well-defined enough to be implemented without further subtasks. Focus on implementing accurate token counting for different models and proper fallback mechanisms.",
|
||||||
|
"reasoning": "This task involves creating a utility function to count tokens for different AI models. The complexity is moderate as it requires integration with the tiktoken library and handling different tokenization schemes. No subtasks are necessary as the task is well-defined and focused."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 69,
|
||||||
|
"taskTitle": "Enhance Analyze Complexity for Specific Task IDs",
|
||||||
|
"complexityScore": 7,
|
||||||
|
"recommendedSubtasks": 6,
|
||||||
|
"expansionPrompt": "Break down the task 'Enhance Analyze Complexity for Specific Task IDs' into 6 subtasks focusing on: 1) Core logic modification to accept ID parameters, 2) Report merging functionality, 3) CLI interface updates, 4) MCP tool integration, 5) Documentation updates, and 6) Comprehensive testing across all components.",
|
||||||
|
"reasoning": "This task involves modifying existing functionality across multiple components (core logic, CLI, MCP) with complex logic for filtering tasks and merging reports. The implementation requires careful handling of different parameter combinations and edge cases. The task has interdependent components that need to work together seamlessly, and the report merging functionality adds significant complexity."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 70,
|
||||||
|
"taskTitle": "Implement 'diagram' command for Mermaid diagram generation",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "Break down the 'diagram' command implementation into 5 subtasks: 1) Command interface and parameter handling, 2) Task data extraction and transformation to Mermaid syntax, 3) Diagram rendering with status color coding, 4) Output formatting and file export functionality, and 5) Error handling and edge case management.",
|
||||||
|
"reasoning": "This task requires implementing a new feature rather than modifying existing code, which reduces complexity from integration challenges. However, it involves working with visualization logic, dependency mapping, and multiple output formats. The color coding based on status and handling of dependency relationships adds moderate complexity. The task is well-defined but requires careful attention to diagram formatting and error handling."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 85,
|
||||||
|
"taskTitle": "Update ai-services-unified.js for dynamic token limits",
|
||||||
|
"complexityScore": 7,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "Break down the update of ai-services-unified.js for dynamic token limits into subtasks such as: (1) Import and integrate the token counting utility, (2) Refactor _unifiedServiceRunner to calculate and enforce dynamic token limits, (3) Update error handling for token limit violations, (4) Add and verify logging for token usage, (5) Write and execute tests for various prompt and model scenarios.",
|
||||||
|
"reasoning": "This task involves significant code changes to a core function, integration of a new utility, dynamic logic for multiple models, and robust error handling. It also requires comprehensive testing for edge cases and integration, making it moderately complex and best managed by splitting into focused subtasks."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 86,
|
||||||
|
"taskTitle": "Update .taskmasterconfig schema and user guide",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 4,
|
||||||
|
"expansionPrompt": "Expand this task into subtasks: (1) Draft a migration guide for users, (2) Update user documentation to explain new config fields, (3) Modify schema validation logic in config-manager.js, (4) Test and validate backward compatibility and error messaging.",
|
||||||
|
"reasoning": "The task spans documentation, schema changes, migration guidance, and validation logic. While not algorithmically complex, it requires careful coordination and thorough testing to ensure a smooth user transition and robust validation."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 87,
|
||||||
|
"taskTitle": "Implement validation and error handling",
|
||||||
|
"complexityScore": 5,
|
||||||
|
"recommendedSubtasks": 4,
|
||||||
|
"expansionPrompt": "Decompose this task into: (1) Add validation logic for model and config loading, (2) Implement error handling and fallback mechanisms, (3) Enhance logging and reporting for token usage, (4) Develop helper functions for configuration suggestions and improvements.",
|
||||||
|
"reasoning": "This task is primarily about adding validation, error handling, and logging. While important for robustness, the logic is straightforward and can be modularized into a few clear subtasks."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 89,
|
||||||
|
"taskTitle": "Introduce Prioritize Command with Enhanced Priority Levels",
|
||||||
|
"complexityScore": 6,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "Expand this task into: (1) Implement the prioritize command with all required flags and shorthands, (2) Update CLI output and help documentation for new priority levels, (3) Ensure backward compatibility with existing commands, (4) Add error handling for invalid inputs, (5) Write and run tests for all command scenarios.",
|
||||||
|
"reasoning": "This CLI feature requires command parsing, updating internal logic for new priority levels, documentation, and robust error handling. The complexity is moderate due to the need for backward compatibility and comprehensive testing."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 90,
|
||||||
|
"taskTitle": "Implement Subtask Progress Analyzer and Reporting System",
|
||||||
|
"complexityScore": 8,
|
||||||
|
"recommendedSubtasks": 6,
|
||||||
|
"expansionPrompt": "Break down the analyzer implementation into: (1) Design and implement progress tracking logic, (2) Develop status validation and issue detection, (3) Build the reporting system with multiple output formats, (4) Integrate analyzer with the existing task management system, (5) Optimize for performance and scalability, (6) Write unit, integration, and performance tests.",
|
||||||
|
"reasoning": "This is a complex, multi-faceted feature involving data analysis, reporting, integration, and performance optimization. It touches many parts of the system and requires careful design, making it one of the most complex tasks in the list."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskId": 91,
|
||||||
|
"taskTitle": "Implement Move Command for Tasks and Subtasks",
|
||||||
|
"complexityScore": 7,
|
||||||
|
"recommendedSubtasks": 5,
|
||||||
|
"expansionPrompt": "Expand this task into: (1) Implement move logic for tasks and subtasks, (2) Handle edge cases (invalid ids, non-existent parents, circular dependencies), (3) Update CLI to support move command with flags, (4) Ensure data integrity and update relationships, (5) Write and execute tests for various move scenarios.",
|
||||||
|
"reasoning": "Moving tasks and subtasks requires careful handling of hierarchical data, edge cases, and data integrity. The command must be robust and user-friendly, necessitating multiple focused subtasks for safe implementation."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
603
.taskmaster/tasks/task_024.txt
Normal file
603
.taskmaster/tasks/task_024.txt
Normal file
@@ -0,0 +1,603 @@
|
|||||||
|
# Task ID: 24
|
||||||
|
# Title: Implement AI-Powered Test Generation Command
|
||||||
|
# Status: pending
|
||||||
|
# Dependencies: 22
|
||||||
|
# Priority: high
|
||||||
|
# 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.
|
||||||
|
# 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:
|
||||||
|
|
||||||
|
1. Accept a task ID parameter to identify which task to generate tests for
|
||||||
|
2. Retrieve the task and its subtasks from the task store
|
||||||
|
3. Analyze the task description, details, and subtasks to understand implementation requirements
|
||||||
|
4. Construct an appropriate prompt for the AI service using Claude API
|
||||||
|
5. Process the AI response to create a well-formatted test file named 'task_XXX.test.ts' where XXX is the zero-padded task ID
|
||||||
|
6. Include appropriate test cases that cover the main functionality described in the task
|
||||||
|
7. Generate mocks for external dependencies identified in the task description
|
||||||
|
8. Create assertions that validate the expected behavior
|
||||||
|
9. Handle both parent tasks and subtasks appropriately (for subtasks, name the file 'task_XXX_YYY.test.ts' where YYY is the subtask ID)
|
||||||
|
10. Include error handling for API failures, invalid task IDs, etc.
|
||||||
|
11. Add appropriate documentation for the command in the help system
|
||||||
|
|
||||||
|
The 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.
|
||||||
|
|
||||||
|
# Test Strategy:
|
||||||
|
Testing for this feature should include:
|
||||||
|
|
||||||
|
1. Unit tests for the command handler function to verify it correctly processes arguments and options
|
||||||
|
2. Mock tests for the Claude API integration to ensure proper prompt construction and response handling
|
||||||
|
3. Integration tests that verify the end-to-end flow using a mock Claude API response
|
||||||
|
4. Tests for error conditions including:
|
||||||
|
- Invalid task IDs
|
||||||
|
- Network failures when contacting the AI service
|
||||||
|
- Malformed AI responses
|
||||||
|
- File system permission issues
|
||||||
|
5. Verification that generated test files follow Jest conventions and can be executed
|
||||||
|
6. Tests for both parent task and subtask handling
|
||||||
|
7. Manual verification of the quality of generated tests by running them against actual task implementations
|
||||||
|
|
||||||
|
Create 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.
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Create command structure for 'generate-test' [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Implement the basic structure for the 'generate-test' command, including command registration, parameter validation, and help documentation.
|
||||||
|
### Details:
|
||||||
|
Implementation steps:
|
||||||
|
1. Create a new file `src/commands/generate-test.ts`
|
||||||
|
2. Implement the command structure following the pattern of existing commands
|
||||||
|
3. Register the new command in the CLI framework
|
||||||
|
4. Add command options for task ID (--id=X) parameter
|
||||||
|
5. Implement parameter validation to ensure a valid task ID is provided
|
||||||
|
6. Add help documentation for the command
|
||||||
|
7. Create the basic command flow that retrieves the task from the task store
|
||||||
|
8. Implement error handling for invalid task IDs and other basic errors
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test command registration
|
||||||
|
- Test parameter validation (missing ID, invalid ID format)
|
||||||
|
- Test error handling for non-existent task IDs
|
||||||
|
- Test basic command flow with a mock task store
|
||||||
|
<info added on 2025-05-23T21:02:03.909Z>
|
||||||
|
## Updated Implementation Approach
|
||||||
|
|
||||||
|
Based on code review findings, the implementation approach needs to be revised:
|
||||||
|
|
||||||
|
1. Implement the command in `scripts/modules/commands.js` instead of creating a new file
|
||||||
|
2. Add command registration in the `registerCommands()` function (around line 482)
|
||||||
|
3. Follow existing command structure pattern:
|
||||||
|
```javascript
|
||||||
|
programInstance
|
||||||
|
.command('generate-test')
|
||||||
|
.description('Generate test cases for a task using AI')
|
||||||
|
.option('-f, --file <file>', 'Path to the tasks file', 'tasks/tasks.json')
|
||||||
|
.option('-i, --id <id>', 'Task ID parameter')
|
||||||
|
.option('-p, --prompt <text>', 'Additional prompt context')
|
||||||
|
.option('-r, --research', 'Use research model')
|
||||||
|
.action(async (options) => {
|
||||||
|
// Implementation
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Use the following utilities:
|
||||||
|
- `findProjectRoot()` for resolving project paths
|
||||||
|
- `findTaskById()` for retrieving task data
|
||||||
|
- `chalk` for formatted console output
|
||||||
|
|
||||||
|
5. Implement error handling following the pattern:
|
||||||
|
```javascript
|
||||||
|
try {
|
||||||
|
// Implementation
|
||||||
|
} catch (error) {
|
||||||
|
console.error(chalk.red(`Error generating test: ${error.message}`));
|
||||||
|
if (error.details) {
|
||||||
|
console.error(chalk.red(error.details));
|
||||||
|
}
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Required imports:
|
||||||
|
- chalk for colored output
|
||||||
|
- path for file path operations
|
||||||
|
- findProjectRoot and findTaskById from './utils.js'
|
||||||
|
</info added on 2025-05-23T21:02:03.909Z>
|
||||||
|
|
||||||
|
## 2. Implement AI prompt construction and FastMCP integration [pending]
|
||||||
|
### Dependencies: 24.1
|
||||||
|
### Description: Develop the logic to analyze tasks, construct appropriate AI prompts, and interact with the AI service using FastMCP to generate test content.
|
||||||
|
### Details:
|
||||||
|
Implementation steps:
|
||||||
|
1. Create a utility function to analyze task descriptions and subtasks for test requirements
|
||||||
|
2. Implement a prompt builder that formats task information into an effective AI prompt
|
||||||
|
3. Use FastMCP to send the prompt and receive the response
|
||||||
|
4. Process the FastMCP response to extract the generated test code
|
||||||
|
5. Implement error handling for FastMCP failures, rate limits, and malformed responses
|
||||||
|
6. Add appropriate logging for the FastMCP interaction process
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test prompt construction with various task types
|
||||||
|
- Test FastMCP integration with mocked responses
|
||||||
|
- Test error handling for FastMCP failures
|
||||||
|
- Test response processing with sample FastMCP outputs
|
||||||
|
<info added on 2025-05-23T21:04:33.890Z>
|
||||||
|
## AI Integration Implementation
|
||||||
|
|
||||||
|
### AI Service Integration
|
||||||
|
- Use the unified AI service layer, not FastMCP directly
|
||||||
|
- Implement with `generateObjectService` from '../ai-services-unified.js'
|
||||||
|
- Define Zod schema for structured test generation output:
|
||||||
|
- testContent: Complete Jest test file content
|
||||||
|
- fileName: Suggested filename for the test file
|
||||||
|
- mockRequirements: External dependencies that need mocking
|
||||||
|
|
||||||
|
### Prompt Construction
|
||||||
|
- Create system prompt defining AI's role as test generator
|
||||||
|
- Build user prompt with task context (ID, title, description, details)
|
||||||
|
- Include test strategy and subtasks context in the prompt
|
||||||
|
- Follow patterns from add-task.js for prompt structure
|
||||||
|
|
||||||
|
### Task Analysis
|
||||||
|
- Retrieve task data using `findTaskById()` from utils.js
|
||||||
|
- Build context by analyzing task description, details, and testStrategy
|
||||||
|
- Examine project structure for import patterns
|
||||||
|
- Parse specific testing requirements from task.testStrategy field
|
||||||
|
|
||||||
|
### File System Operations
|
||||||
|
- Determine output path in same directory as tasks.json
|
||||||
|
- Generate standardized filename based on task ID
|
||||||
|
- Use fs.writeFileSync for writing test content to file
|
||||||
|
|
||||||
|
### Error Handling & UI
|
||||||
|
- Implement try/catch blocks for AI service calls
|
||||||
|
- Display user-friendly error messages with chalk
|
||||||
|
- Use loading indicators during AI processing
|
||||||
|
- Support both research and main AI models
|
||||||
|
|
||||||
|
### Telemetry
|
||||||
|
- Pass through telemetryData from AI service response
|
||||||
|
- Display AI usage summary for CLI output
|
||||||
|
|
||||||
|
### Required Dependencies
|
||||||
|
- generateObjectService from ai-services-unified.js
|
||||||
|
- UI components (loading indicators, display functions)
|
||||||
|
- Zod for schema validation
|
||||||
|
- Chalk for formatted console output
|
||||||
|
</info added on 2025-05-23T21:04:33.890Z>
|
||||||
|
|
||||||
|
## 3. Implement test file generation and output [pending]
|
||||||
|
### Dependencies: 24.2
|
||||||
|
### Description: Create functionality to format AI-generated tests into proper Jest test files and save them to the appropriate location.
|
||||||
|
### Details:
|
||||||
|
Implementation steps:
|
||||||
|
1. Create a utility to format the FastMCP response into a well-structured Jest test file
|
||||||
|
2. Implement naming logic for test files (task_XXX.test.ts for parent tasks, task_XXX_YYY.test.ts for subtasks)
|
||||||
|
3. Add logic to determine the appropriate file path for saving the test
|
||||||
|
4. Implement file system operations to write the test file
|
||||||
|
5. Add validation to ensure the generated test follows Jest conventions
|
||||||
|
6. Implement formatting of the test file for consistency with project coding standards
|
||||||
|
7. Add user feedback about successful test generation and file location
|
||||||
|
8. Implement handling for both parent tasks and subtasks
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test file naming logic for various task/subtask combinations
|
||||||
|
- Test file content formatting with sample FastMCP outputs
|
||||||
|
- Test file system operations with mocked fs module
|
||||||
|
- Test the complete flow from command input to file output
|
||||||
|
- Verify generated tests can be executed by Jest
|
||||||
|
<info added on 2025-05-23T21:06:32.457Z>
|
||||||
|
## Detailed Implementation Guidelines
|
||||||
|
|
||||||
|
### File Naming Convention Implementation
|
||||||
|
```javascript
|
||||||
|
function generateTestFileName(taskId, isSubtask = false) {
|
||||||
|
if (isSubtask) {
|
||||||
|
// For subtasks like "24.1", generate "task_024_001.test.js"
|
||||||
|
const [parentId, subtaskId] = taskId.split('.');
|
||||||
|
return `task_${parentId.padStart(3, '0')}_${subtaskId.padStart(3, '0')}.test.js`;
|
||||||
|
} else {
|
||||||
|
// For parent tasks like "24", generate "task_024.test.js"
|
||||||
|
return `task_${taskId.toString().padStart(3, '0')}.test.js`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### File Location Strategy
|
||||||
|
- Place generated test files in the `tasks/` directory alongside task files
|
||||||
|
- This ensures co-location with task documentation and simplifies implementation
|
||||||
|
|
||||||
|
### File Content Structure Template
|
||||||
|
```javascript
|
||||||
|
/**
|
||||||
|
* Test file for Task ${taskId}: ${taskTitle}
|
||||||
|
* Generated automatically by Task Master
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { jest } from '@jest/globals';
|
||||||
|
// Additional imports based on task requirements
|
||||||
|
|
||||||
|
describe('Task ${taskId}: ${taskTitle}', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
// Setup code
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
// Cleanup code
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should ${testDescription}', () => {
|
||||||
|
// Test implementation
|
||||||
|
});
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### Code Formatting Standards
|
||||||
|
- Follow project's .prettierrc configuration:
|
||||||
|
- Tab width: 2 spaces (useTabs: true)
|
||||||
|
- Print width: 80 characters
|
||||||
|
- Semicolons: Required (semi: true)
|
||||||
|
- Quotes: Single quotes (singleQuote: true)
|
||||||
|
- Trailing commas: None (trailingComma: "none")
|
||||||
|
- Bracket spacing: True
|
||||||
|
- Arrow parens: Always
|
||||||
|
|
||||||
|
### File System Operations Implementation
|
||||||
|
```javascript
|
||||||
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
|
// Determine output path
|
||||||
|
const tasksDir = path.dirname(tasksPath); // Same directory as tasks.json
|
||||||
|
const fileName = generateTestFileName(task.id, isSubtask);
|
||||||
|
const filePath = path.join(tasksDir, fileName);
|
||||||
|
|
||||||
|
// Ensure directory exists
|
||||||
|
if (!fs.existsSync(tasksDir)) {
|
||||||
|
fs.mkdirSync(tasksDir, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write test file with proper error handling
|
||||||
|
try {
|
||||||
|
fs.writeFileSync(filePath, formattedTestContent, 'utf8');
|
||||||
|
} catch (error) {
|
||||||
|
throw new Error(`Failed to write test file: ${error.message}`);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Error Handling for File Operations
|
||||||
|
```javascript
|
||||||
|
try {
|
||||||
|
// File writing operation
|
||||||
|
fs.writeFileSync(filePath, testContent, 'utf8');
|
||||||
|
} catch (error) {
|
||||||
|
if (error.code === 'ENOENT') {
|
||||||
|
throw new Error(`Directory does not exist: ${path.dirname(filePath)}`);
|
||||||
|
} else if (error.code === 'EACCES') {
|
||||||
|
throw new Error(`Permission denied writing to: ${filePath}`);
|
||||||
|
} else if (error.code === 'ENOSPC') {
|
||||||
|
throw new Error('Insufficient disk space to write test file');
|
||||||
|
} else {
|
||||||
|
throw new Error(`Failed to write test file: ${error.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### User Feedback Implementation
|
||||||
|
```javascript
|
||||||
|
// Success feedback
|
||||||
|
console.log(chalk.green('✅ Test file generated successfully:'));
|
||||||
|
console.log(chalk.cyan(` File: ${fileName}`));
|
||||||
|
console.log(chalk.cyan(` Location: ${filePath}`));
|
||||||
|
console.log(chalk.gray(` Size: ${testContent.length} characters`));
|
||||||
|
|
||||||
|
// Additional info
|
||||||
|
if (mockRequirements && mockRequirements.length > 0) {
|
||||||
|
console.log(chalk.yellow(` Mocks needed: ${mockRequirements.join(', ')}`));
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Content Validation Requirements
|
||||||
|
1. Jest Syntax Validation:
|
||||||
|
- Ensure proper describe/test structure
|
||||||
|
- Validate import statements
|
||||||
|
- Check for balanced brackets and parentheses
|
||||||
|
|
||||||
|
2. Code Quality Checks:
|
||||||
|
- Verify no syntax errors
|
||||||
|
- Ensure proper indentation
|
||||||
|
- Check for required imports
|
||||||
|
|
||||||
|
3. Test Completeness:
|
||||||
|
- At least one test case
|
||||||
|
- Proper test descriptions
|
||||||
|
- Appropriate assertions
|
||||||
|
|
||||||
|
### Required Dependencies
|
||||||
|
```javascript
|
||||||
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
import chalk from 'chalk';
|
||||||
|
import { log } from '../utils.js';
|
||||||
|
```
|
||||||
|
|
||||||
|
### Integration with Existing Patterns
|
||||||
|
Follow the pattern from `generate-task-files.js`:
|
||||||
|
1. Read task data using existing utilities
|
||||||
|
2. Process content with proper formatting
|
||||||
|
3. Write files with error handling
|
||||||
|
4. Provide feedback to user
|
||||||
|
5. Return success data for MCP integration
|
||||||
|
</info added on 2025-05-23T21:06:32.457Z>
|
||||||
|
<info added on 2025-05-23T21:18:25.369Z>
|
||||||
|
## Corrected Implementation Approach
|
||||||
|
|
||||||
|
### Updated File Location Strategy
|
||||||
|
|
||||||
|
**CORRECTION**: Tests should go in `/tests/` directory, not `/tasks/` directory.
|
||||||
|
|
||||||
|
Based on Jest configuration analysis:
|
||||||
|
- Jest is configured with `roots: ['<rootDir>/tests']`
|
||||||
|
- Test pattern: `**/?(*.)+(spec|test).js`
|
||||||
|
- Current test structure has `/tests/unit/`, `/tests/integration/`, etc.
|
||||||
|
|
||||||
|
### Recommended Directory Structure:
|
||||||
|
```
|
||||||
|
tests/
|
||||||
|
├── unit/ # Manual unit tests
|
||||||
|
├── integration/ # Manual integration tests
|
||||||
|
├── generated/ # AI-generated tests
|
||||||
|
│ ├── tasks/ # Generated task tests
|
||||||
|
│ │ ├── task_024.test.js
|
||||||
|
│ │ └── task_024_001.test.js
|
||||||
|
│ └── README.md # Explains generated tests
|
||||||
|
└── fixtures/ # Test fixtures
|
||||||
|
```
|
||||||
|
|
||||||
|
### Updated File Path Logic:
|
||||||
|
```javascript
|
||||||
|
// Determine output path - place in tests/generated/tasks/
|
||||||
|
const projectRoot = findProjectRoot() || '.';
|
||||||
|
const testsDir = path.join(projectRoot, 'tests', 'generated', 'tasks');
|
||||||
|
const fileName = generateTestFileName(task.id, isSubtask);
|
||||||
|
const filePath = path.join(testsDir, fileName);
|
||||||
|
|
||||||
|
// Ensure directory structure exists
|
||||||
|
if (!fs.existsSync(testsDir)) {
|
||||||
|
fs.mkdirSync(testsDir, { recursive: true });
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Testing Framework Configuration
|
||||||
|
|
||||||
|
The generate-test command should read the configured testing framework from `.taskmasterconfig`:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// Read testing framework from config
|
||||||
|
const config = getConfig(projectRoot);
|
||||||
|
const testingFramework = config.testingFramework || 'jest'; // Default to Jest
|
||||||
|
|
||||||
|
// Generate different templates based on framework
|
||||||
|
switch (testingFramework) {
|
||||||
|
case 'jest':
|
||||||
|
return generateJestTest(task, context);
|
||||||
|
case 'mocha':
|
||||||
|
return generateMochaTest(task, context);
|
||||||
|
case 'vitest':
|
||||||
|
return generateVitestTest(task, context);
|
||||||
|
default:
|
||||||
|
throw new Error(`Unsupported testing framework: ${testingFramework}`);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Framework-Specific Templates
|
||||||
|
|
||||||
|
**Jest Template** (current):
|
||||||
|
```javascript
|
||||||
|
/**
|
||||||
|
* Test file for Task ${taskId}: ${taskTitle}
|
||||||
|
* Generated automatically by Task Master
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { jest } from '@jest/globals';
|
||||||
|
// Task-specific imports
|
||||||
|
|
||||||
|
describe('Task ${taskId}: ${taskTitle}', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
jest.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should ${testDescription}', () => {
|
||||||
|
// Test implementation
|
||||||
|
});
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
**Mocha Template**:
|
||||||
|
```javascript
|
||||||
|
/**
|
||||||
|
* Test file for Task ${taskId}: ${taskTitle}
|
||||||
|
* Generated automatically by Task Master
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { expect } from 'chai';
|
||||||
|
import sinon from 'sinon';
|
||||||
|
// Task-specific imports
|
||||||
|
|
||||||
|
describe('Task ${taskId}: ${taskTitle}', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
sinon.restore();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should ${testDescription}', () => {
|
||||||
|
// Test implementation
|
||||||
|
});
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
**Vitest Template**:
|
||||||
|
```javascript
|
||||||
|
/**
|
||||||
|
* Test file for Task ${taskId}: ${taskTitle}
|
||||||
|
* Generated automatically by Task Master
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { describe, test, expect, vi, beforeEach } from 'vitest';
|
||||||
|
// Task-specific imports
|
||||||
|
|
||||||
|
describe('Task ${taskId}: ${taskTitle}', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
vi.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should ${testDescription}', () => {
|
||||||
|
// Test implementation
|
||||||
|
});
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### AI Prompt Enhancement for Mocking
|
||||||
|
|
||||||
|
To address the mocking challenge, enhance the AI prompt with project context:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const systemPrompt = `You are an expert at generating comprehensive test files. When generating tests, pay special attention to mocking external dependencies correctly.
|
||||||
|
|
||||||
|
CRITICAL MOCKING GUIDELINES:
|
||||||
|
1. Analyze the task requirements to identify external dependencies (APIs, databases, file system, etc.)
|
||||||
|
2. Mock external dependencies at the module level, not inline
|
||||||
|
3. Use the testing framework's mocking utilities (jest.mock(), sinon.stub(), vi.mock())
|
||||||
|
4. Create realistic mock data that matches the expected API responses
|
||||||
|
5. Test both success and error scenarios for mocked dependencies
|
||||||
|
6. Ensure mocks are cleared between tests to prevent test pollution
|
||||||
|
|
||||||
|
Testing Framework: ${testingFramework}
|
||||||
|
Project Structure: ${projectStructureContext}
|
||||||
|
`;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Integration with Future Features
|
||||||
|
|
||||||
|
This primitive command design enables:
|
||||||
|
1. **Automatic test generation**: `task-master add-task --with-test`
|
||||||
|
2. **Batch test generation**: `task-master generate-tests --all`
|
||||||
|
3. **Framework-agnostic**: Support multiple testing frameworks
|
||||||
|
4. **Smart mocking**: LLM analyzes dependencies and generates appropriate mocks
|
||||||
|
|
||||||
|
### Updated Implementation Requirements:
|
||||||
|
|
||||||
|
1. **Read testing framework** from `.taskmasterconfig`
|
||||||
|
2. **Create tests directory structure** if it doesn't exist
|
||||||
|
3. **Generate framework-specific templates** based on configuration
|
||||||
|
4. **Enhanced AI prompts** with mocking best practices
|
||||||
|
5. **Project structure analysis** for better import resolution
|
||||||
|
6. **Mock dependency detection** from task requirements
|
||||||
|
</info added on 2025-05-23T21:18:25.369Z>
|
||||||
|
|
||||||
|
## 4. Implement MCP tool integration for generate-test command [pending]
|
||||||
|
### Dependencies: 24.3
|
||||||
|
### Description: Create MCP server tool support for the generate-test command to enable integration with Claude Code and other MCP clients.
|
||||||
|
### Details:
|
||||||
|
Implementation steps:
|
||||||
|
1. Create direct function wrapper in mcp-server/src/core/direct-functions/
|
||||||
|
2. Create MCP tool registration in mcp-server/src/tools/
|
||||||
|
3. Add tool to the main tools index
|
||||||
|
4. Implement proper parameter validation and error handling
|
||||||
|
5. Ensure telemetry data is properly passed through
|
||||||
|
6. Add tool to MCP server registration
|
||||||
|
|
||||||
|
The MCP tool should support the same parameters as the CLI command:
|
||||||
|
- id: Task ID to generate tests for
|
||||||
|
- file: Path to tasks.json file
|
||||||
|
- research: Whether to use research model
|
||||||
|
- prompt: Additional context for test generation
|
||||||
|
|
||||||
|
Follow the existing pattern from other MCP tools like add-task.js and expand-task.js.
|
||||||
|
|
||||||
|
## 5. Add testing framework configuration to project initialization [pending]
|
||||||
|
### Dependencies: 24.3
|
||||||
|
### 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:
|
||||||
|
|
||||||
|
1. **Add Testing Framework Prompt to init.js**:
|
||||||
|
- Add interactive prompt asking users to choose testing framework
|
||||||
|
- Support Jest (default), Mocha + Chai, Vitest, Ava, Jasmine
|
||||||
|
- Include brief descriptions of each framework
|
||||||
|
- Allow --testing-framework flag for non-interactive mode
|
||||||
|
|
||||||
|
2. **Update .taskmasterconfig Template**:
|
||||||
|
- Add testingFramework field to configuration file
|
||||||
|
- Include default dependencies for each framework
|
||||||
|
- Store framework-specific configuration options
|
||||||
|
|
||||||
|
3. **Framework-Specific Setup**:
|
||||||
|
- Generate appropriate config files (jest.config.js, vitest.config.ts, etc.)
|
||||||
|
- Add framework dependencies to package.json suggestions
|
||||||
|
- Create sample test file for the chosen framework
|
||||||
|
|
||||||
|
4. **Integration Points**:
|
||||||
|
- Ensure generate-test command reads testingFramework from config
|
||||||
|
- Add validation to prevent conflicts between framework choices
|
||||||
|
- Support switching frameworks later via models command or separate config command
|
||||||
|
|
||||||
|
This makes the generate-test command truly framework-agnostic and sets up the foundation for --with-test flags in other commands.
|
||||||
|
<info added on 2025-05-23T21:22:02.048Z>
|
||||||
|
# Implementation Plan for Testing Framework Integration
|
||||||
|
|
||||||
|
## Code Structure
|
||||||
|
|
||||||
|
### 1. Update init.js
|
||||||
|
- Add testing framework prompt after addAliases prompt
|
||||||
|
- Implement framework selection with descriptions
|
||||||
|
- Support non-interactive mode with --testing-framework flag
|
||||||
|
- Create setupTestingFramework() function to handle framework-specific setup
|
||||||
|
|
||||||
|
### 2. Create New Module Files
|
||||||
|
- Create `scripts/modules/testing-frameworks.js` for framework templates and setup
|
||||||
|
- Add sample test generators for each supported framework
|
||||||
|
- Implement config file generation for each framework
|
||||||
|
|
||||||
|
### 3. Update Configuration Templates
|
||||||
|
- Modify `assets/.taskmasterconfig` to include testing fields:
|
||||||
|
```json
|
||||||
|
"testingFramework": "{{testingFramework}}",
|
||||||
|
"testingConfig": {
|
||||||
|
"framework": "{{testingFramework}}",
|
||||||
|
"setupFiles": [],
|
||||||
|
"testDirectory": "tests",
|
||||||
|
"testPattern": "**/*.test.js",
|
||||||
|
"coverage": {
|
||||||
|
"enabled": false,
|
||||||
|
"threshold": 80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Create Framework-Specific Templates
|
||||||
|
- `assets/jest.config.template.js`
|
||||||
|
- `assets/vitest.config.template.ts`
|
||||||
|
- `assets/.mocharc.template.json`
|
||||||
|
- `assets/ava.config.template.js`
|
||||||
|
- `assets/jasmine.json.template`
|
||||||
|
|
||||||
|
### 5. Update commands.js
|
||||||
|
- Add `--testing-framework <framework>` option to init command
|
||||||
|
- Add validation for supported frameworks
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
- Validate selected framework against supported list
|
||||||
|
- Handle existing config files gracefully with warning/overwrite prompt
|
||||||
|
- Provide recovery options if framework setup fails
|
||||||
|
- Add conflict detection for multiple testing frameworks
|
||||||
|
|
||||||
|
## Integration Points
|
||||||
|
- Ensure generate-test command reads testingFramework from config
|
||||||
|
- Prepare for future --with-test flag in other commands
|
||||||
|
- Support framework switching via config command
|
||||||
|
|
||||||
|
## Testing Requirements
|
||||||
|
- Unit tests for framework selection logic
|
||||||
|
- Integration tests for config file generation
|
||||||
|
- Validation tests for each supported framework
|
||||||
|
</info added on 2025-05-23T21:22:02.048Z>
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Task ID: 32
|
# Task ID: 32
|
||||||
# Title: Implement "learn" Command for Automatic Cursor Rule Generation
|
# Title: Implement "learn" Command for Automatic Cursor Rule Generation
|
||||||
# Status: pending
|
# Status: deferred
|
||||||
# Dependencies: None
|
# Dependencies: None
|
||||||
# Priority: high
|
# Priority: high
|
||||||
# Description: Create a new "learn" command that analyzes Cursor's chat history and code changes to automatically generate or update rule files in the .cursor/rules directory, following the cursor_rules.mdc template format. This command will help Cursor autonomously improve its ability to follow development standards by learning from successful implementations.
|
# Description: Create a new "learn" command that analyzes Cursor's chat history and code changes to automatically generate or update rule files in the .cursor/rules directory, following the cursor_rules.mdc template format. This command will help Cursor autonomously improve its ability to follow development standards by learning from successful implementations.
|
||||||
373
.taskmaster/tasks/task_041.txt
Normal file
373
.taskmaster/tasks/task_041.txt
Normal file
@@ -0,0 +1,373 @@
|
|||||||
|
# Task ID: 41
|
||||||
|
# Title: Implement Visual Task Dependency Graph in Terminal
|
||||||
|
# Status: pending
|
||||||
|
# Dependencies: None
|
||||||
|
# Priority: medium
|
||||||
|
# Description: Create a feature that renders task dependencies as a visual graph using ASCII/Unicode characters in the terminal, with color-coded nodes representing tasks and connecting lines showing dependency relationships.
|
||||||
|
# Details:
|
||||||
|
This implementation should include:
|
||||||
|
|
||||||
|
1. Create a new command `graph` or `visualize` that displays the dependency graph.
|
||||||
|
|
||||||
|
2. Design an ASCII/Unicode-based graph rendering system that:
|
||||||
|
- Represents each task as a node with its ID and abbreviated title
|
||||||
|
- Shows dependencies as directional lines between nodes (→, ↑, ↓, etc.)
|
||||||
|
- Uses color coding for different task statuses (e.g., green for completed, yellow for in-progress, red for blocked)
|
||||||
|
- Handles complex dependency chains with proper spacing and alignment
|
||||||
|
|
||||||
|
3. Implement layout algorithms to:
|
||||||
|
- Minimize crossing lines for better readability
|
||||||
|
- Properly space nodes to avoid overlapping
|
||||||
|
- Support both vertical and horizontal graph orientations (as a configurable option)
|
||||||
|
|
||||||
|
4. Add detection and highlighting of circular dependencies with a distinct color/pattern
|
||||||
|
|
||||||
|
5. Include a legend explaining the color coding and symbols used
|
||||||
|
|
||||||
|
6. Ensure the graph is responsive to terminal width, with options to:
|
||||||
|
- Automatically scale to fit the current terminal size
|
||||||
|
- Allow zooming in/out of specific sections for large graphs
|
||||||
|
- Support pagination or scrolling for very large dependency networks
|
||||||
|
|
||||||
|
7. Add options to filter the graph by:
|
||||||
|
- Specific task IDs or ranges
|
||||||
|
- Task status
|
||||||
|
- Dependency depth (e.g., show only direct dependencies or N levels deep)
|
||||||
|
|
||||||
|
8. Ensure accessibility by using distinct patterns in addition to colors for users with color vision deficiencies
|
||||||
|
|
||||||
|
9. Optimize performance for projects with many tasks and complex dependency relationships
|
||||||
|
|
||||||
|
# Test Strategy:
|
||||||
|
1. Unit Tests:
|
||||||
|
- Test the graph generation algorithm with various dependency structures
|
||||||
|
- Verify correct node placement and connection rendering
|
||||||
|
- Test circular dependency detection
|
||||||
|
- Verify color coding matches task statuses
|
||||||
|
|
||||||
|
2. Integration Tests:
|
||||||
|
- Test the command with projects of varying sizes (small, medium, large)
|
||||||
|
- Verify correct handling of different terminal sizes
|
||||||
|
- Test all filtering options
|
||||||
|
|
||||||
|
3. Visual Verification:
|
||||||
|
- Create test cases with predefined dependency structures and verify the visual output matches expected patterns
|
||||||
|
- Test with terminals of different sizes, including very narrow terminals
|
||||||
|
- Verify readability of complex graphs
|
||||||
|
|
||||||
|
4. Edge Cases:
|
||||||
|
- Test with no dependencies (single nodes only)
|
||||||
|
- Test with circular dependencies
|
||||||
|
- Test with very deep dependency chains
|
||||||
|
- Test with wide dependency networks (many parallel tasks)
|
||||||
|
- Test with the maximum supported number of tasks
|
||||||
|
|
||||||
|
5. Usability Testing:
|
||||||
|
- Have team members use the feature and provide feedback on readability and usefulness
|
||||||
|
- Test in different terminal emulators to ensure compatibility
|
||||||
|
- Verify the feature works in terminals with limited color support
|
||||||
|
|
||||||
|
6. Performance Testing:
|
||||||
|
- Measure rendering time for large projects
|
||||||
|
- Ensure reasonable performance with 100+ interconnected tasks
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. CLI Command Setup [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Design and implement the command-line interface for the dependency graph tool, including argument parsing and help documentation.
|
||||||
|
### Details:
|
||||||
|
Define commands for input file specification, output options, filtering, and other user-configurable parameters.
|
||||||
|
<info added on 2025-05-23T21:02:26.442Z>
|
||||||
|
Implement a new 'diagram' command (with 'graph' alias) in commands.js following the Commander.js pattern. The command should:
|
||||||
|
|
||||||
|
1. Import diagram-generator.js module functions for generating visual representations
|
||||||
|
2. Support multiple visualization types with --type option:
|
||||||
|
- dependencies: show task dependency relationships
|
||||||
|
- subtasks: show task/subtask hierarchy
|
||||||
|
- flow: show task workflow
|
||||||
|
- gantt: show timeline visualization
|
||||||
|
|
||||||
|
3. Include the following options:
|
||||||
|
- --task <id>: Filter diagram to show only specified task and its relationships
|
||||||
|
- --mermaid: Output raw Mermaid markdown for external rendering
|
||||||
|
- --visual: Render diagram directly in terminal
|
||||||
|
- --format <format>: Output format (text, svg, png)
|
||||||
|
|
||||||
|
4. Implement proper error handling and validation:
|
||||||
|
- Validate task IDs using existing taskExists() function
|
||||||
|
- Handle invalid option combinations
|
||||||
|
- Provide descriptive error messages
|
||||||
|
|
||||||
|
5. Integrate with UI components:
|
||||||
|
- Use ui.js display functions for consistent output formatting
|
||||||
|
- Apply chalk coloring for terminal output
|
||||||
|
- Use boxen formatting consistent with other commands
|
||||||
|
|
||||||
|
6. Handle file operations:
|
||||||
|
- Resolve file paths using findProjectRoot() pattern
|
||||||
|
- Support saving diagrams to files when appropriate
|
||||||
|
|
||||||
|
7. Include comprehensive help text following the established pattern in other commands
|
||||||
|
</info added on 2025-05-23T21:02:26.442Z>
|
||||||
|
|
||||||
|
## 2. Graph Layout Algorithms [pending]
|
||||||
|
### Dependencies: 41.1
|
||||||
|
### Description: Develop or integrate algorithms to compute optimal node and edge placement for clear and readable graph layouts in a terminal environment.
|
||||||
|
### Details:
|
||||||
|
Consider topological sorting, hierarchical, and force-directed layouts suitable for ASCII/Unicode rendering.
|
||||||
|
<info added on 2025-05-23T21:02:49.434Z>
|
||||||
|
Create a new diagram-generator.js module in the scripts/modules/ directory following Task Master's module architecture pattern. The module should include:
|
||||||
|
|
||||||
|
1. Core functions for generating Mermaid diagrams:
|
||||||
|
- generateDependencyGraph(tasks, options) - creates flowchart showing task dependencies
|
||||||
|
- generateSubtaskDiagram(task, options) - creates hierarchy diagram for subtasks
|
||||||
|
- generateProjectFlow(tasks, options) - creates overall project workflow
|
||||||
|
- generateGanttChart(tasks, options) - creates timeline visualization
|
||||||
|
|
||||||
|
2. Integration with existing Task Master data structures:
|
||||||
|
- Use the same task object format from task-manager.js
|
||||||
|
- Leverage dependency analysis from dependency-manager.js
|
||||||
|
- Support complexity scores from analyze-complexity functionality
|
||||||
|
- Handle both main tasks and subtasks with proper ID notation (parentId.subtaskId)
|
||||||
|
|
||||||
|
3. Layout algorithm considerations for Mermaid:
|
||||||
|
- Topological sorting for dependency flows
|
||||||
|
- Hierarchical layouts for subtask trees
|
||||||
|
- Circular dependency detection and highlighting
|
||||||
|
- Terminal width-aware formatting for ASCII fallback
|
||||||
|
|
||||||
|
4. Export functions following the existing module pattern at the bottom of the file
|
||||||
|
</info added on 2025-05-23T21:02:49.434Z>
|
||||||
|
|
||||||
|
## 3. ASCII/Unicode Rendering Engine [pending]
|
||||||
|
### Dependencies: 41.2
|
||||||
|
### Description: Implement rendering logic to display the dependency graph using ASCII and Unicode characters in the terminal.
|
||||||
|
### Details:
|
||||||
|
Support for various node and edge styles, and ensure compatibility with different terminal types.
|
||||||
|
<info added on 2025-05-23T21:03:10.001Z>
|
||||||
|
Extend ui.js with diagram display functions that integrate with Task Master's existing UI patterns:
|
||||||
|
|
||||||
|
1. Implement core diagram display functions:
|
||||||
|
- displayTaskDiagram(tasksPath, diagramType, options) as the main entry point
|
||||||
|
- displayMermaidCode(mermaidCode, title) for formatted code output with boxen
|
||||||
|
- displayDiagramLegend() to explain symbols and colors
|
||||||
|
|
||||||
|
2. Ensure UI consistency by:
|
||||||
|
- Using established chalk color schemes (blue/green/yellow/red)
|
||||||
|
- Applying boxen for consistent component formatting
|
||||||
|
- Following existing display function patterns (displayTaskById, displayComplexityReport)
|
||||||
|
- Utilizing cli-table3 for any diagram metadata tables
|
||||||
|
|
||||||
|
3. Address terminal rendering challenges:
|
||||||
|
- Implement ASCII/Unicode fallback when Mermaid rendering isn't available
|
||||||
|
- Respect terminal width constraints using process.stdout.columns
|
||||||
|
- Integrate with loading indicators via startLoadingIndicator/stopLoadingIndicator
|
||||||
|
|
||||||
|
4. Update task file generation to include Mermaid diagram sections in individual task files
|
||||||
|
|
||||||
|
5. Support both CLI and MCP output formats through the outputFormat parameter
|
||||||
|
</info added on 2025-05-23T21:03:10.001Z>
|
||||||
|
|
||||||
|
## 4. Color Coding Support [pending]
|
||||||
|
### Dependencies: 41.3
|
||||||
|
### Description: Add color coding to nodes and edges to visually distinguish types, statuses, or other attributes in the graph.
|
||||||
|
### Details:
|
||||||
|
Use ANSI escape codes for color; provide options for colorblind-friendly palettes.
|
||||||
|
<info added on 2025-05-23T21:03:35.762Z>
|
||||||
|
Integrate color coding with Task Master's existing status system:
|
||||||
|
|
||||||
|
1. Extend getStatusWithColor() in ui.js to support diagram contexts:
|
||||||
|
- Add 'diagram' parameter to determine rendering context
|
||||||
|
- Modify color intensity for better visibility in graph elements
|
||||||
|
|
||||||
|
2. Implement Task Master's established color scheme using ANSI codes:
|
||||||
|
- Green (\x1b[32m) for 'done'/'completed' tasks
|
||||||
|
- Yellow (\x1b[33m) for 'pending' tasks
|
||||||
|
- Orange (\x1b[38;5;208m) for 'in-progress' tasks
|
||||||
|
- Red (\x1b[31m) for 'blocked' tasks
|
||||||
|
- Gray (\x1b[90m) for 'deferred'/'cancelled' tasks
|
||||||
|
- Magenta (\x1b[35m) for 'review' tasks
|
||||||
|
|
||||||
|
3. Create diagram-specific color functions:
|
||||||
|
- getDependencyLineColor(fromTaskStatus, toTaskStatus) - color dependency arrows based on relationship status
|
||||||
|
- getNodeBorderColor(task) - style node borders using priority/complexity indicators
|
||||||
|
- getSubtaskGroupColor(parentTask) - visually group related subtasks
|
||||||
|
|
||||||
|
4. Integrate complexity visualization:
|
||||||
|
- Use getComplexityWithColor() for node background or border thickness
|
||||||
|
- Map complexity scores to visual weight in the graph
|
||||||
|
|
||||||
|
5. Ensure accessibility:
|
||||||
|
- Add text-based indicators (symbols like ✓, ⚠, ⏳) alongside colors
|
||||||
|
- Implement colorblind-friendly palettes as user-selectable option
|
||||||
|
- Include shape variations for different statuses
|
||||||
|
|
||||||
|
6. Follow existing ANSI patterns:
|
||||||
|
- Maintain consistency with terminal UI color usage
|
||||||
|
- Reuse color constants from the codebase
|
||||||
|
|
||||||
|
7. Support graceful degradation:
|
||||||
|
- Check terminal capabilities using existing detection
|
||||||
|
- Provide monochrome fallbacks with distinctive patterns
|
||||||
|
- Use bold/underline as alternatives when colors unavailable
|
||||||
|
</info added on 2025-05-23T21:03:35.762Z>
|
||||||
|
|
||||||
|
## 5. Circular Dependency Detection [pending]
|
||||||
|
### Dependencies: 41.2
|
||||||
|
### Description: Implement algorithms to detect and highlight circular dependencies within the graph.
|
||||||
|
### Details:
|
||||||
|
Clearly mark cycles in the rendered output and provide warnings or errors as appropriate.
|
||||||
|
<info added on 2025-05-23T21:04:20.125Z>
|
||||||
|
Integrate with Task Master's existing circular dependency detection:
|
||||||
|
|
||||||
|
1. Import the dependency detection logic from dependency-manager.js module
|
||||||
|
2. Utilize the findCycles function from utils.js or dependency-manager.js
|
||||||
|
3. Extend validateDependenciesCommand functionality to highlight cycles in diagrams
|
||||||
|
|
||||||
|
Visual representation in Mermaid diagrams:
|
||||||
|
- Apply red/bold styling to nodes involved in dependency cycles
|
||||||
|
- Add warning annotations to cyclic edges
|
||||||
|
- Implement cycle path highlighting with distinctive line styles
|
||||||
|
|
||||||
|
Integration with validation workflow:
|
||||||
|
- Execute dependency validation before diagram generation
|
||||||
|
- Display cycle warnings consistent with existing CLI error messaging
|
||||||
|
- Utilize chalk.red and boxen for error highlighting following established patterns
|
||||||
|
|
||||||
|
Add diagram legend entries that explain cycle notation and warnings
|
||||||
|
|
||||||
|
Ensure detection of cycles in both:
|
||||||
|
- Main task dependencies
|
||||||
|
- Subtask dependencies within parent tasks
|
||||||
|
|
||||||
|
Follow Task Master's error handling patterns for graceful cycle reporting and user notification
|
||||||
|
</info added on 2025-05-23T21:04:20.125Z>
|
||||||
|
|
||||||
|
## 6. Filtering and Search Functionality [pending]
|
||||||
|
### Dependencies: 41.1, 41.2
|
||||||
|
### Description: Enable users to filter nodes and edges by criteria such as name, type, or dependency depth.
|
||||||
|
### Details:
|
||||||
|
Support command-line flags for filtering and interactive search if feasible.
|
||||||
|
<info added on 2025-05-23T21:04:57.811Z>
|
||||||
|
Implement MCP tool integration for task dependency visualization:
|
||||||
|
|
||||||
|
1. Create task_diagram.js in mcp-server/src/tools/ following existing tool patterns
|
||||||
|
2. Implement taskDiagramDirect.js in mcp-server/src/core/direct-functions/
|
||||||
|
3. Use Zod schema for parameter validation:
|
||||||
|
- diagramType (dependencies, subtasks, flow, gantt)
|
||||||
|
- taskId (optional string)
|
||||||
|
- format (mermaid, text, json)
|
||||||
|
- includeComplexity (boolean)
|
||||||
|
|
||||||
|
4. Structure response data with:
|
||||||
|
- mermaidCode for client-side rendering
|
||||||
|
- metadata (nodeCount, edgeCount, cycleWarnings)
|
||||||
|
- support for both task-specific and project-wide diagrams
|
||||||
|
|
||||||
|
5. Integrate with session management and project root handling
|
||||||
|
6. Implement error handling using handleApiResult pattern
|
||||||
|
7. Register the tool in tools/index.js
|
||||||
|
|
||||||
|
Maintain compatibility with existing command-line flags for filtering and interactive search.
|
||||||
|
</info added on 2025-05-23T21:04:57.811Z>
|
||||||
|
|
||||||
|
## 7. Accessibility Features [pending]
|
||||||
|
### Dependencies: 41.3, 41.4
|
||||||
|
### Description: Ensure the tool is accessible, including support for screen readers, high-contrast modes, and keyboard navigation.
|
||||||
|
### Details:
|
||||||
|
Provide alternative text output and ensure color is not the sole means of conveying information.
|
||||||
|
<info added on 2025-05-23T21:05:54.584Z>
|
||||||
|
# Accessibility and Export Integration
|
||||||
|
|
||||||
|
## Accessibility Features
|
||||||
|
- Provide alternative text output for visual elements
|
||||||
|
- Ensure color is not the sole means of conveying information
|
||||||
|
- Support keyboard navigation through the dependency graph
|
||||||
|
- Add screen reader compatible node descriptions
|
||||||
|
|
||||||
|
## Export Integration
|
||||||
|
- Extend generateTaskFiles function in task-manager.js to include Mermaid diagram sections
|
||||||
|
- Add Mermaid code blocks to task markdown files under ## Diagrams header
|
||||||
|
- Follow existing task file generation patterns and markdown structure
|
||||||
|
- Support multiple diagram types per task file:
|
||||||
|
* Task dependencies (prerequisite relationships)
|
||||||
|
* Subtask hierarchy visualization
|
||||||
|
* Task flow context in project workflow
|
||||||
|
- Integrate with existing fs module file writing operations
|
||||||
|
- Add diagram export options to the generate command in commands.js
|
||||||
|
- Support SVG and PNG export using Mermaid CLI when available
|
||||||
|
- Implement error handling for diagram generation failures
|
||||||
|
- Reference exported diagrams in task markdown with proper paths
|
||||||
|
- Update CLI generate command with options like --include-diagrams
|
||||||
|
</info added on 2025-05-23T21:05:54.584Z>
|
||||||
|
|
||||||
|
## 8. Performance Optimization [pending]
|
||||||
|
### Dependencies: 41.2, 41.3, 41.4, 41.5, 41.6
|
||||||
|
### Description: Profile and optimize the tool for large graphs to ensure responsive rendering and low memory usage.
|
||||||
|
### Details:
|
||||||
|
Implement lazy loading, efficient data structures, and parallel processing where appropriate.
|
||||||
|
<info added on 2025-05-23T21:06:14.533Z>
|
||||||
|
# Mermaid Library Integration and Terminal-Specific Handling
|
||||||
|
|
||||||
|
## Package Dependencies
|
||||||
|
- Add mermaid package as an optional dependency in package.json for generating raw Mermaid diagram code
|
||||||
|
- Consider mermaid-cli for SVG/PNG conversion capabilities
|
||||||
|
- Evaluate terminal-image or similar libraries for terminals with image support
|
||||||
|
- Explore ascii-art-ansi or box-drawing character libraries for text-only terminals
|
||||||
|
|
||||||
|
## Terminal Capability Detection
|
||||||
|
- Leverage existing terminal detection from ui.js to assess rendering capabilities
|
||||||
|
- Implement detection for:
|
||||||
|
- iTerm2 and other terminals with image protocol support
|
||||||
|
- Terminals with Unicode/extended character support
|
||||||
|
- Basic terminals requiring pure ASCII output
|
||||||
|
|
||||||
|
## Rendering Strategy with Fallbacks
|
||||||
|
1. Primary: Generate raw Mermaid code for user copy/paste
|
||||||
|
2. Secondary: Render simplified ASCII tree/flow representation using box characters
|
||||||
|
3. Tertiary: Present dependencies in tabular format for minimal terminals
|
||||||
|
|
||||||
|
## Implementation Approach
|
||||||
|
- Use dynamic imports for optional rendering libraries to maintain lightweight core
|
||||||
|
- Implement graceful degradation when optional packages aren't available
|
||||||
|
- Follow Task Master's philosophy of minimal dependencies
|
||||||
|
- Ensure performance optimization through lazy loading where appropriate
|
||||||
|
- Design modular rendering components that can be swapped based on terminal capabilities
|
||||||
|
</info added on 2025-05-23T21:06:14.533Z>
|
||||||
|
|
||||||
|
## 9. Documentation [pending]
|
||||||
|
### Dependencies: 41.1, 41.2, 41.3, 41.4, 41.5, 41.6, 41.7, 41.8
|
||||||
|
### Description: Write comprehensive user and developer documentation covering installation, usage, configuration, and extension.
|
||||||
|
### Details:
|
||||||
|
Include examples, troubleshooting, and contribution guidelines.
|
||||||
|
|
||||||
|
## 10. Testing and Validation [pending]
|
||||||
|
### Dependencies: 41.1, 41.2, 41.3, 41.4, 41.5, 41.6, 41.7, 41.8, 41.9
|
||||||
|
### Description: Develop automated tests for all major features, including CLI parsing, layout correctness, rendering, color coding, filtering, and cycle detection.
|
||||||
|
### Details:
|
||||||
|
Include unit, integration, and regression tests; validate accessibility and performance claims.
|
||||||
|
<info added on 2025-05-23T21:08:36.329Z>
|
||||||
|
# Documentation Tasks for Visual Task Dependency Graph
|
||||||
|
|
||||||
|
## User Documentation
|
||||||
|
1. Update README.md with diagram command documentation following existing command reference format
|
||||||
|
2. Add examples to CLI command help text in commands.js matching patterns from other commands
|
||||||
|
3. Create docs/diagrams.md with detailed usage guide including:
|
||||||
|
- Command examples for each diagram type
|
||||||
|
- Mermaid code samples and output
|
||||||
|
- Terminal compatibility notes
|
||||||
|
- Integration with task workflow examples
|
||||||
|
- Troubleshooting section for common diagram rendering issues
|
||||||
|
- Accessibility features and terminal fallback options
|
||||||
|
|
||||||
|
## Developer Documentation
|
||||||
|
1. Update MCP tool documentation to include the new task_diagram tool
|
||||||
|
2. Add JSDoc comments to all new functions following existing code standards
|
||||||
|
3. Create contributor documentation for extending diagram types
|
||||||
|
4. Update API documentation for any new MCP interface endpoints
|
||||||
|
|
||||||
|
## Integration Documentation
|
||||||
|
1. Document integration with existing commands (analyze-complexity, generate, etc.)
|
||||||
|
2. Provide examples showing how diagrams complement other Task Master features
|
||||||
|
</info added on 2025-05-23T21:08:36.329Z>
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Task ID: 43
|
# Task ID: 43
|
||||||
# Title: Add Research Flag to Add-Task Command
|
# Title: Add Research Flag to Add-Task Command
|
||||||
# Status: pending
|
# Status: done
|
||||||
# Dependencies: None
|
# Dependencies: None
|
||||||
# Priority: medium
|
# Priority: medium
|
||||||
# Description: Implement a '--research' flag for the add-task command that enables users to automatically generate research-related subtasks when creating a new task.
|
# Description: Implement a '--research' flag for the add-task command that enables users to automatically generate research-related subtasks when creating a new task.
|
||||||
94
.taskmaster/tasks/task_044.txt
Normal file
94
.taskmaster/tasks/task_044.txt
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# Task ID: 44
|
||||||
|
# Title: Implement Task Automation with Webhooks and Event Triggers
|
||||||
|
# Status: pending
|
||||||
|
# Dependencies: None
|
||||||
|
# Priority: medium
|
||||||
|
# Description: Design and implement a system that allows users to automate task actions through webhooks and event triggers, enabling integration with external services and automated workflows.
|
||||||
|
# Details:
|
||||||
|
This feature will enable users to create automated workflows based on task events and external triggers. Implementation should include:
|
||||||
|
|
||||||
|
1. A webhook registration system that allows users to specify URLs to be called when specific task events occur (creation, status change, completion, etc.)
|
||||||
|
2. An event system that captures and processes all task-related events
|
||||||
|
3. A trigger definition interface where users can define conditions for automation (e.g., 'When task X is completed, create task Y')
|
||||||
|
4. Support for both incoming webhooks (external services triggering actions in Taskmaster) and outgoing webhooks (Taskmaster notifying external services)
|
||||||
|
5. A secure authentication mechanism for webhook calls
|
||||||
|
6. Rate limiting and retry logic for failed webhook deliveries
|
||||||
|
7. Integration with the existing task management system
|
||||||
|
8. Command-line interface for managing webhooks and triggers
|
||||||
|
9. Payload templating system allowing users to customize the data sent in webhooks
|
||||||
|
10. Logging system for webhook activities and failures
|
||||||
|
|
||||||
|
The implementation should be compatible with both the solo/local mode and the multiplayer/remote mode, with appropriate adaptations for each context. When operating in MCP mode, the system should leverage the MCP communication protocol implemented in Task #42.
|
||||||
|
|
||||||
|
# Test Strategy:
|
||||||
|
Testing should verify both the functionality and security of the webhook system:
|
||||||
|
|
||||||
|
1. Unit tests:
|
||||||
|
- Test webhook registration, modification, and deletion
|
||||||
|
- Verify event capturing for all task operations
|
||||||
|
- Test payload generation and templating
|
||||||
|
- Validate authentication logic
|
||||||
|
|
||||||
|
2. Integration tests:
|
||||||
|
- Set up a mock server to receive webhooks and verify payload contents
|
||||||
|
- Test the complete flow from task event to webhook delivery
|
||||||
|
- Verify rate limiting and retry behavior with intentionally failing endpoints
|
||||||
|
- Test webhook triggers creating new tasks and modifying existing ones
|
||||||
|
|
||||||
|
3. Security tests:
|
||||||
|
- Verify that authentication tokens are properly validated
|
||||||
|
- Test for potential injection vulnerabilities in webhook payloads
|
||||||
|
- Verify that sensitive information is not leaked in webhook payloads
|
||||||
|
- Test rate limiting to prevent DoS attacks
|
||||||
|
|
||||||
|
4. Mode-specific tests:
|
||||||
|
- Verify correct operation in both solo/local and multiplayer/remote modes
|
||||||
|
- Test the interaction with MCP protocol when in multiplayer mode
|
||||||
|
|
||||||
|
5. Manual verification:
|
||||||
|
- Set up integrations with common services (GitHub, Slack, etc.) to verify real-world functionality
|
||||||
|
- Verify that the CLI interface for managing webhooks works as expected
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Design webhook registration API endpoints [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create API endpoints for registering, updating, and deleting webhook subscriptions
|
||||||
|
### Details:
|
||||||
|
Implement RESTful API endpoints that allow clients to register webhook URLs, specify event types they want to subscribe to, and manage their subscriptions. Include validation for URL format, required parameters, and authentication requirements.
|
||||||
|
|
||||||
|
## 2. Implement webhook authentication and security measures [pending]
|
||||||
|
### Dependencies: 44.1
|
||||||
|
### Description: Develop security mechanisms for webhook verification and payload signing
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 3. Create event trigger definition interface [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Design and implement the interface for defining event triggers and conditions
|
||||||
|
### Details:
|
||||||
|
Develop a user interface or API that allows defining what events should trigger webhooks. Include support for conditional triggers based on event properties, filtering options, and the ability to specify payload formats.
|
||||||
|
|
||||||
|
## 4. Build event processing and queuing system [pending]
|
||||||
|
### Dependencies: 44.1, 44.3
|
||||||
|
### Description: Implement a robust system for processing and queuing events before webhook delivery
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 5. Develop webhook delivery and retry mechanism [pending]
|
||||||
|
### Dependencies: 44.2, 44.4
|
||||||
|
### Description: Create a reliable system for webhook delivery with retry logic and failure handling
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 6. Implement comprehensive error handling and logging [pending]
|
||||||
|
### Dependencies: 44.5
|
||||||
|
### Description: Create robust error handling, logging, and monitoring for the webhook system
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 7. Create webhook testing and simulation tools [pending]
|
||||||
|
### Dependencies: 44.3, 44.5, 44.6
|
||||||
|
### Description: Develop tools for testing webhook integrations and simulating event triggers
|
||||||
|
### 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.
|
||||||
|
|
||||||
@@ -53,3 +53,35 @@ Testing should cover the following scenarios:
|
|||||||
- Test the interaction with other flags and commands
|
- Test the interaction with other flags and commands
|
||||||
|
|
||||||
Create mock GitHub API responses for testing to avoid hitting rate limits during development and testing. Use environment variables to configure test credentials if needed.
|
Create mock GitHub API responses for testing to avoid hitting rate limits during development and testing. Use environment variables to configure test credentials if needed.
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Design GitHub API integration architecture [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create a technical design document outlining the architecture for GitHub API integration, including authentication flow, rate limiting considerations, and error handling strategies.
|
||||||
|
### Details:
|
||||||
|
Document should include: API endpoints to be used, authentication method (OAuth vs Personal Access Token), data flow diagrams, and security considerations. Research GitHub API rate limits and implement appropriate throttling mechanisms.
|
||||||
|
|
||||||
|
## 2. Implement GitHub URL parsing and validation [pending]
|
||||||
|
### Dependencies: 45.1
|
||||||
|
### Description: Create a module to parse and validate GitHub issue URLs, extracting repository owner, repository name, and issue number.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 3. Develop GitHub API client for issue fetching [pending]
|
||||||
|
### Dependencies: 45.1, 45.2
|
||||||
|
### Description: Create a service to authenticate with GitHub and fetch issue details using the GitHub REST API.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 4. Create task formatter for GitHub issues [pending]
|
||||||
|
### Dependencies: 45.3
|
||||||
|
### Description: Develop a formatter to convert GitHub issue data into the application's task format.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 5. Implement end-to-end import flow with UI [pending]
|
||||||
|
### Dependencies: 45.4
|
||||||
|
### Description: Create the user interface and workflow for importing GitHub issues, including progress indicators and error handling.
|
||||||
|
### 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.
|
||||||
|
|
||||||
@@ -53,3 +53,35 @@ The command should follow the same design patterns as `analyze-complexity` for c
|
|||||||
- The ranking should prioritize high-impact, high-confidence, easy-to-implement tasks
|
- The ranking should prioritize high-impact, high-confidence, easy-to-implement tasks
|
||||||
- Performance should be acceptable even with a large number of tasks
|
- Performance should be acceptable even with a large number of tasks
|
||||||
- The command should handle edge cases gracefully (empty projects, missing data)
|
- The command should handle edge cases gracefully (empty projects, missing data)
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Design ICE scoring algorithm [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create the algorithm for calculating Impact, Confidence, and Ease scores for tasks
|
||||||
|
### Details:
|
||||||
|
Define the mathematical formula for ICE scoring (Impact × Confidence × Ease). Determine the scale for each component (e.g., 1-10). Create rules for how AI will evaluate each component based on task attributes like complexity, dependencies, and descriptions. Document the scoring methodology for future reference.
|
||||||
|
|
||||||
|
## 2. Implement AI integration for ICE scoring [pending]
|
||||||
|
### Dependencies: 46.1
|
||||||
|
### Description: Develop the AI component that will analyze tasks and generate ICE scores
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 3. Create report file generator [pending]
|
||||||
|
### Dependencies: 46.2
|
||||||
|
### Description: Build functionality to generate a structured report file with ICE analysis results
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 4. Implement CLI rendering for ICE analysis [pending]
|
||||||
|
### Dependencies: 46.3
|
||||||
|
### Description: Develop the command-line interface for displaying ICE analysis results
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 5. Integrate with existing complexity reports [pending]
|
||||||
|
### Dependencies: 46.3, 46.4
|
||||||
|
### Description: Connect the ICE analysis functionality with the existing complexity reporting system
|
||||||
|
### 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.
|
||||||
|
|
||||||
@@ -64,3 +64,41 @@ Testing should verify the complete workflow functions correctly:
|
|||||||
5. Regression Testing:
|
5. Regression Testing:
|
||||||
- Verify that existing functionality continues to work
|
- Verify that existing functionality continues to work
|
||||||
- Ensure compatibility with keyboard shortcuts and accessibility features
|
- Ensure compatibility with keyboard shortcuts and accessibility features
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Design Task Expansion UI Components [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create UI components for the expanded task suggestion actions card that allow for task breakdown and additional context input.
|
||||||
|
### Details:
|
||||||
|
Design mockups for expanded card view, including subtask creation interface, context input fields, and task management controls. Ensure the design is consistent with existing UI patterns and responsive across different screen sizes. Include animations for card expansion/collapse.
|
||||||
|
|
||||||
|
## 2. Implement State Management for Task Expansion [pending]
|
||||||
|
### Dependencies: 47.1
|
||||||
|
### Description: Develop the state management logic to handle expanded task states, subtask creation, and context additions.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 3. Build Context Addition Functionality [pending]
|
||||||
|
### Dependencies: 47.2
|
||||||
|
### Description: Create the functionality that allows users to add additional context to tasks and subtasks.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 4. Develop Task Management Controls [pending]
|
||||||
|
### Dependencies: 47.2
|
||||||
|
### Description: Implement controls for managing tasks within the expanded card view, including prioritization, scheduling, and assignment.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 5. Integrate with Existing Task Systems [pending]
|
||||||
|
### Dependencies: 47.3, 47.4
|
||||||
|
### Description: Ensure the enhanced actions card workflow integrates seamlessly with existing task management functionality.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 6. Test and Optimize User Experience [pending]
|
||||||
|
### Dependencies: 47.5
|
||||||
|
### Description: Conduct thorough testing of the enhanced workflow and optimize based on user feedback and performance metrics.
|
||||||
|
### 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.
|
||||||
|
|
||||||
@@ -42,3 +42,23 @@ Testing should verify that the refactoring maintains identical functionality whi
|
|||||||
4. Documentation:
|
4. Documentation:
|
||||||
- Verify documentation is updated to reflect the new prompt organization
|
- Verify documentation is updated to reflect the new prompt organization
|
||||||
- Confirm the index.js export pattern works as expected for importing prompts
|
- Confirm the index.js export pattern works as expected for importing prompts
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Create prompts directory structure [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create a centralized 'prompts' directory with appropriate subdirectories for different prompt categories
|
||||||
|
### Details:
|
||||||
|
Create a 'prompts' directory at the project root. Within this directory, create subdirectories based on functional categories (e.g., 'core', 'agents', 'utils'). Add an index.js file in each subdirectory to facilitate imports. Create a root index.js file that re-exports all prompts for easy access.
|
||||||
|
|
||||||
|
## 2. Extract prompts into individual files [pending]
|
||||||
|
### Dependencies: 48.1
|
||||||
|
### Description: Identify all hardcoded prompts in the codebase and extract them into individual files in the prompts directory
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 3. Update functions to import prompts [pending]
|
||||||
|
### Dependencies: 48.1, 48.2
|
||||||
|
### Description: Modify all functions that use hardcoded prompts to import them from the centralized structure
|
||||||
|
### 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.
|
||||||
|
|
||||||
@@ -64,3 +64,41 @@ Testing should verify all aspects of the code analysis command:
|
|||||||
- Generated recommendations are specific and actionable
|
- Generated recommendations are specific and actionable
|
||||||
- Created tasks follow the project's task format standards
|
- Created tasks follow the project's task format standards
|
||||||
- Analysis results are consistent across multiple runs on the same codebase
|
- Analysis results are consistent across multiple runs on the same codebase
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Design pattern recognition algorithm [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create an algorithm to identify common code patterns and anti-patterns in the codebase
|
||||||
|
### Details:
|
||||||
|
Develop a system that can scan code files and identify common design patterns (Factory, Singleton, etc.) and anti-patterns (God objects, excessive coupling, etc.). Include detection for language-specific patterns and create a classification system for identified patterns.
|
||||||
|
|
||||||
|
## 2. Implement best practice verification [pending]
|
||||||
|
### Dependencies: 49.1
|
||||||
|
### Description: Build verification checks against established coding standards and best practices
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 3. Develop AI integration for code analysis [pending]
|
||||||
|
### Dependencies: 49.1, 49.2
|
||||||
|
### Description: Integrate AI capabilities to enhance code analysis and provide intelligent recommendations
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 4. Create recommendation generation system [pending]
|
||||||
|
### Dependencies: 49.2, 49.3
|
||||||
|
### Description: Build a system to generate actionable improvement recommendations based on analysis results
|
||||||
|
### Details:
|
||||||
|
Develop algorithms to transform analysis results into specific, actionable recommendations. Include priority levels, effort estimates, and potential impact assessments for each recommendation.
|
||||||
|
|
||||||
|
## 5. Implement task creation functionality [pending]
|
||||||
|
### Dependencies: 49.4
|
||||||
|
### Description: Add capability to automatically create tasks from code quality recommendations
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 6. Create comprehensive reporting interface [pending]
|
||||||
|
### Dependencies: 49.4, 49.5
|
||||||
|
### Description: Develop a user interface to display analysis results and recommendations
|
||||||
|
### 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.
|
||||||
|
|
||||||
452
.taskmaster/tasks/task_051.txt
Normal file
452
.taskmaster/tasks/task_051.txt
Normal file
@@ -0,0 +1,452 @@
|
|||||||
|
# Task ID: 51
|
||||||
|
# Title: Implement Perplexity Research Command
|
||||||
|
# Status: pending
|
||||||
|
# Dependencies: None
|
||||||
|
# Priority: medium
|
||||||
|
# Description: Create an interactive REPL-style chat interface for AI-powered research that maintains conversation context, integrates project information, and provides session management capabilities.
|
||||||
|
# Details:
|
||||||
|
Develop an interactive REPL-style chat interface for AI-powered research that allows users to have ongoing research conversations with context awareness. The system should:
|
||||||
|
|
||||||
|
1. Create an interactive REPL using inquirer that:
|
||||||
|
- Maintains conversation history and context
|
||||||
|
- Provides a natural chat-like experience
|
||||||
|
- Supports special commands with the '/' prefix
|
||||||
|
|
||||||
|
2. Integrate with the existing ai-services-unified.js using research mode:
|
||||||
|
- Leverage our unified AI service architecture
|
||||||
|
- Configure appropriate system prompts for research context
|
||||||
|
- Handle streaming responses for real-time feedback
|
||||||
|
|
||||||
|
3. Support multiple context sources:
|
||||||
|
- Task/subtask IDs for project context
|
||||||
|
- File paths for code or document context
|
||||||
|
- Custom prompts for specific research directions
|
||||||
|
- Project file tree for system context
|
||||||
|
|
||||||
|
4. Implement chat commands including:
|
||||||
|
- `/save` - Save conversation to file
|
||||||
|
- `/task` - Associate with or load context from a task
|
||||||
|
- `/help` - Show available commands and usage
|
||||||
|
- `/exit` - End the research session
|
||||||
|
- `/copy` - Copy last response to clipboard
|
||||||
|
- `/summary` - Generate summary of conversation
|
||||||
|
- `/detail` - Adjust research depth level
|
||||||
|
|
||||||
|
5. Create session management capabilities:
|
||||||
|
- Generate and track unique session IDs
|
||||||
|
- Save/load sessions automatically
|
||||||
|
- Browse and switch between previous sessions
|
||||||
|
- Export sessions to portable formats
|
||||||
|
|
||||||
|
6. Design a consistent UI using ui.js patterns:
|
||||||
|
- Color-coded messages for user/AI distinction
|
||||||
|
- Support for markdown rendering in terminal
|
||||||
|
- Progressive display of AI responses
|
||||||
|
- Clear visual hierarchy and readability
|
||||||
|
|
||||||
|
7. Follow the "taskmaster way":
|
||||||
|
- Create something new and exciting
|
||||||
|
- Focus on usefulness and practicality
|
||||||
|
- Avoid over-engineering
|
||||||
|
- Maintain consistency with existing patterns
|
||||||
|
|
||||||
|
The REPL should feel like a natural conversation while providing powerful research capabilities that integrate seamlessly with the rest of the system.
|
||||||
|
|
||||||
|
# Test Strategy:
|
||||||
|
1. Unit tests:
|
||||||
|
- Test the REPL command parsing and execution
|
||||||
|
- Mock AI service responses to test different scenarios
|
||||||
|
- Verify context extraction and integration from various sources
|
||||||
|
- Test session serialization and deserialization
|
||||||
|
|
||||||
|
2. Integration tests:
|
||||||
|
- Test actual AI service integration with the REPL
|
||||||
|
- Verify session persistence across application restarts
|
||||||
|
- Test conversation state management with long interactions
|
||||||
|
- Verify context switching between different tasks and files
|
||||||
|
|
||||||
|
3. User acceptance testing:
|
||||||
|
- Have team members use the REPL for real research needs
|
||||||
|
- Test the conversation flow and command usability
|
||||||
|
- Verify the UI is intuitive and responsive
|
||||||
|
- Test with various terminal sizes and environments
|
||||||
|
|
||||||
|
4. Performance testing:
|
||||||
|
- Measure and optimize response time for queries
|
||||||
|
- Test behavior with large conversation histories
|
||||||
|
- Verify performance with complex context sources
|
||||||
|
- Test under poor network conditions
|
||||||
|
|
||||||
|
5. Specific test scenarios:
|
||||||
|
- Verify markdown rendering for complex formatting
|
||||||
|
- Test streaming display with various response lengths
|
||||||
|
- Verify export features create properly formatted files
|
||||||
|
- Test session recovery from simulated crashes
|
||||||
|
- Validate handling of special characters and unicode
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Create Perplexity API Client Service [cancelled]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Develop a service module that handles all interactions with the Perplexity AI API, including authentication, request formatting, and response handling.
|
||||||
|
### Details:
|
||||||
|
Implementation details:
|
||||||
|
1. Create a new service file `services/perplexityService.js`
|
||||||
|
2. Implement authentication using the PERPLEXITY_API_KEY from environment variables
|
||||||
|
3. Create functions for making API requests to Perplexity with proper error handling:
|
||||||
|
- `queryPerplexity(searchQuery, options)` - Main function to query the API
|
||||||
|
- `handleRateLimiting(response)` - Logic to handle rate limits with exponential backoff
|
||||||
|
4. Implement response parsing and formatting functions
|
||||||
|
5. Add proper error handling for network issues, authentication problems, and API limitations
|
||||||
|
6. Create a simple caching mechanism using a Map or object to store recent query results
|
||||||
|
7. Add configuration options for different detail levels (quick vs comprehensive)
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Write unit tests using Jest to verify API client functionality with mocked responses
|
||||||
|
- Test error handling with simulated network failures
|
||||||
|
- Verify caching mechanism works correctly
|
||||||
|
- Test with various query types and options
|
||||||
|
<info added on 2025-05-23T21:06:45.726Z>
|
||||||
|
DEPRECATION NOTICE: This subtask is no longer needed and has been marked for removal. Instead of creating a new Perplexity service, we will leverage the existing ai-services-unified.js with research mode. This approach allows us to maintain a unified architecture for AI services rather than implementing a separate service specifically for Perplexity.
|
||||||
|
</info added on 2025-05-23T21:06:45.726Z>
|
||||||
|
|
||||||
|
## 2. Implement Task Context Extraction Logic [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create utility functions to extract relevant context from tasks and subtasks to enhance research queries with project-specific information.
|
||||||
|
### Details:
|
||||||
|
Implementation details:
|
||||||
|
1. Create a new utility file `utils/contextExtractor.js`
|
||||||
|
2. Implement a function `extractTaskContext(taskId)` that:
|
||||||
|
- Loads the task/subtask data from tasks.json
|
||||||
|
- Extracts relevant information (title, description, details)
|
||||||
|
- Formats the extracted information into a context string for research
|
||||||
|
3. Add logic to handle both task and subtask IDs
|
||||||
|
4. Implement a function to combine extracted context with the user's search query
|
||||||
|
5. Create a function to identify and extract key terminology from tasks
|
||||||
|
6. Add functionality to include parent task context when a subtask ID is provided
|
||||||
|
7. Implement proper error handling for invalid task IDs
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Write unit tests to verify context extraction from sample tasks
|
||||||
|
- Test with various task structures and content types
|
||||||
|
- Verify error handling for missing or invalid tasks
|
||||||
|
- Test the quality of extracted context with sample queries
|
||||||
|
<info added on 2025-05-23T21:11:44.560Z>
|
||||||
|
Updated Implementation Approach:
|
||||||
|
|
||||||
|
REFACTORED IMPLEMENTATION:
|
||||||
|
1. Extract the fuzzy search logic from add-task.js (lines ~240-400) into `utils/contextExtractor.js`
|
||||||
|
2. Implement a reusable `TaskContextExtractor` class with the following methods:
|
||||||
|
- `extractTaskContext(taskId)` - Base context extraction
|
||||||
|
- `performFuzzySearch(query, options)` - Enhanced Fuse.js implementation
|
||||||
|
- `getRelevanceScore(task, query)` - Scoring mechanism from add-task.js
|
||||||
|
- `detectPurposeCategories(task)` - Category classification logic
|
||||||
|
- `findRelatedTasks(taskId)` - Identify dependencies and relationships
|
||||||
|
- `aggregateMultiQueryContext(queries)` - Support for multiple search terms
|
||||||
|
|
||||||
|
3. Add configurable context depth levels:
|
||||||
|
- Minimal: Just task title and description
|
||||||
|
- Standard: Include details and immediate relationships
|
||||||
|
- Comprehensive: Full context with all dependencies and related tasks
|
||||||
|
|
||||||
|
4. Implement context formatters:
|
||||||
|
- `formatForSystemPrompt(context)` - Structured for AI system instructions
|
||||||
|
- `formatForChatContext(context)` - Conversational format for chat
|
||||||
|
- `formatForResearchQuery(context, query)` - Optimized for research commands
|
||||||
|
|
||||||
|
5. Add caching layer for performance optimization:
|
||||||
|
- Implement LRU cache for expensive fuzzy search results
|
||||||
|
- Cache invalidation on task updates
|
||||||
|
|
||||||
|
6. Ensure backward compatibility with existing context extraction requirements
|
||||||
|
|
||||||
|
This approach leverages our existing sophisticated search logic rather than rebuilding from scratch, while making it more flexible and reusable across the application.
|
||||||
|
</info added on 2025-05-23T21:11:44.560Z>
|
||||||
|
|
||||||
|
## 3. Build Research Command CLI Interface [pending]
|
||||||
|
### Dependencies: 51.1, 51.2
|
||||||
|
### Description: Implement the Commander.js command structure for the 'research' command with all required options and parameters.
|
||||||
|
### Details:
|
||||||
|
Implementation details:
|
||||||
|
1. Create a new command file `commands/research.js`
|
||||||
|
2. Set up the Commander.js command structure with the following options:
|
||||||
|
- Required search query parameter
|
||||||
|
- `--task` or `-t` option for task/subtask ID
|
||||||
|
- `--prompt` or `-p` option for custom research prompt
|
||||||
|
- `--save` or `-s` option to save results to a file
|
||||||
|
- `--copy` or `-c` option to copy results to clipboard
|
||||||
|
- `--summary` or `-m` option to generate a summary
|
||||||
|
- `--detail` or `-d` option to set research depth (default: medium)
|
||||||
|
3. Implement command validation logic
|
||||||
|
4. Connect the command to the Perplexity service created in subtask 1
|
||||||
|
5. Integrate the context extraction logic from subtask 2
|
||||||
|
6. Register the command in the main CLI application
|
||||||
|
7. Add help text and examples
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test command registration and option parsing
|
||||||
|
- Verify command validation logic works correctly
|
||||||
|
- Test with various combinations of options
|
||||||
|
- Ensure proper error messages for invalid inputs
|
||||||
|
<info added on 2025-05-23T21:09:08.478Z>
|
||||||
|
Implementation details:
|
||||||
|
1. Create a new module `repl/research-chat.js` for the interactive research experience
|
||||||
|
2. Implement REPL-style chat interface using inquirer with:
|
||||||
|
- Persistent conversation history management
|
||||||
|
- Context-aware prompting system
|
||||||
|
- Command parsing for special instructions
|
||||||
|
3. Implement REPL commands:
|
||||||
|
- `/save` - Save conversation to file
|
||||||
|
- `/task` - Associate with or load context from a task
|
||||||
|
- `/help` - Show available commands and usage
|
||||||
|
- `/exit` - End the research session
|
||||||
|
- `/copy` - Copy last response to clipboard
|
||||||
|
- `/summary` - Generate summary of conversation
|
||||||
|
- `/detail` - Adjust research depth level
|
||||||
|
4. Create context initialization system:
|
||||||
|
- Task/subtask context loading
|
||||||
|
- File content integration
|
||||||
|
- System prompt configuration
|
||||||
|
5. Integrate with ai-services-unified.js research mode
|
||||||
|
6. Implement conversation state management:
|
||||||
|
- Track message history
|
||||||
|
- Maintain context window
|
||||||
|
- Handle context pruning for long conversations
|
||||||
|
7. Design consistent UI patterns using ui.js library
|
||||||
|
8. Add entry point in main CLI application
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test REPL command parsing and execution
|
||||||
|
- Verify context initialization with various inputs
|
||||||
|
- Test conversation state management
|
||||||
|
- Ensure proper error handling and recovery
|
||||||
|
- Validate UI consistency across different terminal environments
|
||||||
|
</info added on 2025-05-23T21:09:08.478Z>
|
||||||
|
|
||||||
|
## 4. Implement Results Processing and Output Formatting [pending]
|
||||||
|
### Dependencies: 51.1, 51.3
|
||||||
|
### Description: Create functionality to process, format, and display research results in the terminal with options for saving, copying, and summarizing.
|
||||||
|
### Details:
|
||||||
|
Implementation details:
|
||||||
|
1. Create a new module `utils/researchFormatter.js`
|
||||||
|
2. Implement terminal output formatting with:
|
||||||
|
- Color-coded sections for better readability
|
||||||
|
- Proper text wrapping for terminal width
|
||||||
|
- Highlighting of key points
|
||||||
|
3. Add functionality to save results to a file:
|
||||||
|
- Create a `research-results` directory if it doesn't exist
|
||||||
|
- Save results with timestamp and query in filename
|
||||||
|
- Support multiple formats (text, markdown, JSON)
|
||||||
|
4. Implement clipboard copying using a library like `clipboardy`
|
||||||
|
5. Create a summarization function that extracts key points from research results
|
||||||
|
6. Add progress indicators during API calls
|
||||||
|
7. Implement pagination for long results
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test output formatting with various result lengths and content types
|
||||||
|
- Verify file saving functionality creates proper files with correct content
|
||||||
|
- Test clipboard functionality
|
||||||
|
- Verify summarization produces useful results
|
||||||
|
<info added on 2025-05-23T21:10:00.181Z>
|
||||||
|
Implementation details:
|
||||||
|
1. Create a new module `utils/chatFormatter.js` for REPL interface formatting
|
||||||
|
2. Implement terminal output formatting for conversational display:
|
||||||
|
- Color-coded messages distinguishing user inputs and AI responses
|
||||||
|
- Proper text wrapping and indentation for readability
|
||||||
|
- Support for markdown rendering in terminal
|
||||||
|
- Visual indicators for system messages and status updates
|
||||||
|
3. Implement streaming/progressive display of AI responses:
|
||||||
|
- Character-by-character or chunk-by-chunk display
|
||||||
|
- Cursor animations during response generation
|
||||||
|
- Ability to interrupt long responses
|
||||||
|
4. Design chat history visualization:
|
||||||
|
- Scrollable history with clear message boundaries
|
||||||
|
- Timestamp display options
|
||||||
|
- Session identification
|
||||||
|
5. Create specialized formatters for different content types:
|
||||||
|
- Code blocks with syntax highlighting
|
||||||
|
- Bulleted and numbered lists
|
||||||
|
- Tables and structured data
|
||||||
|
- Citations and references
|
||||||
|
6. Implement export functionality:
|
||||||
|
- Save conversations to markdown or text files
|
||||||
|
- Export individual responses
|
||||||
|
- Copy responses to clipboard
|
||||||
|
7. Adapt existing ui.js patterns for conversational context:
|
||||||
|
- Maintain consistent styling while supporting chat flow
|
||||||
|
- Handle multi-turn context appropriately
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test streaming display with various response lengths and speeds
|
||||||
|
- Verify markdown rendering accuracy for complex formatting
|
||||||
|
- Test history navigation and scrolling functionality
|
||||||
|
- Verify export features create properly formatted files
|
||||||
|
- Test display on various terminal sizes and configurations
|
||||||
|
- Verify handling of special characters and unicode
|
||||||
|
</info added on 2025-05-23T21:10:00.181Z>
|
||||||
|
|
||||||
|
## 5. Implement Caching and Results Management System [cancelled]
|
||||||
|
### Dependencies: 51.1, 51.4
|
||||||
|
### Description: Create a persistent caching system for research results and implement functionality to manage, retrieve, and reference previous research.
|
||||||
|
### Details:
|
||||||
|
Implementation details:
|
||||||
|
1. Create a research results database using a simple JSON file or SQLite:
|
||||||
|
- Store queries, timestamps, and results
|
||||||
|
- Index by query and related task IDs
|
||||||
|
2. Implement cache retrieval and validation:
|
||||||
|
- Check for cached results before making API calls
|
||||||
|
- Validate cache freshness with configurable TTL
|
||||||
|
3. Add commands to manage research history:
|
||||||
|
- List recent research queries
|
||||||
|
- Retrieve past research by ID or search term
|
||||||
|
- Clear cache or delete specific entries
|
||||||
|
4. Create functionality to associate research results with tasks:
|
||||||
|
- Add metadata linking research to specific tasks
|
||||||
|
- Implement command to show all research related to a task
|
||||||
|
5. Add configuration options for cache behavior in user settings
|
||||||
|
6. Implement export/import functionality for research data
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test cache storage and retrieval with various queries
|
||||||
|
- Verify cache invalidation works correctly
|
||||||
|
- Test history management commands
|
||||||
|
- Verify task association functionality
|
||||||
|
- Test with large cache sizes to ensure performance
|
||||||
|
<info added on 2025-05-23T21:10:28.544Z>
|
||||||
|
Implementation details:
|
||||||
|
1. Create a session management system for the REPL experience:
|
||||||
|
- Generate and track unique session IDs
|
||||||
|
- Store conversation history with timestamps
|
||||||
|
- Maintain context and state between interactions
|
||||||
|
2. Implement session persistence:
|
||||||
|
- Save sessions to disk automatically
|
||||||
|
- Load previous sessions on startup
|
||||||
|
- Handle graceful recovery from crashes
|
||||||
|
3. Build session browser and selector:
|
||||||
|
- List available sessions with preview
|
||||||
|
- Filter sessions by date, topic, or content
|
||||||
|
- Enable quick switching between sessions
|
||||||
|
4. Implement conversation state serialization:
|
||||||
|
- Capture full conversation context
|
||||||
|
- Preserve user preferences per session
|
||||||
|
- Handle state migration during updates
|
||||||
|
5. Add session sharing capabilities:
|
||||||
|
- Export sessions to portable formats
|
||||||
|
- Import sessions from files
|
||||||
|
- Generate shareable links (if applicable)
|
||||||
|
6. Create session management commands:
|
||||||
|
- Create new sessions
|
||||||
|
- Clone existing sessions
|
||||||
|
- Archive or delete old sessions
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Verify session persistence across application restarts
|
||||||
|
- Test session recovery from simulated crashes
|
||||||
|
- Validate state serialization with complex conversations
|
||||||
|
- Ensure session switching maintains proper context
|
||||||
|
- Test session import/export functionality
|
||||||
|
- Verify performance with large conversation histories
|
||||||
|
</info added on 2025-05-23T21:10:28.544Z>
|
||||||
|
|
||||||
|
## 6. Implement Project Context Generation [pending]
|
||||||
|
### Dependencies: 51.2
|
||||||
|
### Description: Create functionality to generate and include project-level context such as file trees, repository structure, and codebase insights for more informed research.
|
||||||
|
### Details:
|
||||||
|
Implementation details:
|
||||||
|
1. Create a new module `utils/projectContextGenerator.js` for project-level context extraction
|
||||||
|
2. Implement file tree generation functionality:
|
||||||
|
- Scan project directory structure recursively
|
||||||
|
- Filter out irrelevant files (node_modules, .git, etc.)
|
||||||
|
- Format file tree for AI consumption
|
||||||
|
- Include file counts and structure statistics
|
||||||
|
3. Add code analysis capabilities:
|
||||||
|
- Extract key imports and dependencies
|
||||||
|
- Identify main modules and their relationships
|
||||||
|
- Generate high-level architecture overview
|
||||||
|
4. Implement context summarization:
|
||||||
|
- Create concise project overview
|
||||||
|
- Identify key technologies and patterns
|
||||||
|
- Summarize project purpose and structure
|
||||||
|
5. Add caching for expensive operations:
|
||||||
|
- Cache file tree with invalidation on changes
|
||||||
|
- Store analysis results with TTL
|
||||||
|
6. Create integration with research REPL:
|
||||||
|
- Add project context to system prompts
|
||||||
|
- Support `/project` command to refresh context
|
||||||
|
- Allow selective inclusion of project components
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test file tree generation with various project structures
|
||||||
|
- Verify filtering logic works correctly
|
||||||
|
- Test context summarization quality
|
||||||
|
- Measure performance impact of context generation
|
||||||
|
- Verify caching mechanism effectiveness
|
||||||
|
|
||||||
|
## 7. Create REPL Command System [pending]
|
||||||
|
### Dependencies: 51.3
|
||||||
|
### Description: Implement a flexible command system for the research REPL that allows users to control the conversation flow, manage sessions, and access additional functionality.
|
||||||
|
### Details:
|
||||||
|
Implementation details:
|
||||||
|
1. Create a new module `repl/commands.js` for REPL command handling
|
||||||
|
2. Implement a command parser that:
|
||||||
|
- Detects commands starting with `/`
|
||||||
|
- Parses arguments and options
|
||||||
|
- Handles quoted strings and special characters
|
||||||
|
3. Create a command registry system:
|
||||||
|
- Register command handlers with descriptions
|
||||||
|
- Support command aliases
|
||||||
|
- Enable command discovery and help
|
||||||
|
4. Implement core commands:
|
||||||
|
- `/save [filename]` - Save conversation
|
||||||
|
- `/task <taskId>` - Load task context
|
||||||
|
- `/file <path>` - Include file content
|
||||||
|
- `/help [command]` - Show help
|
||||||
|
- `/exit` - End session
|
||||||
|
- `/copy [n]` - Copy nth response
|
||||||
|
- `/summary` - Generate conversation summary
|
||||||
|
- `/detail <level>` - Set detail level
|
||||||
|
- `/clear` - Clear conversation
|
||||||
|
- `/project` - Refresh project context
|
||||||
|
- `/session <id|new>` - Switch/create session
|
||||||
|
5. Add command completion and suggestions
|
||||||
|
6. Implement error handling for invalid commands
|
||||||
|
7. Create a help system with examples
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test command parsing with various inputs
|
||||||
|
- Verify command execution and error handling
|
||||||
|
- Test command completion functionality
|
||||||
|
- Verify help system provides useful information
|
||||||
|
- Test with complex command sequences
|
||||||
|
|
||||||
|
## 8. Integrate with AI Services Unified [pending]
|
||||||
|
### Dependencies: 51.3, 51.4
|
||||||
|
### Description: Integrate the research REPL with the existing ai-services-unified.js to leverage the unified AI service architecture with research mode.
|
||||||
|
### Details:
|
||||||
|
Implementation details:
|
||||||
|
1. Update `repl/research-chat.js` to integrate with ai-services-unified.js
|
||||||
|
2. Configure research mode in AI service:
|
||||||
|
- Set appropriate system prompts
|
||||||
|
- Configure temperature and other parameters
|
||||||
|
- Enable streaming responses
|
||||||
|
3. Implement context management:
|
||||||
|
- Format conversation history for AI context
|
||||||
|
- Include task and project context
|
||||||
|
- Handle context window limitations
|
||||||
|
4. Add support for different research styles:
|
||||||
|
- Exploratory research with broader context
|
||||||
|
- Focused research with specific questions
|
||||||
|
- Comparative analysis between concepts
|
||||||
|
5. Implement response handling:
|
||||||
|
- Process streaming chunks
|
||||||
|
- Format and display responses
|
||||||
|
- Handle errors and retries
|
||||||
|
6. Add configuration options for AI service selection
|
||||||
|
7. Implement fallback mechanisms for service unavailability
|
||||||
|
|
||||||
|
Testing approach:
|
||||||
|
- Test integration with mocked AI services
|
||||||
|
- Verify context formatting and management
|
||||||
|
- Test streaming response handling
|
||||||
|
- Verify error handling and recovery
|
||||||
|
- Test with various research styles and queries
|
||||||
|
|
||||||
@@ -49,3 +49,35 @@ Testing should verify both the functionality and user experience of the suggest-
|
|||||||
- Test with extremely large numbers of existing tasks
|
- Test with extremely large numbers of existing tasks
|
||||||
|
|
||||||
Manually verify the command produces contextually appropriate suggestions that align with the project's current state and needs.
|
Manually verify the command produces contextually appropriate suggestions that align with the project's current state and needs.
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Design data collection mechanism for existing tasks [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create a module to collect and format existing task data from the system for AI processing
|
||||||
|
### Details:
|
||||||
|
Implement a function that retrieves all existing tasks from storage, formats them appropriately for AI context, and handles edge cases like empty task lists or corrupted data. Include metadata like task status, dependencies, and creation dates to provide rich context for suggestions.
|
||||||
|
|
||||||
|
## 2. Implement AI integration for task suggestions [pending]
|
||||||
|
### Dependencies: 52.1
|
||||||
|
### Description: Develop the core functionality to generate task suggestions using AI based on existing tasks
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 3. Build interactive CLI interface for suggestions [pending]
|
||||||
|
### Dependencies: 52.2
|
||||||
|
### Description: Create the command-line interface for requesting and displaying task suggestions
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 4. Implement suggestion selection and task creation [pending]
|
||||||
|
### Dependencies: 52.3
|
||||||
|
### Description: Allow users to interactively select suggestions to convert into actual tasks
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 5. Add configuration options and flag handling [pending]
|
||||||
|
### Dependencies: 52.3, 52.4
|
||||||
|
### Description: Implement various configuration options and command flags for customizing suggestion behavior
|
||||||
|
### 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.
|
||||||
|
|
||||||
@@ -48,3 +48,35 @@ Testing should verify both the new positional argument functionality and continu
|
|||||||
- Verify examples in documentation show both styles where appropriate
|
- Verify examples in documentation show both styles where appropriate
|
||||||
|
|
||||||
All tests should pass with 100% of commands supporting both argument styles without any regression in existing functionality.
|
All tests should pass with 100% of commands supporting both argument styles without any regression in existing functionality.
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Analyze current CLI argument parsing structure [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Review the existing CLI argument parsing code to understand how arguments are currently processed and identify integration points for positional arguments.
|
||||||
|
### Details:
|
||||||
|
Document the current argument parsing flow, identify key classes and methods responsible for argument handling, and determine how named arguments are currently processed. Create a technical design document outlining the current architecture and proposed changes.
|
||||||
|
|
||||||
|
## 2. Design positional argument specification format [pending]
|
||||||
|
### Dependencies: 55.1
|
||||||
|
### Description: Create a specification for how positional arguments will be defined in command definitions, including their order, required/optional status, and type validation.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 3. Implement core positional argument parsing logic [pending]
|
||||||
|
### Dependencies: 55.1, 55.2
|
||||||
|
### Description: Modify the argument parser to recognize and process positional arguments according to the specification, while maintaining compatibility with existing named arguments.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 4. Handle edge cases and error conditions [pending]
|
||||||
|
### Dependencies: 55.3
|
||||||
|
### Description: Implement robust handling for edge cases such as too many/few arguments, type mismatches, and ambiguous situations between positional and named arguments.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 5. Update documentation and create usage examples [pending]
|
||||||
|
### Dependencies: 55.2, 55.3, 55.4
|
||||||
|
### Description: Update CLI documentation to explain positional argument support and provide clear examples showing how to use positional arguments with different commands.
|
||||||
|
### 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.
|
||||||
|
|
||||||
@@ -65,3 +65,41 @@ Acceptance Criteria:
|
|||||||
- Help text is comprehensive and includes examples
|
- Help text is comprehensive and includes examples
|
||||||
- Interface is visually consistent across all commands
|
- Interface is visually consistent across all commands
|
||||||
- Tool remains fully functional in non-interactive environments
|
- Tool remains fully functional in non-interactive environments
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Implement Configurable Log Levels [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create a logging system with different verbosity levels that users can configure
|
||||||
|
### Details:
|
||||||
|
Design and implement a logging system with at least 4 levels (ERROR, WARNING, INFO, DEBUG). Add command-line options to set the verbosity level. Ensure logs are color-coded by severity and can be redirected to files. Include timestamp formatting options.
|
||||||
|
|
||||||
|
## 2. Design Terminal Color Scheme and Visual Elements [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create a consistent and accessible color scheme for the CLI interface
|
||||||
|
### Details:
|
||||||
|
Define a color palette that works across different terminal environments. Implement color-coding for different task states, priorities, and command categories. Add support for terminals without color capabilities. Design visual separators, headers, and footers for different output sections.
|
||||||
|
|
||||||
|
## 3. Implement Progress Indicators and Loading Animations [pending]
|
||||||
|
### Dependencies: 57.2
|
||||||
|
### Description: Add visual feedback for long-running operations
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 4. Develop Interactive Selection Menus [pending]
|
||||||
|
### Dependencies: 57.2
|
||||||
|
### Description: Create interactive menus for task selection and configuration
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 5. Design Tabular and Structured Output Formats [pending]
|
||||||
|
### Dependencies: 57.2
|
||||||
|
### Description: Improve the formatting of task lists and detailed information
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 6. Create Help System and Interactive Documentation [pending]
|
||||||
|
### Dependencies: 57.2, 57.4, 57.5
|
||||||
|
### Description: Develop an in-CLI help system with examples and contextual assistance
|
||||||
|
### 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.
|
||||||
|
|
||||||
@@ -71,3 +71,47 @@ Ensure all commands have proper help text and error handling for cases like no m
|
|||||||
- Verify the personality simulation is consistent and believable
|
- Verify the personality simulation is consistent and believable
|
||||||
- Test the round-table output file readability and usefulness
|
- Test the round-table output file readability and usefulness
|
||||||
- Verify that using round-table output to update tasks produces meaningful improvements
|
- Verify that using round-table output to update tasks produces meaningful improvements
|
||||||
|
|
||||||
|
# Subtasks:
|
||||||
|
## 1. Design Mentor System Architecture [pending]
|
||||||
|
### Dependencies: None
|
||||||
|
### Description: Create a comprehensive architecture for the mentor system, defining data models, relationships, and interaction patterns.
|
||||||
|
### Details:
|
||||||
|
Define mentor profiles structure, expertise categorization, availability tracking, and relationship to user accounts. Design the database schema for storing mentor information and interactions. Create flowcharts for mentor-mentee matching algorithms and interaction workflows.
|
||||||
|
|
||||||
|
## 2. Implement Mentor Profile Management [pending]
|
||||||
|
### Dependencies: 60.1
|
||||||
|
### Description: Develop the functionality for creating, editing, and managing mentor profiles in the system.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 3. Develop Round-Table Discussion Framework [pending]
|
||||||
|
### Dependencies: 60.1
|
||||||
|
### Description: Create the core framework for hosting and managing round-table discussions between mentors and users.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 4. Implement LLM Integration for AI Mentors [pending]
|
||||||
|
### Dependencies: 60.3
|
||||||
|
### Description: Integrate LLM capabilities to simulate AI mentors that can participate in round-table discussions.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 5. Build Discussion Output Formatter [pending]
|
||||||
|
### Dependencies: 60.3, 60.4
|
||||||
|
### Description: Create a system to format and present round-table discussion outputs in a structured, readable format.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 6. Integrate Mentor System with Task Management [pending]
|
||||||
|
### Dependencies: 60.2, 60.3
|
||||||
|
### Description: Connect the mentor system with the existing task management functionality to enable task-specific mentoring.
|
||||||
|
### 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.
|
||||||
|
|
||||||
|
## 7. Test and Optimize Round-Table Discussions [pending]
|
||||||
|
### Dependencies: 60.4, 60.5, 60.6
|
||||||
|
### Description: Conduct comprehensive testing of the round-table discussion feature and optimize for performance and user experience.
|
||||||
|
### 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.
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Task ID: 61
|
# Task ID: 61
|
||||||
# Title: Implement Flexible AI Model Management
|
# Title: Implement Flexible AI Model Management
|
||||||
# Status: in-progress
|
# Status: done
|
||||||
# Dependencies: None
|
# Dependencies: None
|
||||||
# Priority: high
|
# Priority: high
|
||||||
# Description: Currently, Task Master only supports Claude for main operations and Perplexity for research. Users are limited in flexibility when managing AI models. Adding comprehensive support for multiple popular AI models (OpenAI, Ollama, Gemini, OpenRouter, Grok) and providing intuitive CLI commands for model management will significantly enhance usability, transparency, and adaptability to user preferences and project-specific needs. This task will now leverage Vercel's AI SDK to streamline integration and management of these models.
|
# Description: Currently, Task Master only supports Claude for main operations and Perplexity for research. Users are limited in flexibility when managing AI models. Adding comprehensive support for multiple popular AI models (OpenAI, Ollama, Gemini, OpenRouter, Grok) and providing intuitive CLI commands for model management will significantly enhance usability, transparency, and adaptability to user preferences and project-specific needs. This task will now leverage Vercel's AI SDK to streamline integration and management of these models.
|
||||||
@@ -486,7 +486,7 @@ The existing `ai-services.js` should be refactored to:
|
|||||||
7. Add verbose output option for debugging
|
7. Add verbose output option for debugging
|
||||||
8. Testing approach: Create integration tests that verify model setting functionality with various inputs
|
8. Testing approach: Create integration tests that verify model setting functionality with various inputs
|
||||||
|
|
||||||
## 8. Update Main Task Processing Logic [deferred]
|
## 8. Update Main Task Processing Logic [done]
|
||||||
### Dependencies: 61.4, 61.5, 61.18
|
### Dependencies: 61.4, 61.5, 61.18
|
||||||
### Description: Refactor the main task processing logic to use the new AI services module and support dynamic model selection.
|
### Description: Refactor the main task processing logic to use the new AI services module and support dynamic model selection.
|
||||||
### Details:
|
### Details:
|
||||||
@@ -554,7 +554,7 @@ When updating the main task processing logic, implement the following changes to
|
|||||||
```
|
```
|
||||||
</info added on 2025-04-20T03:55:56.310Z>
|
</info added on 2025-04-20T03:55:56.310Z>
|
||||||
|
|
||||||
## 9. Update Research Processing Logic [deferred]
|
## 9. Update Research Processing Logic [done]
|
||||||
### Dependencies: 61.4, 61.5, 61.8, 61.18
|
### Dependencies: 61.4, 61.5, 61.8, 61.18
|
||||||
### Description: Refactor the research processing logic to use the new AI services module and support dynamic model selection for research operations.
|
### Description: Refactor the research processing logic to use the new AI services module and support dynamic model selection for research operations.
|
||||||
### Details:
|
### Details:
|
||||||
@@ -747,7 +747,7 @@ const result = await generateObjectService({
|
|||||||
5. Ensure any default values previously hardcoded are now retrieved from the configuration system.
|
5. Ensure any default values previously hardcoded are now retrieved from the configuration system.
|
||||||
</info added on 2025-04-20T03:55:01.707Z>
|
</info added on 2025-04-20T03:55:01.707Z>
|
||||||
|
|
||||||
## 12. Refactor Basic Subtask Generation to use generateObjectService [cancelled]
|
## 12. Refactor Basic Subtask Generation to use generateObjectService [done]
|
||||||
### Dependencies: 61.23
|
### Dependencies: 61.23
|
||||||
### 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.
|
### 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:
|
### Details:
|
||||||
@@ -798,7 +798,7 @@ The refactoring should leverage the new configuration system:
|
|||||||
```
|
```
|
||||||
</info added on 2025-04-20T03:54:45.542Z>
|
</info added on 2025-04-20T03:54:45.542Z>
|
||||||
|
|
||||||
## 13. Refactor Research Subtask Generation to use generateObjectService [cancelled]
|
## 13. Refactor Research Subtask Generation to use generateObjectService [done]
|
||||||
### Dependencies: 61.23
|
### Dependencies: 61.23
|
||||||
### 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.
|
### 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:
|
### Details:
|
||||||
@@ -828,7 +828,7 @@ const { verbose } = getLoggingConfig();
|
|||||||
5. Ensure the transition to generateObjectService maintains all existing functionality while leveraging the new configuration system
|
5. Ensure the transition to generateObjectService maintains all existing functionality while leveraging the new configuration system
|
||||||
</info added on 2025-04-20T03:54:26.882Z>
|
</info added on 2025-04-20T03:54:26.882Z>
|
||||||
|
|
||||||
## 14. Refactor Research Task Description Generation to use generateObjectService [cancelled]
|
## 14. Refactor Research Task Description Generation to use generateObjectService [done]
|
||||||
### Dependencies: 61.23
|
### Dependencies: 61.23
|
||||||
### 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.
|
### 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:
|
### Details:
|
||||||
@@ -869,7 +869,7 @@ return generateObjectService({
|
|||||||
5. Remove any hardcoded configuration values, ensuring all settings are retrieved from the centralized configuration system.
|
5. Remove any hardcoded configuration values, ensuring all settings are retrieved from the centralized configuration system.
|
||||||
</info added on 2025-04-20T03:54:04.420Z>
|
</info added on 2025-04-20T03:54:04.420Z>
|
||||||
|
|
||||||
## 15. Refactor Complexity Analysis AI Call to use generateObjectService [cancelled]
|
## 15. Refactor Complexity Analysis AI Call to use generateObjectService [done]
|
||||||
### Dependencies: 61.23
|
### Dependencies: 61.23
|
||||||
### 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.
|
### 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:
|
### Details:
|
||||||
@@ -916,7 +916,7 @@ The complexity analysis AI call should be updated to align with the new configur
|
|||||||
```
|
```
|
||||||
</info added on 2025-04-20T03:53:46.120Z>
|
</info added on 2025-04-20T03:53:46.120Z>
|
||||||
|
|
||||||
## 16. Refactor Task Addition AI Call to use generateObjectService [cancelled]
|
## 16. Refactor Task Addition AI Call to use generateObjectService [done]
|
||||||
### Dependencies: 61.23
|
### Dependencies: 61.23
|
||||||
### 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.
|
### 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:
|
### Details:
|
||||||
@@ -961,7 +961,7 @@ To implement this refactoring, you'll need to:
|
|||||||
4. Update any error handling to match the new service's error patterns.
|
4. Update any error handling to match the new service's error patterns.
|
||||||
</info added on 2025-04-20T03:53:27.455Z>
|
</info added on 2025-04-20T03:53:27.455Z>
|
||||||
|
|
||||||
## 17. Refactor General Chat/Update AI Calls [deferred]
|
## 17. Refactor General Chat/Update AI Calls [done]
|
||||||
### Dependencies: 61.23
|
### Dependencies: 61.23
|
||||||
### 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`.
|
### 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:
|
### Details:
|
||||||
@@ -1008,7 +1008,7 @@ When refactoring `sendChatWithContext` and related functions, ensure they align
|
|||||||
5. Ensure any default behaviors respect configuration defaults rather than hardcoded values.
|
5. Ensure any default behaviors respect configuration defaults rather than hardcoded values.
|
||||||
</info added on 2025-04-20T03:53:03.709Z>
|
</info added on 2025-04-20T03:53:03.709Z>
|
||||||
|
|
||||||
## 18. Refactor Callers of AI Parsing Utilities [deferred]
|
## 18. Refactor Callers of AI Parsing Utilities [done]
|
||||||
### Dependencies: None
|
### Dependencies: None
|
||||||
### Description: Update the code that calls `parseSubtasksFromText`, `parseTaskJsonResponse`, and `parseTasksFromCompletion` to instead directly handle the structured JSON output provided by `generateObjectService` (as the refactored AI calls will now use it).
|
### Description: Update the code that calls `parseSubtasksFromText`, `parseTaskJsonResponse`, and `parseTasksFromCompletion` to instead directly handle the structured JSON output provided by `generateObjectService` (as the refactored AI calls will now use it).
|
||||||
### Details:
|
### Details:
|
||||||
@@ -1761,19 +1761,19 @@ export async function generateGoogleObject({
|
|||||||
```
|
```
|
||||||
</info added on 2025-04-27T00:00:46.675Z>
|
</info added on 2025-04-27T00:00:46.675Z>
|
||||||
|
|
||||||
## 25. Implement `ollama.js` Provider Module [pending]
|
## 25. Implement `ollama.js` Provider Module [done]
|
||||||
### Dependencies: None
|
### Dependencies: None
|
||||||
### Description: Create and implement the `ollama.js` module within `src/ai-providers/`. This module should contain functions to interact with local Ollama models using the **`ollama-ai-provider` library**, adhering to the standardized input/output format defined for `ai-services-unified.js`. Note the specific library used.
|
### Description: Create and implement the `ollama.js` module within `src/ai-providers/`. This module should contain functions to interact with local Ollama models using the **`ollama-ai-provider` library**, adhering to the standardized input/output format defined for `ai-services-unified.js`. Note the specific library used.
|
||||||
### Details:
|
### Details:
|
||||||
|
|
||||||
|
|
||||||
## 26. Implement `mistral.js` Provider Module using Vercel AI SDK [pending]
|
## 26. Implement `mistral.js` Provider Module using Vercel AI SDK [done]
|
||||||
### Dependencies: None
|
### Dependencies: None
|
||||||
### Description: Create and implement the `mistral.js` module within `src/ai-providers/`. This module should contain functions to interact with Mistral AI models using the **Vercel AI SDK (`@ai-sdk/mistral`)**, adhering to the standardized input/output format defined for `ai-services-unified.js`.
|
### Description: Create and implement the `mistral.js` module within `src/ai-providers/`. This module should contain functions to interact with Mistral AI models using the **Vercel AI SDK (`@ai-sdk/mistral`)**, adhering to the standardized input/output format defined for `ai-services-unified.js`.
|
||||||
### Details:
|
### Details:
|
||||||
|
|
||||||
|
|
||||||
## 27. Implement `azure.js` Provider Module using Vercel AI SDK [pending]
|
## 27. Implement `azure.js` Provider Module using Vercel AI SDK [done]
|
||||||
### Dependencies: None
|
### Dependencies: None
|
||||||
### Description: Create and implement the `azure.js` module within `src/ai-providers/`. This module should contain functions to interact with Azure OpenAI models using the **Vercel AI SDK (`@ai-sdk/azure`)**, adhering to the standardized input/output format defined for `ai-services-unified.js`.
|
### Description: Create and implement the `azure.js` module within `src/ai-providers/`. This module should contain functions to interact with Azure OpenAI models using the **Vercel AI SDK (`@ai-sdk/azure`)**, adhering to the standardized input/output format defined for `ai-services-unified.js`.
|
||||||
### Details:
|
### Details:
|
||||||
@@ -2649,13 +2649,13 @@ Here are more detailed steps for removing unnecessary console logs:
|
|||||||
10. After committing changes, monitor the application in staging environment to ensure no critical information is lost.
|
10. After committing changes, monitor the application in staging environment to ensure no critical information is lost.
|
||||||
</info added on 2025-05-02T20:47:56.080Z>
|
</info added on 2025-05-02T20:47:56.080Z>
|
||||||
|
|
||||||
## 44. Add setters for temperature, max tokens on per role basis. [pending]
|
## 44. Add setters for temperature, max tokens on per role basis. [done]
|
||||||
### Dependencies: None
|
### Dependencies: None
|
||||||
### Description: NOT per model/provider basis though we could probably just define those in the .taskmasterconfig file but then they would be hard-coded. if we let users define them on a per role basis, they will define incorrect values. maybe a good middle ground is to do both - we enforce maximum using known max tokens for input and output at the .taskmasterconfig level but then we also give setters to adjust temp/input tokens/output tokens for each of the 3 roles.
|
### Description: NOT per model/provider basis though we could probably just define those in the .taskmasterconfig file but then they would be hard-coded. if we let users define them on a per role basis, they will define incorrect values. maybe a good middle ground is to do both - we enforce maximum using known max tokens for input and output at the .taskmasterconfig level but then we also give setters to adjust temp/input tokens/output tokens for each of the 3 roles.
|
||||||
### Details:
|
### Details:
|
||||||
|
|
||||||
|
|
||||||
## 45. Add support for Bedrock provider with ai sdk and unified service [pending]
|
## 45. Add support for Bedrock provider with ai sdk and unified service [done]
|
||||||
### Dependencies: None
|
### Dependencies: None
|
||||||
### Description:
|
### Description:
|
||||||
### Details:
|
### Details:
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user