Skip to content

Ralph/chore/fix.coderabbit.issues#1432

Merged
Crunchyman-ralph merged 4 commits into
nextfrom
ralph/chore/fix.coderabbit.issues
Nov 21, 2025
Merged

Ralph/chore/fix.coderabbit.issues#1432
Crunchyman-ralph merged 4 commits into
nextfrom
ralph/chore/fix.coderabbit.issues

Conversation

@Crunchyman-ralph

@Crunchyman-ralph Crunchyman-ralph commented Nov 21, 2025

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • 🐛 Bug fix
  • ✨ Feature
  • 🔌 Integration
  • 📝 Docs
  • 🧹 Refactor
  • Other:

Description

Related Issues

How to Test This

# Example commands or steps

Expected result:

Contributor Checklist

  • Created changeset: npm run changeset
  • Tests pass: npm test
  • Format check passes: npm run format-check (or npm run format to fix)
  • Addressed CodeRabbit comments (if any)
  • Linked related issues (if any)
  • Manually tested the changes

Changelog Entry


For Maintainers

  • PR title follows conventional commits
  • Target branch correct
  • Labels added
  • Milestone assigned (if applicable)

Summary by CodeRabbit

  • Refactor

    • Standardized parameter handling across server tools for more consistent behavior.
  • Bug Fixes

    • Safer task retrieval to avoid missing-data errors.
    • More consistent error propagation for task operations.
  • Documentation

    • Updated autopilot tool descriptions to clarify phase handling (COMMIT directed to commit tool; RED/GREEN behavior clarified).
  • Chores

    • Minor code organization and small readability improvements.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot

changeset-bot Bot commented Nov 21, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4946c0f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Refactors many MCP server tools to call handleApiResult with a single options object (result, log, errorPrefix, projectRoot); updates autopilot complete tool description; centralizes task array null-safety in get-tasks; caches tasks path in parse-prd command; minor comment removal.

Changes

