Commit Graph

142 Commits

Author SHA1 Message Date
Ralph Khreish
7439be3803 fix: github actions 2025-04-02 01:52:13 +02:00
github-actions[bot]
38e416ef33 Version Packages (#81)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.10.1
2025-04-02 00:32:46 +02:00
Ralph Khreish
aa185b28b2 fix: npm i breaking (#80) 2025-04-02 00:30:36 +02:00
github-actions[bot]
76618187f6 Version Packages (#57) 2025-03-31 17:13:02 +02:00
Ralph Khreish
757fd478d2 Add License (#45) 2025-03-31 17:09:31 +02:00
Eyal Toledano
6e6407f683 Merge pull request #69 from eyaltoledano/add-test-for-confirmation-prompt
Add test for confirmation prompt
2025-03-30 23:10:21 -04:00
Eyal Toledano
80f933cd82 test: Add tests for parse-prd overwrite confirmation and fix existing test
Adds unit tests to tests/unit/task-manager.test.js for the parse-prd command confirmation prompt when overwriting an existing tasks.json file. Also fixes the existing directory creation test. Refs #67, Fixes #65
2025-03-30 23:09:05 -04:00
Eyal Toledano
2c3986c097 Merge pull request #67 from joedanz/confirm-tasks.json-overwrite
Added confirmation for task overwrite if tasks.json exists.
Fully tested

POPS @JOEDANZ' DEV CHERRY!
2025-03-30 23:00:53 -04:00
Joe Danziger
7086a77625 Added confirmation for task overwrite if tasks.json exists.
Slight refactor moving numTasks and outputPath to top with the other variables.  Eliminates duplication, and keeps us from having to check path twice.
Resolves #65
2025-03-30 18:30:00 -04:00
Eyal Toledano
66ca02242d Merge pull request #63 from eyaltoledano/23.9
23.9
2025-03-30 02:58:20 -04:00
Eyal Toledano
c211818303 chore: task management 2025-03-30 02:56:14 -04:00
Eyal Toledano
728ba254c9 chore: documentation update and cursor rules update. 2025-03-30 02:38:51 -04:00
Eyal Toledano
42585519d3 feat(cache): Implement caching for listTasks MCP endpoint
Implemented LRU caching for the  function to improve performance for repeated requests.

Key changes include:
- Added  dependency.
- Introduced a reusable  utility function in  leveraging a .
- Refactored  in  to use the caching utility with a key based on task path, filter, and subtask flag.
- Modified  to include the  boolean flag in the final JSON response structure, nesting the original data under a  key.
- Added  function and corresponding MCP tool () for monitoring cache performance.
- Improved error handling in  for cases where  is not found.

This addresses the previous issue of the empty task list likely caused by stale cache entries and provides clear visibility into whether a response is served from the cache.

Relates to #23.9
2025-03-30 02:25:24 -04:00
Eyal Toledano
cd4f4e66d7 feat(mcp): Refactor MCP tools for direct function calls & add docs
This commit introduces a major refactoring of the MCP server implementation to prioritize direct function calls over CLI execution, enhancing performance and reliability. It also includes substantial updates to documentation for consistency and interlinking.

**MCP Server & Core Logic Refactoring:**

1.  **Introduce Direct Function Wrappers ():**
    *   Created  to house direct wrappers for core Task Master functions (imported from ).
    *   Implemented  as the first wrapper, calling .
    *   Added  utility within  to centralize  file location logic, removing duplication.
    *   Established the  map for registering these wrappers.

2.  **Enhance MCP Utilities ():**
    *   Added : A primary utility function to streamline MCP tool  methods. It handles logging, argument processing (incl. project root normalization), calling the direct action function (e.g., ), processing results via , and formatting the final MCP response.
    *   Added : Standardizes processing of  objects returned by direct function wrappers.
    *   Added : Filters sensitive/large fields (like , ) from responses sent to the MCP client.
    *   Added , ,  to support the new workflow.
    *   Refactored  to use  internally, simplifying its usage (though it's now primarily a fallback).

3.  **Update MCP Tools (, ):**
    *   Refactored  to use  with , significantly simplifying the tool's  method.
    *   Updated  (initially) to use the improved  (Note: further refactoring to use a direct wrapper for  would follow the  pattern).

**Documentation Enhancements:**

4.  **Comprehensive Interlinking:** Added  links across rule files (, , , , , ) to connect related guidelines, improving navigation.

5.  **Standardize CLI Syntax ():** Removed legacy ℹ️ Initialized Perplexity client with OpenAI compatibility layer examples, reinforcing ℹ️ Initialized Perplexity client with OpenAI compatibility layer
  _____         _      __  __           _
 |_   _|_ _ ___| | __ |  \/  | __ _ ___| |_ ___ _ __
   | |/ _` / __| |/ / | |\/| |/ _` / __| __/ _ \ '__|
   | | (_| \__ \   <  | |  | | (_| \__ \ ||  __/ |
   |_|\__,_|___/_|\_\ |_|  |_|\__,_|___/\__\___|_|

by https://x.com/eyaltoledano
╭────────────────────────────────────────────╮
│                                            │
│   Version: 0.9.30   Project: Task Master   │
│                                            │
╰────────────────────────────────────────────╯

╭─────────────────────╮
│                     │
│   Task Master CLI   │
│                     │
╰─────────────────────╯

╭───────────────────╮
│  Task Generation  │
╰───────────────────╯
    parse-prd                 --input=<file.txt> [--tasks=10]          Generate tasks from a PRD document
    generate                                                           Create individual task files from tasks…

╭───────────────────╮
│  Task Management  │
╰───────────────────╯
    list                      [--status=<status>] [--with-subtas…      List all tasks with their status
    set-status                --id=<id> --status=<status>              Update task status (done, pending, etc.)
    update                    --from=<id> --prompt="<context>"         Update tasks based on new requirements
    add-task                  --prompt="<text>" [--dependencies=…      Add a new task using AI
    add-dependency            --id=<id> --depends-on=<id>              Add a dependency to a task
    remove-dependency         --id=<id> --depends-on=<id>              Remove a dependency from a task

╭──────────────────────────╮
│  Task Analysis & Detail  │
╰──────────────────────────╯
    analyze-complexity        [--research] [--threshold=5]             Analyze tasks and generate expansion re…
    complexity-report         [--file=<path>]                          Display the complexity analysis report
    expand                    --id=<id> [--num=5] [--research] […      Break down tasks into detailed subtasks
    expand --all              [--force] [--research]                   Expand all pending tasks with subtasks
    clear-subtasks            --id=<id>                                Remove subtasks from specified tasks

╭─────────────────────────────╮
│  Task Navigation & Viewing  │
╰─────────────────────────────╯
    next                                                               Show the next task to work on based on …
    show                      <id>                                     Display detailed information about a sp…

╭─────────────────────────╮
│  Dependency Management  │
╰─────────────────────────╯
    validate-dependenci…                                               Identify invalid dependencies without f…
    fix-dependencies                                                   Fix invalid dependencies automatically

╭─────────────────────────╮
│  Environment Variables  │
╰─────────────────────────╯
    ANTHROPIC_API_KEY              Your Anthropic API key                             Required
    MODEL                          Claude model to use                                Default: claude-3-7-sonn…
    MAX_TOKENS                     Maximum tokens for responses                       Default: 4000
    TEMPERATURE                    Temperature for model responses                    Default: 0.7
    PERPLEXITY_API_KEY             Perplexity API key for research                    Optional
    PERPLEXITY_MODEL               Perplexity model to use                            Default: sonar-pro
    DEBUG                          Enable debug logging                               Default: false
    LOG_LEVEL                      Console output level (debug,info,warn,error)       Default: info
    DEFAULT_SUBTASKS               Default number of subtasks to generate             Default: 3
    DEFAULT_PRIORITY               Default task priority                              Default: medium
    PROJECT_NAME                   Project name displayed in UI                       Default: Task Master

  _____         _      __  __           _
 |_   _|_ _ ___| | __ |  \/  | __ _ ___| |_ ___ _ __
   | |/ _` / __| |/ / | |\/| |/ _` / __| __/ _ \ '__|
   | | (_| \__ \   <  | |  | | (_| \__ \ ||  __/ |
   |_|\__,_|___/_|\_\ |_|  |_|\__,_|___/\__\___|_|

by https://x.com/eyaltoledano
╭────────────────────────────────────────────╮
│                                            │
│   Version: 0.9.30   Project: Task Master   │
│                                            │
╰────────────────────────────────────────────╯

╭─────────────────────╮
│                     │
│   Task Master CLI   │
│                     │
╰─────────────────────╯

╭───────────────────╮
│  Task Generation  │
╰───────────────────╯
    parse-prd                 --input=<file.txt> [--tasks=10]          Generate tasks from a PRD document
    generate                                                           Create individual task files from tasks…

╭───────────────────╮
│  Task Management  │
╰───────────────────╯
    list                      [--status=<status>] [--with-subtas…      List all tasks with their status
    set-status                --id=<id> --status=<status>              Update task status (done, pending, etc.)
    update                    --from=<id> --prompt="<context>"         Update tasks based on new requirements
    add-task                  --prompt="<text>" [--dependencies=…      Add a new task using AI
    add-dependency            --id=<id> --depends-on=<id>              Add a dependency to a task
    remove-dependency         --id=<id> --depends-on=<id>              Remove a dependency from a task

╭──────────────────────────╮
│  Task Analysis & Detail  │
╰──────────────────────────╯
    analyze-complexity        [--research] [--threshold=5]             Analyze tasks and generate expansion re…
    complexity-report         [--file=<path>]                          Display the complexity analysis report
    expand                    --id=<id> [--num=5] [--research] […      Break down tasks into detailed subtasks
    expand --all              [--force] [--research]                   Expand all pending tasks with subtasks
    clear-subtasks            --id=<id>                                Remove subtasks from specified tasks

╭─────────────────────────────╮
│  Task Navigation & Viewing  │
╰─────────────────────────────╯
    next                                                               Show the next task to work on based on …
    show                      <id>                                     Display detailed information about a sp…

╭─────────────────────────╮
│  Dependency Management  │
╰─────────────────────────╯
    validate-dependenci…                                               Identify invalid dependencies without f…
    fix-dependencies                                                   Fix invalid dependencies automatically

╭─────────────────────────╮
│  Environment Variables  │
╰─────────────────────────╯
    ANTHROPIC_API_KEY              Your Anthropic API key                             Required
    MODEL                          Claude model to use                                Default: claude-3-7-sonn…
    MAX_TOKENS                     Maximum tokens for responses                       Default: 4000
    TEMPERATURE                    Temperature for model responses                    Default: 0.7
    PERPLEXITY_API_KEY             Perplexity API key for research                    Optional
    PERPLEXITY_MODEL               Perplexity model to use                            Default: sonar-pro
    DEBUG                          Enable debug logging                               Default: false
    LOG_LEVEL                      Console output level (debug,info,warn,error)       Default: info
    DEFAULT_SUBTASKS               Default number of subtasks to generate             Default: 3
    DEFAULT_PRIORITY               Default task priority                              Default: medium
    PROJECT_NAME                   Project name displayed in UI                       Default: Task Master       as the primary CLI.

6.  **Add MCP Architecture & Workflow Sections:** Added detailed sections in  and  explaining MCP server structure and the workflow for adding new MCP tool integrations using the direct function pattern.

7.  **Clarify MCP Role:** Updated  and  to better explain the MCP server's role and its specific utilities.

Overall, this establishes a cleaner, more performant, and maintainable pattern for integrating Task Master functionality with the MCP server, supported by improved documentation.
2025-03-30 00:29:12 -04:00
Eyal Toledano
a5370ebdb7 Merge pull request #61 from eyaltoledano/update-subtask
Okay, focusing specifically on the `update-subtask` functionality and the related fix we worked on, here's a succinct description suitable for a commit message body or PR:

*   **`update-subtask` Feature:**
    *   Allows appending additional information (details, context) to an *existing* subtask using AI (`updateSubtaskById` function in `task-manager.js`).
    *   Crucially, it *adds* information rather than overwriting existing content.
    *   Uses XML-like tags (`<info added on ...>`) with timestamps to mark the added content within the subtask's `details` field in `tasks.json`.
    *   Preserves completed subtasks, preventing modification of 'done' items.
*   **Associated UI Fix:**
    *   Corrected the `show <subtask_id>` command (`displayTaskById` in `ui.js`) to display the `details` field for subtasks.
    *   This ensures the information appended by `update-subtask` is actually visible to the user.
2025-03-29 20:36:36 -04:00
Eyal Toledano
1094f50014 fix(ui): Display subtask details in 'show' command output
Ensures that the 'details' field, which can be updated via 'update-subtask', is correctly rendered when viewing a specific subtask.

fix(test): Remove empty describe block causing Jest error

Removes a redundant  block in  that contained a  hook but no tests.

chore: Add  npm script
2025-03-29 20:33:18 -04:00
Eyal Toledano
4604f96a92 New update-subtask command. 2025-03-29 19:14:44 -04:00
Eyal Toledano
e70f44b6fb fix: Correct handling of dependencies between subtasks
This commit fixes an issue with the dependency management system where
dependencies between subtasks of the same parent task were not being
handled correctly. Previously, when trying to add a dependency between
subtasks (e.g., making 23.8 depend on 23.13), the system incorrectly
interpreted it as a circular dependency of the parent task depending
on itself.

Changes:
- Modified add-dependency and remove-dependency commands to preserve
  string format for subtask IDs containing dots instead of converting
  them to integers
- Updated dependency detection logic to properly handle string-based
  subtask IDs
- Added specific tests verifying both successful dependency chains
  and circular dependency detection between subtasks of the same parent

The fix ensures proper task ordering for development workflows where
related subtasks must be completed in sequence (like establishing tests
before implementing a feature). It maintains backward compatibility with
existing task structures while correctly enforcing dependency chains
within subtask groups.

Tests:
- Added tests for valid dependency chains between subtasks of the same parent
- Added tests for circular dependency detection in subtask relationships
- Added specific test for the 23.8->23.13->23.10 subtask dependency chain

Resolves the issue where the suggested task development workflow couldn't
be properly enforced through the dependency management system.
2025-03-29 18:19:39 -04:00
Eyal Toledano
57f655affd adds mcp protocol spec and docs. 2025-03-29 18:07:51 -04:00
Eyal Toledano
38cd889ccd chore: expands some tasks and adds 'inspector' commands to scripts in package json to easily get inspector up for our mcp server at http://localhost:8888/?proxyPort=9000 which should play nice for those of us who have shit running on 3000 2025-03-29 17:52:11 -04:00
Eyal Toledano
18ea4dd4a8 Restore correct versions of task files from feature branch 2025-03-29 17:31:30 -04:00
Eyal Toledano
ba651645b0 Merge crunchyman/feat.add.mcp.2 into next 2025-03-29 17:26:04 -04:00
Eyal Toledano
42cac13f2c Merge remote changes and resolve conflicts 2025-03-29 17:23:59 -04:00
Ralph Khreish
257160a967 fix: addTask mcp tool (#50) 2025-03-29 17:16:41 +01:00
Ralph Khreish
9fd42eeafd fix: cursor connecting to mcp server and typo task-master-mcp 2025-03-29 12:10:48 +01:00
Ralph Khreish
eeae027d2b chore: fix ci p1 2025-03-29 09:29:50 +01:00
Ralph Khreish
a10470ba2f chore: change node-fetch override version for changeset 2025-03-29 09:09:15 +01:00
Ralph Khreish
397c181202 chore: fix changesets/action job 2025-03-29 08:54:54 +01:00
Ralph Khreish
179eb85a4c chore: fix CI 2025-03-28 21:03:01 +01:00
Ralph Khreish
fb336ded3e fix: changeset action (#49) 2025-03-28 20:51:06 +01:00
Ralph Khreish
5ec3651e64 fix: bug workflow being in the wrong directory (#48) 2025-03-28 20:43:36 +01:00
Ralph Khreish
b41946c485 Merge remote-tracking branch 'origin/main' into next 2025-03-28 20:41:34 +01:00
Ralph Khreish
4eed269378 feat: Implement MCP (#20) v0.10.2 2025-03-28 20:38:53 +01:00
Ralph Khreish
a8b055f05d chore: add changeset for PR 2025-03-28 20:38:37 +01:00
Ralph Khreish
a8e4bb0407 fix: apply @rtuin suggestions 2025-03-28 20:36:27 +01:00
Ralph Khreish
0663ff1bea chore: cleanup 2025-03-28 20:36:27 +01:00
Ralph Khreish
3582798293 fix(mcp): get everything working, cleanup, and test all tools 2025-03-28 20:36:15 +01:00
Ralph Khreish
37c5b83f60 feat(wip): set up mcp server and tools, but mcp on cursor not working despite working in inspector 2025-03-28 20:36:00 +01:00
Ralph Khreish
f3e6f0b70e feat(wip): initial commits for sub-tasks 1,2,3 for task 23 2025-03-28 20:36:00 +01:00
Ralph Khreish
eafdb47418 feat: add github actions to automate github and npm releases 2025-03-28 18:45:24 +01:00
Ralph Khreish
44db895303 chore: init config for changeset 2025-03-28 18:45:24 +01:00
Eyal Toledano
472b517e22 chore: task management, adjust readmes, adjust cursor rules, add mcp_integration.md to docs 2025-03-27 23:40:13 -04:00
Eyal Toledano
1d807541ae feat: enhance commands with multi-subtask support, MCP integration, and update notifications
- Add support for comma-separated subtask IDs in remove-subtask command
- Implement MCP configuration in project initialization
- Add package update notification system with version comparison
- Improve command documentation with boolean flag conventions
- Add comprehensive error handling for unknown options
- Update help text with better examples and formatting
- Implement proper validation for command inputs
- Add global error handling patterns with helpful user messages
2025-03-27 16:14:12 -04:00
Eyal Toledano
08d3f2db26 git commit -m "fix: improve CLI error handling and standardize option flags
This commit fixes several issues with command line interface error handling:

   1. Fix inconsistent behavior between --no-generate and --skip-generate:
      - Standardized on --skip-generate across all commands
      - Updated bin/task-master.js to use --skip-generate instead of --no-generate
      - Modified add-subtask and remove-subtask commands to use --skip-generate

   2. Enhance error handling for unknown options:
      - Removed .allowUnknownOption() from commands to properly detect unknown options
      - Added global error handler in bin/task-master.js for unknown commands/options
      - Added command-specific error handlers with helpful error messages

   3. Improve user experience with better help messages:
      - Added helper functions to display formatted command help on errors
      - Created command-specific help displays for add-subtask and remove-subtask
      - Show available options when encountering unknown options

   4. Update MCP server configuration:
      - Modified .cursor/mcp.json to use node ./mcp-server/server.js directly
      - Removed npx -y usage for more reliable execution

   5. Other minor improvements:
      - Adjusted column width for task ID display in UI
      - Updated version number in package-lock.json to 0.9.30

   This resolves issues where users would see confusing error messages like
   'error: unknown option --generate' when using an incorrect flag."
2025-03-27 13:32:56 -04:00
Eyal Toledano
cea14b55b3 Ensures that the updateTask (single task) doesn't change the title of the task. 2025-03-27 01:46:13 -04:00
Eyal Toledano
707618ca5d Implements updateTask command to update a single task instead of all tasks as of a certain one. Useful when iterating and R&D'ing bit by bit and needing more research after what has been done. 2025-03-27 01:33:20 -04:00
Eyal Toledano
1abcf69ecd Adds 3 docs for MCP related context provision. Also updates the system prompt for the task update command. Updated the system prompt with clear guidelines about:
Preserving completed subtasks exactly as they are
Building upon what has already been done
Creating new subtasks instead of modifying completed ones
Making new subtasks specific and targeted
Added specific instructions to the Perplexity AI system message to emphasize preserving completed subtasks
Added an informative boxed message to the user explaining how completed subtasks will be handled during the update process
Added emphatic instructions in the user prompts to both Claude and Perplexity to highlight completed subtasks that must be preserved
These changes ensure that:
Completed subtasks will be preserved
The AI will build on top of what's already been done
If something needs to be changed/undone, it will be handled through new subtasks
The user is clearly informed about how subtasks are handled.
2025-03-27 00:58:14 -04:00
Eyal Toledano
751854d5ee adds 'tm' and 'taskmaster' aliases to zshrc or bashrc automatically, added as options in the init questions. 2025-03-27 00:00:38 -04:00
Eyal Toledano
444fb24022 Merge remote-tracking branch 'origin/main' into crunchyman/feat.add.mcp.2 2025-03-26 23:54:47 -04:00
Eyal Toledano
98d5cefba8 Merge pull request #34 from eyaltoledano/upversion-0.9.29
upversion npm package to 0.9.29
v0.9.30
2025-03-26 21:29:58 -04:00