Skip to content

feat: add expand-task remote#1384

Merged
Crunchyman-ralph merged 3 commits intonextfrom
ralph/feat/add.expand.task.remote
Nov 7, 2025
Merged

feat: add expand-task remote#1384
Crunchyman-ralph merged 3 commits intonextfrom
ralph/feat/add.expand.task.remote

Conversation

@Crunchyman-ralph
Copy link
Collaborator

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

What type of PR is this?

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

Description

  • New Features

    • Added AI-powered task expansion to break tasks into subtasks via remote service.
    • Integrated loading spinners for improved visual feedback during remote operations.
  • Improvements

    • Enhanced logging consistency across CLI and MCP modes.
    • Strengthened error handling with additional context and diagnostics.
    • Improved UI messaging and progress indication during task operations.

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

  • New Features

    • AI-powered task expansion: option to expand a task into generated subtasks via a remote service.
    • Tasks now expose database UUIDs for more reliable cross-system linking.
  • Improvements

    • CLI uses spinner-based progress and clearer success/failure messages for remote operations.
    • Unified logging across CLI and MCP for consistent messaging and richer error context.
    • Remote expansion previews/contextualizes results before applying changes; file-based storage remains unsupported for remote expansion.
  • Tests

    • Updated test mocks to return prompts synchronously and expanded chalk mock utilities.

@changeset-bot
Copy link

changeset-bot bot commented Nov 6, 2025

⚠️ No Changeset found

Latest commit: 33c77eb

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

@Crunchyman-ralph Crunchyman-ralph changed the base branch from main to next November 6, 2025 19:28
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 6, 2025

Walkthrough

Adds end-to-end AI-driven task expansion: new TaskExpansionService, storage and repository hooks, CLI bridge tryExpandViaRemote with spinner UI and unified bridge logger, repository rename to SupabaseRepository, and databaseId propagation for tasks/subtasks.

Changes