Cohort / File(s) Summary
handleApiResult refactor (many tools)
mcp-server/src/tools/{add-subtask.js,add-tag.js,add-task.js,analyze.js,clear-subtasks.js,complexity-report.js,copy-tag.js,delete-tag.js,expand-all.js,expand-task.js,fix-dependencies.js,initialize-project.js,list-tags.js,models.js,move-task.js,next-task.js,parse-prd.js,remove-dependency.js,remove-subtask.js,remove-task.js,rename-tag.js,research.js,scope-down.js,scope-up.js,set-task-status.js,update-subtask.js,update-task.js,update.js,use-tag.js
Replaced positional handleApiResult(...) calls with a single object argument: handleApiResult({ result, log, errorPrefix: '...', projectRoot: args.projectRoot }).
Autopilot complete tool description
apps/mcp/src/tools/autopilot/complete.tool.ts
Removed explicit COMMIT handling from the description and directs users to use the separate autopilot_commit tool; RED/GREEN semantics remain described.
Task fetching null-safety
apps/mcp/src/tools/tasks/get-tasks.tool.ts
Introduced local const tasks = result.tasks ?? [] and switched downstream uses to this local variable for consistent null-safe handling.
Parse-prd command minor optimization
scripts/modules/commands.js
Cached taskMaster.getTasksPath() result into tasksPath and reused it for readJSON, avoiding repeated lookups.
Minor cleanup
mcp-server/src/tools/get-operation-status.js
Removed an inline comment on the import line; no behavior change.
Task service error handling change
packages/tm-core/src/modules/tasks/services/task-service.ts
Unified catch handling: rethrow TaskMasterError instances unchanged; wrap unknown errors consistently with new TaskMasterError messages.

Sequence Diagram(s)

sequenceDiagram
    participant Tool as Tool (mcp-server tool)
    participant Handler as handleApiResult(options)

    Note over Tool: Previously called handleApiResult(result, log, msg, undefined, projectRoot)

    Tool->>Handler: handleApiResult({ result, log, errorPrefix: '...', projectRoot: args.projectRoot })
    Handler-->>Tool: standardized response (success|error)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to focus on:
    • Confirm handleApiResult implementation/signature was updated to accept the options object and fields names match (result, log, errorPrefix, projectRoot).
    • Inspect move-task.js for additional structural changes and unified response shapes.
    • Verify no accidental changes to error propagation semantics across tools (especially where undefined placeholder was previously used).
    • Validate packages/tm-core task-service catch behavior to ensure intended rethrow/wrapping logic.

Possibly related PRs

Suggested reviewers

  • eyaltoledano

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Ralph/chore/fix.coderabbit.issues' is vague and uses branch naming conventions rather than describing the actual changes made in the PR. Replace the title with a clear, descriptive summary of the main changes, such as 'Refactor handleApiResult to accept object parameters' or 'Update tool descriptions and parameter patterns'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 96.88% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ralph/chore/fix.coderabbit.issues

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98a23f3 and 4946c0f.

📒 Files selected for processing (3)
  • mcp-server/src/tools/parse-prd.js (1 hunks)
  • packages/tm-core/src/modules/tasks/services/task-service.ts (4 hunks)
  • scripts/modules/commands.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • scripts/modules/commands.js
  • mcp-server/src/tools/parse-prd.js
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: scripts/modules/task-manager/parse-prd.js:226-226
Timestamp: 2025-07-20T01:35:05.831Z
Learning: The parsePRD function in scripts/modules/task-manager/parse-prd.js has a different parameter structure than other task-manager functions - it uses `options` parameter instead of `context` parameter because it generates tasks from PRD documents rather than operating on existing tasks.
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: mcp-server/src/tools/agent-llm.js:1-3
Timestamp: 2025-10-12T11:06:36.374Z
Learning: The agent_llm MCP tool in mcp-server/src/tools/agent-llm.js is an exception to the standard MCP tool pattern. It should NOT use handleApiResult because it handles delegated LLM calls rather than direct API calls. Using createErrorResponse for error messages is the correct approach for this tool.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1002
File: .changeset/puny-friends-give.md:2-3
Timestamp: 2025-07-17T21:33:57.585Z
Learning: In the eyaltoledano/claude-task-master repository, the MCP server code in mcp-server/src/ is part of the main "task-master-ai" package, not a separate "mcp-server" package. When creating changesets for MCP server changes, use "task-master-ai" as the package name.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-09-26T19:10:32.906Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: tsconfig.json:22-28
Timestamp: 2025-09-26T19:10:32.906Z
Learning: In the eyaltoledano/claude-task-master repository, all internal tm/ package path mappings in tsconfig.json consistently point to TypeScript source files (e.g., "./packages/*/src/index.ts") rather than built JavaScript. This is intentional architecture because tsdown bundles internal packages directly from source during build time, eliminating the need for separate compilation of internal packages.

Applied to files:

  • packages/tm-core/src/modules/tasks/services/task-service.ts
📚 Learning: 2025-09-26T19:05:47.555Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:11-13
Timestamp: 2025-09-26T19:05:47.555Z
Learning: In the eyaltoledano/claude-task-master repository, internal tm/ packages use a specific export pattern where the "exports" field points to TypeScript source files (./src/index.ts) while "main" points to compiled output (./dist/index.js) and "types" points to source files (./src/index.ts). This pattern is used consistently across internal packages like tm/core and tm/ai-sdk-provider-grok-cli because they are consumed directly during build-time bundling with tsdown rather than being published as separate packages.

Applied to files:

  • packages/tm-core/src/modules/tasks/services/task-service.ts
🔇 Additional comments (1)
packages/tm-core/src/modules/tasks/services/task-service.ts (1)

205-206: Uniform error handling is now consistent across all methods—no backward compatibility issues detected.

The refactoring successfully standardizes error re-throwing behavior across getTask, updateTask, updateTaskStatus, and getTagsWithStats. Each method now uniformly re-throws TaskMasterError instances without wrapping, while wrapping unknown errors with appropriate context.

Calling code throughout the codebase uses generic error handling patterns (null checks, success flags, or log-and-propagate) rather than inspecting specific error codes from these four methods. Special-case error handling for codes like NO_BRIEF_SELECTED is confined to other layers (e.g., api-storage.wrapError() and AI-processing methods like updateTaskWithPrompt), which remain unaffected.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
mcp-server/src/tools/move-task.js (1)

182-194: Critical: Undefined variable references.

The variables results and skippedMoves referenced on lines 186-187 are not defined in this scope. The results and skipped variables are only defined inside the if (fromIds.length > 1) block (lines 131-180) and are not accessible here. Additionally, there's a naming inconsistency: the inner block uses skipped (line 173) while this code references skippedMoves (line 187).

This code path (when fromIds.length !== toIds.length but fromIds.length <= 1) will throw a ReferenceError at runtime.

Possible fixes:

  1. If this branch should never execute, remove lines 182-194 entirely
  2. If this branch is needed, define results and skippedMoves (or skipped) variables before this return statement
  3. Consider whether the control flow logic around lines 129-195 needs restructuring

Please verify the intended behavior and correct the variable scoping.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e66150e and 98a23f3.

📒 Files selected for processing (33)
  • apps/mcp/src/tools/autopilot/complete.tool.ts (1 hunks)
  • apps/mcp/src/tools/tasks/get-tasks.tool.ts (3 hunks)
  • mcp-server/src/tools/add-subtask.js (1 hunks)
  • mcp-server/src/tools/add-tag.js (1 hunks)
  • mcp-server/src/tools/add-task.js (2 hunks)
  • mcp-server/src/tools/analyze.js (1 hunks)
  • mcp-server/src/tools/clear-subtasks.js (1 hunks)
  • mcp-server/src/tools/complexity-report.js (1 hunks)
  • mcp-server/src/tools/copy-tag.js (1 hunks)
  • mcp-server/src/tools/delete-tag.js (1 hunks)
  • mcp-server/src/tools/expand-all.js (1 hunks)
  • mcp-server/src/tools/expand-task.js (1 hunks)
  • mcp-server/src/tools/fix-dependencies.js (1 hunks)
  • mcp-server/src/tools/get-operation-status.js (1 hunks)
  • mcp-server/src/tools/initialize-project.js (1 hunks)
  • mcp-server/src/tools/list-tags.js (1 hunks)
  • mcp-server/src/tools/models.js (1 hunks)
  • mcp-server/src/tools/move-task.js (7 hunks)
  • mcp-server/src/tools/next-task.js (1 hunks)
  • mcp-server/src/tools/parse-prd.js (1 hunks)
  • mcp-server/src/tools/remove-dependency.js (1 hunks)
  • mcp-server/src/tools/remove-subtask.js (1 hunks)
  • mcp-server/src/tools/remove-task.js (1 hunks)
  • mcp-server/src/tools/rename-tag.js (1 hunks)
  • mcp-server/src/tools/research.js (1 hunks)
  • mcp-server/src/tools/scope-down.js (1 hunks)
  • mcp-server/src/tools/scope-up.js (1 hunks)
  • mcp-server/src/tools/set-task-status.js (1 hunks)
  • mcp-server/src/tools/update-subtask.js (1 hunks)
  • mcp-server/src/tools/update-task.js (1 hunks)
  • mcp-server/src/tools/update.js (1 hunks)
  • mcp-server/src/tools/use-tag.js (1 hunks)
  • scripts/modules/commands.js (1 hunks)
🧰 Additional context used
🧠 Learnings (37)
📓 Common learnings
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: scripts/modules/task-manager/parse-prd.js:226-226
Timestamp: 2025-07-20T01:35:05.831Z
Learning: The parsePRD function in scripts/modules/task-manager/parse-prd.js has a different parameter structure than other task-manager functions - it uses `options` parameter instead of `context` parameter because it generates tasks from PRD documents rather than operating on existing tasks.
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: mcp-server/src/tools/agent-llm.js:1-3
Timestamp: 2025-10-12T11:06:36.374Z
Learning: The agent_llm MCP tool in mcp-server/src/tools/agent-llm.js is an exception to the standard MCP tool pattern. It should NOT use handleApiResult because it handles delegated LLM calls rather than direct API calls. Using createErrorResponse for error messages is the correct approach for this tool.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-10-12T11:06:36.374Z
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: mcp-server/src/tools/agent-llm.js:1-3
Timestamp: 2025-10-12T11:06:36.374Z
Learning: The agent_llm MCP tool in mcp-server/src/tools/agent-llm.js is an exception to the standard MCP tool pattern. It should NOT use handleApiResult because it handles delegated LLM calls rather than direct API calls. Using createErrorResponse for error messages is the correct approach for this tool.

Applied to files:

  • mcp-server/src/tools/get-operation-status.js
  • mcp-server/src/tools/parse-prd.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/remove-dependency.js
  • mcp-server/src/tools/complexity-report.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/set-task-status.js
  • mcp-server/src/tools/update-subtask.js
  • mcp-server/src/tools/fix-dependencies.js
  • mcp-server/src/tools/expand-task.js
  • mcp-server/src/tools/next-task.js
  • mcp-server/src/tools/add-tag.js
  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/analyze.js
  • mcp-server/src/tools/expand-all.js
  • mcp-server/src/tools/initialize-project.js
  • mcp-server/src/tools/research.js
  • mcp-server/src/tools/use-tag.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Follow the provided structure for adding subtasks, including required options and detailed error handling.

Applied to files:

  • mcp-server/src/tools/add-task.js
  • mcp-server/src/tools/update-task.js
  • mcp-server/src/tools/update-subtask.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/clear-subtasks.js
  • mcp-server/src/tools/move-task.js
  • mcp-server/src/tools/remove-subtask.js
📚 Learning: 2025-07-20T01:35:05.831Z
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: scripts/modules/task-manager/parse-prd.js:226-226
Timestamp: 2025-07-20T01:35:05.831Z
Learning: The parsePRD function in scripts/modules/task-manager/parse-prd.js has a different parameter structure than other task-manager functions - it uses `options` parameter instead of `context` parameter because it generates tasks from PRD documents rather than operating on existing tasks.

Applied to files:

  • mcp-server/src/tools/add-task.js
  • mcp-server/src/tools/scope-up.js
  • scripts/modules/commands.js
  • mcp-server/src/tools/update-task.js
  • mcp-server/src/tools/parse-prd.js
  • mcp-server/src/tools/delete-tag.js
  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/complexity-report.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/set-task-status.js
  • mcp-server/src/tools/update-subtask.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/expand-task.js
  • mcp-server/src/tools/next-task.js
  • mcp-server/src/tools/models.js
  • mcp-server/src/tools/clear-subtasks.js
  • mcp-server/src/tools/move-task.js
  • mcp-server/src/tools/remove-subtask.js
  • mcp-server/src/tools/remove-task.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Remove references to non-existent tasks during validation

Applied to files:

  • mcp-server/src/tools/add-task.js
  • scripts/modules/commands.js
  • mcp-server/src/tools/update-task.js
  • apps/mcp/src/tools/tasks/get-tasks.tool.ts
  • mcp-server/src/tools/move-task.js
  • mcp-server/src/tools/remove-subtask.js
  • mcp-server/src/tools/remove-task.js
📚 Learning: 2025-07-17T21:33:57.585Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1002
File: .changeset/puny-friends-give.md:2-3
Timestamp: 2025-07-17T21:33:57.585Z
Learning: In the eyaltoledano/claude-task-master repository, the MCP server code in mcp-server/src/ is part of the main "task-master-ai" package, not a separate "mcp-server" package. When creating changesets for MCP server changes, use "task-master-ai" as the package name.

Applied to files:

  • mcp-server/src/tools/add-task.js
  • mcp-server/src/tools/update-task.js
  • mcp-server/src/tools/remove-dependency.js
  • mcp-server/src/tools/set-task-status.js
  • mcp-server/src/tools/update-subtask.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/expand-task.js
  • mcp-server/src/tools/next-task.js
  • mcp-server/src/tools/list-tags.js
  • mcp-server/src/tools/clear-subtasks.js
  • mcp-server/src/tools/move-task.js
  • mcp-server/src/tools/remove-subtask.js
  • mcp-server/src/tools/remove-task.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Use numeric IDs for direct task references

Applied to files:

  • mcp-server/src/tools/add-task.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks during cleanup

Applied to files:

  • mcp-server/src/tools/add-task.js
  • scripts/modules/commands.js
  • mcp-server/src/tools/update-task.js
  • apps/mcp/src/tools/tasks/get-tasks.tool.ts
  • mcp-server/src/tools/clear-subtasks.js
  • mcp-server/src/tools/remove-subtask.js
  • mcp-server/src/tools/remove-task.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Keep action handlers concise and focused; extract core functionality to appropriate modules and import/call relevant functions from core modules, passing parsed options.

Applied to files:

  • mcp-server/src/tools/scope-up.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/expand-all.js
  • mcp-server/src/tools/remove-task.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Track and report changes made during dependency cleanup

Applied to files:

  • scripts/modules/commands.js
  • mcp-server/src/tools/remove-dependency.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Use path.join() to construct file paths, follow established naming conventions (like task_001.txt), check file existence before deletion, and handle file deletion errors gracefully.

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : For AI-powered commands that benefit from project context, use the ContextGatherer utility for multi-source context extraction, support task IDs, file paths, custom context, and project tree, implement fuzzy search for automatic task discovery, and display detailed token breakdown for transparency.

Applied to files:

  • scripts/modules/commands.js
  • mcp-server/src/tools/expand-task.js
  • mcp-server/src/tools/move-task.js
📚 Learning: 2025-09-26T19:10:32.906Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: tsconfig.json:22-28
Timestamp: 2025-09-26T19:10:32.906Z
Learning: In the eyaltoledano/claude-task-master repository, all internal tm/ package path mappings in tsconfig.json consistently point to TypeScript source files (e.g., "./packages/*/src/index.ts") rather than built JavaScript. This is intentional architecture because tsdown bundles internal packages directly from source during build time, eliminating the need for separate compilation of internal packages.

Applied to files:

  • scripts/modules/commands.js
  • apps/mcp/src/tools/tasks/get-tasks.tool.ts
  • mcp-server/src/tools/move-task.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Regenerate task files after destructive operations, passing all required parameters to generation functions, and provide an option to skip regeneration if needed.

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Do not create circular dependencies between subtasks

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Support both task and subtask dependencies in cycle detection

Applied to files:

  • scripts/modules/commands.js
  • mcp-server/src/tools/update-subtask.js
📚 Learning: 2025-07-18T05:38:17.352Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 943
File: scripts/modules/task-manager/move-task.js:24-24
Timestamp: 2025-07-18T05:38:17.352Z
Learning: In the Claude Task Master system, core task-manager functions are designed with fallback mechanisms for missing projectRoot parameters using the pattern `const projectRoot = providedProjectRoot || findProjectRoot();`. The readJSON and writeJSON functions have default parameters (projectRoot = null, tag = null) and handle missing parameters gracefully. Adding strict validation to these core functions would break the established flexible architecture pattern.

Applied to files:

  • scripts/modules/commands.js
  • mcp-server/src/tools/update-task.js
  • mcp-server/src/tools/copy-tag.js
  • mcp-server/src/tools/add-tag.js
  • mcp-server/src/tools/move-task.js
📚 Learning: 2025-07-18T17:10:02.683Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:02.683Z
Learning: Applies to .taskmaster/config.json : Store Taskmaster configuration settings (AI model selections, parameters, logging level, default subtasks/priority, project name, tag management) in `.taskmaster/config.json` in the project root. Do not configure these via environment variables.

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-07-31T21:48:00.389Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 997
File: apps/extension/src/services/task-repository.ts:25-57
Timestamp: 2025-07-31T21:48:00.389Z
Learning: In the eyaltoledano/claude-task-master repository, every task is always part of a tag - there is no concept of untagged tasks. The tag system is mandatory and comprehensive, meaning all tasks exist within a tag context (with 'master' as the default tag if none specified).

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Validate that referenced tasks exist before adding dependencies

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-07-18T07:52:44.890Z
Learnt from: mm-parthy
Repo: eyaltoledano/claude-task-master PR: 943
File: scripts/modules/ui.js:1211-1211
Timestamp: 2025-07-18T07:52:44.890Z
Learning: The boundary-first tag resolution pattern means that context validation in UI functions like displayTaskById is unnecessary because tag and projectRoot resolution happens at the CLI command boundary layer before reaching these functions.

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-09-17T19:08:57.882Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1211
File: tests/integration/cli/complex-cross-tag-scenarios.test.js:20-22
Timestamp: 2025-09-17T19:08:57.882Z
Learning: The user Crunchyman-ralph confirmed that in their build pipeline, they assume dist/ artifacts are already built by the time tests run, when tests reference dist/task-master.js instead of bin/task-master.js.

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs

Applied to files:

  • scripts/modules/commands.js
  • apps/mcp/src/tools/tasks/get-tasks.tool.ts
📚 Learning: 2025-07-21T02:41:13.453Z
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: scripts/modules/task-manager/expand-all-tasks.js:0-0
Timestamp: 2025-07-21T02:41:13.453Z
Learning: In scripts/modules/task-manager/expand-all-tasks.js, the success flag should always be true when the expansion process completes successfully, even if individual tasks fail due to LLM errors. Failed tasks are designed to be expanded on subsequent iterations, so individual task failures don't constitute overall operation failure.

Applied to files:

  • scripts/modules/commands.js
  • mcp-server/src/tools/expand-task.js
  • mcp-server/src/tools/expand-all.js
📚 Learning: 2025-10-01T19:53:34.261Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1262
File: scripts/modules/task-manager/update-tasks.js:216-233
Timestamp: 2025-10-01T19:53:34.261Z
Learning: For scripts/modules/task-manager/*.js: Use generateObjectService with Zod schemas for structured AI responses rather than generateTextService + manual JSON parsing, as modern AI providers increasingly support the tool use and generateObject paradigm with improved reliability.

Applied to files:

  • mcp-server/src/tools/update-task.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • mcp-server/src/tools/update-task.js
  • mcp-server/src/tools/update-subtask.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/remove-subtask.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Use kebab-case for long-form option names (e.g., --output-format), provide single-letter shortcuts when appropriate, and use consistent option names across similar commands.

Applied to files:

  • mcp-server/src/tools/scope-down.js
  • mcp-server/src/tools/update.js
  • mcp-server/src/tools/remove-task.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Provide feedback about the removal result

Applied to files:

  • mcp-server/src/tools/remove-dependency.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Handle different ID formats consistently when removing dependencies

Applied to files:

  • mcp-server/src/tools/remove-dependency.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove self-references during cleanup

Applied to files:

  • mcp-server/src/tools/remove-dependency.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Check if the dependency exists before removing

Applied to files:

  • mcp-server/src/tools/remove-dependency.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Format dependency lists consistently for visualization

Applied to files:

  • mcp-server/src/tools/remove-dependency.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Provide clear error messages for non-existent dependencies

Applied to files:

  • mcp-server/src/tools/remove-dependency.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Use kebab-case for command names (e.g., analyze-complexity) and descriptive, action-oriented names.

Applied to files:

  • mcp-server/src/tools/complexity-report.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • mcp-server/src/tools/update-subtask.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/remove-subtask.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Follow the provided structure for removing subtasks, including required options, conversion option, and detailed error handling.

Applied to files:

  • mcp-server/src/tools/update-subtask.js
  • mcp-server/src/tools/add-subtask.js
  • mcp-server/src/tools/clear-subtasks.js
  • mcp-server/src/tools/remove-subtask.js
  • mcp-server/src/tools/remove-task.js
📚 Learning: 2025-09-26T19:05:47.555Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1252
File: packages/ai-sdk-provider-grok-cli/package.json:11-13
Timestamp: 2025-09-26T19:05:47.555Z
Learning: In the eyaltoledano/claude-task-master repository, internal tm/ packages use a specific export pattern where the "exports" field points to TypeScript source files (./src/index.ts) while "main" points to compiled output (./dist/index.js) and "types" points to source files (./src/index.ts). This pattern is used consistently across internal packages like tm/core and tm/ai-sdk-provider-grok-cli because they are consumed directly during build-time bundling with tsdown rather than being published as separate packages.

Applied to files:

  • apps/mcp/src/tools/tasks/get-tasks.tool.ts
  • mcp-server/src/tools/move-task.js
🧬 Code graph analysis (30)
mcp-server/src/tools/add-task.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/scope-up.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/update-task.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/parse-prd.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/delete-tag.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/scope-down.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/remove-dependency.js (2)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/core/direct-functions/remove-dependency.js (1)
  • args (24-24)
mcp-server/src/tools/complexity-report.js (2)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/core/direct-functions/complexity-report.js (1)
  • args (22-22)
mcp-server/src/tools/update.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/set-task-status.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/update-subtask.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/copy-tag.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/add-subtask.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/fix-dependencies.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/expand-task.js (2)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/core/direct-functions/expand-task.js (1)
  • args (38-48)
apps/mcp/src/tools/tasks/get-tasks.tool.ts (2)
packages/tm-core/src/tm-core.ts (1)
  • tasks (92-94)
scripts/modules/task-manager/list-tasks.js (1)
  • totalTasks (100-100)
mcp-server/src/tools/next-task.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/add-tag.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/list-tags.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/models.js (2)
mcp-server/src/core/direct-functions/models.js (3)
  • modelsDirect (60-129)
  • args (62-62)
  • context (61-61)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/analyze.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/rename-tag.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/expand-all.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/clear-subtasks.js (2)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/core/direct-functions/clear-subtasks.js (1)
  • args (27-27)
mcp-server/src/tools/move-task.js (3)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/core/direct-functions/move-task-cross-tag.js (2)
  • moveTaskCrossTagDirect (27-214)
  • args (29-29)
mcp-server/src/core/direct-functions/move-task.js (2)
  • args (27-27)
  • moveTaskDirect (25-107)
mcp-server/src/tools/remove-subtask.js (2)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/core/direct-functions/remove-subtask.js (1)
  • args (25-25)
mcp-server/src/tools/initialize-project.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/research.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/remove-task.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
mcp-server/src/tools/use-tag.js (1)
apps/mcp/src/shared/utils.ts (1)
  • handleApiResult (125-194)
🪛 GitHub Actions: CI
scripts/modules/commands.js

[error] 2548-2552: Formatter would have reformatted code. Formatting issue detected by biome format (format-check) in commands.js.

mcp-server/src/tools/parse-prd.js

[error] 88-92: Formatter would have reformatted code. Formatting issue detected by biome format (format-check) in parse-prd.js.

🔇 Additional comments (33)
scripts/modules/commands.js (1)

2547-2547: Good optimization: caching the tasks path.

Caching taskMaster.getTasksPath() in a local variable improves readability and avoids a redundant function call.

Also applies to: 2549-2549

mcp-server/src/tools/get-operation-status.js (1)

3-3: LGTM - Comment cleanup.

The removal of the inline comment is fine and doesn't affect functionality.

mcp-server/src/tools/complexity-report.js (1)

74-79: LGTM - Consistent refactor to object-based API.

The conversion from positional arguments to a single object parameter is correct and aligns with the updated handleApiResult signature. This improves API clarity and maintainability.

mcp-server/src/tools/scope-up.js (1)

91-96: LGTM - Consistent with refactor pattern.

The object-based handleApiResult invocation is correct and maintains the same error handling behavior.

mcp-server/src/tools/set-task-status.js (1)

116-121: LGTM - Refactor applied correctly.

The change to object-based parameters is consistent with the PR-wide refactor and preserves the existing error handling logic.

mcp-server/src/tools/rename-tag.js (1)

64-69: LGTM - Refactor correctly implemented.

The migration to object-based parameters for handleApiResult is consistent with the broader refactor across the codebase.

mcp-server/src/tools/update.js (1)

91-96: LGTM - Consistent refactor.

The object-based API call is correctly implemented and maintains existing functionality.

mcp-server/src/tools/list-tags.js (1)

65-70: LGTM - Refactor applied consistently.

The change follows the established pattern and correctly passes all required parameters in the object format.

mcp-server/src/tools/remove-dependency.js (1)

79-84: LGTM - Refactor correctly handles context.

The object-based handleApiResult call correctly uses context.log from the withToolContext wrapper, maintaining consistency with the tool's context handling.

mcp-server/src/tools/use-tag.js (1)

62-67: Object-style handleApiResult usage looks correct.

The new options object (result, log, errorPrefix, projectRoot) matches the shared handleApiResult signature and keeps behavior unchanged.

apps/mcp/src/tools/autopilot/complete.tool.ts (1)

35-35: Updated description now matches tool behavior.

Clarifying that COMMIT is handled by autopilot_commit aligns the docs with the existing COMMIT guard in the implementation.

mcp-server/src/tools/add-task.js (1)

91-115: handleApiResult refactor is correct and consistent.

The call now passes a single options object (result, log, errorPrefix: 'Error adding task', projectRoot) which matches the shared helper’s signature and preserves prior behavior.

mcp-server/src/tools/remove-subtask.js (1)

92-97: Correct migration to options-object handleApiResult call.

Using { result, log, errorPrefix: 'Error removing subtask', projectRoot: args.projectRoot } aligns this tool with the shared helper’s API and keeps the existing semantics.

mcp-server/src/tools/expand-all.js (1)

114-119: LGTM on handleApiResult options-object refactor.

The updated call uses the correct options (result, log, errorPrefix: 'Error expanding all tasks', projectRoot) and is consistent with the rest of the MCP tools.

mcp-server/src/tools/update-subtask.js (1)

86-91: LGTM! Consistent refactor to object-based parameter passing.

The update to handleApiResult correctly migrates from positional arguments to a structured object parameter, aligning with the updated API signature in apps/mcp/src/shared/utils.ts. All required context is properly provided.

mcp-server/src/tools/research.js (1)

97-102: LGTM! Consistent refactor to object-based parameter passing.

The migration to the object-based handleApiResult invocation is correct and maintains all necessary error context.

mcp-server/src/tools/copy-tag.js (1)

70-75: LGTM! Consistent refactor to object-based parameter passing.

The update correctly adopts the new object-based parameter style for handleApiResult.

mcp-server/src/tools/initialize-project.js (1)

68-73: LGTM! Consistent refactor to object-based parameter passing.

The migration to the structured parameter object is correct and maintains proper error context with the updated handleApiResult signature.

mcp-server/src/tools/expand-task.js (1)

97-102: LGTM! Consistent refactor to object-based parameter passing.

The update to handleApiResult correctly adopts the object parameter pattern, maintaining all necessary context for error handling.

mcp-server/src/tools/delete-tag.js (1)

67-72: LGTM! Consistent refactor to object-based parameter passing.

The migration to the object-based invocation pattern is correct and maintains proper error context.

mcp-server/src/tools/scope-down.js (1)

91-96: LGTM! Consistent refactor to object-based parameter passing.

The update to the object-based parameter style for handleApiResult is correct and maintains all necessary error handling context.

mcp-server/src/tools/analyze.js (1)

153-158: LGTM! Consistent refactor to object-based parameter passing.

The migration to the structured object parameter correctly aligns with the updated handleApiResult API signature.

apps/mcp/src/tools/tasks/get-tasks.tool.ts (2)

75-109: LGTM! Nice null-safety optimization.

The local tasks variable centralizes null-safety handling and avoids repeated access to result.tasks, making the code more maintainable and explicit about handling the undefined case.


105-137: LGTM! Clean refactor to object-based parameter.

The conversion to object-based parameters for handleApiResult improves clarity and maintainability.

mcp-server/src/tools/add-tag.js (1)

86-91: LGTM! Consistent refactor to object-based parameter.

The conversion aligns with the repository-wide pattern of passing structured options to handleApiResult.

mcp-server/src/tools/remove-task.js (1)

87-92: LGTM! Consistent refactor to object-based parameter.

The conversion aligns with the repository-wide pattern of passing structured options to handleApiResult.

mcp-server/src/tools/fix-dependencies.js (1)

71-76: LGTM! Consistent refactor to object-based parameter.

The conversion aligns with the repository-wide pattern of passing structured options to handleApiResult.

mcp-server/src/tools/clear-subtasks.js (1)

90-95: LGTM! Consistent refactor to object-based parameter.

The conversion aligns with the repository-wide pattern of passing structured options to handleApiResult.

mcp-server/src/tools/add-subtask.js (1)

111-116: LGTM! Consistent refactor to object-based parameter.

The conversion aligns with the repository-wide pattern of passing structured options to handleApiResult.

mcp-server/src/tools/update-task.js (1)

94-99: LGTM! Consistent refactor to object-based parameter.

The conversion aligns with the repository-wide pattern of passing structured options to handleApiResult.

mcp-server/src/tools/next-task.js (1)

85-90: LGTM! Consistent refactor to object-based parameter.

The conversion aligns with the repository-wide pattern of passing structured options to handleApiResult.

mcp-server/src/tools/models.js (1)

88-100: LGTM! API refactoring looks correct.

The migration from multi-argument to object-based handleApiResult is implemented correctly. All required fields are provided, and the comment update appropriately reflects that projectRoot normalization is handled by withToolContext.

mcp-server/src/tools/move-task.js (1)

6-16: LGTM! handleApiResult refactoring correctly applied.

The migration to object-based handleApiResult calls is implemented correctly across:

  • Cross-tag moves (lines 86-103)
  • Multiple task moves (lines 168-180)
  • Single task moves (lines 197-213)

All calls provide the required fields with appropriate error context. The import reorganization (lines 6-16) properly adds handleApiResult and resolveTag to support the refactored implementation.

Also applies to: 86-103, 168-180, 197-213

Comment thread mcp-server/src/tools/parse-prd.js Outdated
Comment thread scripts/modules/commands.js Outdated
Comment on lines 2548 to 2552
const data = readJSON(
taskMaster.getTasksPath(),
tasksPath,
taskMaster.getProjectRoot(),
tag
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix formatting issue flagged by pipeline.

The CI pipeline reports that biome format would reformat this code block. Run the formatter to resolve this.

#!/bin/bash
# Run biome formatter to fix the formatting issue
npx @biomejs/biome format --write scripts/modules/commands.js
🧰 Tools
🪛 GitHub Actions: CI

[error] 2548-2552: Formatter would have reformatted code. Formatting issue detected by biome format (format-check) in commands.js.

🤖 Prompt for AI Agents
In scripts/modules/commands.js around lines 2548 to 2552, the three-argument
call to readJSON is misformatted and the CI expects Biome formatting; run the
Biome formatter or reformat the block so arguments align per project style (for
example place each argument on its own line with proper indentation) — the
quickest fix is to run the project formatter: execute npx @biomejs/biome format
--write scripts/modules/commands.js (or apply the same formatting changes
manually) then re-run CI.

@Crunchyman-ralph Crunchyman-ralph merged commit 522d9af into next Nov 21, 2025
7 checks passed
@Crunchyman-ralph Crunchyman-ralph deleted the ralph/chore/fix.coderabbit.issues branch November 21, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant