Commit Graph

205 Commits

Author SHA1 Message Date
Eyal Toledano
f37ef2c3a3 Recovers lost files and commits work from the past 5-6 days. Holy shit that was a close call. 2025-04-08 02:48:15 -04:00
Eyal Toledano
887d9bffa7 Replace API keys with placeholders 2025-04-08 02:47:57 -04:00
Eyal Toledano
ac0c2e3854 Remove accidentally exposed keys 2025-04-08 02:47:57 -04:00
Eyal Toledano
3628951120 feat(mcp): Refine AI-based MCP tool patterns and update MCP rules 2025-04-08 02:47:57 -04:00
Ralph Khreish
9620e032ac fix: remove master command 2025-04-04 00:01:42 +02:00
Eyal Toledano
597a2f7494 Makes default command npx -y task-master-mcp-server 2025-04-03 15:57:01 -04:00
Eyal Toledano
b8362bbbe7 Supports both task-master-mcp and task-master-mcp-server commands 2025-04-03 15:24:42 -04:00
Eyal Toledano
c280f963fe chore: Adjusts the mcp server command from task-master-mcp-server to task-master-mcp. It cannot be simpler because global installations of the npm package would expose this as a globally available command. Calling it like 'mcp' could collide and also is lacking in branding and clarity of what command would be run. This is as good as we can make it. 2025-04-03 15:17:11 -04:00
Eyal Toledano
880a98e8e2 chore: changeset + update rules. 2025-04-03 04:09:27 -04:00
Eyal Toledano
a8538b2e9c chore: task mgmt 2025-04-03 01:49:48 -04:00
Eyal Toledano
7c7f205350 chore: task mgmt 2025-04-03 01:45:19 -04:00
Eyal Toledano
7f214b76d7 Changeset 2025-04-03 00:57:21 -04:00
Eyal Toledano
684ae52542 feat: Adds initialize-project to the MCP tools to enable onboarding to Taskmaster directly from MCP only. 2025-04-03 00:55:58 -04:00
Eyal Toledano
4ae97f145e chore: adds task-master-ai to the createProjectStructure which merges/creates the package.json. This is so that onboarding via MCP is possible. When the MCP server runs and does npm i, it will get task-master, and get the ability to run task-master init. 2025-04-03 00:48:27 -04:00
Eyal Toledano
b684753a35 chore: Adjust init with new dependencies for MCP and other missing dependencies. 2025-04-03 00:39:33 -04:00
Eyal Toledano
bda54f3296 feat: adds remove-task command + MCP implementation. 2025-04-03 00:35:11 -04:00
Eyal Toledano
ab38a48599 fix: Adjusts default temp from 0.7 down to 0.2 2025-04-02 22:41:34 -04:00
Eyal Toledano
e519a832f6 feat: Adjustst the parsePRD system prompt and cursor rule so to improve following specific details that may already be outliend in the PRD. This reduces cases where the AI will not use those details and come up with its own approach. Next commit will reduce detfault temperature to do this at scale across the system too. 2025-04-02 22:36:36 -04:00
Eyal Toledano
433c5df414 chore: adjust the setupMCPConfiguration so it adds in the new env stuff. 2025-04-02 22:29:38 -04:00
Eyal Toledano
225a0781e9 fix(mcp): optimize get_task response payload by removing allTasks data
- Add custom processTaskResponse function to get-task.js to filter response data
- Significantly reduce MCP response size by returning only the requested task
- Preserve allTasks in CLI/UI for dependency status formatting
- Update changeset with documentation of optimization

This change maintains backward compatibility while making MCP responses
more efficient, addressing potential context overflow issues in AI clients.
2025-04-02 22:15:21 -04:00
Eyal Toledano
52adb5c2f6 fix: Improve MCP server robustness and debugging
- Refactor  for more reliable project root detection, particularly when running within integrated environments like Cursor IDE. Includes deriving root from script path and avoiding fallback to '/'.
- Enhance error handling in :
    - Add detailed debug information (paths searched, CWD, etc.) to the error message when  is not found in the provided project root.
    - Improve clarity of error messages and potential solutions.
- Add verbose logging in  to trace session object content and the finally resolved project root path, aiding in debugging path-related issues.
- Add default values for  and  to the example  environment configuration.
2025-04-02 22:04:00 -04:00
Eyal Toledano
9869ebe045 docs: Update rules for MCP/CLI workflow and project root handling
Updated several Cursor rules documentation files (`mcp.mdc`, `utilities.mdc`, `architecture.mdc`, `new_features.mdc`, `commands.mdc`) to accurately reflect recent refactoring and clarify best practices.

Key documentation updates include:

- Explicitly stating the preference for using MCP tools over CLI commands in integrated environments (`commands.mdc`, `dev_workflow.mdc`).

- Describing the new standard pattern for getting the project root using `getProjectRootFromSession` within MCP tool `execute` methods (`mcp.mdc`, `utilities.mdc`, `architecture.mdc`, `new_features.mdc`).

