Skip to content

Release 0.37.2#1498

Merged
Crunchyman-ralph merged 11 commits intomainfrom
next
Dec 11, 2025
Merged

Release 0.37.2#1498
Crunchyman-ralph merged 11 commits intomainfrom
next

Conversation

@Crunchyman-ralph
Copy link
Collaborator

@Crunchyman-ralph Crunchyman-ralph commented Dec 10, 2025

What type of PR is this?

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

Description

Related Issues

How to Test This

# Example commands or steps

Expected result:

Contributor Checklist

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

Changelog Entry


For Maintainers

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

Summary by CodeRabbit

  • New Features

    • Added finalize command for completing TDD workflows
    • Introduced MCP tool tiers with "core" (default) and "all" options
  • Bug Fixes

    • Fixed login issues when browsers or firewalls block CLI authentication
    • Resolved workflow startup failures on master Taskmaster tag
    • Improved task ID validation with schema-based parsing
  • Changes

    • Updated autopilot branch names to use tm/<org-slug>/task-<id> prefix
    • Changed default MCP tool set from all (36 tools) to core (7 essential tools)
    • Enhanced CLI authentication with backend-managed PKCE flow

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

@changeset-bot
Copy link

changeset-bot bot commented Dec 10, 2025

🦋 Changeset detected

Latest commit: 3cf3825

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

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

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

Walkthrough

This PR refactors the autopilot workflow system to centralize around a createTmCore facade, introduces configurable MCP tool tiers via TASK_MASTER_TOOLS, migrates CLI authentication from local callback server to backend-managed PKCE flow with RSA-AES E2E encryption, adds Zod-based task ID schema validation with normalization, adds a new finalize workflow command, updates GitHub workflows for Claude integration, and updates documentation and tests accordingly.

Changes

