#
tokens: 49690/50000 51/975 files (page 5/50)
lines: off (toggle) GitHub
raw markdown copy
This is page 5 of 50. Use http://codebase.md/eyaltoledano/claude-task-master?page={x} to view the full context.

# Directory Structure

```
├── .changeset
│   ├── config.json
│   └── README.md
├── .claude
│   ├── commands
│   │   └── dedupe.md
│   └── TM_COMMANDS_GUIDE.md
├── .claude-plugin
│   └── marketplace.json
├── .coderabbit.yaml
├── .cursor
│   ├── mcp.json
│   └── rules
│       ├── ai_providers.mdc
│       ├── ai_services.mdc
│       ├── architecture.mdc
│       ├── changeset.mdc
│       ├── commands.mdc
│       ├── context_gathering.mdc
│       ├── cursor_rules.mdc
│       ├── dependencies.mdc
│       ├── dev_workflow.mdc
│       ├── git_workflow.mdc
│       ├── glossary.mdc
│       ├── mcp.mdc
│       ├── new_features.mdc
│       ├── self_improve.mdc
│       ├── tags.mdc
│       ├── taskmaster.mdc
│       ├── tasks.mdc
│       ├── telemetry.mdc
│       ├── test_workflow.mdc
│       ├── tests.mdc
│       ├── ui.mdc
│       └── utilities.mdc
├── .cursorignore
├── .env.example
├── .github
│   ├── ISSUE_TEMPLATE
│   │   ├── bug_report.md
│   │   ├── enhancements---feature-requests.md
│   │   └── feedback.md
│   ├── PULL_REQUEST_TEMPLATE
│   │   ├── bugfix.md
│   │   ├── config.yml
│   │   ├── feature.md
│   │   └── integration.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── scripts
│   │   ├── auto-close-duplicates.mjs
│   │   ├── backfill-duplicate-comments.mjs
│   │   ├── check-pre-release-mode.mjs
│   │   ├── parse-metrics.mjs
│   │   ├── release.mjs
│   │   ├── tag-extension.mjs
│   │   ├── utils.mjs
│   │   └── validate-changesets.mjs
│   └── workflows
│       ├── auto-close-duplicates.yml
│       ├── backfill-duplicate-comments.yml
│       ├── ci.yml
│       ├── claude-dedupe-issues.yml
│       ├── claude-docs-trigger.yml
│       ├── claude-docs-updater.yml
│       ├── claude-issue-triage.yml
│       ├── claude.yml
│       ├── extension-ci.yml
│       ├── extension-release.yml
│       ├── log-issue-events.yml
│       ├── pre-release.yml
│       ├── release-check.yml
│       ├── release.yml
│       ├── update-models-md.yml
│       └── weekly-metrics-discord.yml
├── .gitignore
├── .kiro
│   ├── hooks
│   │   ├── tm-code-change-task-tracker.kiro.hook
│   │   ├── tm-complexity-analyzer.kiro.hook
│   │   ├── tm-daily-standup-assistant.kiro.hook
│   │   ├── tm-git-commit-task-linker.kiro.hook
│   │   ├── tm-pr-readiness-checker.kiro.hook
│   │   ├── tm-task-dependency-auto-progression.kiro.hook
│   │   └── tm-test-success-task-completer.kiro.hook
│   ├── settings
│   │   └── mcp.json
│   └── steering
│       ├── dev_workflow.md
│       ├── kiro_rules.md
│       ├── self_improve.md
│       ├── taskmaster_hooks_workflow.md
│       └── taskmaster.md
├── .manypkg.json
├── .mcp.json
├── .npmignore
├── .nvmrc
├── .taskmaster
│   ├── CLAUDE.md
│   ├── config.json
│   ├── docs
│   │   ├── autonomous-tdd-git-workflow.md
│   │   ├── MIGRATION-ROADMAP.md
│   │   ├── prd-tm-start.txt
│   │   ├── prd.txt
│   │   ├── README.md
│   │   ├── research
│   │   │   ├── 2025-06-14_how-can-i-improve-the-scope-up-and-scope-down-comm.md
│   │   │   ├── 2025-06-14_should-i-be-using-any-specific-libraries-for-this.md
│   │   │   ├── 2025-06-14_test-save-functionality.md
│   │   │   ├── 2025-06-14_test-the-fix-for-duplicate-saves-final-test.md
│   │   │   └── 2025-08-01_do-we-need-to-add-new-commands-or-can-we-just-weap.md
│   │   ├── task-template-importing-prd.txt
│   │   ├── tdd-workflow-phase-0-spike.md
│   │   ├── tdd-workflow-phase-1-core-rails.md
│   │   ├── tdd-workflow-phase-1-orchestrator.md
│   │   ├── tdd-workflow-phase-2-pr-resumability.md
│   │   ├── tdd-workflow-phase-3-extensibility-guardrails.md
│   │   ├── test-prd.txt
│   │   └── tm-core-phase-1.txt
│   ├── reports
│   │   ├── task-complexity-report_autonomous-tdd-git-workflow.json
│   │   ├── task-complexity-report_cc-kiro-hooks.json
│   │   ├── task-complexity-report_tdd-phase-1-core-rails.json
│   │   ├── task-complexity-report_tdd-workflow-phase-0.json
│   │   ├── task-complexity-report_test-prd-tag.json
│   │   ├── task-complexity-report_tm-core-phase-1.json
│   │   ├── task-complexity-report.json
│   │   └── tm-core-complexity.json
│   ├── state.json
│   ├── tasks
│   │   ├── task_001_tm-start.txt
│   │   ├── task_002_tm-start.txt
│   │   ├── task_003_tm-start.txt
│   │   ├── task_004_tm-start.txt
│   │   ├── task_007_tm-start.txt
│   │   └── tasks.json
│   └── templates
│       ├── example_prd_rpg.md
│       └── example_prd.md
├── .vscode
│   ├── extensions.json
│   └── settings.json
├── apps
│   ├── cli
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── src
│   │   │   ├── command-registry.ts
│   │   │   ├── commands
│   │   │   │   ├── auth.command.ts
│   │   │   │   ├── autopilot
│   │   │   │   │   ├── abort.command.ts
│   │   │   │   │   ├── commit.command.ts
│   │   │   │   │   ├── complete.command.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── next.command.ts
│   │   │   │   │   ├── resume.command.ts
│   │   │   │   │   ├── shared.ts
│   │   │   │   │   ├── start.command.ts
│   │   │   │   │   └── status.command.ts
│   │   │   │   ├── briefs.command.ts
│   │   │   │   ├── context.command.ts
│   │   │   │   ├── export.command.ts
│   │   │   │   ├── list.command.ts
│   │   │   │   ├── models
│   │   │   │   │   ├── custom-providers.ts
│   │   │   │   │   ├── fetchers.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── prompts.ts
│   │   │   │   │   ├── setup.ts
│   │   │   │   │   └── types.ts
│   │   │   │   ├── next.command.ts
│   │   │   │   ├── set-status.command.ts
│   │   │   │   ├── show.command.ts
│   │   │   │   ├── start.command.ts
│   │   │   │   └── tags.command.ts
│   │   │   ├── index.ts
│   │   │   ├── lib
│   │   │   │   └── model-management.ts
│   │   │   ├── types
│   │   │   │   └── tag-management.d.ts
│   │   │   ├── ui
│   │   │   │   ├── components
│   │   │   │   │   ├── cardBox.component.ts
│   │   │   │   │   ├── dashboard.component.ts
│   │   │   │   │   ├── header.component.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── next-task.component.ts
│   │   │   │   │   ├── suggested-steps.component.ts
│   │   │   │   │   └── task-detail.component.ts
│   │   │   │   ├── display
│   │   │   │   │   ├── messages.ts
│   │   │   │   │   └── tables.ts
│   │   │   │   ├── formatters
│   │   │   │   │   ├── complexity-formatters.ts
│   │   │   │   │   ├── dependency-formatters.ts
│   │   │   │   │   ├── priority-formatters.ts
│   │   │   │   │   ├── status-formatters.spec.ts
│   │   │   │   │   └── status-formatters.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── layout
│   │   │   │       ├── helpers.spec.ts
│   │   │   │       └── helpers.ts
│   │   │   └── utils
│   │   │       ├── auth-helpers.ts
│   │   │       ├── auto-update.ts
│   │   │       ├── brief-selection.ts
│   │   │       ├── display-helpers.ts
│   │   │       ├── error-handler.ts
│   │   │       ├── index.ts
│   │   │       ├── project-root.ts
│   │   │       ├── task-status.ts
│   │   │       ├── ui.spec.ts
│   │   │       └── ui.ts
│   │   ├── tests
│   │   │   ├── integration
│   │   │   │   └── commands
│   │   │   │       └── autopilot
│   │   │   │           └── workflow.test.ts
│   │   │   └── unit
│   │   │       ├── commands
│   │   │       │   ├── autopilot
│   │   │       │   │   └── shared.test.ts
│   │   │       │   ├── list.command.spec.ts
│   │   │       │   └── show.command.spec.ts
│   │   │       └── ui
│   │   │           └── dashboard.component.spec.ts
│   │   ├── tsconfig.json
│   │   └── vitest.config.ts
│   ├── docs
│   │   ├── archive
│   │   │   ├── ai-client-utils-example.mdx
│   │   │   ├── ai-development-workflow.mdx
│   │   │   ├── command-reference.mdx
│   │   │   ├── configuration.mdx
│   │   │   ├── cursor-setup.mdx
│   │   │   ├── examples.mdx
│   │   │   └── Installation.mdx
│   │   ├── best-practices
│   │   │   ├── advanced-tasks.mdx
│   │   │   ├── configuration-advanced.mdx
│   │   │   └── index.mdx
│   │   ├── capabilities
│   │   │   ├── cli-root-commands.mdx
│   │   │   ├── index.mdx
│   │   │   ├── mcp.mdx
│   │   │   ├── rpg-method.mdx
│   │   │   └── task-structure.mdx
│   │   ├── CHANGELOG.md
│   │   ├── command-reference.mdx
│   │   ├── configuration.mdx
│   │   ├── docs.json
│   │   ├── favicon.svg
│   │   ├── getting-started
│   │   │   ├── api-keys.mdx
│   │   │   ├── contribute.mdx
│   │   │   ├── faq.mdx
│   │   │   └── quick-start
│   │   │       ├── configuration-quick.mdx
│   │   │       ├── execute-quick.mdx
│   │   │       ├── installation.mdx
│   │   │       ├── moving-forward.mdx
│   │   │       ├── prd-quick.mdx
│   │   │       ├── quick-start.mdx
│   │   │       ├── requirements.mdx
│   │   │       ├── rules-quick.mdx
│   │   │       └── tasks-quick.mdx
│   │   ├── introduction.mdx
│   │   ├── licensing.md
│   │   ├── logo
│   │   │   ├── dark.svg
│   │   │   ├── light.svg
│   │   │   └── task-master-logo.png
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── style.css
│   │   ├── tdd-workflow
│   │   │   ├── ai-agent-integration.mdx
│   │   │   └── quickstart.mdx
│   │   ├── vercel.json
│   │   └── whats-new.mdx
│   ├── extension
│   │   ├── .vscodeignore
│   │   ├── assets
│   │   │   ├── banner.png
│   │   │   ├── icon-dark.svg
│   │   │   ├── icon-light.svg
│   │   │   ├── icon.png
│   │   │   ├── screenshots
│   │   │   │   ├── kanban-board.png
│   │   │   │   └── task-details.png
│   │   │   └── sidebar-icon.svg
│   │   ├── CHANGELOG.md
│   │   ├── components.json
│   │   ├── docs
│   │   │   ├── extension-CI-setup.md
│   │   │   └── extension-development-guide.md
│   │   ├── esbuild.js
│   │   ├── LICENSE
│   │   ├── package.json
│   │   ├── package.mjs
│   │   ├── package.publish.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── components
│   │   │   │   ├── ConfigView.tsx
│   │   │   │   ├── constants.ts
│   │   │   │   ├── TaskDetails
│   │   │   │   │   ├── AIActionsSection.tsx
│   │   │   │   │   ├── DetailsSection.tsx
│   │   │   │   │   ├── PriorityBadge.tsx
│   │   │   │   │   ├── SubtasksSection.tsx
│   │   │   │   │   ├── TaskMetadataSidebar.tsx
│   │   │   │   │   └── useTaskDetails.ts
│   │   │   │   ├── TaskDetailsView.tsx
│   │   │   │   ├── TaskMasterLogo.tsx
│   │   │   │   └── ui
│   │   │   │       ├── badge.tsx
│   │   │   │       ├── breadcrumb.tsx
│   │   │   │       ├── button.tsx
│   │   │   │       ├── card.tsx
│   │   │   │       ├── collapsible.tsx
│   │   │   │       ├── CollapsibleSection.tsx
│   │   │   │       ├── dropdown-menu.tsx
│   │   │   │       ├── label.tsx
│   │   │   │       ├── scroll-area.tsx
│   │   │   │       ├── separator.tsx
│   │   │   │       ├── shadcn-io
│   │   │   │       │   └── kanban
│   │   │   │       │       └── index.tsx
│   │   │   │       └── textarea.tsx
│   │   │   ├── extension.ts
│   │   │   ├── index.ts
│   │   │   ├── lib
│   │   │   │   └── utils.ts
│   │   │   ├── services
│   │   │   │   ├── config-service.ts
│   │   │   │   ├── error-handler.ts
│   │   │   │   ├── notification-preferences.ts
│   │   │   │   ├── polling-service.ts
│   │   │   │   ├── polling-strategies.ts
│   │   │   │   ├── sidebar-webview-manager.ts
│   │   │   │   ├── task-repository.ts
│   │   │   │   ├── terminal-manager.ts
│   │   │   │   └── webview-manager.ts
│   │   │   ├── test
│   │   │   │   └── extension.test.ts
│   │   │   ├── utils
│   │   │   │   ├── configManager.ts
│   │   │   │   ├── connectionManager.ts
│   │   │   │   ├── errorHandler.ts
│   │   │   │   ├── event-emitter.ts
│   │   │   │   ├── logger.ts
│   │   │   │   ├── mcpClient.ts
│   │   │   │   ├── notificationPreferences.ts
│   │   │   │   └── task-master-api
│   │   │   │       ├── cache
│   │   │   │       │   └── cache-manager.ts
│   │   │   │       ├── index.ts
│   │   │   │       ├── mcp-client.ts
│   │   │   │       ├── transformers
│   │   │   │       │   └── task-transformer.ts
│   │   │   │       └── types
│   │   │   │           └── index.ts
│   │   │   └── webview
│   │   │       ├── App.tsx
│   │   │       ├── components
│   │   │       │   ├── AppContent.tsx
│   │   │       │   ├── EmptyState.tsx
│   │   │       │   ├── ErrorBoundary.tsx
│   │   │       │   ├── PollingStatus.tsx
│   │   │       │   ├── PriorityBadge.tsx
│   │   │       │   ├── SidebarView.tsx
│   │   │       │   ├── TagDropdown.tsx
│   │   │       │   ├── TaskCard.tsx
│   │   │       │   ├── TaskEditModal.tsx
│   │   │       │   ├── TaskMasterKanban.tsx
│   │   │       │   ├── ToastContainer.tsx
│   │   │       │   └── ToastNotification.tsx
│   │   │       ├── constants
│   │   │       │   └── index.ts
│   │   │       ├── contexts
│   │   │       │   └── VSCodeContext.tsx
│   │   │       ├── hooks
│   │   │       │   ├── useTaskQueries.ts
│   │   │       │   ├── useVSCodeMessages.ts
│   │   │       │   └── useWebviewHeight.ts
│   │   │       ├── index.css
│   │   │       ├── index.tsx
│   │   │       ├── providers
│   │   │       │   └── QueryProvider.tsx
│   │   │       ├── reducers
│   │   │       │   └── appReducer.ts
│   │   │       ├── sidebar.tsx
│   │   │       ├── types
│   │   │       │   └── index.ts
│   │   │       └── utils
│   │   │           ├── logger.ts
│   │   │           └── toast.ts
│   │   └── tsconfig.json
│   └── mcp
│       ├── CHANGELOG.md
│       ├── package.json
│       ├── src
│       │   ├── index.ts
│       │   ├── shared
│       │   │   ├── types.ts
│       │   │   └── utils.ts
│       │   └── tools
│       │       ├── autopilot
│       │       │   ├── abort.tool.ts
│       │       │   ├── commit.tool.ts
│       │       │   ├── complete.tool.ts
│       │       │   ├── finalize.tool.ts
│       │       │   ├── index.ts
│       │       │   ├── next.tool.ts
│       │       │   ├── resume.tool.ts
│       │       │   ├── start.tool.ts
│       │       │   └── status.tool.ts
│       │       ├── README-ZOD-V3.md
│       │       └── tasks
│       │           ├── get-task.tool.ts
│       │           ├── get-tasks.tool.ts
│       │           └── index.ts
│       ├── tsconfig.json
│       └── vitest.config.ts
├── assets
│   ├── .windsurfrules
│   ├── AGENTS.md
│   ├── claude
│   │   └── TM_COMMANDS_GUIDE.md
│   ├── config.json
│   ├── env.example
│   ├── example_prd_rpg.txt
│   ├── example_prd.txt
│   ├── GEMINI.md
│   ├── gitignore
│   ├── kiro-hooks
│   │   ├── tm-code-change-task-tracker.kiro.hook
│   │   ├── tm-complexity-analyzer.kiro.hook
│   │   ├── tm-daily-standup-assistant.kiro.hook
│   │   ├── tm-git-commit-task-linker.kiro.hook
│   │   ├── tm-pr-readiness-checker.kiro.hook
│   │   ├── tm-task-dependency-auto-progression.kiro.hook
│   │   └── tm-test-success-task-completer.kiro.hook
│   ├── roocode
│   │   ├── .roo
│   │   │   ├── rules-architect
│   │   │   │   └── architect-rules
│   │   │   ├── rules-ask
│   │   │   │   └── ask-rules
│   │   │   ├── rules-code
│   │   │   │   └── code-rules
│   │   │   ├── rules-debug
│   │   │   │   └── debug-rules
│   │   │   ├── rules-orchestrator
│   │   │   │   └── orchestrator-rules
│   │   │   └── rules-test
│   │   │       └── test-rules
│   │   └── .roomodes
│   ├── rules
│   │   ├── cursor_rules.mdc
│   │   ├── dev_workflow.mdc
│   │   ├── self_improve.mdc
│   │   ├── taskmaster_hooks_workflow.mdc
│   │   └── taskmaster.mdc
│   └── scripts_README.md
├── bin
│   └── task-master.js
├── biome.json
├── CHANGELOG.md
├── CLAUDE_CODE_PLUGIN.md
├── CLAUDE.md
├── context
│   ├── chats
│   │   ├── add-task-dependencies-1.md
│   │   └── max-min-tokens.txt.md
│   ├── fastmcp-core.txt
│   ├── fastmcp-docs.txt
│   ├── MCP_INTEGRATION.md
│   ├── mcp-js-sdk-docs.txt
│   ├── mcp-protocol-repo.txt
│   ├── mcp-protocol-schema-03262025.json
│   └── mcp-protocol-spec.txt
├── CONTRIBUTING.md
├── docs
│   ├── claude-code-integration.md
│   ├── CLI-COMMANDER-PATTERN.md
│   ├── command-reference.md
│   ├── configuration.md
│   ├── contributor-docs
│   │   ├── testing-roo-integration.md
│   │   └── worktree-setup.md
│   ├── cross-tag-task-movement.md
│   ├── examples
│   │   ├── claude-code-usage.md
│   │   └── codex-cli-usage.md
│   ├── examples.md
│   ├── licensing.md
│   ├── mcp-provider-guide.md
│   ├── mcp-provider.md
│   ├── migration-guide.md
│   ├── models.md
│   ├── providers
│   │   ├── codex-cli.md
│   │   └── gemini-cli.md
│   ├── README.md
│   ├── scripts
│   │   └── models-json-to-markdown.js
│   ├── task-structure.md
│   └── tutorial.md
├── images
│   ├── hamster-hiring.png
│   └── logo.png
├── index.js
├── jest.config.js
├── jest.resolver.cjs
├── LICENSE
├── llms-install.md
├── mcp-server
│   ├── server.js
│   └── src
│       ├── core
│       │   ├── __tests__
│       │   │   └── context-manager.test.js
│       │   ├── context-manager.js
│       │   ├── direct-functions
│       │   │   ├── add-dependency.js
│       │   │   ├── add-subtask.js
│       │   │   ├── add-tag.js
│       │   │   ├── add-task.js
│       │   │   ├── analyze-task-complexity.js
│       │   │   ├── cache-stats.js
│       │   │   ├── clear-subtasks.js
│       │   │   ├── complexity-report.js
│       │   │   ├── copy-tag.js
│       │   │   ├── create-tag-from-branch.js
│       │   │   ├── delete-tag.js
│       │   │   ├── expand-all-tasks.js
│       │   │   ├── expand-task.js
│       │   │   ├── fix-dependencies.js
│       │   │   ├── generate-task-files.js
│       │   │   ├── initialize-project.js
│       │   │   ├── list-tags.js
│       │   │   ├── models.js
│       │   │   ├── move-task-cross-tag.js
│       │   │   ├── move-task.js
│       │   │   ├── next-task.js
│       │   │   ├── parse-prd.js
│       │   │   ├── remove-dependency.js
│       │   │   ├── remove-subtask.js
│       │   │   ├── remove-task.js
│       │   │   ├── rename-tag.js
│       │   │   ├── research.js
│       │   │   ├── response-language.js
│       │   │   ├── rules.js
│       │   │   ├── scope-down.js
│       │   │   ├── scope-up.js
│       │   │   ├── set-task-status.js
│       │   │   ├── update-subtask-by-id.js
│       │   │   ├── update-task-by-id.js
│       │   │   ├── update-tasks.js
│       │   │   ├── use-tag.js
│       │   │   └── validate-dependencies.js
│       │   ├── task-master-core.js
│       │   └── utils
│       │       ├── env-utils.js
│       │       └── path-utils.js
│       ├── custom-sdk
│       │   ├── errors.js
│       │   ├── index.js
│       │   ├── json-extractor.js
│       │   ├── language-model.js
│       │   ├── message-converter.js
│       │   └── schema-converter.js
│       ├── index.js
│       ├── logger.js
│       ├── providers
│       │   └── mcp-provider.js
│       └── tools
│           ├── add-dependency.js
│           ├── add-subtask.js
│           ├── add-tag.js
│           ├── add-task.js
│           ├── analyze.js
│           ├── clear-subtasks.js
│           ├── complexity-report.js
│           ├── copy-tag.js
│           ├── delete-tag.js
│           ├── expand-all.js
│           ├── expand-task.js
│           ├── fix-dependencies.js
│           ├── generate.js
│           ├── get-operation-status.js
│           ├── index.js
│           ├── initialize-project.js
│           ├── list-tags.js
│           ├── models.js
│           ├── move-task.js
│           ├── next-task.js
│           ├── parse-prd.js
│           ├── README-ZOD-V3.md
│           ├── remove-dependency.js
│           ├── remove-subtask.js
│           ├── remove-task.js
│           ├── rename-tag.js
│           ├── research.js
│           ├── response-language.js
│           ├── rules.js
│           ├── scope-down.js
│           ├── scope-up.js
│           ├── set-task-status.js
│           ├── tool-registry.js
│           ├── update-subtask.js
│           ├── update-task.js
│           ├── update.js
│           ├── use-tag.js
│           ├── utils.js
│           └── validate-dependencies.js
├── mcp-test.js
├── output.json
├── package-lock.json
├── package.json
├── packages
│   ├── ai-sdk-provider-grok-cli
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── errors.test.ts
│   │   │   ├── errors.ts
│   │   │   ├── grok-cli-language-model.ts
│   │   │   ├── grok-cli-provider.test.ts
│   │   │   ├── grok-cli-provider.ts
│   │   │   ├── index.ts
│   │   │   ├── json-extractor.test.ts
│   │   │   ├── json-extractor.ts
│   │   │   ├── message-converter.test.ts
│   │   │   ├── message-converter.ts
│   │   │   └── types.ts
│   │   └── tsconfig.json
│   ├── build-config
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── src
│   │   │   └── tsdown.base.ts
│   │   └── tsconfig.json
│   ├── claude-code-plugin
│   │   ├── .claude-plugin
│   │   │   └── plugin.json
│   │   ├── .gitignore
│   │   ├── agents
│   │   │   ├── task-checker.md
│   │   │   ├── task-executor.md
│   │   │   └── task-orchestrator.md
│   │   ├── CHANGELOG.md
│   │   ├── commands
│   │   │   ├── add-dependency.md
│   │   │   ├── add-subtask.md
│   │   │   ├── add-task.md
│   │   │   ├── analyze-complexity.md
│   │   │   ├── analyze-project.md
│   │   │   ├── auto-implement-tasks.md
│   │   │   ├── command-pipeline.md
│   │   │   ├── complexity-report.md
│   │   │   ├── convert-task-to-subtask.md
│   │   │   ├── expand-all-tasks.md
│   │   │   ├── expand-task.md
│   │   │   ├── fix-dependencies.md
│   │   │   ├── generate-tasks.md
│   │   │   ├── help.md
│   │   │   ├── init-project-quick.md
│   │   │   ├── init-project.md
│   │   │   ├── install-taskmaster.md
│   │   │   ├── learn.md
│   │   │   ├── list-tasks-by-status.md
│   │   │   ├── list-tasks-with-subtasks.md
│   │   │   ├── list-tasks.md
│   │   │   ├── next-task.md
│   │   │   ├── parse-prd-with-research.md
│   │   │   ├── parse-prd.md
│   │   │   ├── project-status.md
│   │   │   ├── quick-install-taskmaster.md
│   │   │   ├── remove-all-subtasks.md
│   │   │   ├── remove-dependency.md
│   │   │   ├── remove-subtask.md
│   │   │   ├── remove-subtasks.md
│   │   │   ├── remove-task.md
│   │   │   ├── setup-models.md
│   │   │   ├── show-task.md
│   │   │   ├── smart-workflow.md
│   │   │   ├── sync-readme.md
│   │   │   ├── tm-main.md
│   │   │   ├── to-cancelled.md
│   │   │   ├── to-deferred.md
│   │   │   ├── to-done.md
│   │   │   ├── to-in-progress.md
│   │   │   ├── to-pending.md
│   │   │   ├── to-review.md
│   │   │   ├── update-single-task.md
│   │   │   ├── update-task.md
│   │   │   ├── update-tasks-from-id.md
│   │   │   ├── validate-dependencies.md
│   │   │   └── view-models.md
│   │   ├── mcp.json
│   │   └── package.json
│   ├── tm-bridge
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── add-tag-bridge.ts
│   │   │   ├── bridge-types.ts
│   │   │   ├── bridge-utils.ts
│   │   │   ├── expand-bridge.ts
│   │   │   ├── index.ts
│   │   │   ├── tags-bridge.ts
│   │   │   ├── update-bridge.ts
│   │   │   └── use-tag-bridge.ts
│   │   └── tsconfig.json
│   └── tm-core
│       ├── .gitignore
│       ├── CHANGELOG.md
│       ├── docs
│       │   └── listTasks-architecture.md
│       ├── package.json
│       ├── POC-STATUS.md
│       ├── README.md
│       ├── src
│       │   ├── common
│       │   │   ├── constants
│       │   │   │   ├── index.ts
│       │   │   │   ├── paths.ts
│       │   │   │   └── providers.ts
│       │   │   ├── errors
│       │   │   │   ├── index.ts
│       │   │   │   └── task-master-error.ts
│       │   │   ├── interfaces
│       │   │   │   ├── configuration.interface.ts
│       │   │   │   ├── index.ts
│       │   │   │   └── storage.interface.ts
│       │   │   ├── logger
│       │   │   │   ├── factory.ts
│       │   │   │   ├── index.ts
│       │   │   │   ├── logger.spec.ts
│       │   │   │   └── logger.ts
│       │   │   ├── mappers
│       │   │   │   ├── TaskMapper.test.ts
│       │   │   │   └── TaskMapper.ts
│       │   │   ├── types
│       │   │   │   ├── database.types.ts
│       │   │   │   ├── index.ts
│       │   │   │   ├── legacy.ts
│       │   │   │   └── repository-types.ts
│       │   │   └── utils
│       │   │       ├── git-utils.ts
│       │   │       ├── id-generator.ts
│       │   │       ├── index.ts
│       │   │       ├── path-helpers.ts
│       │   │       ├── path-normalizer.spec.ts
│       │   │       ├── path-normalizer.ts
│       │   │       ├── project-root-finder.spec.ts
│       │   │       ├── project-root-finder.ts
│       │   │       ├── run-id-generator.spec.ts
│       │   │       └── run-id-generator.ts
│       │   ├── index.ts
│       │   ├── modules
│       │   │   ├── ai
│       │   │   │   ├── index.ts
│       │   │   │   ├── interfaces
│       │   │   │   │   └── ai-provider.interface.ts
│       │   │   │   └── providers
│       │   │   │       ├── base-provider.ts
│       │   │   │       └── index.ts
│       │   │   ├── auth
│       │   │   │   ├── auth-domain.spec.ts
│       │   │   │   ├── auth-domain.ts
│       │   │   │   ├── config.ts
│       │   │   │   ├── index.ts
│       │   │   │   ├── managers
│       │   │   │   │   ├── auth-manager.spec.ts
│       │   │   │   │   └── auth-manager.ts
│       │   │   │   ├── services
│       │   │   │   │   ├── context-store.ts
│       │   │   │   │   ├── oauth-service.ts
│       │   │   │   │   ├── organization.service.ts
│       │   │   │   │   ├── supabase-session-storage.spec.ts
│       │   │   │   │   └── supabase-session-storage.ts
│       │   │   │   └── types.ts
│       │   │   ├── briefs
│       │   │   │   ├── briefs-domain.ts
│       │   │   │   ├── index.ts
│       │   │   │   ├── services
│       │   │   │   │   └── brief-service.ts
│       │   │   │   ├── types.ts
│       │   │   │   └── utils
│       │   │   │       └── url-parser.ts
│       │   │   ├── commands
│       │   │   │   └── index.ts
│       │   │   ├── config
│       │   │   │   ├── config-domain.ts
│       │   │   │   ├── index.ts
│       │   │   │   ├── managers
│       │   │   │   │   ├── config-manager.spec.ts
│       │   │   │   │   └── config-manager.ts
│       │   │   │   └── services
│       │   │   │       ├── config-loader.service.spec.ts
│       │   │   │       ├── config-loader.service.ts
│       │   │   │       ├── config-merger.service.spec.ts
│       │   │   │       ├── config-merger.service.ts
│       │   │   │       ├── config-persistence.service.spec.ts
│       │   │   │       ├── config-persistence.service.ts
│       │   │   │       ├── environment-config-provider.service.spec.ts
│       │   │   │       ├── environment-config-provider.service.ts
│       │   │   │       ├── index.ts
│       │   │   │       ├── runtime-state-manager.service.spec.ts
│       │   │   │       └── runtime-state-manager.service.ts
│       │   │   ├── dependencies
│       │   │   │   └── index.ts
│       │   │   ├── execution
│       │   │   │   ├── executors
│       │   │   │   │   ├── base-executor.ts
│       │   │   │   │   ├── claude-executor.ts
│       │   │   │   │   └── executor-factory.ts
│       │   │   │   ├── index.ts
│       │   │   │   ├── services
│       │   │   │   │   └── executor-service.ts
│       │   │   │   └── types.ts
│       │   │   ├── git
│       │   │   │   ├── adapters
│       │   │   │   │   ├── git-adapter.test.ts
│       │   │   │   │   └── git-adapter.ts
│       │   │   │   ├── git-domain.ts
│       │   │   │   ├── index.ts
│       │   │   │   └── services
│       │   │   │       ├── branch-name-generator.spec.ts
│       │   │   │       ├── branch-name-generator.ts
│       │   │   │       ├── commit-message-generator.test.ts
│       │   │   │       ├── commit-message-generator.ts
│       │   │   │       ├── scope-detector.test.ts
│       │   │   │       ├── scope-detector.ts
│       │   │   │       ├── template-engine.test.ts
│       │   │   │       └── template-engine.ts
│       │   │   ├── integration
│       │   │   │   ├── clients
│       │   │   │   │   ├── index.ts
│       │   │   │   │   └── supabase-client.ts
│       │   │   │   ├── integration-domain.ts
│       │   │   │   └── services
│       │   │   │       ├── export.service.ts
│       │   │   │       ├── task-expansion.service.ts
│       │   │   │       └── task-retrieval.service.ts
│       │   │   ├── reports
│       │   │   │   ├── index.ts
│       │   │   │   ├── managers
│       │   │   │   │   └── complexity-report-manager.ts
│       │   │   │   └── types.ts
│       │   │   ├── storage
│       │   │   │   ├── adapters
│       │   │   │   │   ├── activity-logger.ts
│       │   │   │   │   ├── api-storage.ts
│       │   │   │   │   └── file-storage
│       │   │   │   │       ├── file-operations.ts
│       │   │   │   │       ├── file-storage.ts
│       │   │   │   │       ├── format-handler.ts
│       │   │   │   │       ├── index.ts
│       │   │   │   │       └── path-resolver.ts
│       │   │   │   ├── index.ts
│       │   │   │   ├── services
│       │   │   │   │   └── storage-factory.ts
│       │   │   │   └── utils
│       │   │   │       └── api-client.ts
│       │   │   ├── tasks
│       │   │   │   ├── entities
│       │   │   │   │   └── task.entity.ts
│       │   │   │   ├── parser
│       │   │   │   │   └── index.ts
│       │   │   │   ├── repositories
│       │   │   │   │   ├── supabase
│       │   │   │   │   │   ├── dependency-fetcher.ts
│       │   │   │   │   │   ├── index.ts
│       │   │   │   │   │   └── supabase-repository.ts
│       │   │   │   │   └── task-repository.interface.ts
│       │   │   │   ├── services
│       │   │   │   │   ├── preflight-checker.service.ts
│       │   │   │   │   ├── tag.service.ts
│       │   │   │   │   ├── task-execution-service.ts
│       │   │   │   │   ├── task-loader.service.ts
│       │   │   │   │   └── task-service.ts
│       │   │   │   └── tasks-domain.ts
│       │   │   ├── ui
│       │   │   │   └── index.ts
│       │   │   └── workflow
│       │   │       ├── managers
│       │   │       │   ├── workflow-state-manager.spec.ts
│       │   │       │   └── workflow-state-manager.ts
│       │   │       ├── orchestrators
│       │   │       │   ├── workflow-orchestrator.test.ts
│       │   │       │   └── workflow-orchestrator.ts
│       │   │       ├── services
│       │   │       │   ├── test-result-validator.test.ts
│       │   │       │   ├── test-result-validator.ts
│       │   │       │   ├── test-result-validator.types.ts
│       │   │       │   ├── workflow-activity-logger.ts
│       │   │       │   └── workflow.service.ts
│       │   │       ├── types.ts
│       │   │       └── workflow-domain.ts
│       │   ├── subpath-exports.test.ts
│       │   ├── tm-core.ts
│       │   └── utils
│       │       └── time.utils.ts
│       ├── tests
│       │   ├── auth
│       │   │   └── auth-refresh.test.ts
│       │   ├── integration
│       │   │   ├── auth-token-refresh.test.ts
│       │   │   ├── list-tasks.test.ts
│       │   │   └── storage
│       │   │       └── activity-logger.test.ts
│       │   ├── mocks
│       │   │   └── mock-provider.ts
│       │   ├── setup.ts
│       │   └── unit
│       │       ├── base-provider.test.ts
│       │       ├── executor.test.ts
│       │       └── smoke.test.ts
│       ├── tsconfig.json
│       └── vitest.config.ts
├── README-task-master.md
├── README.md
├── scripts
│   ├── create-worktree.sh
│   ├── dev.js
│   ├── init.js
│   ├── list-worktrees.sh
│   ├── modules
│   │   ├── ai-services-unified.js
│   │   ├── bridge-utils.js
│   │   ├── commands.js
│   │   ├── config-manager.js
│   │   ├── dependency-manager.js
│   │   ├── index.js
│   │   ├── prompt-manager.js
│   │   ├── supported-models.json
│   │   ├── sync-readme.js
│   │   ├── task-manager
│   │   │   ├── add-subtask.js
│   │   │   ├── add-task.js
│   │   │   ├── analyze-task-complexity.js
│   │   │   ├── clear-subtasks.js
│   │   │   ├── expand-all-tasks.js
│   │   │   ├── expand-task.js
│   │   │   ├── find-next-task.js
│   │   │   ├── generate-task-files.js
│   │   │   ├── is-task-dependent.js
│   │   │   ├── list-tasks.js
│   │   │   ├── migrate.js
│   │   │   ├── models.js
│   │   │   ├── move-task.js
│   │   │   ├── parse-prd
│   │   │   │   ├── index.js
│   │   │   │   ├── parse-prd-config.js
│   │   │   │   ├── parse-prd-helpers.js
│   │   │   │   ├── parse-prd-non-streaming.js
│   │   │   │   ├── parse-prd-streaming.js
│   │   │   │   └── parse-prd.js
│   │   │   ├── remove-subtask.js
│   │   │   ├── remove-task.js
│   │   │   ├── research.js
│   │   │   ├── response-language.js
│   │   │   ├── scope-adjustment.js
│   │   │   ├── set-task-status.js
│   │   │   ├── tag-management.js
│   │   │   ├── task-exists.js
│   │   │   ├── update-single-task-status.js
│   │   │   ├── update-subtask-by-id.js
│   │   │   ├── update-task-by-id.js
│   │   │   └── update-tasks.js
│   │   ├── task-manager.js
│   │   ├── ui.js
│   │   ├── update-config-tokens.js
│   │   ├── utils
│   │   │   ├── contextGatherer.js
│   │   │   ├── fuzzyTaskSearch.js
│   │   │   └── git-utils.js
│   │   └── utils.js
│   ├── task-complexity-report.json
│   ├── test-claude-errors.js
│   └── test-claude.js
├── sonar-project.properties
├── src
│   ├── ai-providers
│   │   ├── anthropic.js
│   │   ├── azure.js
│   │   ├── base-provider.js
│   │   ├── bedrock.js
│   │   ├── claude-code.js
│   │   ├── codex-cli.js
│   │   ├── gemini-cli.js
│   │   ├── google-vertex.js
│   │   ├── google.js
│   │   ├── grok-cli.js
│   │   ├── groq.js
│   │   ├── index.js
│   │   ├── lmstudio.js
│   │   ├── ollama.js
│   │   ├── openai-compatible.js
│   │   ├── openai.js
│   │   ├── openrouter.js
│   │   ├── perplexity.js
│   │   ├── xai.js
│   │   ├── zai-coding.js
│   │   └── zai.js
│   ├── constants
│   │   ├── commands.js
│   │   ├── paths.js
│   │   ├── profiles.js
│   │   ├── rules-actions.js
│   │   ├── task-priority.js
│   │   └── task-status.js
│   ├── profiles
│   │   ├── amp.js
│   │   ├── base-profile.js
│   │   ├── claude.js
│   │   ├── cline.js
│   │   ├── codex.js
│   │   ├── cursor.js
│   │   ├── gemini.js
│   │   ├── index.js
│   │   ├── kilo.js
│   │   ├── kiro.js
│   │   ├── opencode.js
│   │   ├── roo.js
│   │   ├── trae.js
│   │   ├── vscode.js
│   │   ├── windsurf.js
│   │   └── zed.js
│   ├── progress
│   │   ├── base-progress-tracker.js
│   │   ├── cli-progress-factory.js
│   │   ├── parse-prd-tracker.js
│   │   ├── progress-tracker-builder.js
│   │   └── tracker-ui.js
│   ├── prompts
│   │   ├── add-task.json
│   │   ├── analyze-complexity.json
│   │   ├── expand-task.json
│   │   ├── parse-prd.json
│   │   ├── README.md
│   │   ├── research.json
│   │   ├── schemas
│   │   │   ├── parameter.schema.json
│   │   │   ├── prompt-template.schema.json
│   │   │   ├── README.md
│   │   │   └── variant.schema.json
│   │   ├── update-subtask.json
│   │   ├── update-task.json
│   │   └── update-tasks.json
│   ├── provider-registry
│   │   └── index.js
│   ├── schemas
│   │   ├── add-task.js
│   │   ├── analyze-complexity.js
│   │   ├── base-schemas.js
│   │   ├── expand-task.js
│   │   ├── parse-prd.js
│   │   ├── registry.js
│   │   ├── update-subtask.js
│   │   ├── update-task.js
│   │   └── update-tasks.js
│   ├── task-master.js
│   ├── ui
│   │   ├── confirm.js
│   │   ├── indicators.js
│   │   └── parse-prd.js
│   └── utils
│       ├── asset-resolver.js
│       ├── create-mcp-config.js
│       ├── format.js
│       ├── getVersion.js
│       ├── logger-utils.js
│       ├── manage-gitignore.js
│       ├── path-utils.js
│       ├── profiles.js
│       ├── rule-transformer.js
│       ├── stream-parser.js
│       └── timeout-manager.js
├── test-clean-tags.js
├── test-config-manager.js
├── test-prd.txt
├── test-tag-functions.js
├── test-version-check-full.js
├── test-version-check.js
├── tests
│   ├── e2e
│   │   ├── e2e_helpers.sh
│   │   ├── parse_llm_output.cjs
│   │   ├── run_e2e.sh
│   │   ├── run_fallback_verification.sh
│   │   └── test_llm_analysis.sh
│   ├── fixtures
│   │   ├── .taskmasterconfig
│   │   ├── sample-claude-response.js
│   │   ├── sample-prd.txt
│   │   └── sample-tasks.js
│   ├── helpers
│   │   └── tool-counts.js
│   ├── integration
│   │   ├── claude-code-error-handling.test.js
│   │   ├── claude-code-optional.test.js
│   │   ├── cli
│   │   │   ├── commands.test.js
│   │   │   ├── complex-cross-tag-scenarios.test.js
│   │   │   └── move-cross-tag.test.js
│   │   ├── manage-gitignore.test.js
│   │   ├── mcp-server
│   │   │   └── direct-functions.test.js
│   │   ├── move-task-cross-tag.integration.test.js
│   │   ├── move-task-simple.integration.test.js
│   │   ├── profiles
│   │   │   ├── amp-init-functionality.test.js
│   │   │   ├── claude-init-functionality.test.js
│   │   │   ├── cline-init-functionality.test.js
│   │   │   ├── codex-init-functionality.test.js
│   │   │   ├── cursor-init-functionality.test.js
│   │   │   ├── gemini-init-functionality.test.js
│   │   │   ├── opencode-init-functionality.test.js
│   │   │   ├── roo-files-inclusion.test.js
│   │   │   ├── roo-init-functionality.test.js
│   │   │   ├── rules-files-inclusion.test.js
│   │   │   ├── trae-init-functionality.test.js
│   │   │   ├── vscode-init-functionality.test.js
│   │   │   └── windsurf-init-functionality.test.js
│   │   └── providers
│   │       └── temperature-support.test.js
│   ├── manual
│   │   ├── progress
│   │   │   ├── parse-prd-analysis.js
│   │   │   ├── test-parse-prd.js
│   │   │   └── TESTING_GUIDE.md
│   │   └── prompts
│   │       ├── prompt-test.js
│   │       └── README.md
│   ├── README.md
│   ├── setup.js
│   └── unit
│       ├── ai-providers
│       │   ├── base-provider.test.js
│       │   ├── claude-code.test.js
│       │   ├── codex-cli.test.js
│       │   ├── gemini-cli.test.js
│       │   ├── lmstudio.test.js
│       │   ├── mcp-components.test.js
│       │   ├── openai-compatible.test.js
│       │   ├── openai.test.js
│       │   ├── provider-registry.test.js
│       │   ├── zai-coding.test.js
│       │   ├── zai-provider.test.js
│       │   ├── zai-schema-introspection.test.js
│       │   └── zai.test.js
│       ├── ai-services-unified.test.js
│       ├── commands.test.js
│       ├── config-manager.test.js
│       ├── config-manager.test.mjs
│       ├── dependency-manager.test.js
│       ├── init.test.js
│       ├── initialize-project.test.js
│       ├── kebab-case-validation.test.js
│       ├── manage-gitignore.test.js
│       ├── mcp
│       │   └── tools
│       │       ├── __mocks__
│       │       │   └── move-task.js
│       │       ├── add-task.test.js
│       │       ├── analyze-complexity.test.js
│       │       ├── expand-all.test.js
│       │       ├── get-tasks.test.js
│       │       ├── initialize-project.test.js
│       │       ├── move-task-cross-tag-options.test.js
│       │       ├── move-task-cross-tag.test.js
│       │       ├── remove-task.test.js
│       │       └── tool-registration.test.js
│       ├── mcp-providers
│       │   ├── mcp-components.test.js
│       │   └── mcp-provider.test.js
│       ├── parse-prd.test.js
│       ├── profiles
│       │   ├── amp-integration.test.js
│       │   ├── claude-integration.test.js
│       │   ├── cline-integration.test.js
│       │   ├── codex-integration.test.js
│       │   ├── cursor-integration.test.js
│       │   ├── gemini-integration.test.js
│       │   ├── kilo-integration.test.js
│       │   ├── kiro-integration.test.js
│       │   ├── mcp-config-validation.test.js
│       │   ├── opencode-integration.test.js
│       │   ├── profile-safety-check.test.js
│       │   ├── roo-integration.test.js
│       │   ├── rule-transformer-cline.test.js
│       │   ├── rule-transformer-cursor.test.js
│       │   ├── rule-transformer-gemini.test.js
│       │   ├── rule-transformer-kilo.test.js
│       │   ├── rule-transformer-kiro.test.js
│       │   ├── rule-transformer-opencode.test.js
│       │   ├── rule-transformer-roo.test.js
│       │   ├── rule-transformer-trae.test.js
│       │   ├── rule-transformer-vscode.test.js
│       │   ├── rule-transformer-windsurf.test.js
│       │   ├── rule-transformer-zed.test.js
│       │   ├── rule-transformer.test.js
│       │   ├── selective-profile-removal.test.js
│       │   ├── subdirectory-support.test.js
│       │   ├── trae-integration.test.js
│       │   ├── vscode-integration.test.js
│       │   ├── windsurf-integration.test.js
│       │   └── zed-integration.test.js
│       ├── progress
│       │   └── base-progress-tracker.test.js
│       ├── prompt-manager.test.js
│       ├── prompts
│       │   ├── expand-task-prompt.test.js
│       │   └── prompt-migration.test.js
│       ├── scripts
│       │   └── modules
│       │       ├── commands
│       │       │   ├── move-cross-tag.test.js
│       │       │   └── README.md
│       │       ├── dependency-manager
│       │       │   ├── circular-dependencies.test.js
│       │       │   ├── cross-tag-dependencies.test.js
│       │       │   └── fix-dependencies-command.test.js
│       │       ├── task-manager
│       │       │   ├── add-subtask.test.js
│       │       │   ├── add-task.test.js
│       │       │   ├── analyze-task-complexity.test.js
│       │       │   ├── clear-subtasks.test.js
│       │       │   ├── complexity-report-tag-isolation.test.js
│       │       │   ├── expand-all-tasks.test.js
│       │       │   ├── expand-task.test.js
│       │       │   ├── find-next-task.test.js
│       │       │   ├── generate-task-files.test.js
│       │       │   ├── list-tasks.test.js
│       │       │   ├── models-baseurl.test.js
│       │       │   ├── move-task-cross-tag.test.js
│       │       │   ├── move-task.test.js
│       │       │   ├── parse-prd-schema.test.js
│       │       │   ├── parse-prd.test.js
│       │       │   ├── remove-subtask.test.js
│       │       │   ├── remove-task.test.js
│       │       │   ├── research.test.js
│       │       │   ├── scope-adjustment.test.js
│       │       │   ├── set-task-status.test.js
│       │       │   ├── setup.js
│       │       │   ├── update-single-task-status.test.js
│       │       │   ├── update-subtask-by-id.test.js
│       │       │   ├── update-task-by-id.test.js
│       │       │   └── update-tasks.test.js
│       │       ├── ui
│       │       │   └── cross-tag-error-display.test.js
│       │       └── utils-tag-aware-paths.test.js
│       ├── task-finder.test.js
│       ├── task-manager
│       │   ├── clear-subtasks.test.js
│       │   ├── move-task.test.js
│       │   ├── tag-boundary.test.js
│       │   └── tag-management.test.js
│       ├── task-master.test.js
│       ├── ui
│       │   └── indicators.test.js
│       ├── ui.test.js
│       ├── utils-strip-ansi.test.js
│       └── utils.test.js
├── tsconfig.json
├── tsdown.config.ts
├── turbo.json
└── update-task-migration-plan.md
```