- Clarifying the simplified role of `findTasksJsonPath` in direct functions (`mcp.mdc`, `utilities.mdc`, `architecture.mdc`, `new_features.mdc`).

- Ensuring proper interlinking between related documentation files.
2025-04-02 12:53:13 -04:00
Eyal Toledano
40ed37b166 refactor(mcp-server): Prioritize session roots for project path discovery
This commit refactors how the MCP server determines the project root directory, prioritizing the path provided by the client session (e.g., Cursor) for increased reliability and simplification.

Previously, project root discovery relied on a complex chain of fallbacks (environment variables, CWD searching, package path checks) within `findTasksJsonPath`. This could be brittle and less accurate when running within an integrated environment like Cursor.

Key changes:

- **Prioritize Session Roots:** MCP tools (`add-task`, `add-dependency`, etc.) now first attempt to extract the project root URI directly from `session.roots[0].uri`.

- **New Utility `getProjectRootFromSession`:** Added a utility function in `mcp-server/src/tools/utils.js` to encapsulate the logic for extracting and decoding the root URI from the session object.

- **Refactor MCP Tools:** Updated tools (`add-task.js`, `add-dependency.js`) to use `getProjectRootFromSession`.

- **Simplify `findTasksJsonPath`:** Prioritized `args.projectRoot`, removed checks for `TASK_MASTER_PROJECT_ROOT` env var and package directory fallback. Retained CWD search and cache check for CLI compatibility.

- **Fix `reportProgress` Usage:** Corrected parameters in `add-dependency.js`.

This change makes project root determination more robust for the MCP server while preserving discovery mechanisms for the standalone CLI.
2025-04-02 12:33:46 -04:00
Eyal Toledano
3cdaff6c66 feat(mcp): major MCP server improvements and documentation overhaul
- Enhance MCP server robustness and usability:
  - Implement smart project root detection with hierarchical fallbacks
  - Make projectRoot parameter optional across all MCP tools
  - Add comprehensive PROJECT_MARKERS for reliable project detection
  - Improve error messages and logging for better debugging
  - Split monolithic core into focused direct-function files

- Implement full suite of MCP commands:
  - Add task management: update-task, update-subtask, generate
  - Add task organization: expand-task, expand-all, clear-subtasks
  - Add dependency handling: add/remove/validate/fix dependencies
  - Add analysis tools: analyze-complexity, complexity-report
  - Rename commands for better API consistency (list-tasks → get-tasks)

- Enhance documentation and developer experience:
  - Create and bundle new taskmaster.mdc as comprehensive reference
  - Document all tools with natural language patterns and examples
  - Clarify project root auto-detection in documentation
  - Standardize naming conventions across MCP components
  - Add cross-references between related tools and commands

- Improve UI and progress tracking:
  - Add color-coded progress bars with status breakdown
  - Implement cancelled/deferred task status handling
  - Enhance status visualization and counting
  - Optimize display for various terminal sizes

This major update significantly improves the robustness and usability
of the MCP server while providing comprehensive documentation for both
users and developers. The changes make Task Master more intuitive to
use programmatically while maintaining full CLI functionality.
2025-04-01 03:48:05 -04:00
Eyal Toledano
6161febbde fix(mcp): make projectRoot optional in all MCP tools
- Update all tool definitions to use z.string().optional() for projectRoot
- Fix direct function implementations to use findTasksJsonPath(args, log) pattern
- Enables consistent project root detection without requiring explicit params
- Update changeset to document these improvements

This change ensures MCP tools work properly with the smart project root
detection system, removing the need for explicit projectRoot parameters in
client applications. Improves usability and reduces integration friction.
2025-04-01 03:12:44 -04:00
Eyal Toledano
281c476738 chore/doc: renames list-tasks to get-tasks and show-tasks to get-tasks in the mcp tools to follow api conventions and likely natural language used (get my tasks). also updates changeset. 2025-04-01 02:45:42 -04:00
Eyal Toledano
78840a1f45 chore: changesett 2025-04-01 02:11:09 -04:00
Eyal Toledano
6bbc1b4499 chore: task mgmt 2025-04-01 02:09:39 -04:00
Eyal Toledano
65e0fcc328 Adjusts the taskmaster mcp invokation command in mcp.json shipped with taskmaster init. 2025-04-01 02:04:34 -04:00
Eyal Toledano
e90f822bdd feat(paths): Implement robust project root detection and path utilities
Overhauls the project root detection system with a hierarchical precedence mechanism that intelligently locates tasks.json and identifies project roots. This improves user experience by reducing the need for explicit path parameters and enhances cross-platform compatibility.

Key Improvements:
- Implement hierarchical precedence for project root detection:
  * Environment variable override (TASK_MASTER_PROJECT_ROOT)
  * Explicitly provided --project-root parameter
  * Cached project root from previous successful operations
  * Current directory with project markers
  * Parent directory traversal to find tasks.json
  * Package directory as fallback