Cohort / File(s) Change Summary
Autopilot Commands Refactoring
apps/cli/src/commands/autopilot/{start,resume,next,status,complete,abort}.command.ts
Replaced direct WorkflowOrchestrator/WorkflowService usage with createTmCore facade; updated status derivation to use tmCore.workflow.* methods; adjusted error handling and output to reference status object fields.
New Finalize Command & Registration
apps/cli/src/commands/autopilot/{finalize.command.ts,index.ts}
Added new FinalizeCommand and registered as subcommand in autopilot workflow sequence.
Autopilot Shared Utilities
apps/cli/src/commands/autopilot/shared.ts
Removed legacy state-management exports (loadWorkflowState, saveWorkflowState, etc.) and task validation helpers (validateTaskId, parseSubtasks).
CLI Command Updates
apps/cli/src/commands/{show,set-status}.command.ts
Replaced normalization with schema-based validation using TaskIdSchema; added explicit error handling and early exit for invalid IDs.
Task ID Schemas & Validation
packages/tm-core/src/common/schemas/{task-id.schema.ts,task-id.schema.spec.ts,index.ts}
Introduced Zod-based TaskIdSchema, MainTaskIdSchema, and MCP variants; added normalizeDisplayId() function; includes comprehensive test coverage.
Task ID Validation Module
packages/tm-core/src/modules/tasks/validation/task-id.ts
Updated TASK_ID_PATTERN regex; integrated normalizeDisplayId() for output normalization.
Authentication Flow Refactor
packages/tm-core/src/modules/auth/{services/oauth-service.ts,utils/cli-crypto.ts,utils/index.ts,types.ts}
Replaced local HTTP callback server with backend-managed PKCE flow; added RSA keypair generation and AES-256-GCM token decryption; updated AuthErrorCode types.
Auth Module Cleanup
packages/tm-core/src/modules/auth/index.ts
Removed CliData export.
Workflow Service Enhancement
packages/tm-core/src/modules/workflow/{services/workflow.service.ts,types.ts,workflow-domain.ts}
Added task status updater interface; extended StartWorkflowOptions with orgSlug; refactored branch naming to use tm/ prefix; introduced dependency injection for status updates; made WorkflowService lazy-loaded and reset between lifecycle transitions.
Template Engine
packages/tm-core/src/modules/git/services/template-engine.spec.ts
Added tests for new preservePlaceholders option.
Core Module Exports
packages/tm-core/src/{index.ts,common/utils/index.ts}
Added re-export of schemas barrel; added TaskStatusUpdater and WorkflowServiceOptions type exports; moved normalizeDisplayId to schemas module.
TM Core Bootstrap
packages/tm-core/src/tm-core.ts
Added wiring of TasksDomain to WorkflowDomain for cross-domain dependency injection.
MCP Tools Refactoring
apps/mcp/src/tools/autopilot/{abort,commit,complete,finalize,next,resume,start}.tool.ts
Replaced direct WorkflowService usage with tmCore.workflow API from ToolContext; updated task ID validation where applicable.
MCP Tool Registration
mcp-server/src/tools/index.js
Changed default toolMode from 'all' to 'core'; added environment variable handling.
MCP Configuration Setup
src/utils/create-mcp-config.js
Added TASK_MASTER_TOOLS: 'core' to MCP server environment variables.
Documentation Updates
apps/docs/capabilities/mcp.mdx,apps/docs/getting-started/quick-start/configuration-quick.mdx,docs/configuration.md,assets/{AGENTS.md,rules/taskmaster.mdc},.taskmaster/CLAUDE.md
Updated default tool tier from "all" to "core"; documented MCP tool tiers and environment variable configuration.
GitHub Workflows
.github/workflows/{claude-trigger,claude-updater,claude}.yml
Updated Claude action from beta to v1; added environment variables for commit data; extended prompt with commit details; adjusted permissions.
Changeset & Changelog
.changeset/{six-eels-send.md,three-webs-drive.md},CHANGELOG.md
Added changeset entries for login fix (#1492) and tm/ branch prefix (#1491); updated changelog with patch version 0.37.2-rc.0.
Project Configuration
package.json,.gitignore
Bumped version to 0.37.2-rc.0; updated dependencies (@ai-sdk/google-vertex, ai-sdk-provider-claude-code, @anthropic-ai/claude-code); removed Task files from .gitignore.
CLI Integration Tests
apps/cli/tests/integration/commands/autopilot/workflow.test.ts
Removed legacy workflow integration test file.
Unit Tests
apps/cli/tests/unit/commands/autopilot/shared.test.ts,packages/tm-core/tests/integration/workflow/autopilot-workflow.test.ts,tests/unit/mcp/tools/tool-registration.test.js
Removed tests for deleted utilities; added comprehensive workflow integration tests; updated tool registration tests for new toolMode parameter.
Workflow Orchestrator Tests
packages/tm-core/src/modules/workflow/orchestrators/workflow-orchestrator.spec.ts
Refactored tests to handle asynchronous transition behavior.
Scripts & Utilities
scripts/modules/commands.js,context7.json
Added imports for model-related functions; added context configuration file.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI Command
    participant tmCore as TM Core Facade
    participant WS as Workflow Service
    participant Orchestrator as Workflow Orchestrator
    participant Git as Git Adapter
    participant AuthStore as Auth/State Store

    CLI->>tmCore: createTmCore({ projectPath })
    tmCore->>WS: initialize with projectRoot
    tmCore->>WS: setTasksDomain(for status updates)
    
    alt Start Workflow
        CLI->>tmCore: workflow.start(taskId, subtasks, options)
        tmCore->>WS: startWorkflow()
        WS->>Git: createBranch(tm/{orgSlug|tag}/...)
        WS->>Orchestrator: initialize & transition to SUBTASK_LOOP
        WS->>AuthStore: persist workflow state
        WS-->>tmCore: return status
        tmCore-->>CLI: status with taskId, phase, branchName
    end

    alt Resume & Progress
        CLI->>tmCore: workflow.resume()
        tmCore->>AuthStore: loadWorkflowState()
        tmCore->>Orchestrator: restore & resume
        tmCore->>WS: getStatus()
        WS-->>tmCore: current status + phase
        tmCore-->>CLI: status
    end

    alt Finalize
        CLI->>tmCore: workflow.finalize()
        tmCore->>WS: finalizeWorkflow()
        WS->>AuthStore: delete state file
        WS->>AuthStore: updateTaskStatus(DONE) via updater
        WS-->>tmCore: final status
        tmCore-->>CLI: success with results
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Areas requiring extra attention:

  • Authentication flow refactor (packages/tm-core/src/modules/auth/services/oauth-service.ts, cli-crypto.ts): Backend PKCE flow with RSA-AES encryption introduces new cryptographic operations and error paths; verify key management, decryption logic, and error handling align with security expectations.
  • Task status updater dependency injection (packages/tm-core/src/modules/workflow/workflow-domain.ts, workflow.service.ts): Cross-domain dependency wiring with lazy WorkflowService initialization; ensure status updates propagate correctly and service resets don't cause state inconsistencies.
  • Autopilot command consistency (apps/cli/src/commands/autopilot/*): Multiple commands refactored to use createTmCore; verify all code paths (error handling, phase checks, output formatting) are consistent across all commands.
  • Task ID schema validation (packages/tm-core/src/common/schemas/task-id.schema.ts, packages/tm-core/src/modules/tasks/validation/task-id.ts): New normalization patterns and regex changes; test edge cases for API-style IDs (e.g., "ham-1", "HAM1", "1.2") and ensure no regressions in subtask handling.
  • MCP tool context changes (apps/mcp/src/tools/autopilot/*.tool.ts): All tools now receive tmCore via ToolContext; verify tool execution context initialization and that all tools properly destructure tmCore.
  • GitHub workflow updates (.github/workflows/*.yml): Claude action upgrade and environment variable handling; ensure commit data is correctly captured and passed through the workflow chain.
  • Workflow integration tests (packages/tm-core/tests/integration/workflow/autopilot-workflow.test.ts): New comprehensive suite replaces deleted tests; verify mocking and assertions correctly validate the refactored tmCore-based API surface.

Possibly related PRs

Suggested reviewers

  • eyaltoledano

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Release 0.37.2' is directly related to the changeset. The raw summary shows version bump from 0.37.1-rc.0 to 0.37.2-rc.0 in package.json and corresponding changelog entries.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch next

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3b29010 and 757a26e.

📒 Files selected for processing (1)
  • scripts/modules/commands.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
scripts/modules/commands.js

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

commands.js should parse command-line arguments and options, invoke appropriate core logic functions from scripts/modules/, handle user input/output for CLI, and implement CLI-specific validation

scripts/modules/commands.js: Follow the basic command template structure when implementing CLI commands: use .command(), .description(), .option(), and .action() in Commander.js with concise action handlers that extract functionality to core modules
Keep command action handlers concise and focused; extract core functionality to appropriate modules like task-manager.js or init.js rather than implementing business logic in handlers
Use kebab-case for command names (e.g., 'analyze-complexity', 'remove-task') and action-oriented descriptions
Use kebab-case for long-form option names (e.g., --output-format) with single-letter shortcuts when appropriate (e.g., -f, --file), and access them in code as camelCase properties (e.g., options.numTasks)
Use positive flags with --skip- prefix for disabling behavior instead of --no- prefix negated flags; use clear variable naming like const generateFiles = !options.skipGenerate to avoid double negatives
Include confirmation prompts by default for destructive operations (delete/remove commands) with a --yes or -y flag to skip confirmation; display what will be deleted in the confirmation message
For file path handling in destructive operations: use path.join() to construct paths, follow naming conventions (e.g., task_001.txt), check file existence before deletion, and handle errors gracefully without string concatenation
Clean up references to deleted items in other parts of the data after destructive operations, handling both direct and indirect references with explanatory console logging
Regenerate task files after destructive operations by explicitly passing all required parameters to generation functions; provide a --skip-generate option if needed
Suggest non-destructive alternatives (like status changes instead of deletion)...

Files:

  • scripts/modules/commands.js
**/*.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/commands.js
scripts/**/*.js

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

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

Files:

  • scripts/modules/commands.js
scripts/modules/**/*

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

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

Files:

  • scripts/modules/commands.js
scripts/modules/*.js

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

When implementing MCP support for a command, ensure the core logic function can suppress console output via an outputFormat parameter or other mechanism

scripts/modules/*.js: Use consistent file naming conventions: task_${id.toString().padStart(3, '0')}.txt for task files; use path.join() for composing paths; use appropriate extensions (.txt for tasks, .json for data)
Export all core functions, helper functions, and utility methods needed by dependent code from their respective modules; explicitly verify module export blocks at the bottom of files
Use structured error objects with code and message properties; include clear error messages; handle both function-specific and file system errors; log errors at appropriate severity levels
Use isSilentMode() function to check global silent mode status; wrap core function calls within direct functions using enableSilentMode() and disableSilentMode() in try/finally blocks if the core function produces console output not reliably controlled by outputFormat parameter
Ensure AI calls correctly handle and propagate telemetryData as described in telemetry.mdc
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
Prefer generateTextService for calls sending large context (like stringified JSON) where incremental display is not needed; import necessary service functions from ai-services-unified.js and prepare parameters (role, session, systemPrompt, prompt)
Create a clear unidirectional flow of dependencies between modules; separate business logic from UI rendering to avoid circular dependencies
Design functions to accept dependencies as parameters; avoid hard-coded dependencies that are difficult to mock
Keep pure logic separate from I/O operations or UI rendering to allow testing logic without mocking complex dependencies
Design core logic to work wi...

Files:

  • scripts/modules/commands.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/commands.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/commands.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/commands.js
🧠 Learnings (20)
📓 Common learnings
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/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: 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: 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/glossary.mdc:0-0
Timestamp: 2025-11-24T18:00:32.617Z
Learning: Refer to new_features.mdc for guidelines on integrating new features into the Task Master CLI with tagged system considerations
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/hamster.mdc:0-0
Timestamp: 2025-12-01T20:55:21.627Z
Learning: Follow standard Git workflow patterns from git_workflow.mdc including: create task-specific branches named `task-XXX`, commit subtask work incrementally, create PRs after task completion, and follow commit message standards
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1002
File: .changeset/puny-friends-give.md:2-3
Timestamp: 2025-07-17T21:33:57.585Z
Learning: In the eyaltoledano/claude-task-master repository, the MCP server code in mcp-server/src/ is part of the main "task-master-ai" package, not a separate "mcp-server" package. When creating changesets for MCP server changes, use "task-master-ai" as the package name.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/auth/config.ts:5-7
Timestamp: 2025-09-02T21:51:27.921Z
Learning: The user Crunchyman-ralph prefers not to use node: scheme imports (e.g., 'node:os', 'node:path') for Node.js core modules and considers suggestions to change bare imports to node: scheme as too nitpicky.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1069
File: .changeset/fix-tag-complexity-detection.md:0-0
Timestamp: 2025-08-02T15:33:22.656Z
Learning: For changeset files (.changeset/*.md), Crunchyman-ralph prefers to ignore formatting nitpicks about blank lines between frontmatter and descriptions, as he doesn't mind having them and wants to avoid such comments in future reviews.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1132
File: .github/workflows/weekly-metrics-discord.yml:81-93
Timestamp: 2025-08-13T22:10:46.958Z
Learning: Crunchyman-ralph ignores YAML formatting nitpicks about trailing spaces when there's no project-specific YAML formatter configured, preferring to focus on functionality over cosmetic formatting issues.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1105
File: scripts/modules/supported-models.json:242-254
Timestamp: 2025-08-08T11:33:15.297Z
Learning: Preference: In scripts/modules/supported-models.json, the "name" field is optional. For OpenAI entries (e.g., "gpt-5"), Crunchyman-ralph prefers omitting "name" when the id is explicit enough; avoid nitpicks requesting a "name" in such cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1200
File: src/ai-providers/custom-sdk/grok-cli/language-model.js:96-100
Timestamp: 2025-09-19T16:06:42.182Z
Learning: The user Crunchyman-ralph prefers to keep environment variable names explicit (like GROK_CLI_API_KEY) rather than supporting multiple aliases, to avoid overlap and ensure clear separation between different CLI implementations.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1178
File: packages/tm-core/src/subpath-exports.test.ts:6-9
Timestamp: 2025-09-03T12:45:30.724Z
Learning: The user Crunchyman-ralph prefers to avoid overly nitpicky or detailed suggestions in code reviews, especially for test coverage of minor import paths. Focus on more substantial issues rather than comprehensive coverage of all possible edge cases.
Learnt from: Crunchyman-ralph
Repo: eyaltoledano/claude-task-master PR: 1217
File: apps/cli/src/index.ts:16-21
Timestamp: 2025-09-18T16:35:35.147Z
Learning: The user Crunchyman-ralph considers suggestions to export types for better ergonomics (like exporting UpdateInfo type alongside related functions) as nitpicky and prefers not to implement such suggestions.
📚 Learning: 2025-11-24T17:58:07.992Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/architecture.mdc:0-0
Timestamp: 2025-11-24T17:58:07.992Z
Learning: The Task Master CLI uses a modular architecture with distinct modules responsible for different aspects: commands.js (CLI command handling), task-manager.js (task data & core logic), dependency-manager.js (dependency management), ui.js (output formatting), ai-services-unified.js (unified AI service layer), config-manager.js (configuration management), utils.js (core utility functions), and mcp-server/ (MCP interface)

Applied to files:

  • scripts/modules/commands.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/commands.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/commands.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: Applies to .taskmaster/config.json : Store non-API key settings like model selections and `MAX_TOKENS` in `.taskmaster/config.json`, managed via `task-master models` command, not environment variables

Applied to files:

  • scripts/modules/commands.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/commands.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, scripts/modules/ai-services-unified.js : Do not import or call anything from deprecated AI service files (`ai-services.js`, `ai-client-factory.js`, `ai-client-utils.js`)

Applied to files:

  • scripts/modules/commands.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: Applies to .taskmaster/config.json : The .taskmaster/config.json file stores AI model configuration (main, research, fallback models) managed via 'task-master models' command

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-11-24T18:05:23.901Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: assets/AGENTS.md:0-0
Timestamp: 2025-11-24T18:05:23.901Z
Learning: Applies to assets/.taskmaster/config.json : Use `.taskmaster/config.json` for AI model configuration and only modify it using `task-master models` command, never manually edit

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-11-24T17:57:14.743Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_providers.mdc:0-0
Timestamp: 2025-11-24T17:57:14.743Z
Learning: Use the `models` MCP tool or the `task-master models` CLI command to manage AI configurations

Applied to files:

  • scripts/modules/commands.js
📚 Learning: 2025-11-24T17:57:14.743Z
Learnt from: CR
Repo: eyaltoledano/claude-task-master PR: 0
File: .cursor/rules/ai_providers.mdc:0-0
Timestamp: 2025-11-24T17:57:14.743Z
Learning: Applies to scripts/modules/config-manager.js : In `scripts/modules/config-manager.js`, update `MODEL_MAP` to include the new provider, ensure `VALID_PROVIDERS` includes the provider, update API key handling in `keyMap` and the `switch` statement in `getMcpApiKeyStatus` and `isApiKeySet`

Applied to files:

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

Applied to files:

  • scripts/modules/commands.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/commands.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} : Use `readJSON(tasksPath, projectRoot, tag)` and `writeJSON(tasksPath, data, projectRoot, tag)` for all task data access

Applied to files:

  • scripts/modules/commands.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/commands.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/*/[!.]* : All command files in Task Master must import `getCurrentTag` from utils.js for tag-aware operations

Applied to files:

  • scripts/modules/commands.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:

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

Applied to files:

  • scripts/modules/commands.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:

  • scripts/modules/commands.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/commands.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). (2)
  • GitHub Check: Test
  • GitHub Check: Test
🔇 Additional comments (1)
scripts/modules/commands.js (1)

50-55: Model helpers imported from correct module and wired into CLI models command

The new import of getApiKeyStatusReport, getAvailableModelsList, getModelConfiguration, and setModel from ./task-manager/models.js lines up with their usage in the models command below and keeps the dependency direction (CLI → task-manager) clean. Assuming task-manager/models.js exports these named functions, this change looks solid and should resolve any missing-reference issues.


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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

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

⚠️ Outside diff range comments (6)
.github/workflows/claude-docs-updater.yml (1)

1-1: PR description is missing and must be provided before merging.

The commit body is empty. Per the repository's Git workflow standards (.cursor/rules/git_workflow.mdc), PR descriptions must include: Task Overview, Subtasks Completed (with checkmarks), Implementation Details, Testing Approach, Breaking Changes (if any), and Related Tasks.

This PR affects a large number of files across multiple packages. Without a description, reviewers cannot understand what was changed, why, or how to test it. Please provide a comprehensive description explaining:

  1. What functionality was added/refactored and the rationale
  2. Which subtasks or components were modified
  3. How the changes were tested (unit, integration, manual workflow tests)
  4. Any breaking changes for users or developers
  5. Links to related issues or tasks
packages/ai-sdk-provider-grok-cli/CHANGELOG.md (1)

3-17: Fix malformed changelog entries with "## null" headings.

The changelog contains multiple "## null" entries instead of proper version numbers. This indicates a problem with the changelog generation tooling (likely changesets) and will break:

  • Changelog parsing by the custom changelog parser in apps/cli/src/utils/auto-update/changelog.ts
  • User experience when reading release notes
  • Automated version detection

This needs to be fixed before merging. Common causes:

  1. Missing version field in package.json (though learnings indicate this is intentional for internal packages)
  2. Malformed changeset files
  3. Bug in changesets configuration

Run the following to investigate:

#!/bin/bash
# Check package.json for version field
cat packages/ai-sdk-provider-grok-cli/package.json | jq '.version'

# Look for related changeset files
fd -e md . .changeset/ -x cat {} \; | head -50
apps/cli/CHANGELOG.md (1)

17-22: Duplicate null changelog entries.

Multiple "## null" sections with identical "Updated dependencies" content reduce changelog readability. These appear to be changeset generation artifacts that should be consolidated or cleaned up before release.

Based on learnings, the project uses a custom changelog format with PR numbers and author acknowledgements. Consider consolidating these null entries or ensuring changesets generate proper version headers.

CHANGELOG.md (1)

264-276: Remove duplicated 0.36.0 section.

"## 0.36.0" appears twice back-to-back; keep the first block (lines 251-262) and delete the duplicate (lines 264-276) to avoid parser noise and double-rendering.

Apply this minimal diff:

@@
-## 0.36.0
-
-### Minor Changes
-
-- [#1446](https://github.com/eyaltoledano/claude-task-master/pull/1446) [`2316e94`](https://github.com/eyaltoledano/claude-task-master/commit/2316e94b288915bb906e1a61a87f59e291594fef) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Bring back `task-master generate` as a command and mcp tool (after popular demand)
-  - Generated files are now `.md` instead of `.txt`
-    - They also follow the markdownlint format making them look like more standard md files
-  - added parameters to generate allowing you to generate with the `--tag` flag
-    - If I am on an active tag and want to generate files from another tag, I can with the tag parameter
-  - See `task-master generate --help` for more information.
-
-- [#1454](https://github.com/eyaltoledano/claude-task-master/pull/1454) [`38ff7eb`](https://github.com/eyaltoledano/claude-task-master/commit/38ff7ebbc029919ea4cd5257573efbf1ea2f0eeb) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Add Hamster rules to task-master rules
apps/mcp/src/tools/autopilot/commit.tool.ts (1)

146-149: Commit type logic is always 'feat' since we're in COMMIT phase.

Since line 68 already validates that status.tddPhase === 'COMMIT', the ternary on line 148 will always evaluate to 'feat'. The 'test' branch is dead code.

If the intent is to determine type based on the work done (tests vs implementation), consider using the previous TDD phase or subtask context instead.

 					// Determine commit type based on phase and subtask
 					// RED phase = test files, GREEN phase = implementation
-					const type = status.tddPhase === 'COMMIT' ? 'feat' : 'test';
+					const type = 'feat'; // Always in COMMIT phase at this point

Or if you want to preserve the original intent:

 					// Determine commit type based on phase and subtask
 					// RED phase = test files, GREEN phase = implementation
-					const type = status.tddPhase === 'COMMIT' ? 'feat' : 'test';
+					// Since we're in COMMIT phase after GREEN, the work is implementation
+					const type = 'feat';
apps/cli/src/commands/autopilot/complete.command.ts (1)

103-143: RED phase validation in CLI contradicts core behavior—reconsider the requirement for at least one failing test.

The core WorkflowOrchestrator explicitly handles the case where all tests pass in the RED phase as a valid edge case (feature-already-implemented), automatically completing the subtask. However, the CLI validation (lines 104-107) rejects this case and requires at least one failing test.

The GREEN phase validation (lines 116-119) correctly mirrors core logic (both require zero failures), but the RED phase constraint in the CLI prevents a legitimate workflow path that the core supports. Either the CLI should allow this case to reach the core for proper handling, or the core behavior should be changed to match the CLI restriction—clarify which is intended.

♻️ Duplicate comments (2)
packages/build-config/CHANGELOG.md (1)

19-20: Fix malformed "## null" changelog entry.

Similar to the issue in packages/ai-sdk-provider-grok-cli/CHANGELOG.md, this file has malformed "## null" entries instead of proper version numbers. This is part of a systemic changelog generation problem affecting multiple internal packages.

See the comment on packages/ai-sdk-provider-grok-cli/CHANGELOG.md for investigation steps. This needs to be resolved before merging.

packages/tm-core/CHANGELOG.md (1)

19-20: Fix malformed "## null" changelog entry.

This file also has the "## null" changelog generation issue affecting multiple internal packages in this PR. This is part of the same systemic problem.

See the investigation steps in the comment on packages/ai-sdk-provider-grok-cli/CHANGELOG.md.

🧹 Nitpick comments (19)
packages/tm-core/src/modules/tasks/validation/task-id.ts (2)

139-155: Documentation references unsupported format.

The examples show "1.2.3" which is explicitly documented as not supported in the file header (line 16). While the function would technically handle it, showing this example may cause confusion since such IDs won't pass validation.

Consider updating to use supported formats:

 /**
  * Extract parent task ID from a subtask ID
  *
- * @param taskId - Task ID (e.g., "1.2.3")
- * @returns Parent ID (e.g., "1") or the original ID if not a subtask
+ * @param taskId - Task ID (e.g., "1.2")
+ * @returns Parent ID (e.g., "1") or the original ID if not a subtask
  *
  * @example
  * ```typescript
- * extractParentId("1.2.3");  // "1"
  * extractParentId("1.2");    // "1"
  * extractParentId("1");      // "1"
+ * extractParentId("HAM-1");  // "HAM-1" (no subtask notation)
  * ```
  */

157-172: Same documentation inconsistency with unsupported format.

Similar to extractParentId, the example shows "1.2.3" which validation rejects.

Consider aligning examples with supported formats:

  * @example
  * ```typescript
  * isSubtaskId("1.2");   // true
- * isSubtaskId("1.2.3"); // true
  * isSubtaskId("1");     // false
+ * isSubtaskId("HAM-1"); // false (API IDs don't use dot notation)
  * ```
packages/tm-core/src/modules/workflow/orchestrators/workflow-orchestrator.spec.ts (4)

92-96: Async invalid-transition expectation looks correct; consider consistency across tests

Using await expect(orchestrator.transition(...)).rejects.toThrow('Invalid transition') is appropriate if transition is now promise-based for invalid transitions. You might consider standardizing on await (or return expect(...).rejects...) for other tests that rely on transition side effects as well, to keep behavior deterministic if transition becomes uniformly async in the future.


435-461: Guard/test-result/git validation tests now correctly assert async failures; watch skipped specs and naming

The refactors to use await + .rejects.toThrow(...) for guard failures, missing test results, invalid GREEN results, and git guards align these tests with an async transition API and look logically sound. Two minor follow-ups:

  • The skipped RED-phase tests (Lines 502-525) still assert the old failure semantics; now that behavior is “auto-complete on all tests passing”, it would be better to either (a) replace them with a positive spec for the new behavior, or (b) remove the skipped tests to avoid stale expectations lingering in the suite.
  • The description "should validate test results before GREEN phase transition" (Lines 489-500) is a bit misleading since you’re asserting that RED_PHASE_COMPLETE without testResults is rejected; consider renaming to reflect the RED→GREEN validation more explicitly.

Also applies to: 489-525, 548-579, 637-659


1073-1088: Abort behavior test correctly uses async rejection; consider symmetry with the non-async abort test

This test now properly verifies that, after ABORT, any further transition call rejects with 'Workflow has been aborted', which matches an async failure model. Given this, you may want (optionally) to also await the ABORT transition in the earlier "should support abort workflow" test to keep the semantics consistent and avoid potential races if ABORT ever does more asynchronous work.


1401-1424: Adapter/TestResultValidator async tests look good; reconsider the skipped RED-phase validator spec

The GREEN-phase validator test now cleanly exercises the adapter path by awaiting transitions and asserting a rejected GREEN_PHASE_COMPLETE with failing tests, which matches the intended contract for TestResultValidator. For the RED-phase validator spec that is now skipped, you’ve documented the behavior change (auto-complete instead of throwing); that’s helpful, but it leaves the new behavior untested. I’d recommend replacing the skipped test with one that asserts the auto-completion semantics via the validator path, so adapter integration remains covered for both phases.

Also applies to: 1426-1459

packages/tm-bridge/CHANGELOG.md (1)

31-36: Avoid adding another duplicate ## null changelog section

There are already multiple identical ## null / “Updated dependencies []: @tm/core@null” blocks above; adding another increases duplication and triggers markdownlint’s MD024 duplicate-heading warning. Consider consolidating these into a single section or replacing them with a real version label when available.

packages/build-config/scripts/fix-null-versions.ts (1)

26-35: Consider adding error handling for file operations.

The script reads/writes files without try/catch. If a file operation fails (permissions, disk full, etc.), the script crashes mid-execution, potentially leaving some files fixed and others not.

 for (const file of packageFiles) {
+	try {
 		const content = readFileSync(file, 'utf8');
 
 		if (content.includes('"version": null')) {
 			const updated = content.replace(/"version": null/g, '"version": ""');
 			writeFileSync(file, updated);
 			console.log(`Fixed: ${file}`);
 			fixed++;
 		}
+	} catch (error) {
+		console.error(`Failed to process: ${file}`, error);
+	}
 }
packages/tm-core/src/modules/auth/utils/cli-crypto.ts (1)

69-107: Consider validating required fields after JSON parsing.

The type assertion at line 99 doesn't provide runtime guarantees. If the decrypted JSON is malformed or missing required fields (access_token, user_id), downstream code may fail with unclear errors.

-		return JSON.parse(decrypted.toString('utf8')) as DecryptedTokens;
+		const parsed = JSON.parse(decrypted.toString('utf8')) as DecryptedTokens;
+		
+		// Validate required fields
+		if (!parsed.access_token || !parsed.user_id) {
+			throw new Error('Missing required token fields');
+		}
+		
+		return parsed;
apps/docs/CHANGELOG.md (1)

3-4: Empty version entry follows existing pattern.

The new 0.0.13 entry is consistent with the existing changelog format in this file. Consider adding a brief note about what changed (even if just "dependency updates") for better changelog hygiene.

apps/cli/src/commands/set-status.command.ts (1)

6-11: TaskIdSchema-based ID handling looks good; consider unifying JSON error output

The switch to TaskIdSchema.safeParse for each trimmed ID is a solid improvement — it centralizes validation/normalization in tm-core instead of reimplementing ID parsing here, and it correctly collects only successfully parsed IDs before updating status.

One behavioral nuance: for an invalid ID you now:

  • Log a chalk-colored error with the Zod issue message, then
  • Call process.exit(1) directly from the loop.

This matches the existing patterns for missing ID/status and invalid status, but it means that even when --format json is requested, the invalid-ID case won’t go through the JSON error path used later in the catch block.

If you want fully machine-friendly behavior in JSON mode, consider (in a follow-up) routing invalid-ID failures through the same error handling as other failures (e.g., throw an Error with the composed message and let the existing catch block emit JSON or text as appropriate) instead of calling process.exit(1) here. That would also keep CLI exit handling more centralized.

Also applies to: 153-167

CHANGELOG.md (2)

3-12: Top entry format looks good; add current PR (#1498) details.

Please add a line for this PR under 0.37.2-rc.0 using the repo’s standard format so release notes reflect the actual change set.

Example (adjust text to match the final scope):


7-12: Wording nit: clarify the second bullet under #1491.

Consider “Fix inability to start workflow on master Taskmaster tag for some users” for clarity.

tests/unit/mcp/tools/tool-registration.test.js (1)

123-177: Tests exercise new toolMode behavior thoroughly; one minor wording nit

The updated cases cover defaulting to core, explicit modes (all, core, standard, lean), custom lists, invalid/edge inputs, and combined env + parameter scenarios, which matches the new registerTaskMasterTools(server, toolMode) contract well.

Tiny optional cleanup: the test "should use core tools when empty string passed as toolMode" (Lines 208–214) actually sets TASK_MASTER_TOOLS = '' and then calls registerTaskMasterTools(mockServer) without a second argument, so it’s really exercising “empty env value” rather than an explicit empty toolMode parameter. Renaming the description to mention env config instead of “passed as toolMode” would avoid confusion, but behavior itself looks correct.

Also applies to: 200-215, 252-304, 322-328, 404-423

apps/cli/src/commands/autopilot/commit.command.ts (1)

5-5: CLI commit now correctly uses createTmCore + tmCore.workflow

Switching to createTmCore({ projectPath }) and driving all workflow interactions through tmCore.workflow (existence check, resume, status/context read, commit()) keeps the command in line with the “CLI as thin presentation layer over tm-core” guideline and removes direct dependency on workflow internals.

Two tiny, non-blocking nits:

  • The comment above tmCore.workflow.commit() still mentions “handled internally by WorkflowService”; consider updating it to “by tmCore.workflow” for clarity.
  • If more autopilot commands follow this exact initialization pattern, a small shared helper for “init tmCore + assert active workflow + resume + getStatus” could reduce duplication later.

Also applies to: 42-47, 53-57, 119-121

packages/tm-core/src/modules/workflow/workflow-domain.ts (1)

153-155: Minor: hasWorkflow creates service instance if none exists.

The hasWorkflow method uses getWorkflowService() which lazily creates a service if none exists. This is acceptable since callers typically follow with start() or resume() which reset the service anyway. However, if this becomes a performance concern, consider a lighter-weight check that doesn't require full service instantiation.

apps/cli/src/commands/autopilot/finalize.command.ts (1)

26-40: Consider simplifying option merging to avoid redundant initialization.

The mergedOptions is initialized with projectRoot: '' on line 34 and then immediately overwritten on lines 48-51. This double initialization is unnecessary.

 	private async execute(options: FinalizeOptions): Promise<void> {
 		// Inherit parent options
 		const parentOpts = this.parent?.opts() as AutopilotBaseOptions;
-
-		// Initialize mergedOptions with defaults (projectRoot will be set in try block)
-		let mergedOptions: FinalizeOptions = {
-			...parentOpts,
-			...options,
-			projectRoot: '' // Will be set in try block
-		};
-
 		const formatter = new OutputFormatter(
 			options.json || parentOpts?.json || false
 		);
 
 		try {
 			// Resolve project root inside try block to catch any errors
 			const projectRoot = getProjectRoot(
 				options.projectRoot || parentOpts?.projectRoot
 			);
 
-			// Update mergedOptions with resolved project root
-			mergedOptions = {
+			const mergedOptions: FinalizeOptions = {
 				...parentOpts,
 				...options,
 				projectRoot
 			};
packages/tm-core/src/common/schemas/task-id.schema.ts (1)

70-74: Consider documenting whether the 3-letter prefix is fixed to "HAM" or extensible.

The API_MAIN_PATTERN accepts any 3-letter prefix (e.g., "ABC-1", "XYZ-1"), not just "HAM". The docstring mentions "HAM-1" specifically. If only "HAM" is valid, consider tightening the pattern; otherwise, update the documentation to clarify the flexibility.

apps/cli/src/commands/autopilot/start.command.ts (1)

106-111: Consider typing the subtask mapping parameter.

The any type annotation on st loses type safety. If a Subtask type is available from @tm/core, consider using it for better IDE support and compile-time checks.

-			subtasks: task.subtasks.map((st: any) => ({
+			subtasks: task.subtasks.map((st) => ({
 				id: st.id,
 				title: st.title,
 				status: st.status,
 				maxAttempts
 			})),

If the task type from tmCore.tasks.get() is properly typed, removing any should allow TypeScript to infer the correct type.

…1505)

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ralph Khreish <Crunchyman-ralph@users.noreply.github.com>
Fixes #1503
@Crunchyman-ralph Crunchyman-ralph merged commit b9d560a into main Dec 11, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants