Skip to content

feat(list): Add --ready and --blocking filters to identify parallelizable tasks#1533

Merged
Crunchyman-ralph merged 17 commits intoeyaltoledano:nextfrom
bjcoombs:1532-list-blocks-ready-filter
Jan 14, 2026
Merged

feat(list): Add --ready and --blocking filters to identify parallelizable tasks#1533
Crunchyman-ralph merged 17 commits intoeyaltoledano:nextfrom
bjcoombs:1532-list-blocks-ready-filter

Conversation

@bjcoombs
Copy link
Contributor

@bjcoombs bjcoombs commented Dec 18, 2025

Summary

Addresses #1532

Adds filters to the list command to identify tasks that can be worked on in parallel. Use case: running multiple AI sessions simultaneously and quickly seeing which tasks are independent and ready to start.

  • --ready filter shows only tasks with all dependencies satisfied
  • --blocking filter shows only tasks that block other tasks
  • Combine --ready --blocking to find high-impact tasks (ready AND blocking others)

Also adds a "Blocks" column to show the inverse of dependencies, a "Ready" column to tags command, and --ready filter to tags command.

Example workflow

When running 3 AI sessions in parallel:

# Quick view: what can I start right now?
task-master list --ready

# High value: ready tasks that unblock other work
task-master list --ready --blocking

# Overview: which tags have parallelizable work?
task-master tags --ready

This complements task-master next by showing ALL available parallel work, not just the single next task.

Changes Made

New Command Options

task-master list --ready              # Tasks with deps satisfied
task-master list --blocking           # Tasks that block others
task-master list --ready --blocking   # High impact: ready AND blocking
task-master tags --ready              # Tags with ready tasks available

New Table Columns

List command - Added "Blocks" column showing which tasks depend on each task:

ID  Title                Status   Priority  Dependencies  Blocks     Complexity
#1  Setup infrastructure pending  high      -             2, 3, 4    5
#2  Implement auth       pending  high      1             5, 6       3

Tags command - Added "Ready" column showing count of ready tasks:

Tag Name              Tasks  Ready  Done
● master (current)    12     5      7
  feature-auth        8      3      2

JSON Output

Blocks field included in JSON output:

{
  "tasks": [{
    "id": "1",
    "title": "Setup infrastructure",
    "blocks": ["2", "3", "4"],
    ...
  }]
}

Ready Task Logic

Tasks are "ready" if they:

  • Have actionable status (pending, in-progress, review)
  • Have all dependencies satisfied (completed/cancelled)

Excluded from ready:

  • done, cancelled - already finished
  • deferred - intentionally postponed
  • blocked - waiting on external factors

Technical Details

  • buildBlocksMap(): Inverts the dependency graph
  • filterReadyTasks(): Filters to tasks with satisfied deps and actionable status
  • filterBlockingTasks(): Filters to tasks that appear in other tasks' dependencies
  • Filters are composable (AND logic when both specified)

Testing

  • Added unit tests for all new functionality
  • Tests for list command: 12 tests passing
  • Tests for tags command: 9 tests passing (3 new for --ready filter)
  • TDD approach: wrote failing tests first, then implemented

Test plan

  • Run task-master list --ready - should show only tasks with deps satisfied
  • Run task-master list --blocking - should show only tasks that block others
  • Run task-master list --ready --blocking - should show intersection
  • Verify Blocks column appears in table output
  • Verify blocks field in JSON output (--json)
  • Run task-master tags - should show Ready column with counts
  • Run task-master tags --ready - should filter out tags with no ready tasks
  • Verify deferred/blocked tasks excluded from ready count

Summary by CodeRabbit

Release Notes

  • New Features
    • Added --ready filter to identify actionable tasks across all statuses
    • Added --blocking filter to surface tasks that block other work
    • Added --all-tags option to view ready tasks across multiple tags
    • Added "Blocks" column to task table showing dependent tasks
    • Added "Ready" column to tags command with --ready filter for tags with available work
    • Added "Tag" column for improved visibility when listing tasks across tags

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


Note

Adds parallelizable-work discovery to listing and tag views with new filters, columns, and core utilities.

  • List command: --ready, --blocking, and --all-tags options; defers status filtering when needed; validates --all-tags not with --watch; improves watch error handling
  • Output/UI: enrich tasks with blocks (inverse deps) in tables and JSON; table supports Blocks and optional Tag columns; compact view shows tag prefix in multi-tag mode
  • Tags command: shows Ready count per tag and supports --ready to filter tags with available work; wires through legacy bridge
  • Core (@tm/core): new task-filters utilities (buildBlocksMap, filterReadyTasks, filterBlockingTasks, ACTIONABLE_STATUSES) exported for CLI use
  • Tests: extensive unit/integration coverage for ready/blocking logic, blocks mapping, cross-tag behavior, validations, and loop sandbox auth checks

Written by Cursor Bugbot for commit 4970f7e. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

🦋 Changeset detected

Latest commit: 4970f7e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

This PR introduces task filtering capabilities (--ready, --blocking, --all-tags) to identify actionable and high-impact tasks. It adds block/dependency enrichment (showing which tasks depend on others), extends the list and tags commands with new filters, updates the CLI table rendering to display blocks and cross-tag information, and expands the tm-core public API to export task-filtering utilities.

Changes

Cohort / File(s) Summary
Feature Documentation
.changeset/list-blocks-ready-filter.md
Declares feature flags including --ready, --blocking, --all-tags filters; Blocks column in tables; Ready column in tags; exclusion of deferred/blocked tasks from ready counts
Core Task Utilities
packages/tm-core/src/modules/tasks/utils/task-filters.ts, packages/tm-core/src/modules/tasks/utils/index.ts, packages/tm-core/src/index.ts
Adds task-filters module with buildBlocksMap, filterReadyTasks, filterBlockingTasks, ACTIONABLE_STATUSES, TaskWithBlocks type; re-exported through utils index and tm-core main index for public API access
CLI List Command
apps/cli/src/commands/list.command.ts
Extends ListCommandOptions with ready, blocking, allTags flags; adds TaskWithTag type; implements cross-tag retrieval with per-tag ready filtering; integrates block enrichment and per-task filtering; updates renderers for multi-tag display
CLI Tags Command
apps/cli/src/commands/tags.command.ts
Adds --ready and --show-metadata global options; forwards options to executeList for ready-filtered tag listing
CLI Display Tables
apps/cli/src/ui/display/tables.ts
Introduces TaskTableItem type with optional blocks and tagName; adds dynamic COLUMN_WIDTH_RATIOS; extends createTaskTable to support showBlocks and showTag options; implements conditional header and block rendering with color coding
Tag Management Scripts
scripts/modules/task-manager/tag-management.js
Adds ready option for ready-filtered tag listing; computes readyTasks per tag; updates completedTasks calculation; filters tags to those with readyTasks > 0; updates table headers and outputs to reflect ready-filtered results
CLI List Command Tests
apps/cli/src/commands/list.command.spec.ts
Comprehensive unit test suite validating JSON/text output formats, ready/blocking/all-tags/combined filters, blocks field inclusion, all-tags aggregation with tagName, validation of mutually exclusive options, and per-tag filtering behavior
Tag Management Tests
tests/unit/task-manager/tag-management.test.js
Adds test suites for ready tasks counting and --ready filtering; validates exclusion of deferred/blocked statuses; tests per-tag readyTasks exposure
Other Test Updates
apps/cli/tests/unit/commands/list.command.spec.ts (removed), apps/cli/src/commands/loop.command.spec.ts, apps/cli/tests/integration/commands/loop.command.test.ts, apps/cli/tests/unit/commands/show.command.spec.ts
Removes legacy list command unit tests; updates loop command tests to include sandbox flag; increases hook timeout and removes redundant option/project detection tests from loop integration; improves mock strategy in show command tests

Sequence Diagram

sequenceDiagram
    participant User as User (CLI)
    participant ListCmd as List Command
    participant BlockFilter as Block/Filter Utils
    participant TagMgmt as Tag Management
    participant Display as Table Display

    User->>ListCmd: list --ready --all-tags
    ListCmd->>ListCmd: Validate options (disallow --all-tags + --watch)
    ListCmd->>TagMgmt: Get tasks from each tag
    TagMgmt-->>ListCmd: tasks[] per tag
    ListCmd->>BlockFilter: buildBlocksMap(all tasks)
    BlockFilter-->>ListCmd: blocksMap + invalidDependencies
    ListCmd->>BlockFilter: filterReadyTasks(tasks with blocks)
    BlockFilter-->>ListCmd: ready tasks (actionable status + dependencies complete)
    ListCmd->>ListCmd: Aggregate ready tasks across tags
    ListCmd->>ListCmd: Apply --blocking filter if present
    ListCmd->>Display: createTaskTable(tasks, showBlocks=true, showTag=true)
    Display->>Display: Build dynamic headers (Tag, Title, Status, Blocks, Priority)
    Display->>Display: Render task rows with block info (gray if complete, yellow if not)
    Display-->>User: Formatted table with Blocks and Tag columns
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly Related Issues

Possibly Related PRs

Suggested Reviewers

  • eyaltoledano
🚥 Pre-merge checks | ✅ 3
✅ 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 clearly and specifically describes the main feature addition: new --ready and --blocking filters for the list command to identify parallelizable tasks. This directly aligns with the primary objective of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
apps/cli/tests/unit/commands/show.command.spec.ts (1)

41-41: Consider using a more specific type for the spy.

Using any works but loses type safety. You could use Vitest's SpyInstance type or infer the type.

✨ Optional type improvement
-	let consoleLogSpy: any;
+	let consoleLogSpy: ReturnType<typeof vi.spyOn<typeof console, 'log'>>;

Alternatively, a simpler approach:

let consoleLogSpy: ReturnType<typeof vi.spyOn>;
apps/cli/src/commands/list.command.ts (1)

417-421: Type cast is safe here but worth documenting.

The cast filterReadyTasks(enrichedTasks) as TaskWithTag[] is necessary because filterReadyTasks returns TaskWithBlocks[], but the function preserves all properties via filter (no mapping). Consider adding a brief comment explaining why the cast is safe.

📝 Suggested comment
 			// Apply ready filter per-tag to respect tag-scoped dependencies
 			// (task IDs may overlap between tags, so we must filter within each tag)
+			// Cast is safe: filterReadyTasks only filters, preserving all input properties
 			const tasksToAdd: TaskWithTag[] = options.ready
 				? (filterReadyTasks(enrichedTasks) as TaskWithTag[])
 				: enrichedTasks;
apps/cli/src/commands/list.command.spec.ts (1)

55-68: Minor: storageType mock value should use valid enum value.

The mock returns storageType: 'json', but StorageType is defined as 'file' | 'api' | 'auto'. While this doesn't affect test execution (since it's mocked data), using a valid value like 'file' would be more accurate and could catch type-related regressions.

🔧 Suggested fix
 		mockTmCore = {
 			tasks: {
 				list: vi.fn().mockResolvedValue({
 					tasks: [{ id: '1', title: 'Test Task', status: 'pending' }],
 					total: 1,
 					filtered: 1,
-					storageType: 'json'
+					storageType: 'file'
 				}),
-				getStorageType: vi.fn().mockReturnValue('json')
+				getStorageType: vi.fn().mockReturnValue('file')
 			} as any,

Apply similar changes to all other mock definitions throughout the file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

🧹 Nitpick comments (2)
apps/cli/tests/unit/commands/list.command.spec.ts (1)

8-10: Consider extracting the shared constant to reduce duplication.

TERMINAL_COMPLETE_STATUSES is defined here and repeated in mocks at lines 31 and 41. Consider defining it once and reusing it across all mock definitions.

🔎 Suggested refactor:
 // Terminal complete statuses
 const TERMINAL_COMPLETE_STATUSES = ['done', 'cancelled'] as const;
+const isTaskCompleteMock = (status: string) =>
+	TERMINAL_COMPLETE_STATUSES.includes(status as any);

 // Mock dependencies
 vi.mock('@tm/core', () => ({
 	createTmCore: vi.fn(),
 	// ...
 	TERMINAL_COMPLETE_STATUSES: ['done', 'cancelled'],
-	isTaskComplete: (status: string) =>
-		TERMINAL_COMPLETE_STATUSES.includes(status as any)
+	isTaskComplete: isTaskCompleteMock
 }));

 vi.mock('../../../src/utils/task-status.js', () => ({
-	TERMINAL_COMPLETE_STATUSES: ['done', 'cancelled'],
-	isTaskComplete: (status: string) =>
-		['done', 'cancelled'].includes(status)
+	TERMINAL_COMPLETE_STATUSES,
+	isTaskComplete: isTaskCompleteMock
 }));
apps/cli/src/ui/display/tables.ts (1)

96-110: Consider using a more explicit column width mapping.

The colIndex counter approach works but is order-dependent and could break if columns are reordered. A more explicit approach using named widths might be clearer.

🔎 Example approach:
// Instead of index-based approach:
const widthConfig = {
  dependencies: showDependencies ? calculateDepsWidth() : 0,
  blocks: showBlocks ? calculateBlocksWidth() : 0,
  complexity: showComplexity ? calculateComplexityWidth() : 0,
};

if (showDependencies) {
  headers.push(chalk.blue.bold('Dependencies'));
  colWidths.push(widthConfig.dependencies);
}
// ... etc
📜 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 f978cb8 and 39dacd3.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • .changeset/list-blocks-ready-filter.md (1 hunks)
  • apps/cli/src/commands/list.command.ts (4 hunks)
  • apps/cli/src/ui/display/tables.ts (4 hunks)
  • apps/cli/tests/unit/commands/list.command.spec.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • apps/cli/src/commands/list.command.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • apps/cli/src/commands/list.command.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • apps/cli/src/commands/list.command.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
**/*.spec.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Place package and app test files in packages/<package-name>/src/<module>/<file>.spec.ts or apps/<app-name>/src/<module>/<file>.spec.ts alongside source files

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{spec,test}.ts: Always use .ts for TypeScript tests, never .js
NEVER use async/await in test functions unless testing actual asynchronous operations; use synchronous top-level imports instead of dynamic await import()

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
apps/cli/**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
🧠 Learnings (52)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Use task status values: 'pending', 'in-progress', 'done', 'deferred', 'cancelled', or 'blocked'
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • .changeset/list-blocks-ready-filter.md
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations

Applied to files:

  • .changeset/list-blocks-ready-filter.md
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • .changeset/list-blocks-ready-filter.md
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • .changeset/list-blocks-ready-filter.md
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:00:23.032Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.

Applied to files:

  • .changeset/list-blocks-ready-filter.md
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Include all required task properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) in each task object without adding extra properties outside the standard schema

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Use visual indicators to show dependency status (✅/⏱️) and format dependency lists consistently when visualizing dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Format dependency lists consistently for visualization

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Format task and dependency IDs consistently when adding dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Use visual indicators to show dependency status (✅/⏱️)

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/cli/**/*.{spec,test}.ts : In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : For task file operations in tests: use test-specific file paths (e.g., 'test-tasks.json'); mock `readJSON` and `writeJSON` to avoid real file system interactions; verify file operations use correct paths; use different paths for each test; verify modifications on in-memory task objects passed to `writeJSON`.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing UI functions: mock console output and verify correct formatting; test conditional output logic; use `toContain()` or `toMatch()` rather than exact `toBe()` for strings with emojis or formatting; create separate tests for different behavior modes; test structure of formatted output rather than exact string matching.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to packages/tm-core/**/*.{spec,test}.ts : In unit tests for tm/core, mock only external I/O (Supabase, APIs, filesystem) and use real internal services

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to tests.mdc for guidelines on implementing and maintaining tests for Task Master CLI

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.test.ts : Unit tests must follow the describe/it pattern, use beforeEach for mock setup with jest.clearAllMocks(), include specific assertions with expect(), and test both success and error scenarios including edge cases

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to **/tests/integration/**/*.{spec,test}.ts : In integration tests, use real tm-core and mock only external boundaries (APIs, DB, filesystem)

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/teardown.ts : Global teardown file must be created to handle cleanup after all tests complete and prevent worker process leaks

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/setup.ts : Create global test setup file that configures jest.setTimeout(10000), clears all mocks after each test with jest.clearAllMocks(), and initializes global test configuration

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/mcp/**/*.{spec,test}.ts : In unit tests for apps/mcp, mock tm-core responses but use real MCP framework to test response formatting

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Use established mocking patterns from auth.test.ts as templates: mock bcrypt with proper TypeScript typing, mock Prisma client with transaction support, and always clear mocks between tests

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.integration.test.ts : Integration tests must use supertest for API endpoint testing, verify database state changes after operations, clean test data before each test, and include full request/response validation with expected HTTP status codes

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : Mock file system operations using `mock-fs` library. Mock API calls by providing jest.fn() implementations that return expected structures. Mock environment variables in test setup.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : Make async operations synchronous in tests. Mock async functions to return synchronous values when possible. Don't use real async/await or Promise resolution that might fail unpredictably.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The tasks.json file should use a tagged task lists structure with multiple named task lists as top-level keys (e.g., {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}}), supporting backward compatibility through silent migration from legacy {"tasks": [...]} format

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Ensure silent mode is disabled in a finally block to prevent it from staying enabled

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to **/*.js : For functions that need to handle both a passed silentMode parameter and check global state, check both the function parameter and global state: const isSilent = options.silentMode || (typeof options.silentMode === 'undefined' && isSilentMode())

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 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 : Provide clear error messages for unknown options, show available options when an unknown option is used, include command-specific help displays for common errors, and do not allow unknown options with .allowUnknownOption().

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Select tasks based on dependencies (all marked 'done'), priority level, and ID order

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Display progress indicators using both numeric and visual representations, such as showing completed tasks count, total tasks, completion percentage, and progress bars together

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Don't include task manipulations within UI functions; avoid creating circular dependencies with other modules

Applied to files:

  • apps/cli/src/commands/list.command.ts
🧬 Code graph analysis (2)
apps/cli/src/ui/display/tables.ts (1)
packages/tm-core/src/common/types/index.ts (1)
  • Subtask (165-169)
apps/cli/src/commands/list.command.ts (3)
packages/tm-core/src/common/types/index.ts (1)
  • Task (131-159)
packages/tm-core/src/common/constants/index.ts (1)
  • isTaskComplete (68-70)
apps/cli/src/utils/task-status.ts (1)
  • isTaskComplete (9-9)
⏰ 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: Cursor Bugbot
🔇 Additional comments (15)
.changeset/list-blocks-ready-filter.md (1)

1-11: LGTM!

The changeset accurately documents the new features: --ready and --blocking filters, their combined usage, the new "Blocks" column, and JSON output support. Minor version bump is appropriate for these additive features.

apps/cli/tests/unit/commands/list.command.spec.ts (4)

208-287: Good test coverage for the --ready filter.

Tests correctly verify that:

  1. Tasks with satisfied dependencies are included
  2. Tasks with unsatisfied dependencies are excluded
  3. Completed tasks (done/cancelled) are excluded from results

Consider adding a test case for tasks with deferred or review status to confirm they're included when dependencies are satisfied.


289-329: LGTM!

The --blocking filter test correctly validates that only tasks appearing in other tasks' dependency lists are included in the output.


331-372: LGTM!

Excellent test for the combined --ready --blocking filter. The test scenario clearly demonstrates the AND semantics: only task 2 is both ready (dependency on done task 1 is satisfied) and blocking (tasks 3 and 4 depend on it).


374-423: LGTM!

Comprehensive test for the blocks field output. Correctly validates the inverse dependency mapping including the case where task 4 is blocked by both tasks 2 and 3.

apps/cli/src/commands/list.command.ts (5)

47-48: LGTM!

The new ready and blocking options are correctly typed as optional booleans in the ListCommandOptions interface.


97-104: LGTM!

The CLI options are well-documented with clear descriptions of their functionality.


250-271: LGTM!

The buildBlocksMap correctly inverts the dependency graph. The implementation handles:

  • Consistent string conversion for task IDs
  • Empty dependency arrays
  • Dependencies referencing tasks not in the current list (external dependencies)

305-307: LGTM!

Simple and correct implementation of the blocking filter.


423-430: LGTM!

The showBlocks: true option enables the new Blocks column in the task table display. This aligns with the PR objective to show blocking information for parallel team assignment.

apps/cli/src/ui/display/tables.ts (5)

19-22: LGTM!

The TaskWithBlocks type correctly extends both Task and Subtask with an optional blocks field, allowing the table to handle both task types uniformly.


45-87: LGTM!

The dynamic column width calculation correctly handles all combinations of optional columns (Dependencies, Blocks, Complexity). The percentages sum to approximately 100% with acceptable rounding due to Math.floor.


139-149: LGTM!

The blocks rendering uses yellow highlighting to draw attention to tasks that block others, which is appropriate for the parallel team assignment use case. The fallback to a gray dash maintains visual consistency with the dependencies column.


182-185: LGTM!

Subtasks correctly display a dash for blocks since the blocking relationship is computed only for top-level tasks. The comment documents this intentional behavior.


128-137: LGTM!

Changed empty dependencies display from 'None' to '-' for visual consistency with the new Blocks column.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@bjcoombs bjcoombs force-pushed the 1532-list-blocks-ready-filter branch from 39dacd3 to d41fa0e Compare December 18, 2025 12:49
@bjcoombs bjcoombs changed the base branch from main to ralph/feat/implement.new.update-task December 18, 2025 14:21
@bjcoombs bjcoombs changed the base branch from ralph/feat/implement.new.update-task to changeset-release/next December 18, 2025 14:22
@bjcoombs bjcoombs changed the base branch from changeset-release/next to main December 18, 2025 14:22
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 (2)
apps/cli/src/ui/display/tables.ts (2)

19-28: Consider consolidating the TaskWithBlocks type definition.

The type TaskWithBlocks is defined here as (Task | Subtask) & { blocks?: string[] } with optional blocks, but apps/cli/src/commands/list.command.ts line 53 defines it as Task & { blocks: string[] } with required blocks and no Subtask support. Having two different types with the same name in different files can lead to confusion and type safety issues.

Consider moving this to a shared types file (e.g., packages/tm-core/src/common/types/index.ts) and using a single definition across both files.


182-185: Clarify subtask blocks handling.

The type TaskWithBlocks allows subtasks to have a blocks field, but the rendering code always displays '-' for subtasks with the comment "don't typically have blocks." If subtasks truly never have blocks, consider either:

  1. Checking if subtask.blocks exists and rendering it (to match the type), or
  2. Refining the type to exclude blocks for subtasks (e.g., using a discriminated union).

The current implementation creates a mismatch between what the type allows and what the code actually handles.

📜 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 d41fa0e and 5787a48.

📒 Files selected for processing (3)
  • apps/cli/src/commands/list.command.ts (5 hunks)
  • apps/cli/src/ui/display/tables.ts (4 hunks)
  • apps/cli/tests/unit/commands/list.command.spec.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/cli/src/commands/list.command.ts
🧰 Additional context used
📓 Path-based instructions (7)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/ui/display/tables.ts
**/*.spec.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Place package and app test files in packages/<package-name>/src/<module>/<file>.spec.ts or apps/<app-name>/src/<module>/<file>.spec.ts alongside source files

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{spec,test}.ts: Always use .ts for TypeScript tests, never .js
NEVER use async/await in test functions unless testing actual asynchronous operations; use synchronous top-level imports instead of dynamic await import()

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
apps/cli/**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
🧠 Learnings (39)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Pull Request descriptions must include: Task Overview, Subtasks Completed (checklist), Implementation Details, Testing approach, Breaking Changes (if any), and Related Tasks.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Include all required task properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) in each task object without adding extra properties outside the standard schema

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Use visual indicators to show dependency status (✅/⏱️) and format dependency lists consistently when visualizing dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Format dependency lists consistently for visualization

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Format task and dependency IDs consistently when adding dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Use visual indicators to show dependency status (✅/⏱️)

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/cli/**/*.{spec,test}.ts : In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : For task file operations in tests: use test-specific file paths (e.g., 'test-tasks.json'); mock `readJSON` and `writeJSON` to avoid real file system interactions; verify file operations use correct paths; use different paths for each test; verify modifications on in-memory task objects passed to `writeJSON`.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to packages/tm-core/**/*.{spec,test}.ts : In unit tests for tm/core, mock only external I/O (Supabase, APIs, filesystem) and use real internal services

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing UI functions: mock console output and verify correct formatting; test conditional output logic; use `toContain()` or `toMatch()` rather than exact `toBe()` for strings with emojis or formatting; create separate tests for different behavior modes; test structure of formatted output rather than exact string matching.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to **/tests/integration/**/*.{spec,test}.ts : In integration tests, use real tm-core and mock only external boundaries (APIs, DB, filesystem)

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.test.ts : Unit tests must follow the describe/it pattern, use beforeEach for mock setup with jest.clearAllMocks(), include specific assertions with expect(), and test both success and error scenarios including edge cases

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/teardown.ts : Global teardown file must be created to handle cleanup after all tests complete and prevent worker process leaks

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/setup.ts : Create global test setup file that configures jest.setTimeout(10000), clears all mocks after each test with jest.clearAllMocks(), and initializes global test configuration

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/mcp/**/*.{spec,test}.ts : In unit tests for apps/mcp, mock tm-core responses but use real MCP framework to test response formatting

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Use established mocking patterns from auth.test.ts as templates: mock bcrypt with proper TypeScript typing, mock Prisma client with transaction support, and always clear mocks between tests

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.integration.test.ts : Integration tests must use supertest for API endpoint testing, verify database state changes after operations, clean test data before each test, and include full request/response validation with expected HTTP status codes

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : Mock file system operations using `mock-fs` library. Mock API calls by providing jest.fn() implementations that return expected structures. Mock environment variables in test setup.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : Make async operations synchronous in tests. Mock async functions to return synchronous values when possible. Don't use real async/await or Promise resolution that might fail unpredictably.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
🧬 Code graph analysis (2)
apps/cli/src/ui/display/tables.ts (2)
apps/cli/src/commands/list.command.ts (1)
  • TaskWithBlocks (54-54)
packages/tm-core/src/common/types/index.ts (1)
  • Subtask (165-169)
apps/cli/tests/unit/commands/list.command.spec.ts (1)
apps/cli/src/commands/list.command.ts (1)
  • ListTasksCommand (71-621)
⏰ 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: Cursor Bugbot
🔇 Additional comments (7)
apps/cli/src/ui/display/tables.ts (2)

46-89: LGTM: Dynamic column width calculation.

The logic correctly calculates column widths based on the number of optional columns (0-3), and the percentage allocations ensure all columns fit within the terminal width while maintaining readability.


141-149: LGTM: Blocks column rendering for tasks.

The implementation correctly displays the blocks field with appropriate color coding (yellow for blocks vs. cyan for dependencies) and consistent empty-value handling with '-'.

apps/cli/tests/unit/commands/list.command.spec.ts (5)

8-43: LGTM: Consistent terminal status mocking.

The mock setup correctly defines TERMINAL_COMPLETE_STATUSES and isTaskComplete consistently across both the @tm/core and task-status utility mocks, ensuring tests accurately reflect the new filtering behavior.


207-286: LGTM: Comprehensive --ready filter testing.

The tests correctly verify that:

  1. Only tasks with satisfied dependencies are included
  2. Complete tasks (done/cancelled) are excluded from ready results

The test data and assertions accurately validate the filtering logic.


288-328: LGTM: --blocking filter validation.

The test correctly verifies that the --blocking filter identifies tasks that are dependencies of other tasks, using an appropriate dependency chain to validate the filtering logic.


330-371: LGTM: Combined filter validation with AND semantics.

The test correctly verifies that combining --ready and --blocking returns only tasks that satisfy both conditions (high-impact tasks), using a well-designed dependency chain to validate the intersection logic.


373-427: LGTM: Blocks field calculation validation.

The test thoroughly verifies that the blocks field correctly represents inverse dependencies, checking both tasks that block others and tasks that block nothing. The assertions appropriately use arrayContaining for unordered comparisons and exact equality for ordered results.

@eyaltoledano
Copy link
Owner

@bjcoombs Not sure this is something we'd need into considering we're solving for team play with Hamster. It might make sense to add it to metadata since it would react to what's on Hamster

As an example, task lists living on Hamster can be pulled into Hamster, stay up to date in real-time, and are built for collaboration. In this case, we'd want to ensure tasks assigned to specific team members within Hamster are reflected in tm list, which would include dependency awareness. In that regard, a --ready or --blocked flag could help, though the tm next command provides the next task based on the dependency tree.

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

🧹 Nitpick comments (2)
apps/cli/src/ui/display/tables.ts (2)

47-90: Consider a more scalable approach to column width calculation.

The current implementation uses four hardcoded branches based on the count of optional columns. While correct, this approach becomes harder to maintain as new optional columns are added. Consider a more algorithmic approach that calculates widths based on the number of visible columns dynamically.

💡 Example refactoring approach
// Define base and optional column weight allocations
const baseColumns = [
  { name: 'ID', weight: 0.1 },
  { name: 'Title', weight: 0.5 },
  { name: 'Status', weight: 0.2 },
  { name: 'Priority', weight: 0.2 }
];

const optionalColumns = [
  { name: 'Dependencies', weight: 0.15, show: showDependencies },
  { name: 'Blocks', weight: 0.15, show: showBlocks },
  { name: 'Complexity', weight: 0.1, show: showComplexity }
];

// Calculate widths dynamically
const activeColumns = [...baseColumns];
optionalColumns.forEach(col => {
  if (col.show) activeColumns.push(col);
});

// Normalize weights and calculate widths
const totalWeight = activeColumns.reduce((sum, col) => sum + col.weight, 0);
const colWidths = activeColumns.map(col => 
  Math.floor(tableWidth * (col.weight / totalWeight))
);

189-192: Clarify subtask blocking behavior.

The implementation always displays - for subtask blocks, even though the TaskWithBlocks type includes Subtask and allows the blocks field. If subtasks can never block other tasks in your domain model, consider:

  1. Documenting this constraint more explicitly in comments or type constraints
  2. Filtering out subtasks from the blocking relationship computation at a higher level

If subtasks can sometimes block other tasks, the current implementation would silently hide that information.

📜 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 9fbe860 and 889f495.

📒 Files selected for processing (1)
  • apps/cli/src/ui/display/tables.ts (4 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/ui/display/tables.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/ui/display/tables.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/ui/display/tables.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/ui/display/tables.ts
🧠 Learnings (22)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Include all required task properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) in each task object without adding extra properties outside the standard schema

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Use visual indicators to show dependency status (✅/⏱️) and format dependency lists consistently when visualizing dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Format dependency lists consistently for visualization

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Format task and dependency IDs consistently when adding dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Use visual indicators to show dependency status (✅/⏱️)

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/ui/display/tables.ts
🧬 Code graph analysis (1)
apps/cli/src/ui/display/tables.ts (2)
apps/cli/src/commands/list.command.ts (1)
  • TaskWithBlocks (54-54)
packages/tm-core/src/common/types/index.ts (1)
  • Subtask (165-169)
⏰ 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). (2)
  • GitHub Check: Test
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (2)
apps/cli/src/ui/display/tables.ts (2)

142-156: LGTM! Blocks rendering logic is well-designed.

The color scheme effectively communicates blocking status:

  • Yellow for incomplete tasks that are actively blocking other tasks
  • Gray for completed tasks (no longer blocking)
  • Gray dash for tasks with no dependents

This provides clear visual feedback to help teams identify critical path tasks and assignment priorities.


131-140: LGTM! Consistent empty value handling.

The change from 'None' to '-' for empty dependencies improves consistency across the table columns (Dependencies, Blocks) and follows standard table conventions for "not applicable" values.

@bjcoombs bjcoombs changed the title feat(list): Add --ready and --blocking filters for parallel team assignment feat(list): Add --ready and --blocking filters to identify parallelizable tasks Dec 18, 2025
@bjcoombs
Copy link
Contributor Author

bjcoombs commented Dec 18, 2025

@eyaltoledano Thanks for the feedback! I've updated the PR title and description to clarify the use case.

This isn't really about team collaboration - it's for single-developer parallel execution. My workflow is running 3-4 Claude Code sessions simultaneously in separate git worktrees. Right now I use task-master next which gives me ONE task, but when I'm spinning up multiple sessions I want to see ALL tasks that are ready to work on in parallel.

The filters help answer: "I have 4 Claude sessions ready to go - which 4 independent tasks can I assign right now?"

That said, I can see how this could also complement Hamster for team scenarios - the --ready filter would work well with assignee filtering once that lands. Happy to hear your thoughts on whether this fits the project direction.

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

♻️ Duplicate comments (2)
apps/cli/src/commands/list.command.ts (2)

213-228: Tag filter may still cause incomplete dependency resolution for cross-tag dependencies.

The code correctly defers status filtering when --ready or --blocking is used (lines 218-221). However, the tag filter is still passed to tmCore.tasks.list() at line 225. If a task depends on a task with a different tag, that dependency won't appear in completedIds, causing the task to incorrectly appear as "not ready."

Consider whether cross-tag dependencies are a supported use case. If so, you may need to fetch all tasks when needsAllTasks is true and apply tag filtering after ready/blocking computation.


299-305: Subtask dependencies are not included in completedIds.

The completedIds set only includes top-level task IDs, but dependencies can reference subtasks (e.g., "1.1"). Compare with findNextTask (lines 500-506) which correctly adds subtask IDs using ${t.id}.${st.id}. Tasks depending on completed subtasks will incorrectly be marked as not ready.

🔎 Suggested fix:
 const completedIds = new Set<string>();
 tasks.forEach((t) => {
   if (isTaskComplete(t.status)) {
     completedIds.add(String(t.id));
   }
+  // Also add completed subtask IDs
+  if (t.subtasks) {
+    t.subtasks.forEach((st) => {
+      if (isTaskComplete(st.status)) {
+        completedIds.add(`${t.id}.${st.id}`);
+      }
+    });
+  }
 });
🧹 Nitpick comments (4)
apps/cli/src/ui/display/tables.ts (2)

47-91: Consider simplifying column width calculation.

The branching logic is correct but complex. A more maintainable approach could calculate widths dynamically based on column configuration rather than hardcoding arrays for each combination.

🔎 Alternative approach:
// Define base widths for required columns
const baseWidths = {
  id: 0.08,
  title: 0.35,
  status: 0.14,
  priority: 0.11
};

// Remaining width distributed among optional columns
const optionalWidth = 1 - Object.values(baseWidths).reduce((a, b) => a + b, 0);
const perOptionalCol = optionalCols > 0 ? optionalWidth / optionalCols : 0;

143-157: Minor: Redundant type cast.

At line 145, task is already of type TaskTableItem (from the function signature at line 30), so the cast is unnecessary.

🔎 Simplified code:
 if (showBlocks) {
   // Show tasks that depend on this one
-  const taskWithBlocks = task as TaskTableItem;
-  if (!taskWithBlocks.blocks || taskWithBlocks.blocks.length === 0) {
+  if (!task.blocks || task.blocks.length === 0) {
     row.push(chalk.gray('-'));
   } else {
     // Gray out blocks for completed tasks (no longer blocking)
-    const blocksText = taskWithBlocks.blocks.join(', ');
+    const blocksText = task.blocks.join(', ');
     row.push(
       isTaskComplete(task.status)
         ? chalk.gray(blocksText)
         : chalk.yellow(blocksText)
     );
   }
 }
apps/cli/tests/unit/commands/list.command.spec.ts (2)

8-10: Potential mock redundancy in @tm/core.

The TERMINAL_COMPLETE_STATUSES and isTaskComplete are exported from the @tm/core mock (lines 33-35), but the actual code imports isTaskComplete from ../utils/task-status.js. The correct mock is at lines 42-45. The exports in the @tm/core mock are unused and could be removed for clarity.

Also applies to: 33-35


209-473: Consider adding test for subtask dependency resolution.

Given the known issue with subtask dependencies not being handled in filterReadyTasks, consider adding a test case that exposes this behavior. This would help prevent regressions when the fix is implemented.

🔎 Example test case:
it('should handle subtask dependencies in ready filter', async () => {
  const command = new ListTasksCommand();

  const mockTasks = [
    {
      id: '1',
      title: 'Task 1',
      status: 'in-progress',
      dependencies: [],
      subtasks: [{ id: '1', title: 'Subtask 1.1', status: 'done' }]
    },
    {
      id: '2',
      title: 'Task 2',
      status: 'pending',
      dependencies: ['1.1'] // Depends on completed subtask
    }
  ];

  (command as any).tmCore = {
    tasks: {
      list: vi.fn().mockResolvedValue({
        tasks: mockTasks,
        total: 2,
        filtered: 2,
        storageType: 'json'
      }),
      getStorageType: vi.fn().mockReturnValue('json')
    },
    config: {
      getActiveTag: vi.fn().mockReturnValue('master')
    }
  };

  await (command as any).executeCommand({
    ready: true,
    json: true
  });

  const output = consoleLogSpy.mock.calls[0][0];
  const parsed = JSON.parse(output);

  // Task 2 should be ready (subtask 1.1 is done)
  expect(parsed.tasks.map((t: any) => t.id)).toContain('2');
});
📜 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 889f495 and 4631f51.

📒 Files selected for processing (3)
  • apps/cli/src/commands/list.command.ts (5 hunks)
  • apps/cli/src/ui/display/tables.ts (4 hunks)
  • apps/cli/tests/unit/commands/list.command.spec.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
**/*.spec.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Place package and app test files in packages/<package-name>/src/<module>/<file>.spec.ts or apps/<app-name>/src/<module>/<file>.spec.ts alongside source files

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{spec,test}.ts: Always use .ts for TypeScript tests, never .js
NEVER use async/await in test functions unless testing actual asynchronous operations; use synchronous top-level imports instead of dynamic await import()

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
apps/cli/**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
🧠 Learnings (62)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Include all required task properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) in each task object without adding extra properties outside the standard schema

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Do not duplicate task ID formatting logic across modules - centralize formatting utilities

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The tasks.json file should use a tagged task lists structure with multiple named task lists as top-level keys (e.g., {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}}), supporting backward compatibility through silent migration from legacy {"tasks": [...]} format

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-09-03T12:16:15.866Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/package.json:13-64
Timestamp: 2025-09-03T12:16:15.866Z
Learning: For internal packages in the claude-task-master project, Crunchyman-ralph prefers pointing package.json "types" entries to src .ts files rather than dist .d.ts files for better developer experience (DX), as the packages are not being exported as SDKs.

Applied to files:

  • apps/cli/src/ui/display/tables.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:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Use visual indicators to show dependency status (✅/⏱️) and format dependency lists consistently when visualizing dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.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 : Format dependency lists consistently for visualization

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent and convert between formats appropriately when needed, avoiding circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • apps/cli/src/commands/list.command.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 : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/commands/list.command.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 : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Detect circular dependencies using DFS and validate task references before operations

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Respect dependency chains and task priorities when selecting work

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Implement a three-step initialization pattern for context-aware commands: (1) validate and parse parameters, (2) initialize context gatherer and find project root, (3) auto-discover relevant tasks using fuzzy search if task IDs not specified

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Select tasks based on dependencies (all marked 'done'), priority level, and ID order

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Display progress indicators using both numeric and visual representations, such as showing completed tasks count, total tasks, completion percentage, and progress bars together

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Don't include task manipulations within UI functions; avoid creating circular dependencies with other modules

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/cli/**/*.{spec,test}.ts : In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : For task file operations in tests: use test-specific file paths (e.g., 'test-tasks.json'); mock `readJSON` and `writeJSON` to avoid real file system interactions; verify file operations use correct paths; use different paths for each test; verify modifications on in-memory task objects passed to `writeJSON`.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to packages/tm-core/**/*.{spec,test}.ts : In unit tests for tm/core, mock only external I/O (Supabase, APIs, filesystem) and use real internal services

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing UI functions: mock console output and verify correct formatting; test conditional output logic; use `toContain()` or `toMatch()` rather than exact `toBe()` for strings with emojis or formatting; create separate tests for different behavior modes; test structure of formatted output rather than exact string matching.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to **/tests/integration/**/*.{spec,test}.ts : In integration tests, use real tm-core and mock only external boundaries (APIs, DB, filesystem)

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.test.ts : Unit tests must follow the describe/it pattern, use beforeEach for mock setup with jest.clearAllMocks(), include specific assertions with expect(), and test both success and error scenarios including edge cases

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/teardown.ts : Global teardown file must be created to handle cleanup after all tests complete and prevent worker process leaks

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/setup.ts : Create global test setup file that configures jest.setTimeout(10000), clears all mocks after each test with jest.clearAllMocks(), and initializes global test configuration

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/mcp/**/*.{spec,test}.ts : In unit tests for apps/mcp, mock tm-core responses but use real MCP framework to test response formatting

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Use established mocking patterns from auth.test.ts as templates: mock bcrypt with proper TypeScript typing, mock Prisma client with transaction support, and always clear mocks between tests

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.integration.test.ts : Integration tests must use supertest for API endpoint testing, verify database state changes after operations, clean test data before each test, and include full request/response validation with expected HTTP status codes

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-12-11T14:45:14.973Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Use task status values: 'pending', 'in-progress', 'done', 'deferred', 'cancelled', or 'blocked'

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : Mock file system operations using `mock-fs` library. Mock API calls by providing jest.fn() implementations that return expected structures. Mock environment variables in test setup.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
🧬 Code graph analysis (2)
apps/cli/src/commands/list.command.ts (2)
packages/tm-core/src/common/types/index.ts (2)
  • Task (131-159)
  • TaskStatus (20-28)
packages/tm-core/src/common/constants/index.ts (1)
  • isTaskComplete (68-70)
apps/cli/tests/unit/commands/list.command.spec.ts (1)
apps/cli/src/commands/list.command.ts (1)
  • ListTasksCommand (71-628)
⏰ 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). (2)
  • GitHub Check: Test
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (9)
apps/cli/src/commands/list.command.ts (4)

47-54: LGTM: New options and type definition are well-structured.

The ready and blocking options are cleanly added to the interface, and TaskWithBlocks provides a clear type for enriched tasks with inverse dependency information.


262-286: LGTM: buildBlocksMap correctly computes inverse dependencies.

The method properly initializes all task IDs and iterates through dependencies to build the blocks map.


324-329: LGTM: Simple and effective blocking filter.

The filter correctly selects tasks that have a non-empty blocks array.


446-451: LGTM: Blocks column enabled in task table.

The showBlocks: true option properly enables the new Blocks column in the table display.

apps/cli/src/ui/display/tables.ts (2)

20-24: LGTM: TaskTableItem type correctly handles both tasks and subtasks.

The type allows optional blocks field since subtasks don't have blocks, while enriched top-level tasks will have the field populated. This design appropriately separates concerns from TaskWithBlocks in the command file.


190-193: LGTM: Subtasks correctly show dash for blocks.

Since subtasks don't participate in the blocking relationship at this level, showing a dash is appropriate.

apps/cli/tests/unit/commands/list.command.spec.ts (3)

209-331: LGTM: Comprehensive test coverage for --ready filter.

The tests cover:

  • Tasks with satisfied dependencies
  • Exclusion of done/cancelled tasks
  • Exclusion of deferred and blocked tasks
  • Proper inclusion of pending, in-progress, and review statuses

334-417: LGTM: Good test coverage for blocking and combined filters.

The tests correctly verify:

  • --blocking returns only tasks that block others
  • --ready --blocking returns the intersection (high-impact tasks)

419-473: LGTM: Thorough validation of blocks field computation.

The test verifies the inverse dependency mapping for all tasks, including tasks that block multiple others and tasks that block nothing.

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 (3)
scripts/modules/task-manager/tag-management.js (1)

622-639: Consider extracting ready task calculation into a shared utility function.

The ready task filtering logic is duplicated from the list command implementation (which adds --ready flag). To improve maintainability and ensure consistent behavior across commands, consider extracting this into a shared utility function.

Suggested refactor

Create a new utility function in scripts/modules/utils.js or a dedicated file:

/**
 * Filter tasks that are ready to work on (actionable status + dependencies satisfied)
 * @param {Array} tasks - Array of tasks to filter
 * @returns {Array} Filtered array of ready tasks
 */
export function filterReadyTasks(tasks) {
  const completedIds = new Set(
    tasks
      .filter(
        (t) =>
          t.status === 'done' ||
          t.status === 'completed' ||
          t.status === 'cancelled'
      )
      .map((t) => String(t.id))
  );
  const actionableStatuses = ['pending', 'in-progress', 'review'];
  return tasks.filter((t) => {
    if (!actionableStatuses.includes(t.status)) return false;
    if (!t.dependencies || t.dependencies.length === 0) return true;
    return t.dependencies.every((depId) => completedIds.has(String(depId)));
  });
}

Then use it in this file:

-    // Calculate ready tasks (actionable status + dependencies satisfied)
-    const completedIds = new Set(
-      tasks
-        .filter(
-          (t) =>
-            t.status === 'done' ||
-            t.status === 'completed' ||
-            t.status === 'cancelled'
-        )
-        .map((t) => String(t.id))
-    );
-    const actionableStatuses = ['pending', 'in-progress', 'review'];
-    const readyTasks = tasks.filter((t) => {
-      if (!actionableStatuses.includes(t.status)) return false;
-      if (!t.dependencies || t.dependencies.length === 0) return true;
-      return t.dependencies.every((depId) => completedIds.has(String(depId)));
-    });
+    const readyTasks = filterReadyTasks(tasks);
tests/unit/task-manager/tag-management.test.js (2)

150-172: Verify cancelled dependency handling.

The test correctly validates that tasks with satisfied dependencies (completed) are counted as ready. However, according to the PR description, dependencies can be satisfied by either "completed or cancelled" status. Consider adding a test case to verify that a task depending on a cancelled task is also counted as ready.

🔎 Add test case for cancelled dependencies
+	it('should count tasks with cancelled dependencies as ready', async () => {
+		const data = {
+			master: {
+				tasks: [
+					{ id: 1, title: 'Task 1', status: 'cancelled', dependencies: [] },
+					{ id: 2, title: 'Task 2', status: 'pending', dependencies: [1] }, // cancelled dep should be satisfied
+					{ id: 3, title: 'Task 3', status: 'cancelled', dependencies: [] } // cancelled tasks themselves are not ready
+				],
+				metadata: { created: new Date().toISOString() }
+			}
+		};
+		fs.writeFileSync(TASKS_PATH, JSON.stringify(data, null, 2));
+
+		const result = await listTags(
+			TASKS_PATH,
+			{ showTaskCounts: true },
+			{ projectRoot: TEMP_DIR },
+			'json'
+		);
+
+		const masterTag = result.tags.find((t) => t.name === 'master');
+		expect(masterTag.readyTasks).toBe(1); // only task 2 is ready (pending with cancelled dep)
+	});

126-199: Consider mocking file operations for true unit tests.

The tests use real file system operations with temporary directories. While this approach works and is consistent with existing tests in this file, the coding guidelines suggest mocking readJSON and writeJSON utilities to create faster, more isolated unit tests. The current approach is more integration-style testing.

This is not critical since the tests are properly isolated with cleanup, but mocking would:

  • Speed up test execution
  • Remove file system dependencies
  • Follow the unit testing guidelines more closely
📜 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 4631f51 and b3ef99d.

📒 Files selected for processing (3)
  • .changeset/list-blocks-ready-filter.md (1 hunks)
  • scripts/modules/task-manager/tag-management.js (4 hunks)
  • tests/unit/task-manager/tag-management.test.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/list-blocks-ready-filter.md
🧰 Additional context used
📓 Path-based instructions (14)
**/*.js

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

**/*.js: Always use isSilentMode() function to check current silent mode status instead of directly accessing the global silentMode variable or global.silentMode
Use try/finally block pattern when wrapping core function calls with enableSilentMode/disableSilentMode to ensure silent mode is always restored, even if errors occur
For functions that need to handle both a passed silentMode parameter and check global state, check both the function parameter and global state: const isSilent = options.silentMode || (typeof options.silentMode === 'undefined' && isSilentMode())
Functions should accept their dependencies as parameters rather than using globals to promote testability and explicit dependency injection
Define callbacks as separate functions for easier testing rather than inline functions

Files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
tests/unit/**/*.js

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

Unit tests should be located in tests/unit/ and reflect the module structure with one test file per module

Files:

  • tests/unit/task-manager/tag-management.test.js
**/*.test.{js,ts}

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

**/*.test.{js,ts}: Follow the mock-first-then-import pattern for Jest mocking; use jest.spyOn() for spy functions; clear mocks between tests; verify mocks with the pattern described in tests.mdc
Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Files:

  • tests/unit/task-manager/tag-management.test.js
**/*.{js,jsx}

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

JavaScript test files using Jest must follow the same testing patterns as TypeScript files, include proper mocking of external dependencies, and achieve the same coverage thresholds

Files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
**/*.test.js

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

**/*.test.js: Never use asynchronous operations in tests. Always mock tests properly based on the way the tested functions are defined and used.
Follow Jest test file structure: 1) Imports, 2) Mock setup before importing modules under test, 3) Import modules after mocks, 4) Set up spies on mocked modules, 5) Describe suite with descriptive name, 6) Setup/teardown hooks, 7) Grouped tests for related functionality, 8) Individual test cases with clear descriptions using Arrange-Act-Assert pattern.
When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.
Use jest.mock() before any imports. Jest hoists mock calls to the top of the file. Always declare mocks before importing modules being tested. Use factory pattern for complex mocks that need access to other variables.
When testing ES modules with dynamic imports, use jest.unstable_mockModule() before await import(). Include __esModule: true in mock factories. Reset mock functions before dynamic import. Mock named and default exports as needed.
Mock file system operations using mock-fs library. Mock API calls by providing jest.fn() implementations that return expected structures. Mock environment variables in test setup.
When testing functions with callbacks: get the callback from mock's call arguments using mock.calls[index][argIndex]; execute it directly with test inputs; verify results match expectations.
For task file operations in tests: use test-specific file paths (e.g., 'test-tasks.json'); mock readJSON and writeJSON to avoid real file system interactions; verify file operations use correct paths; use different paths for each test; verify modifications on in-memory task objects passed t...

Files:

  • tests/unit/task-manager/tag-management.test.js
tests/unit/**/*.test.js

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

Locate unit tests in tests/unit/ directory. Test individual functions and utilities in isolation, mock all external dependencies, keep tests small and focused.

Files:

  • tests/unit/task-manager/tag-management.test.js
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
scripts/**/*.js

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

scripts/**/*.js: Use the ContextGatherer class from scripts/modules/utils/contextGatherer.js to extract context from multiple sources (tasks, files, custom text, project tree) with token counting using gpt-tokens library
Initialize ContextGatherer with project root and tasks path, then call gather() method with tasks array, files array, customContext, includeProjectTree, format ('research', 'chat', or 'system-prompt'), and includeTokenCounts options
Use the FuzzyTaskSearch class from scripts/modules/utils/fuzzyTaskSearch.js for intelligent task discovery with semantic matching, purpose categorization, and relevance scoring using Fuse.js
Implement a three-step initialization pattern for context-aware commands: (1) validate and parse parameters, (2) initialize context gatherer and find project root, (3) auto-discover relevant tasks using fuzzy search if task IDs not specified
Display token breakdown using boxen library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title
Process AI result responses using cli-highlight library to apply syntax highlighting to code blocks with language detection in the format language\ncode
Set reasonable file size limits (50KB default) and project tree depth limits (3-5 levels) when gathering context to maintain performance
Implement graceful error handling for context gathering: handle missing files with warnings, validate task IDs with helpful messages, continue processing if some context sources fail, and provide fallback behavior

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/**/*

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

Restart the MCP server if core logic in scripts/modules or MCP tool definitions change

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/*/[!.]*

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

scripts/modules/*/[!.]*: All command files in Task Master must import getCurrentTag from utils.js for tag-aware operations
Every CLI command that operates on tasks must include a --tag <tag> CLI option
Tag resolution must follow the priority order: explicit --tag flag, then getCurrentTag(projectRoot), then default to 'master'
Find and validate project root in commands with error handling before processing tasks

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.{js,mjs}

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

scripts/modules/task-manager/**/*.{js,mjs}: Pass context object { projectRoot, tag } to all core functions that read or write tasks
Core task functions must accept a context parameter with { projectRoot, tag } properties
Use readJSON(tasksPath, projectRoot, tag) and writeJSON(tasksPath, data, projectRoot, tag) for all task data access

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.js

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

scripts/modules/task-manager/**/*.js: AI service functions in core logic (e.g., in scripts/modules/task-manager/) must call the appropriate AI service function (e.g., generateObjectService) and pass commandName and outputType in the params object
Core logic functions must extract mainResult from aiServiceResponse and return an object that includes aiServiceResponse.telemetryData
Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.{js,ts}

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

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

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/**/*.{js,ts}

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

scripts/modules/**/*.{js,ts}: Implement silent migration for tasks.json files that transforms old format to tagged format, marking global flag and performing complete migration
Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking
When a logger object is passed as a parameter to core functions, ensure the receiving function can call methods like .info, .warn, .error on that object

Files:

  • scripts/modules/task-manager/tag-management.js
🧠 Learnings (20)
📓 Common learnings
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).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
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
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Use visual indicators to show dependency status (✅/⏱️) and format dependency lists consistently when visualizing dependencies
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use chalk.blue for informational messages, chalk.green for success messages, chalk.yellow for warnings, chalk.red for errors, chalk.cyan for prompts and highlights, and chalk.magenta for subtask-related information

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Display progress indicators using both numeric and visual representations, such as showing completed tasks count, total tasks, completion percentage, and progress bars together

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • scripts/modules/task-manager/tag-management.js
🧬 Code graph analysis (2)
tests/unit/task-manager/tag-management.test.js (6)
scripts/modules/task-manager/tag-management.js (7)
  • data (104-104)
  • data (278-278)
  • data (590-590)
  • data (845-845)
  • data (985-985)
  • data (1146-1146)
  • data (1516-1516)
scripts/modules/task-manager/add-subtask.js (1)
  • data (29-29)
mcp-server/src/core/direct-functions/expand-task.js (1)
  • data (103-103)
mcp-server/src/core/direct-functions/remove-task.js (2)
  • data (65-65)
  • result (95-98)
mcp-server/src/core/direct-functions/set-task-status.js (1)
  • result (88-96)
packages/tm-core/src/modules/storage/adapters/api-storage.ts (1)
  • listTags (397-421)
scripts/modules/task-manager/tag-management.js (2)
scripts/modules/task-manager/remove-task.js (1)
  • tasks (48-48)
tests/unit/ui.test.js (1)
  • chalk (17-17)
⏰ 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). (2)
  • GitHub Check: Test
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (6)
scripts/modules/task-manager/tag-management.js (3)

646-646: LGTM!

The readyTasks property addition is consistent with the existing completedTasks pattern and appropriately exposes the ready task count for both JSON and text output.


689-690: LGTM!

The table header updates and column width adjustments are well-implemented:

  • Headers use consistent color scheme (cyan.bold)
  • Column widths are properly calculated for both metadata views
  • Width percentages sum correctly without overflow
  • Minimum widths ensure readability

Also applies to: 703-714


734-739: LGTM!

The Ready column rendering follows established UI patterns with appropriate color coding:

  • Yellow highlights actionable ready tasks (count > 0)
  • Gray indicates no ready tasks
  • Consistent with the project's color scheme guidelines

As per coding guidelines, the color scheme aligns with the standard use of chalk.yellow for highlighting important information and chalk.gray for empty/neutral states.

tests/unit/task-manager/tag-management.test.js (3)

117-124: LGTM - test isolation is properly implemented.

The setup and teardown hooks correctly create and clean the temporary directory for each test, ensuring test isolation.


126-148: LGTM - correctly tests tasks without dependencies.

The test properly verifies that tasks with pending status and no dependencies are counted as ready, while done tasks are excluded. The logic aligns with the PR requirements.


174-199: LGTM - comprehensive status filtering test.

The test correctly verifies that only actionable statuses (pending, in-progress, review) are counted as ready, while deferred and blocked statuses are excluded. This aligns with the PR requirements.

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 b3ef99d and f6d469a.

📒 Files selected for processing (4)
  • .changeset/list-blocks-ready-filter.md (1 hunks)
  • apps/cli/src/commands/tags.command.ts (3 hunks)
  • scripts/modules/task-manager/tag-management.js (9 hunks)
  • tests/unit/task-manager/tag-management.test.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/list-blocks-ready-filter.md
🧰 Additional context used
📓 Path-based instructions (17)
**/*.js

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

**/*.js: Always use isSilentMode() function to check current silent mode status instead of directly accessing the global silentMode variable or global.silentMode
Use try/finally block pattern when wrapping core function calls with enableSilentMode/disableSilentMode to ensure silent mode is always restored, even if errors occur
For functions that need to handle both a passed silentMode parameter and check global state, check both the function parameter and global state: const isSilent = options.silentMode || (typeof options.silentMode === 'undefined' && isSilentMode())
Functions should accept their dependencies as parameters rather than using globals to promote testability and explicit dependency injection
Define callbacks as separate functions for easier testing rather than inline functions

Files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
tests/unit/**/*.js

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

Unit tests should be located in tests/unit/ and reflect the module structure with one test file per module

Files:

  • tests/unit/task-manager/tag-management.test.js
**/*.test.{js,ts}

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

**/*.test.{js,ts}: Follow the mock-first-then-import pattern for Jest mocking; use jest.spyOn() for spy functions; clear mocks between tests; verify mocks with the pattern described in tests.mdc
Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Files:

  • tests/unit/task-manager/tag-management.test.js
**/*.{js,jsx}

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

JavaScript test files using Jest must follow the same testing patterns as TypeScript files, include proper mocking of external dependencies, and achieve the same coverage thresholds

Files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
**/*.test.js

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

**/*.test.js: Never use asynchronous operations in tests. Always mock tests properly based on the way the tested functions are defined and used.
Follow Jest test file structure: 1) Imports, 2) Mock setup before importing modules under test, 3) Import modules after mocks, 4) Set up spies on mocked modules, 5) Describe suite with descriptive name, 6) Setup/teardown hooks, 7) Grouped tests for related functionality, 8) Individual test cases with clear descriptions using Arrange-Act-Assert pattern.
When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.
Use jest.mock() before any imports. Jest hoists mock calls to the top of the file. Always declare mocks before importing modules being tested. Use factory pattern for complex mocks that need access to other variables.
When testing ES modules with dynamic imports, use jest.unstable_mockModule() before await import(). Include __esModule: true in mock factories. Reset mock functions before dynamic import. Mock named and default exports as needed.
Mock file system operations using mock-fs library. Mock API calls by providing jest.fn() implementations that return expected structures. Mock environment variables in test setup.
When testing functions with callbacks: get the callback from mock's call arguments using mock.calls[index][argIndex]; execute it directly with test inputs; verify results match expectations.
For task file operations in tests: use test-specific file paths (e.g., 'test-tasks.json'); mock readJSON and writeJSON to avoid real file system interactions; verify file operations use correct paths; use different paths for each test; verify modifications on in-memory task objects passed t...

Files:

  • tests/unit/task-manager/tag-management.test.js
tests/unit/**/*.test.js

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

Locate unit tests in tests/unit/ directory. Test individual functions and utilities in isolation, mock all external dependencies, keep tests small and focused.

Files:

  • tests/unit/task-manager/tag-management.test.js
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • tests/unit/task-manager/tag-management.test.js
  • apps/cli/src/commands/tags.command.ts
  • scripts/modules/task-manager/tag-management.js
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/commands/tags.command.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/commands/tags.command.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/commands/tags.command.ts
scripts/**/*.js

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

scripts/**/*.js: Use the ContextGatherer class from scripts/modules/utils/contextGatherer.js to extract context from multiple sources (tasks, files, custom text, project tree) with token counting using gpt-tokens library
Initialize ContextGatherer with project root and tasks path, then call gather() method with tasks array, files array, customContext, includeProjectTree, format ('research', 'chat', or 'system-prompt'), and includeTokenCounts options
Use the FuzzyTaskSearch class from scripts/modules/utils/fuzzyTaskSearch.js for intelligent task discovery with semantic matching, purpose categorization, and relevance scoring using Fuse.js
Implement a three-step initialization pattern for context-aware commands: (1) validate and parse parameters, (2) initialize context gatherer and find project root, (3) auto-discover relevant tasks using fuzzy search if task IDs not specified
Display token breakdown using boxen library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title
Process AI result responses using cli-highlight library to apply syntax highlighting to code blocks with language detection in the format language\ncode
Set reasonable file size limits (50KB default) and project tree depth limits (3-5 levels) when gathering context to maintain performance
Implement graceful error handling for context gathering: handle missing files with warnings, validate task IDs with helpful messages, continue processing if some context sources fail, and provide fallback behavior

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/**/*

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

Restart the MCP server if core logic in scripts/modules or MCP tool definitions change

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/*/[!.]*

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

scripts/modules/*/[!.]*: All command files in Task Master must import getCurrentTag from utils.js for tag-aware operations
Every CLI command that operates on tasks must include a --tag <tag> CLI option
Tag resolution must follow the priority order: explicit --tag flag, then getCurrentTag(projectRoot), then default to 'master'
Find and validate project root in commands with error handling before processing tasks

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.{js,mjs}

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

scripts/modules/task-manager/**/*.{js,mjs}: Pass context object { projectRoot, tag } to all core functions that read or write tasks
Core task functions must accept a context parameter with { projectRoot, tag } properties
Use readJSON(tasksPath, projectRoot, tag) and writeJSON(tasksPath, data, projectRoot, tag) for all task data access

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.js

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

scripts/modules/task-manager/**/*.js: AI service functions in core logic (e.g., in scripts/modules/task-manager/) must call the appropriate AI service function (e.g., generateObjectService) and pass commandName and outputType in the params object
Core logic functions must extract mainResult from aiServiceResponse and return an object that includes aiServiceResponse.telemetryData
Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.{js,ts}

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

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

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/**/*.{js,ts}

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

scripts/modules/**/*.{js,ts}: Implement silent migration for tasks.json files that transforms old format to tagged format, marking global flag and performing complete migration
Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking
When a logger object is passed as a parameter to core functions, ensure the receiving function can call methods like .info, .warn, .error on that object

Files:

  • scripts/modules/task-manager/tag-management.js
🧠 Learnings (33)
📓 Common learnings
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).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done
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
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • apps/cli/src/commands/tags.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • apps/cli/src/commands/tags.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Pass context object `{ projectRoot, tag }` to all core functions that read or write tasks

Applied to files:

  • tests/unit/task-manager/tag-management.test.js
  • apps/cli/src/commands/tags.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/*/[!.]* : Every CLI command that operates on tasks must include a `--tag <tag>` CLI option

Applied to files:

  • apps/cli/src/commands/tags.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/commands.js : In CLI commands, use specified tag context or default to current tag; call appropriate core functions with options including targetTag and outputFormat parameters

Applied to files:

  • apps/cli/src/commands/tags.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-08-02T14:54:52.216Z
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.

Applied to files:

  • apps/cli/src/commands/tags.command.ts
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Initialize `ContextGatherer` with project root and tasks path, then call `gather()` method with tasks array, files array, customContext, includeProjectTree, format ('research', 'chat', or 'system-prompt'), and includeTokenCounts options

Applied to files:

  • apps/cli/src/commands/tags.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : In MCP direct functions, support explicit tag specification and use tag resolution for task data operations; default to current tag when not specified

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • scripts/modules/task-manager/tag-management.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:

  • scripts/modules/task-manager/tag-management.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/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to tasks.json : Organize tasks into separate contexts (tags) within tasks.json using tagged format: {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}} instead of legacy format {"tasks": [...]}

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/**/*.js : Log the start of execution with sanitized arguments, log successful completion with result summary including cache status, and log all error conditions with appropriate log levels

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : When calling core functions that accept an options object with mcpLog property, pass the FastMCP log object wrapped in a standard logWrapper object with info, warn, error, debug, and success methods

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to scripts/modules/*.js : When implementing MCP support for a command, ensure the core logic function can suppress console output via an outputFormat parameter or other mechanism

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use chalk.blue for informational messages, chalk.green for success messages, chalk.yellow for warnings, chalk.red for errors, chalk.cyan for prompts and highlights, and chalk.magenta for subtask-related information

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Display progress indicators using both numeric and visual representations, such as showing completed tasks count, total tasks, completion percentage, and progress bars together

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • scripts/modules/task-manager/tag-management.js
🧬 Code graph analysis (2)
apps/cli/src/commands/tags.command.ts (1)
scripts/modules/task-manager/tag-management.js (6)
  • options (49-49)
  • options (253-253)
  • options (548-552)
  • options (1125-1125)
  • options (1375-1375)
  • options (1477-1477)
scripts/modules/task-manager/tag-management.js (1)
scripts/modules/task-manager/add-task.js (1)
  • logFn (92-101)
⏰ 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: Cursor Bugbot
🔇 Additional comments (2)
apps/cli/src/commands/tags.command.ts (1)

104-112: LGTM! Clean integration of the ready filter.

The --ready option is properly integrated into the tags list command with:

  • Clear help text and example usage
  • Type-safe option parameter
  • Correct propagation to the legacy bridge function with appropriate default

The implementation follows existing patterns in the file and aligns well with the PR's goal of surfacing tasks ready for parallel execution.

Also applies to: 250-264

tests/unit/task-manager/tag-management.test.js (1)

117-292: LGTM! Comprehensive test coverage for ready task functionality.

The new test suites thoroughly validate the ready task feature:

Suite 1 (ready tasks count):

  • ✓ Tasks with no dependencies counted as ready
  • ✓ Tasks with satisfied dependencies counted correctly
  • ✓ Proper status filtering (excludes deferred/blocked, includes pending/in-progress/review)

Suite 2 (--ready filter):

  • ✓ Filters out tags with zero ready tasks
  • ✓ Includes all tags when flag is off
  • ✓ Handles empty result set correctly
  • ✓ Validates both totalTags and tags array consistency

The tests follow Jest best practices with proper setup/teardown, isolated test data, and specific assertions. They complement the feature implementation well.

@bjcoombs bjcoombs force-pushed the 1532-list-blocks-ready-filter branch from f6d469a to deaf041 Compare December 19, 2025 09:46
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

♻️ Duplicate comments (3)
scripts/modules/task-manager/tag-management.js (1)

627-656: Duplicate ready task calculation logic should be extracted to a shared utility.

This ready task filtering logic duplicates the implementation in list.command.ts (filterReadyTasks method). Both implementations:

  • Use the same actionable statuses: ['pending', 'in-progress', 'review']
  • Use the same completion statuses: ['done', 'completed', 'cancelled']
  • Apply the same dependency satisfaction check

Note: The tag-management version includes 'completed' as a terminal status while list.command.ts uses isTaskComplete() from @tm/core. This inconsistency could cause subtle behavioral differences.

🔎 Recommended approach

Extract shared constants and a utility function to a common location:

// scripts/modules/utils/task-filters.js
export const ACTIONABLE_STATUSES = ['pending', 'in-progress', 'review'];

export function getReadyTasks(tasks) {
  const completedIds = new Set(
    tasks
      .filter(t => isTaskComplete(t.status))
      .map(t => String(t.id))
  );
  
  return tasks.filter(t => {
    if (!ACTIONABLE_STATUSES.includes(t.status)) return false;
    if (!t.dependencies || t.dependencies.length === 0) return true;
    return t.dependencies.every(depId => completedIds.has(String(depId)));
  });
}

Then import and use in both files.

apps/cli/src/ui/display/tables.ts (1)

20-24: Type definition is appropriately flexible for table rendering.

The TaskTableItem type correctly uses optional blocks?: string[] to handle both enriched tasks (with blocks) and subtasks (without blocks). This is more permissive than TaskWithBlocks in list.command.ts, which is appropriate for a UI component that may receive varied inputs.

While consolidating types to a shared location would reduce duplication, the current approach is functionally correct.

apps/cli/src/commands/list.command.ts (1)

371-401: Ready filter doesn't include subtask IDs in completedIds, causing incorrect filtering.

The filterReadyTasks method only adds top-level task IDs to completedIds, but tasks can depend on subtasks (e.g., '1.1'). Compare this to the findNextTask method (lines 593-605) which correctly includes subtask IDs using the format ${t.id}.${st.id}.

If a task depends on a completed subtask, the dependency won't be found in completedIds, incorrectly marking the task as "not ready."

🔎 Proposed fix
 private filterReadyTasks(tasks: TaskWithBlocks[]): TaskWithBlocks[] {
   const actionableStatuses: TaskStatus[] = [
     'pending',
     'in-progress',
     'review'
   ];

   // Build set of completed task IDs
   const completedIds = new Set<string>();
   tasks.forEach((t) => {
     if (isTaskComplete(t.status)) {
       completedIds.add(String(t.id));
     }
+    // Include completed subtasks
+    if (t.subtasks) {
+      t.subtasks.forEach((st) => {
+        if (isTaskComplete(st.status as TaskStatus)) {
+          completedIds.add(`${t.id}.${st.id}`);
+        }
+      });
+    }
   });

   return tasks.filter((task) => {
     if (!actionableStatuses.includes(task.status)) {
       return false;
     }

     if (!task.dependencies || task.dependencies.length === 0) {
       return true;
     }

     return task.dependencies.every((depId) =>
       completedIds.has(String(depId))
     );
   });
 }
🧹 Nitpick comments (2)
apps/cli/src/ui/display/tables.ts (1)

47-91: Column width calculation is thorough but could be simplified.

The explicit width arrays for each optional column count (0, 1, 2, 3) work correctly but are verbose. Consider extracting to a configuration object or computing dynamically. However, this is a minor maintainability concern and the current implementation is correct.

apps/cli/tests/unit/commands/list.command.spec.ts (1)

209-250: Consider adding a test for subtask dependencies.

The current tests don't cover the case where a task depends on a subtask (e.g., dependencies: ['1.1']). Given the bug identified in filterReadyTasks where subtask IDs aren't added to completedIds, adding such a test would help verify the fix.

🔎 Suggested test case
it('should correctly handle subtask dependencies', async () => {
  const command = new ListTasksCommand();

  const mockTasks = [
    { 
      id: '1', 
      title: 'Parent Task', 
      status: 'in-progress', 
      dependencies: [],
      subtasks: [
        { id: '1', title: 'Subtask 1', status: 'done', dependencies: [] }
      ]
    },
    { 
      id: '2', 
      title: 'Task 2', 
      status: 'pending', 
      dependencies: ['1.1'] // depends on completed subtask
    }
  ];

  // ... mock setup ...

  await (command as any).executeCommand({
    ready: true,
    json: true
  });

  const output = consoleLogSpy.mock.calls[0][0];
  const parsed = JSON.parse(output);

  // Task 2 should be ready since subtask 1.1 is done
  expect(parsed.tasks.map((t: any) => t.id)).toContain('2');
});
📜 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 f6d469a and deaf041.

📒 Files selected for processing (7)
  • .changeset/list-blocks-ready-filter.md (1 hunks)
  • apps/cli/src/commands/list.command.ts (5 hunks)
  • apps/cli/src/commands/tags.command.ts (3 hunks)
  • apps/cli/src/ui/display/tables.ts (4 hunks)
  • apps/cli/tests/unit/commands/list.command.spec.ts (3 hunks)
  • scripts/modules/task-manager/tag-management.js (9 hunks)
  • tests/unit/task-manager/tag-management.test.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • .changeset/list-blocks-ready-filter.md
  • apps/cli/src/commands/tags.command.ts
  • tests/unit/task-manager/tag-management.test.js
🧰 Additional context used
📓 Path-based instructions (16)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
**/*.spec.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Place package and app test files in packages/<package-name>/src/<module>/<file>.spec.ts or apps/<app-name>/src/<module>/<file>.spec.ts alongside source files

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{spec,test}.ts: Always use .ts for TypeScript tests, never .js
NEVER use async/await in test functions unless testing actual asynchronous operations; use synchronous top-level imports instead of dynamic await import()

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
apps/cli/**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.js

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

**/*.js: Always use isSilentMode() function to check current silent mode status instead of directly accessing the global silentMode variable or global.silentMode
Use try/finally block pattern when wrapping core function calls with enableSilentMode/disableSilentMode to ensure silent mode is always restored, even if errors occur
For functions that need to handle both a passed silentMode parameter and check global state, check both the function parameter and global state: const isSilent = options.silentMode || (typeof options.silentMode === 'undefined' && isSilentMode())
Functions should accept their dependencies as parameters rather than using globals to promote testability and explicit dependency injection
Define callbacks as separate functions for easier testing rather than inline functions

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/**/*.js

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

scripts/**/*.js: Use the ContextGatherer class from scripts/modules/utils/contextGatherer.js to extract context from multiple sources (tasks, files, custom text, project tree) with token counting using gpt-tokens library
Initialize ContextGatherer with project root and tasks path, then call gather() method with tasks array, files array, customContext, includeProjectTree, format ('research', 'chat', or 'system-prompt'), and includeTokenCounts options
Use the FuzzyTaskSearch class from scripts/modules/utils/fuzzyTaskSearch.js for intelligent task discovery with semantic matching, purpose categorization, and relevance scoring using Fuse.js
Implement a three-step initialization pattern for context-aware commands: (1) validate and parse parameters, (2) initialize context gatherer and find project root, (3) auto-discover relevant tasks using fuzzy search if task IDs not specified
Display token breakdown using boxen library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title
Process AI result responses using cli-highlight library to apply syntax highlighting to code blocks with language detection in the format language\ncode
Set reasonable file size limits (50KB default) and project tree depth limits (3-5 levels) when gathering context to maintain performance
Implement graceful error handling for context gathering: handle missing files with warnings, validate task IDs with helpful messages, continue processing if some context sources fail, and provide fallback behavior

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/**/*

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

Restart the MCP server if core logic in scripts/modules or MCP tool definitions change

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/*/[!.]*

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

scripts/modules/*/[!.]*: All command files in Task Master must import getCurrentTag from utils.js for tag-aware operations
Every CLI command that operates on tasks must include a --tag <tag> CLI option
Tag resolution must follow the priority order: explicit --tag flag, then getCurrentTag(projectRoot), then default to 'master'
Find and validate project root in commands with error handling before processing tasks

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.{js,mjs}

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

scripts/modules/task-manager/**/*.{js,mjs}: Pass context object { projectRoot, tag } to all core functions that read or write tasks
Core task functions must accept a context parameter with { projectRoot, tag } properties
Use readJSON(tasksPath, projectRoot, tag) and writeJSON(tasksPath, data, projectRoot, tag) for all task data access

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.js

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

scripts/modules/task-manager/**/*.js: AI service functions in core logic (e.g., in scripts/modules/task-manager/) must call the appropriate AI service function (e.g., generateObjectService) and pass commandName and outputType in the params object
Core logic functions must extract mainResult from aiServiceResponse and return an object that includes aiServiceResponse.telemetryData
Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Files:

  • scripts/modules/task-manager/tag-management.js
**/*.{js,jsx}

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

JavaScript test files using Jest must follow the same testing patterns as TypeScript files, include proper mocking of external dependencies, and achieve the same coverage thresholds

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.{js,ts}

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

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

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/**/*.{js,ts}

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

scripts/modules/**/*.{js,ts}: Implement silent migration for tasks.json files that transforms old format to tagged format, marking global flag and performing complete migration
Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking
When a logger object is passed as a parameter to core functions, ensure the receiving function can call methods like .info, .warn, .error on that object

Files:

  • scripts/modules/task-manager/tag-management.js
🧠 Learnings (74)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
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).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The tasks.json file should use a tagged task lists structure with multiple named task lists as top-level keys (e.g., {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}}), supporting backward compatibility through silent migration from legacy {"tasks": [...]} format

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent and convert between formats appropriately when needed, avoiding circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.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 : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • apps/cli/src/commands/list.command.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 : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.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 : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/commands/list.command.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 : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Detect circular dependencies using DFS and validate task references before operations

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Respect dependency chains and task priorities when selecting work

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Select tasks based on dependencies (all marked 'done'), priority level, and ID order

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Include all required task properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) in each task object without adding extra properties outside the standard schema

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Display progress indicators using both numeric and visual representations, such as showing completed tasks count, total tasks, completion percentage, and progress bars together

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Don't include task manipulations within UI functions; avoid creating circular dependencies with other modules

Applied to files:

  • apps/cli/src/commands/list.command.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:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Do not duplicate task ID formatting logic across modules - centralize formatting utilities

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-09-03T12:16:15.866Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/package.json:13-64
Timestamp: 2025-09-03T12:16:15.866Z
Learning: For internal packages in the claude-task-master project, Crunchyman-ralph prefers pointing package.json "types" entries to src .ts files rather than dist .d.ts files for better developer experience (DX), as the packages are not being exported as SDKs.

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Use visual indicators to show dependency status (✅/⏱️) and format dependency lists consistently when visualizing dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Format dependency lists consistently for visualization

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/cli/**/*.{spec,test}.ts : In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : For task file operations in tests: use test-specific file paths (e.g., 'test-tasks.json'); mock `readJSON` and `writeJSON` to avoid real file system interactions; verify file operations use correct paths; use different paths for each test; verify modifications on in-memory task objects passed to `writeJSON`.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to packages/tm-core/**/*.{spec,test}.ts : In unit tests for tm/core, mock only external I/O (Supabase, APIs, filesystem) and use real internal services

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing UI functions: mock console output and verify correct formatting; test conditional output logic; use `toContain()` or `toMatch()` rather than exact `toBe()` for strings with emojis or formatting; create separate tests for different behavior modes; test structure of formatted output rather than exact string matching.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to **/tests/integration/**/*.{spec,test}.ts : In integration tests, use real tm-core and mock only external boundaries (APIs, DB, filesystem)

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.test.ts : Unit tests must follow the describe/it pattern, use beforeEach for mock setup with jest.clearAllMocks(), include specific assertions with expect(), and test both success and error scenarios including edge cases

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/teardown.ts : Global teardown file must be created to handle cleanup after all tests complete and prevent worker process leaks

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/setup.ts : Create global test setup file that configures jest.setTimeout(10000), clears all mocks after each test with jest.clearAllMocks(), and initializes global test configuration

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/mcp/**/*.{spec,test}.ts : In unit tests for apps/mcp, mock tm-core responses but use real MCP framework to test response formatting

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Use established mocking patterns from auth.test.ts as templates: mock bcrypt with proper TypeScript typing, mock Prisma client with transaction support, and always clear mocks between tests

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.integration.test.ts : Integration tests must use supertest for API endpoint testing, verify database state changes after operations, clean test data before each test, and include full request/response validation with expected HTTP status codes

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-12-11T14:45:14.973Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Use task status values: 'pending', 'in-progress', 'done', 'deferred', 'cancelled', or 'blocked'

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : Mock file system operations using `mock-fs` library. Mock API calls by providing jest.fn() implementations that return expected structures. Mock environment variables in test setup.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/task-manager.js : Data manipulation features (create, read, update, delete tasks) should be placed in `task-manager.js` and follow guidelines in `tasks.mdc`

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Pass context object `{ projectRoot, tag }` to all core functions that read or write tasks

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Initialize `ContextGatherer` with project root and tasks path, then call `gather()` method with tasks array, files array, customContext, includeProjectTree, format ('research', 'chat', or 'system-prompt'), and includeTokenCounts options

Applied to files:

  • scripts/modules/task-manager/tag-management.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:

  • scripts/modules/task-manager/tag-management.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/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/commands.js : In CLI commands, use specified tag context or default to current tag; call appropriate core functions with options including targetTag and outputFormat parameters

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to tasks.json : Organize tasks into separate contexts (tags) within tasks.json using tagged format: {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}} instead of legacy format {"tasks": [...]}

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/**/*.js : Log the start of execution with sanitized arguments, log successful completion with result summary including cache status, and log all error conditions with appropriate log levels

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : When calling core functions that accept an options object with mcpLog property, pass the FastMCP log object wrapped in a standard logWrapper object with info, warn, error, debug, and success methods

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to scripts/modules/*.js : When implementing MCP support for a command, ensure the core logic function can suppress console output via an outputFormat parameter or other mechanism

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use chalk.blue for informational messages, chalk.green for success messages, chalk.yellow for warnings, chalk.red for errors, chalk.cyan for prompts and highlights, and chalk.magenta for subtask-related information

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • scripts/modules/task-manager/tag-management.js
🧬 Code graph analysis (4)
apps/cli/src/commands/list.command.ts (3)
packages/tm-core/src/common/types/index.ts (2)
  • Task (131-159)
  • TaskStatus (20-28)
scripts/modules/dependency-manager.js (1)
  • depIdStr (1342-1342)
packages/tm-core/src/common/constants/index.ts (1)
  • isTaskComplete (68-70)
apps/cli/src/ui/display/tables.ts (1)
packages/tm-core/src/common/types/index.ts (1)
  • Subtask (165-169)
apps/cli/tests/unit/commands/list.command.spec.ts (1)
apps/cli/src/commands/list.command.ts (1)
  • ListTasksCommand (77-726)
scripts/modules/task-manager/tag-management.js (1)
scripts/modules/task-manager/add-task.js (1)
  • logFn (92-101)
⏰ 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). (2)
  • GitHub Check: Test
  • GitHub Check: Cursor Bugbot

@bjcoombs bjcoombs force-pushed the 1532-list-blocks-ready-filter branch from deaf041 to 59d4242 Compare December 19, 2025 19:53
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

♻️ Duplicate comments (3)
scripts/modules/task-manager/tag-management.js (1)

627-656: Ready task calculation logic is duplicated and may have status inconsistency.

This ready-task filtering logic duplicates similar calculations in apps/cli/src/commands/list.command.ts. A past review comment already flagged this for extraction to a shared utility.

Additionally, the status check includes 'completed' (line 633), but per project guidelines, the valid statuses are: 'pending', 'in-progress', 'done', 'deferred', 'cancelled', 'blocked', and 'review'. The 'completed' status may be legacy or invalid.

🔎 Recommended fix

Remove the redundant 'completed' status check to align with valid statuses:

 const completedIds = new Set(
   tasks
     .filter(
       (t) =>
-        t.status === 'done' ||
-        t.status === 'completed' ||
-        t.status === 'cancelled'
+        t.status === 'done' || t.status === 'cancelled'
     )
     .map((t) => String(t.id))
 );

Consider extracting this logic to a shared utility as suggested in the prior review.

apps/cli/src/ui/display/tables.ts (1)

20-24: Type definition differs from list.command.ts.

This file defines TaskTableItem = (Task | Subtask) & { blocks?: string[] } with optional blocks, while list.command.ts defines TaskWithBlocks = Task & { blocks: string[] } with required blocks.

The more flexible optional definition here is appropriate for the table renderer since it can handle both enriched and non-enriched inputs. However, a past review comment suggested consolidating these types to a shared location.

Consider moving the type to a shared location (e.g., apps/cli/src/types/task-types.ts) to avoid divergence.

apps/cli/src/commands/list.command.ts (1)

368-409: Subtask dependencies not handled in filterReadyTasks.

The filterReadyTasks method only adds top-level task IDs to completedIds, but dependencies can reference subtasks using dot notation (e.g., '1.1'). If a task depends on a completed subtask, that dependency won't be recognized as satisfied.

The findNextTask method (lines 593-605) correctly handles subtask IDs by adding ${t.id}.${st.id} to completedIds. The same pattern should be applied here.

🔎 Recommended fix
 private filterReadyTasks(tasks: TaskWithBlocks[]): TaskWithBlocks[] {
   const actionableStatuses: TaskStatus[] = [
     'pending',
     'in-progress',
     'review'
   ];

   // Build set of completed task IDs
   const completedIds = new Set<string>();
   tasks.forEach((t) => {
     if (isTaskComplete(t.status)) {
       completedIds.add(String(t.id));
     }
+    // Also add completed subtask IDs
+    if (t.subtasks) {
+      t.subtasks.forEach((st) => {
+        if (isTaskComplete(st.status as TaskStatus)) {
+          completedIds.add(`${t.id}.${st.id}`);
+        }
+      });
+    }
   });
🧹 Nitpick comments (2)
scripts/modules/task-manager/tag-management.js (1)

718-728: Consider adjusting column width proportions for better readability.

The column widths for the metadata view (showMetadata = true) allocate 8% each to Tasks, Ready, and Done, which may be tight for headers. The current proportions sum to 98%, leaving minimal margin.

This is a minor UX concern; the layout should still work but could be tested on narrower terminals.

apps/cli/tests/unit/commands/list.command.spec.ts (1)

8-10: Local constant shadows mock export.

TERMINAL_COMPLETE_STATUSES is defined at module scope (line 9) and also exported from the mocked @tm/core (line 33). The local constant is used by the isTaskComplete mock implementations. This works but is slightly fragile—if the local constant's order differs from the real export, tests could pass but production could fail.

Consider defining this once and reusing it in all mocks for consistency, or simply inline the array in each mock since it's small.

📜 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 deaf041 and 59d4242.

📒 Files selected for processing (7)
  • .changeset/list-blocks-ready-filter.md (1 hunks)
  • apps/cli/src/commands/list.command.ts (5 hunks)
  • apps/cli/src/commands/tags.command.ts (3 hunks)
  • apps/cli/src/ui/display/tables.ts (4 hunks)
  • apps/cli/tests/unit/commands/list.command.spec.ts (3 hunks)
  • scripts/modules/task-manager/tag-management.js (9 hunks)
  • tests/unit/task-manager/tag-management.test.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/cli/src/commands/tags.command.ts
  • .changeset/list-blocks-ready-filter.md
  • tests/unit/task-manager/tag-management.test.js
🧰 Additional context used
📓 Path-based instructions (16)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
**/*.spec.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Place package and app test files in packages/<package-name>/src/<module>/<file>.spec.ts or apps/<app-name>/src/<module>/<file>.spec.ts alongside source files

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{spec,test}.ts: Always use .ts for TypeScript tests, never .js
NEVER use async/await in test functions unless testing actual asynchronous operations; use synchronous top-level imports instead of dynamic await import()

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
apps/cli/**/*.{spec,test}.ts

📄 CodeRabbit inference engine (CLAUDE.md)

In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
**/*.js

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

**/*.js: Always use isSilentMode() function to check current silent mode status instead of directly accessing the global silentMode variable or global.silentMode
Use try/finally block pattern when wrapping core function calls with enableSilentMode/disableSilentMode to ensure silent mode is always restored, even if errors occur
For functions that need to handle both a passed silentMode parameter and check global state, check both the function parameter and global state: const isSilent = options.silentMode || (typeof options.silentMode === 'undefined' && isSilentMode())
Functions should accept their dependencies as parameters rather than using globals to promote testability and explicit dependency injection
Define callbacks as separate functions for easier testing rather than inline functions

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/**/*.js

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

scripts/**/*.js: Use the ContextGatherer class from scripts/modules/utils/contextGatherer.js to extract context from multiple sources (tasks, files, custom text, project tree) with token counting using gpt-tokens library
Initialize ContextGatherer with project root and tasks path, then call gather() method with tasks array, files array, customContext, includeProjectTree, format ('research', 'chat', or 'system-prompt'), and includeTokenCounts options
Use the FuzzyTaskSearch class from scripts/modules/utils/fuzzyTaskSearch.js for intelligent task discovery with semantic matching, purpose categorization, and relevance scoring using Fuse.js
Implement a three-step initialization pattern for context-aware commands: (1) validate and parse parameters, (2) initialize context gatherer and find project root, (3) auto-discover relevant tasks using fuzzy search if task IDs not specified
Display token breakdown using boxen library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title
Process AI result responses using cli-highlight library to apply syntax highlighting to code blocks with language detection in the format language\ncode
Set reasonable file size limits (50KB default) and project tree depth limits (3-5 levels) when gathering context to maintain performance
Implement graceful error handling for context gathering: handle missing files with warnings, validate task IDs with helpful messages, continue processing if some context sources fail, and provide fallback behavior

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/**/*

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

Restart the MCP server if core logic in scripts/modules or MCP tool definitions change

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/*/[!.]*

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

scripts/modules/*/[!.]*: All command files in Task Master must import getCurrentTag from utils.js for tag-aware operations
Every CLI command that operates on tasks must include a --tag <tag> CLI option
Tag resolution must follow the priority order: explicit --tag flag, then getCurrentTag(projectRoot), then default to 'master'
Find and validate project root in commands with error handling before processing tasks

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.{js,mjs}

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

scripts/modules/task-manager/**/*.{js,mjs}: Pass context object { projectRoot, tag } to all core functions that read or write tasks
Core task functions must accept a context parameter with { projectRoot, tag } properties
Use readJSON(tasksPath, projectRoot, tag) and writeJSON(tasksPath, data, projectRoot, tag) for all task data access

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.js

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

scripts/modules/task-manager/**/*.js: AI service functions in core logic (e.g., in scripts/modules/task-manager/) must call the appropriate AI service function (e.g., generateObjectService) and pass commandName and outputType in the params object
Core logic functions must extract mainResult from aiServiceResponse and return an object that includes aiServiceResponse.telemetryData
Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Files:

  • scripts/modules/task-manager/tag-management.js
**/*.{js,jsx}

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

JavaScript test files using Jest must follow the same testing patterns as TypeScript files, include proper mocking of external dependencies, and achieve the same coverage thresholds

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/task-manager/**/*.{js,ts}

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

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

Files:

  • scripts/modules/task-manager/tag-management.js
scripts/modules/**/*.{js,ts}

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

scripts/modules/**/*.{js,ts}: Implement silent migration for tasks.json files that transforms old format to tagged format, marking global flag and performing complete migration
Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking
When a logger object is passed as a parameter to core functions, ensure the receiving function can call methods like .info, .warn, .error on that object

Files:

  • scripts/modules/task-manager/tag-management.js
🧠 Learnings (77)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
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).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The tasks.json file should use a tagged task lists structure with multiple named task lists as top-level keys (e.g., {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}}), supporting backward compatibility through silent migration from legacy {"tasks": [...]} format

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent and convert between formats appropriately when needed, avoiding circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.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 : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • apps/cli/src/commands/list.command.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 : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.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 : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/commands/list.command.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 : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/tests/unit/commands/list.command.spec.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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Detect circular dependencies using DFS and validate task references before operations

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Respect dependency chains and task priorities when selecting work

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Select tasks based on dependencies (all marked 'done'), priority level, and ID order

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Include all required task properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) in each task object without adding extra properties outside the standard schema

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Display progress indicators using both numeric and visual representations, such as showing completed tasks count, total tasks, completion percentage, and progress bars together

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Don't include task manipulations within UI functions; avoid creating circular dependencies with other modules

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Do not duplicate task ID formatting logic across modules - centralize formatting utilities

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-09-03T12:16:15.866Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/package.json:13-64
Timestamp: 2025-09-03T12:16:15.866Z
Learning: For internal packages in the claude-task-master project, Crunchyman-ralph prefers pointing package.json "types" entries to src .ts files rather than dist .d.ts files for better developer experience (DX), as the packages are not being exported as SDKs.

Applied to files:

  • apps/cli/src/ui/display/tables.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:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Use visual indicators to show dependency status (✅/⏱️) and format dependency lists consistently when visualizing dependencies

Applied to files:

  • apps/cli/src/ui/display/tables.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 : Format dependency lists consistently for visualization

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing CLI commands built with Commander.js: test command action handlers directly rather than mocking the entire Commander chain; create simplified test-specific implementations of command handlers; explicitly handle all options including defaults and shorthand flags; include null/undefined checks for optional parameters; use fixtures for consistent sample data.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/cli/**/*.{spec,test}.ts : In unit tests for apps/cli, mock tm-core responses but use real Commander/chalk/inquirer/other npm packages to test display logic

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : For task file operations in tests: use test-specific file paths (e.g., 'test-tasks.json'); mock `readJSON` and `writeJSON` to avoid real file system interactions; verify file operations use correct paths; use different paths for each test; verify modifications on in-memory task objects passed to `writeJSON`.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to tests.mdc for guidelines on implementing and maintaining tests for Task Master CLI

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : When testing UI functions: mock console output and verify correct formatting; test conditional output logic; use `toContain()` or `toMatch()` rather than exact `toBe()` for strings with emojis or formatting; create separate tests for different behavior modes; test structure of formatted output rather than exact string matching.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to package.json : package.json scripts must include: 'test', 'test:watch', 'test:coverage', 'test:unit', 'test:integration', 'test:e2e', and 'test:ci' commands for testing framework integration

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.test.ts : Unit tests must follow the describe/it pattern, use beforeEach for mock setup with jest.clearAllMocks(), include specific assertions with expect(), and test both success and error scenarios including edge cases

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to packages/tm-core/**/*.{spec,test}.ts : In unit tests for tm/core, mock only external I/O (Supabase, APIs, filesystem) and use real internal services

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to **/tests/integration/**/*.{spec,test}.ts : In integration tests, use real tm-core and mock only external boundaries (APIs, DB, filesystem)

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/teardown.ts : Global teardown file must be created to handle cleanup after all tests complete and prevent worker process leaks

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to tests/setup.ts : Create global test setup file that configures jest.setTimeout(10000), clears all mocks after each test with jest.clearAllMocks(), and initializes global test configuration

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T22:09:45.455Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T22:09:45.455Z
Learning: Applies to apps/mcp/**/*.{spec,test}.ts : In unit tests for apps/mcp, mock tm-core responses but use real MCP framework to test response formatting

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Use established mocking patterns from auth.test.ts as templates: mock bcrypt with proper TypeScript typing, mock Prisma client with transaction support, and always clear mocks between tests

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:13.456Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/test_workflow.mdc:0-0
Timestamp: 2025-11-24T18:03:13.456Z
Learning: Applies to **/*.integration.test.ts : Integration tests must use supertest for API endpoint testing, verify database state changes after operations, clean test data before each test, and include full request/response validation with expected HTTP status codes

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-12-11T14:45:14.973Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Use task status values: 'pending', 'in-progress', 'done', 'deferred', 'cancelled', or 'blocked'

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:03:46.713Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-11-24T18:03:46.713Z
Learning: Applies to **/*.test.js : Mock file system operations using `mock-fs` library. Mock API calls by providing jest.fn() implementations that return expected structures. Mock environment variables in test setup.

Applied to files:

  • apps/cli/tests/unit/commands/list.command.spec.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : In MCP direct functions, support explicit tag specification and use tag resolution for task data operations; default to current tag when not specified

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/task-manager.js : Data manipulation features (create, read, update, delete tasks) should be placed in `task-manager.js` and follow guidelines in `tasks.mdc`

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Pass context object `{ projectRoot, tag }` to all core functions that read or write tasks

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Initialize `ContextGatherer` with project root and tasks path, then call `gather()` method with tasks array, files array, customContext, includeProjectTree, format ('research', 'chat', or 'system-prompt'), and includeTokenCounts options

Applied to files:

  • scripts/modules/task-manager/tag-management.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:

  • scripts/modules/task-manager/tag-management.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/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/commands.js : In CLI commands, use specified tag context or default to current tag; call appropriate core functions with options including targetTag and outputFormat parameters

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to tasks.json : Organize tasks into separate contexts (tags) within tasks.json using tagged format: {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}} instead of legacy format {"tasks": [...]}

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/**/*.js : Log the start of execution with sanitized arguments, log successful completion with result summary including cache status, and log all error conditions with appropriate log levels

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : When calling core functions that accept an options object with mcpLog property, pass the FastMCP log object wrapped in a standard logWrapper object with info, warn, error, debug, and success methods

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:01:06.077Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/mcp.mdc:0-0
Timestamp: 2025-11-24T18:01:06.077Z
Learning: Applies to scripts/modules/*.js : When implementing MCP support for a command, ensure the core logic function can suppress console output via an outputFormat parameter or other mechanism

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use chalk.blue for informational messages, chalk.green for success messages, chalk.yellow for warnings, chalk.red for errors, chalk.cyan for prompts and highlights, and chalk.magenta for subtask-related information

Applied to files:

  • scripts/modules/task-manager/tag-management.js
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • scripts/modules/task-manager/tag-management.js
🧬 Code graph analysis (3)
apps/cli/src/ui/display/tables.ts (1)
packages/tm-core/src/common/types/index.ts (1)
  • Subtask (165-169)
apps/cli/tests/unit/commands/list.command.spec.ts (1)
apps/cli/src/commands/list.command.ts (1)
  • ListTasksCommand (77-726)
scripts/modules/task-manager/tag-management.js (3)
scripts/modules/task-manager/set-task-status.js (1)
  • options (33-33)
mcp-server/src/core/direct-functions/fix-dependencies.js (1)
  • options (56-56)
scripts/modules/task-manager/add-task.js (1)
  • logFn (92-101)
⏰ 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). (2)
  • GitHub Check: Test
  • GitHub Check: Cursor Bugbot

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

♻️ Duplicate comments (1)
apps/cli/src/commands/list.command.ts (1)

371-402: Critical: Subtask completion not tracked in ready filter.

The completedIds set only includes top-level task IDs (line 383), but tasks can have dependencies on subtasks using dot notation (e.g., "1.1"). When a task depends on a completed subtask, the dependency won't be recognized as satisfied, causing the task to be incorrectly excluded from --ready results.

Compare with findNextTask (lines 605-611), which correctly handles subtasks by adding ${t.id}.${st.id} to the completed set.

🔎 Proposed fix
 		// Build set of completed task IDs
 		const completedIds = new Set<string>();
 		tasks.forEach((t) => {
 			if (isTaskComplete(t.status)) {
 				completedIds.add(String(t.id));
 			}
+			// Include completed subtasks
+			if (t.subtasks) {
+				t.subtasks.forEach((st) => {
+					if (isTaskComplete(st.status as TaskStatus)) {
+						completedIds.add(`${t.id}.${st.id}`);
+					}
+				});
+			}
 		});

Based on learnings: Task dependencies can reference subtasks using dot notation (e.g., "1.2"), and dependency checks must handle both top-level and subtask IDs.

🧹 Nitpick comments (1)
apps/cli/src/commands/list.command.ts (1)

371-409: Consider moving filter logic to @tm/core for reusability.

The filterReadyTasks and filterBlockingTasks methods implement business logic that could be useful in other contexts (e.g., the extension, API endpoints). Per coding guidelines stating "CLI should be a thin presentation layer that calls tm-core methods," consider moving these filters to @tm/core for better separation of concerns and reusability.

This would also make the filters available to other consumers of the core library without duplicating the logic.

As per coding guidelines: CLI should be a thin presentation layer over @tm/core.

📜 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 59d4242 and 23f1a80.

📒 Files selected for processing (1)
  • apps/cli/src/commands/list.command.ts (5 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/commands/list.command.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/commands/list.command.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/commands/list.command.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/commands/list.command.ts
🧠 Learnings (41)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
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).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The tasks.json file should use a tagged task lists structure with multiple named task lists as top-level keys (e.g., {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}}), supporting backward compatibility through silent migration from legacy {"tasks": [...]} format

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent and convert between formats appropriately when needed, avoiding circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/commands/list.command.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 : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • apps/cli/src/commands/list.command.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 : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/commands/list.command.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 : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/src/commands/list.command.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 : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/src/commands/list.command.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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Detect circular dependencies using DFS and validate task references before operations

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Respect dependency chains and task priorities when selecting work

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Select tasks based on dependencies (all marked 'done'), priority level, and ID order

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Provide next step suggestions after command completion using a consistent format with a boxen container displaying suggested commands using chalk formatting

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:49.782Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.782Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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 boxen for important success messages with clear formatting, provide suggested next steps after command completion, and include ready-to-use commands for follow-up actions.

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/commands/list.command.ts
⏰ 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). (2)
  • GitHub Check: Test
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (6)
apps/cli/src/commands/list.command.ts (6)

53-60: LGTM: Clean type definitions for new feature.

The ready and blocking options are properly typed, and the TaskWithBlocks type correctly extends Task with the blocks field. The type system now accurately reflects the runtime data structure.


287-340: Well-structured deferred filtering logic.

The implementation correctly handles the interaction between status filtering and ready/blocking filters by:

  1. Fetching all tasks when needsAllTasks is true (skipping the status filter)
  2. Computing blocks and applying ready/blocking filters with full task context
  3. Re-applying the status filter afterward if it was deferred

This ensures dependency completion checks have access to all task states, preventing false negatives.


345-366: LGTM: Correct inverse dependency computation.

The buildBlocksMap implementation correctly inverts the dependency graph by:

  1. Initializing all task IDs with empty arrays
  2. For each dependency, adding the dependent task to the dependency's blocks list

The fallback to an empty array (line 358) handles cases where dependencies reference tasks not in the current set.


407-409: LGTM: Clean blocking filter.

The implementation correctly identifies blocking tasks by checking for non-empty blocks arrays. Simple and effective.


533-577: LGTM: Appropriate conditional rendering.

The code correctly suppresses dashboards and next-task recommendations when --ready or --blocking filters are active. This prevents displaying misleading statistics computed from filtered subsets and avoids redundant recommendations when users have already specified what they want to see.


304-308: The code correctly filters tasks by tag. Dependencies must reference existing task IDs within the same tag, so cross-tag dependency concerns do not apply here. Tag filtering is intentional for maintaining isolated task contexts.

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

♻️ Duplicate comments (4)
apps/cli/src/commands/list.command.ts (3)

371-398: Cross-tag dependencies may not be handled correctly.

When fetching tasks per-tag, the filterReadyTasks call only sees tasks from that specific tag. If cross-tag dependencies exist (e.g., a task in "feature-a" depending on a task in "master"), the dependency won't be recognized as satisfied since completedIds is built per-tag.

Based on learnings, tasks are always within a tag context, so this may be acceptable if cross-tag dependencies aren't supported. Please verify whether cross-tag dependencies are a valid use case.


58-66: Type duplication with tables.ts.

TaskWithBlocks is defined here with required blocks, while TaskTableItem in tables.ts has optional blocks. This duplication was flagged in a previous review. Consider consolidating into a shared types file.


463-469: Subtask dependencies not tracked in completedIds.

The completedIds set only includes top-level task IDs, but ignores subtasks. If a task has a dependency on a completed subtask (e.g., "2.1"), it won't be recognized as satisfied. Compare with findNextTask (lines 690-702) which correctly handles this.

🔎 Suggested fix
 		// Build set of completed task IDs
 		const completedIds = new Set<string>();
 		tasks.forEach((t) => {
 			if (isTaskComplete(t.status)) {
 				completedIds.add(String(t.id));
 			}
+			// Also track completed subtasks
+			if (t.subtasks) {
+				t.subtasks.forEach((st) => {
+					if (isTaskComplete(st.status as TaskStatus)) {
+						completedIds.add(`${t.id}.${st.id}`);
+					}
+				});
+			}
 		});
apps/cli/src/ui/display/tables.ts (1)

20-24: Fix Biome formatting error.

The pipeline is failing due to a formatting issue on this type definition. Run biome format --write to fix.

Additionally, this type duplicates TaskWithBlocks from list.command.ts but with different semantics (optional blocks vs required). As noted in previous review, consider consolidating these types in a shared location.

🧹 Nitpick comments (3)
apps/cli/src/ui/display/tables.ts (2)

49-105: Consider simplifying column width configuration.

The branching logic for 0-4 optional columns works correctly but is verbose. A lookup table or configuration object could reduce duplication and make it easier to maintain.

🔎 Example simplification
const WIDTH_CONFIGS: Record<number, number[]> = {
};
const baseColWidths = (WIDTH_CONFIGS[optionalCols] || WIDTH_CONFIGS[4])
  .map(pct => Math.floor(tableWidth * pct));

180-194: Unnecessary type cast.

The cast task as TaskTableItem on line 182 is redundant since task is already typed as TaskTableItem from the function parameter. This can be removed.

🔎 Suggested fix
 		if (showBlocks) {
 			// Show tasks that depend on this one
-			const taskWithBlocks = task as TaskTableItem;
-			if (!taskWithBlocks.blocks || taskWithBlocks.blocks.length === 0) {
+			if (!task.blocks || task.blocks.length === 0) {
 				row.push(chalk.gray('-'));
 			} else {
 				// Gray out blocks for completed tasks (no longer blocking)
-				const blocksText = taskWithBlocks.blocks.join(', ');
+				const blocksText = task.blocks.join(', ');
 				row.push(
 					isTaskComplete(task.status)
 						? chalk.gray(blocksText)
 						: chalk.yellow(blocksText)
 				);
 			}
 		}
apps/cli/src/commands/list.command.ts (1)

391-397: Redundant tagName mapping.

The tagName property is already added to enrichedTasks on line 388, and filterReadyTasks preserves it. The spread operation on lines 395-397 redundantly overwrites tagName with the same value.

🔎 Suggested fix
 			// Apply ready filter to this tag's tasks
 			const readyTasks = this.filterReadyTasks(enrichedTasks);

 			// Add tag name to each task and collect
-			allTaggedTasks.push(
-				...readyTasks.map((task) => ({ ...task, tagName }))
-			);
+			allTaggedTasks.push(...readyTasks);
📜 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 69dd310 and 00dd882.

📒 Files selected for processing (3)
  • .changeset/list-blocks-ready-filter.md
  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/list-blocks-ready-filter.md
🧰 Additional context used
📓 Path-based instructions (4)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
🧠 Learnings (54)
📓 Common learnings
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).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Applies to assets/.claude/settings.json : Add Claude Code tool allowlist configuration in `.claude/settings.json` to include 'Edit', 'Bash(task-master *)', 'Bash(git commit:*)', 'Bash(git add:*)', 'Bash(npm run *)', and 'mcp__task_master_ai__*'
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : In MCP direct functions, support explicit tag specification and use tag resolution for task data operations; default to current tag when not specified
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/*/[!.]* : Every CLI command that operates on tasks must include a `--tag <tag>` CLI option
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts
Learnt from: mm-parthy
Repo: eyaltoledano/claude-task-master PR: 943
File: scripts/modules/task-manager/list-tasks.js:0-0
Timestamp: 2025-07-18T08:29:52.384Z
Learning: TODO comments about adding tag support to internal functions like readComplexityReport are obsolete in the boundary-first tag resolution pattern because report paths are already resolved at the CLI command boundary layer before reaching these functions.
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The tasks.json file should use a tagged task lists structure with multiple named task lists as top-level keys (e.g., {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}}), supporting backward compatibility through silent migration from legacy {"tasks": [...]} format

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to tasks.json : Organize tasks into separate contexts (tags) within tasks.json using tagged format: {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}} instead of legacy format {"tasks": [...]}

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent and convert between formats appropriately when needed, avoiding circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/commands/list.command.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 : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • apps/cli/src/commands/list.command.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 : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.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 : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/src/commands/list.command.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 : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/src/commands/list.command.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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Detect circular dependencies using DFS and validate task references before operations

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Respect dependency chains and task priorities when selecting work

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/*/[!.]* : Every CLI command that operates on tasks must include a `--tag <tag>` CLI option

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Select tasks based on dependencies (all marked 'done'), priority level, and ID order

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to taskmaster.mdc for comprehensive reference of Taskmaster MCP tools and CLI commands with tagged task lists information

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/commands.js : In CLI commands, use specified tag context or default to current tag; call appropriate core functions with options including targetTag and outputFormat parameters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Use `readJSON(tasksPath, projectRoot, tag)` and `writeJSON(tasksPath, data, projectRoot, tag)` for all task data access

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Provide next step suggestions after command completion using a consistent format with a boxen container displaying suggested commands using chalk formatting

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:49.782Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.782Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
📚 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 boxen for important success messages with clear formatting, provide suggested next steps after command completion, and include ready-to-use commands for follow-up actions.

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Do not duplicate task ID formatting logic across modules - centralize formatting utilities

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-09-03T12:16:15.866Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/package.json:13-64
Timestamp: 2025-09-03T12:16:15.866Z
Learning: For internal packages in the claude-task-master project, Crunchyman-ralph prefers pointing package.json "types" entries to src .ts files rather than dist .d.ts files for better developer experience (DX), as the packages are not being exported as SDKs.

Applied to files:

  • apps/cli/src/ui/display/tables.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:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Include all required task properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) in each task object without adding extra properties outside the standard schema

Applied to files:

  • apps/cli/src/ui/display/tables.ts
🧬 Code graph analysis (2)
apps/cli/src/commands/list.command.ts (3)
packages/tm-core/src/common/types/index.ts (3)
  • Task (131-159)
  • StorageType (11-11)
  • TaskStatus (20-28)
packages/tm-core/src/common/constants/index.ts (1)
  • isTaskComplete (68-70)
apps/cli/src/utils/display-helpers.ts (1)
  • displayCommandHeader (14-43)
apps/cli/src/ui/display/tables.ts (1)
packages/tm-core/src/common/types/index.ts (1)
  • Subtask (165-169)
🪛 GitHub Actions: CI
apps/cli/src/commands/list.command.ts

[error] 124-129: Biome format check failed. Formatter would have printed changes here. Run 'biome format .' to apply fixes or 'biome format --write' to write changes.

apps/cli/src/ui/display/tables.ts

[error] 24-27: Biome format check failed. Formatter would have printed changes to type definition. Run 'biome format .' to apply fixes or 'biome format --write' to write changes.

⏰ 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: Cursor Bugbot
🔇 Additional comments (4)
apps/cli/src/ui/display/tables.ts (1)

207-253: LGTM!

The subtask rendering correctly handles the optional Tag and Blocks columns with appropriate dash placeholders, maintaining consistent alignment with parent task rows.

apps/cli/src/commands/list.command.ts (3)

426-450: LGTM!

The buildBlocksMap correctly inverts the dependency graph by adding each task to its dependencies' blocks lists. The logic is clean and efficient.


301-347: LGTM - Status filter ordering is correct.

The implementation correctly defers the status filter when --ready or --blocking is used, ensuring completedIds is built from the full task set before filtering. This addresses the previously flagged concern about status filter ordering.


622-667: LGTM!

Suppressing dashboards and next-task recommendations when using --ready, --blocking, or --all-tags is appropriate since these filtered views would show misleading aggregate statistics.

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

♻️ Duplicate comments (1)
apps/cli/src/commands/list.command.ts (1)

463-468: Subtask completion not tracked in ready filter.

The completedIds set only includes top-level task IDs. When a task depends on a completed subtask (e.g., "2.1"), that dependency won't be recognized as satisfied. Compare to findNextTask (lines 695-701), which correctly adds subtask IDs in the format ${t.id}.${st.id}.

🔎 Proposed fix

Add subtask IDs to the completed set:

 		// Build set of completed task IDs
 		const completedIds = new Set<string>();
 		tasks.forEach((t) => {
 			if (isTaskComplete(t.status)) {
 				completedIds.add(String(t.id));
 			}
+			// Also track completed subtasks
+			if (t.subtasks) {
+				t.subtasks.forEach((st) => {
+					if (isTaskComplete(st.status as TaskStatus)) {
+						completedIds.add(`${t.id}.${st.id}`);
+					}
+				});
+			}
 		});
🧹 Nitpick comments (1)
apps/cli/src/ui/display/tables.ts (1)

52-108: Consider extracting column width calculation into a helper.

The if-else cascade with hardcoded percentages makes it difficult to adjust layouts or add new optional columns. A helper function that takes column counts and returns proportional widths would improve maintainability.

Example approach
function calculateColumnWidths(
  tableWidth: number,
  coreColumns: number,
  optionalColumns: number
): number[] {
  // Define proportions based on total column count
  const totalCols = coreColumns + optionalColumns;
  const baseWidthMap = {
    // ... etc
  };
  const proportions = baseWidthMap[totalCols] || /* fallback */;
  return proportions.map(p => Math.floor(tableWidth * p));
}

This centralizes the logic and makes it easier to tune layouts.

📜 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 00dd882 and 2e2f608.

📒 Files selected for processing (2)
  • apps/cli/src/commands/list.command.ts
  • apps/cli/src/ui/display/tables.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
🧠 Learnings (57)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
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).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-12-11T14:45:14.973Z
Learning: Applies to assets/.claude/settings.json : Add Claude Code tool allowlist configuration in `.claude/settings.json` to include 'Edit', 'Bash(task-master *)', 'Bash(git commit:*)', 'Bash(git add:*)', 'Bash(npm run *)', and 'mcp__task_master_ai__*'
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Use cli-table3 for rendering tables with colored headers (cyan and bold), appropriate column widths for readability, and use helper functions like getStatusWithColor, formatDependenciesWithStatus, and truncate for content cells

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.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:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Include all required task properties (id, title, description, status, dependencies, priority, details, testStrategy, subtasks) in each task object without adding extra properties outside the standard schema

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Do not duplicate task ID formatting logic across modules - centralize formatting utilities

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The tasks.json file should use a tagged task lists structure with multiple named task lists as top-level keys (e.g., {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}}), supporting backward compatibility through silent migration from legacy {"tasks": [...]} format

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-09-03T12:16:15.866Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/package.json:13-64
Timestamp: 2025-09-03T12:16:15.866Z
Learning: For internal packages in the claude-task-master project, Crunchyman-ralph prefers pointing package.json "types" entries to src .ts files rather than dist .d.ts files for better developer experience (DX), as the packages are not being exported as SDKs.

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Provide clear feedback about operation status, display success or error messages after completion, and use colored output (chalk) to distinguish between message types