Cohort / File(s) Summary
tm-bridge package
packages/tm-bridge/package.json
Added runtime dependency ora (^8.1.1).
Expand bridge & exports
packages/tm-bridge/src/expand-bridge.ts, packages/tm-bridge/src/index.ts
New tryExpandViaRemote(params) bridge plus ExpandBridgeParams / RemoteExpandResult types; re-exported from package index; CLI spinner/preview and API-path fallback.
Update bridge UI
packages/tm-bridge/src/update-bridge.ts
Replaced custom loading indicator with ora spinner for non-MCP/text output and use of spinner.succeed() / spinner.fail().
Storage interface & adapters
packages/tm-core/src/common/interfaces/storage.interface.ts, packages/tm-core/src/modules/storage/adapters/api-storage.ts, packages/tm-core/src/modules/storage/adapters/file-storage/file-storage.ts
Added expandTaskWithPrompt(...) to storage interface and BaseStorage; ApiStorage implements expansion via TaskExpansionService; FileStorage throws unsupported error stub.
Task expansion service
packages/tm-core/src/modules/integration/services/task-expansion.service.ts
New exported TaskExpansionService with expandTask(taskId, options?) orchestrating context gathering, validation, API POST call, result shaping; exports ExpandTaskResult and ExpandTaskOptions.
Task service / domain integration
packages/tm-core/src/modules/tasks/services/task-service.ts, packages/tm-core/src/modules/tasks/tasks-domain.ts
Added expandTaskWithPrompt(...) delegating to storage; methods return `ExpandTaskResult
Repository & brief model
packages/tm-core/src/modules/tasks/repositories/task-repository.interface.ts, packages/tm-core/src/modules/tasks/repositories/supabase/supabase-repository.ts, packages/tm-core/src/modules/tasks/repositories/supabase/index.ts
Added Brief interface and getBrief(briefId) to TaskRepository API; renamed/exported repository class to SupabaseRepository and implemented getBrief.
Task types & mapper
packages/tm-core/src/common/types/index.ts, packages/tm-core/src/common/mappers/TaskMapper.ts
Added optional databaseId?: string to Task type; TaskMapper now sets databaseId on Task and Subtask from DB ids.
Export service comment
packages/tm-core/src/modules/integration/services/export.service.ts
Comment updated to reference SupabaseRepository (no logic change).
Bridge logger utility
scripts/modules/bridge-utils.js
New createBridgeLogger(mcpLog, session) returning { logger, report, isMCP } with MCP/CLI detection, silent/debug support.
CLI integration: expand task
scripts/modules/task-manager/expand-task.js
Attempt remote expansion via tryExpandViaRemote() before local expansion; replace ad-hoc logging with createBridgeLogger; append generated subtasks to existing subtasks; removed await from synchronous loadPrompt() calls.
CLI integration: update task
scripts/modules/task-manager/update-task-by-id.js
Replaced local logging with createBridgeLogger, removed await from sync loadPrompt(), unified error propagation and reporting.
Tests (mocks)
tests/unit/scripts/modules/task-manager/*.test.js
Adjusted prompt-manager mock loadPrompt from Promise-returning to direct-return (mockResolvedValue → mockReturnValue); expanded chalk mock methods.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI (expand-task.js)
    participant Bridge as Expand Bridge (tryExpandViaRemote)
    participant TmCore as TmCore / Storage
    participant Service as TaskExpansionService
    participant API as Backend API

    CLI->>Bridge: tryExpandViaRemote(params)
    Bridge->>TmCore: init / determine storage
    alt storage == "api"
        Bridge->>Service: new TaskExpansionService(repo, projectId, apiClient, auth)
        Service->>TmCore: fetch task, subtasks, brief, allTasks
        Service->>API: POST /expand (payload + query)
        API-->>Service: ExpandTaskResponse (queued/jobId/message)
        Service-->>Bridge: RemoteExpandResult (taskLink, jobId, message)
        Bridge->>Bridge: spinner lifecycle (start → succeed/fail)
        Bridge-->>CLI: return RemoteExpandResult (consumed by CLI)
    else storage != "api"
        Bridge-->>CLI: return null (fallthrough)
        CLI->>CLI: perform local file-based expansion
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Areas to inspect closely:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts — payload construction, UUID validation, error wrapping, taskLink derivation, API call handling.
  • packages/tm-bridge/src/expand-bridge.ts — TmCore initialization fallback, spinner lifecycle, CLI preview formatting and fallthrough behavior.
  • Repository rename and re-exports — ensure all imports updated from SupabaseTaskRepositorySupabaseRepository.
  • TaskMapper → propagation of databaseId and its consumption by expansion flows.
  • CLI script changes (scripts/modules/task-manager/expand-task.js, update-task-by-id.js) — logging replacement, changed sync/async calls, and subtask append semantics.

Possibly related PRs

  • #1094 — Modifies scripts/modules/task-manager/expand-task.js (prompt generation and debug logging); overlaps with remote bridge and CLI changes.
  • #1185 — Changes to Supabase repository surface and repository additions; relates to SupabaseRepository rename and getBrief implementation.
  • #1348 — Changes in tm-bridge package and bridge exports; relates to adding tryExpandViaRemote and package-level exports.

Suggested reviewers

  • eyaltoledano

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add expand-task remote' clearly and concisely summarizes the main feature addition: implementing remote task expansion functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% 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/feat/add.expand.task.remote

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

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)
scripts/modules/task-manager/update-task-by-id.js (1)

285-303: Restore awaiting promptManager.loadPrompt

Removing the await means promptResult is now a Promise. That leaves systemPrompt/userPrompt undefined, so we immediately hit the failure branch (Failed to load prompts) and the command can’t update anything. Please put the await back so we actually get the resolved prompt payload before proceeding.

-			const promptResult = promptManager.loadPrompt(
+			const promptResult = await promptManager.loadPrompt(
🧹 Nitpick comments (4)
packages/tm-core/src/modules/tasks/repositories/supabase/supabase-repository.ts (1)

156-198: Replace as any with proper typing.

Line 187 uses an unsafe type assertion that bypasses TypeScript's type checking. The document data should have a predictable shape from the Supabase join.

Consider defining a proper type or extracting it from your database schema:

-		// Extract document data if available
-		const document = data.document as any;
+		// Extract document data if available
+		const document = data.document as { id: string; title?: string; description?: string } | null;

Alternatively, if the database types are available, reference them directly:

-		const document = data.document as any;
+		const document = data.document as Database['public']['Tables']['document']['Row'] | null;
packages/tm-core/src/modules/integration/services/task-expansion.service.ts (3)

98-102: Use TaskMasterError for consistency with error handling patterns.

The code throws a generic Error when a task is not found. For consistency with the rest of the error handling in this service, use TaskMasterError with an appropriate error code.

Apply this diff:

 if (!task) {
-    throw new Error(`Task ${taskId} not found`);
+    throw new TaskMasterError(
+        `Task ${taskId} not found`,
+        ERROR_CODES.TASK_NOT_FOUND,
+        { operation: 'expandTask', taskId }
+    );
 }

114-115: Consider the performance impact of loading all tasks.

The code retrieves all tasks for AI context without pagination or filtering. For projects with hundreds or thousands of tasks, this could:

  • Cause significant memory usage
  • Increase API response times
  • Potentially timeout for very large projects

The comment indicates this is "optional but helpful for AI" - consider making it configurable or implementing pagination/filtering.


149-154: Reconsider the localhost fallback and hard-coded URL path.

Two concerns with the task link construction:

  1. Localhost fallback (lines 150-153): Falling back to http://localhost:8080 when environment variables are missing could result in broken links in production environments. Consider throwing an error or using a more appropriate default.

  2. Hard-coded path (line 154): The URL path /home/hamster/briefs/${briefId}/task/${taskUuid} is hard-coded and product-specific. This makes it brittle and difficult to maintain if routes change. Consider using a URL builder utility or configuration.

Consider refactoring to:

// Get base URL with validation
const baseUrl = process.env.TM_BASE_DOMAIN || process.env.TM_PUBLIC_BASE_DOMAIN;
if (!baseUrl) {
    throw new TaskMasterError(
        'Base URL not configured',
        ERROR_CODES.CONFIGURATION_ERROR,
        { operation: 'expandTask', requiredEnvVar: 'TM_BASE_DOMAIN' }
    );
}

// Use a URL builder or configuration for the path
const taskLink = buildTaskUrl(baseUrl, context.briefId, taskUuid);

@Crunchyman-ralph Crunchyman-ralph changed the title ralph/feat/add.expand.task.remote feat: add expand-task remote Nov 7, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 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 a604137 and 448057c.

📒 Files selected for processing (2)
  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts (1 hunks)
  • packages/tm-core/src/modules/storage/adapters/api-storage.ts (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/tm-core/src/modules/storage/adapters/api-storage.ts
🧰 Additional context used
🧠 Learnings (20)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-complete.md : Create .claude/commands/taskmaster-complete.md with steps to review task, verify, run tests, set status done, and show next task
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-next.md : Create .claude/commands/taskmaster-next.md with steps to run task-master next, then task-master show <id>, summarize, and suggest first step
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: When breaking down complex tasks, use the `expand_task` command with appropriate flags (`--force`, `--research`, `--num`, `--prompt`) and review generated subtasks for accuracy.
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: When breaking down complex tasks in Taskmaster, use the `expand_task` command with appropriate flags (`--num`, `--research`, `--force`, `--prompt`) and review generated subtasks for accuracy.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-09-24T15:12:12.658Z
Learning: Break down tasks using task-master expand --id=<id> with appropriate flags; clear and regenerate subtasks as needed
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-07-18T17:10:53.657Z
Learning: Guidelines for integrating new features into the Task Master CLI with tagged system considerations (new_features.mdc).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-07-31T22:08:16.039Z
Learning: For AI-powered tools (parse_prd, analyze_project_complexity, update_subtask, update_task, update, expand_all, expand_task, add_task), inform users that these operations may take up to a minute to complete.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: Use the Taskmaster command set (`task-master` CLI or MCP tools) for all task management operations: listing, expanding, updating, tagging, and status changes.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use AI to generate detailed subtasks within the current tag context, considering complexity analysis for subtask counts and ensuring proper IDs for newly created subtasks.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-07-18T17:09:13.815Z
Learning: Commands such as `analyze-complexity`, `expand-task`, `update-task`, and `add-task` should consider adopting the context gathering pattern for improved AI-powered assistance.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-07-18T17:10:53.657Z
Learning: Describes the high-level architecture of the Task Master CLI application, including the new tagged task lists system (architecture.mdc).
Learnt from: rtmcrc
Repo: eyaltoledano/claude-task-master PR: 933
File: assets/rules/agentllm.mdc:57-60
Timestamp: 2025-10-15T18:18:36.402Z
Learning: In agentllm delegation mode, the `expand_all` tool returns a list of `delegatedTaskIds` that are eligible for expansion, and the MCP client must then call `expand_task` individually for each returned task ID. This differs from normal mode where `expand_all` automatically submits all eligible tasks for expansion without requiring subsequent `expand_task` calls.
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: 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: 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: 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: 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: 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: 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-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use AI to generate detailed subtasks within the current tag context, considering complexity analysis for subtask counts and ensuring proper IDs for newly created subtasks.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 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: When breaking down complex tasks in Taskmaster, use the `expand_task` command with appropriate flags (`--num`, `--research`, `--force`, `--prompt`) and review generated subtasks for accuracy.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.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/integration/services/task-expansion.service.ts
📚 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:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:10:12.881Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: When breaking down complex tasks, use the `expand_task` command with appropriate flags (`--force`, `--research`, `--num`, `--prompt`) and review generated subtasks for accuracy.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI, create them in the current tag context (defaulting to 'master'), provide clear prompts to guide AI task generation, and validate/clean up AI-generated tasks.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:09:13.815Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-07-18T17:09:13.815Z
Learning: Commands such as `analyze-complexity`, `expand-task`, `update-task`, and `add-task` should consider adopting the context gathering pattern for improved AI-powered assistance.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.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:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:54.131Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-07-18T17:14:54.131Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions in scripts/modules/task-manager/ must return an object that includes aiServiceResponse.telemetryData.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-09-24T15:12:12.658Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-09-24T15:12:12.658Z
Learning: Break down tasks using task-master expand --id=<id> with appropriate flags; clear and regenerate subtasks as needed

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Subtasks must use consistent properties, maintain simple numeric IDs unique within the parent task, and must not duplicate parent task properties.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:18:17.759Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Do not call AI-specific getters (like `getMainModelId`, `getMainMaxTokens`) from core logic functions in `scripts/modules/task-manager/*`; instead, pass the `role` to the unified AI service.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Each task object must include all required properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) and provide default values for optional properties. Extra properties not in the standard schema must not be added.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:12:57.903Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Use consistent file naming conventions: 'task_${id.toString().padStart(3, '0')}.txt', use path.join for composing file paths, and use appropriate file extensions (.txt for tasks, .json for data).

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:06:57.833Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-07-18T17:06:57.833Z
Learning: Applies to scripts/modules/task-manager/*.js : Do not implement fallback or retry logic outside `ai-services-unified.js`.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-31T22:07:49.716Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-31T22:07:49.716Z
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:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:10:12.881Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: For CLI usage, install Taskmaster globally with `npm install -g task-master-ai` or use locally via `npx task-master-ai ...`.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
🧬 Code graph analysis (1)
packages/tm-core/src/modules/integration/services/task-expansion.service.ts (2)
packages/tm-core/src/modules/tasks/repositories/task-repository.interface.ts (1)
  • TaskRepository (16-52)
packages/tm-core/src/modules/storage/utils/api-client.ts (1)
  • ApiClient (24-146)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/tm-core/src/modules/integration/services/task-expansion.service.ts (1)

217-230: Consider more specific error codes in the catch-all handler.

The code wraps all non-TaskMasterError exceptions as STORAGE_ERROR, which is reasonable since most would come from repository calls (lines 99, 114, 124). However, if unexpected errors arise from other sources (e.g., payload serialization), they might be misclassified.

This is acceptable as-is since ApiClient already wraps API failures as TaskMasterError, so they'll be caught by the first if block.

📜 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 448057c and 33c77eb.

📒 Files selected for processing (3)
  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts (1 hunks)
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js (1 hunks)
  • tests/unit/scripts/modules/task-manager/expand-task.test.js (9 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
tests/{unit,integration,e2e,fixtures}/**/*.js

📄 CodeRabbit inference engine (.cursor/rules/architecture.mdc)

Test files must be organized as follows: unit tests in tests/unit/, integration tests in tests/integration/, end-to-end tests in tests/e2e/, and test fixtures in tests/fixtures/.

Files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/git_workflow.mdc)

**/*.{test,spec}.{js,ts,jsx,tsx}: Create a test file and ensure all tests pass when all subtasks are complete; commit tests if added or modified
When all subtasks are complete, run final testing using the appropriate test runner (e.g., npm test, jest, or manual testing)

Files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
**/*.test.js

📄 CodeRabbit inference engine (.cursor/rules/tests.mdc)

**/*.test.js: Never use asynchronous operations in tests. Make all mocks return synchronous values when possible.
Always mock tests properly based on the way the tested functions are defined and used.
Follow the test file organization: mocks must be set up before importing modules under test, and spies on mocked modules should be set up after imports.
Use fixtures from tests/fixtures/ for consistent sample data across tests.
Always declare mocks before importing the modules being tested in Jest test files.
Use jest.spyOn() after imports to create spies on mock functions and reference these spies in test assertions.
When testing functions with callbacks, get the callback from your mock's call arguments, execute it directly with test inputs, and verify the results.
For ES modules, use jest.mock() before static imports and jest.unstable_mockModule() before dynamic imports to mock dependencies.
Reset mock functions (mockFn.mockReset()) before dynamic imports if they might have been called previously.
When verifying console assertions, assert against the actual arguments passed (single formatted string), not multiple arguments.
Use mock-fs to mock file system operations in tests, and restore the file system after each test.
Mock API calls (e.g., Anthropic/Claude) by mocking the entire module and providing predictable responses.
Set mock environment variables in test setup and restore them after each test.
Maintain test fixtures separate from test logic.
Follow the mock-first-then-import pattern for all Jest mocks.
Do not define mock variables before jest.mock() calls (they won't be accessible due to hoisting).
Use test-specific file paths (e.g., 'test-tasks.json') for all file operations in tests.
Mock readJSON and writeJSON to avoid real file system interactions in tests.
Verify file operations use the correct paths in expect statements.
Use different file paths for each test to avoid test interdependence.
Verify modifications on the in-memory task objects passed to w...

Files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
tests/unit/**/*.test.js

📄 CodeRabbit inference engine (.cursor/rules/tests.mdc)

tests/unit/**/*.test.js: Unit tests must be located in tests/unit/, test individual functions and utilities in isolation, mock all external dependencies, and keep tests small, focused, and fast.
Do not include actual command execution in unit tests.

Files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
tests/{unit,integration,e2e}/**/*.test.js

📄 CodeRabbit inference engine (.cursor/rules/tests.mdc)

tests/{unit,integration,e2e}/**/*.test.js: When testing CLI commands built with Commander.js, test the command action handlers directly rather than trying to mock the entire Commander.js chain.
When mocking the Commander.js chain, mock ALL chainable methods (option, argument, action, on, etc.) and return this (or the mock object) from all chainable method mocks.
Explicitly handle all options, including defaults and shorthand flags (e.g., -p for --prompt), and include null/undefined checks in test implementations for parameters that might be optional.
Do not try to use the real action implementation without proper mocking, and do not mock Commander partially—either mock it completely or test the action directly.
Mock the action handlers for CLI commands and verify they're called with correct arguments.
Use sample task fixtures for consistent test data, mock file system operations, and test both success and error paths for task operations.
Mock console output and verify correct formatting in UI function tests. Use flexible assertions like toContain() or toMatch() for formatted output.
Mock chalk functions to return the input text to make testing easier while still verifying correct function calls.

Files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
**/*.js

📄 CodeRabbit inference engine (.cursor/rules/tests.mdc)

**/*.js: Declare and initialize global variables at the top of modules to avoid hoisting issues.
Use proper function declarations to avoid hoisting issues and initialize variables before they are referenced.
Do not reference variables before their declaration in module scope.
Use dynamic imports (import()) to avoid initialization order issues in modules.

Files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
**/*.{test,spec}.*

📄 CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)

Test files should follow naming conventions: .test., .spec., or _test. depending on the language

Files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
tests/{unit,integration,e2e}/**

📄 CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)

Organize test directories by test type (unit, integration, e2e) and mirror source structure where possible

Files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
🧠 Learnings (51)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-complete.md : Create .claude/commands/taskmaster-complete.md with steps to review task, verify, run tests, set status done, and show next task
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: When breaking down complex tasks, use the `expand_task` command with appropriate flags (`--force`, `--research`, `--num`, `--prompt`) and review generated subtasks for accuracy.
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: When breaking down complex tasks in Taskmaster, use the `expand_task` command with appropriate flags (`--num`, `--research`, `--force`, `--prompt`) and review generated subtasks for accuracy.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-09-24T15:12:58.855Z
Learning: Applies to assets/.claude/commands/taskmaster-next.md : Create .claude/commands/taskmaster-next.md with steps to run task-master next, then task-master show <id>, summarize, and suggest first step
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI, create them in the current tag context (defaulting to 'master'), provide clear prompts to guide AI task generation, and validate/clean up AI-generated tasks.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-09-24T15:12:12.658Z
Learning: Break down tasks using task-master expand --id=<id> with appropriate flags; clear and regenerate subtasks as needed
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:31.810Z
Learning: Pull Request descriptions must use the provided template, including Task Overview, Subtasks Completed, Implementation Details, Testing, Breaking Changes, and Related Tasks
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-07-31T22:08:16.039Z
Learning: For AI-powered tools (parse_prd, analyze_project_complexity, update_subtask, update_task, update, expand_all, expand_task, add_task), inform users that these operations may take up to a minute to complete.
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: 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: 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: 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: 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: 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: 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-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Mock chalk functions to return the input text to make testing easier while still verifying correct function calls.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Use sample task fixtures for consistent test data, mock file system operations, and test both success and error paths for task operations.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent formatting for task files, include all task properties in text files, and format dependencies with status indicators.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Verify modifications on the in-memory task objects passed to writeJSON.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Do not import real AI service clients in tests; create fully mocked versions that return predictable responses.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Explicitly handle all options, including defaults and shorthand flags (e.g., -p for --prompt), and include null/undefined checks in test implementations for parameters that might be optional.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Mock console output and verify correct formatting in UI function tests. Use flexible assertions like toContain() or toMatch() for formatted output.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Do not try to use the real action implementation without proper mocking, and do not mock Commander partially—either mock it completely or test the action directly.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
📚 Learning: 2025-07-18T17:07:39.336Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-07-18T17:07:39.336Z
Learning: Applies to scripts/modules/task-manager/*.js : Files in scripts/modules/task-manager/ should each handle a specific action related to task management (e.g., add-task.js, expand-task.js), supporting the tagged task lists system and backward compatibility.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
📚 Learning: 2025-07-18T17:12:57.903Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/**/*.test.js : Test CLI and MCP interfaces with real task data, verify end-to-end workflows across tag contexts, and test error scenarios and recovery in integration tests.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
📚 Learning: 2025-07-18T17:07:39.336Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-07-18T17:07:39.336Z
Learning: Module dependencies should be mocked before importing the test module, following Jest's hoisting behavior.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Mock API calls (e.g., Anthropic/Claude) by mocking the entire module and providing predictable responses.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:12:57.903Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/**/*.test.js : Follow the mock-first-then-import pattern and use jest.spyOn() for testing in Jest, clearing mocks between tests.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:07:39.336Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-07-18T17:07:39.336Z
Learning: Mock external libraries (e.g., fs, commander, anthropic-ai/sdk) at the module level in tests.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : For ES modules, use jest.mock() before static imports and jest.unstable_mockModule() before dynamic imports to mock dependencies.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : When mocking the Commander.js chain, mock ALL chainable methods (option, argument, action, on, etc.) and return this (or the mock object) from all chainable method mocks.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Always declare mocks before importing the modules being tested in Jest test files.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to tests/{unit,integration,e2e}/**/*.test.js : Mock the action handlers for CLI commands and verify they're called with correct arguments.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Follow the mock-first-then-import pattern for all Jest mocks.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Be careful with how you mock or stub functions that depend on module state; use factory functions in mocks to ensure proper initialization order.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:32.622Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-07-18T17:16:32.622Z
Learning: Applies to scripts/modules/ui.js : Use chalk.blue for informational messages, chalk.green for success, chalk.yellow for warnings, chalk.red for errors, chalk.cyan for prompts/highlights, and chalk.magenta for subtask information

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
📚 Learning: 2025-07-18T17:07:39.336Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-07-18T17:07:39.336Z
Learning: Mock output functions from ui.js in tests to verify display calls.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Use jest.spyOn() after imports to create spies on mock functions and reference these spies in test assertions.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI, create them in the current tag context (defaulting to 'master'), provide clear prompts to guide AI task generation, and validate/clean up AI-generated tasks.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use AI to generate detailed subtasks within the current tag context, considering complexity analysis for subtask counts and ensuring proper IDs for newly created subtasks.

Applied to files:

  • tests/unit/scripts/modules/task-manager/expand-task.test.js
  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions to maintain backward compatibility, returning legacy format to core functions and not exposing the tagged structure to existing core logic.

Applied to files:

  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:12:57.903Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/**/*.test.js : Test core logic independently with both data formats, mock file system operations, test tag resolution behavior, and verify migration compatibility in unit tests.

Applied to files:

  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Core functions must receive the legacy format for 100% backward compatibility, using tag resolution functions to abstract the tagged structure.

Applied to files:

  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:16:13.793Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-07-18T17:16:13.793Z
Learning: Applies to **/*.test.js : Never use asynchronous operations in tests. Make all mocks return synchronous values when possible.

Applied to files:

  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Implement silent migration from legacy to tagged format in the readJSON() function, detect legacy format, convert automatically, and preserve all existing task data during migration.

Applied to files:

  • tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.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: When breaking down complex tasks in Taskmaster, use the `expand_task` command with appropriate flags (`--num`, `--research`, `--force`, `--prompt`) and review generated subtasks for accuracy.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 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:

  • packages/tm-core/src/modules/integration/services/task-expansion.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/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:10:12.881Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:12.881Z
Learning: When breaking down complex tasks, use the `expand_task` command with appropriate flags (`--force`, `--research`, `--num`, `--prompt`) and review generated subtasks for accuracy.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:09:13.815Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-07-18T17:09:13.815Z
Learning: Commands such as `analyze-complexity`, `expand-task`, `update-task`, and `add-task` should consider adopting the context gathering pattern for improved AI-powered assistance.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.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:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:54.131Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-07-18T17:14:54.131Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions in scripts/modules/task-manager/ must return an object that includes aiServiceResponse.telemetryData.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-09-24T15:12:12.658Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-09-24T15:12:12.658Z
Learning: Break down tasks using task-master expand --id=<id> with appropriate flags; clear and regenerate subtasks as needed

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Subtasks must use consistent properties, maintain simple numeric IDs unique within the parent task, and must not duplicate parent task properties.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:18:17.759Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Do not call AI-specific getters (like `getMainModelId`, `getMainMaxTokens`) from core logic functions in `scripts/modules/task-manager/*`; instead, pass the `role` to the unified AI service.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:29.399Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-07-18T17:14:29.399Z
Learning: Applies to scripts/modules/task-manager.js : Each task object must include all required properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) and provide default values for optional properties. Extra properties not in the standard schema must not be added.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:12:57.903Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-07-18T17:12:57.903Z
Learning: Applies to scripts/modules/*.js : Use consistent file naming conventions: 'task_${id.toString().padStart(3, '0')}.txt', use path.join for composing file paths, and use appropriate file extensions (.txt for tasks, .json for data).

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:06:57.833Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-07-18T17:06:57.833Z
Learning: Applies to scripts/modules/task-manager/*.js : Do not implement fallback or retry logic outside `ai-services-unified.js`.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:18:17.759Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-07-18T17:18:17.759Z
Learning: Applies to scripts/modules/config-manager.js : Handle potential `ConfigurationError` if the `.taskmasterconfig` file is missing or invalid when accessed via `getConfig`.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:09:45.690Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:45.690Z
Learning: Applies to scripts/modules/dependency-manager.js : Remove references to non-existent tasks during validation

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-21T17:51:07.239Z
Learnt from: joedanz
Repo: eyaltoledano/claude-task-master PR: 748
File: scripts/modules/task-manager/parse-prd.js:726-733
Timestamp: 2025-07-21T17:51:07.239Z
Learning: In CLI contexts within task-manager modules like scripts/modules/task-manager/parse-prd.js, using process.exit(1) for validation failures and error conditions is correct and preferred over throwing errors, as it provides immediate termination with appropriate exit codes for scripting. The code should distinguish between MCP contexts (throw errors) and CLI contexts (use process.exit).

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 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:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-31T22:07:49.716Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-31T22:07:49.716Z
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:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
📚 Learning: 2025-07-18T17:14:54.131Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-07-18T17:14:54.131Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Functions in scripts/modules/task-manager/ that invoke AI services must call the appropriate AI service function (e.g., generateObjectService), passing commandName and outputType in the params object.

Applied to files:

  • packages/tm-core/src/modules/integration/services/task-expansion.service.ts
🧬 Code graph analysis (1)
packages/tm-core/src/modules/integration/services/task-expansion.service.ts (2)
packages/tm-core/src/modules/tasks/repositories/task-repository.interface.ts (1)
  • TaskRepository (16-52)
packages/tm-core/src/modules/storage/utils/api-client.ts (1)
  • ApiClient (24-146)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test
🔇 Additional comments (7)
packages/tm-core/src/modules/integration/services/task-expansion.service.ts (4)

1-61: Well-structured type definitions and imports.

The types are clearly documented and properly exported. Good use of TypeScript utility types for ContextWithBrief to ensure type safety.


101-175: Past review comments properly addressed.

The validation logic now correctly:

  • Uses TaskMasterError with VALIDATION_ERROR code for missing tasks (lines 101-111)
  • Validates that databaseId exists before use (lines 146-158)
  • Validates UUID format using Zod schema (lines 160-175)

All error messages include descriptive userMessage fields for better UX.


113-205: Solid implementation of payload building and API integration.

The code demonstrates good practices:

  • Defensive fallback chain for brief context (line 118)
  • Clean query parameter construction (lines 135-144)
  • Proper use of validated UUID for API calls (line 178)
  • Useful structured logging with job details and task link (lines 197-200)

234-254: Clean context validation helper.

The ensureBriefSelected method provides clear validation with helpful error messages guiding users to the correct CLI commands. The type narrowing to ContextWithBrief is safe given the validation logic.

tests/unit/scripts/modules/task-manager/expand-task.test.js (2)

165-165: LGTM: Consistent synchronous mock refactor.

All loadPrompt mock changes from mockResolvedValue to mockReturnValue are consistent throughout the test file and align with the guideline to prefer synchronous mocks. This improves test performance and simplicity.

Based on coding guidelines

Also applies to: 710-710, 1024-1024, 1153-1153, 1181-1181, 1209-1209, 1235-1235, 1261-1261


185-190: LGTM: Chalk mock expanded for additional UI features.

The additional chalk methods (red, blue, magenta, gray, bold, dim) follow the established pattern of returning input text unchanged, consistent with the guideline for mocking chalk functions. This likely supports the new loading spinner UI mentioned in the PR.

Based on coding guidelines

tests/unit/scripts/modules/task-manager/complexity-report-tag-isolation.test.js (1)

366-366: Change is correct—production loadPrompt is synchronous.

The production loadPrompt function returns values directly (not Promises), confirming that the test mock change from mockResolvedValue to mockReturnValue is appropriate. mockReturnValue sets a mock's synchronous output, matching the production implementation and aligning with the coding guideline to prefer synchronous mocks in tests.

@Crunchyman-ralph Crunchyman-ralph merged commit 921e9a6 into next Nov 7, 2025
7 checks passed
@Crunchyman-ralph Crunchyman-ralph deleted the ralph/feat/add.expand.task.remote branch November 7, 2025 17:06
Crunchyman-ralph added a commit that referenced this pull request Nov 7, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 7, 2025
16 tasks
sfc-gh-dflippo pushed a commit to sfc-gh-dflippo/task-master-ai that referenced this pull request Dec 4, 2025
sfc-gh-dflippo pushed a commit to sfc-gh-dflippo/task-master-ai that referenced this pull request Dec 4, 2025
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