# Files

--------------------------------------------------------------------------------
/docs/contributor-docs/testing-roo-integration.md:
--------------------------------------------------------------------------------

```markdown
# Testing Roo Integration

This document provides instructions for testing the Roo integration in the Task Master package.

## Running Tests

To run the tests for the Roo integration:

```bash
# Run all tests
npm test

# Run only Roo integration tests
npm test -- -t "Roo"

# Run specific test file
npm test -- tests/integration/roo-files-inclusion.test.js
```

## Manual Testing

To manually verify that the Roo files are properly included in the package:

1. Create a test directory:

   ```bash
   mkdir test-tm
   cd test-tm
   ```

2. Create a package.json file:

   ```bash
   npm init -y
   ```

3. Install the task-master-ai package locally:

   ```bash
   # From the root of the claude-task-master repository
   cd ..
   npm pack
   # This will create a file like task-master-ai-0.12.0.tgz

   # Move back to the test directory
   cd test-tm
   npm install ../task-master-ai-0.12.0.tgz
   ```

4. Initialize a new Task Master project:

   ```bash
   npx task-master init --yes
   ```

5. Verify that all Roo files and directories are created:

   ```bash
   # Check that .roomodes file exists
   ls -la | grep .roomodes

   # Check that .roo directory exists and contains all mode directories
   ls -la .roo
   ls -la .roo/rules
   ls -la .roo/rules-architect
   ls -la .roo/rules-ask
   ls -la .roo/rules-orchestrator
   ls -la .roo/rules-code
   ls -la .roo/rules-debug
   ls -la .roo/rules-test
   ```

## What to Look For

When running the tests or performing manual verification, ensure that:

1. The package includes `.roo/**` and `.roomodes` in the `files` array in package.json
2. The `prepare-package.js` script verifies the existence of all required Roo files
3. The `init.js` script creates all necessary .roo directories and copies .roomodes file
4. All source files for Roo integration exist in `assets/roocode/.roo` and `assets/roocode/.roomodes`

## Compatibility

Ensure that the Roo integration works alongside existing Cursor functionality:

1. Initialize a new project that uses both Cursor and Roo:

   ```bash
   npx task-master init --yes
   ```

2. Verify that both `.cursor` and `.roo` directories are created
3. Verify that both `.windsurfrules` and `.roomodes` files are created
4. Confirm that existing functionality continues to work as expected

```

--------------------------------------------------------------------------------
/.kiro/steering/self_improve.md:
--------------------------------------------------------------------------------

```markdown
---
inclusion: always
---

- **Rule Improvement Triggers:**
  - New code patterns not covered by existing rules
  - Repeated similar implementations across files
  - Common error patterns that could be prevented
  - New libraries or tools being used consistently
  - Emerging best practices in the codebase

- **Analysis Process:**
  - Compare new code with existing rules
  - Identify patterns that should be standardized
  - Look for references to external documentation
  - Check for consistent error handling patterns
  - Monitor test patterns and coverage

- **Rule Updates:**
  - **Add New Rules When:**
    - A new technology/pattern is used in 3+ files
    - Common bugs could be prevented by a rule
    - Code reviews repeatedly mention the same feedback
    - New security or performance patterns emerge

  - **Modify Existing Rules When:**
    - Better examples exist in the codebase
    - Additional edge cases are discovered
    - Related rules have been updated
    - Implementation details have changed

- **Example Pattern Recognition:**
  ```typescript
  // If you see repeated patterns like:
  const data = await prisma.user.findMany({
    select: { id: true, email: true },
    where: { status: 'ACTIVE' }
  });
  
  // Consider adding to [prisma.md](.kiro/steering/prisma.md):
  // - Standard select fields
  // - Common where conditions
  // - Performance optimization patterns
  ```

- **Rule Quality Checks:**
  - Rules should be actionable and specific
  - Examples should come from actual code
  - References should be up to date
  - Patterns should be consistently enforced

- **Continuous Improvement:**
  - Monitor code review comments
  - Track common development questions
  - Update rules after major refactors
  - Add links to relevant documentation
  - Cross-reference related rules

- **Rule Deprecation:**
  - Mark outdated patterns as deprecated
  - Remove rules that no longer apply
  - Update references to deprecated rules
  - Document migration paths for old patterns

- **Documentation Updates:**
  - Keep examples synchronized with code
  - Update references to external docs
  - Maintain links between related rules
  - Document breaking changes
Follow [kiro_rules.md](.kiro/steering/kiro_rules.md) for proper rule formatting and structure.

```

--------------------------------------------------------------------------------
/apps/mcp/src/tools/autopilot/status.tool.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview autopilot-status MCP tool
 * Get comprehensive workflow status and progress information
 */