Applied to files:

  • apps/cli/src/ui/display/tables.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/ui/display/tables.ts
  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to tasks.json : Organize tasks into separate contexts (tags) within tasks.json using tagged format: {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}} instead of legacy format {"tasks": [...]}

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent and convert between formats appropriately when needed, avoiding circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/commands/list.command.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 : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • apps/cli/src/commands/list.command.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 : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/src/commands/list.command.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 : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/src/commands/list.command.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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Detect circular dependencies using DFS and validate task references before operations

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Respect dependency chains and task priorities when selecting work

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/*/[!.]* : Every CLI command that operates on tasks must include a `--tag <tag>` CLI option

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : In MCP direct functions, support explicit tag specification and use tag resolution for task data operations; default to current tag when not specified

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Select tasks based on dependencies (all marked 'done'), priority level, and ID order

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to taskmaster.mdc for comprehensive reference of Taskmaster MCP tools and CLI commands with tagged task lists information

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to architecture.mdc for understanding the high-level architecture of the Task Master CLI application, including the tagged task lists system

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/commands.js : In CLI commands, use specified tag context or default to current tag; call appropriate core functions with options including targetTag and outputFormat parameters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Use `readJSON(tasksPath, projectRoot, tag)` and `writeJSON(tasksPath, data, projectRoot, tag)` for all task data access

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Provide next step suggestions after command completion using a consistent format with a boxen container displaying suggested commands using chalk formatting

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:49.782Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.782Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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 boxen for important success messages with clear formatting, provide suggested next steps after command completion, and include ready-to-use commands for follow-up actions.

Applied to files:

  • apps/cli/src/commands/list.command.ts
🪛 GitHub Actions: CI
apps/cli/src/commands/list.command.ts

[error] 396-396: tsc --noEmit failed: TS2345: Argument of type 'TaskWithBlocks' is not assignable to parameter of type 'TaskWithTag'.

⏰ 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: Cursor Bugbot
🔇 Additional comments (2)
apps/cli/src/ui/display/tables.ts (1)

183-197: LGTM: Blocks column rendering logic is sound.

The color coding (gray for completed, yellow for active blocks) effectively communicates whether a task is still actively blocking others. The use of isTaskComplete ensures consistency with other status checks.

apps/cli/src/commands/list.command.ts (1)

307-319: No issue found. The tag filter at line 319 is correct—dependencies are restricted to within-tag boundaries by design, so filterReadyTasks() only needs tasks from the specified tag to accurately compute satisfied dependencies.

Likely an incorrect or invalid review comment.

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

♻️ Duplicate comments (1)
apps/cli/src/commands/list.command.ts (1)

455-486: Fix subtask dependency handling in ready filter.

The filterReadyTasks method only adds top-level task IDs to completedIds (lines 464-469), ignoring subtasks. If a task depends on a subtask like "1.1", that dependency will never be satisfied, and the task will incorrectly be excluded from ready results.

The findNextTask method (lines 696-702) correctly includes subtask IDs using the format ${parentId}.${subtaskId}. Apply the same pattern here.

🔎 Proposed fix

Add subtask IDs to completedIds:

 	private filterReadyTasks(tasks: TaskWithBlocks[]): TaskWithBlocks[] {
 		// Statuses that are actionable (not deferred, blocked, or terminal)
 		const actionableStatuses: TaskStatus[] = [
 			'pending',
 			'in-progress',
 			'review'
 		];
 
-		// Build set of completed task IDs
+		// Build set of completed task IDs (including subtasks)
 		const completedIds = new Set<string>();
 		tasks.forEach((t) => {
 			if (isTaskComplete(t.status)) {
 				completedIds.add(String(t.id));
 			}
+			// Include completed subtasks with format "parentId.subtaskId"
+			if (t.subtasks) {
+				t.subtasks.forEach((st) => {
+					if (isTaskComplete(st.status as TaskStatus)) {
+						completedIds.add(`${t.id}.${st.id}`);
+					}
+				});
+			}
 		});
 
 		return tasks.filter((task) => {
 			// Must be in an actionable status (excludes deferred, blocked, done, cancelled)
 			if (!actionableStatuses.includes(task.status)) {
 				return false;
 			}
 
 			// Must have all dependencies satisfied
 			if (!task.dependencies || task.dependencies.length === 0) {
 				return true;
 			}
 
 			return task.dependencies.every((depId) =>
 				completedIds.has(String(depId))
 			);
 		});
 	}
🧹 Nitpick comments (1)
apps/cli/src/commands/list.command.ts (1)

392-395: Make filterReadyTasks generic to preserve input type.

The type cast on line 394 assumes that filterReadyTasks preserves the tagName property, but the function signature returns TaskWithBlocks[], which doesn't include tagName. While the cast is safe at runtime (because filter() preserves properties), it's fragile and could break if the implementation changes.

🔎 Proposed refactor

Make the function generic to preserve all input properties:

 	/**
 	 * Filter to only tasks that are ready to work on (dependencies satisfied, actionable status)
 	 */
-	private filterReadyTasks(tasks: TaskWithBlocks[]): TaskWithBlocks[] {
+	private filterReadyTasks<T extends TaskWithBlocks>(tasks: T[]): T[] {
 		// Statuses that are actionable (not deferred, blocked, or terminal)
 		const actionableStatuses: TaskStatus[] = [
 			'pending',
 			'in-progress',
 			'review'
 		];
 
 		// Build set of completed task IDs
 		const completedIds = new Set<string>();
 		tasks.forEach((t) => {
 			if (isTaskComplete(t.status)) {
 				completedIds.add(String(t.id));
 			}
 		});
 
 		return tasks.filter((task) => {
 			// Must be in an actionable status (excludes deferred, blocked, done, cancelled)
 			if (!actionableStatuses.includes(task.status)) {
 				return false;
 			}
 
 			// Must have all dependencies satisfied
 			if (!task.dependencies || task.dependencies.length === 0) {
 				return true;
 			}
 
 			return task.dependencies.every((depId) =>
 				completedIds.has(String(depId))
 			);
 		});
 	}

Then remove the cast at line 394:

-		const tasksToAdd: TaskWithTag[] = options.ready
-			? (this.filterReadyTasks(enrichedTasks) as TaskWithTag[])
-			: enrichedTasks;
+		const tasksToAdd = options.ready
+			? this.filterReadyTasks(enrichedTasks)
+			: enrichedTasks;

TypeScript will infer T = TaskWithTag and return TaskWithTag[] automatically.

📜 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 2e2f608 and ed1c3b4.

📒 Files selected for processing (1)
  • apps/cli/src/commands/list.command.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/commands/list.command.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/commands/list.command.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/commands/list.command.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/commands/list.command.ts
🧠 Learnings (51)
📓 Common learnings
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
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).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The tasks.json file should use a tagged task lists structure with multiple named task lists as top-level keys (e.g., {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}}), supporting backward compatibility through silent migration from legacy {"tasks": [...]} format

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to tasks.json : Organize tasks into separate contexts (tags) within tasks.json using tagged format: {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}} instead of legacy format {"tasks": [...]}

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to architecture.mdc for understanding the high-level architecture of the Task Master CLI application, including the tagged task lists system

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent and convert between formats appropriately when needed, avoiding circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/commands/list.command.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 : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • apps/cli/src/commands/list.command.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 : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/commands/list.command.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 : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/src/commands/list.command.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 : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/src/commands/list.command.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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Detect circular dependencies using DFS and validate task references before operations

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Respect dependency chains and task priorities when selecting work

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/*/[!.]* : Every CLI command that operates on tasks must include a `--tag <tag>` CLI option

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : In MCP direct functions, support explicit tag specification and use tag resolution for task data operations; default to current tag when not specified

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Select tasks based on dependencies (all marked 'done'), priority level, and ID order

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to taskmaster.mdc for comprehensive reference of Taskmaster MCP tools and CLI commands with tagged task lists information

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/commands.js : In CLI commands, use specified tag context or default to current tag; call appropriate core functions with options including targetTag and outputFormat parameters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Use `readJSON(tasksPath, projectRoot, tag)` and `writeJSON(tasksPath, data, projectRoot, tag)` for all task data access

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Provide next step suggestions after command completion using a consistent format with a boxen container displaying suggested commands using chalk formatting

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:49.782Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.782Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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 boxen for important success messages with clear formatting, provide suggested next steps after command completion, and include ready-to-use commands for follow-up actions.

Applied to files:

  • apps/cli/src/commands/list.command.ts
⏰ 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). (2)
  • GitHub Check: Test
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (5)
apps/cli/src/commands/list.command.ts (5)

53-66: LGTM!

The new options and type definitions are well-structured. TaskWithBlocks and TaskWithTag clearly model the enriched task data for cross-tag listing scenarios.


121-129: LGTM!

The new CLI options are clearly documented with helpful descriptions.


623-668: LGTM!

The display logic correctly suppresses dashboards and next-task recommendations when filtering by --ready, --blocking, or --all-tags, preventing misleading statistics. The task table properly shows blocks and tag columns in the appropriate contexts.


691-702: Good reference implementation for subtask handling.

This method correctly includes subtask IDs in completedIds using the format ${parentId}.${subtaskId}. This is the pattern that should be applied in filterReadyTasks to fix the subtask dependency bug.


307-322: The status filter deferral logic is correct, but cross-tag dependencies are not visible with --tag --ready.

The tag filter (line 319) remains active even when needsAllTasks is true. When a task in the current tag depends on a completed task in a different tag, that dependency won't be satisfied because only the current tag's completed tasks are included in the ready filter computation.

While --all-tags --ready resolves this by fetching across all tags, users combining --tag feature-a --ready may encounter tasks that appear blocked even though their dependencies are satisfied elsewhere. Consider documenting this limitation.

@bjcoombs bjcoombs force-pushed the 1532-list-blocks-ready-filter branch from ed1c3b4 to b4c7e83 Compare December 29, 2025 10:49
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

Caution

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

⚠️ Outside diff range comments (1)
apps/cli/src/commands/list.command.ts (1)

329-333: The --ready filter has a legitimate limitation with cross-tag dependencies.

When --ready is used without --all-tags, tasks are fetched from a single tag (line 330). If a task has a dependency on another task from a different tag, that dependency won't be included in the fetched results, so it won't appear in completedIds (lines 479-484). This causes the task to incorrectly show as "not ready" even if its cross-tag dependency is complete.

This is an edge case rooted in a design inconsistency: the move command documentation states "dependencies are only within tags" (move-task.js:746), yet add-task.js allows creating cross-tag dependencies by validating against getAllTasks(). To address this properly, either:

  • Prevent cross-tag dependencies entirely at creation time in add-task.js, or
  • Update the --ready filter to fetch all tasks when needed to resolve cross-tag dependencies

For now, users should use tm list --ready --all-tags to correctly handle ready filtering across tags.

♻️ Duplicate comments (2)
apps/cli/src/commands/list.command.ts (2)

396-404: Cross-tag blocking relationships not captured in blocks map.

The blocksMap is built per-tag (line 397), so cross-tag dependencies aren't reflected in the blocks field. If task A in feature-a depends on task B in master, task B's blocks array won't include A.

This affects --all-tags --blocking accuracy. Consider building the blocks map from all collected tasks after the loop completes.

🔎 Suggested approach
 	private async getTasksFromAllTags(
 		options: ListCommandOptions
 	): Promise<ListTasksResult> {
 		// ...
 		const tagsResult = await this.tmCore.tasks.getTagsWithStats();
-		const allTaggedTasks: TaskWithTag[] = [];
+		const allRawTasks: Array<Task & { tagName: string }> = [];
 		let totalTaskCount = 0;

 		for (const tagInfo of tagsResult.tags) {
 			const tagName = tagInfo.name;
 			const result = await this.tmCore.tasks.list({
 				tag: tagName,
 				includeSubtasks: options.withSubtasks
 			});
 			totalTaskCount += result.tasks.length;
-			const blocksMap = this.buildBlocksMap(result.tasks);
-			const enrichedTasks: TaskWithTag[] = result.tasks.map((task) => ({
-				...task,
-				blocks: blocksMap.get(String(task.id)) || [],
-				tagName
-			}));
-			allTaggedTasks.push(...enrichedTasks);
+			allRawTasks.push(...result.tasks.map(t => ({ ...t, tagName })));
 		}

+		// Build blocks map from ALL tasks to capture cross-tag relationships
+		const blocksMap = this.buildBlocksMap(allRawTasks);
+		const allTaggedTasks: TaskWithTag[] = allRawTasks.map((task) => ({
+			...task,
+			blocks: blocksMap.get(String(task.id)) || []
+		}));
 		// ... rest of filtering

478-500: Subtask dependencies not recognized in ready filter.

The completedIds set only includes top-level task IDs (lines 480-484), but tasks can depend on subtasks (e.g., "1.1"). Compare with findNextTask (lines 706-718) which correctly includes subtask IDs using ${t.id}.${st.id} format.

Tasks depending on completed subtasks will incorrectly appear as "not ready."

🔎 Suggested fix to include subtask IDs
 		const completedIds = new Set<string>();
 		tasks.forEach((t) => {
 			if (isTaskComplete(t.status)) {
 				completedIds.add(String(t.id));
 			}
+			// Also track completed subtasks
+			if (t.subtasks) {
+				t.subtasks.forEach((st) => {
+					if (isTaskComplete(st.status as TaskStatus)) {
+						completedIds.add(`${t.id}.${st.id}`);
+					}
+				});
+			}
 		});
🧹 Nitpick comments (1)
apps/cli/src/commands/list.command.ts (1)

584-588: Consider type narrowing instead of as any assertion.

The (task as any).tagName works correctly but loses type safety. Since allTags implies tasks is TaskWithTag[], consider narrowing the type:

const taggedTasks = tasks as TaskWithTag[];
taggedTasks.forEach((task) => {
  const tagPrefix = allTags ? chalk.magenta(`[${task.tagName}] `) : '';
  // ...
});

This is a minor improvement for type safety.

📜 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 ceb7249 and 29013af.

📒 Files selected for processing (1)
  • apps/cli/src/commands/list.command.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.ts

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

TypeScript test files must achieve minimum code coverage thresholds: 80% lines/functions and 70% branches globally, 90% for utilities, and 85% for middleware; new features must meet or exceed these thresholds

Files:

  • apps/cli/src/commands/list.command.ts
**/*.{js,ts}

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

**/*.{js,ts}: Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Use isApiKeySet(providerName, session) from config-manager.js to check if a provider's key is available before potentially attempting an AI call
Do not add direct console.log calls outside the logging utility - use the central log function instead
Ensure silent mode is disabled in a finally block to prevent it from staying enabled
Do not access the global silentMode variable directly - use the exported silent mode control functions instead
Do not duplicate task ID formatting logic across modules - centralize formatting utilities
Use ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Use FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency
Do not replace explicit user task selections with fuzzy results - fuzzy search should supplement, not replace user selections
Use readJSON and writeJSON utilities for all JSON file operations instead of raw fs.readFileSync or fs.writeFileSync
Include error handling for JSON file operations and validate JSON structure after reading
Use path.join() for cross-platform path construction and path.resolve() for absolute paths, validating paths before file operations
Support both .env files and MCP session environment for environment variable resolution with fallbacks for missing values
Prefer updating the core function to accept an outputFormat parameter and check outputFormat === 'json' before displaying UI elements

Files:

  • apps/cli/src/commands/list.command.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import modules with .js extension even in TypeScript source files for ESM compatibility

Files:

  • apps/cli/src/commands/list.command.ts
apps/cli/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

CLI (@tm/cli) should be a thin presentation layer that calls tm-core methods and displays results; handle only CLI-specific concerns like argument parsing, output formatting, and user prompts

Files:

  • apps/cli/src/commands/list.command.ts
🧠 Learnings (52)
📓 Common learnings
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).
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/git_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:23.032Z
Learning: Leverage Task Master's tagged task lists system for multi-context development: branch-specific tasks, merge conflict prevention through task isolation, context switching between development contexts, and parallel development by different team members.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Learnt from: eyaltoledano
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/floppy-news-buy.md:7-38
Timestamp: 2025-08-02T14:54:52.216Z
Learning: For major feature additions like new CLI commands, eyaltoledano prefers detailed changesets with comprehensive descriptions, usage examples, and feature explanations rather than minimal single-line summaries.
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Every command that reads or writes tasks.json must be tag-aware and support the tagged task lists system

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Design core logic to work with both legacy (flat tasks array) and tagged task data formats; use tag resolution functions (getTasksForTag, setTasksForTag) for task data access; support silent migration during feature usage

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement tag resolution functions (getTasksForTag, setTasksForTag, getCurrentTag) that provide backward compatibility with legacy format and default to master tag

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to **/*.test.{js,ts} : Test new features with both legacy and tagged task data formats; verify tag resolution behavior; test migration compatibility; ensure pre-migration projects are handled correctly

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The tasks.json file should use a tagged task lists structure with multiple named task lists as top-level keys (e.g., {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}}), supporting backward compatibility through silent migration from legacy {"tasks": [...]} format

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement complete migration functions for tagged task lists that handle configuration, state file creation, and migration status tracking

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to tasks.json : Organize tasks into separate contexts (tags) within tasks.json using tagged format: {"master": {"tasks": [...]}, "feature-branch": {"tasks": [...]}} instead of legacy format {"tasks": [...]}

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/*/[!.]* : Every CLI command that operates on tasks must include a `--tag <tag>` CLI option

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/task-manager.js : task-manager.js should handle reading/writing tasks.json with tagged task lists support, implement CRUD operations, delegate AI interactions to ai-services-unified.js layer, and access non-AI configuration via config-manager.js getters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Format task files with consistent structure including task metadata (ID, title, status), dependencies with status indicators, and tag context information in the file header

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/*.{js,ts} : Use fuzzy search to supplement user-provided task IDs and display discovered task IDs to users for transparency

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use consistent properties for subtasks (id, title, description, status, dependencies, details) without duplicating parent task properties, maintaining simple numeric IDs unique within the parent task

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Extract tasks from PRD documents using AI within the current tag context (defaulting to "master"), providing clear prompts to guide AI task generation and validating/cleaning up AI-generated tasks

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs, using numeric IDs for direct task references and string IDs with dot notation (e.g., '1.2') for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent and convert between formats appropriately when needed, avoiding circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Support both task and subtask dependencies in cycle detection

Applied to files:

  • apps/cli/src/commands/list.command.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 : Allow numeric subtask IDs to reference other subtasks within the same parent

Applied to files:

  • apps/cli/src/commands/list.command.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 : Do not create circular dependencies between subtasks

Applied to files:

  • apps/cli/src/commands/list.command.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 : Represent task dependencies as arrays of task IDs

Applied to files:

  • apps/cli/src/commands/list.command.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 : Use string IDs with dot notation (e.g., "1.2") for subtask references

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Format task and dependency IDs consistently, check for existing dependencies to prevent duplicates, and sort dependencies for better readability when adding dependencies

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/dependency-manager.js : dependency-manager.js should manage task dependencies by handling add/remove/validate/fix operations across tagged task contexts

Applied to files:

  • apps/cli/src/commands/list.command.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 : Remove references to non-existent tasks during validation

Applied to files:

  • apps/cli/src/commands/list.command.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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:18.662Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-11-24T17:59:18.662Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Filter and display tasks by status within the current tag context, handling subtask display in lists and using consistent table formats

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Detect circular dependencies using DFS and validate task references before operations

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Respect dependency chains and task priorities when selecting work

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Use tag resolution functions (getTasksForTag and setTasksForTag) in core task functions to maintain backward compatibility instead of directly manipulating the tagged structure

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Core task functions must accept a context parameter with `{ projectRoot, tag }` properties

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to mcp-server/src/core/direct-functions/*.js : In MCP direct functions, support explicit tag specification and use tag resolution for task data operations; default to current tag when not specified

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to scripts/modules/**/*.{js,ts} : Implement silent migration for tasks.json files that transforms old format to tagged format, marking global flag and performing complete migration

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Implement status update functions that handle both individual tasks and subtasks within the current tag context, considering subtask status when updating parent tasks and suggesting parent task updates when all subtasks are done

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:43.972Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to **/{utils,utilities}/**/*.{js,ts} : Implement reusable task finding utilities that support both task and subtask lookups and add context to subtask results

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:47.030Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-11-24T17:58:47.030Z
Learning: Applies to scripts/modules/commands.js : Follow the add-subtask command structure with proper options: --parent (required), --task-id, --title, --description, --details, --dependencies, --status, and --generate, with comprehensive parameter validation

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/*.js : Process large task lists efficiently; minimize file I/O operations per feature execution; cache tag resolution results when appropriate; avoid keeping all tag data in memory simultaneously

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:05:02.114Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/.windsurfrules:0-0
Timestamp: 2025-11-24T18:05:02.114Z
Learning: Select tasks based on dependencies (all marked 'done'), priority level, and ID order

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to taskmaster.mdc for comprehensive reference of Taskmaster MCP tools and CLI commands with tagged task lists information

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:00:32.617Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to architecture.mdc for understanding the high-level architecture of the Task Master CLI application, including the tagged task lists system

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:01:44.169Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/new_features.mdc:0-0
Timestamp: 2025-11-24T18:01:44.169Z
Learning: Applies to scripts/modules/commands.js : In CLI commands, use specified tag context or default to current tag; call appropriate core functions with options including targetTag and outputFormat parameters

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:04.644Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tags.mdc:0-0
Timestamp: 2025-11-24T18:02:04.644Z
Learning: Applies to scripts/modules/task-manager/**/*.{js,mjs} : Use `readJSON(tasksPath, projectRoot, tag)` and `writeJSON(tasksPath, data, projectRoot, tag)` for all task data access

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Calculate and display task completion statistics for the current tag context including total tasks, completed tasks, completion percentage, and subtask completion counts using visual progress indicators

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: Applies to scripts/modules/ui.js : ui.js should handle CLI output formatting including tables, colors, boxes, spinners, and display tasks, reports, progress, suggestions, and migration notices

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Follow the standard display pattern for UI functions: use documented JSDoc comments describing the function's purpose, parameters, and display a task object with consistent formatting using boxen and chalk

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:04:01.629Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ui.mdc:0-0
Timestamp: 2025-11-24T18:04:01.629Z
Learning: Applies to scripts/modules/ui.js : Provide next step suggestions after command completion using a consistent format with a boxen container displaying suggested commands using chalk formatting

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T17:59:00.056Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/context_gathering.mdc:0-0
Timestamp: 2025-11-24T17:59:00.056Z
Learning: Applies to scripts/**/*.js : Display token breakdown using `boxen` library with sections for tasks, files, and prompts, showing formatted token counts and file sizes in a clean bordered box with title

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:49.782Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/telemetry.mdc:0-0
Timestamp: 2025-11-24T18:02:49.782Z
Learning: Applies to scripts/modules/task-manager/**/*.js : Core logic functions with outputFormat parameter must check if outputFormat === 'text' and call displayAiUsageSummary(aiServiceResponse.telemetryData, 'cli') from scripts/modules/ui.js when applicable

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 Learning: 2025-11-24T18:02:36.388Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/tasks.mdc:0-0
Timestamp: 2025-11-24T18:02:36.388Z
Learning: Applies to scripts/modules/task-manager.js : Generate appropriate numbers of subtasks based on task complexity analysis, using recommended subtask counts from complexity analysis when available instead of always using default counts

Applied to files:

  • apps/cli/src/commands/list.command.ts
📚 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 boxen for important success messages with clear formatting, provide suggested next steps after command completion, and include ready-to-use commands for follow-up actions.

Applied to files:

  • apps/cli/src/commands/list.command.ts
🧬 Code graph analysis (1)
apps/cli/src/commands/list.command.ts (6)
packages/tm-core/src/common/types/index.ts (2)
  • Task (131-159)
  • TaskStatus (20-28)
scripts/modules/task-manager/tag-management.js (1)
  • actionableStatuses (638-638)
packages/tm-core/src/common/constants/index.ts (1)
  • isTaskComplete (68-70)
apps/cli/src/utils/display-helpers.ts (1)
  • displayCommandHeader (14-43)
apps/cli/src/ui/components/dashboard.component.ts (1)
  • displayDashboards (517-594)
apps/cli/src/ui/components/next-task.component.ts (1)
  • getTaskDescription (133-149)
⏰ 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). (2)
  • GitHub Check: Test
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (8)
apps/cli/src/commands/list.command.ts (8)

58-66: LGTM! Clean type definitions for enriched task data.

The type hierarchy with TaskWithBlocks and TaskWithTag extending it is well-structured and aligns with the feature requirements.


71-78: LGTM! Result interface properly extended for cross-tag support.

The union type and allTags flag provide clear semantics for downstream consumers.


121-129: LGTM! Clear option definitions with helpful descriptions.

The help text for --all-tags appropriately suggests combining with --ready for actionable tasks.


279-288: Good validation preventing incompatible option combination.

Clear error message with actionable guidance for users. This properly addresses the case where --all-tags would otherwise be silently ignored in watch mode.


444-465: LGTM! Clean inverse dependency graph construction.

The implementation correctly inverts the dependency relationships to build the blocks map.


506-508: LGTM! Simple and correct blocking filter.


545-562: LGTM! JSON output properly reflects cross-tag context.

The metadata correctly indicates when all tags are being listed.


638-649: Good UX: Dashboard and recommendations hidden for filtered views.

Hiding dashboard statistics and next-task recommendations when using --ready, --blocking, or --all-tags prevents showing misleading aggregate data. The filtered task list is self-explanatory in these contexts.

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

🤖 Fix all issues with AI agents
In `@apps/cli/src/commands/list.command.spec.ts`:
- Around line 451-577: The CI failure is due to Biome formatting issues in the
test file around the ListTasksCommand tests (e.g., the "should treat cancelled
dependencies as satisfied for --ready filter", "should apply status filter after
ready filter", and "buildBlocksMap validation" tests); fix by running the Biome
formatter (npx biome format --write) on the affected file, reformatting the spec
so ListTasksCommand tests and consoleWarnSpy mocks follow project style, then
re-run the test suite and commit the formatted changes.

In `@apps/cli/src/commands/list.command.ts`:
- Around line 584-588: Formatting of the tagPrefix declaration (the conditional
that sets tagPrefix when allTags and 'tagName' in task) is failing Biome; run
the formatter (e.g., npx biome format --write) to reformat the code and commit
the changes so the declaration for tagPrefix and surrounding lines comply with
the project's Biome rules.
♻️ Duplicate comments (1)
apps/cli/src/commands/list.command.spec.ts (1)

1-6: File location should be alongside source file.

Per coding guidelines and a past review comment, spec files should be placed alongside their source files. This file should be at apps/cli/src/commands/list.command.spec.ts rather than the current location.

🧹 Nitpick comments (2)
packages/tm-core/src/modules/tasks/utils/task-filters.ts (1)

124-130: Replace console.warn with the central logging utility.

As per coding guidelines, direct console calls should be avoided in favor of the central log function. This ensures consistent logging behavior and respects silent mode.

♻️ Suggested refactor
+import { log } from '../../../common/utils/index.js';
+
 // Inside filterReadyTasks:
        // Validate status is a known value
        if (!TASK_STATUSES.includes(task.status)) {
-           console.warn(
-               `Task ${task.id} has unexpected status "${task.status}". Valid statuses are: ${TASK_STATUSES.join(', ')}`
-           );
+           log('warn', `Task ${task.id} has unexpected status "${task.status}". Valid statuses are: ${TASK_STATUSES.join(', ')}`);
        }
apps/cli/src/ui/display/tables.ts (1)

146-160: Unnecessary type cast for blocks rendering.

The cast task as TaskTableItem on line 148 is redundant since task is already typed as TaskTableItem from the function parameter. This can be simplified.

♻️ Suggested simplification
 		if (showBlocks) {
 			// Show tasks that depend on this one
-			const taskWithBlocks = task as TaskTableItem;
-			if (!taskWithBlocks.blocks || taskWithBlocks.blocks.length === 0) {
+			if (!task.blocks || task.blocks.length === 0) {
 				row.push(chalk.gray('-'));
 			} else {
 				// Gray out blocks for completed tasks (no longer blocking)
-				const blocksText = taskWithBlocks.blocks.join(', ');
+				const blocksText = task.blocks.join(', ');
 				row.push(
 					isTaskComplete(task.status)
 						? chalk.gray(blocksText)
 						: chalk.yellow(blocksText)
 				);
 			}
 		}

Comment on lines 451 to 577
it('should treat cancelled dependencies as satisfied for --ready filter', async () => {
const command = new ListTasksCommand();

// Task 1 is cancelled, Task 2 depends on Task 1
// Task 2 should be considered "ready" because cancelled = complete
const mockTasks = [
{ id: '1', title: 'Cancelled Task', status: 'cancelled', dependencies: [] },
{ id: '2', title: 'Dependent Task', status: 'pending', dependencies: ['1'] }
];

(command as any).tmCore = {
tasks: {
list: vi.fn().mockResolvedValue({
tasks: mockTasks,
total: 2,
filtered: 2,
storageType: 'json'
}),
getStorageType: vi.fn().mockReturnValue('json')
},
config: {
getActiveTag: vi.fn().mockReturnValue('master')
}
};

await (command as any).executeCommand({
ready: true,
json: true
});

const output = consoleLogSpy.mock.calls[0][0];
const parsed = JSON.parse(output);

// Task 2 should be ready because task 1 (cancelled) counts as complete
expect(parsed.tasks).toHaveLength(1);
expect(parsed.tasks[0].id).toBe('2');
expect(parsed.tasks[0].status).toBe('pending');
});

it('should apply status filter after ready filter', async () => {
const command = new ListTasksCommand();

// Multiple ready tasks with different statuses
const mockTasks = [
{ id: '1', title: 'Done', status: 'done', dependencies: [] },
{ id: '2', title: 'Pending ready', status: 'pending', dependencies: ['1'] },
{ id: '3', title: 'In-progress ready', status: 'in-progress', dependencies: ['1'] }
];

(command as any).tmCore = {
tasks: {
list: vi.fn().mockResolvedValue({
tasks: mockTasks,
total: 3,
filtered: 3,
storageType: 'json'
}),
getStorageType: vi.fn().mockReturnValue('json')
},
config: {
getActiveTag: vi.fn().mockReturnValue('master')
}
};

await (command as any).executeCommand({
ready: true,
status: 'pending',
json: true
});

const output = consoleLogSpy.mock.calls[0][0];
const parsed = JSON.parse(output);

// With --ready --status=pending, should only show task 2
// Task 2 is ready (dep 1 is done) and pending
// Task 3 is ready but in-progress, not pending
expect(parsed.tasks).toHaveLength(1);
expect(parsed.tasks[0].id).toBe('2');
expect(parsed.tasks[0].status).toBe('pending');
});
});

describe('buildBlocksMap validation', () => {
it('should warn about dependencies to non-existent tasks', async () => {
const consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {});
const command = new ListTasksCommand();

const mockTasks = [
{ id: '1', title: 'Task with bad dep', status: 'pending', dependencies: ['999'] }
];

(command as any).tmCore = {
tasks: {
list: vi.fn().mockResolvedValue({
tasks: mockTasks,
total: 1,
filtered: 1,
storageType: 'json'
}),
getStorageType: vi.fn().mockReturnValue('json')
},
config: {
getActiveTag: vi.fn().mockReturnValue('master')
}
};

await (command as any).executeCommand({
json: true
});

// Verify console.warn was called with warning about invalid dependency
expect(consoleWarnSpy).toHaveBeenCalled();

// Find the call that mentions invalid dependency references
const warnCalls = consoleWarnSpy.mock.calls.map(call => call[0]);
const hasInvalidDepWarning = warnCalls.some(
msg => typeof msg === 'string' && msg.includes('invalid dependency reference')
);
const hasSpecificTaskWarning = warnCalls.some(
msg => typeof msg === 'string' && msg.includes('Task 1') && msg.includes('999')
);

expect(hasInvalidDepWarning).toBe(true);
expect(hasSpecificTaskWarning).toBe(true);

consoleWarnSpy.mockRestore();
});
Copy link
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 issues flagged by pipeline.

The CI pipeline is failing due to Biome formatting issues in this section. Run biome format --write to fix the formatting.

🔧 How to fix
npx biome format --write apps/cli/src/commands/list.command.spec.ts
🧰 Tools
🪛 GitHub Actions: CI

[error] 455-468: Formatter would have printed the following content. biomes format would reformat this file. Run 'biome format .' to fix formatting.


[error] 494-517: Formatter would have printed the following content. biomes format would reformat this file. Run 'biome format .' to fix formatting.

🤖 Prompt for AI Agents
In `@apps/cli/src/commands/list.command.spec.ts` around lines 451 - 577, The CI
failure is due to Biome formatting issues in the test file around the
ListTasksCommand tests (e.g., the "should treat cancelled dependencies as
satisfied for --ready filter", "should apply status filter after ready filter",
and "buildBlocksMap validation" tests); fix by running the Biome formatter (npx
biome format --write) on the affected file, reformatting the spec so
ListTasksCommand tests and consoleWarnSpy mocks follow project style, then
re-run the test suite and commit the formatted changes.

…gnment

Addresses eyaltoledano#1532

- Add --ready filter: shows tasks with all dependencies satisfied
- Add --blocking filter: shows tasks that block other tasks
- Combine --ready --blocking for high-impact tasks (ready AND blocking)
- Add Blocks column to task table (inverse of Dependencies)
- Include blocks field in JSON output

This enables teams to quickly identify:
- What tasks can be started immediately (--ready)
- What tasks unlock the most work (--blocking)
- High-priority tasks for maximum throughput (--ready --blocking)
- Add TaskWithBlocks type and update ListTasksResult to use it
- Fix bug where --ready filter failed when combined with --status
  by fetching all tasks first, then applying status filter after
  ready/blocking filters compute their results
- Update filter method signatures to use TaskWithBlocks type
- Format code
Tasks with deferred or blocked status are intentionally not actionable,
so they should not appear when filtering for ready-to-work tasks.

Only pending, in-progress, and review statuses are considered actionable.
- Add Ready column to tags list showing count of ready-to-work tasks
- Ready = actionable status (pending/in-progress/review) + deps satisfied
- Add unit tests for ready count calculation
- Update changeset and PR description
Add --ready flag to 'tm tags list' that filters out tags with no ready
tasks available, making it easier to find tags that have parallelizable
work when managing multiple AI sessions.

- Filter tags to only those with ready tasks (readyTasks > 0)
- Update table rendering to use filtered list
- Add 3 tests for --ready filter functionality
- Update changeset with new feature
When filtering by --ready or --blocking, the dashboard statistics would
show misleading numbers (based on filtered tasks instead of all tasks).
Skip the dashboard display and suggested next steps when filters are
applied, keeping the output focused on the filtered task table.
The options were only available on the 'tags list' subcommand but not
on 'tags' directly. Now 'tm tags --ready' works as expected alongside
'tm tags list --ready'.
- Add --all-tags option that fetches and displays tasks from all tags
- Tag column shown as first column when using --all-tags for easy scanning
- Works with --ready to show all actionable tasks across the project
- Supports --json output with tagName field for each task
- Compact output shows tag prefix for each task
- Update changeset with new feature
- Fix --all-tags to only apply ready filter when --ready is specified
- Update help text to clarify --all-tags can be used without --ready
- Fix Biome formatting errors and import sorting
- Fix column widths for --all-tags display (Tag wider, Title visible)
- Add validation to prevent --all-tags with --watch mode
- Improve help text formatting
Track total task count before applying ready/blocking filters,
matching the behavior of getTasks. This ensures the 'total' field
always represents all tasks before filtering in both methods.
Apply the ready filter within each tag's loop iteration to respect
tag-scoped dependencies. Task IDs may overlap between tags, so filtering
globally would incorrectly consider a task ready if its dependency
happens to be complete in a different tag.
@Crunchyman-ralph Crunchyman-ralph force-pushed the 1532-list-blocks-ready-filter branch 2 times, most recently from 26af61f to 5c5b89c Compare January 14, 2026 20:12
- Move buildBlocksMap, filterReadyTasks, filterBlockingTasks to
  @tm/core/modules/tasks/utils for reuse across CLI and MCP
- Export TaskWithBlocks, InvalidDependency, BuildBlocksMapResult types
- Add ACTIONABLE_STATUSES constant to @tm/core
- Update tag-management.js to use @tm/core filtering utilities
- Move list.command.spec.ts alongside source file per CLAUDE.md guidelines
- Update test mocks to use real @tm/core implementations where possible
- Fix loop.command.spec.ts sandbox option in test setup

This addresses PR feedback to keep business logic in @tm/core
rather than presentation layers (CLI/MCP).
@Crunchyman-ralph Crunchyman-ralph force-pushed the 1532-list-blocks-ready-filter branch from 5c5b89c to 4970f7e Compare January 14, 2026 21:13
@Crunchyman-ralph Crunchyman-ralph merged commit 6c3a92c into eyaltoledano:next Jan 14, 2026
8 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jan 14, 2026
16 tasks
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.

3 participants