chore: add suggested improvements from coderabbit before merge#1565
chore: add suggested improvements from coderabbit before merge#1565Crunchyman-ralph wants to merge 2 commits intonextfrom
Conversation
|
📝 WalkthroughWalkthroughRemoved a readonly hint from an MCP autopilot tool and centralized task/subtask defaulting by adding normalization utilities; parsing, expansion, and update flows now delegate defaults to these helpers and tests/mocks updated accordingly. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (3)
🧰 Additional context used📓 Path-based instructions (13)**/*.ts📄 CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)
Files:
**/*.{js,ts}📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/mcp/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.js📄 CodeRabbit inference engine (.cursor/rules/architecture.mdc)
Files:
scripts/**/*.js📄 CodeRabbit inference engine (.cursor/rules/context_gathering.mdc)
Files:
scripts/modules/**/*📄 CodeRabbit inference engine (.cursor/rules/dev_workflow.mdc)
Files:
scripts/modules/*/[!.]*📄 CodeRabbit inference engine (.cursor/rules/tags.mdc)
Files:
scripts/modules/task-manager/**/*.{js,mjs}📄 CodeRabbit inference engine (.cursor/rules/tags.mdc)
Files:
scripts/modules/task-manager/**/*.js📄 CodeRabbit inference engine (.cursor/rules/telemetry.mdc)
Files:
**/*.{js,jsx}📄 CodeRabbit inference engine (.cursor/rules/test_workflow.mdc)
Files:
scripts/modules/task-manager/**/*.{js,ts}📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)
Files:
scripts/modules/**/*.{js,ts}📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)
Files:
🧠 Learnings (31)📓 Common learnings📚 Learning: 2025-11-24T18:02:36.388ZApplied to files:
📚 Learning: 2025-11-24T18:02:36.388ZApplied to files:
📚 Learning: 2025-11-24T18:02:36.388ZApplied to files:
📚 Learning: 2025-11-24T18:02:36.388ZApplied to files:
📚 Learning: 2025-11-24T18:02:36.388ZApplied to files:
📚 Learning: 2025-07-21T02:41:13.453ZApplied to files:
📚 Learning: 2025-11-24T17:59:18.662ZApplied to files:
📚 Learning: 2025-11-24T18:02:36.388ZApplied to files:
📚 Learning: 2025-11-24T17:58:07.992ZApplied to files:
📚 Learning: 2025-11-24T18:04:43.972ZApplied to files:
📚 Learning: 2025-11-24T18:01:44.169ZApplied to files:
📚 Learning: 2025-07-18T17:08:48.695ZApplied to files:
📚 Learning: 2025-11-24T17:59:00.056ZApplied to files:
📚 Learning: 2025-11-24T17:59:00.056ZApplied to files:
📚 Learning: 2025-11-24T18:04:43.972ZApplied to files:
📚 Learning: 2025-11-24T18:00:06.827ZApplied to files:
📚 Learning: 2025-11-24T18:04:43.972ZApplied to files:
📚 Learning: 2025-11-24T18:04:43.972ZApplied to files:
📚 Learning: 2025-11-24T18:02:49.782ZApplied to files:
📚 Learning: 2025-07-18T17:08:48.695ZApplied to files:
📚 Learning: 2025-07-18T17:09:40.548ZApplied to files:
📚 Learning: 2025-11-24T17:59:18.662ZApplied to files:
📚 Learning: 2025-07-20T01:35:05.831ZApplied to files:
📚 Learning: 2025-11-24T18:01:44.169ZApplied to files:
📚 Learning: 2025-11-24T17:59:18.662ZApplied to files:
📚 Learning: 2025-12-11T14:45:14.973ZApplied to files:
📚 Learning: 2025-11-24T18:05:02.114ZApplied to files:
📚 Learning: 2025-11-24T18:02:36.388ZApplied to files:
📚 Learning: 2025-07-18T17:09:40.548ZApplied to files:
📚 Learning: 2025-11-24T18:04:43.972ZApplied to files:
🧬 Code graph analysis (2)scripts/modules/task-manager/expand-task.js (1)
scripts/modules/task-manager/parse-prd/parse-prd-helpers.js (4)
⏰ 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)
🔇 Additional comments (6)
Comment |
Task normalization was using null for priority, details, and testStrategy which violates schema constraints. Now uses proper defaults matching parse-prd-helpers.js: status='pending', priority from config or 'medium', and empty strings for optional text fields. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
17f32d9 to
3d2eca1
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @apps/mcp/src/tools/autopilot/resume.tool.ts:
- Line 30: The resume auto-pilot tool currently uses readOnlyHint: false which
is inconsistent with other state-modifying tools; update the tool's annotation
to use destructiveHint: true instead of readOnlyHint: false in the tool
definition (the object that defines the "resume" tool in resume.tool.ts) so it
aligns with other state-modifying tools like abort/commit/complete/start; locate
the tool configuration object (export/default or the variable defining the
resume tool) and replace the readOnlyHint key with destructiveHint: true.
In @scripts/modules/task-manager/parse-prd/parse-prd-streaming.js:
- Around line 577-584: finalizeStreamingResults() currently returns
lastPartialObject.tasks directly in the streaming success path which skips
applying schema defaults; modify finalizeStreamingResults() to map over
lastPartialObject.tasks (or parsedTasks) and apply the same default mapping used
in the fallback path (ensure each task gets status, title, description,
dependencies, priority using context.defaultPriority fallback, details, and
testStrategy) before returning so both streaming and fallback paths produce
schema-compliant task objects.
In @scripts/modules/task-manager/update-tasks.js:
- Around line 246-253: The subtask mapping in update-tasks.js is adding an
invalid testStrategy property, missing defaults for title/description/details,
and returns null instead of undefined when clearing subtasks; update the
task.subtasks.map branch (the mapping applied to task.subtasks) to: omit
testStrategy entirely, ensure each subtask sets safe defaults title: '' ,
description: '' , details: '' , status: 'pending' , dependencies: [] (preserving
id if present), and change the fallback when task.subtasks is falsey to
undefined instead of null so it matches the rest of the codebase.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/mcp/src/tools/autopilot/resume.tool.tsscripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.jstests/unit/scripts/modules/task-manager/update-tasks.test.js
🧰 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:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.jstests/unit/scripts/modules/task-manager/update-tasks.test.js
scripts/**/*.js
📄 CodeRabbit inference engine (.cursor/rules/context_gathering.mdc)
scripts/**/*.js: Use theContextGathererclass fromscripts/modules/utils/contextGatherer.jsto extract context from multiple sources (tasks, files, custom text, project tree) with token counting usinggpt-tokenslibrary
InitializeContextGathererwith project root and tasks path, then callgather()method with tasks array, files array, customContext, includeProjectTree, format ('research', 'chat', or 'system-prompt'), and includeTokenCounts options
Use theFuzzyTaskSearchclass fromscripts/modules/utils/fuzzyTaskSearch.jsfor 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 usingboxenlibrary 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 usingcli-highlightlibrary to apply syntax highlighting to code blocks with language detection in the formatlanguage\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/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.js
scripts/modules/**/*
📄 CodeRabbit inference engine (.cursor/rules/dev_workflow.mdc)
Restart the MCP server if core logic in
scripts/modulesor MCP tool definitions change
Files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.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
UsereadJSON(tasksPath, projectRoot, tag)andwriteJSON(tasksPath, data, projectRoot, tag)for all task data access
Files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.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/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.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/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.jstests/unit/scripts/modules/task-manager/update-tasks.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:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsapps/mcp/src/tools/autopilot/resume.tool.tsscripts/modules/task-manager/update-tasks.jstests/unit/scripts/modules/task-manager/update-tasks.test.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/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.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/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.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/mcp/src/tools/autopilot/resume.tool.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Import modules with
.jsextension even in TypeScript source files for ESM compatibility
Files:
apps/mcp/src/tools/autopilot/resume.tool.ts
apps/mcp/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
MCP (@tm/mcp) should be a thin presentation layer that calls tm-core methods and returns MCP-formatted responses; handle only MCP-specific concerns like tool schemas, parameter validation, and response formatting
Files:
apps/mcp/src/tools/autopilot/resume.tool.ts
scripts/modules/*/[!.]*
📄 CodeRabbit inference engine (.cursor/rules/tags.mdc)
scripts/modules/*/[!.]*: All command files in Task Master must importgetCurrentTagfrom 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--tagflag, thengetCurrentTag(projectRoot), then default to 'master'
Find and validate project root in commands with error handling before processing tasks
Files:
scripts/modules/task-manager/update-tasks.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/scripts/modules/task-manager/update-tasks.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 intests.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/scripts/modules/task-manager/update-tasks.test.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.
Usejest.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, usejest.unstable_mockModule()beforeawait import(). Include__esModule: truein mock factories. Reset mock functions before dynamic import. Mock named and default exports as needed.
Mock file system operations usingmock-fslibrary. 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 usingmock.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'); mockreadJSONandwriteJSONto 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/scripts/modules/task-manager/update-tasks.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/scripts/modules/task-manager/update-tasks.test.js
🧠 Learnings (40)
📓 Common learnings
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.md : Update `CLAUDE.md` file with project-specific context, task summaries, and custom command examples for Claude Code integration
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1444
File: apps/cli/src/utils/auto-update/changelog.ts:103-111
Timestamp: 2025-11-25T18:32:29.828Z
Learning: The claude-task-master project uses a custom changelog format with PR numbers and author acknowledgements in the pattern `- [#PR](...) Thanks [author]! - Description`, which is parsed by the regex in apps/cli/src/utils/auto-update/changelog.ts.
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: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/tm-core/package.json:50-51
Timestamp: 2025-09-22T19:45:04.337Z
Learning: In the eyaltoledano/claude-task-master project, Crunchyman-ralph intentionally omits version fields from internal/private packages in package.json files to prevent changesets from releasing new versions of these packages while still allowing them to be processed for dependency updates. The changesets warnings about missing versions are acceptable as they don't break the process and achieve the desired behavior of only releasing public packages.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/build-config/package.json:14-15
Timestamp: 2025-09-22T19:45:13.323Z
Learning: In the eyaltoledano/claude-task-master repository, Crunchyman-ralph intentionally omits version fields from internal packages (like tm/build-config) to prevent changesets from releasing new versions for these packages. This is the desired behavior for internal tooling packages that should not be published or versioned independently.
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: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: 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/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
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/task-manager/**/*.{js,ts} : 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
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
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
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/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.417Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Use `config-manager.js` getters only for non-AI related application logic (e.g., `getDefaultSubtasks`), not for fetching AI parameters; the unified service handles AI parameter resolution internally based on the `role`
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/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.417Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Do not fetch AI-specific parameters (model ID, max tokens, temperature) using `config-manager.js` getters for AI calls; pass the `role` parameter instead to the unified service
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-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:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.jstests/unit/scripts/modules/task-manager/update-tasks.test.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:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.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/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.jstests/unit/scripts/modules/task-manager/update-tasks.test.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:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.js
📚 Learning: 2025-11-24T17:57:31.417Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.417Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Be aware of potential reliability issues with `generateObjectService` across different providers and complex schemas; prefer `generateTextService` + manual parsing for robustness
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.js
📚 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: Applies to assets/.taskmaster/docs/prd.md : Use `task-master parse-prd .taskmaster/docs/prd.md` to generate tasks from PRD document
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.jstests/unit/scripts/modules/task-manager/update-tasks.test.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 : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jstests/unit/scripts/modules/task-manager/update-tasks.test.js
📚 Learning: 2025-11-24T17:57:31.417Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.417Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Use `generateTextService` with robust manual JSON parsing and Zod validation instead of `generateObjectService` for structured output needs
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.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:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.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/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.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/parse-prd/parse-prd-streaming.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/parse-prd/parse-prd-streaming.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/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/update-tasks.jstests/unit/scripts/modules/task-manager/update-tasks.test.js
📚 Learning: 2025-11-24T17:57:31.417Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.417Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Use `config-manager.js` getters only for non-AI related application logic (e.g., `getDefaultSubtasks`), not for fetching AI parameters; the unified service handles AI parameter resolution internally based on the `role`
Applied to files:
scripts/modules/task-manager/update-tasks.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/task-manager/**/*.{js,ts} : Do not call AI-specific getters (like getMainModelId, getMainMaxTokens) from core logic functions in scripts/modules/task-manager/*. Instead, pass the role to the unified AI service
Applied to files:
scripts/modules/task-manager/update-tasks.js
📚 Learning: 2025-11-24T17:57:31.417Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.417Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Do not fetch AI-specific parameters (model ID, max tokens, temperature) using `config-manager.js` getters for AI calls; pass the `role` parameter instead to the unified service
Applied to files:
scripts/modules/task-manager/update-tasks.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/update-tasks.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 : Import context gathering utilities (`ContextGatherer`, `FuzzyTaskSearch`) for AI-powered commands; support multiple context types (tasks, files, custom text, project tree); implement detailed token breakdown display
Applied to files:
scripts/modules/task-manager/update-tasks.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 ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Applied to files:
scripts/modules/task-manager/update-tasks.js
📚 Learning: 2025-10-01T19:53:34.261Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1262
File: scripts/modules/task-manager/update-tasks.js:216-233
Timestamp: 2025-10-01T19:53:34.261Z
Learning: For scripts/modules/task-manager/*.js: Use generateObjectService with Zod schemas for structured AI responses rather than generateTextService + manual JSON parsing, as modern AI providers increasingly support the tool use and generateObject paradigm with improved reliability.
Applied to files:
scripts/modules/task-manager/update-tasks.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 : 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:
scripts/modules/task-manager/update-tasks.js
📚 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 : 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
Applied to files:
scripts/modules/task-manager/update-tasks.js
📚 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 : For context-aware AI commands: use ContextGatherer utility for multi-source context extraction, support task IDs/file paths/custom context, implement fuzzy search for task discovery, and display detailed token breakdown for transparency
Applied to files:
scripts/modules/task-manager/update-tasks.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/update-tasks.js
📚 Learning: 2025-11-24T18:02:22.305Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-11-24T18:02:22.305Z
Learning: AI-powered tools (parse_prd, analyze_project_complexity, update_subtask, update_task, update, expand_all, expand_task, add_task) may take up to a minute to complete and users should be informed to wait
Applied to files:
scripts/modules/task-manager/update-tasks.js
📚 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 must extract mainResult from aiServiceResponse and return an object that includes aiServiceResponse.telemetryData
Applied to files:
scripts/modules/task-manager/update-tasks.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Remove references to non-existent tasks during validation
Applied to files:
tests/unit/scripts/modules/task-manager/update-tasks.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 **/*.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/scripts/modules/task-manager/update-tasks.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 mcp-server/src/core/task-master-core.js : Update `task-master-core.js` by importing and re-exporting direct functions and adding them to the directFunctions map
Applied to files:
tests/unit/scripts/modules/task-manager/update-tasks.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/scripts/modules/task-manager/update-tasks.test.js
📚 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:
tests/unit/scripts/modules/task-manager/update-tasks.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 **/*.{js,ts} : Import and use specific getters from config-manager.js (e.g., getMainProvider(), getLogLevel(), getMainMaxTokens()) to access configuration values needed for application logic
Applied to files:
tests/unit/scripts/modules/task-manager/update-tasks.test.js
📚 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 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.
Applied to files:
tests/unit/scripts/modules/task-manager/update-tasks.test.js
📚 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:
tests/unit/scripts/modules/task-manager/update-tasks.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/config-manager.js : config-manager.js should load and validate .taskmasterconfig, provide getter functions (getMainProvider, getLogLevel, getDefaultSubtasks, etc.) for accessing settings, manage global.defaultTag and tags section for tag system settings, and NOT directly store or handle API keys
Applied to files:
tests/unit/scripts/modules/task-manager/update-tasks.test.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test
🔇 Additional comments (3)
tests/unit/scripts/modules/task-manager/update-tasks.test.js (1)
54-54: LGTM!The mock for
getDefaultPriorityreturning 'medium' correctly supports the test scenarios and aligns with the functional changes in update-tasks.js.scripts/modules/task-manager/update-tasks.js (2)
23-27: LGTM!The import statement correctly includes
getDefaultPriorityfrom config-manager.js, which is a non-AI configuration getter as per coding guidelines.
235-245: LGTM!The default value application for task fields correctly ensures non-null values that align with schema requirements. The defensive fallback to 'medium' for priority is appropriate.
| annotations: { | ||
| title: 'Resume Autopilot Workflow', | ||
| readOnlyHint: true | ||
| readOnlyHint: false |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# First, let's see the actual file content around line 30
echo "=== resume.tool.ts content ==="
cat -n apps/mcp/src/tools/autopilot/resume.tool.ts | head -40
echo -e "\n=== Other autopilot tools ==="
fd -e ts "autopilot.*\.tool\.ts" apps/mcp/src/tools/autopilot/
echo -e "\n=== readOnlyHint values across all autopilot tools ==="
for file in $(fd -e ts "autopilot.*\.tool\.ts" apps/mcp/src/tools/autopilot/); do
echo "--- $file ---"
rg -A 1 "readOnlyHint" "$file"
doneRepository: eyaltoledano/claude-task-master
Length of output: 1694
🏁 Script executed:
#!/bin/bash
# Check projectRoot parameter definition in resume.tool.ts
echo "=== projectRoot definition in resume.tool.ts ==="
cat -n apps/mcp/src/tools/autopilot/resume.tool.ts | sed -n '1,25p'
echo -e "\n=== Check for projectRoot validation in tmCore ==="
fd -e ts workflow packages/tm-core/src/ --exec grep -l "projectRoot" {}Repository: eyaltoledano/claude-task-master
Length of output: 1323
🏁 Script executed:
#!/bin/bash
# Check for path validation in tmCore workflow
echo "=== Searching for path validation in tmCore ==="
rg -n "projectRoot|validatePath|sanitize|path.resolve" packages/tm-core/src/ -A 2 | head -50Repository: eyaltoledano/claude-task-master
Length of output: 3244
🏁 Script executed:
#!/bin/bash
# Search for all MCP tool files
echo "=== All MCP tool files ==="
fd -e "\.tool\.ts" apps/mcp/src/tools/
echo -e "\n=== Check if other autopilot tool files exist ==="
ls -la apps/mcp/src/tools/autopilot/ 2>/dev/null || echo "Directory not found"Repository: eyaltoledano/claude-task-master
Length of output: 1233
🏁 Script executed:
#!/bin/bash
# Check tmCore path resolution and validation
echo "=== tmCore path resolution (around line 150) ==="
sed -n '145,160p' packages/tm-core/src/tm-core.ts
echo -e "\n=== Check for path validation in workflow service ==="
rg -n "projectRoot|projectPath" packages/tm-core/src/modules/workflow/services/workflow.service.ts -A 3 | head -40Repository: eyaltoledano/claude-task-master
Length of output: 1708
🏁 Script executed:
#!/bin/bash
# Check git history or any comments about why readOnlyHint was changed
echo "=== Searching for related comments or context ==="
rg -n "readOnlyHint" apps/mcp/src/tools/ -B 2 -A 2
echo -e "\n=== Check if there's any path.resolve or path validation for projectRoot ==="
rg -n "path\." apps/mcp/src/shared/ --type tsRepository: eyaltoledano/claude-task-master
Length of output: 2528
🏁 Script executed:
#!/bin/bash
# Check readOnlyHint in all autopilot tools
echo "=== readOnlyHint values in all autopilot tools ==="
for file in apps/mcp/src/tools/autopilot/*.tool.ts; do
echo "--- $(basename $file) ---"
sed -n '/readOnlyHint/p' "$file"
doneRepository: eyaltoledano/claude-task-master
Length of output: 376
🏁 Script executed:
#!/bin/bash
# Get more context on tools that modify state vs read-only
echo "=== Tool descriptions and readOnlyHint pattern ==="
for file in apps/mcp/src/tools/autopilot/*.tool.ts; do
echo "=== $(basename $file) ==="
sed -n '/description:/,/readOnlyHint/p' "$file" | head -5
doneRepository: eyaltoledano/claude-task-master
Length of output: 2424
🏁 Script executed:
#!/bin/bash
# Check if other autopilot tools have annotations blocks at all
echo "=== Full annotations block for each autopilot tool ==="
for file in apps/mcp/src/tools/autopilot/*.tool.ts; do
echo "=== $(basename $file) ==="
sed -n '/annotations:/,/}/p' "$file" | head -10
doneRepository: eyaltoledano/claude-task-master
Length of output: 986
🏁 Script executed:
#!/bin/bash
# Check if projectRoot is required or optional in other tools
echo "=== projectRoot parameter schema across autopilot tools ==="
for file in apps/mcp/src/tools/autopilot/*.tool.ts; do
echo "--- $(basename $file) ---"
rg -A 3 "projectRoot:" "$file" | head -8
doneRepository: eyaltoledano/claude-task-master
Length of output: 1079
Reconsider the annotation pattern for consistency with other autopilot tools.
The readOnlyHint: false change is inconsistent with the established patterns across autopilot tools:
- State-modifying tools (abort, commit, complete, finalize, start) use
destructiveHint: trueinstead ofreadOnlyHint: false - Read-only tools (next, status) use
readOnlyHint: true - Resume is the only tool using
readOnlyHint: false, standing alone without a consistent pattern
Since resume modifies workflow state (resumes a paused workflow), align it with other state-modifying tools by using destructiveHint: true, or document why it requires a unique annotation pattern.
Path validation through path.resolve() and git operations is adequate—no security concern.
🤖 Prompt for AI Agents
In @apps/mcp/src/tools/autopilot/resume.tool.ts at line 30, The resume
auto-pilot tool currently uses readOnlyHint: false which is inconsistent with
other state-modifying tools; update the tool's annotation to use
destructiveHint: true instead of readOnlyHint: false in the tool definition (the
object that defines the "resume" tool in resume.tool.ts) so it aligns with other
state-modifying tools like abort/commit/complete/start; locate the tool
configuration object (export/default or the variable defining the resume tool)
and replace the readOnlyHint key with destructiveHint: true.
| status: task.status ?? 'pending', | ||
| title: task.title ?? '', | ||
| description: task.description ?? '', | ||
| dependencies: task.dependencies ?? [], | ||
| priority: task.priority ?? null, | ||
| details: task.details ?? null, | ||
| testStrategy: task.testStrategy ?? null | ||
| priority: task.priority ?? context.defaultPriority ?? 'medium', | ||
| details: task.details ?? '', | ||
| testStrategy: task.testStrategy ?? '' | ||
| })); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Get file info and check size
wc -l scripts/modules/task-manager/parse-prd/parse-prd-streaming.js
stat scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsRepository: eyaltoledano/claude-task-master
Length of output: 202
🏁 Script executed:
#!/bin/bash
# Check the streaming path around line 464
sed -n '460,475p' scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsRepository: eyaltoledano/claude-task-master
Length of output: 349
🏁 Script executed:
#!/bin/bash
# Check the fallback path at lines 577-584
sed -n '570,590p' scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsRepository: eyaltoledano/claude-task-master
Length of output: 817
🏁 Script executed:
#!/bin/bash
# Search for where lastPartialObject.tasks is returned
rg -n 'lastPartialObject\.tasks' scripts/modules/task-manager/parse-prd/parse-prd-streaming.js -A 3 -B 3Repository: eyaltoledano/claude-task-master
Length of output: 758
🏁 Script executed:
#!/bin/bash
# Check what function contains the defaults (around 570-590)
sed -n '560,600p' scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsRepository: eyaltoledano/claude-task-master
Length of output: 1387
🏁 Script executed:
#!/bin/bash
# Look for where this function is called and understand the flow
rg -n 'finalizeStreamingResults|fallback' scripts/modules/task-manager/parse-prd/parse-prd-streaming.js | head -20Repository: eyaltoledano/claude-task-master
Length of output: 504
🏁 Script executed:
#!/bin/bash
# Check the function containing the defaults (likely the fallback function)
sed -n '537,560p' scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsRepository: eyaltoledano/claude-task-master
Length of output: 776
🏁 Script executed:
#!/bin/bash
# Verify the streaming path does not apply defaults
sed -n '442,470p' scripts/modules/task-manager/parse-prd/parse-prd-streaming.jsRepository: eyaltoledano/claude-task-master
Length of output: 958
🏁 Script executed:
#!/bin/bash
# Check if there are other places streaming results are returned or processed
rg -n 'usedFallback: false' scripts/modules/task-manager/parse-prd/parse-prd-streaming.js -A 5 -B 5Repository: eyaltoledano/claude-task-master
Length of output: 344
🏁 Script executed:
#!/bin/bash
# Verify the task schema requirements from learning
grep -r "subtasks" scripts/modules/task-manager/parse-prd/parse-prd-streaming.js | head -5Repository: eyaltoledano/claude-task-master
Length of output: 57
Apply defaults to streaming results to match fallback path behavior.
The streaming success path (line 464) returns lastPartialObject.tasks directly without applying schema defaults, while the fallback path (lines 577-584) maps through tasks to apply comprehensive defaults (status, title, description, dependencies, priority, details, testStrategy). This inconsistency could cause schema violations if the streaming response contains incomplete task data.
Apply the same default mapping in finalizeStreamingResults() before returning parsedTasks to ensure schema compliance across both code paths.
🤖 Prompt for AI Agents
In @scripts/modules/task-manager/parse-prd/parse-prd-streaming.js around lines
577 - 584, finalizeStreamingResults() currently returns lastPartialObject.tasks
directly in the streaming success path which skips applying schema defaults;
modify finalizeStreamingResults() to map over lastPartialObject.tasks (or
parsedTasks) and apply the same default mapping used in the fallback path
(ensure each task gets status, title, description, dependencies, priority using
context.defaultPriority fallback, details, and testStrategy) before returning so
both streaming and fallback paths produce schema-compliant task objects.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @apps/mcp/src/tools/autopilot/resume.tool.ts:
- Around line 28-30: The annotations block in resume.tool.ts currently only sets
title 'Resume Autopilot Workflow' and omitted the hint; update that annotations
object to include destructiveHint: true (replacing the previously suggested
readOnlyHint: false) so the resume tool aligns with other state-modifying
autopilot tools; locate the annotations object (annotations: { title: 'Resume
Autopilot Workflow' }) and add destructiveHint: true alongside the title.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
apps/mcp/src/tools/autopilot/resume.tool.tsscripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-non-streaming.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.jsscripts/modules/task-manager/update-tasks.js
✅ Files skipped from review due to trivial changes (1)
- scripts/modules/task-manager/parse-prd/parse-prd-non-streaming.js
🚧 Files skipped from review as they are similar to previous changes (1)
- scripts/modules/task-manager/update-tasks.js
🧰 Additional context used
📓 Path-based instructions (13)
**/*.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/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.js
scripts/**/*.js
📄 CodeRabbit inference engine (.cursor/rules/context_gathering.mdc)
scripts/**/*.js: Use theContextGathererclass fromscripts/modules/utils/contextGatherer.jsto extract context from multiple sources (tasks, files, custom text, project tree) with token counting usinggpt-tokenslibrary
InitializeContextGathererwith project root and tasks path, then callgather()method with tasks array, files array, customContext, includeProjectTree, format ('research', 'chat', or 'system-prompt'), and includeTokenCounts options
Use theFuzzyTaskSearchclass fromscripts/modules/utils/fuzzyTaskSearch.jsfor 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 usingboxenlibrary 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 usingcli-highlightlibrary to apply syntax highlighting to code blocks with language detection in the formatlanguage\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/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.js
scripts/modules/**/*
📄 CodeRabbit inference engine (.cursor/rules/dev_workflow.mdc)
Restart the MCP server if core logic in
scripts/modulesor MCP tool definitions change
Files:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.js
scripts/modules/*/[!.]*
📄 CodeRabbit inference engine (.cursor/rules/tags.mdc)
scripts/modules/*/[!.]*: All command files in Task Master must importgetCurrentTagfrom 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--tagflag, thengetCurrentTag(projectRoot), then default to 'master'
Find and validate project root in commands with error handling before processing tasks
Files:
scripts/modules/task-manager/expand-task.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
UsereadJSON(tasksPath, projectRoot, tag)andwriteJSON(tasksPath, data, projectRoot, tag)for all task data access
Files:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsapps/mcp/src/tools/autopilot/resume.tool.tsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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/mcp/src/tools/autopilot/resume.tool.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Import modules with
.jsextension even in TypeScript source files for ESM compatibility
Files:
apps/mcp/src/tools/autopilot/resume.tool.ts
apps/mcp/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
MCP (@tm/mcp) should be a thin presentation layer that calls tm-core methods and returns MCP-formatted responses; handle only MCP-specific concerns like tool schemas, parameter validation, and response formatting
Files:
apps/mcp/src/tools/autopilot/resume.tool.ts
🧠 Learnings (40)
📓 Common learnings
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.md : Update `CLAUDE.md` file with project-specific context, task summaries, and custom command examples for Claude Code integration
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: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1444
File: apps/cli/src/utils/auto-update/changelog.ts:103-111
Timestamp: 2025-11-25T18:32:29.828Z
Learning: The claude-task-master project uses a custom changelog format with PR numbers and author acknowledgements in the pattern `- [#PR](...) Thanks [author]! - Description`, which is parsed by the regex in apps/cli/src/utils/auto-update/changelog.ts.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/tm-core/package.json:50-51
Timestamp: 2025-09-22T19:45:04.337Z
Learning: In the eyaltoledano/claude-task-master project, Crunchyman-ralph intentionally omits version fields from internal/private packages in package.json files to prevent changesets from releasing new versions of these packages while still allowing them to be processed for dependency updates. The changesets warnings about missing versions are acceptable as they don't break the process and achieve the desired behavior of only releasing public packages.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1232
File: packages/build-config/package.json:14-15
Timestamp: 2025-09-22T19:45:13.323Z
Learning: In the eyaltoledano/claude-task-master repository, Crunchyman-ralph intentionally omits version fields from internal packages (like tm/build-config) to prevent changesets from releasing new versions for these packages. This is the desired behavior for internal tooling packages that should not be published or versioned independently.
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/utilities.mdc:0-0
Timestamp: 2025-11-24T18:04:43.972Z
Learning: Applies to mcp-server/src/tools/**/*.{js,ts} : Use processMCPResponseData(taskOrData, fieldsToRemove) utility to filter potentially sensitive or large fields (like details, testStrategy) from task objects before sending responses
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/tools/*.js : Use snake_case for MCP tool names exposed to clients (e.g., list_tasks, set_task_status)
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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 : 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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Allow numeric subtask IDs to reference other subtasks within the same parent
Applied to files:
scripts/modules/task-manager/expand-task.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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.js
📚 Learning: 2025-07-18T17:10:02.683Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-07-18T17:10:02.683Z
Learning: When breaking down complex tasks in Taskmaster, use the `expand_task` command with appropriate flags (`--num`, `--research`, `--force`, `--prompt`) and review generated subtasks for accuracy.
Applied to files:
scripts/modules/task-manager/expand-task.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 : Import context gathering utilities (`ContextGatherer`, `FuzzyTaskSearch`) for AI-powered commands; support multiple context types (tasks, files, custom text, project tree); implement detailed token breakdown display
Applied to files:
scripts/modules/task-manager/expand-task.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : 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/expand-task.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 : 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
Applied to files:
scripts/modules/task-manager/expand-task.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 : 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:
scripts/modules/task-manager/expand-task.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:
scripts/modules/task-manager/expand-task.js
📚 Learning: 2025-11-24T18:00:06.827Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:06.827Z
Learning: Initialize projects using `task-master init` or `task-master parse-prd` to generate initial tasks.json with tagged structure
Applied to files:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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 ContextGatherer class from utils/contextGatherer.js for AI-powered commands that need project context, supporting tasks, files, custom text, and project tree context
Applied to files:
scripts/modules/task-manager/expand-task.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 FuzzyTaskSearch class from utils/fuzzyTaskSearch.js for automatic task relevance detection with configurable search parameters
Applied to files:
scripts/modules/task-manager/expand-task.js
📚 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 must extract mainResult from aiServiceResponse and return an object that includes aiServiceResponse.telemetryData
Applied to files:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 Learning: 2025-07-18T17:08:48.695Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/commands.mdc:0-0
Timestamp: 2025-07-18T17:08:48.695Z
Learning: Applies to scripts/modules/commands.js : Follow the provided structure for adding subtasks, including required options and detailed error handling.
Applied to files:
scripts/modules/task-manager/expand-task.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:
scripts/modules/task-manager/expand-task.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Support both task and subtask dependencies in cycle detection
Applied to files:
scripts/modules/task-manager/expand-task.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:
scripts/modules/task-manager/expand-task.jsscripts/modules/task-manager/parse-prd/parse-prd-helpers.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/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 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: Applies to assets/.taskmaster/docs/prd.md : Use `task-master parse-prd .taskmaster/docs/prd.md` to generate tasks from PRD document
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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:
scripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 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: Start new projects with `task-master init` or `task-master parse-prd --input=<prd-file.txt>` to generate initial tasks.json
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-helpers.jsscripts/modules/task-manager/parse-prd/parse-prd-streaming.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 : Assign unique sequential IDs to tasks within each tag context by calculating the next ID based on existing tasks (highest existing ID + 1) rather than hardcoding or reusing IDs
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-helpers.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Represent task dependencies as arrays of task IDs
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-helpers.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} : Create utilities for consistent task ID handling that support different ID formats (numeric, string, dot notation)
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-helpers.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 : Check for and remove references to non-existent tasks and self-references during cleanup, tracking and reporting changes made during cleanup
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Remove references to non-existent tasks during validation
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 Learning: 2025-07-18T17:09:40.548Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dependencies.mdc:0-0
Timestamp: 2025-07-18T17:09:40.548Z
Learning: Applies to scripts/modules/dependency-manager.js : Check for and remove references to non-existent tasks during cleanup
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 Learning: 2025-11-24T17:57:31.417Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.417Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Be aware of potential reliability issues with `generateObjectService` across different providers and complex schemas; prefer `generateTextService` + manual parsing for robustness
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 Learning: 2025-07-18T05:38:17.352Z
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 943
File: scripts/modules/task-manager/move-task.js:24-24
Timestamp: 2025-07-18T05:38:17.352Z
Learning: In the Claude Task Master system, core task-manager functions are designed with fallback mechanisms for missing projectRoot parameters using the pattern `const projectRoot = providedProjectRoot || findProjectRoot();`. The readJSON and writeJSON functions have default parameters (projectRoot = null, tag = null) and handle missing parameters gracefully. Adding strict validation to these core functions would break the established flexible architecture pattern.
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 Learning: 2025-11-24T17:57:31.417Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_services.mdc:0-0
Timestamp: 2025-11-24T17:57:31.417Z
Learning: Applies to scripts/modules/task-manager/*.js, scripts/modules/commands.js : Do not implement fallback or retry logic outside `ai-services-unified.js`; all fallback sequences and retry logic must be centralized in the unified service
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.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 : 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
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 Learning: 2025-11-24T18:02:22.305Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/taskmaster.mdc:0-0
Timestamp: 2025-11-24T18:02:22.305Z
Learning: After project initialization with 'init', parse a PRD using parse_prd before attempting any other operations, as no task files will exist until then
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.js
📚 Learning: 2025-11-24T18:00:06.827Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-11-24T18:00:06.827Z
Learning: For large feature initiatives, create a dedicated task context (tag), draft a PRD collaboratively, then use `task-master parse-prd` to generate tasks within that tag
Applied to files:
scripts/modules/task-manager/parse-prd/parse-prd-streaming.js
🧬 Code graph analysis (2)
scripts/modules/task-manager/expand-task.js (1)
scripts/modules/task-manager/parse-prd/parse-prd-helpers.js (1)
normalizeSubtask(33-42)
scripts/modules/task-manager/parse-prd/parse-prd-helpers.js (6)
scripts/modules/task-manager/update-subtask-by-id.js (1)
subtask(165-165)scripts/modules/task-manager/expand-task.js (1)
task(105-105)scripts/modules/task-manager/parse-prd/parse-prd-streaming.js (5)
task(381-381)task(504-504)task(520-520)task(581-581)tasks(572-572)scripts/modules/task-manager/scope-adjustment.js (4)
task(644-644)task(795-795)tasks(629-629)tasks(780-780)scripts/modules/task-manager/update-tasks.js (1)
defaultPriority(233-233)scripts/modules/task-manager/parse-prd/parse-prd.js (1)
defaultPriority(76-76)
🔇 Additional comments (8)
scripts/modules/task-manager/expand-task.js (2)
25-25: LGTM - Centralized normalization improves maintainability.The import of
normalizeSubtasksupports the refactoring to centralize task normalization logic across the codebase.
335-337: LGTM - Consistent subtask normalization.Delegating to
normalizeSubtaskensures AI-generated subtasks receive consistent schema defaults (status='pending', empty strings for text fields, empty arrays for dependencies). This aligns with the PR objective to standardize default handling.scripts/modules/task-manager/parse-prd/parse-prd-helpers.js (4)
33-42: LGTM - Subtask normalization is correct.The function applies appropriate schema defaults for subtasks (status, title, description, details, dependencies). Subtasks correctly omit task-only fields like
priorityandtestStrategy.
50-64: LGTM - Task normalization handles all required fields.The function correctly applies defaults for all task fields per the PR objectives: status defaults to 'pending', priority uses the provided default (from config), and optional text fields default to empty strings. Recursive normalization of subtasks ensures consistency throughout the task hierarchy.
72-75: LGTM - Safe array handling.The function correctly handles non-array input by returning an empty array, preventing downstream errors.
193-204: LGTM - Normalization integrated into task processing.The updated logic applies
normalizeTaskbefore ID remapping, ensuring all schema defaults are in place. Line 203'snormalized.subtasks || []correctly ensures subtasks is always an array in processed output, even if the normalized task preservedundefinedto distinguish "no subtasks defined" from "explicitly empty."scripts/modules/task-manager/parse-prd/parse-prd-streaming.js (2)
574-609: Consistent defaults deferral resolves streaming vs. fallback inconsistency.Removing inline defaults application from the fallback path and deferring to
processTasks(same as the streaming path) creates consistency between both code paths. This addresses the past review comment about inconsistent default handling.Additionally, removing the previous inline defaults that set
priority,details, andtestStrategytonullaligns with the PR objective to avoid null values for these fields.
463-470: ✓ Correct implementation of deferred normalization.The change properly defers schema defaults to
processTasks, which invokesnormalizeTaskon every task. This ensures consistent application of all required defaults across both streaming and non-streaming paths:status→ "pending",priority→ config default or "medium",details→ "",testStrategy→ "", anddependencies→ [].
526e99d to
ed87b4c
Compare
|
closing as stale |
What type of PR is this?
Description
Related Issues
How to Test This
# Example commands or stepsExpected result:
Contributor Checklist
npm run changesetnpm testnpm run format-check(ornpm run formatto fix)Changelog Entry
For Maintainers
Summary by CodeRabbit
New Features
Bug Fixes
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.