import { z } from 'zod';
import {
	handleApiResult,
	withNormalizedProjectRoot
} from '../../shared/utils.js';
import type { MCPContext } from '../../shared/types.js';
import { WorkflowService } from '@tm/core';
import type { FastMCP } from 'fastmcp';

const StatusSchema = z.object({
	projectRoot: z
		.string()
		.describe('Absolute path to the project root directory')
});

type StatusArgs = z.infer<typeof StatusSchema>;

/**
 * Register the autopilot_status tool with the MCP server
 */
export function registerAutopilotStatusTool(server: FastMCP) {
	server.addTool({
		name: 'autopilot_status',
		description:
			'Get comprehensive workflow status including current phase, progress, subtask details, and activity history.',
		parameters: StatusSchema,
		execute: withNormalizedProjectRoot(
			async (args: StatusArgs, context: MCPContext) => {
				const { projectRoot } = args;

				try {
					context.log.info(`Getting workflow status for ${projectRoot}`);

					const workflowService = new WorkflowService(projectRoot);

					// Check if workflow exists
					if (!(await workflowService.hasWorkflow())) {
						return handleApiResult({
							result: {
								success: false,
								error: {
									message:
										'No active workflow found. Start a workflow with autopilot_start'
								}
							},
							log: context.log,
							projectRoot
						});
					}

					// Resume to load state
					await workflowService.resumeWorkflow();

					// Get status
					const status = workflowService.getStatus();

					context.log.info(
						`Workflow status retrieved for task ${status.taskId}`
					);

					return handleApiResult({
						result: {
							success: true,
							data: status
						},
						log: context.log,
						projectRoot
					});
				} catch (error: any) {
					context.log.error(`Error in autopilot-status: ${error.message}`);
					if (error.stack) {
						context.log.debug(error.stack);
					}
					return handleApiResult({
						result: {
							success: false,
							error: {
								message: `Failed to get workflow status: ${error.message}`
							}
						},
						log: context.log,
						projectRoot
					});
				}
			}
		)
	});
}

```

--------------------------------------------------------------------------------
/mcp-server/src/tools/fix-dependencies.js:
--------------------------------------------------------------------------------

```javascript
/**
 * tools/fix-dependencies.js
 * Tool for automatically fixing invalid task dependencies
 */

import { z } from 'zod';
import {
	handleApiResult,
	createErrorResponse,
	withNormalizedProjectRoot
} from './utils.js';
import { fixDependenciesDirect } from '../core/task-master-core.js';
import { findTasksPath } from '../core/utils/path-utils.js';
import { resolveTag } from '../../../scripts/modules/utils.js';
/**
 * Register the fixDependencies tool with the MCP server
 * @param {Object} server - FastMCP server instance
 */