- Create comprehensive PROJECT_MARKERS detection system with 20+ common indicators:
  * Task Master specific files (tasks.json, tasks/tasks.json)
  * Version control directories (.git, .svn)
  * Package manifests (package.json, pyproject.toml, Gemfile, go.mod, Cargo.toml)
  * IDE/editor configurations (.cursor, .vscode, .idea)
  * Dependency directories (node_modules, venv, .venv)
  * Configuration files (.env, tsconfig.json, webpack.config.js)
  * CI/CD files (.github/workflows, .gitlab-ci.yml, .circleci/config.yml)

- DRY refactoring of path utilities:
  * Centralize path-related functions in core/utils/path-utils.js
  * Export PROJECT_MARKERS as a single source of truth
  * Add caching via lastFoundProjectRoot for performance optimization

- Enhanced user experience:
  * Improve error messages with specific troubleshooting guidance
  * Add detailed logging to indicate project root detection source
  * Update tool parameter descriptions for better clarity
  * Add recursive parent directory searching for tasks.json

Testing:
- Verified in local dev environment
- Added unit tests for the progress bar visualization
- Updated "automatically detected" description in MCP tools

This commit addresses Task #38: Implement robust project root handling for file paths.
2025-04-01 01:35:10 -04:00
Eyal Toledano
22bd13c197 chore: removes the optional from projectRoot. 2025-03-31 15:58:52 -04:00
Eyal Toledano
059ce5e716 Enhance progress bars with status breakdown, improve readability, optimize display width, and update changeset 2025-03-31 15:35:48 -04:00
Eyal Toledano
38a2805dd8 feat(ui): add cancelled status and improve MCP resource docs
- Add cancelled status to UI module for marking tasks cancelled without deletion
- Improve MCP server resource documentation with implementation examples
- Update architecture.mdc with detailed resource management info
- Add comprehensive resource handling guide to mcp.mdc
- Update changeset to reflect new features and documentation
- Mark task 23.6 as cancelled (MCP SDK integration no longer needed)
- Complete task 23.12 (structured logging system)
2025-03-31 14:50:56 -04:00
Eyal Toledano
036a7bd2d3 docs: improve MCP server resource documentation
- Update subtask 23.10 with details on resource and resource template implementation
- Add resource management section to architecture.mdc with proper directory structure
- Create comprehensive resource implementation guide in mcp.mdc with examples and best practices
- Document proper integration of resources in FastMCP server initialization
2025-03-31 14:38:57 -04:00
Eyal Toledano
b58badec36 feat(mcp): Implement add-dependency MCP command for creating dependency relationships between tasks 2025-03-31 14:24:45 -04:00
Eyal Toledano
f7970a542e chore: task mgmt 2025-03-31 14:23:59 -04:00
Eyal Toledano
ac6b0a3f14 chore: task mgmt 2025-03-31 14:21:05 -04:00
Eyal Toledano
6f87faa9dc feat(mcp): Implement complexity-report MCP command for displaying task complexity analysis reports 2025-03-31 14:20:00 -04:00
Eyal Toledano
c58d4b51ef Implement fix-dependencies MCP command for automatically fixing invalid dependencies 2025-03-31 14:01:49 -04:00
Eyal Toledano
9730576a03 Implement validate-dependencies MCP command for checking dependency validity 2025-03-31 13:55:07 -04:00
Eyal Toledano
a6a94e3a18 Implement remove-dependency MCP command for removing dependencies from tasks 2025-03-31 13:51:39 -04:00
Eyal Toledano
38c368a745 chore: task mgmt 2025-03-31 13:41:05 -04:00
Eyal Toledano
f032116961 chore: task mgmt 2025-03-31 13:28:36 -04:00
Eyal Toledano
c274c77aa7 feat(ui): add color-coded progress bar to task show view for visualizing subtask completion status 2025-03-31 13:18:58 -04:00
Eyal Toledano
1c72c88a32 Implement expand-all MCP command for expanding all pending tasks with subtasks 2025-03-31 13:10:10 -04:00
Eyal Toledano
f007df06d8 Implement clear-subtasks MCP command for clearing subtasks from parent tasks 2025-03-31 13:07:42 -04:00
Eyal Toledano
6481f725aa Implement analyze-complexity MCP command for analyzing task complexity 2025-03-31 13:04:53 -04:00
Eyal Toledano
a3abf194ad Implement remove-subtask MCP command for removing subtasks from parent tasks 2025-03-31 13:01:31 -04:00
Eyal Toledano
0b6207c882 Implement add-subtask MCP command for adding subtasks to existing tasks 2025-03-31 12:56:38 -04:00
Eyal Toledano
1bb1309ef8 feat: implement add-task MCP command
- Create direct function wrapper in add-task.js with prompt and dependency handling

- Add MCP tool integration for creating new tasks via AI

- Update task-master-core.js to expose addTaskDirect function

- Update changeset to document the new command
2025-03-31 12:50:14 -04:00