export function registerFixDependenciesTool(server) {
	server.addTool({
		name: 'fix_dependencies',
		description: 'Fix invalid dependencies in tasks automatically',
		parameters: z.object({
			file: z.string().optional().describe('Absolute path to the tasks file'),
			projectRoot: z
				.string()
				.describe('The directory of the project. Must be an absolute path.'),
			tag: z.string().optional().describe('Tag context to operate on')
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				log.info(`Fixing dependencies with args: ${JSON.stringify(args)}`);

				const resolvedTag = resolveTag({
					projectRoot: args.projectRoot,
					tag: args.tag
				});

				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
				let tasksJsonPath;
				try {
					tasksJsonPath = findTasksPath(
						{ projectRoot: args.projectRoot, file: args.file },
						log
					);
				} catch (error) {
					log.error(`Error finding tasks.json: ${error.message}`);
					return createErrorResponse(
						`Failed to find tasks.json: ${error.message}`
					);
				}

				const result = await fixDependenciesDirect(
					{
						tasksJsonPath: tasksJsonPath,
						projectRoot: args.projectRoot,
						tag: resolvedTag
					},
					log
				);

				if (result.success) {
					log.info(`Successfully fixed dependencies: ${result.data.message}`);
				} else {
					log.error(`Failed to fix dependencies: ${result.error.message}`);
				}

				return handleApiResult(
					result,
					log,
					'Error fixing dependencies',
					undefined,
					args.projectRoot
				);
			} catch (error) {
				log.error(`Error in fixDependencies tool: ${error.message}`);
				return createErrorResponse(error.message);
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/packages/tm-core/src/modules/config/config-domain.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Config Domain Facade
 * Public API for configuration management
 */

import type {
	PartialConfiguration,
	RuntimeStorageConfig
} from '../../common/interfaces/configuration.interface.js';
import type { ConfigManager } from './managers/config-manager.js';

/**
 * Config Domain - Unified API for configuration operations
 */
export class ConfigDomain {
	constructor(private configManager: ConfigManager) {}

	// ========== Configuration Access ==========

	/**
	 * Get the full configuration
	 */
	getConfig(): PartialConfiguration {
		return this.configManager.getConfig();
	}

	/**
	 * Get storage configuration
	 */
	getStorageConfig(): RuntimeStorageConfig {
		return this.configManager.getStorageConfig();
	}

	/**
	 * Get model configuration
	 */
	getModelConfig() {
		return this.configManager.getModelConfig();
	}

	/**
	 * Get response language
	 */
	getResponseLanguage(): string {
		return this.configManager.getResponseLanguage();
	}

	/**
	 * Get project root path
	 */
	getProjectRoot(): string {
		return this.configManager.getProjectRoot();
	}

	/**
	 * Check if API is explicitly configured
	 */
	isApiExplicitlyConfigured(): boolean {
		return this.configManager.isApiExplicitlyConfigured();
	}

	// ========== Runtime State ==========

	/**
	 * Get the currently active tag
	 */
	getActiveTag(): string {
		return this.configManager.getActiveTag();
	}

	/**
	 * Set the active tag
	 */
	async setActiveTag(tag: string): Promise<void> {
		return this.configManager.setActiveTag(tag);
	}

	// ========== Configuration Updates ==========

	/**
	 * Update configuration
	 */
	async updateConfig(updates: PartialConfiguration): Promise<void> {
		return this.configManager.updateConfig(updates);
	}

	/**
	 * Set response language
	 */
	async setResponseLanguage(language: string): Promise<void> {
		return this.configManager.setResponseLanguage(language);
	}

	/**
	 * Save current configuration
	 */
	async saveConfig(): Promise<void> {
		return this.configManager.saveConfig();
	}

	/**
	 * Reset configuration to defaults
	 */
	async reset(): Promise<void> {
		return this.configManager.reset();
	}

	// ========== Utilities ==========

	/**
	 * Get configuration sources for debugging
	 */
	getConfigSources() {
		return this.configManager.getConfigSources();
	}
}

```

--------------------------------------------------------------------------------
/tests/unit/profiles/rule-transformer-opencode.test.js:
--------------------------------------------------------------------------------

```javascript
import { jest } from '@jest/globals';
import { getRulesProfile } from '../../../src/utils/rule-transformer.js';
import { opencodeProfile } from '../../../src/profiles/opencode.js';

describe('Rule Transformer - OpenCode Profile', () => {
	test('should have correct profile configuration', () => {
		const opencodeProfile = getRulesProfile('opencode');

		expect(opencodeProfile).toBeDefined();
		expect(opencodeProfile.profileName).toBe('opencode');
		expect(opencodeProfile.displayName).toBe('OpenCode');
		expect(opencodeProfile.profileDir).toBe('.');
		expect(opencodeProfile.rulesDir).toBe('.');
		expect(opencodeProfile.mcpConfig).toBe(true);
		expect(opencodeProfile.mcpConfigName).toBe('opencode.json');
		expect(opencodeProfile.mcpConfigPath).toBe('opencode.json');
		expect(opencodeProfile.includeDefaultRules).toBe(false);
		expect(opencodeProfile.fileMap).toEqual({
			'AGENTS.md': 'AGENTS.md'
		});
	});

	test('should have lifecycle functions for MCP config transformation', () => {
		// Verify that opencode.js has lifecycle functions
		expect(opencodeProfile.onPostConvertRulesProfile).toBeDefined();
		expect(typeof opencodeProfile.onPostConvertRulesProfile).toBe('function');
		expect(opencodeProfile.onRemoveRulesProfile).toBeDefined();
		expect(typeof opencodeProfile.onRemoveRulesProfile).toBe('function');
	});

	test('should use opencode.json instead of mcp.json', () => {
		const opencodeProfile = getRulesProfile('opencode');
		expect(opencodeProfile.mcpConfigName).toBe('opencode.json');
		expect(opencodeProfile.mcpConfigPath).toBe('opencode.json');
	});

	test('should not include default rules', () => {
		const opencodeProfile = getRulesProfile('opencode');
		expect(opencodeProfile.includeDefaultRules).toBe(false);
	});

	test('should have correct file mapping', () => {
		const opencodeProfile = getRulesProfile('opencode');
		expect(opencodeProfile.fileMap).toEqual({
			'AGENTS.md': 'AGENTS.md'
		});
	});

	test('should use root directory for both profile and rules', () => {
		const opencodeProfile = getRulesProfile('opencode');
		expect(opencodeProfile.profileDir).toBe('.');
		expect(opencodeProfile.rulesDir).toBe('.');
	});

	test('should have MCP configuration enabled', () => {
		const opencodeProfile = getRulesProfile('opencode');
		expect(opencodeProfile.mcpConfig).toBe(true);
	});
});

```

--------------------------------------------------------------------------------
/tests/unit/task-manager/tag-management.test.js:
--------------------------------------------------------------------------------

```javascript
import fs from 'fs';
import path from 'path';
import {
	createTag,
	deleteTag,
	renameTag,
	copyTag,
	tags as listTags
} from '../../../scripts/modules/task-manager/tag-management.js';

const TEMP_DIR = path.join(process.cwd(), '.tmp_tag_management_tests');
const TASKS_PATH = path.join(TEMP_DIR, 'tasks.json');

/**
 * Helper to write an initial tagged tasks.json structure
 */
function writeInitialFile() {
	const initialData = {
		master: {
			tasks: [{ id: 1, title: 'Initial Task', status: 'pending' }],
			metadata: {
				created: new Date().toISOString(),
				description: 'Master tag'
			}
		}
	};
	fs.mkdirSync(TEMP_DIR, { recursive: true });
	fs.writeFileSync(TASKS_PATH, JSON.stringify(initialData, null, 2));
}

describe('Tag Management – writeJSON context preservation', () => {
	beforeEach(() => {
		writeInitialFile();
	});

	afterEach(() => {
		fs.rmSync(TEMP_DIR, { recursive: true, force: true });
	});

	it('createTag should not corrupt other tags', async () => {
		await createTag(
			TASKS_PATH,
			'feature',
			{ copyFromCurrent: true },
			{ projectRoot: TEMP_DIR },
			'json'
		);

		const data = JSON.parse(fs.readFileSync(TASKS_PATH, 'utf8'));
		expect(data.master).toBeDefined();
		expect(data.feature).toBeDefined();
	});

	it('renameTag should keep overall structure intact', async () => {
		await createTag(
			TASKS_PATH,
			'oldtag',
			{},
			{ projectRoot: TEMP_DIR },
			'json'
		);

		await renameTag(
			TASKS_PATH,
			'oldtag',
			'newtag',
			{},
			{ projectRoot: TEMP_DIR },
			'json'
		);

		const data = JSON.parse(fs.readFileSync(TASKS_PATH, 'utf8'));
		expect(data.newtag).toBeDefined();
		expect(data.oldtag).toBeUndefined();
	});

	it('copyTag then deleteTag preserves other tags', async () => {
		await createTag(
			TASKS_PATH,
			'source',
			{},
			{ projectRoot: TEMP_DIR },
			'json'
		);

		await copyTag(
			TASKS_PATH,
			'source',
			'copy',
			{},
			{ projectRoot: TEMP_DIR },
			'json'
		);

		await deleteTag(
			TASKS_PATH,
			'copy',
			{ yes: true },
			{ projectRoot: TEMP_DIR },
			'json'
		);

		const tagsList = await listTags(
			TASKS_PATH,
			{},
			{ projectRoot: TEMP_DIR },
			'json'
		);

		const tagNames = tagsList.tags.map((t) => t.name);
		expect(tagNames).toContain('master');
		expect(tagNames).toContain('source');
		expect(tagNames).not.toContain('copy');
	});
});

```

--------------------------------------------------------------------------------
/mcp-server/src/tools/complexity-report.js:
--------------------------------------------------------------------------------

```javascript
/**
 * tools/complexity-report.js
 * Tool for displaying the complexity analysis report
 */

import { z } from 'zod';
import {
	handleApiResult,
	createErrorResponse,
	withNormalizedProjectRoot
} from './utils.js';
import { complexityReportDirect } from '../core/task-master-core.js';
import { COMPLEXITY_REPORT_FILE } from '../../../src/constants/paths.js';
import { findComplexityReportPath } from '../core/utils/path-utils.js';
import { getCurrentTag } from '../../../scripts/modules/utils.js';

/**
 * Register the complexityReport tool with the MCP server
 * @param {Object} server - FastMCP server instance
 */
export function registerComplexityReportTool(server) {
	server.addTool({
		name: 'complexity_report',
		description: 'Display the complexity analysis report in a readable format',
		parameters: z.object({
			file: z
				.string()
				.optional()
				.describe(
					`Path to the report file (default: ${COMPLEXITY_REPORT_FILE})`
				),
			projectRoot: z
				.string()
				.describe('The directory of the project. Must be an absolute path.')
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				log.info(
					`Getting complexity report with args: ${JSON.stringify(args)}`
				);

				const resolvedTag = getCurrentTag(args.projectRoot);

				const pathArgs = {
					projectRoot: args.projectRoot,
					complexityReport: args.file,
					tag: resolvedTag
				};

				const reportPath = findComplexityReportPath(pathArgs, log);
				log.info('Reading complexity report from path: ', reportPath);

				if (!reportPath) {
					return createErrorResponse(
						'No complexity report found. Run task-master analyze-complexity first.'
					);
				}

				const result = await complexityReportDirect(
					{
						reportPath: reportPath
					},
					log
				);

				if (result.success) {
					log.info('Successfully retrieved complexity report');
				} else {
					log.error(
						`Failed to retrieve complexity report: ${result.error.message}`
					);
				}

				return handleApiResult(
					result,
					log,
					'Error retrieving complexity report',
					undefined,
					args.projectRoot
				);
			} catch (error) {
				log.error(`Error in complexity-report tool: ${error.message}`);
				return createErrorResponse(
					`Failed to retrieve complexity report: ${error.message}`
				);
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/scripts/create-worktree.sh:
--------------------------------------------------------------------------------

```bash
#!/bin/bash

# Create a git worktree for parallel Claude Code development
# Usage: ./scripts/create-worktree.sh [branch-name]

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
WORKTREES_DIR="$(cd "$PROJECT_ROOT/.." && pwd)/claude-task-master-worktrees"
cd "$PROJECT_ROOT"

# Get branch name (default to current branch with auto/ prefix)
if [ -z "$1" ]; then
    CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
    if [ "$CURRENT_BRANCH" = "HEAD" ]; then
        echo "Detached HEAD detected. Please specify a branch: ./scripts/create-worktree.sh <branch-name>"
        exit 1
    fi
    BRANCH_NAME="auto/$CURRENT_BRANCH"
    echo "No branch specified, using: $BRANCH_NAME"
else
    BRANCH_NAME="$1"
fi

# Create worktrees directory if it doesn't exist
mkdir -p "$WORKTREES_DIR"

# Sanitize branch name for directory (replace / with -)
DIR_NAME=$(echo "$BRANCH_NAME" | sed 's/\//-/g')
WORKTREE_PATH="$WORKTREES_DIR/$DIR_NAME"

echo "Creating git worktree..."
echo "  Branch: $BRANCH_NAME"
echo "  Path: $WORKTREE_PATH"

# Check if worktree already exists
if [ -d "$WORKTREE_PATH" ]; then
    echo "❌ Worktree already exists at: $WORKTREE_PATH"
    echo "   Remove it first with: git worktree remove $WORKTREE_PATH"
    exit 1
fi

# Create worktree (new or existing branch)
if git show-ref --verify --quiet "refs/heads/$BRANCH_NAME"; then
  git worktree add "$WORKTREE_PATH" "$BRANCH_NAME"
elif git remote get-url origin >/dev/null 2>&1 && git ls-remote --exit-code --heads origin "$BRANCH_NAME" >/dev/null 2>&1; then
  # Create a local branch from the remote and attach worktree
  git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH" "origin/$BRANCH_NAME"
  # Ensure the new branch tracks the remote
  git -C "$WORKTREE_PATH" branch --set-upstream-to="origin/$BRANCH_NAME" "$BRANCH_NAME"
else
  git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH"
fi

echo ""
echo "✅ Worktree created successfully!"
echo ""
echo "📂 Location: $WORKTREE_PATH"
echo "🌿 Branch: $BRANCH_NAME"
echo ""
echo "Next steps:"
echo "  1. cd $WORKTREE_PATH"
echo "  2. Open with your AI editor:"
echo "     - Cursor: cursor ."
echo "     - VS Code: code ."
echo "     - Windsurf: windsurf ."
echo "     - Claude Code: claude"
echo ""
echo "To remove this worktree later:"
echo "  git worktree remove $WORKTREE_PATH"

```

--------------------------------------------------------------------------------
/apps/docs/archive/configuration.mdx:
--------------------------------------------------------------------------------

```markdown
---
title: "Configuration"
description: "Configure Task Master through environment variables in a .env file"
---

## Required Configuration

<Note>
  Task Master requires an Anthropic API key to function. Add this to your `.env` file:

  ```bash
  ANTHROPIC_API_KEY=sk-ant-api03-your-api-key
  ```

  You can obtain an API key from the [Anthropic Console](https://console.anthropic.com/).
</Note>

## Optional Configuration

| Variable | Default Value | Description | Example |
| --- | --- | --- | --- |
| `MODEL` | `"claude-3-7-sonnet-20250219"` | Claude model to use | `MODEL=claude-3-opus-20240229` |
| `MAX_TOKENS` | `"4000"` | Maximum tokens for responses | `MAX_TOKENS=8000` |
| `TEMPERATURE` | `"0.7"` | Temperature for model responses | `TEMPERATURE=0.5` |
| `DEBUG` | `"false"` | Enable debug logging | `DEBUG=true` |
| `LOG_LEVEL` | `"info"` | Console output level | `LOG_LEVEL=debug` |
| `DEFAULT_SUBTASKS` | `"3"` | Default subtask count | `DEFAULT_SUBTASKS=5` |
| `DEFAULT_PRIORITY` | `"medium"` | Default priority | `DEFAULT_PRIORITY=high` |
| `PROJECT_NAME` | `"MCP SaaS MVP"` | Project name in metadata | `PROJECT_NAME=My Awesome Project` |
| `PROJECT_VERSION` | `"1.0.0"` | Version in metadata | `PROJECT_VERSION=2.1.0` |
| `PERPLEXITY_API_KEY` | - | For research-backed features | `PERPLEXITY_API_KEY=pplx-...` |
| `PERPLEXITY_MODEL` | `"sonar-medium-online"` | Perplexity model | `PERPLEXITY_MODEL=sonar-large-online` |

## Example .env File

```
# Required
ANTHROPIC_API_KEY=sk-ant-api03-your-api-key

# Optional - Claude Configuration
MODEL=claude-3-7-sonnet-20250219
MAX_TOKENS=4000
TEMPERATURE=0.7

# Optional - Perplexity API for Research
PERPLEXITY_API_KEY=pplx-your-api-key
PERPLEXITY_MODEL=sonar-medium-online

# Optional - Project Info
PROJECT_NAME=My Project
PROJECT_VERSION=1.0.0

# Optional - Application Configuration
DEFAULT_SUBTASKS=3
DEFAULT_PRIORITY=medium
DEBUG=false
LOG_LEVEL=info
```

## Troubleshooting

### If `task-master init` doesn't respond:

Try running it with Node directly:

```bash
node node_modules/claude-task-master/scripts/init.js
```

Or clone the repository and run:

```bash
git clone https://github.com/eyaltoledano/claude-task-master.git
cd claude-task-master
node scripts/init.js
```

<Note>
For advanced configuration options and detailed customization, see our [Advanced Configuration Guide] page.
</Note>
```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/update-tasks-from-id.md:
--------------------------------------------------------------------------------

```markdown
Update multiple tasks starting from a specific ID.

Arguments: $ARGUMENTS

Parse starting task ID and update context.

## Bulk Task Updates

Update multiple related tasks based on new requirements or context changes.

## Argument Parsing

- "from 5: add security requirements"
- "5 onwards: update API endpoints"
- "starting at 5: change to use new framework"

## Execution

```bash
task-master update --from=<id> --prompt="<context>"
```

## Update Process

### 1. **Task Selection**
Starting from specified ID:
- Include the task itself
- Include all dependent tasks
- Include related subtasks
- Smart boundary detection

### 2. **Context Application**
AI analyzes the update context and:
- Identifies what needs changing
- Maintains consistency
- Preserves completed work
- Updates related information

### 3. **Intelligent Updates**
- Modify descriptions appropriately
- Update test strategies
- Adjust time estimates
- Revise dependencies if needed

## Smart Features

1. **Scope Detection**
   - Find natural task groupings
   - Identify related features
   - Stop at logical boundaries
   - Avoid over-updating

2. **Consistency Maintenance**
   - Keep naming conventions
   - Preserve relationships
   - Update cross-references
   - Maintain task flow

3. **Change Preview**
   ```
   Bulk Update Preview
   ━━━━━━━━━━━━━━━━━━
   Starting from: Task #5
   Tasks to update: 8 tasks + 12 subtasks
   
   Context: "add security requirements"
   
   Changes will include:
   - Add security sections to descriptions
   - Update test strategies for security
   - Add security-related subtasks where needed
   - Adjust time estimates (+20% average)
   
   Continue? (y/n)
   ```

## Example Updates

```
/taskmaster:update/from-id 5: change database to PostgreSQL
→ Analyzing impact starting from task #5
→ Found 6 related tasks to update
→ Updates will maintain consistency
→ Preview changes? (y/n)

Applied updates:
✓ Task #5: Updated connection logic references
✓ Task #6: Changed migration approach
✓ Task #7: Updated query syntax notes
✓ Task #8: Revised testing strategy
✓ Task #9: Updated deployment steps
✓ Task #12: Changed backup procedures
```

## Safety Features

- Preview all changes
- Selective confirmation
- Rollback capability
- Change logging
- Validation checks

## Post-Update

- Summary of changes
- Consistency verification
- Suggest review tasks
- Update timeline if needed
```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/generate-tasks.md:
--------------------------------------------------------------------------------

```markdown
Generate individual task files from tasks.json.

## Task File Generation

Creates separate markdown files for each task, perfect for AI agents or documentation.

## Execution

```bash
task-master generate
```

## What It Creates

For each task, generates a file like `task_001.txt`:

```
Task ID: 1
Title: Implement user authentication
Status: pending
Priority: high
Dependencies: []
Created: 2024-01-15
Complexity: 7

## Description
Create a secure user authentication system with login, logout, and session management.

## Details
- Use JWT tokens for session management
- Implement secure password hashing
- Add remember me functionality
- Include password reset flow

## Test Strategy
- Unit tests for auth functions
- Integration tests for login flow
- Security testing for vulnerabilities
- Performance tests for concurrent logins

## Subtasks
1.1 Setup authentication framework (pending)
1.2 Create login endpoints (pending)
1.3 Implement session management (pending)
1.4 Add password reset (pending)
```

## File Organization

Creates structure:
```
.taskmaster/
└── tasks/
    ├── task_001.txt
    ├── task_002.txt
    ├── task_003.txt
    └── ...
```

## Smart Features

1. **Consistent Formatting**
   - Standardized structure
   - Clear sections
   - AI-readable format
   - Markdown compatible

2. **Contextual Information**
   - Full task details
   - Related task references
   - Progress indicators
   - Implementation notes

3. **Incremental Updates**
   - Only regenerate changed tasks
   - Preserve custom additions
   - Track generation timestamp
   - Version control friendly

## Use Cases

- **AI Context**: Provide task context to AI assistants
- **Documentation**: Standalone task documentation
- **Archival**: Task history preservation
- **Sharing**: Send specific tasks to team members
- **Review**: Easier task review process

## Generation Options

Based on arguments:
- Filter by status
- Include/exclude completed
- Custom templates
- Different formats

## Post-Generation

```
Task File Generation Complete
━━━━━━━━━━━━━━━━━━━━━━━━━━
Generated: 45 task files
Location: .taskmaster/tasks/
Total size: 156 KB

New files: 5
Updated files: 12
Unchanged: 28

Ready for:
- AI agent consumption
- Version control
- Team distribution
```

## Integration Benefits

- Git-trackable task history
- Easy task sharing
- AI tool compatibility
- Offline task access
- Backup redundancy
```

--------------------------------------------------------------------------------
/mcp-server/src/tools/validate-dependencies.js:
--------------------------------------------------------------------------------

```javascript
/**
 * tools/validate-dependencies.js
 * Tool for validating task dependencies
 */

import { z } from 'zod';
import {
	handleApiResult,
	createErrorResponse,
	withNormalizedProjectRoot
} from './utils.js';
import { validateDependenciesDirect } from '../core/task-master-core.js';
import { findTasksPath } from '../core/utils/path-utils.js';
import { resolveTag } from '../../../scripts/modules/utils.js';

/**
 * Register the validateDependencies tool with the MCP server
 * @param {Object} server - FastMCP server instance
 */
export function registerValidateDependenciesTool(server) {
	server.addTool({
		name: 'validate_dependencies',
		description:
			'Check tasks for dependency issues (like circular references or links to non-existent tasks) without making changes.',
		parameters: z.object({
			file: z.string().optional().describe('Absolute path to the tasks file'),
			projectRoot: z
				.string()
				.describe('The directory of the project. Must be an absolute path.'),
			tag: z.string().optional().describe('Tag context to operate on')
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				const resolvedTag = resolveTag({
					projectRoot: args.projectRoot,
					tag: args.tag
				});
				log.info(`Validating dependencies with args: ${JSON.stringify(args)}`);

				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
				let tasksJsonPath;
				try {
					tasksJsonPath = findTasksPath(
						{ projectRoot: args.projectRoot, file: args.file },
						log
					);
				} catch (error) {
					log.error(`Error finding tasks.json: ${error.message}`);
					return createErrorResponse(
						`Failed to find tasks.json: ${error.message}`
					);
				}

				const result = await validateDependenciesDirect(
					{
						tasksJsonPath: tasksJsonPath,
						projectRoot: args.projectRoot,
						tag: resolvedTag
					},
					log
				);

				if (result.success) {
					log.info(
						`Successfully validated dependencies: ${result.data.message}`
					);
				} else {
					log.error(`Failed to validate dependencies: ${result.error.message}`);
				}

				return handleApiResult(
					result,
					log,
					'Error validating dependencies',
					undefined,
					args.projectRoot
				);
			} catch (error) {
				log.error(`Error in validateDependencies tool: ${error.message}`);
				return createErrorResponse(error.message);
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/apps/extension/src/webview/components/TaskCard.tsx:
--------------------------------------------------------------------------------

```typescript
/**
 * Task Card Component for Kanban Board
 */

import React from 'react';
import { KanbanCard } from '@/components/ui/shadcn-io/kanban';
import { PriorityBadge } from './PriorityBadge';
import type { TaskMasterTask } from '../types';

interface TaskCardProps {
	task: TaskMasterTask;
	dragging?: boolean;
	onViewDetails?: (taskId: string) => void;
}

export const TaskCard: React.FC<TaskCardProps> = ({
	task,
	dragging,
	onViewDetails
}) => {
	const handleCardClick = (e: React.MouseEvent) => {
		e.preventDefault();
		onViewDetails?.(task.id);
	};

	return (
		<KanbanCard
			id={task.id}
			name={task.title}
			index={0} // Index is not used in our implementation
			parent={task.status}
			className="cursor-pointer p-3 transition-shadow hover:shadow-md bg-vscode-editor-background border-vscode-border group"
			onClick={handleCardClick}
		>
			<div className="space-y-3 h-full flex flex-col">
				<div className="flex items-start justify-between gap-2 flex-shrink-0">
					<h3 className="font-medium text-sm leading-tight flex-1 min-w-0 text-vscode-foreground">
						{task.title}
					</h3>
					<div className="flex items-center gap-1 flex-shrink-0">
						<PriorityBadge priority={task.priority} />
					</div>
				</div>

				{task.description && (
					<p className="text-xs text-vscode-foreground/70 line-clamp-3 leading-relaxed flex-1 min-h-0">
						{task.description}
					</p>
				)}

				<div className="flex items-center justify-between text-xs mt-auto pt-2 flex-shrink-0 border-t border-vscode-border/20">
					<span className="font-mono text-vscode-foreground/50 flex-shrink-0">
						#{task.id}
					</span>
					{task.dependencies && task.dependencies.length > 0 && (
						<div className="flex items-center gap-1 text-vscode-foreground/50 flex-shrink-0 ml-2">
							<span>Deps:</span>
							<div className="flex items-center gap-1">
								{task.dependencies.map((depId, index) => (
									<React.Fragment key={depId}>
										<button
											className="font-mono hover:text-vscode-link-activeForeground hover:underline transition-colors"
											onClick={(e) => {
												e.stopPropagation();
												onViewDetails?.(depId);
											}}
										>
											#{depId}
										</button>
										{index < task.dependencies!.length - 1 && <span>,</span>}
									</React.Fragment>
								))}
							</div>
						</div>
					)}
				</div>
			</div>
		</KanbanCard>
	);
};

```

--------------------------------------------------------------------------------
/apps/extension/assets/icon-dark.svg:
--------------------------------------------------------------------------------

```
<svg viewBox="0 0 224 291" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M101.635 286.568L71.4839 256.414C65.6092 250.539 65.6092 241.03 71.4839 235.155L142.52 164.11C144.474 162.156 147.643 162.156 149.61 164.11L176.216 190.719C178.17 192.673 181.339 192.673 183.305 190.719L189.719 184.305C191.673 182.35 191.673 179.181 189.719 177.214L163.113 150.605C161.159 148.651 161.159 145.481 163.113 143.514L191.26 115.365C193.214 113.41 193.214 110.241 191.26 108.274L182.316 99.3291C180.362 97.3748 177.193 97.3748 175.226 99.3291L55.8638 218.706C49.989 224.581 40.4816 224.581 34.6068 218.706L4.4061 188.501C-1.4687 182.626 -1.4687 173.117 4.4061 167.242L23.8342 147.811C25.7883 145.857 25.7883 142.688 23.8342 140.721L4.78187 121.666C-1.09293 115.791 -1.09293 106.282 4.78187 100.406L34.7195 70.4527C40.5943 64.5772 50.1017 64.5772 55.9765 70.4527L75.555 90.0335C77.5091 91.9879 80.6782 91.9879 82.6448 90.0335L124.144 48.5292C126.098 46.5749 126.098 43.4054 124.144 41.4385L115.463 32.7568C113.509 30.8025 110.34 30.8025 108.374 32.7568L99.8683 41.2632C97.9143 43.2175 94.7451 43.2175 92.7785 41.2632L82.1438 30.6271C80.1897 28.6728 80.1897 25.5033 82.1438 23.5364L101.271 4.40662C107.146 -1.46887 116.653 -1.46887 122.528 4.40662L152.478 34.3604C158.353 40.2359 158.353 49.7444 152.478 55.6199L82.6323 125.474C80.6782 127.429 77.5091 127.429 75.5425 125.474L48.8741 98.8029C46.9201 96.8486 43.7509 96.8486 41.7843 98.8029L33.1036 107.485C31.1496 109.439 31.1496 112.608 33.1036 114.575L59.2458 140.721C61.1999 142.675 61.1999 145.844 59.2458 147.811L32.7404 174.32C30.7863 176.274 30.7863 179.444 32.7404 181.411L41.6841 190.355C43.6382 192.31 46.8073 192.31 48.7739 190.355L168.136 70.9789C174.011 65.1034 183.518 65.1034 189.393 70.9789L219.594 101.183C225.469 107.059 225.469 116.567 219.594 122.443L198.537 143.502C196.583 145.456 196.583 148.626 198.537 150.592L218.053 170.111C223.928 175.986 223.928 185.495 218.053 191.37L190.37 219.056C184.495 224.932 174.988 224.932 169.113 219.056L149.597 199.538C147.643 197.584 144.474 197.584 142.508 199.538L99.8057 242.245C97.8516 244.2 97.8516 247.369 99.8057 249.336L108.699 258.231C110.653 260.185 113.823 260.185 115.789 258.231L122.954 251.065C124.908 249.11 128.077 249.11 130.044 251.065L140.679 261.701C142.633 263.655 142.633 266.825 140.679 268.791L122.879 286.593C117.004 292.469 107.497 292.469 101.622 286.593L101.635 286.568Z" fill="#CCCCCC"/>
</svg>
```

--------------------------------------------------------------------------------
/apps/extension/assets/icon-light.svg:
--------------------------------------------------------------------------------

```
<svg viewBox="0 0 224 291" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M101.635 286.568L71.4839 256.414C65.6092 250.539 65.6092 241.03 71.4839 235.155L142.52 164.11C144.474 162.156 147.643 162.156 149.61 164.11L176.216 190.719C178.17 192.673 181.339 192.673 183.305 190.719L189.719 184.305C191.673 182.35 191.673 179.181 189.719 177.214L163.113 150.605C161.159 148.651 161.159 145.481 163.113 143.514L191.26 115.365C193.214 113.41 193.214 110.241 191.26 108.274L182.316 99.3291C180.362 97.3748 177.193 97.3748 175.226 99.3291L55.8638 218.706C49.989 224.581 40.4816 224.581 34.6068 218.706L4.4061 188.501C-1.4687 182.626 -1.4687 173.117 4.4061 167.242L23.8342 147.811C25.7883 145.857 25.7883 142.688 23.8342 140.721L4.78187 121.666C-1.09293 115.791 -1.09293 106.282 4.78187 100.406L34.7195 70.4527C40.5943 64.5772 50.1017 64.5772 55.9765 70.4527L75.555 90.0335C77.5091 91.9879 80.6782 91.9879 82.6448 90.0335L124.144 48.5292C126.098 46.5749 126.098 43.4054 124.144 41.4385L115.463 32.7568C113.509 30.8025 110.34 30.8025 108.374 32.7568L99.8683 41.2632C97.9143 43.2175 94.7451 43.2175 92.7785 41.2632L82.1438 30.6271C80.1897 28.6728 80.1897 25.5033 82.1438 23.5364L101.271 4.40662C107.146 -1.46887 116.653 -1.46887 122.528 4.40662L152.478 34.3604C158.353 40.2359 158.353 49.7444 152.478 55.6199L82.6323 125.474C80.6782 127.429 77.5091 127.429 75.5425 125.474L48.8741 98.8029C46.9201 96.8486 43.7509 96.8486 41.7843 98.8029L33.1036 107.485C31.1496 109.439 31.1496 112.608 33.1036 114.575L59.2458 140.721C61.1999 142.675 61.1999 145.844 59.2458 147.811L32.7404 174.32C30.7863 176.274 30.7863 179.444 32.7404 181.411L41.6841 190.355C43.6382 192.31 46.8073 192.31 48.7739 190.355L168.136 70.9789C174.011 65.1034 183.518 65.1034 189.393 70.9789L219.594 101.183C225.469 107.059 225.469 116.567 219.594 122.443L198.537 143.502C196.583 145.456 196.583 148.626 198.537 150.592L218.053 170.111C223.928 175.986 223.928 185.495 218.053 191.37L190.37 219.056C184.495 224.932 174.988 224.932 169.113 219.056L149.597 199.538C147.643 197.584 144.474 197.584 142.508 199.538L99.8057 242.245C97.8516 244.2 97.8516 247.369 99.8057 249.336L108.699 258.231C110.653 260.185 113.823 260.185 115.789 258.231L122.954 251.065C124.908 249.11 128.077 249.11 130.044 251.065L140.679 261.701C142.633 263.655 142.633 266.825 140.679 268.791L122.879 286.593C117.004 292.469 107.497 292.469 101.622 286.593L101.635 286.568Z" fill="#424242"/>
</svg>
```

--------------------------------------------------------------------------------
/apps/extension/assets/sidebar-icon.svg:
--------------------------------------------------------------------------------

```
<svg viewBox="0 0 224 291" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M101.635 286.568L71.4839 256.414C65.6092 250.539 65.6092 241.03 71.4839 235.155L142.52 164.11C144.474 162.156 147.643 162.156 149.61 164.11L176.216 190.719C178.17 192.673 181.339 192.673 183.305 190.719L189.719 184.305C191.673 182.35 191.673 179.181 189.719 177.214L163.113 150.605C161.159 148.651 161.159 145.481 163.113 143.514L191.26 115.365C193.214 113.41 193.214 110.241 191.26 108.274L182.316 99.3291C180.362 97.3748 177.193 97.3748 175.226 99.3291L55.8638 218.706C49.989 224.581 40.4816 224.581 34.6068 218.706L4.4061 188.501C-1.4687 182.626 -1.4687 173.117 4.4061 167.242L23.8342 147.811C25.7883 145.857 25.7883 142.688 23.8342 140.721L4.78187 121.666C-1.09293 115.791 -1.09293 106.282 4.78187 100.406L34.7195 70.4527C40.5943 64.5772 50.1017 64.5772 55.9765 70.4527L75.555 90.0335C77.5091 91.9879 80.6782 91.9879 82.6448 90.0335L124.144 48.5292C126.098 46.5749 126.098 43.4054 124.144 41.4385L115.463 32.7568C113.509 30.8025 110.34 30.8025 108.374 32.7568L99.8683 41.2632C97.9143 43.2175 94.7451 43.2175 92.7785 41.2632L82.1438 30.6271C80.1897 28.6728 80.1897 25.5033 82.1438 23.5364L101.271 4.40662C107.146 -1.46887 116.653 -1.46887 122.528 4.40662L152.478 34.3604C158.353 40.2359 158.353 49.7444 152.478 55.6199L82.6323 125.474C80.6782 127.429 77.5091 127.429 75.5425 125.474L48.8741 98.8029C46.9201 96.8486 43.7509 96.8486 41.7843 98.8029L33.1036 107.485C31.1496 109.439 31.1496 112.608 33.1036 114.575L59.2458 140.721C61.1999 142.675 61.1999 145.844 59.2458 147.811L32.7404 174.32C30.7863 176.274 30.7863 179.444 32.7404 181.411L41.6841 190.355C43.6382 192.31 46.8073 192.31 48.7739 190.355L168.136 70.9789C174.011 65.1034 183.518 65.1034 189.393 70.9789L219.594 101.183C225.469 107.059 225.469 116.567 219.594 122.443L198.537 143.502C196.583 145.456 196.583 148.626 198.537 150.592L218.053 170.111C223.928 175.986 223.928 185.495 218.053 191.37L190.37 219.056C184.495 224.932 174.988 224.932 169.113 219.056L149.597 199.538C147.643 197.584 144.474 197.584 142.508 199.538L99.8057 242.245C97.8516 244.2 97.8516 247.369 99.8057 249.336L108.699 258.231C110.653 260.185 113.823 260.185 115.789 258.231L122.954 251.065C124.908 249.11 128.077 249.11 130.044 251.065L140.679 261.701C142.633 263.655 142.633 266.825 140.679 268.791L122.879 286.593C117.004 292.469 107.497 292.469 101.622 286.593L101.635 286.568Z" fill="currentColor"/>
</svg>
```

--------------------------------------------------------------------------------
/tests/integration/profiles/vscode-init-functionality.test.js:
--------------------------------------------------------------------------------

```javascript
import fs from 'fs';
import path from 'path';
import { vscodeProfile } from '../../../src/profiles/vscode.js';

describe('VSCode Profile Initialization Functionality', () => {
	let vscodeProfileContent;

	beforeAll(() => {
		const vscodeJsPath = path.join(
			process.cwd(),
			'src',
			'profiles',
			'vscode.js'
		);
		vscodeProfileContent = fs.readFileSync(vscodeJsPath, 'utf8');
	});

	test('vscode.js uses factory pattern with correct configuration', () => {
		// Check for explicit, non-default values in the source file
		expect(vscodeProfileContent).toContain("name: 'vscode'");
		expect(vscodeProfileContent).toContain("displayName: 'VS Code'");
		expect(vscodeProfileContent).toContain("url: 'code.visualstudio.com'");
		expect(vscodeProfileContent).toContain(
			"docsUrl: 'code.visualstudio.com/docs'"
		);
		expect(vscodeProfileContent).toContain("rulesDir: '.github/instructions'"); // non-default
		expect(vscodeProfileContent).toContain('customReplacements'); // non-default

		// Check the final computed properties on the profile object
		expect(vscodeProfile.profileName).toBe('vscode');
		expect(vscodeProfile.displayName).toBe('VS Code');
		expect(vscodeProfile.profileDir).toBe('.vscode'); // default
		expect(vscodeProfile.rulesDir).toBe('.github/instructions'); // non-default
		expect(vscodeProfile.globalReplacements).toBeDefined(); // computed from customReplacements
		expect(Array.isArray(vscodeProfile.globalReplacements)).toBe(true);
	});

	test('vscode.js configures .mdc to .instructions.md extension mapping', () => {
		// Check that the profile object has the correct file mapping behavior (vscode converts to .md)
		expect(vscodeProfile.fileMap['rules/cursor_rules.mdc']).toBe(
			'vscode_rules.instructions.md'
		);
	});

	test('vscode.js uses standard tool mappings', () => {
		// Check that the profile uses default tool mappings (equivalent to COMMON_TOOL_MAPPINGS.STANDARD)
		// This verifies the architectural pattern: no custom toolMappings = standard tool names
		expect(vscodeProfileContent).not.toContain('toolMappings:');
		expect(vscodeProfileContent).not.toContain('apply_diff');
		expect(vscodeProfileContent).not.toContain('search_files');

		// Verify the result: default mappings means tools keep their original names
		expect(vscodeProfile.conversionConfig.toolNames.edit_file).toBe(
			'edit_file'
		);
		expect(vscodeProfile.conversionConfig.toolNames.search).toBe('search');
	});
});

```

--------------------------------------------------------------------------------
/mcp-server/src/custom-sdk/errors.js:
--------------------------------------------------------------------------------

```javascript
/**
 * src/ai-providers/custom-sdk/mcp/errors.js
 *
 * Error handling utilities for MCP AI SDK provider.
 * Maps MCP errors to AI SDK compatible error types.
 */

/**
 * MCP-specific error class
 */
export class MCPError extends Error {
	constructor(message, options = {}) {
		super(message);
		this.name = 'MCPError';
		this.code = options.code;
		this.cause = options.cause;
		this.mcpResponse = options.mcpResponse;
	}
}

/**
 * Session-related error
 */
export class MCPSessionError extends MCPError {
	constructor(message, options = {}) {
		super(message, options);
		this.name = 'MCPSessionError';
	}
}

/**
 * Sampling-related error
 */
export class MCPSamplingError extends MCPError {
	constructor(message, options = {}) {
		super(message, options);
		this.name = 'MCPSamplingError';
	}
}

/**
 * Map MCP errors to AI SDK compatible error types
 * @param {Error} error - Original error
 * @returns {Error} Mapped error
 */
export function mapMCPError(error) {
	// If already an MCP error, return as-is
	if (error instanceof MCPError) {
		return error;
	}

	const message = error.message || 'Unknown MCP error';
	const originalError = error;

	// Map common error patterns
	if (message.includes('session') || message.includes('connection')) {
		return new MCPSessionError(message, {
			cause: originalError,
			code: 'SESSION_ERROR'
		});
	}

	if (message.includes('sampling') || message.includes('timeout')) {
		return new MCPSamplingError(message, {
			cause: originalError,
			code: 'SAMPLING_ERROR'
		});
	}

	if (message.includes('capabilities') || message.includes('not supported')) {
		return new MCPSessionError(message, {
			cause: originalError,
			code: 'CAPABILITY_ERROR'
		});
	}

	// Default to generic MCP error
	return new MCPError(message, {
		cause: originalError,
		code: 'UNKNOWN_ERROR'
	});
}

/**
 * Check if error is retryable
 * @param {Error} error - Error to check
 * @returns {boolean} True if error might be retryable
 */
export function isRetryableError(error) {
	if (error instanceof MCPSamplingError && error.code === 'SAMPLING_ERROR') {
		return true;
	}

	if (error instanceof MCPSessionError && error.code === 'SESSION_ERROR') {
		// Session errors are generally not retryable
		return false;
	}

	// Check for common retryable patterns
	const message = error.message?.toLowerCase() || '';
	return (
		message.includes('timeout') ||
		message.includes('network') ||
		message.includes('temporary')
	);
}

```

--------------------------------------------------------------------------------
/tests/unit/mcp-providers/mcp-provider.test.js:
--------------------------------------------------------------------------------

```javascript
/**
 * tests/unit/mcp-providers/mcp-provider.test.js
 * Unit tests for MCP provider
 */

import { jest } from '@jest/globals';

describe('MCPProvider', () => {
	let MCPProvider;
	let provider;

	beforeAll(async () => {
		// Dynamic import to avoid circular dependency issues
		const module = await import(
			'../../../mcp-server/src/providers/mcp-provider.js'
		);
		MCPProvider = module.MCPProvider;
	});

	beforeEach(() => {
		provider = new MCPProvider();
	});

	describe('constructor', () => {
		it('should initialize with correct name', () => {
			expect(provider.name).toBe('mcp');
		});

		it('should initialize with null session', () => {
			expect(provider.session).toBeNull();
		});
	});

	describe('isRequiredApiKey', () => {
		it('should return false (no API key required)', () => {
			expect(provider.isRequiredApiKey()).toBe(false);
		});
	});

	describe('validateAuth', () => {
		it('should throw error when no session', () => {
			expect(() => provider.validateAuth({})).toThrow(
				'MCP Provider requires active MCP session'
			);
		});

		it('should throw error when session lacks sampling capabilities', () => {
			provider.session = {
				clientCapabilities: {}
			};

			expect(() => provider.validateAuth({})).toThrow(
				'MCP session must have client sampling capabilities'
			);
		});

		it('should pass validation with valid session', () => {
			provider.session = {
				clientCapabilities: {
					sampling: true
				}
			};

			expect(() => provider.validateAuth({})).not.toThrow();
		});
	});

	describe('setSession', () => {
		it('should set session when provided', () => {
			const mockSession = {
				clientCapabilities: { sampling: true }
			};

			provider.setSession(mockSession);
			expect(provider.session).toBe(mockSession);
		});

		it('should handle null session gracefully', () => {
			provider.setSession(null);
			expect(provider.session).toBeNull();
		});
	});

	describe('hasValidSession', () => {
		it('should return false when no session', () => {
			expect(provider.hasValidSession()).toBe(false);
		});

		it('should return false when session lacks sampling capabilities', () => {
			provider.session = {
				clientCapabilities: {}
			};

			expect(provider.hasValidSession()).toBe(false);
		});

		it('should return true with valid session', () => {
			provider.session = {
				clientCapabilities: {
					sampling: true
				}
			};

			expect(provider.hasValidSession()).toBe(true);
		});
	});
});

```

--------------------------------------------------------------------------------
/scripts/modules/task-manager/parse-prd/parse-prd-non-streaming.js:
--------------------------------------------------------------------------------

```javascript
/**
 * Non-streaming handler for PRD parsing
 */

import ora from 'ora';
import { generateObjectService } from '../../ai-services-unified.js';
import { LoggingConfig, prdResponseSchema } from './parse-prd-config.js';
import { estimateTokens } from './parse-prd-helpers.js';

/**
 * Handle non-streaming AI service call
 * @param {Object} config - Configuration object
 * @param {Object} prompts - System and user prompts
 * @returns {Promise<Object>} Generated tasks and telemetry
 */
export async function handleNonStreamingService(config, prompts) {
	const logger = new LoggingConfig(config.mcpLog, config.reportProgress);
	const { systemPrompt, userPrompt } = prompts;
	const estimatedInputTokens = estimateTokens(systemPrompt + userPrompt);

	// Initialize spinner for CLI
	let spinner = null;
	if (config.outputFormat === 'text' && !config.isMCP) {
		spinner = ora('Parsing PRD and generating tasks...\n').start();
	}

	try {
		// Call AI service
		logger.report(
			`Calling AI service to generate tasks from PRD${config.research ? ' with research-backed analysis' : ''}...`,
			'info'
		);

		const aiServiceResponse = await generateObjectService({
			role: config.research ? 'research' : 'main',
			session: config.session,
			projectRoot: config.projectRoot,
			schema: prdResponseSchema,
			objectName: 'tasks_data',
			systemPrompt,
			prompt: userPrompt,
			commandName: 'parse-prd',
			outputType: config.isMCP ? 'mcp' : 'cli'
		});

		// Extract generated data
		let generatedData = null;
		if (aiServiceResponse?.mainResult) {
			if (
				typeof aiServiceResponse.mainResult === 'object' &&
				aiServiceResponse.mainResult !== null &&
				'tasks' in aiServiceResponse.mainResult
			) {
				generatedData = aiServiceResponse.mainResult;
			} else if (
				typeof aiServiceResponse.mainResult.object === 'object' &&
				aiServiceResponse.mainResult.object !== null &&
				'tasks' in aiServiceResponse.mainResult.object
			) {
				generatedData = aiServiceResponse.mainResult.object;
			}
		}

		if (!generatedData || !Array.isArray(generatedData.tasks)) {
			throw new Error(
				'AI service returned unexpected data structure after validation.'
			);
		}

		if (spinner) {
			spinner.succeed('Tasks generated successfully!');
		}

		return {
			parsedTasks: generatedData.tasks,
			aiServiceResponse,
			estimatedInputTokens
		};
	} catch (error) {
		if (spinner) {
			spinner.fail(`Error parsing PRD: ${error.message}`);
		}
		throw error;
	}
}

```

--------------------------------------------------------------------------------
/.github/scripts/utils.mjs:
--------------------------------------------------------------------------------

```
#!/usr/bin/env node
import { spawnSync } from 'node:child_process';
import { readFileSync } from 'node:fs';
import { join, dirname, resolve } from 'node:path';

// Find the root directory by looking for package.json with task-master-ai
export function findRootDir(startDir) {
	let currentDir = resolve(startDir);
	while (currentDir !== '/') {
		const pkgPath = join(currentDir, 'package.json');
		try {
			const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
			if (pkg.name === 'task-master-ai' || pkg.repository) {
				return currentDir;
			}
		} catch {}
		currentDir = dirname(currentDir);
	}
	throw new Error('Could not find root directory');
}

// Run a command with proper error handling
export function runCommand(command, args = [], options = {}) {
	console.log(`Running: ${command} ${args.join(' ')}`);
	const result = spawnSync(command, args, {
		encoding: 'utf8',
		stdio: 'inherit',
		...options
	});

	if (result.status !== 0) {
		console.error(`Command failed with exit code ${result.status}`);
		process.exit(result.status);
	}

	return result;
}

// Get package version from a package.json file
export function getPackageVersion(packagePath) {
	try {
		const pkg = JSON.parse(readFileSync(packagePath, 'utf8'));
		return pkg.version;
	} catch (error) {
		console.error(
			`Failed to read package version from ${packagePath}:`,
			error.message
		);
		process.exit(1);
	}
}

// Check if a git tag exists on remote
export function tagExistsOnRemote(tag, remote = 'origin') {
	const result = spawnSync('git', ['ls-remote', remote, tag], {
		encoding: 'utf8'
	});

	return result.status === 0 && result.stdout.trim() !== '';
}

// Create and push a git tag if it doesn't exist
export function createAndPushTag(tag, remote = 'origin') {
	// Check if tag already exists
	if (tagExistsOnRemote(tag, remote)) {
		console.log(`Tag ${tag} already exists on remote, skipping`);
		return false;
	}

	console.log(`Creating new tag: ${tag}`);

	// Create the tag locally
	const tagResult = spawnSync('git', ['tag', tag]);
	if (tagResult.status !== 0) {
		console.error('Failed to create tag:', tagResult.error || tagResult.stderr);
		process.exit(1);
	}

	// Push the tag to remote
	const pushResult = spawnSync('git', ['push', remote, tag]);
	if (pushResult.status !== 0) {
		console.error('Failed to push tag:', pushResult.error || pushResult.stderr);
		process.exit(1);
	}

	console.log(`✅ Successfully created and pushed tag: ${tag}`);
	return true;
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/complexity-report.md:
--------------------------------------------------------------------------------

```markdown
Display the task complexity analysis report.

Arguments: $ARGUMENTS

View the detailed complexity analysis generated by analyze-complexity command.

## Viewing Complexity Report

Shows comprehensive task complexity analysis with actionable insights.

## Execution

```bash
task-master complexity-report [--file=<path>]
```

## Report Location

Default: `.taskmaster/reports/complexity-analysis.md`
Custom: Specify with --file parameter

## Report Contents

### 1. **Executive Summary**
```
Complexity Analysis Summary
━━━━━━━━━━━━━━━━━━━━━━━━
Analysis Date: 2024-01-15
Tasks Analyzed: 32
High Complexity: 5 (16%)
Medium Complexity: 12 (37%)
Low Complexity: 15 (47%)

Critical Findings:
- 5 tasks need immediate expansion
- 3 tasks have high technical risk
- 2 tasks block critical path
```

### 2. **Detailed Task Analysis**
For each complex task:
- Complexity score breakdown
- Contributing factors
- Specific risks identified
- Expansion recommendations
- Similar completed tasks

### 3. **Risk Matrix**
Visual representation:
```
Risk vs Complexity Matrix
━━━━━━━━━━━━━━━━━━━━━━━
High Risk  | #5(9) #12(8) | #23(6)
Med Risk   | #34(7)       | #45(5) #67(5)
Low Risk   | #78(8)       | [15 tasks]
           | High Complex  | Med Complex
```

### 4. **Recommendations**

**Immediate Actions:**
1. Expand task #5 - Critical path + high complexity
2. Expand task #12 - High risk + dependencies
3. Review task #34 - Consider splitting

**Sprint Planning:**
- Don't schedule multiple high-complexity tasks together
- Ensure expertise available for complex tasks
- Build in buffer time for unknowns

## Interactive Features

When viewing report:
1. **Quick Actions**
   - Press 'e' to expand a task
   - Press 'd' for task details
   - Press 'r' to refresh analysis

2. **Filtering**
   - View by complexity level
   - Filter by risk factors
   - Show only actionable items

3. **Export Options**
   - Markdown format
   - CSV for spreadsheets
   - JSON for tools

## Report Intelligence

- Compares with historical data
- Shows complexity trends
- Identifies patterns
- Suggests process improvements

## Integration

Use report for:
- Sprint planning sessions
- Resource allocation
- Risk assessment
- Team discussions
- Client updates

## Example Usage

```
/taskmaster:complexity-report
→ Opens latest analysis

/taskmaster:complexity-report --file=archived/2024-01-01.md
→ View historical analysis

After viewing:
/taskmaster:expand 5
→ Expand high-complexity task
```
```

--------------------------------------------------------------------------------
/mcp-server/src/tools/initialize-project.js:
--------------------------------------------------------------------------------

```javascript
import { z } from 'zod';
import {
	createErrorResponse,
	handleApiResult,
	withNormalizedProjectRoot
} from './utils.js';
import { initializeProjectDirect } from '../core/task-master-core.js';
import { RULE_PROFILES } from '../../../src/constants/profiles.js';

export function registerInitializeProjectTool(server) {
	server.addTool({
		name: 'initialize_project',
		description:
			'Initializes a new Task Master project structure by calling the core initialization logic. Creates necessary folders and configuration files for Task Master in the current directory.',
		parameters: z.object({
			skipInstall: z
				.boolean()
				.optional()
				.default(false)
				.describe(
					'Skip installing dependencies automatically. Never do this unless you are sure the project is already installed.'
				),
			addAliases: z
				.boolean()
				.optional()
				.default(true)
				.describe('Add shell aliases (tm, taskmaster) to shell config file.'),
			initGit: z
				.boolean()
				.optional()
				.default(true)
				.describe('Initialize Git repository in project root.'),
			storeTasksInGit: z
				.boolean()
				.optional()
				.default(true)
				.describe('Store tasks in Git (tasks.json and tasks/ directory).'),
			yes: z
				.boolean()
				.optional()
				.default(true)
				.describe(
					'Skip prompts and use default values. Always set to true for MCP tools.'
				),
			projectRoot: z
				.string()
				.describe(
					'The root directory for the project. ALWAYS SET THIS TO THE PROJECT ROOT DIRECTORY. IF NOT SET, THE TOOL WILL NOT WORK.'
				),
			rules: z
				.array(z.enum(RULE_PROFILES))
				.optional()
				.describe(
					`List of rule profiles to include at initialization. If omitted, defaults to Cursor profile only. Available options: ${RULE_PROFILES.join(', ')}`
				)
		}),
		execute: withNormalizedProjectRoot(async (args, context) => {
			const { log } = context;
			const session = context.session;

			try {
				log.info(
					`Executing initialize_project tool with args: ${JSON.stringify(args)}`
				);

				const result = await initializeProjectDirect(args, log, { session });

				return handleApiResult(
					result,
					log,
					'Initialization failed',
					undefined,
					args.projectRoot
				);
			} catch (error) {
				const errorMessage = `Project initialization tool failed: ${error.message || 'Unknown error'}`;
				log.error(errorMessage, error);
				return createErrorResponse(errorMessage, { details: error.stack });
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/packages/tm-core/src/modules/auth/types.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Authentication types and interfaces
 */

export interface AuthCredentials {
	token: string;
	refreshToken?: string;
	userId: string;
	email?: string;
	expiresAt?: string | number;
	tokenType?: 'standard';
	savedAt: string;
	selectedContext?: UserContext;
}

export interface UserContext {
	orgId?: string;
	orgName?: string;
	orgSlug?: string;
	briefId?: string;
	briefName?: string;
	briefStatus?: string;
	briefUpdatedAt?: string;
	updatedAt: string;
}

/**
 * User context with a guaranteed briefId
 */
export type UserContextWithBrief = UserContext & { briefId: string };

export interface OAuthFlowOptions {
	/** Callback to open the browser with the auth URL. If not provided, browser won't be opened */
	openBrowser?: (url: string) => Promise<void>;
	/** Timeout for the OAuth flow in milliseconds. Default: 300000 (5 minutes) */
	timeout?: number;
	/** Callback to be invoked with the authorization URL */
	onAuthUrl?: (url: string) => void;
	/** Callback to be invoked when waiting for authentication */
	onWaitingForAuth?: () => void;
	/** Callback to be invoked on successful authentication */
	onSuccess?: (credentials: AuthCredentials) => void;
	/** Callback to be invoked on authentication error */
	onError?: (error: AuthenticationError) => void;
}

export interface AuthConfig {
	baseUrl: string;
	configDir: string;
	configFile: string;
}

export interface CliData {
	callback: string;
	state: string;
	name: string;
	version: string;
	device?: string;
	user?: string;
	platform?: string;
	timestamp?: number;
}

/**
 * Authentication error codes
 */
export type AuthErrorCode =
	| 'AUTH_TIMEOUT'
	| 'AUTH_EXPIRED'
	| 'OAUTH_FAILED'
	| 'OAUTH_ERROR'
	| 'OAUTH_CANCELED'
	| 'URL_GENERATION_FAILED'
	| 'INVALID_STATE'
	| 'NO_TOKEN'
	| 'TOKEN_EXCHANGE_FAILED'
	| 'INVALID_CREDENTIALS'
	| 'NO_REFRESH_TOKEN'
	| 'NOT_AUTHENTICATED'
	| 'NETWORK_ERROR'
	| 'CONFIG_MISSING'
	| 'SAVE_FAILED'
	| 'CLEAR_FAILED'
	| 'STORAGE_ERROR'
	| 'NOT_SUPPORTED'
	| 'REFRESH_FAILED'
	| 'INVALID_RESPONSE'
	| 'PKCE_INIT_FAILED'
	| 'PKCE_FAILED'
	| 'CODE_EXCHANGE_FAILED'
	| 'SESSION_SET_FAILED'
	| 'CODE_AUTH_FAILED'
	| 'INVALID_CODE';

/**
 * Authentication error class
 */
export class AuthenticationError extends Error {
	constructor(
		message: string,
		public code: AuthErrorCode,
		public cause?: unknown
	) {
		super(message);
		this.name = 'AuthenticationError';
		if (cause && cause instanceof Error) {
			this.stack = `${this.stack}\nCaused by: ${cause.stack}`;
		}
	}
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/update-single-task.md:
--------------------------------------------------------------------------------

```markdown
Update a single specific task with new information.

Arguments: $ARGUMENTS

Parse task ID and update details.

## Single Task Update

Precisely update one task with AI assistance to maintain consistency.

## Argument Parsing

Natural language updates:
- "5: add caching requirement"
- "update 5 to include error handling"
- "task 5 needs rate limiting"
- "5 change priority to high"

## Execution

```bash
task-master update-task --id=<id> --prompt="<context>"
```

## Update Types

### 1. **Content Updates**
- Enhance description
- Add requirements
- Clarify details
- Update acceptance criteria

### 2. **Metadata Updates**
- Change priority
- Adjust time estimates
- Update complexity
- Modify dependencies

### 3. **Strategic Updates**
- Revise approach
- Change test strategy
- Update implementation notes
- Adjust subtask needs

## AI-Powered Updates

The AI:
1. **Understands Context**
   - Reads current task state
   - Identifies update intent
   - Maintains consistency
   - Preserves important info

2. **Applies Changes**
   - Updates relevant fields
   - Keeps style consistent
   - Adds without removing
   - Enhances clarity

3. **Validates Results**
   - Checks coherence
   - Verifies completeness
   - Maintains relationships
   - Suggests related updates

## Example Updates

```
/taskmaster:update/single 5: add rate limiting
→ Updating Task #5: "Implement API endpoints"

Current: Basic CRUD endpoints
Adding: Rate limiting requirements

Updated sections:
✓ Description: Added rate limiting mention
✓ Details: Added specific limits (100/min)
✓ Test Strategy: Added rate limit tests
✓ Complexity: Increased from 5 to 6
✓ Time Estimate: Increased by 2 hours

Suggestion: Also update task #6 (API Gateway) for consistency?
```

## Smart Features

1. **Incremental Updates**
   - Adds without overwriting
   - Preserves work history
   - Tracks what changed
   - Shows diff view

2. **Consistency Checks**
   - Related task alignment
   - Subtask compatibility
   - Dependency validity
   - Timeline impact

3. **Update History**
   - Timestamp changes
   - Track who/what updated
   - Reason for update
   - Previous versions

## Field-Specific Updates

Quick syntax for specific fields:
- "5 priority:high" → Update priority only
- "5 add-time:4h" → Add to time estimate
- "5 status:review" → Change status
- "5 depends:3,4" → Add dependencies

## Post-Update

- Show updated task
- Highlight changes
- Check related tasks
- Update suggestions
- Timeline adjustments
```

--------------------------------------------------------------------------------
/packages/tm-core/CHANGELOG.md:
--------------------------------------------------------------------------------

```markdown
# Changelog

## null

## null

## null

## null

## null

## null

## null

## 0.26.1

All notable changes to the @task-master/tm-core package will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Initial package structure and configuration
- TypeScript support with strict mode
- Dual ESM/CJS build system with tsup
- Jest testing framework with TypeScript support
- ESLint and Prettier for code quality
- Modular architecture with barrel exports
- Placeholder implementations for all modules
- Comprehensive documentation and README

### Development Infrastructure

- tsup configuration for dual format builds
- Jest configuration with ESM support
- ESLint configuration with TypeScript rules
- Prettier configuration for consistent formatting
- Complete package.json with all required fields
- TypeScript configuration with strict settings
- .gitignore for development files

### Package Structure

- `src/types/` - TypeScript type definitions (placeholder)
- `src/providers/` - AI provider implementations (placeholder)
- `src/storage/` - Storage layer abstractions (placeholder)
- `src/parser/` - Task parsing utilities (placeholder)
- `src/utils/` - Common utility functions (placeholder)
- `src/errors/` - Custom error classes (placeholder)
- `tests/` - Test directories and setup

## [1.0.0] - TBD

### Planned Features

- Complete TypeScript type system
- AI provider implementations
- Storage adapters
- Task parsing capabilities
- Comprehensive utility functions
- Custom error handling
- Full test coverage
- Complete documentation

---

## Release Notes

### Version 1.0.0 (Coming Soon)

This will be the first stable release of tm-core with complete implementations of all modules. Currently, all modules contain placeholder implementations to establish the package structure and enable development of dependent packages.

### Development Status

- ✅ Package structure and configuration
- ✅ Build and test infrastructure
- ✅ Development tooling setup
- 🚧 TypeScript types implementation (Task 116)
- 🚧 AI provider system (Task 117)
- 🚧 Storage layer (Task 118)
- 🚧 Task parser (Task 119)
- 🚧 Utility functions (Task 120)
- 🚧 Error handling (Task 121)
- 🚧 Configuration system (Task 122)
- 🚧 Testing infrastructure (Task 123)
- 🚧 Documentation (Task 124)
- 🚧 Package finalization (Task 125)

```

--------------------------------------------------------------------------------
/tests/manual/progress/TESTING_GUIDE.md:
--------------------------------------------------------------------------------

```markdown
# Task Master Progress Testing Guide

Quick reference for testing streaming/non-streaming functionality with token tracking.

## 🎯 Test Modes

1. **MCP Streaming** - Has `reportProgress` + `mcpLog`, shows emoji indicators (🔴🟠🟢)
2. **CLI Streaming** - No `reportProgress`, shows terminal progress bars  
3. **Non-Streaming** - No progress reporting, single response

## 🚀 Quick Commands

```bash
# Test Scripts (accept: mcp-streaming, cli-streaming, non-streaming, both, all)
node test-parse-prd.js [mode] 
node test-analyze-complexity.js [mode]
node test-expand.js [mode] [num_subtasks]
node test-expand-all.js [mode] [num_subtasks]
node parse-prd-analysis.js [accuracy|complexity|all]

# CLI Commands
node scripts/dev.js parse-prd test.txt         # Local dev (streaming)
node scripts/dev.js analyze-complexity --research
node scripts/dev.js expand --id=1 --force
node scripts/dev.js expand --all --force

task-master [command]                          # Global CLI (non-streaming)
```

## ✅ Success Indicators

### Indicators
- **Priority**: 🔴🔴🔴 (high), 🟠🟠⚪ (medium), 🟢⚪⚪ (low)
- **Complexity**: ●●● (7-10), ●●○ (4-6), ●○○ (1-3)

### Token Format
`Tokens (I/O): 2,150/1,847 ($0.0423)` (~4 chars per token)

### Progress Bars
```
Single:  Generating subtasks... |████████░░| 80% (4/5)
Dual:    Expanding 3 tasks | Task 2/3 |████████░░| 66%
         Generating 5 subtasks... |██████░░░░| 60%
```

### Fractional Progress
`(completedTasks + currentSubtask/totalSubtasks) / totalTasks`
Example: 33% → 46% → 60% → 66% → 80% → 93% → 100%

## 🐛 Quick Fixes

| Issue | Fix |
|-------|-----|
| No streaming | Check `reportProgress` is passed |
| NaN% progress | Filter duplicate `subtask_progress` events |
| Missing tokens | Check `.env` has API keys |
| Broken bars | Terminal width > 80 |
| projectRoot.split | Use `projectRoot` not `session` |

```bash
# Debug
TASKMASTER_DEBUG=true node test-expand.js
npm run lint
```

## 📊 Benchmarks
- Single task: 10-20s (5 subtasks)
- Expand all: 30-45s (3 tasks)
- Streaming: ~10-20% faster
- Updates: Every 2-5s

## 🔄 Test Workflow

```bash
# Quick check
node test-parse-prd.js both && npm test

# Full suite (before release)
for test in parse-prd analyze-complexity expand expand-all; do
  node test-$test.js all
done
node parse-prd-analysis.js all
npm test
```

## 🎯 MCP Tool Example

```javascript
{
  "tool": "parse_prd",
  "args": {
    "input": "prd.txt",
    "numTasks": "8", 
    "force": true,
    "projectRoot": "/path/to/project"
  }
}

```

--------------------------------------------------------------------------------
/tests/unit/profiles/zed-integration.test.js:
--------------------------------------------------------------------------------

```javascript
import { jest } from '@jest/globals';
import fs from 'fs';
import path from 'path';
import os from 'os';

// Mock external modules
jest.mock('child_process', () => ({
	execSync: jest.fn()
}));

// Mock console methods
jest.mock('console', () => ({
	log: jest.fn(),
	info: jest.fn(),
	warn: jest.fn(),
	error: jest.fn(),
	clear: jest.fn()
}));

describe('Zed Integration', () => {
	let tempDir;

	beforeEach(() => {
		jest.clearAllMocks();

		// Create a temporary directory for testing
		tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'task-master-test-'));

		// Spy on fs methods
		jest.spyOn(fs, 'writeFileSync').mockImplementation(() => {});
		jest.spyOn(fs, 'readFileSync').mockImplementation((filePath) => {
			if (filePath.toString().includes('settings.json')) {
				return JSON.stringify({ context_servers: {} }, null, 2);
			}
			return '{}';
		});
		jest.spyOn(fs, 'existsSync').mockImplementation(() => false);
		jest.spyOn(fs, 'mkdirSync').mockImplementation(() => {});
	});

	afterEach(() => {
		// Clean up the temporary directory
		try {
			fs.rmSync(tempDir, { recursive: true, force: true });
		} catch (err) {
			console.error(`Error cleaning up: ${err.message}`);
		}
	});

	// Test function that simulates the createProjectStructure behavior for Zed files
	function mockCreateZedStructure() {
		// Create main .zed directory
		fs.mkdirSync(path.join(tempDir, '.zed'), { recursive: true });

		// Create MCP config file (settings.json)
		fs.writeFileSync(
			path.join(tempDir, '.zed', 'settings.json'),
			JSON.stringify({ context_servers: {} }, null, 2)
		);

		// Create AGENTS.md in project root
		fs.writeFileSync(
			path.join(tempDir, 'AGENTS.md'),
			'# Task Master Instructions\n\nThis is the Task Master agents file.'
		);
	}

	test('creates all required .zed directories', () => {
		// Act
		mockCreateZedStructure();

		// Assert
		expect(fs.mkdirSync).toHaveBeenCalledWith(path.join(tempDir, '.zed'), {
			recursive: true
		});
	});

	test('creates Zed settings.json with context_servers format', () => {
		// Act
		mockCreateZedStructure();

		// Assert
		expect(fs.writeFileSync).toHaveBeenCalledWith(
			path.join(tempDir, '.zed', 'settings.json'),
			JSON.stringify({ context_servers: {} }, null, 2)
		);
	});

	test('creates AGENTS.md in project root', () => {
		// Act
		mockCreateZedStructure();

		// Assert
		expect(fs.writeFileSync).toHaveBeenCalledWith(
			path.join(tempDir, 'AGENTS.md'),
			'# Task Master Instructions\n\nThis is the Task Master agents file.'
		);
	});
});

```

--------------------------------------------------------------------------------
/tests/unit/scripts/modules/task-manager/move-task.test.js:
--------------------------------------------------------------------------------

```javascript
import { jest } from '@jest/globals';

// --- Mocks ---
// Only mock the specific functions that move-task actually uses
jest.unstable_mockModule('../../../../../scripts/modules/utils.js', () => ({
	readJSON: jest.fn(),
	writeJSON: jest.fn(),
	log: jest.fn(),
	setTasksForTag: jest.fn(),
	traverseDependencies: jest.fn(() => [])
}));

jest.unstable_mockModule(
	'../../../../../scripts/modules/task-manager/generate-task-files.js',
	() => ({
		default: jest.fn().mockResolvedValue()
	})
);

jest.unstable_mockModule(
	'../../../../../scripts/modules/task-manager/is-task-dependent.js',
	() => ({
		default: jest.fn(() => false)
	})
);

jest.unstable_mockModule(
	'../../../../../scripts/modules/dependency-manager.js',
	() => ({
		findCrossTagDependencies: jest.fn(() => []),
		getDependentTaskIds: jest.fn(() => []),
		validateSubtaskMove: jest.fn()
	})
);

const { readJSON, writeJSON, log } = await import(
	'../../../../../scripts/modules/utils.js'
);
const generateTaskFiles = (
	await import(
		'../../../../../scripts/modules/task-manager/generate-task-files.js'
	)
).default;

const { default: moveTask } = await import(
	'../../../../../scripts/modules/task-manager/move-task.js'
);

const sampleTagged = () => ({
	master: {
		tasks: [
			{ id: 1, title: 'A' },
			{ id: 2, title: 'B', subtasks: [{ id: 1, title: 'B.1' }] }
		],
		metadata: {}
	},
	feature: {
		tasks: [{ id: 10, title: 'X' }],
		metadata: {}
	}
});

const clone = () => JSON.parse(JSON.stringify(sampleTagged()));

describe('moveTask (unit)', () => {
	beforeEach(() => {
		jest.clearAllMocks();
		readJSON.mockImplementation((path, projectRoot, tag) => {
			const data = clone();
			return { ...data[tag], tag, _rawTaggedData: data };
		});
		writeJSON.mockResolvedValue();
		log.mockImplementation(() => {});
	});

	test('moves task to new ID in same tag', async () => {
		await moveTask('tasks.json', '1', '3', false, { tag: 'master' });
		expect(writeJSON).toHaveBeenCalled();
		const written = writeJSON.mock.calls[0][1];
		const ids = written.master.tasks.map((t) => t.id);
		expect(ids).toEqual(expect.arrayContaining([2, 3]));
		expect(ids).not.toContain(1);
	});

	test('throws when counts of source and dest mismatch', async () => {
		await expect(
			moveTask('tasks.json', '1,2', '3', {}, { tag: 'master' })
		).rejects.toThrow(/Number of source IDs/);
	});

	test('error when tag invalid', async () => {
		await expect(
			moveTask('tasks.json', '1', '2', false, { tag: 'ghost' })
		).rejects.toThrow(/tag "ghost" not found/);
	});
});

```

--------------------------------------------------------------------------------
/apps/mcp/src/tools/autopilot/resume.tool.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview autopilot-resume MCP tool
 * Resume a previously started TDD workflow from saved state
 */

import { z } from 'zod';
import {
	handleApiResult,
	withNormalizedProjectRoot
} from '../../shared/utils.js';
import type { MCPContext } from '../../shared/types.js';
import { WorkflowService } from '@tm/core';
import type { FastMCP } from 'fastmcp';

const ResumeWorkflowSchema = z.object({
	projectRoot: z
		.string()
		.describe('Absolute path to the project root directory')
});

type ResumeWorkflowArgs = z.infer<typeof ResumeWorkflowSchema>;

/**
 * Register the autopilot_resume tool with the MCP server
 */
export function registerAutopilotResumeTool(server: FastMCP) {
	server.addTool({
		name: 'autopilot_resume',
		description:
			'Resume a previously started TDD workflow from saved state. Restores the workflow state machine and continues from where it left off.',
		parameters: ResumeWorkflowSchema,
		execute: withNormalizedProjectRoot(
			async (args: ResumeWorkflowArgs, context: MCPContext) => {
				const { projectRoot } = args;

				try {
					context.log.info(`Resuming autopilot workflow in ${projectRoot}`);

					const workflowService = new WorkflowService(projectRoot);

					// Check if workflow exists
					if (!(await workflowService.hasWorkflow())) {
						return handleApiResult({
							result: {
								success: false,
								error: {
									message:
										'No workflow state found. Start a new workflow with autopilot_start'
								}
							},
							log: context.log,
							projectRoot
						});
					}

					// Resume workflow
					const status = await workflowService.resumeWorkflow();
					const nextAction = workflowService.getNextAction();

					context.log.info(
						`Workflow resumed successfully for task ${status.taskId}`
					);

					return handleApiResult({
						result: {
							success: true,
							data: {
								message: 'Workflow resumed',
								...status,
								nextAction: nextAction.action,
								actionDescription: nextAction.description,
								nextSteps: nextAction.nextSteps
							}
						},
						log: context.log,
						projectRoot
					});
				} catch (error: any) {
					context.log.error(`Error in autopilot-resume: ${error.message}`);
					if (error.stack) {
						context.log.debug(error.stack);
					}
					return handleApiResult({
						result: {
							success: false,
							error: { message: `Failed to resume workflow: ${error.message}` }
						},
						log: context.log,
						projectRoot
					});
				}
			}
		)
	});
}

```

--------------------------------------------------------------------------------
/apps/extension/src/services/sidebar-webview-manager.ts:
--------------------------------------------------------------------------------

```typescript
import * as vscode from 'vscode';
import type { TaskMasterApi } from '../utils/task-master-api';

export class SidebarWebviewManager implements vscode.WebviewViewProvider {
	private webviewView?: vscode.WebviewView;
	private api?: TaskMasterApi;

	constructor(private readonly extensionUri: vscode.Uri) {}

	setApi(api: TaskMasterApi): void {
		this.api = api;
		// Update connection status if webview exists
		if (this.webviewView) {
			this.updateConnectionStatus();
		}
	}

	resolveWebviewView(
		webviewView: vscode.WebviewView,
		context: vscode.WebviewViewResolveContext,
		token: vscode.CancellationToken
	): void {
		this.webviewView = webviewView;

		webviewView.webview.options = {
			enableScripts: true,
			localResourceRoots: [
				vscode.Uri.joinPath(this.extensionUri, 'dist'),
				vscode.Uri.joinPath(this.extensionUri, 'assets')
			]
		};

		webviewView.webview.html = this.getHtmlContent(webviewView.webview);

		// Handle messages from the webview
		webviewView.webview.onDidReceiveMessage((message) => {
			if (message.command === 'openBoard') {
				vscode.commands.executeCommand('tm.showKanbanBoard');
			}
		});

		// Update connection status on load
		this.updateConnectionStatus();
	}

	updateConnectionStatus(): void {
		if (!this.webviewView || !this.api) return;

		const status = this.api.getConnectionStatus();
		this.webviewView.webview.postMessage({
			type: 'connectionStatus',
			data: status
		});
	}

	private getHtmlContent(webview: vscode.Webview): string {
		const scriptUri = webview.asWebviewUri(
			vscode.Uri.joinPath(this.extensionUri, 'dist', 'sidebar.js')
		);
		const styleUri = webview.asWebviewUri(
			vscode.Uri.joinPath(this.extensionUri, 'dist', 'index.css')
		);
		const nonce = this.getNonce();

		return `<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src ${webview.cspSource} https:; script-src 'nonce-${nonce}'; style-src ${webview.cspSource} 'unsafe-inline';">
  <link href="${styleUri}" rel="stylesheet">
  <title>TaskMaster</title>
</head>
<body>
  <div id="root"></div>
  <script nonce="${nonce}" src="${scriptUri}"></script>
</body>
</html>`;
	}

	private getNonce(): string {
		let text = '';
		const possible =
			'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
		for (let i = 0; i < 32; i++) {
			text += possible.charAt(Math.floor(Math.random() * possible.length));
		}
		return text;
	}
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/install-taskmaster.md:
--------------------------------------------------------------------------------

```markdown
Check if Task Master is installed and install it if needed.

This command helps you get Task Master set up globally on your system.

## Detection and Installation Process

1. **Check Current Installation**
   ```bash
   # Check if task-master command exists
   which task-master || echo "Task Master not found"
   
   # Check npm global packages
   npm list -g task-master-ai
   ```

2. **System Requirements Check**
   ```bash
   # Verify Node.js is installed
   node --version
   
   # Verify npm is installed  
   npm --version
   
   # Check Node version (need 16+)
   ```

3. **Install Task Master Globally**
   If not installed, run:
   ```bash
   npm install -g task-master-ai
   ```

4. **Verify Installation**
   ```bash
   # Check version
   task-master --version
   
   # Verify command is available
   which task-master
   ```

5. **Initial Setup**
   ```bash
   # Initialize in current directory
   task-master init
   ```

6. **Configure AI Provider**
   Ensure you have at least one AI provider API key set:
   ```bash
   # Check current configuration
   task-master models --status
   
   # If no API keys found, guide setup
   echo "You'll need at least one API key:"
   echo "- ANTHROPIC_API_KEY for Claude"
   echo "- OPENAI_API_KEY for GPT models"
   echo "- PERPLEXITY_API_KEY for research"
   echo ""
   echo "Set them in your shell profile or .env file"
   ```

7. **Quick Test**
   ```bash
   # Create a test PRD
   echo "Build a simple hello world API" > test-prd.txt
   
   # Try parsing it
   task-master parse-prd test-prd.txt -n 3
   ```

## Troubleshooting

If installation fails:

**Permission Errors:**
```bash
# Try with sudo (macOS/Linux)
sudo npm install -g task-master-ai

# Or fix npm permissions
npm config set prefix ~/.npm-global
export PATH=~/.npm-global/bin:$PATH
```

**Network Issues:**
```bash
# Use different registry
npm install -g task-master-ai --registry https://registry.npmjs.org/
```

**Node Version Issues:**
```bash
# Install Node 18+ via nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 18
nvm use 18
```

## Success Confirmation

Once installed, you should see:
```
✅ Task Master v0.16.2 (or higher) installed
✅ Command 'task-master' available globally
✅ AI provider configured
✅ Ready to use slash commands!

Try: /project:task-master:init your-prd.md
```

## Next Steps

After installation:
1. Run `/project:utils:check-health` to verify setup
2. Configure AI providers with `/project:task-master:models`
3. Start using Task Master commands!
```

--------------------------------------------------------------------------------
/apps/extension/src/utils/task-master-api/mcp-client.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * MCP Client Wrapper
 * Handles MCP tool calls with retry logic
 */

import type { ExtensionLogger } from '../logger';
import type { MCPClientManager } from '../mcpClient';

export class MCPClient {
	constructor(
		private mcpClient: MCPClientManager,
		private logger: ExtensionLogger,
		private config: { timeout: number; retryAttempts: number }
	) {}

	/**
	 * Call MCP tool with retry logic
	 */
	async callTool(
		toolName: string,
		args: Record<string, unknown>
	): Promise<any> {
		let lastError: Error | null = null;

		for (let attempt = 1; attempt <= this.config.retryAttempts; attempt++) {
			try {
				const rawResponse = await this.mcpClient.callTool(toolName, args);
				this.logger.debug(
					`Raw MCP response for ${toolName}:`,
					JSON.stringify(rawResponse, null, 2)
				);

				// Parse MCP response format
				if (
					rawResponse &&
					rawResponse.content &&
					Array.isArray(rawResponse.content) &&
					rawResponse.content[0]
				) {
					const contentItem = rawResponse.content[0];
					if (contentItem.type === 'text' && contentItem.text) {
						try {
							const parsedData = JSON.parse(contentItem.text);
							this.logger.debug(`Parsed MCP data for ${toolName}:`, parsedData);
							return parsedData;
						} catch (parseError) {
							this.logger.error(
								`Failed to parse MCP response text for ${toolName}:`,
								parseError
							);
							this.logger.error(`Raw text was:`, contentItem.text);
							return rawResponse; // Fall back to original response
						}
					}
				}

				// If not in expected format, return as-is
				this.logger.warn(
					`Unexpected MCP response format for ${toolName}, returning raw response`
				);
				return rawResponse;
			} catch (error) {
				lastError = error instanceof Error ? error : new Error('Unknown error');
				this.logger.warn(
					`Attempt ${attempt}/${this.config.retryAttempts} failed for ${toolName}:`,
					lastError.message
				);

				if (attempt < this.config.retryAttempts) {
					// Exponential backoff
					const delay = Math.min(1000 * 2 ** (attempt - 1), 5000);
					await new Promise((resolve) => setTimeout(resolve, delay));
				}
			}
		}

		throw (
			lastError ||
			new Error(
				`Failed to call ${toolName} after ${this.config.retryAttempts} attempts`
			)
		);
	}

	/**
	 * Get connection status
	 */
	getStatus(): { isRunning: boolean; error?: string } {
		return this.mcpClient.getStatus();
	}

	/**
	 * Test connection
	 */
	async testConnection(): Promise<boolean> {
		return this.mcpClient.testConnection();
	}
}

```

--------------------------------------------------------------------------------
/mcp-server/src/tools/add-tag.js:
--------------------------------------------------------------------------------

```javascript
/**
 * tools/add-tag.js
 * Tool to create a new tag
 */

import { z } from 'zod';
import {
	createErrorResponse,
	handleApiResult,
	withNormalizedProjectRoot
} from './utils.js';
import { addTagDirect } from '../core/task-master-core.js';
import { findTasksPath } from '../core/utils/path-utils.js';

/**
 * Register the addTag tool with the MCP server
 * @param {Object} server - FastMCP server instance
 */
export function registerAddTagTool(server) {
	server.addTool({
		name: 'add_tag',
		description: 'Create a new tag for organizing tasks in different contexts',
		parameters: z.object({
			name: z.string().describe('Name of the new tag to create'),
			copyFromCurrent: z
				.boolean()
				.optional()
				.describe(
					'Whether to copy tasks from the current tag (default: false)'
				),
			copyFromTag: z
				.string()
				.optional()
				.describe('Specific tag to copy tasks from'),
			fromBranch: z
				.boolean()
				.optional()
				.describe(
					'Create tag name from current git branch (ignores name parameter)'
				),
			description: z
				.string()
				.optional()
				.describe('Optional description for the tag'),
			file: z
				.string()
				.optional()
				.describe('Path to the tasks file (default: tasks/tasks.json)'),
			projectRoot: z
				.string()
				.describe('The directory of the project. Must be an absolute path.')
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				log.info(`Starting add-tag with args: ${JSON.stringify(args)}`);

				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
				let tasksJsonPath;
				try {
					tasksJsonPath = findTasksPath(
						{ projectRoot: args.projectRoot, file: args.file },
						log
					);
				} catch (error) {
					log.error(`Error finding tasks.json: ${error.message}`);
					return createErrorResponse(
						`Failed to find tasks.json: ${error.message}`
					);
				}

				// Call the direct function
				const result = await addTagDirect(
					{
						tasksJsonPath: tasksJsonPath,
						name: args.name,
						copyFromCurrent: args.copyFromCurrent,
						copyFromTag: args.copyFromTag,
						fromBranch: args.fromBranch,
						description: args.description,
						projectRoot: args.projectRoot
					},
					log,
					{ session }
				);

				return handleApiResult(
					result,
					log,
					'Error creating tag',
					undefined,
					args.projectRoot
				);
			} catch (error) {
				log.error(`Error in add-tag tool: ${error.message}`);
				return createErrorResponse(error.message);
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/apps/mcp/src/tools/autopilot/next.tool.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview autopilot-next MCP tool
 * Get the next action to perform in the TDD workflow
 */

import { z } from 'zod';
import {
	handleApiResult,
	withNormalizedProjectRoot
} from '../../shared/utils.js';
import type { MCPContext } from '../../shared/types.js';
import { WorkflowService } from '@tm/core';
import type { FastMCP } from 'fastmcp';

const NextActionSchema = z.object({
	projectRoot: z
		.string()
		.describe('Absolute path to the project root directory')
});

type NextActionArgs = z.infer<typeof NextActionSchema>;

/**
 * Register the autopilot_next tool with the MCP server
 */
export function registerAutopilotNextTool(server: FastMCP) {
	server.addTool({
		name: 'autopilot_next',
		description:
			'Get the next action to perform in the TDD workflow. Returns detailed context about what needs to be done next, including the current phase, subtask, and expected actions.',
		parameters: NextActionSchema,
		execute: withNormalizedProjectRoot(
			async (args: NextActionArgs, context: MCPContext) => {
				const { projectRoot } = args;

				try {
					context.log.info(
						`Getting next action for workflow in ${projectRoot}`
					);

					const workflowService = new WorkflowService(projectRoot);

					// Check if workflow exists
					if (!(await workflowService.hasWorkflow())) {
						return handleApiResult({
							result: {
								success: false,
								error: {
									message:
										'No active workflow found. Start a workflow with autopilot_start'
								}
							},
							log: context.log,
							projectRoot
						});
					}

					// Resume to load state
					await workflowService.resumeWorkflow();

					// Get next action
					const nextAction = workflowService.getNextAction();
					const status = workflowService.getStatus();

					context.log.info(`Next action determined: ${nextAction.action}`);

					return handleApiResult({
						result: {
							success: true,
							data: {
								action: nextAction.action,
								actionDescription: nextAction.description,
								...status,
								nextSteps: nextAction.nextSteps
							}
						},
						log: context.log,
						projectRoot
					});
				} catch (error: any) {
					context.log.error(`Error in autopilot-next: ${error.message}`);
					if (error.stack) {
						context.log.debug(error.stack);
					}
					return handleApiResult({
						result: {
							success: false,
							error: {
								message: `Failed to get next action: ${error.message}`
							}
						},
						log: context.log,
						projectRoot
					});
				}
			}
		)
	});
}

```

--------------------------------------------------------------------------------
/mcp-server/src/tools/remove-dependency.js:
--------------------------------------------------------------------------------

```javascript
/**
 * tools/remove-dependency.js
 * Tool for removing a dependency from a task
 */

import { z } from 'zod';
import {
	handleApiResult,
	createErrorResponse,
	withNormalizedProjectRoot
} from './utils.js';
import { removeDependencyDirect } from '../core/task-master-core.js';
import { findTasksPath } from '../core/utils/path-utils.js';
import { resolveTag } from '../../../scripts/modules/utils.js';

/**
 * Register the removeDependency tool with the MCP server
 * @param {Object} server - FastMCP server instance
 */
export function registerRemoveDependencyTool(server) {
	server.addTool({
		name: 'remove_dependency',
		description: 'Remove a dependency from a task',
		parameters: z.object({
			id: z.string().describe('Task ID to remove dependency from'),
			dependsOn: z.string().describe('Task ID to remove as a dependency'),
			file: z
				.string()
				.optional()
				.describe(
					'Absolute path to the tasks file (default: tasks/tasks.json)'
				),
			projectRoot: z
				.string()
				.describe('The directory of the project. Must be an absolute path.'),
			tag: z.string().optional().describe('Tag context to operate on')
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				const resolvedTag = resolveTag({
					projectRoot: args.projectRoot,
					tag: args.tag
				});
				log.info(
					`Removing dependency for task ${args.id} from ${args.dependsOn} with args: ${JSON.stringify(args)}`
				);

				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
				let tasksJsonPath;
				try {
					tasksJsonPath = findTasksPath(
						{ projectRoot: args.projectRoot, file: args.file },
						log
					);
				} catch (error) {
					log.error(`Error finding tasks.json: ${error.message}`);
					return createErrorResponse(
						`Failed to find tasks.json: ${error.message}`
					);
				}

				const result = await removeDependencyDirect(
					{
						tasksJsonPath: tasksJsonPath,
						id: args.id,
						dependsOn: args.dependsOn,
						projectRoot: args.projectRoot,
						tag: resolvedTag
					},
					log
				);

				if (result.success) {
					log.info(`Successfully removed dependency: ${result.data.message}`);
				} else {
					log.error(`Failed to remove dependency: ${result.error.message}`);
				}

				return handleApiResult(
					result,
					log,
					'Error removing dependency',
					undefined,
					args.projectRoot
				);
			} catch (error) {
				log.error(`Error in removeDependency tool: ${error.message}`);
				return createErrorResponse(error.message);
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/packages/tm-bridge/src/add-tag-bridge.ts:
--------------------------------------------------------------------------------

```typescript
import { ui } from '@tm/cli';
import type { BaseBridgeParams } from './bridge-types.js';
import { checkStorageType } from './bridge-utils.js';

/**
 * Parameters for the add-tag bridge function
 */
export interface AddTagBridgeParams extends BaseBridgeParams {
	/** Tag name to create */
	tagName: string;
}

/**
 * Result returned when API storage redirects to web UI
 */
export interface RemoteAddTagResult {
	success: boolean;
	message: string;
	redirectUrl: string;
}

/**
 * Shared bridge function for add-tag command.
 * Checks if using API storage and redirects to web UI if so.
 *
 * For API storage, tags are called "briefs" and must be created
 * through the Hamster web interface.
 *
 * @param params - Bridge parameters
 * @returns Result object if API storage handled it, null if should fall through to file storage
 */
export async function tryAddTagViaRemote(
	params: AddTagBridgeParams
): Promise<RemoteAddTagResult | null> {
	const {
		tagName,
		projectRoot,
		isMCP = false,
		outputFormat = 'text',
		report
	} = params;

	// Check storage type using shared utility
	const { isApiStorage, tmCore } = await checkStorageType(
		projectRoot,
		report,
		'falling back to file-based tag creation'
	);

	if (!isApiStorage || !tmCore) {
		// Not API storage - signal caller to fall through to file-based logic
		return null;
	}

	// Get the brief creation URL from tmCore
	const redirectUrl = tmCore.auth.getBriefCreationUrl();

	if (!redirectUrl) {
		report(
			'error',
			'Could not generate brief creation URL. Please ensure you have selected an organization using "tm context org"'
		);
		return {
			success: false,
			message:
				'Failed to generate brief creation URL. Please ensure an organization is selected.',
			redirectUrl: ''
		};
	}

	// Show CLI output if not MCP
	if (!isMCP && outputFormat === 'text') {
		console.log(
			ui.displayCardBox({
				header: '# Create a Brief in Hamster Studio',
				body: [
					'Your tags are separate task lists. When connected to Hamster,\ntask lists are attached to briefs.',
					'Create a new brief and its task list will automatically be\navailable when generated.'
				],
				callToAction: {
					label: 'Visit:',
					action: redirectUrl
				},
				footer:
					'To access tasks for a specific brief, use:\n' +
					'  • tm briefs select <brief-name>\n' +
					'  • tm briefs select <brief-id>\n' +
					'  • tm briefs select (interactive)'
			})
		);
	}

	// Return success result with redirect URL
	return {
		success: true,
		message: `API storage detected. Please create tag "${tagName}" at: ${redirectUrl}`,
		redirectUrl
	};
}

```

--------------------------------------------------------------------------------
/apps/mcp/src/tools/autopilot/abort.tool.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview autopilot-abort MCP tool
 * Abort a running TDD workflow and clean up state
 */

import { z } from 'zod';
import {
	handleApiResult,
	withNormalizedProjectRoot
} from '../../shared/utils.js';
import type { MCPContext } from '../../shared/types.js';
import { WorkflowService } from '@tm/core';
import type { FastMCP } from 'fastmcp';

const AbortSchema = z.object({
	projectRoot: z
		.string()
		.describe('Absolute path to the project root directory')
});

type AbortArgs = z.infer<typeof AbortSchema>;

/**
 * Register the autopilot_abort tool with the MCP server
 */
export function registerAutopilotAbortTool(server: FastMCP) {
	server.addTool({
		name: 'autopilot_abort',
		description:
			'Abort the current TDD workflow and clean up workflow state. This will remove the workflow state file but will NOT delete the git branch or any code changes.',
		parameters: AbortSchema,
		execute: withNormalizedProjectRoot(
			async (args: AbortArgs, context: MCPContext) => {
				const { projectRoot } = args;

				try {
					context.log.info(`Aborting autopilot workflow in ${projectRoot}`);

					const workflowService = new WorkflowService(projectRoot);

					// Check if workflow exists
					const hasWorkflow = await workflowService.hasWorkflow();

					if (!hasWorkflow) {
						context.log.warn('No active workflow to abort');
						return handleApiResult({
							result: {
								success: true,
								data: {
									message: 'No active workflow to abort',
									hadWorkflow: false
								}
							},
							log: context.log,
							projectRoot
						});
					}

					// Get info before aborting
					await workflowService.resumeWorkflow();
					const status = workflowService.getStatus();

					// Abort workflow
					await workflowService.abortWorkflow();

					context.log.info('Workflow state deleted');

					return handleApiResult({
						result: {
							success: true,
							data: {
								message: 'Workflow aborted',
								hadWorkflow: true,
								taskId: status.taskId,
								branchName: status.branchName,
								note: 'Git branch and code changes were preserved. You can manually clean them up if needed.'
							}
						},
						log: context.log,
						projectRoot
					});
				} catch (error: any) {
					context.log.error(`Error in autopilot-abort: ${error.message}`);
					if (error.stack) {
						context.log.debug(error.stack);
					}
					return handleApiResult({
						result: {
							success: false,
							error: { message: `Failed to abort workflow: ${error.message}` }
						},
						log: context.log,
						projectRoot
					});
				}
			}
		)
	});
}

```

--------------------------------------------------------------------------------
/tests/integration/profiles/claude-init-functionality.test.js:
--------------------------------------------------------------------------------

```javascript
import fs from 'fs';
import path from 'path';
import { claudeProfile } from '../../../src/profiles/claude.js';

describe('Claude Profile Initialization Functionality', () => {
	let claudeProfileContent;

	beforeAll(() => {
		const claudeJsPath = path.join(
			process.cwd(),
			'src',
			'profiles',
			'claude.js'
		);
		claudeProfileContent = fs.readFileSync(claudeJsPath, 'utf8');
	});

	test('claude.js has correct asset-only profile configuration', () => {
		// Check for explicit, non-default values in the source file
		expect(claudeProfileContent).toContain("name: 'claude'");
		expect(claudeProfileContent).toContain("displayName: 'Claude Code'");
		expect(claudeProfileContent).toContain("profileDir: '.'"); // non-default
		expect(claudeProfileContent).toContain("rulesDir: '.'"); // non-default
		expect(claudeProfileContent).toContain("mcpConfigName: '.mcp.json'"); // non-default
		expect(claudeProfileContent).toContain('includeDefaultRules: false'); // non-default
		expect(claudeProfileContent).toContain(
			"'AGENTS.md': '.taskmaster/CLAUDE.md'"
		);

		// Check the final computed properties on the profile object
		expect(claudeProfile.profileName).toBe('claude');
		expect(claudeProfile.displayName).toBe('Claude Code');
		expect(claudeProfile.profileDir).toBe('.');
		expect(claudeProfile.rulesDir).toBe('.');
		expect(claudeProfile.mcpConfig).toBe(true); // default from base profile
		expect(claudeProfile.mcpConfigName).toBe('.mcp.json'); // explicitly set
		expect(claudeProfile.mcpConfigPath).toBe('.mcp.json'); // computed
		expect(claudeProfile.includeDefaultRules).toBe(false);
		expect(claudeProfile.fileMap['AGENTS.md']).toBe('.taskmaster/CLAUDE.md');
	});

	test('claude.js has lifecycle functions for file management', () => {
		expect(claudeProfileContent).toContain('function onAddRulesProfile');
		expect(claudeProfileContent).toContain('function onRemoveRulesProfile');
		expect(claudeProfileContent).toContain(
			'function onPostConvertRulesProfile'
		);
	});

	test('claude.js handles .claude directory and .taskmaster/CLAUDE.md import in lifecycle functions', () => {
		expect(claudeProfileContent).toContain('.claude');
		expect(claudeProfileContent).toContain('copyRecursiveSync');
		expect(claudeProfileContent).toContain('.taskmaster/CLAUDE.md');
		expect(claudeProfileContent).toContain('@./.taskmaster/CLAUDE.md');
	});

	test('claude.js has proper error handling in lifecycle functions', () => {
		expect(claudeProfileContent).toContain('try {');
		expect(claudeProfileContent).toContain('} catch (err) {');
		expect(claudeProfileContent).toContain("log('error'");
	});
});

```

--------------------------------------------------------------------------------
/mcp-server/src/tools/generate.js:
--------------------------------------------------------------------------------

```javascript
/**
 * tools/generate.js
 * Tool to generate individual task files from tasks.json
 */

import { z } from 'zod';
import {
	handleApiResult,
	createErrorResponse,
	withNormalizedProjectRoot
} from './utils.js';
import { generateTaskFilesDirect } from '../core/task-master-core.js';
import { findTasksPath } from '../core/utils/path-utils.js';
import { resolveTag } from '../../../scripts/modules/utils.js';
import path from 'path';

/**
 * Register the generate tool with the MCP server
 * @param {Object} server - FastMCP server instance
 */
export function registerGenerateTool(server) {
	server.addTool({
		name: 'generate',
		description:
			'Generates individual task files in tasks/ directory based on tasks.json',
		parameters: z.object({
			file: z.string().optional().describe('Absolute path to the tasks file'),
			output: z
				.string()
				.optional()
				.describe('Output directory (default: same directory as tasks file)'),
			projectRoot: z
				.string()
				.describe('The directory of the project. Must be an absolute path.'),
			tag: z.string().optional().describe('Tag context to operate on')
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				log.info(`Generating task files with args: ${JSON.stringify(args)}`);

				const resolvedTag = resolveTag({
					projectRoot: args.projectRoot,
					tag: args.tag
				});
				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
				let tasksJsonPath;
				try {
					tasksJsonPath = findTasksPath(
						{ projectRoot: args.projectRoot, file: args.file },
						log
					);
				} catch (error) {
					log.error(`Error finding tasks.json: ${error.message}`);
					return createErrorResponse(
						`Failed to find tasks.json: ${error.message}`
					);
				}

				const outputDir = args.output
					? path.resolve(args.projectRoot, args.output)
					: path.dirname(tasksJsonPath);

				const result = await generateTaskFilesDirect(
					{
						tasksJsonPath: tasksJsonPath,
						outputDir: outputDir,
						projectRoot: args.projectRoot,
						tag: resolvedTag
					},
					log,
					{ session }
				);

				if (result.success) {
					log.info(`Successfully generated task files: ${result.data.message}`);
				} else {
					log.error(
						`Failed to generate task files: ${result.error?.message || 'Unknown error'}`
					);
				}

				return handleApiResult(
					result,
					log,
					'Error generating task files',
					undefined,
					args.projectRoot
				);
			} catch (error) {
				log.error(`Error in generate tool: ${error.message}`);
				return createErrorResponse(error.message);
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/learn.md:
--------------------------------------------------------------------------------

```markdown
Learn about Task Master capabilities through interactive exploration.

Arguments: $ARGUMENTS

## Interactive Task Master Learning

Based on your input, I'll help you discover capabilities:

### 1. **What are you trying to do?**

If $ARGUMENTS contains:
- "start" / "begin" → Show project initialization workflows
- "manage" / "organize" → Show task management commands  
- "automate" / "auto" → Show automation workflows
- "analyze" / "report" → Show analysis tools
- "fix" / "problem" → Show troubleshooting commands
- "fast" / "quick" → Show efficiency shortcuts

### 2. **Intelligent Suggestions**

Based on your project state:

**No tasks yet?**
```
You'll want to start with:
1. /project:task-master:init <prd-file>
   → Creates tasks from requirements
   
2. /project:task-master:parse-prd <file>
   → Alternative task generation

Try: /project:task-master:init demo-prd.md
```

**Have tasks?**
Let me analyze what you might need...
- Many pending tasks? → Learn sprint planning
- Complex tasks? → Learn task expansion
- Daily work? → Learn workflow automation

### 3. **Command Discovery**

**By Category:**
- 📋 Task Management: list, show, add, update, complete
- 🔄 Workflows: auto-implement, sprint-plan, daily-standup
- 🛠️ Utilities: check-health, complexity-report, sync-memory
- 🔍 Analysis: validate-deps, show dependencies

**By Scenario:**
- "I want to see what to work on" → `/project:task-master:next`
- "I need to break this down" → `/project:task-master:expand <id>`
- "Show me everything" → `/project:task-master:status`
- "Just do it for me" → `/project:workflows:auto-implement`

### 4. **Power User Patterns**

**Command Chaining:**
```
/project:task-master:next
/project:task-master:start <id>
/project:workflows:auto-implement
```

**Smart Filters:**
```
/project:task-master:list pending high
/project:task-master:list blocked
/project:task-master:list 1-5 tree
```

**Automation:**
```
/project:workflows:pipeline init → expand-all → sprint-plan
```

### 5. **Learning Path**

Based on your experience level:

**Beginner Path:**
1. init → Create project
2. status → Understand state
3. next → Find work
4. complete → Finish task

**Intermediate Path:**
1. expand → Break down complex tasks
2. sprint-plan → Organize work
3. complexity-report → Understand difficulty
4. validate-deps → Ensure consistency

**Advanced Path:**
1. pipeline → Chain operations
2. smart-flow → Context-aware automation
3. Custom commands → Extend the system

### 6. **Try This Now**

Based on what you asked about, try:
[Specific command suggestion based on $ARGUMENTS]

Want to learn more about a specific command?
Type: /project:help <command-name>
```

--------------------------------------------------------------------------------
/tests/unit/ai-providers/lmstudio.test.js:
--------------------------------------------------------------------------------

```javascript
/**
 * Tests for LMStudioProvider
 */

import { LMStudioProvider } from '../../../src/ai-providers/lmstudio.js';

describe('LMStudioProvider', () => {
	let provider;

	beforeEach(() => {
		provider = new LMStudioProvider();
	});

	describe('constructor', () => {
		it('should initialize with correct name', () => {
			expect(provider.name).toBe('LM Studio');
		});

		it('should not require API key', () => {
			expect(provider.requiresApiKey).toBe(false);
		});

		it('should have default localhost baseURL', () => {
			expect(provider.defaultBaseURL).toBe('http://localhost:1234/v1');
		});

		it('should disable structured outputs (LM Studio only supports json_schema mode)', () => {
			expect(provider.supportsStructuredOutputs).toBe(true);
		});

		it('should inherit from OpenAICompatibleProvider', () => {
			expect(provider).toHaveProperty('generateText');
			expect(provider).toHaveProperty('streamText');
			expect(provider).toHaveProperty('generateObject');
		});
	});

	describe('getRequiredApiKeyName', () => {
		it('should return environment variable name', () => {
			expect(provider.getRequiredApiKeyName()).toBe('LMSTUDIO_API_KEY');
		});
	});

	describe('isRequiredApiKey', () => {
		it('should return false as local server does not require API key', () => {
			expect(provider.isRequiredApiKey()).toBe(false);
		});
	});

	describe('getClient', () => {
		it('should create client without API key', () => {
			const client = provider.getClient({});
			expect(client).toBeDefined();
		});

		it('should create client with custom baseURL', () => {
			const params = {
				baseURL: 'http://custom-host:8080/v1'
			};
			const client = provider.getClient(params);
			expect(client).toBeDefined();
		});

		it('should not throw error when API key is missing', () => {
			expect(() => {
				provider.getClient({});
			}).not.toThrow();
		});
	});

	describe('validateAuth', () => {
		it('should not require API key validation', () => {
			expect(() => {
				provider.validateAuth({});
			}).not.toThrow();
		});

		it('should pass with or without API key', () => {
			expect(() => {
				provider.validateAuth({ apiKey: 'test-key' });
			}).not.toThrow();

			expect(() => {
				provider.validateAuth({});
			}).not.toThrow();
		});
	});

	describe('getBaseURL', () => {
		it('should return default localhost URL', () => {
			const baseURL = provider.getBaseURL({});
			expect(baseURL).toBe('http://localhost:1234/v1');
		});

		it('should return custom baseURL when provided', () => {
			const baseURL = provider.getBaseURL({
				baseURL: 'http://192.168.1.100:1234/v1'
			});
			expect(baseURL).toBe('http://192.168.1.100:1234/v1');
		});
	});
});

```

--------------------------------------------------------------------------------
/test-version-check-full.js:
--------------------------------------------------------------------------------

```javascript
import {
	checkForUpdate,
	displayUpgradeNotification,
	compareVersions
} from './scripts/modules/commands.js';
import fs from 'fs';
import path from 'path';

// Force our current version for testing
process.env.FORCE_VERSION = '0.9.30';

// Create a mock package.json in memory for testing
const mockPackageJson = {
	name: 'task-master-ai',
	version: '0.9.30'
};

// Modified version of checkForUpdate that doesn't use HTTP for testing
async function testCheckForUpdate(simulatedLatestVersion) {
	// Get current version - use our forced version
	const currentVersion = process.env.FORCE_VERSION || '0.9.30';

	console.log(`Using simulated current version: ${currentVersion}`);
	console.log(`Using simulated latest version: ${simulatedLatestVersion}`);

	// Compare versions
	const needsUpdate =
		compareVersions(currentVersion, simulatedLatestVersion) < 0;

	return {
		currentVersion,
		latestVersion: simulatedLatestVersion,
		needsUpdate
	};
}

// Test with current version older than latest (should show update notice)
async function runTest() {
	console.log('=== Testing version check scenarios ===\n');

	// Scenario 1: Update available
	console.log(
		'\n--- Scenario 1: Update available (Current: 0.9.30, Latest: 1.0.0) ---'
	);
	const updateInfo1 = await testCheckForUpdate('1.0.0');
	console.log('Update check results:');
	console.log(`- Current version: ${updateInfo1.currentVersion}`);
	console.log(`- Latest version: ${updateInfo1.latestVersion}`);
	console.log(`- Update needed: ${updateInfo1.needsUpdate}`);

	if (updateInfo1.needsUpdate) {
		console.log('\nDisplaying upgrade notification:');
		displayUpgradeNotification(
			updateInfo1.currentVersion,
			updateInfo1.latestVersion
		);
	}

	// Scenario 2: No update needed (versions equal)
	console.log(
		'\n--- Scenario 2: No update needed (Current: 0.9.30, Latest: 0.9.30) ---'
	);
	const updateInfo2 = await testCheckForUpdate('0.9.30');
	console.log('Update check results:');
	console.log(`- Current version: ${updateInfo2.currentVersion}`);
	console.log(`- Latest version: ${updateInfo2.latestVersion}`);
	console.log(`- Update needed: ${updateInfo2.needsUpdate}`);

	// Scenario 3: Development version (current newer than latest)
	console.log(
		'\n--- Scenario 3: Development version (Current: 0.9.30, Latest: 0.9.0) ---'
	);
	const updateInfo3 = await testCheckForUpdate('0.9.0');
	console.log('Update check results:');
	console.log(`- Current version: ${updateInfo3.currentVersion}`);
	console.log(`- Latest version: ${updateInfo3.latestVersion}`);
	console.log(`- Update needed: ${updateInfo3.needsUpdate}`);

	console.log('\n=== Test complete ===');
}

// Run all tests
runTest();

```

--------------------------------------------------------------------------------
/apps/extension/src/components/TaskMasterLogo.tsx:
--------------------------------------------------------------------------------

```typescript
import React from 'react';

interface TaskMasterLogoProps {
	className?: string;
}

export const TaskMasterLogo: React.FC<TaskMasterLogoProps> = ({
	className = ''
}) => {
	return (
		<svg
			className={className}
			viewBox="0 0 224 291"
			fill="none"
			xmlns="http://www.w3.org/2000/svg"
		>
			<path
				d="M101.635 286.568L71.4839 256.414C65.6092 250.539 65.6092 241.03 71.4839 235.155L142.52 164.11C144.474 162.156 147.643 162.156 149.61 164.11L176.216 190.719C178.17 192.673 181.339 192.673 183.305 190.719L189.719 184.305C191.673 182.35 191.673 179.181 189.719 177.214L163.113 150.605C161.159 148.651 161.159 145.481 163.113 143.514L191.26 115.365C193.214 113.41 193.214 110.241 191.26 108.274L182.316 99.3291C180.362 97.3748 177.193 97.3748 175.226 99.3291L55.8638 218.706C49.989 224.581 40.4816 224.581 34.6068 218.706L4.4061 188.501C-1.4687 182.626 -1.4687 173.117 4.4061 167.242L23.8342 147.811C25.7883 145.857 25.7883 142.688 23.8342 140.721L4.78187 121.666C-1.09293 115.791 -1.09293 106.282 4.78187 100.406L34.7195 70.4527C40.5943 64.5772 50.1017 64.5772 55.9765 70.4527L75.555 90.0335C77.5091 91.9879 80.6782 91.9879 82.6448 90.0335L124.144 48.5292C126.098 46.5749 126.098 43.4054 124.144 41.4385L115.463 32.7568C113.509 30.8025 110.34 30.8025 108.374 32.7568L99.8683 41.2632C97.9143 43.2175 94.7451 43.2175 92.7785 41.2632L82.1438 30.6271C80.1897 28.6728 80.1897 25.5033 82.1438 23.5364L101.271 4.40662C107.146 -1.46887 116.653 -1.46887 122.528 4.40662L152.478 34.3604C158.353 40.2359 158.353 49.7444 152.478 55.6199L82.6323 125.474C80.6782 127.429 77.5091 127.429 75.5425 125.474L48.8741 98.8029C46.9201 96.8486 43.7509 96.8486 41.7843 98.8029L33.1036 107.485C31.1496 109.439 31.1496 112.608 33.1036 114.575L59.2458 140.721C61.1999 142.675 61.1999 145.844 59.2458 147.811L32.7404 174.32C30.7863 176.274 30.7863 179.444 32.7404 181.411L41.6841 190.355C43.6382 192.31 46.8073 192.31 48.7739 190.355L168.136 70.9789C174.011 65.1034 183.518 65.1034 189.393 70.9789L219.594 101.183C225.469 107.059 225.469 116.567 219.594 122.443L198.537 143.502C196.583 145.456 196.583 148.626 198.537 150.592L218.053 170.111C223.928 175.986 223.928 185.495 218.053 191.37L190.37 219.056C184.495 224.932 174.988 224.932 169.113 219.056L149.597 199.538C147.643 197.584 144.474 197.584 142.508 199.538L99.8057 242.245C97.8516 244.2 97.8516 247.369 99.8057 249.336L108.699 258.231C110.653 260.185 113.823 260.185 115.789 258.231L122.954 251.065C124.908 249.11 128.077 249.11 130.044 251.065L140.679 261.701C142.633 263.655 142.633 266.825 140.679 268.791L122.879 286.593C117.004 292.469 107.497 292.469 101.622 286.593L101.635 286.568Z"
				fill="currentColor"
			/>
		</svg>
	);
};

```

--------------------------------------------------------------------------------
/tests/integration/profiles/cline-init-functionality.test.js:
--------------------------------------------------------------------------------

```javascript
import fs from 'fs';
import path from 'path';
import { clineProfile } from '../../../src/profiles/cline.js';

describe('Cline Profile Initialization Functionality', () => {
	let clineProfileContent;

	beforeAll(() => {
		const clineJsPath = path.join(process.cwd(), 'src', 'profiles', 'cline.js');
		clineProfileContent = fs.readFileSync(clineJsPath, 'utf8');
	});

	test('cline.js uses factory pattern with correct configuration', () => {
		// Check for explicit, non-default values in the source file
		expect(clineProfileContent).toContain("name: 'cline'");
		expect(clineProfileContent).toContain("displayName: 'Cline'");
		expect(clineProfileContent).toContain("profileDir: '.clinerules'"); // non-default
		expect(clineProfileContent).toContain("rulesDir: '.clinerules'"); // non-default
		expect(clineProfileContent).toContain('mcpConfig: false'); // non-default

		// Check the final computed properties on the profile object
		expect(clineProfile.profileName).toBe('cline');
		expect(clineProfile.displayName).toBe('Cline');
		expect(clineProfile.profileDir).toBe('.clinerules');
		expect(clineProfile.rulesDir).toBe('.clinerules');
		expect(clineProfile.mcpConfig).toBe(false);
		expect(clineProfile.mcpConfigName).toBe(null);
	});

	test('cline.js configures .mdc to .md extension mapping', () => {
		// Check that the profile object has the correct file mapping behavior (cline converts to .md)
		expect(clineProfile.fileMap['rules/cursor_rules.mdc']).toBe(
			'cline_rules.md'
		);
	});

	test('cline.js uses standard tool mappings', () => {
		// Check that the profile uses default tool mappings (equivalent to COMMON_TOOL_MAPPINGS.STANDARD)
		// This verifies the architectural pattern: no custom toolMappings = standard tool names
		expect(clineProfileContent).not.toContain('toolMappings:');
		expect(clineProfileContent).not.toContain('apply_diff');
		expect(clineProfileContent).not.toContain('search_files');

		// Verify the result: default mappings means tools keep their original names
		expect(clineProfile.conversionConfig.toolNames.edit_file).toBe('edit_file');
		expect(clineProfile.conversionConfig.toolNames.search).toBe('search');
	});

	test('cline.js has custom file mapping for cursor_rules.mdc', () => {
		// Check actual behavior - cline gets default rule files
		expect(Object.keys(clineProfile.fileMap)).toContain(
			'rules/cursor_rules.mdc'
		);
		expect(clineProfile.fileMap['rules/cursor_rules.mdc']).toBe(
			'cline_rules.md'
		);
	});

	test('cline.js uses createProfile factory function', () => {
		expect(clineProfileContent).toContain('createProfile');
		expect(clineProfileContent).toContain('export const clineProfile');
	});
});

```

--------------------------------------------------------------------------------
/apps/docs/getting-started/quick-start/tasks-quick.mdx:
--------------------------------------------------------------------------------

```markdown
---
title: Tasks Setup
sidebarTitle: "Tasks Setup"
---
Now that your tasks are generated you can review the plan and prepare for execution.

<Tip>
Not all of the setup steps are required but they are recommended in order to ensure your coding agents work on accurate tasks.
</Tip>

## Expand Tasks
Used to add detail to tasks and create subtasks. We recommend expanding all tasks using the MCP request below:
```
Expand all tasks into subtasks.
```
The agent will execute
```bash
task-master expand --all
```
## List/Show Tasks

Used to view task details. It is important to review the plan and ensure it makes sense in your project. Check for correct folder structures, dependencies, out of scope subtasks, etc.

To see a list of tasks and descriptions use the following command:

```
List all pending tasks so I can review.
```
To see all tasks in the CLI you can use:
```bash
task-master list
```

To see all implementation details of an individual task, including subtasks and testing strategy, you can use Show Task:

```
Show task 2 so I can review.
```

```bash
task-master show --id=<##>
```

## Update Tasks

If the task details need to be edited you can update the task using this request: 

```
Update Task 2 to use Postgres instead of MongoDB and remove the sharding subtask
```
Or this CLI command:

```bash
task-master update-task --id=2 --prompt="use Postgres instead of MongoDB and remove the sharding subtask"
```
## Analyze complexity

Task Master can provide a complexity report which can be helpful to read before you begin. If you didn't already expand all your tasks, it could help identify which could be broken down further with subtasks.

```
Can you analyze the complexity of our tasks to help me understand which ones need to be broken down further?
```

The agent will use the `analyze_project_complexity` MCP tool, or you can run it directly with the CLI command:
```bash
task-master analyze-complexity
```

For more comprehensive analysis using your configured research model, you can use:
```bash
task-master analyze-complexity --research
```

<Tip>
The `--research` flag uses whatever research model you have configured in `.taskmaster/config.json` (configurable via `task-master models --setup`) for research-backed complexity analysis, providing more informed recommendations.
</Tip>

You can view the report in a friendly table using:
```
Can you show me the complexity report in a more readable format?
```

For more detailed CLI options, see the [Analyze Task Complexity](/capabilities/cli-root-commands#analyze-task-complexity) section.

<Check>Now you are ready to begin [executing tasks](/getting-started/quick-start/execute-quick)</Check>
```

--------------------------------------------------------------------------------
/mcp-server/src/tools/remove-task.js:
--------------------------------------------------------------------------------

```javascript
/**
 * tools/remove-task.js
 * Tool to remove a task by ID
 */

import { z } from 'zod';
import {
	handleApiResult,
	createErrorResponse,
	withNormalizedProjectRoot
} from './utils.js';
import { removeTaskDirect } from '../core/task-master-core.js';
import { findTasksPath } from '../core/utils/path-utils.js';
import { resolveTag } from '../../../scripts/modules/utils.js';

/**
 * Register the remove-task tool with the MCP server
 * @param {Object} server - FastMCP server instance
 */
export function registerRemoveTaskTool(server) {
	server.addTool({
		name: 'remove_task',
		description: 'Remove a task or subtask permanently from the tasks list',
		parameters: z.object({
			id: z
				.string()
				.describe(
					"ID of the task or subtask to remove (e.g., '5' or '5.2'). Can be comma-separated to update multiple tasks/subtasks at once."
				),
			file: z.string().optional().describe('Absolute path to the tasks file'),
			projectRoot: z
				.string()
				.describe('The directory of the project. Must be an absolute path.'),
			confirm: z
				.boolean()
				.optional()
				.describe('Whether to skip confirmation prompt (default: false)'),
			tag: z
				.string()
				.optional()
				.describe(
					'Specify which tag context to operate on. Defaults to the current active tag.'
				)
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				log.info(`Removing task(s) with ID(s): ${args.id}`);

				const resolvedTag = resolveTag({
					projectRoot: args.projectRoot,
					tag: args.tag
				});

				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
				let tasksJsonPath;
				try {
					tasksJsonPath = findTasksPath(
						{ projectRoot: args.projectRoot, file: args.file },
						log
					);
				} catch (error) {
					log.error(`Error finding tasks.json: ${error.message}`);
					return createErrorResponse(
						`Failed to find tasks.json: ${error.message}`
					);
				}

				log.info(`Using tasks file path: ${tasksJsonPath}`);

				const result = await removeTaskDirect(
					{
						tasksJsonPath: tasksJsonPath,
						id: args.id,
						projectRoot: args.projectRoot,
						tag: resolvedTag
					},
					log,
					{ session }
				);

				if (result.success) {
					log.info(`Successfully removed task: ${args.id}`);
				} else {
					log.error(`Failed to remove task: ${result.error.message}`);
				}

				return handleApiResult(
					result,
					log,
					'Error removing task',
					undefined,
					args.projectRoot
				);
			} catch (error) {
				log.error(`Error in remove-task tool: ${error.message}`);
				return createErrorResponse(`Failed to remove task: ${error.message}`);
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/mcp-server/src/tools/scope-up.js:
--------------------------------------------------------------------------------

```javascript
/**
 * tools/scope-up.js
 * Tool to scope up task complexity
 */

import { z } from 'zod';
import {
	createErrorResponse,
	handleApiResult,
	withNormalizedProjectRoot
} from './utils.js';
import { scopeUpDirect } from '../core/task-master-core.js';
import { findTasksPath } from '../core/utils/path-utils.js';
import { resolveTag } from '../../../scripts/modules/utils.js';

/**
 * Register the scopeUp tool with the MCP server
 * @param {Object} server - FastMCP server instance
 */
export function registerScopeUpTool(server) {
	server.addTool({
		name: 'scope_up_task',
		description: 'Increase the complexity of one or more tasks using AI',
		parameters: z.object({
			id: z
				.string()
				.describe(
					'Comma-separated list of task IDs to scope up (e.g., "1,3,5")'
				),
			strength: z
				.string()
				.optional()
				.describe(
					'Strength level: light, regular, or heavy (default: regular)'
				),
			prompt: z
				.string()
				.optional()
				.describe('Custom prompt for specific scoping adjustments'),
			file: z
				.string()
				.optional()
				.describe('Path to the tasks file (default: tasks/tasks.json)'),
			projectRoot: z
				.string()
				.describe('The directory of the project. Must be an absolute path.'),
			tag: z.string().optional().describe('Tag context to operate on'),
			research: z
				.boolean()
				.optional()
				.describe('Whether to use research capabilities for scoping')
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				log.info(`Starting scope-up with args: ${JSON.stringify(args)}`);

				const resolvedTag = resolveTag({
					projectRoot: args.projectRoot,
					tag: args.tag
				});

				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
				let tasksJsonPath;
				try {
					tasksJsonPath = findTasksPath(
						{ projectRoot: args.projectRoot, file: args.file },
						log
					);
				} catch (error) {
					log.error(`Error finding tasks.json: ${error.message}`);
					return createErrorResponse(
						`Failed to find tasks.json: ${error.message}`
					);
				}

				// Call the direct function
				const result = await scopeUpDirect(
					{
						tasksJsonPath: tasksJsonPath,
						id: args.id,
						strength: args.strength,
						prompt: args.prompt,
						research: args.research,
						projectRoot: args.projectRoot,
						tag: resolvedTag
					},
					log,
					{ session }
				);

				return handleApiResult(
					result,
					log,
					'Error scoping up task',
					undefined,
					args.projectRoot
				);
			} catch (error) {
				log.error(`Error in scope-up tool: ${error.message}`);
				return createErrorResponse(error.message);
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/mcp-server/src/custom-sdk/message-converter.js:
--------------------------------------------------------------------------------

```javascript
/**
 * src/ai-providers/custom-sdk/mcp/message-converter.js
 *
 * Message conversion utilities for converting between AI SDK prompt format
 * and MCP sampling format.
 */

/**
 * Convert AI SDK prompt format to MCP sampling format
 * @param {Array} prompt - AI SDK prompt array
 * @returns {object} MCP format with messages and systemPrompt
 */
export function convertToMCPFormat(prompt) {
	const messages = [];
	let systemPrompt = '';

	for (const message of prompt) {
		if (message.role === 'system') {
			// Extract system prompt
			systemPrompt = extractTextContent(message.content);
		} else if (message.role === 'user' || message.role === 'assistant') {
			// Convert user/assistant messages
			messages.push({
				role: message.role,
				content: {
					type: 'text',
					text: extractTextContent(message.content)
				}
			});
		}
	}

	return {
		messages,
		systemPrompt
	};
}

/**
 * Convert MCP response format to AI SDK format
 * @param {object} response - MCP sampling response
 * @returns {object} AI SDK compatible result
 */
export function convertFromMCPFormat(response) {
	// Handle different possible response formats
	let text = '';
	let usage = null;
	let finishReason = 'stop';
	let warnings = [];

	if (typeof response === 'string') {
		text = response;
	} else if (response.content) {
		text = extractTextContent(response.content);
		usage = response.usage;
		finishReason = response.finishReason || 'stop';
	} else if (response.text) {
		text = response.text;
		usage = response.usage;
		finishReason = response.finishReason || 'stop';
	} else {
		// Fallback: try to extract text from response
		text = JSON.stringify(response);
		warnings.push('Unexpected MCP response format, used JSON fallback');
	}

	return {
		text,
		usage,
		finishReason,
		warnings
	};
}

/**
 * Extract text content from various content formats
 * @param {string|Array|object} content - Content in various formats
 * @returns {string} Extracted text
 */
function extractTextContent(content) {
	if (typeof content === 'string') {
		return content;
	}

	if (Array.isArray(content)) {
		// Handle array of content parts
		return content
			.map((part) => {
				if (typeof part === 'string') {
					return part;
				}
				if (part.type === 'text' && part.text) {
					return part.text;
				}
				if (part.text) {
					return part.text;
				}
				// Skip non-text content (images, etc.)
				return '';
			})
			.filter((text) => text.length > 0)
			.join(' ');
	}

	if (content && typeof content === 'object') {
		if (content.type === 'text' && content.text) {
			return content.text;
		}
		if (content.text) {
			return content.text;
		}
	}

	// Fallback
	return String(content || '');
}

```

--------------------------------------------------------------------------------
/src/ai-providers/grok-cli.js:
--------------------------------------------------------------------------------

```javascript
/**
 * grok-cli.js
 * AI provider implementation for Grok models using Grok CLI.
 */

import { createGrokCli } from '@tm/ai-sdk-provider-grok-cli';
import { BaseAIProvider } from './base-provider.js';
import { getGrokCliSettingsForCommand } from '../../scripts/modules/config-manager.js';

export class GrokCliProvider extends BaseAIProvider {
	constructor() {
		super();
		this.name = 'Grok CLI';
		// Grok CLI requires explicit JSON schema mode
		this.needsExplicitJsonSchema = true;
		// Grok CLI does not support temperature parameter
		this.supportsTemperature = false;
	}

	/**
	 * Returns the environment variable name required for this provider's API key.
	 * @returns {string} The environment variable name for the Grok API key
	 */
	getRequiredApiKeyName() {
		return 'GROK_CLI_API_KEY';
	}

	/**
	 * Override to indicate that API key is optional since Grok CLI can be configured separately
	 * @returns {boolean} False since Grok CLI can use its own config
	 */
	isRequiredApiKey() {
		return false; // Grok CLI can use its own config file
	}

	/**
	 * Override validateAuth to be more flexible with API key validation
	 * @param {object} params - Parameters to validate
	 */
	validateAuth(params) {
		// Grok CLI can work with:
		// 1. API key passed in params
		// 2. Environment variable GROK_CLI_API_KEY
		// 3. Grok CLI's own config file (~/.grok/user-settings.json)
		// So we don't enforce API key requirement here
		// Suppress unused parameter warning
		void params;
	}

	/**
	 * Creates and returns a Grok CLI client instance.
	 * @param {object} params - Parameters for client initialization
	 * @param {string} [params.apiKey] - Grok CLI API key (optional if configured in CLI)
	 * @param {string} [params.baseURL] - Optional custom API endpoint
	 * @param {string} [params.workingDirectory] - Working directory for CLI commands
	 * @param {number} [params.timeout] - Timeout for CLI commands in milliseconds
	 * @param {string} [params.commandName] - Name of the command invoking the service
	 * @returns {Function} Grok CLI client function
	 * @throws {Error} If initialization fails
	 */
	getClient(params) {
		try {
			const { apiKey, baseURL, workingDirectory, timeout, commandName } =
				params;

			// Get Grok CLI settings from config
			const grokCliSettings = getGrokCliSettingsForCommand(commandName);

			return createGrokCli({
				defaultSettings: {
					apiKey,
					baseURL,
					workingDirectory:
						workingDirectory || grokCliSettings.workingDirectory,
					timeout: timeout || grokCliSettings.timeout,
					defaultModel: grokCliSettings.defaultModel
				}
			});
		} catch (error) {
			this.handleError('client initialization', error);
		}
	}
}

```
Page 5/50FirstPrevNextLast