#
tokens: 49804/50000 101/975 files (page 3/50)
lines: off (toggle) GitHub
raw markdown copy
This is page 3 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

--------------------------------------------------------------------------------
/.github/scripts/release.mjs:
--------------------------------------------------------------------------------

```
#!/usr/bin/env node
import { existsSync, unlinkSync } from 'node:fs';
import { join, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { findRootDir, runCommand } from './utils.mjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const rootDir = findRootDir(__dirname);

console.log('🚀 Starting release process...');

// Double-check we're not in pre-release mode (safety net)
const preJsonPath = join(rootDir, '.changeset', 'pre.json');
if (existsSync(preJsonPath)) {
	console.log('⚠️  Warning: pre.json still exists. Removing it...');
	unlinkSync(preJsonPath);
}

// Check if the extension version has changed and tag it
// This prevents changeset from trying to publish the private package
runCommand('node', [join(__dirname, 'tag-extension.mjs')]);

// Run changeset publish for npm packages
runCommand('npx', ['changeset', 'publish']);

console.log('✅ Release process completed!');

// The extension tag (if created) will trigger the extension-release workflow

```

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

```typescript
/**
 * @fileoverview Configuration module exports
 * Exports the main ConfigManager and all configuration services
 */

// Export the main ConfigManager
export { ConfigManager } from './managers/config-manager.js';

// Export all configuration services for advanced usage
export {
	ConfigLoader,
	ConfigMerger,
	CONFIG_PRECEDENCE,
	RuntimeStateManager,
	ConfigPersistence,
	EnvironmentConfigProvider,
	type ConfigSource,
	type RuntimeState,
	type PersistenceOptions
} from './services/index.js';

// Re-export configuration interfaces
export type {
	IConfiguration,
	PartialConfiguration,
	ModelConfig,
	ProviderConfig,
	TaskSettings,
	TagSettings,
	WorkflowSettings,
	StorageSettings,
	RetrySettings,
	LoggingSettings,
	SecuritySettings,
	ConfigValidationResult,
	EnvironmentConfig,
	ConfigSchema,
	ConfigProperty,
	IConfigurationFactory,
	IConfigurationManager
} from '../../common/interfaces/configuration.interface.js';

// Re-export default values
export { DEFAULT_CONFIG_VALUES } from '../../common/interfaces/configuration.interface.js';

```

--------------------------------------------------------------------------------
/src/ai-providers/index.js:
--------------------------------------------------------------------------------

```javascript
/**
 * src/ai-providers/index.js
 * Central export point for all AI provider classes
 */

export { AnthropicAIProvider } from './anthropic.js';
export { PerplexityAIProvider } from './perplexity.js';
export { GoogleAIProvider } from './google.js';
export { OpenAIProvider } from './openai.js';
export { XAIProvider } from './xai.js';
export { GroqProvider } from './groq.js';
export { OpenRouterAIProvider } from './openrouter.js';
export { OllamaAIProvider } from './ollama.js';
export { BedrockAIProvider } from './bedrock.js';
export { AzureProvider } from './azure.js';
export { VertexAIProvider } from './google-vertex.js';
export { ClaudeCodeProvider } from './claude-code.js';
export { GeminiCliProvider } from './gemini-cli.js';
export { GrokCliProvider } from './grok-cli.js';
export { CodexCliProvider } from './codex-cli.js';
export { OpenAICompatibleProvider } from './openai-compatible.js';
export { ZAIProvider } from './zai.js';
export { ZAICodingProvider } from './zai-coding.js';
export { LMStudioProvider } from './lmstudio.js';

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/expand-task.md:
--------------------------------------------------------------------------------

```markdown
Break down a complex task into subtasks.

Arguments: $ARGUMENTS (task ID)

## Intelligent Task Expansion

Analyzes a task and creates detailed subtasks for better manageability.

## Execution

```bash
task-master expand --id=$ARGUMENTS
```

## Expansion Process

1. **Task Analysis**
   - Review task complexity
   - Identify components
   - Detect technical challenges
   - Estimate time requirements

2. **Subtask Generation**
   - Create 3-7 subtasks typically
   - Each subtask 1-4 hours
   - Logical implementation order
   - Clear acceptance criteria

3. **Smart Breakdown**
   - Setup/configuration tasks
   - Core implementation
   - Testing components
   - Integration steps
   - Documentation updates

## Enhanced Features

Based on task type:
- **Feature**: Setup → Implement → Test → Integrate
- **Bug Fix**: Reproduce → Diagnose → Fix → Verify
- **Refactor**: Analyze → Plan → Refactor → Validate

## Post-Expansion

After expansion:
1. Show subtask hierarchy
2. Update time estimates
3. Suggest implementation order
4. Highlight critical path
```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/parse-prd.md:
--------------------------------------------------------------------------------

```markdown
Parse a PRD document to generate tasks.

Arguments: $ARGUMENTS (PRD file path)

## Intelligent PRD Parsing

Analyzes your requirements document and generates a complete task breakdown.

## Execution

```bash
task-master parse-prd --input=$ARGUMENTS
```

## Parsing Process

1. **Document Analysis**
   - Extract key requirements
   - Identify technical components
   - Detect dependencies
   - Estimate complexity

2. **Task Generation**
   - Create 10-15 tasks by default
   - Include implementation tasks
   - Add testing tasks
   - Include documentation tasks
   - Set logical dependencies

3. **Smart Enhancements**
   - Group related functionality
   - Set appropriate priorities
   - Add acceptance criteria
   - Include test strategies

## Options

Parse arguments for modifiers:
- Number after filename → `--num-tasks`
- `research` → Use research mode
- `comprehensive` → Generate more tasks

## Post-Generation

After parsing:
1. Display task summary
2. Show dependency graph
3. Suggest task expansion for complex items
4. Recommend sprint planning
```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/parse-prd-with-research.md:
--------------------------------------------------------------------------------

```markdown
Parse PRD with enhanced research mode for better task generation.

Arguments: $ARGUMENTS (PRD file path)

## Research-Enhanced Parsing

Uses the research AI provider (typically Perplexity) for more comprehensive task generation with current best practices.

## Execution

```bash
task-master parse-prd --input=$ARGUMENTS --research
```

## Research Benefits

1. **Current Best Practices**
   - Latest framework patterns
   - Security considerations
   - Performance optimizations
   - Accessibility requirements

2. **Technical Deep Dive**
   - Implementation approaches
   - Library recommendations
   - Architecture patterns
   - Testing strategies

3. **Comprehensive Coverage**
   - Edge cases consideration
   - Error handling tasks
   - Monitoring setup
   - Deployment tasks

## Enhanced Output

Research mode typically:
- Generates more detailed tasks
- Includes industry standards
- Adds compliance considerations
- Suggests modern tooling

## When to Use

- New technology domains
- Complex requirements
- Regulatory compliance needed
- Best practices crucial
```

--------------------------------------------------------------------------------
/apps/extension/src/webview/hooks/useWebviewHeight.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Hook for managing webview height
 */

import { useState, useEffect, useCallback } from 'react';

export const useWebviewHeight = () => {
	const [availableHeight, setAvailableHeight] = useState<number>(
		window.innerHeight
	);

	const updateAvailableHeight = useCallback(() => {
		const height = window.innerHeight;
		console.log('📏 Available height updated:', height);
		setAvailableHeight(height);
	}, []);

	useEffect(() => {
		updateAvailableHeight();

		const handleResize = () => {
			updateAvailableHeight();
		};

		window.addEventListener('resize', handleResize);

		// Also listen for VS Code specific events if available
		const handleVisibilityChange = () => {
			// Small delay to ensure VS Code has finished resizing
			setTimeout(updateAvailableHeight, 100);
		};

		document.addEventListener('visibilitychange', handleVisibilityChange);

		return () => {
			window.removeEventListener('resize', handleResize);
			document.removeEventListener('visibilitychange', handleVisibilityChange);
		};
	}, [updateAvailableHeight]);

	return availableHeight;
};

```

--------------------------------------------------------------------------------
/.github/workflows/update-models-md.yml:
--------------------------------------------------------------------------------

```yaml
name: Update models.md from supported-models.json

on:
  push:
    branches:
      - main
      - next
    paths:
      - 'scripts/modules/supported-models.json'
      - 'docs/scripts/models-json-to-markdown.js'

jobs:
  update_markdown:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Run transformation script
        run: node docs/scripts/models-json-to-markdown.js

      - name: Format Markdown with Prettier
        run: npx prettier --write docs/models.md

      - name: Stage docs/models.md
        run: git add docs/models.md

      - name: Commit & Push docs/models.md
        uses: actions-js/push@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{ github.ref_name }}
          message: 'docs: Auto-update and format models.md'
          author_name: 'github-actions[bot]'
          author_email: 'github-actions[bot]@users.noreply.github.com'

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/setup-models.md:
--------------------------------------------------------------------------------

```markdown
Run interactive setup to configure AI models.

## Interactive Model Configuration

Guides you through setting up AI providers for Task Master.

## Execution

```bash
task-master models --setup
```

## Setup Process

1. **Environment Check**
   - Detect existing API keys
   - Show current configuration
   - Identify missing providers

2. **Provider Selection**
   - Choose main provider (required)
   - Select research provider (recommended)
   - Configure fallback (optional)

3. **API Key Configuration**
   - Prompt for missing keys
   - Validate key format
   - Test connectivity
   - Save configuration

## Smart Recommendations

Based on your needs:
- **For best results**: Claude + Perplexity
- **Budget conscious**: GPT-3.5 + Perplexity
- **Maximum capability**: GPT-4 + Perplexity + Claude fallback

## Configuration Storage

Keys can be stored in:
1. Environment variables (recommended)
2. `.env` file in project
3. Global `.taskmaster/config`

## Post-Setup

After configuration:
- Test each provider
- Show usage examples
- Suggest next steps
- Verify parse-prd works
```

--------------------------------------------------------------------------------
/src/prompts/schemas/variant.schema.json:
--------------------------------------------------------------------------------

```json
{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"$id": "https://github.com/eyaltoledano/claude-task-master/blob/main/src/prompts/schemas/variant.schema.json",
	"version": "1.0.0",
	"title": "Task Master Prompt Variant",
	"description": "Schema for prompt template variants",
	"type": "object",
	"required": ["system", "user"],
	"properties": {
		"system": {
			"type": "string",
			"minLength": 1,
			"description": "System prompt template with variable placeholders"
		},
		"user": {
			"type": "string",
			"minLength": 1,
			"description": "User prompt template with variable placeholders"
		},
		"condition": {
			"type": "string",
			"description": "JavaScript expression for variant selection (optional, only for non-default variants)"
		},
		"metadata": {
			"type": "object",
			"properties": {
				"description": {
					"type": "string",
					"description": "Description of when this variant should be used"
				},
				"tags": {
					"type": "array",
					"items": { "type": "string" },
					"description": "Tags for categorizing this variant"
				}
			}
		}
	}
}

```

--------------------------------------------------------------------------------
/apps/extension/src/webview/contexts/VSCodeContext.tsx:
--------------------------------------------------------------------------------

```typescript
/**
 * VS Code API Context
 * Provides access to VS Code API and webview state
 */

import React, { createContext, useContext } from 'react';
import type { AppState, AppAction, ToastNotification } from '../types';

export interface VSCodeContextValue {
	vscode?: ReturnType<NonNullable<typeof window.acquireVsCodeApi>>;
	state: AppState;
	dispatch: React.Dispatch<AppAction>;
	sendMessage: (message: any) => Promise<any>;
	availableHeight: number;
	// Toast notification functions
	showSuccessToast: (title: string, message: string, duration?: number) => void;
	showInfoToast: (title: string, message: string, duration?: number) => void;
	showWarningToast: (title: string, message: string, duration?: number) => void;
	showErrorToast: (title: string, message: string, duration?: number) => void;
}

export const VSCodeContext = createContext<VSCodeContextValue | undefined>(
	undefined
);

export const useVSCodeContext = () => {
	const context = useContext(VSCodeContext);
	if (!context) {
		throw new Error('useVSCodeContext must be used within VSCodeProvider');
	}
	return context;
};

```

--------------------------------------------------------------------------------
/src/ai-providers/xai.js:
--------------------------------------------------------------------------------

```javascript
/**
 * xai.js
 * AI provider implementation for xAI models using Vercel AI SDK.
 */

import { createXai } from '@ai-sdk/xai';
import { BaseAIProvider } from './base-provider.js';

export class XAIProvider extends BaseAIProvider {
	constructor() {
		super();
		this.name = 'xAI';
	}

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

	/**
	 * Creates and returns an xAI client instance.
	 * @param {object} params - Parameters for client initialization
	 * @param {string} params.apiKey - xAI API key
	 * @param {string} [params.baseURL] - Optional custom API endpoint
	 * @returns {Function} xAI client function
	 * @throws {Error} If API key is missing or initialization fails
	 */
	getClient(params) {
		try {
			const { apiKey, baseURL } = params;

			return createXai({
				apiKey,
				baseURL: baseURL || 'https://api.x.ai/v1'
			});
		} catch (error) {
			this.handleError('client initialization', error);
		}
	}
}

```

--------------------------------------------------------------------------------
/packages/tm-core/src/common/logger/factory.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Logger factory and singleton management
 */

import { Logger, type LoggerConfig } from './logger.js';

// Global logger instance
let globalLogger: Logger | null = null;

// Named logger instances
const loggers = new Map<string, Logger>();

/**
 * Create a new logger instance
 */
export function createLogger(config?: LoggerConfig): Logger {
	return new Logger(config);
}

/**
 * Get or create a named logger instance
 */
export function getLogger(name?: string, config?: LoggerConfig): Logger {
	// If no name provided, return global logger
	if (!name) {
		if (!globalLogger) {
			globalLogger = createLogger(config);
		}
		return globalLogger;
	}

	// Check if named logger exists
	if (!loggers.has(name)) {
		loggers.set(
			name,
			createLogger({
				prefix: name,
				...config
			})
		);
	}

	return loggers.get(name)!;
}

/**
 * Set the global logger instance
 */
export function setGlobalLogger(logger: Logger): void {
	globalLogger = logger;
}

/**
 * Clear all logger instances (useful for testing)
 */
export function clearLoggers(): void {
	globalLogger = null;
	loggers.clear();
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/to-cancelled.md:
--------------------------------------------------------------------------------

```markdown
Cancel a task permanently.

Arguments: $ARGUMENTS (task ID)

## Cancelling a Task

This status indicates a task is no longer needed and won't be completed.

## Valid Reasons for Cancellation

- Requirements changed
- Feature deprecated
- Duplicate of another task
- Strategic pivot
- Technical approach invalidated

## Pre-Cancellation Checks

1. Confirm no critical dependencies
2. Check for partial implementation
3. Verify cancellation rationale
4. Document lessons learned

## Execution

```bash
task-master set-status --id=$ARGUMENTS --status=cancelled
```

## Cancellation Impact

When cancelling:
1. **Dependency Updates**
   - Notify dependent tasks
   - Update project scope
   - Recalculate timelines

2. **Clean-up Actions**
   - Remove related branches
   - Archive any work done
   - Update documentation
   - Close related issues

3. **Learning Capture**
   - Document why cancelled
   - Note what was learned
   - Update estimation models
   - Prevent future duplicates

## Historical Preservation

- Keep for reference
- Tag with cancellation reason
- Link to replacement if any
- Maintain audit trail
```

--------------------------------------------------------------------------------
/src/ai-providers/groq.js:
--------------------------------------------------------------------------------

```javascript
/**
 * src/ai-providers/groq.js
 *
 * Implementation for interacting with Groq models
 * using the Vercel AI SDK.
 */

import { createGroq } from '@ai-sdk/groq';
import { BaseAIProvider } from './base-provider.js';

export class GroqProvider extends BaseAIProvider {
	constructor() {
		super();
		this.name = 'Groq';
	}

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

	/**
	 * Creates and returns a Groq client instance.
	 * @param {object} params - Parameters for client initialization
	 * @param {string} params.apiKey - Groq API key
	 * @param {string} [params.baseURL] - Optional custom API endpoint
	 * @returns {Function} Groq client function
	 * @throws {Error} If API key is missing or initialization fails
	 */
	getClient(params) {
		try {
			const { apiKey, baseURL } = params;

			return createGroq({
				apiKey,
				...(baseURL && { baseURL })
			});
		} catch (error) {
			this.handleError('client initialization', error);
		}
	}
}

```

--------------------------------------------------------------------------------
/biome.json:
--------------------------------------------------------------------------------

```json
{
	"files": {
		"ignore": [
			"build",
			"coverage",
			".changeset",
			"tasks",
			"package-lock.json",
			"tests/fixture/*.json",
			"dist"
		]
	},
	"formatter": {
		"bracketSpacing": true,
		"enabled": true,
		"indentStyle": "tab",
		"lineWidth": 80
	},
	"javascript": {
		"formatter": {
			"arrowParentheses": "always",
			"quoteStyle": "single",
			"trailingCommas": "none"
		}
	},
	"linter": {
		"enabled": true,
		"include": ["apps/extension/**/*.ts", "apps/extension/**/*.tsx"],
		"ignore": ["**/*", "!apps/extension/**/*"],
		"rules": {
			"recommended": true,
			"complexity": {
				"noForEach": "off",
				"useOptionalChain": "off",
				"useArrowFunction": "off"
			},
			"correctness": {
				"noConstantCondition": "off",
				"noUnreachable": "off"
			},
			"suspicious": {
				"noDuplicateTestHooks": "off",
				"noPrototypeBuiltins": "off"
			},
			"style": {
				"noUselessElse": "off",
				"useNodejsImportProtocol": "off",
				"useNumberNamespace": "off",
				"noParameterAssign": "off",
				"useTemplate": "off",
				"noUnusedTemplateLiteral": "off",
				"noNonNullAssertion": "warn"
			}
		}
	}
}

```

--------------------------------------------------------------------------------
/src/schemas/registry.js:
--------------------------------------------------------------------------------

```javascript
import { AddTaskResponseSchema } from './add-task.js';
import { ComplexityAnalysisResponseSchema } from './analyze-complexity.js';
import { ExpandTaskResponseSchema } from './expand-task.js';
import { ParsePRDResponseSchema } from './parse-prd.js';
import { UpdateSubtaskResponseSchema } from './update-subtask.js';
import { UpdateTaskResponseSchema } from './update-task.js';
import { UpdateTasksResponseSchema } from './update-tasks.js';

export const COMMAND_SCHEMAS = {
	'update-tasks': UpdateTasksResponseSchema,
	'expand-task': ExpandTaskResponseSchema,
	'analyze-complexity': ComplexityAnalysisResponseSchema,
	'update-subtask-by-id': UpdateSubtaskResponseSchema,
	'update-task-by-id': UpdateTaskResponseSchema,
	'add-task': AddTaskResponseSchema,
	'parse-prd': ParsePRDResponseSchema
};

// Export individual schemas for direct access
export * from './update-tasks.js';
export * from './expand-task.js';
export * from './analyze-complexity.js';
export * from './update-subtask.js';
export * from './update-task.js';
export * from './add-task.js';
export * from './parse-prd.js';
export * from './base-schemas.js';

```

--------------------------------------------------------------------------------
/packages/tm-bridge/src/index.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @tm/bridge - Temporary bridge package for legacy code migration
 *
 * ⚠️ THIS PACKAGE IS TEMPORARY AND WILL BE DELETED ⚠️
 *
 * This package exists solely to provide shared bridge logic between
 * legacy scripts and the new tm-core architecture during migration.
 *
 * DELETE THIS PACKAGE when legacy scripts are removed.
 */

// Shared types and utilities
export type {
	LogLevel,
	ReportFunction,
	OutputFormat,
	BaseBridgeParams,
	StorageCheckResult
} from './bridge-types.js';

export { checkStorageType } from './bridge-utils.js';

// Bridge functions
export {
	tryUpdateViaRemote,
	type UpdateBridgeParams,
	type RemoteUpdateResult
} from './update-bridge.js';

export {
	tryExpandViaRemote,
	type ExpandBridgeParams,
	type RemoteExpandResult
} from './expand-bridge.js';

export {
	tryListTagsViaRemote,
	type TagsBridgeParams,
	type RemoteTagsResult,
	type TagInfo
} from './tags-bridge.js';

export {
	tryUseTagViaRemote,
	type UseTagBridgeParams,
	type RemoteUseTagResult
} from './use-tag-bridge.js';

export {
	tryAddTagViaRemote,
	type AddTagBridgeParams,
	type RemoteAddTagResult
} from './add-tag-bridge.js';

```

--------------------------------------------------------------------------------
/.github/workflows/claude.yml:
--------------------------------------------------------------------------------

```yaml
name: Claude Code

on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
  issues:
    types: [opened, assigned]
  pull_request_review:
    types: [submitted]

jobs:
  claude:
    if: |
      (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
      (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
      (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
      (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: read
      issues: read
      id-token: write
    steps:
      - name: Checkout repository
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
        with:
          fetch-depth: 1

      - name: Run Claude Code
        id: claude
        uses: anthropics/claude-code-action@beta
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

```

--------------------------------------------------------------------------------
/packages/tm-bridge/src/bridge-types.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Shared types and interfaces for bridge functions
 */

/**
 * Log levels used by bridge report functions
 */
export type LogLevel = 'info' | 'warn' | 'error' | 'debug' | 'success';

/**
 * Report function signature used by all bridges
 */
export type ReportFunction = (level: LogLevel, ...args: unknown[]) => void;

/**
 * Output format for bridge results
 */
export type OutputFormat = 'text' | 'json';

/**
 * Common parameters shared by all bridge functions
 */
export interface BaseBridgeParams {
	/** Project root directory */
	projectRoot: string;
	/** Whether called from MCP context (default: false) */
	isMCP?: boolean;
	/** Output format (default: 'text') */
	outputFormat?: OutputFormat;
	/** Logging function */
	report: ReportFunction;
	/** Optional tag for task organization */
	tag?: string;
}

/**
 * Result from checking if API storage should handle an operation
 */
export interface StorageCheckResult {
	/** Whether API storage is being used */
	isApiStorage: boolean;
	/** TmCore instance if initialization succeeded */
	tmCore?: import('@tm/core').TmCore;
	/** Error message if initialization failed */
	error?: string;
}

```

--------------------------------------------------------------------------------
/src/constants/task-priority.js:
--------------------------------------------------------------------------------

```javascript
/**
 * @typedef {'high' | 'medium' | 'low'} TaskPriority
 */

/**
 * Task priority options
 * @type {TaskPriority[]}
 * @description Defines possible task priorities:
 * - high: Critical tasks that need immediate attention
 * - medium: Standard priority tasks (default)
 * - low: Tasks that can be deferred or are nice-to-have
 */
export const TASK_PRIORITY_OPTIONS = ['high', 'medium', 'low'];

/**
 * Default task priority
 * @type {TaskPriority}
 */
export const DEFAULT_TASK_PRIORITY = 'medium';

/**
 * Check if a given priority is valid
 * @param {string} priority - The priority to check
 * @returns {boolean} True if the priority is valid, false otherwise
 */
export function isValidTaskPriority(priority) {
	return TASK_PRIORITY_OPTIONS.includes(priority?.toLowerCase());
}

/**
 * Normalize a priority value to lowercase
 * @param {string} priority - The priority to normalize
 * @returns {TaskPriority|null} The normalized priority or null if invalid
 */
export function normalizeTaskPriority(priority) {
	if (!priority) return null;
	const normalized = priority.toLowerCase();
	return isValidTaskPriority(normalized) ? normalized : null;
}

```

--------------------------------------------------------------------------------
/apps/mcp/package.json:
--------------------------------------------------------------------------------

```json
{
	"name": "@tm/mcp",
	"description": "Task Master MCP Tools - TypeScript MCP server tools for AI agent integration",
	"type": "module",
	"private": true,
	"main": "./dist/index.js",
	"types": "./src/index.ts",
	"exports": {
		".": "./src/index.ts",
		"./tools/autopilot": "./src/tools/autopilot/index.ts"
	},
	"files": ["dist", "README.md"],
	"scripts": {
		"typecheck": "tsc --noEmit",
		"lint": "biome check src",
		"format": "biome format --write src",
		"test": "vitest run",
		"test:watch": "vitest",
		"test:coverage": "vitest run --coverage",
		"test:unit": "vitest run -t unit",
		"test:integration": "vitest run -t integration",
		"test:ci": "vitest run --coverage --reporter=dot"
	},
	"dependencies": {
		"@tm/core": "*",
		"zod": "^4.1.11",
		"fastmcp": "^3.23.0"
	},
	"devDependencies": {
		"@biomejs/biome": "^1.9.4",
		"@types/node": "^22.10.5",
		"typescript": "^5.9.2",
		"vitest": "^3.2.4"
	},
	"engines": {
		"node": ">=18.0.0"
	},
	"keywords": [
		"task-master",
		"mcp",
		"mcp-server",
		"ai-agent",
		"workflow",
		"tdd"
	],
	"author": "",
	"license": "MIT",
	"typesVersions": {
		"*": {
			"*": ["src/*"]
		}
	},
	"version": ""
}

```

--------------------------------------------------------------------------------
/scripts/modules/task-manager/task-exists.js:
--------------------------------------------------------------------------------

```javascript
/**
 * Checks if a task with the given ID exists
 * @param {Array} tasks - Array of tasks to search
 * @param {string|number} taskId - ID of task or subtask to check
 * @returns {boolean} Whether the task exists
 */
function taskExists(tasks, taskId) {
	// Handle subtask IDs (e.g., "1.2")
	if (typeof taskId === 'string' && taskId.includes('.')) {
		const parts = taskId.split('.');
		// Validate that it's a proper subtask format (parentId.subtaskId)
		if (parts.length !== 2 || !parts[0] || !parts[1]) {
			// Invalid format - treat as regular task ID
			const id = parseInt(taskId, 10);
			return tasks.some((t) => t.id === id);
		}

		const [parentIdStr, subtaskIdStr] = parts;
		const parentId = parseInt(parentIdStr, 10);
		const subtaskId = parseInt(subtaskIdStr, 10);

		// Find the parent task
		const parentTask = tasks.find((t) => t.id === parentId);

		// If parent exists, check if subtask exists
		return (
			parentTask &&
			parentTask.subtasks &&
			parentTask.subtasks.some((st) => st.id === subtaskId)
		);
	}

	// Handle regular task IDs
	const id = parseInt(taskId, 10);
	return tasks.some((t) => t.id === id);
}

export default taskExists;

```

--------------------------------------------------------------------------------
/src/ai-providers/openrouter.js:
--------------------------------------------------------------------------------

```javascript
/**
 * openrouter.js
 * AI provider implementation for OpenRouter models using Vercel AI SDK.
 */

import { createOpenRouter } from '@openrouter/ai-sdk-provider';
import { BaseAIProvider } from './base-provider.js';

export class OpenRouterAIProvider extends BaseAIProvider {
	constructor() {
		super();
		this.name = 'OpenRouter';
	}

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

	/**
	 * Creates and returns an OpenRouter client instance.
	 * @param {object} params - Parameters for client initialization
	 * @param {string} params.apiKey - OpenRouter API key
	 * @param {string} [params.baseURL] - Optional custom API endpoint
	 * @returns {Function} OpenRouter client function
	 * @throws {Error} If API key is missing or initialization fails
	 */
	getClient(params) {
		try {
			const { apiKey, baseURL } = params;

			return createOpenRouter({
				apiKey,
				...(baseURL && { baseURL })
			});
		} catch (error) {
			this.handleError('client initialization', error);
		}
	}
}

```

--------------------------------------------------------------------------------
/src/ai-providers/openai.js:
--------------------------------------------------------------------------------

```javascript
/**
 * openai.js
 * AI provider implementation for OpenAI models using Vercel AI SDK.
 */

import { createOpenAI } from '@ai-sdk/openai';
import { BaseAIProvider } from './base-provider.js';

export class OpenAIProvider extends BaseAIProvider {
	constructor() {
		super();
		this.name = 'OpenAI';
	}

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

	/**
	 * Creates and returns an OpenAI client instance.
	 * @param {object} params - Parameters for client initialization
	 * @param {string} params.apiKey - OpenAI API key
	 * @param {string} [params.baseURL] - Optional custom API endpoint
	 * @returns {Function} OpenAI client function
	 * @throws {Error} If initialization fails
	 */
	getClient(params) {
		try {
			const { apiKey, baseURL } = params;
			const fetchImpl = this.createProxyFetch();

			return createOpenAI({
				apiKey,
				...(baseURL && { baseURL }),
				...(fetchImpl && { fetch: fetchImpl })
			});
		} catch (error) {
			this.handleError('client initialization', error);
		}
	}
}

```

--------------------------------------------------------------------------------
/scripts/modules/task-manager/is-task-dependent.js:
--------------------------------------------------------------------------------

```javascript
/**
 * Check if a task is dependent on another task (directly or indirectly)
 * Used to prevent circular dependencies
 * @param {Array} allTasks - Array of all tasks
 * @param {Object} task - The task to check
 * @param {number} targetTaskId - The task ID to check dependency against
 * @returns {boolean} Whether the task depends on the target task
 */
function isTaskDependentOn(allTasks, task, targetTaskId) {
	// If the task is a subtask, check if its parent is the target
	if (task.parentTaskId === targetTaskId) {
		return true;
	}

	// Check direct dependencies
	if (task.dependencies && task.dependencies.includes(targetTaskId)) {
		return true;
	}

	// Check dependencies of dependencies (recursive)
	if (task.dependencies) {
		for (const depId of task.dependencies) {
			const depTask = allTasks.find((t) => t.id === depId);
			if (depTask && isTaskDependentOn(allTasks, depTask, targetTaskId)) {
				return true;
			}
		}
	}

	// Check subtasks for dependencies
	if (task.subtasks) {
		for (const subtask of task.subtasks) {
			if (isTaskDependentOn(allTasks, subtask, targetTaskId)) {
				return true;
			}
		}
	}

	return false;
}

export default isTaskDependentOn;

```

--------------------------------------------------------------------------------
/apps/cli/src/utils/display-helpers.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Display helper utilities for commands
 * Provides DRY utilities for displaying headers and other command output
 */

import type { TmCore } from '@tm/core';
import type { StorageType } from '@tm/core';
import { displayHeader } from '../ui/index.js';

/**
 * Display the command header with appropriate storage information
 * Handles both API and file storage displays
 */
export function displayCommandHeader(
	tmCore: TmCore | undefined,
	options: {
		tag?: string;
		storageType: Exclude<StorageType, 'auto'>;
	}
): void {
	if (!tmCore) {
		// Fallback display if tmCore is not available
		displayHeader({
			tag: options.tag || 'master',
			storageType: options.storageType
		});
		return;
	}

	// Get the resolved storage type from tasks domain
	const resolvedStorageType = tmCore.tasks.getStorageType();

	// Get storage display info from tm-core (single source of truth)
	const displayInfo = tmCore.auth.getStorageDisplayInfo(resolvedStorageType);

	// Display header with computed display info
	displayHeader({
		tag: options.tag || 'master',
		filePath: displayInfo.filePath,
		storageType: displayInfo.storageType,
		briefInfo: displayInfo.briefInfo
	});
}

```

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

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

// Simulate different version scenarios
console.log('=== Simulating version check ===\n');

// 1. Current version is older than latest (should show update notice)
console.log('Scenario 1: Current version older than latest');
displayUpgradeNotification('0.9.30', '1.0.0');

// 2. Current version same as latest (no update needed)
console.log(
	'\nScenario 2: Current version same as latest (this would not normally show a notice)'
);
console.log('Current: 1.0.0, Latest: 1.0.0');
console.log('compareVersions result:', compareVersions('1.0.0', '1.0.0'));
console.log(
	'Update needed:',
	compareVersions('1.0.0', '1.0.0') < 0 ? 'Yes' : 'No'
);

// 3. Current version newer than latest (e.g., development version, would not show notice)
console.log(
	'\nScenario 3: Current version newer than latest (this would not normally show a notice)'
);
console.log('Current: 1.1.0, Latest: 1.0.0');
console.log('compareVersions result:', compareVersions('1.1.0', '1.0.0'));
console.log(
	'Update needed:',
	compareVersions('1.1.0', '1.0.0') < 0 ? 'Yes' : 'No'
);

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

```

--------------------------------------------------------------------------------
/packages/tm-core/src/modules/tasks/parser/index.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Task parsing functionality for the tm-core package
 * This file exports all parsing-related classes and functions
 */

import type { PlaceholderTask } from '../../../common/types/index.js';

// Parser implementations will be defined here
// export * from './prd-parser.js';
// export * from './task-parser.js';
// export * from './markdown-parser.js';

// Placeholder exports - these will be implemented in later tasks
export interface TaskParser {
	parse(content: string): Promise<PlaceholderTask[]>;
	validate(content: string): Promise<boolean>;
}

/**
 * @deprecated This is a placeholder class that will be properly implemented in later tasks
 */
export class PlaceholderParser implements TaskParser {
	async parse(content: string): Promise<PlaceholderTask[]> {
		// Simple placeholder parsing logic
		const lines = content
			.split('\n')
			.filter((line) => line.trim().startsWith('-'));
		return lines.map((line, index) => ({
			id: `task-${index + 1}`,
			title: line.trim().replace(/^-\s*/, ''),
			status: 'pending' as const,
			priority: 'medium' as const
		}));
	}

	async validate(content: string): Promise<boolean> {
		return content.trim().length > 0;
	}
}

```

--------------------------------------------------------------------------------
/packages/tm-core/src/common/utils/path-helpers.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Path construction utilities for Task Master
 * Provides standardized paths for Task Master project structure
 */

import { join, resolve } from 'node:path';
import { TASKMASTER_TASKS_FILE } from '../constants/paths.js';
import { findProjectRoot } from './project-root-finder.js';

/**
 * Get standard Task Master project paths
 * Automatically detects project root using smart detection
 *
 * @param projectPath - Optional explicit project path (if not provided, auto-detects)
 * @returns Object with projectRoot and tasksPath
 *
 * @example
 * ```typescript
 * // Auto-detect project root
 * const { projectRoot, tasksPath } = getProjectPaths();
 *
 * // Or specify explicit path
 * const { projectRoot, tasksPath } = getProjectPaths('./my-project');
 * // projectRoot: '/absolute/path/to/my-project'
 * // tasksPath: '/absolute/path/to/my-project/.taskmaster/tasks/tasks.json'
 * ```
 */
export function getProjectPaths(projectPath?: string): {
	projectRoot: string;
	tasksPath: string;
} {
	const projectRoot = projectPath
		? resolve(process.cwd(), projectPath)
		: findProjectRoot();

	return {
		projectRoot,
		tasksPath: join(projectRoot, TASKMASTER_TASKS_FILE)
	};
}

```

--------------------------------------------------------------------------------
/scripts/modules/bridge-utils.js:
--------------------------------------------------------------------------------

```javascript
import { isSilentMode, log as consoleLog } from './utils.js';
import { getDebugFlag } from './config-manager.js';

/**
 * Create a unified logger and report function for bridge operations
 * Handles both MCP and CLI contexts consistently
 *
 * @param {Object} mcpLog - Optional MCP logger object
 * @param {Object} [session] - Optional session object for debug flag checking
 * @returns {Object} Object containing logger, report function, and isMCP flag
 */
export function createBridgeLogger(mcpLog, session) {
	const isMCP = !!mcpLog;

	// Create logger that works in both contexts
	const logger = mcpLog || {
		info: (msg) => !isSilentMode() && consoleLog('info', msg),
		warn: (msg) => !isSilentMode() && consoleLog('warn', msg),
		error: (msg) => !isSilentMode() && consoleLog('error', msg),
		debug: (msg) =>
			!isSilentMode() && getDebugFlag(session) && consoleLog('debug', msg)
	};

	// Create report function compatible with bridge
	const report = (level, ...args) => {
		if (isMCP) {
			if (typeof logger[level] === 'function') logger[level](...args);
			else logger.info(...args);
		} else if (!isSilentMode()) {
			consoleLog(level, ...args);
		}
	};

	return { logger, report, isMCP };
}

```

--------------------------------------------------------------------------------
/src/ai-providers/google.js:
--------------------------------------------------------------------------------

```javascript
/**
 * google.js
 * AI provider implementation for Google AI models using Vercel AI SDK.
 */

import { createGoogleGenerativeAI } from '@ai-sdk/google';
import { BaseAIProvider } from './base-provider.js';

export class GoogleAIProvider extends BaseAIProvider {
	constructor() {
		super();
		this.name = 'Google';
	}

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

	/**
	 * Creates and returns a Google AI client instance.
	 * @param {object} params - Parameters for client initialization
	 * @param {string} params.apiKey - Google API key
	 * @param {string} [params.baseURL] - Optional custom API endpoint
	 * @returns {Function} Google AI client function
	 * @throws {Error} If initialization fails
	 */
	getClient(params) {
		try {
			const { apiKey, baseURL } = params;
			const fetchImpl = this.createProxyFetch();

			return createGoogleGenerativeAI({
				apiKey,
				...(baseURL && { baseURL }),
				...(fetchImpl && { fetch: fetchImpl })
			});
		} catch (error) {
			this.handleError('client initialization', error);
		}
	}
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/add-dependency.md:
--------------------------------------------------------------------------------

```markdown
Add a dependency between tasks.

Arguments: $ARGUMENTS

Parse the task IDs to establish dependency relationship.

## Adding Dependencies

Creates a dependency where one task must be completed before another can start.

## Argument Parsing

Parse natural language or IDs:
- "make 5 depend on 3" → task 5 depends on task 3
- "5 needs 3" → task 5 depends on task 3
- "5 3" → task 5 depends on task 3
- "5 after 3" → task 5 depends on task 3

## Execution

```bash
task-master add-dependency --id=<task-id> --depends-on=<dependency-id>
```

## Validation

Before adding:
1. **Verify both tasks exist**
2. **Check for circular dependencies**
3. **Ensure dependency makes logical sense**
4. **Warn if creating complex chains**

## Smart Features

- Detect if dependency already exists
- Suggest related dependencies
- Show impact on task flow
- Update task priorities if needed

## Post-Addition

After adding dependency:
1. Show updated dependency graph
2. Identify any newly blocked tasks
3. Suggest task order changes
4. Update project timeline

## Example Flows

```
/taskmaster:add-dependency 5 needs 3
→ Task #5 now depends on Task #3
→ Task #5 is now blocked until #3 completes
→ Suggested: Also consider if #5 needs #4
```
```

--------------------------------------------------------------------------------
/packages/tm-core/src/common/constants/providers.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Provider validation constants
 * Defines which providers should be validated against the supported-models.json file
 */

// Providers that have predefined model lists and should be validated
export const VALIDATED_PROVIDERS = [
	'anthropic',
	'openai',
	'google',
	'zai',
	'zai-coding',
	'perplexity',
	'xai',
	'groq',
	'mistral'
] as const;

export type ValidatedProvider = (typeof VALIDATED_PROVIDERS)[number];

// Custom providers object for easy named access
export const CUSTOM_PROVIDERS = {
	AZURE: 'azure',
	VERTEX: 'vertex',
	BEDROCK: 'bedrock',
	OPENROUTER: 'openrouter',
	OLLAMA: 'ollama',
	LMSTUDIO: 'lmstudio',
	OPENAI_COMPATIBLE: 'openai-compatible',
	CLAUDE_CODE: 'claude-code',
	MCP: 'mcp',
	GEMINI_CLI: 'gemini-cli',
	GROK_CLI: 'grok-cli',
	CODEX_CLI: 'codex-cli'
} as const;

export type CustomProvider =
	(typeof CUSTOM_PROVIDERS)[keyof typeof CUSTOM_PROVIDERS];

// Custom providers array (for backward compatibility and iteration)
export const CUSTOM_PROVIDERS_ARRAY = Object.values(CUSTOM_PROVIDERS);

// All known providers (for reference)
export const ALL_PROVIDERS = [
	...VALIDATED_PROVIDERS,
	...CUSTOM_PROVIDERS_ARRAY
] as const;

export type Provider = ValidatedProvider | CustomProvider;

```

--------------------------------------------------------------------------------
/scripts/dev.js:
--------------------------------------------------------------------------------

```javascript
#!/usr/bin/env node

/**
 * dev.js
 * Task Master CLI - AI-driven development task management
 *
 * This is the refactored entry point that uses the modular architecture.
 * It imports functionality from the modules directory and provides a CLI.
 */

import { join } from 'node:path';
import { findProjectRoot } from '@tm/core';
import dotenv from 'dotenv';

// Store the original working directory
// This is needed for commands that take relative paths as arguments
const originalCwd = process.cwd();

// Find project root for .env loading
// We don't change the working directory to avoid breaking relative path logic
const projectRoot = findProjectRoot();

// Load .env from project root without changing cwd
dotenv.config({ path: join(projectRoot, '.env') });

// Make original cwd available to commands that need it
process.env.TASKMASTER_ORIGINAL_CWD = originalCwd;

// Add at the very beginning of the file
if (process.env.DEBUG === '1') {
	console.error('DEBUG - dev.js received args:', process.argv.slice(2));
}

// Use dynamic import to ensure dotenv.config() runs before module-level code executes
const { runCLI } = await import('./modules/commands.js');

// Run the CLI with the process arguments
runCLI(process.argv);

```

--------------------------------------------------------------------------------
/packages/build-config/src/tsdown.base.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Base tsdown configuration for Task Master monorepo
 * Provides shared configuration that can be extended by individual packages
 */
import type { UserConfig } from 'tsdown';

const isProduction = process.env.NODE_ENV === 'production';
const isDevelopment = !isProduction;

/**
 * Environment helpers
 */
export const env = {
	isProduction,
	isDevelopment,
	NODE_ENV: process.env.NODE_ENV || 'development'
};

/**
 * Base tsdown configuration for all packages
 * Since everything gets bundled into root dist/ anyway, use consistent settings
 */
export const baseConfig: Partial<UserConfig> = {
	sourcemap: isDevelopment,
	format: 'esm',
	platform: 'node',
	dts: isDevelopment,
	minify: isProduction,
	treeshake: isProduction,
	// Better debugging in development
	...(isDevelopment && {
		keepNames: true,
		splitting: false // Disable code splitting for better stack traces
	}),
	// Keep all npm dependencies external (available via node_modules)
	external: [/^[^@./]/, /^@(?!tm\/)/]
};

/**
 * Utility function to merge configurations
 * Simplified for tsdown usage
 */
export function mergeConfig(
	base: Partial<UserConfig>,
	overrides: Partial<UserConfig>
): UserConfig {
	return {
		...base,
		...overrides
	} as UserConfig;
}

```

--------------------------------------------------------------------------------
/apps/cli/src/ui/formatters/complexity-formatters.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Complexity formatting utilities
 * Provides colored complexity displays with labels and scores
 */

import chalk from 'chalk';

/**
 * Get complexity color and label based on score thresholds
 */
function getComplexityLevel(score: number): {
	color: (text: string) => string;
	label: string;
} {
	if (score >= 7) {
		return { color: chalk.hex('#CC0000'), label: 'High' };
	} else if (score >= 4) {
		return { color: chalk.hex('#FF8800'), label: 'Medium' };
	} else {
		return { color: chalk.green, label: 'Low' };
	}
}

/**
 * Get colored complexity display with dot indicator (simple format)
 */
export function getComplexityWithColor(complexity: number | string): string {
	const score =
		typeof complexity === 'string' ? Number(complexity.trim()) : complexity;

	if (isNaN(score)) {
		return chalk.gray('N/A');
	}

	const { color } = getComplexityLevel(score);
	return color(`● ${score}`);
}

/**
 * Get colored complexity display with /10 format (for dashboards)
 */
export function getComplexityWithScore(complexity: number | undefined): string {
	if (typeof complexity !== 'number') {
		return chalk.gray('N/A');
	}

	const { color, label } = getComplexityLevel(complexity);
	return color(`${complexity}/10 (${label})`);
}

```

--------------------------------------------------------------------------------
/src/utils/logger-utils.js:
--------------------------------------------------------------------------------

```javascript
/**
 * Logger utility functions for Task Master
 * Provides standardized logging patterns for both CLI and utility contexts
 */

import { log as utilLog } from '../../scripts/modules/utils.js';

/**
 * Creates a standard logger object that wraps the utility log function
 * This provides a consistent logger interface across different parts of the application
 * @returns {Object} A logger object with standard logging methods (info, warn, error, debug, success)
 */
export function createStandardLogger() {
	return {
		info: (msg, ...args) => utilLog('info', msg, ...args),
		warn: (msg, ...args) => utilLog('warn', msg, ...args),
		error: (msg, ...args) => utilLog('error', msg, ...args),
		debug: (msg, ...args) => utilLog('debug', msg, ...args),
		success: (msg, ...args) => utilLog('success', msg, ...args)
	};
}

/**
 * Creates a logger using either the provided logger or a default standard logger
 * This is the recommended pattern for functions that accept an optional logger parameter
 * @param {Object|null} providedLogger - Optional logger object passed from caller
 * @returns {Object} A logger object with standard logging methods
 */
export function getLoggerOrDefault(providedLogger = null) {
	return providedLogger || createStandardLogger();
}

```

--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------

```json
{
	"compilerOptions": {
		"target": "ES2022",
		"module": "ESNext",
		"moduleResolution": "bundler",
		"lib": ["ES2022"],
		"types": ["node"],
		"allowJs": true,
		"resolveJsonModule": true,
		"esModuleInterop": true,
		"forceConsistentCasingInFileNames": true,
		"strict": true,
		"skipLibCheck": true,
		"noEmit": true,
		"baseUrl": ".",
		"paths": {
			"@tm/core": ["./packages/tm-core/src/index.ts"],
			"@tm/core/*": ["./packages/tm-core/src/*"],
			"@tm/cli": ["./apps/cli/src/index.ts"],
			"@tm/cli/*": ["./apps/cli/src/*"],
			"@tm/mcp": ["./apps/mcp/src/index.ts"],
			"@tm/mcp/*": ["./apps/mcp/src/*"],
			"@tm/build-config": ["./packages/build-config/src/index.ts"],
			"@tm/build-config/*": ["./packages/build-config/src/*"],
			"@tm/ai-sdk-provider-grok-cli": [
				"./packages/ai-sdk-provider-grok-cli/src/index.ts"
			],
			"@tm/ai-sdk-provider-grok-cli/*": [
				"./packages/ai-sdk-provider-grok-cli/src/*"
			],
			"@tm/bridge": ["./packages/tm-bridge/src/index.ts"],
			"@tm/bridge/*": ["./packages/tm-bridge/src/*"]
		}
	},
	"tsx": {
		"tsconfig": {
			"allowImportingTsExtensions": false
		}
	},
	"include": [
		"bin/**/*",
		"scripts/**/*",
		"packages/*/src/**/*",
		"apps/*/src/**/*"
	],
	"exclude": ["node_modules", "dist", "**/dist"]
}

```

--------------------------------------------------------------------------------
/apps/cli/src/ui/index.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Main UI exports
 * Organized UI system with components, formatters, display primitives, and layout helpers
 */

// High-level UI components
export * from './components/index.js';

// Status formatters
export {
	getStatusWithColor,
	getBriefStatusWithColor,
	getBriefStatusIcon,
	getBriefStatusColor,
	capitalizeStatus
} from './formatters/status-formatters.js';

// Priority formatters
export { getPriorityWithColor } from './formatters/priority-formatters.js';

// Complexity formatters
export {
	getComplexityWithColor,
	getComplexityWithScore
} from './formatters/complexity-formatters.js';

// Dependency formatters
export { formatDependenciesWithStatus } from './formatters/dependency-formatters.js';

// Layout helpers
export {
	getBoxWidth,
	truncate,
	createProgressBar
} from './layout/helpers.js';

// Display messages
// Note: displayError alias is available via namespace (ui.displayError) for backward compat
// but not exported at package level to avoid conflicts with utils/error-handler.ts
export {
	displayBanner,
	displayErrorBox,
	displayError, // Backward compatibility alias
	displaySuccess,
	displayWarning,
	displayInfo
} from './display/messages.js';

// Display tables
export { createTaskTable } from './display/tables.js';

```

--------------------------------------------------------------------------------
/mcp-server/src/tools/response-language.js:
--------------------------------------------------------------------------------

```javascript
import { z } from 'zod';
import {
	createErrorResponse,
	handleApiResult,
	withNormalizedProjectRoot
} from './utils.js';
import { responseLanguageDirect } from '../core/direct-functions/response-language.js';

export function registerResponseLanguageTool(server) {
	server.addTool({
		name: 'response-language',
		description: 'Get or set the response language for the project',
		parameters: z.object({
			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.'
				),
			language: z
				.string()
				.describe(
					'The new response language to set. like "中文" "English" or "español".'
				)
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				log.info(
					`Executing response-language tool with args: ${JSON.stringify(args)}`
				);

				const result = await responseLanguageDirect(
					{
						...args,
						projectRoot: args.projectRoot
					},
					log,
					{ session }
				);
				return handleApiResult(result, log, 'Error setting response language');
			} catch (error) {
				log.error(`Error in response-language tool: ${error.message}`);
				return createErrorResponse(error.message);
			}
		})
	});
}

```

--------------------------------------------------------------------------------
/apps/cli/package.json:
--------------------------------------------------------------------------------

```json
{
	"name": "@tm/cli",
	"description": "Task Master CLI - Command line interface for task management",
	"type": "module",
	"private": true,
	"main": "./dist/index.js",
	"types": "./src/index.ts",
	"exports": {
		".": "./src/index.ts"
	},
	"files": ["dist", "README.md"],
	"scripts": {
		"typecheck": "tsc --noEmit",
		"lint": "biome check src",
		"format": "biome format --write src",
		"test": "vitest run",
		"test:watch": "vitest",
		"test:coverage": "vitest run --coverage",
		"test:unit": "vitest run -t unit",
		"test:integration": "vitest run -t integration",
		"test:e2e": "vitest run --dir tests/e2e",
		"test:ci": "vitest run --coverage --reporter=dot"
	},
	"dependencies": {
		"@inquirer/search": "^3.2.0",
		"@tm/core": "*",
		"boxen": "^8.0.1",
		"chalk": "5.6.2",
		"cli-table3": "^0.6.5",
		"commander": "^12.1.0",
		"inquirer": "^12.5.0",
		"ora": "^8.2.0"
	},
	"devDependencies": {
		"@biomejs/biome": "^1.9.4",
		"@types/inquirer": "^9.0.3",
		"@types/node": "^22.10.5",
		"tsx": "^4.20.4",
		"typescript": "^5.9.2",
		"vitest": "^2.1.8"
	},
	"engines": {
		"node": ">=18.0.0"
	},
	"keywords": ["task-master", "cli", "task-management", "productivity"],
	"author": "",
	"license": "MIT",
	"typesVersions": {
		"*": {
			"*": ["src/*"]
		}
	},
	"version": ""
}

```

--------------------------------------------------------------------------------
/.github/workflows/backfill-duplicate-comments.yml:
--------------------------------------------------------------------------------

```yaml
name: Backfill Duplicate Comments
# description: Triggers duplicate detection for old issues that don't have duplicate comments

on:
  workflow_dispatch:
    inputs:
      days_back:
        description: "How many days back to look for old issues"
        required: false
        default: "90"
        type: string
      dry_run:
        description: "Dry run mode (true to only log what would be done)"
        required: false
        default: "true"
        type: choice
        options:
          - "true"
          - "false"

jobs:
  backfill-duplicate-comments:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    permissions:
      contents: read
      issues: read
      actions: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Backfill duplicate comments
        run: node .github/scripts/backfill-duplicate-comments.mjs
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
          GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
          DAYS_BACK: ${{ inputs.days_back }}
          DRY_RUN: ${{ inputs.dry_run }}

```

--------------------------------------------------------------------------------
/tsdown.config.ts:
--------------------------------------------------------------------------------

```typescript
import { defineConfig } from 'tsdown';
import { baseConfig, mergeConfig } from '@tm/build-config';
import { config } from 'dotenv';
import { resolve } from 'path';

// Load .env file explicitly with absolute path
config({ path: resolve(process.cwd(), '.env') });

// Get all TM_PUBLIC_* env variables for build-time injection
const getBuildTimeEnvs = () => {
	const envs: Record<string, string> = {};

	// Inject package.json version at build time
	try {
		const packageJson = JSON.parse(
			require('fs').readFileSync('package.json', 'utf8')
		);
		envs['TM_PUBLIC_VERSION'] = packageJson.version || 'unknown';
	} catch (error) {
		console.warn('Could not read package.json version during build:', error);
		envs['TM_PUBLIC_VERSION'] = 'unknown';
	}

	for (const [key, value] of Object.entries(process.env)) {
		if (key.startsWith('TM_PUBLIC_')) {
			envs[key] = value || '';
		}
	}

	return envs;
};

export default defineConfig(
	mergeConfig(baseConfig, {
		entry: {
			'task-master': 'scripts/dev.js',
			'mcp-server': 'mcp-server/server.js'
		},
		outDir: 'dist',
		copy: ['assets'],
		ignoreWatch: ['node_modules', 'dist', 'tests', 'apps/extension'],
		// Bundle only our workspace packages, keep npm dependencies external
		noExternal: [/^@tm\//],
		env: getBuildTimeEnvs()
	})
);

```

--------------------------------------------------------------------------------
/apps/extension/src/webview/utils/toast.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Toast notification utilities
 */

import type { ToastNotification, AppAction } from '../types';

let toastIdCounter = 0;

export const createToast = (
	type: ToastNotification['type'],
	title: string,
	message: string,
	duration?: number
): ToastNotification => ({
	id: `toast-${++toastIdCounter}`,
	type,
	title,
	message,
	duration
});

export const showSuccessToast =
	(dispatch: React.Dispatch<AppAction>) =>
	(title: string, message: string, duration?: number) => {
		dispatch({
			type: 'ADD_TOAST',
			payload: createToast('success', title, message, duration)
		});
	};

export const showInfoToast =
	(dispatch: React.Dispatch<AppAction>) =>
	(title: string, message: string, duration?: number) => {
		dispatch({
			type: 'ADD_TOAST',
			payload: createToast('info', title, message, duration)
		});
	};

export const showWarningToast =
	(dispatch: React.Dispatch<AppAction>) =>
	(title: string, message: string, duration?: number) => {
		dispatch({
			type: 'ADD_TOAST',
			payload: createToast('warning', title, message, duration)
		});
	};

export const showErrorToast =
	(dispatch: React.Dispatch<AppAction>) =>
	(title: string, message: string, duration?: number) => {
		dispatch({
			type: 'ADD_TOAST',
			payload: createToast('error', title, message, duration)
		});
	};

```

--------------------------------------------------------------------------------
/src/prompts/schemas/parameter.schema.json:
--------------------------------------------------------------------------------

```json
{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"$id": "https://github.com/eyaltoledano/claude-task-master/blob/main/src/prompts/schemas/parameter.schema.json",
	"version": "1.0.0",
	"title": "Task Master Prompt Parameter",
	"description": "Schema for individual prompt template parameters",
	"type": "object",
	"required": ["type", "description"],
	"properties": {
		"type": {
			"type": "string",
			"enum": ["string", "number", "boolean", "array", "object"],
			"description": "The expected data type for this parameter"
		},
		"description": {
			"type": "string",
			"minLength": 1,
			"description": "Human-readable description of the parameter"
		},
		"required": {
			"type": "boolean",
			"default": false,
			"description": "Whether this parameter is required"
		},
		"default": {
			"description": "Default value for optional parameters"
		},
		"enum": {
			"type": "array",
			"description": "Valid values for string parameters",
			"items": {
				"type": "string"
			}
		},
		"pattern": {
			"type": "string",
			"description": "Regular expression pattern for string validation"
		},
		"minimum": {
			"type": "number",
			"description": "Minimum value for number parameters"
		},
		"maximum": {
			"type": "number",
			"description": "Maximum value for number parameters"
		}
	}
}

```

--------------------------------------------------------------------------------
/src/ai-providers/bedrock.js:
--------------------------------------------------------------------------------

```javascript
import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock';
import { fromNodeProviderChain } from '@aws-sdk/credential-providers';
import { BaseAIProvider } from './base-provider.js';

export class BedrockAIProvider extends BaseAIProvider {
	constructor() {
		super();
		this.name = 'Bedrock';
	}

	isRequiredApiKey() {
		return false;
	}

	/**
	 * Returns the required API key environment variable name for Bedrock.
	 * Bedrock uses AWS credentials, so we return the AWS access key identifier.
	 * @returns {string} The environment variable name
	 */
	getRequiredApiKeyName() {
		return 'AWS_ACCESS_KEY_ID';
	}

	/**
	 * Override auth validation - Bedrock uses AWS credentials instead of API keys
	 * @param {object} params - Parameters to validate
	 */
	validateAuth(params) {}

	/**
	 * Creates and returns a Bedrock client instance.
	 * See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
	 * for AWS SDK environment variables and configuration options.
	 */
	getClient(params) {
		try {
			const credentialProvider = fromNodeProviderChain();
			const fetchImpl = this.createProxyFetch();

			return createAmazonBedrock({
				credentialProvider,
				...(fetchImpl && { fetch: fetchImpl })
			});
		} catch (error) {
			this.handleError('client initialization', error);
		}
	}
}

```

--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/enhancements---feature-requests.md:
--------------------------------------------------------------------------------

```markdown
---
name: Enhancements & feature requests
about: Suggest an idea for this project
title: 'feat: '
labels: enhancement
assignees: ''
---

> "Direct quote or clear summary of user request or need or user story."

### Motivation

Detailed explanation of why this feature is important. Describe the problem it solves or the benefit it provides.

### Proposed Solution

Clearly describe the proposed feature, including:

- High-level overview of the feature
- Relevant technologies or integrations
- How it fits into the existing workflow or architecture

### High-Level Workflow

1. Step-by-step description of how the feature will be implemented
2. Include necessary intermediate milestones

### Key Elements

- Bullet-point list of technical or UX/UI enhancements
- Mention specific integrations or APIs
- Highlight changes needed in existing data models or commands

### Example Workflow

Provide a clear, concrete example demonstrating the feature:

```shell
$ task-master [action]
→ Expected response/output
```

### Implementation Considerations

- Dependencies on external components or APIs
- Backward compatibility requirements
- Potential performance impacts or resource usage

### Out of Scope (Future Considerations)

Clearly list any features or improvements not included but relevant for future iterations.

```

--------------------------------------------------------------------------------
/apps/cli/src/ui/layout/helpers.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Layout helper utilities
 * Provides utilities for calculating dimensions, truncating text, and creating visual elements
 */

import chalk from 'chalk';

/**
 * Calculate box width as percentage of terminal width
 * @param percentage - Percentage of terminal width to use (default: 0.9)
 * @param minWidth - Minimum width to enforce (default: 40)
 * @returns Calculated box width
 */
export function getBoxWidth(
	percentage: number = 0.9,
	minWidth: number = 40
): number {
	const terminalWidth = process.stdout.columns || 80;
	return Math.max(Math.floor(terminalWidth * percentage), minWidth);
}

/**
 * Truncate text to specified length
 */
export function truncate(text: string, maxLength: number): string {
	if (text.length <= maxLength) {
		return text;
	}
	return text.substring(0, maxLength - 3) + '...';
}

/**
 * Create a progress bar
 */
export function createProgressBar(
	completed: number,
	total: number,
	width: number = 30
): string {
	if (total === 0) {
		return chalk.gray('No tasks');
	}

	const percentage = Math.round((completed / total) * 100);
	const filled = Math.round((completed / total) * width);
	const empty = width - filled;

	const bar = chalk.green('█').repeat(filled) + chalk.gray('░').repeat(empty);

	return `${bar} ${chalk.cyan(`${percentage}%`)} (${completed}/${total})`;
}

```

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

```typescript
/**
 * Executor types and interfaces for Task Master
 */

import type { Task } from '../../common/types/index.js';

/**
 * Supported executor types
 */
export type ExecutorType = 'claude' | 'shell' | 'custom';

/**
 * Options for executor creation
 */
export interface ExecutorOptions {
	type: ExecutorType;
	projectRoot: string;
	config?: Record<string, any>;
}

/**
 * Result from task execution
 */
export interface ExecutionResult {
	success: boolean;
	taskId: string;
	executorType: ExecutorType;
	output?: string;
	error?: string;
	startTime: string;
	endTime?: string;
	processId?: number;
}

/**
 * Base interface for all task executors
 */
export interface ITaskExecutor {
	/**
	 * Execute a task
	 */
	execute(task: Task): Promise<ExecutionResult>;

	/**
	 * Stop a running task execution
	 */
	stop?(): Promise<void>;

	/**
	 * Get executor type
	 */
	getType(): ExecutorType;

	/**
	 * Check if executor is available/configured
	 */
	isAvailable(): Promise<boolean>;
}

/**
 * Configuration for Claude executor
 */
export interface ClaudeExecutorConfig {
	command?: string; // Default: 'claude'
	systemPrompt?: string;
	additionalFlags?: string[];
}

/**
 * Configuration for Shell executor
 */
export interface ShellExecutorConfig {
	shell?: string; // Default: '/bin/bash'
	env?: Record<string, string>;
	cwd?: string;
}

```

--------------------------------------------------------------------------------
/src/ai-providers/ollama.js:
--------------------------------------------------------------------------------

```javascript
/**
 * ollama.js
 * AI provider implementation for Ollama models using the ollama-ai-provider-v2 package.
 */

import { createOllama } from 'ollama-ai-provider-v2';
import { BaseAIProvider } from './base-provider.js';

export class OllamaAIProvider extends BaseAIProvider {
	constructor() {
		super();
		this.name = 'Ollama';
	}

	/**
	 * Override auth validation - Ollama doesn't require API keys
	 * @param {object} params - Parameters to validate
	 */
	validateAuth(_params) {
		// Ollama runs locally and doesn't require API keys
		// No authentication validation needed
	}

	/**
	 * Creates and returns an Ollama client instance.
	 * @param {object} params - Parameters for client initialization
	 * @param {string} [params.baseURL] - Optional Ollama base URL (defaults to http://localhost:11434)
	 * @returns {Function} Ollama client function
	 * @throws {Error} If initialization fails
	 */
	getClient(params) {
		try {
			const { baseURL } = params;

			return createOllama({
				...(baseURL && { baseURL })
			});
		} catch (error) {
			this.handleError('client initialization', error);
		}
	}

	isRequiredApiKey() {
		return false;
	}

	/**
	 * Returns the required API key environment variable name for Ollama.
	 * @returns {string} The environment variable name
	 */
	getRequiredApiKeyName() {
		return 'OLLAMA_API_KEY';
	}
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/remove-dependency.md:
--------------------------------------------------------------------------------

```markdown
Remove a dependency between tasks.

Arguments: $ARGUMENTS

Parse the task IDs to remove dependency relationship.

## Removing Dependencies

Removes a dependency relationship, potentially unblocking tasks.

## Argument Parsing

Parse natural language or IDs:
- "remove dependency between 5 and 3"
- "5 no longer needs 3"
- "unblock 5 from 3"
- "5 3" → remove dependency of 5 on 3

## Execution

```bash
task-master remove-dependency --id=<task-id> --depends-on=<dependency-id>
```

## Pre-Removal Checks

1. **Verify dependency exists**
2. **Check impact on task flow**
3. **Warn if it breaks logical sequence**
4. **Show what will be unblocked**

## Smart Analysis

Before removing:
- Show why dependency might have existed
- Check if removal makes tasks executable
- Verify no critical path disruption
- Suggest alternative dependencies

## Post-Removal

After removing:
1. Show updated task status
2. List newly unblocked tasks
3. Update project timeline
4. Suggest next actions

## Safety Features

- Confirm if removing critical dependency
- Show tasks that become immediately actionable
- Warn about potential issues
- Keep removal history

## Example

```
/taskmaster:remove-dependency 5 from 3
→ Removed: Task #5 no longer depends on #3
→ Task #5 is now UNBLOCKED and ready to start
→ Warning: Consider if #5 still needs #2 completed first
```
```

--------------------------------------------------------------------------------
/src/ai-providers/lmstudio.js:
--------------------------------------------------------------------------------

```javascript
/**
 * lmstudio.js
 * AI provider implementation for LM Studio local models.
 *
 * LM Studio is a desktop application for running local LLMs.
 * It provides an OpenAI-compatible API server that runs locally.
 * Default server: http://localhost:1234/v1
 *
 * Usage:
 * 1. Start LM Studio application
 * 2. Load a model (e.g., llama-3.2-1b, mistral-7b)
 * 3. Go to "Local Server" tab and click "Start Server"
 * 4. Use the model ID from LM Studio in your config
 *
 * Note: LM Studio only supports `json_schema` mode for structured outputs,
 * not `json_object` mode. We disable native structured outputs to force
 * the AI SDK to use alternative strategies (like tool calling) which work
 * reliably across all LM Studio models.
 */

import { OpenAICompatibleProvider } from './openai-compatible.js';

/**
 * LM Studio provider for local model inference.
 * Does not require an API key as it runs locally.
 */
export class LMStudioProvider extends OpenAICompatibleProvider {
	constructor() {
		super({
			name: 'LM Studio',
			apiKeyEnvVar: 'LMSTUDIO_API_KEY',
			requiresApiKey: false, // Local server, no API key needed
			defaultBaseURL: 'http://localhost:1234/v1',
			supportsStructuredOutputs: true
			// LM Studio only supports json_schema mode, not json_object mode
			// Disable native structured outputs to use alternative strategies
		});
	}
}

```

--------------------------------------------------------------------------------
/.taskmaster/tasks/task_004_tm-start.txt:
--------------------------------------------------------------------------------

```
# Task ID: 4
# Title: Implement claude-code executor
# Status: pending
# Dependencies: 3
# Priority: high
# Description: Add functionality to execute the claude-code command with the built prompt
# Details:
Implement the functionality to execute the claude command with the built prompt. This should use Node.js child_process.exec() to run the command directly in the terminal.

```typescript
import { exec } from 'child_process';

// Inside execute method, after task validation
private async executeClaude(prompt: string): Promise<void> {
  console.log('Starting claude-code to implement the task...');
  
  try {
    // Execute claude with the prompt
    const claudeCommand = `claude "${prompt.replace(/"/g, '\\"')}"`;
    
    // Use execSync to wait for the command to complete
    const { execSync } = require('child_process');
    execSync(claudeCommand, { stdio: 'inherit' });
    
    console.log('Claude session completed.');
  } catch (error) {
    console.error('Error executing claude-code:', error.message);
    process.exit(1);
  }
}
```

Then call this method from the execute method after building the prompt.

# Test Strategy:
Test by running the command with a valid task ID and verifying that the claude command is executed with the correct prompt. Check that the command handles errors appropriately if claude-code is not available.

```

--------------------------------------------------------------------------------
/apps/cli/src/index.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Main entry point for @tm/cli package
 * Exports all public APIs for the CLI presentation layer
 */

// Commands
export { ListTasksCommand } from './commands/list.command.js';
export { ShowCommand } from './commands/show.command.js';
export { NextCommand } from './commands/next.command.js';
export { AuthCommand } from './commands/auth.command.js';
export { ContextCommand } from './commands/context.command.js';
export { StartCommand } from './commands/start.command.js';
export { SetStatusCommand } from './commands/set-status.command.js';
export { ExportCommand } from './commands/export.command.js';
export { TagsCommand } from './commands/tags.command.js';
export { BriefsCommand } from './commands/briefs.command.js';

// Command Registry
export {
	CommandRegistry,
	registerAllCommands,
	registerCommandsByCategory,
	type CommandMetadata
} from './command-registry.js';

// General utilities (error handling, auto-update, etc.)
export * from './utils/index.js';

// UI utilities - exported only via ui namespace to avoid naming conflicts
// Import via: import { ui } from '@tm/cli'; ui.displayBanner();
export * as ui from './ui/index.js';

export { runInteractiveSetup } from './commands/models/index.js';

// Re-export commonly used types from tm-core
export type {
	Task,
	TaskStatus,
	TaskPriority,
	TmCore
} from '@tm/core';

```

--------------------------------------------------------------------------------
/apps/extension/src/components/TaskDetails/PriorityBadge.tsx:
--------------------------------------------------------------------------------

```typescript
import type React from 'react';
import type { TaskMasterTask } from '../../webview/types';

// Custom Priority Badge Component with theme-adaptive styling
export const PriorityBadge: React.FC<{
	priority: TaskMasterTask['priority'];
}> = ({ priority }) => {
	const getPriorityColors = (priority: string) => {
		switch (priority) {
			case 'high':
				return {
					backgroundColor: 'rgba(239, 68, 68, 0.2)', // red-500 with opacity
					color: '#dc2626', // red-600 - works in both themes
					borderColor: 'rgba(239, 68, 68, 0.4)'
				};
			case 'medium':
				return {
					backgroundColor: 'rgba(245, 158, 11, 0.2)', // amber-500 with opacity
					color: '#d97706', // amber-600 - works in both themes
					borderColor: 'rgba(245, 158, 11, 0.4)'
				};
			case 'low':
				return {
					backgroundColor: 'rgba(34, 197, 94, 0.2)', // green-500 with opacity
					color: '#16a34a', // green-600 - works in both themes
					borderColor: 'rgba(34, 197, 94, 0.4)'
				};
			default:
				return {
					backgroundColor: 'rgba(156, 163, 175, 0.2)',
					color: 'var(--vscode-foreground)',
					borderColor: 'rgba(156, 163, 175, 0.4)'
				};
		}
	};

	const colors = getPriorityColors(priority || '');

	return (
		<span
			className="inline-flex items-center px-2 py-1 text-xs font-medium rounded-md border"
			style={colors}
		>
			{priority || 'None'}
		</span>
	);
};

```

--------------------------------------------------------------------------------
/apps/cli/src/utils/ui.spec.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * CLI UI utilities tests (Backward compatibility tests)
 * Tests for apps/cli/src/utils/ui.ts
 *
 * This file ensures backward compatibility with the old ui.ts module.
 * The actual implementation has been moved to src/ui/ organized modules.
 * See:
 * - ui/layout/helpers.spec.ts
 * - ui/formatters/status-formatters.spec.ts
 */

import { describe, expect, it } from 'vitest';
import { getBoxWidth, getBriefStatusWithColor } from './ui.js';

describe('CLI UI Utilities (Backward Compatibility)', () => {
	describe('Re-exports work correctly from ui/', () => {
		it('should re-export getBoxWidth', () => {
			expect(typeof getBoxWidth).toBe('function');
		});

		it('should re-export getBriefStatusWithColor', () => {
			expect(typeof getBriefStatusWithColor).toBe('function');
		});

		it('should maintain functional behavior for getBoxWidth', () => {
			// Simple smoke test - detailed tests are in ui/layout/helpers.spec.ts
			const width = getBoxWidth(0.9, 40);
			expect(typeof width).toBe('number');
			expect(width).toBeGreaterThanOrEqual(40);
		});

		it('should maintain functional behavior for getBriefStatusWithColor', () => {
			// Simple smoke test - detailed tests are in ui/formatters/status-formatters.spec.ts
			const result = getBriefStatusWithColor('done', true);
			expect(result).toContain('Done');
			expect(result).toContain('✓');
		});
	});
});

```

--------------------------------------------------------------------------------
/.taskmaster/reports/task-complexity-report.json:
--------------------------------------------------------------------------------

```json
{
	"meta": {
		"generatedAt": "2025-08-02T14:28:59.851Z",
		"tasksAnalyzed": 1,
		"totalTasks": 93,
		"analysisCount": 1,
		"thresholdScore": 5,
		"projectName": "Taskmaster",
		"usedResearch": false
	},
	"complexityAnalysis": [
		{
			"taskId": 24,
			"taskTitle": "Implement AI-Powered Test Generation Command",
			"complexityScore": 8,
			"recommendedSubtasks": 6,
			"expansionPrompt": "Expand task 24 'Implement AI-Powered Test Generation Command' into 6 subtasks, focusing on: 1) Command structure implementation, 2) AI prompt engineering for test generation, 3) Test file generation and output, 4) Framework-specific template implementation, 5) MCP tool integration, and 6) Documentation and help system integration. Include detailed implementation steps, dependencies, and testing approaches for each subtask.",
			"reasoning": "This task has high complexity due to several challenging aspects: 1) AI integration requiring sophisticated prompt engineering, 2) Test generation across multiple frameworks, 3) File system operations with proper error handling, 4) MCP tool integration, 5) Complex configuration requirements, and 6) Framework-specific template generation. The task already has 5 subtasks but could benefit from reorganization based on the updated implementation details in the info blocks, particularly around framework support and configuration."
		}
	]
}

```

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

```javascript
/**
 * src/ai-providers/custom-sdk/mcp/index.js
 *
 * AI SDK factory function for MCP provider.
 * Creates MCP language model instances with session-based AI operations.
 */

import { MCPLanguageModel } from './language-model.js';

/**
 * Create MCP provider factory function following AI SDK patterns
 * @param {object} options - Provider options
 * @param {object} options.session - MCP session object
 * @param {object} options.defaultSettings - Default settings for the provider
 * @returns {Function} Provider factory function
 */
export function createMCP(options = {}) {
	if (!options.session) {
		throw new Error('MCP provider requires session object');
	}

	// Return the provider factory function that AI SDK expects
	const provider = function (modelId, settings = {}) {
		if (new.target) {
			throw new Error(
				'The MCP model function cannot be called with the new keyword.'
			);
		}

		return new MCPLanguageModel({
			session: options.session,
			modelId: modelId || 'claude-3-5-sonnet-20241022',
			settings: {
				temperature: settings.temperature,
				maxTokens: settings.maxTokens,
				...options.defaultSettings,
				...settings
			}
		});
	};

	// Add required methods for AI SDK compatibility
	provider.languageModel = (modelId, settings) => provider(modelId, settings);
	provider.chat = (modelId, settings) => provider(modelId, settings);

	return provider;
}

```

--------------------------------------------------------------------------------
/.taskmaster/tasks/task_001_tm-start.txt:
--------------------------------------------------------------------------------

```
# Task ID: 1
# Title: Create start command class structure
# Status: pending
# Dependencies: None
# Priority: high
# Description: Create the basic structure for the start command following the Commander class pattern
# Details:
Create a new file `apps/cli/src/commands/start.command.ts` based on the existing list.command.ts pattern. Implement the command class with proper command registration, description, and argument handling for the task_id parameter. The class should extend the base Command class and implement the required methods.

Example structure:
```typescript
import { Command } from 'commander';
import { BaseCommand } from './base.command';

export class StartCommand extends BaseCommand {
  public register(program: Command): void {
    program
      .command('start')
      .alias('tm start')
      .description('Start implementing a task using claude-code')
      .argument('<task_id>', 'ID of the task to start')
      .action(async (taskId: string) => {
        await this.execute(taskId);
      });
  }

  public async execute(taskId: string): Promise<void> {
    // Implementation will be added in subsequent tasks
  }
}
```

# Test Strategy:
Verify the command registers correctly by running the CLI with --help and checking that the start command appears with proper description and arguments. Test the basic structure by ensuring the command can be invoked without errors.

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/smart-workflow.md:
--------------------------------------------------------------------------------

```markdown
Execute an intelligent workflow based on current project state and recent commands.

This command analyzes:
1. Recent commands you've run
2. Current project state
3. Time of day / day of week
4. Your working patterns

Arguments: $ARGUMENTS

## Intelligent Workflow Selection

Based on context, I'll determine the best workflow:

### Context Analysis
- Previous command executed
- Current task states
- Unfinished work from last session
- Your typical patterns

### Smart Execution

If last command was:
- `status` → Likely starting work → Run daily standup
- `complete` → Task finished → Find next task
- `list pending` → Planning → Suggest sprint planning
- `expand` → Breaking down work → Show complexity analysis
- `init` → New project → Show onboarding workflow

If no recent commands:
- Morning? → Daily standup workflow
- Many pending tasks? → Sprint planning
- Tasks blocked? → Dependency resolution
- Friday? → Weekly review

### Workflow Composition

I'll chain appropriate commands:
1. Analyze current state
2. Execute primary workflow
3. Suggest follow-up actions
4. Prepare environment for coding

### Learning Mode

This command learns from your patterns:
- Track command sequences
- Note time preferences
- Remember common workflows
- Adapt to your style

Example flows detected:
- Morning: standup → next → start
- After lunch: status → continue task
- End of day: complete → commit → status
```

--------------------------------------------------------------------------------
/.kiro/steering/kiro_rules.md:
--------------------------------------------------------------------------------

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

- **Required Rule Structure:**
  ```markdown
  ---
  description: Clear, one-line description of what the rule enforces
  globs: path/to/files/*.ext, other/path/**/*
  alwaysApply: boolean
  ---

  - **Main Points in Bold**
    - Sub-points with details
    - Examples and explanations
  ```

- **File References:**
  - Use `[filename](mdc:path/to/file)` ([filename](mdc:filename)) to reference files
  - Example: [prisma.md](.kiro/steering/prisma.md) for rule references
  - Example: [schema.prisma](mdc:prisma/schema.prisma) for code references

- **Code Examples:**
  - Use language-specific code blocks
  ```typescript
  // ✅ DO: Show good examples
  const goodExample = true;
  
  // ❌ DON'T: Show anti-patterns
  const badExample = false;
  ```

- **Rule Content Guidelines:**
  - Start with high-level overview
  - Include specific, actionable requirements
  - Show examples of correct implementation
  - Reference existing code when possible
  - Keep rules DRY by referencing other rules

- **Rule Maintenance:**
  - Update rules when new patterns emerge
  - Add examples from actual codebase
  - Remove outdated patterns
  - Cross-reference related rules

- **Best Practices:**
  - Use bullet points for clarity
  - Keep descriptions concise
  - Include both DO and DON'T examples
  - Reference actual code over theoretical examples
  - Use consistent formatting across rules 
```

--------------------------------------------------------------------------------
/scripts/modules/update-config-tokens.js:
--------------------------------------------------------------------------------

```javascript
/**
 * update-config-tokens.js
 * Updates config.json with correct maxTokens values from supported-models.json
 */

import fs from 'fs';
import supportedModels from './supported-models.json' with { type: 'json' };

/**
 * Updates the config file with correct maxTokens values from supported-models.json
 * @param {string} configPath - Path to the config.json file to update
 * @returns {boolean} True if successful, false otherwise
 */
export function updateConfigMaxTokens(configPath) {
	try {
		// Load config
		const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));

		// Update each role's maxTokens if the model exists in supported-models.json
		const roles = ['main', 'research', 'fallback'];

		for (const role of roles) {
			if (config.models && config.models[role]) {
				const provider = config.models[role].provider;
				const modelId = config.models[role].modelId;

				// Find the model in supported models
				if (supportedModels[provider]) {
					const modelData = supportedModels[provider].find(
						(m) => m.id === modelId
					);
					if (modelData && modelData.max_tokens) {
						config.models[role].maxTokens = modelData.max_tokens;
					}
				}
			}
		}

		// Write back the updated config
		fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
		return true;
	} catch (error) {
		console.error('Error updating config maxTokens:', error.message);
		return false;
	}
}

```

--------------------------------------------------------------------------------
/tests/unit/task-manager/clear-subtasks.test.js:
--------------------------------------------------------------------------------

```javascript
import fs from 'fs';
import path from 'path';
import clearSubtasks from '../../../scripts/modules/task-manager/clear-subtasks.js';

const TMP = path.join(process.cwd(), '.tmp_clear_subtasks');
const TASKS = path.join(TMP, 'tasks.json');

function seed() {
	fs.rmSync(TMP, { recursive: true, force: true });
	fs.mkdirSync(path.join(TMP, '.taskmaster'), { recursive: true });
	fs.writeFileSync(
		TASKS,
		JSON.stringify(
			{
				master: {
					tasks: [
						{
							id: 1,
							title: 'Parent',
							subtasks: [
								{ id: 1, title: 'Sub1' },
								{ id: 2, title: 'Sub2' }
							]
						},
						{ id: 2, title: 'Solo' }
					],
					metadata: { created: new Date().toISOString() }
				}
			},
			null,
			2
		)
	);
}

describe('clearSubtasks', () => {
	beforeEach(seed);
	afterAll(() => fs.rmSync(TMP, { recursive: true, force: true }));

	it('clears subtasks for given task id', () => {
		clearSubtasks(TASKS, '1', { projectRoot: TMP, tag: 'master' });
		const data = JSON.parse(fs.readFileSync(TASKS, 'utf8'));
		const parent = data.master.tasks.find((t) => t.id === 1);
		expect(parent.subtasks.length).toBe(0);
	});

	it('does nothing when task has no subtasks', () => {
		clearSubtasks(TASKS, '2', { projectRoot: TMP, tag: 'master' });
		const data = JSON.parse(fs.readFileSync(TASKS, 'utf8'));
		const solo = data.master.tasks.find((t) => t.id === 2);
		expect(solo.subtasks).toBeUndefined();
	});
});

```

--------------------------------------------------------------------------------
/packages/ai-sdk-provider-grok-cli/src/index.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Provider exports for creating and configuring Grok CLI instances.
 */

/**
 * Creates a new Grok CLI provider instance and the default provider instance.
 */
export { createGrokCli, grokCli } from './grok-cli-provider.js';

/**
 * Type definitions for the Grok CLI provider.
 */
export type {
	GrokCliProvider,
	GrokCliProviderSettings
} from './grok-cli-provider.js';

/**
 * Language model implementation for Grok CLI.
 * This class implements the AI SDK's LanguageModelV2 interface.
 */
export { GrokCliLanguageModel } from './grok-cli-language-model.js';

/**
 * Type definitions for Grok CLI language models.
 */
export type {
	GrokCliModelId,
	GrokCliLanguageModelOptions,
	GrokCliSettings,
	GrokCliMessage,
	GrokCliResponse,
	GrokCliErrorMetadata
} from './types.js';

/**
 * Error handling utilities for Grok CLI.
 * These functions help create and identify specific error types.
 */
export {
	isAuthenticationError,
	isTimeoutError,
	isInstallationError,
	getErrorMetadata,
	createAPICallError,
	createAuthenticationError,
	createTimeoutError,
	createInstallationError
} from './errors.js';

/**
 * Message conversion utilities for Grok CLI communication.
 */
export {
	convertToGrokCliMessages,
	convertFromGrokCliResponse,
	createPromptFromMessages,
	escapeShellArg
} from './message-converter.js';

/**
 * JSON extraction utilities for parsing Grok responses.
 */
export { extractJson } from './json-extractor.js';

```

--------------------------------------------------------------------------------
/mcp-server/src/core/utils/env-utils.js:
--------------------------------------------------------------------------------

```javascript
/**
 * Temporarily sets environment variables from session.env, executes an action,
 * and restores the original environment variables.
 * @param {object | undefined} sessionEnv - The environment object from the session.
 * @param {Function} actionFn - An async function to execute with the temporary environment.
 * @returns {Promise<any>} The result of the actionFn.
 */
export async function withSessionEnv(sessionEnv, actionFn) {
	if (
		!sessionEnv ||
		typeof sessionEnv !== 'object' ||
		Object.keys(sessionEnv).length === 0
	) {
		// If no sessionEnv is provided, just run the action directly
		return await actionFn();
	}

	const originalEnv = {};
	const keysToRestore = [];

	// Set environment variables from sessionEnv
	for (const key in sessionEnv) {
		if (Object.prototype.hasOwnProperty.call(sessionEnv, key)) {
			// Store original value if it exists, otherwise mark for deletion
			if (process.env[key] !== undefined) {
				originalEnv[key] = process.env[key];
			}
			keysToRestore.push(key);
			process.env[key] = sessionEnv[key];
		}
	}

	try {
		// Execute the provided action function
		return await actionFn();
	} finally {
		// Restore original environment variables
		for (const key of keysToRestore) {
			if (Object.prototype.hasOwnProperty.call(originalEnv, key)) {
				process.env[key] = originalEnv[key];
			} else {
				// If the key didn't exist originally, delete it
				delete process.env[key];
			}
		}
	}
}

```

--------------------------------------------------------------------------------
/apps/cli/src/ui/components/cardBox.component.ts:
--------------------------------------------------------------------------------

```typescript
import boxen from 'boxen';
import chalk from 'chalk';

/**
 * Configuration for the card box component
 */
export interface CardBoxConfig {
	/** Header text displayed in yellow bold */
	header: string;
	/** Body paragraphs displayed in white */
	body: string[];
	/** Call to action section with label and URL */
	callToAction: {
		label: string;
		action: string;
	};
	/** Footer text displayed in gray (usage instructions) */
	footer?: string;
}

/**
 * Creates a formatted boxen card with header, body, call-to-action, and optional footer.
 * A reusable component for displaying informational messages in a styled box.
 *
 * @param config - Configuration for the box sections
 * @returns Formatted string ready for console.log
 */
export function displayCardBox(config: CardBoxConfig): string {
	const { header, body, callToAction, footer } = config;

	// Build the content sections
	const sections: string[] = [
		// Header
		chalk.yellow.bold(header),

		// Body paragraphs
		...body.map((paragraph) => chalk.white(paragraph)),

		// Call to action
		chalk.cyan(callToAction.label) +
			'\n' +
			chalk.blue.underline(callToAction.action)
	];

	// Add footer if provided
	if (footer) {
		sections.push(chalk.gray(footer));
	}

	// Join sections with double newlines
	const content = sections.join('\n\n');

	// Wrap in boxen
	return boxen(content, {
		padding: 1,
		borderColor: 'yellow',
		borderStyle: 'round',
		margin: { top: 1, bottom: 1 }
	});
}

```

--------------------------------------------------------------------------------
/packages/tm-core/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vitest/config';

// __dirname in ESM
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default defineConfig({
	test: {
		globals: true,
		environment: 'node',
		include: [
			'tests/**/*.test.ts',
			'tests/**/*.spec.ts',
			'tests/{unit,integration,e2e}/**/*.{test,spec}.ts',
			'src/**/*.test.ts',
			'src/**/*.spec.ts'
		],
		exclude: ['node_modules', 'dist', '.git', '.cache'],
		coverage: {
			provider: 'v8',
			reporter: ['text', 'json', 'html', 'lcov'],
			exclude: [
				'node_modules/',
				'dist/',
				'tests/',
				'**/*.test.ts',
				'**/*.spec.ts',
				'**/*.d.ts',
				'**/mocks/**',
				'**/fixtures/**',
				'vitest.config.ts',
				'src/index.ts'
			],
			thresholds: {
				branches: 80,
				functions: 80,
				lines: 80,
				statements: 80
			}
		},
		setupFiles: ['./tests/setup.ts'],
		testTimeout: 10000,
		clearMocks: true,
		restoreMocks: true,
		mockReset: true
	},
	resolve: {
		alias: {
			'@': path.resolve(__dirname, './src'),
			'@/types': path.resolve(__dirname, './src/types'),
			'@/providers': path.resolve(__dirname, './src/providers'),
			'@/storage': path.resolve(__dirname, './src/storage'),
			'@/parser': path.resolve(__dirname, './src/parser'),
			'@/utils': path.resolve(__dirname, './src/utils'),
			'@/errors': path.resolve(__dirname, './src/errors')
		}
	}
});

```

--------------------------------------------------------------------------------
/apps/cli/src/utils/project-root.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Project root utilities for CLI
 * Provides smart project root detection for command execution
 */

import { resolve } from 'node:path';
import { findProjectRoot as findProjectRootCore } from '@tm/core';

/**
 * Get the project root directory with fallback to provided path
 *
 * This function intelligently detects the project root by looking for markers like:
 * - .taskmaster directory (highest priority)
 * - .git directory
 * - package.json
 * - Other project markers
 *
 * If a projectPath is explicitly provided, it will be resolved to an absolute path.
 * Otherwise, it will attempt to find the project root starting from current directory.
 *
 * @param projectPath - Optional explicit project path from user
 * @returns The project root directory path (always absolute)
 *
 * @example
 * ```typescript
 * // Auto-detect project root
 * const root = getProjectRoot();
 *
 * // Use explicit path if provided (resolved to absolute path)
 * const root = getProjectRoot('./my-project'); // Resolves relative paths
 * const root = getProjectRoot('/explicit/path'); // Already absolute, returned as-is
 * ```
 */
export function getProjectRoot(projectPath?: string): string {
	// If explicitly provided, resolve it to an absolute path
	// This handles relative paths and ensures Windows paths are normalized
	if (projectPath) {
		return resolve(projectPath);
	}

	// Otherwise, intelligently find the project root
	return findProjectRootCore();
}

```

--------------------------------------------------------------------------------
/packages/tm-core/src/modules/tasks/repositories/task-repository.interface.ts:
--------------------------------------------------------------------------------

```typescript
import { Task, TaskTag } from '../../../common/types/index.js';
import { LoadTasksOptions } from '../../../common/interfaces/storage.interface.js';

/**
 * Brief information
 */
export interface Brief {
	id: string;
	accountId: string;
	createdAt: string;
	name?: string;
	description?: string;
	status?: string;
}

export interface TaskRepository {
	// Task operations
	getTasks(projectId: string, options?: LoadTasksOptions): Promise<Task[]>;
	getTask(projectId: string, taskId: string): Promise<Task | null>;
	createTask(projectId: string, task: Omit<Task, 'id'>): Promise<Task>;
	updateTask(
		projectId: string,
		taskId: string,
		updates: Partial<Task>
	): Promise<Task>;
	deleteTask(projectId: string, taskId: string): Promise<void>;

	// Brief operations
	getBrief(briefId: string): Promise<Brief | null>;

	// Tag operations
	getTags(projectId: string): Promise<TaskTag[]>;
	getTag(projectId: string, tagName: string): Promise<TaskTag | null>;
	createTag(projectId: string, tag: TaskTag): Promise<TaskTag>;
	updateTag(
		projectId: string,
		tagName: string,
		updates: Partial<TaskTag>
	): Promise<TaskTag>;
	deleteTag(projectId: string, tagName: string): Promise<void>;

	// Bulk operations
	bulkCreateTasks(
		projectId: string,
		tasks: Omit<Task, 'id'>[]
	): Promise<Task[]>;
	bulkUpdateTasks(
		projectId: string,
		updates: Array<{ id: string; updates: Partial<Task> }>
	): Promise<Task[]>;
	bulkDeleteTasks(projectId: string, taskIds: string[]): Promise<void>;
}

```

--------------------------------------------------------------------------------
/packages/tm-core/src/modules/storage/index.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Storage layer for the tm-core package
 * This file exports all storage-related classes and interfaces
 */

// Export storage implementations
export { FileStorage } from './adapters/file-storage/index.js';
export { ApiStorage, type ApiStorageConfig } from './adapters/api-storage.js';
export { StorageFactory } from './services/storage-factory.js';

// Export activity logger
export {
	logActivity,
	readActivityLog,
	filterActivityLog,
	type ActivityEvent,
	type ActivityFilter
} from './adapters/activity-logger.js';

// Export storage interface and types
export type {
	IStorage,
	StorageStats
} from '../../common/interfaces/storage.interface.js';

// Placeholder exports - these will be implemented in later tasks
export interface StorageAdapter {
	read(path: string): Promise<string | null>;
	write(path: string, data: string): Promise<void>;
	exists(path: string): Promise<boolean>;
	delete(path: string): Promise<void>;
}

/**
 * @deprecated This is a placeholder class that will be properly implemented in later tasks
 */
export class PlaceholderStorage implements StorageAdapter {
	private data = new Map<string, string>();

	async read(path: string): Promise<string | null> {
		return this.data.get(path) || null;
	}

	async write(path: string, data: string): Promise<void> {
		this.data.set(path, data);
	}

	async exists(path: string): Promise<boolean> {
		return this.data.has(path);
	}

	async delete(path: string): Promise<void> {
		this.data.delete(path);
	}
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/validate-dependencies.md:
--------------------------------------------------------------------------------

```markdown
Validate all task dependencies for issues.

## Dependency Validation

Comprehensive check for dependency problems across the entire project.

## Execution

```bash
task-master validate-dependencies
```

## Validation Checks

1. **Circular Dependencies**
   - A depends on B, B depends on A
   - Complex circular chains
   - Self-dependencies

2. **Missing Dependencies**
   - References to non-existent tasks
   - Deleted task references
   - Invalid task IDs

3. **Logical Issues**
   - Completed tasks depending on pending
   - Cancelled tasks in dependency chains
   - Impossible sequences

4. **Complexity Warnings**
   - Over-complex dependency chains
   - Too many dependencies per task
   - Bottleneck tasks

## Smart Analysis

The validation provides:
- Visual dependency graph
- Critical path analysis
- Bottleneck identification
- Suggested optimizations

## Report Format

```
Dependency Validation Report
━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ No circular dependencies found
⚠️  2 warnings found:
   - Task #23 has 7 dependencies (consider breaking down)
   - Task #45 blocks 5 other tasks (potential bottleneck)
❌ 1 error found:
   - Task #67 depends on deleted task #66

Critical Path: #1 → #5 → #23 → #45 → #50 (15 days)
```

## Actionable Output

For each issue found:
- Clear description
- Impact assessment
- Suggested fix
- Command to resolve

## Next Steps

After validation:
- Run `/taskmaster:fix-dependencies` to auto-fix
- Manually adjust problematic dependencies
- Rerun to verify fixes
```

--------------------------------------------------------------------------------
/packages/tm-core/package.json:
--------------------------------------------------------------------------------

```json
{
	"name": "@tm/core",
	"private": true,
	"description": "Core library for Task Master - TypeScript task management system",
	"type": "module",
	"types": "./src/index.ts",
	"main": "./dist/index.js",
	"exports": {
		".": "./src/index.ts",
		"./auth": "./src/auth/index.ts",
		"./storage": "./src/storage/index.ts",
		"./config": "./src/config/index.ts",
		"./providers": "./src/providers/index.ts",
		"./services": "./src/services/index.ts",
		"./errors": "./src/errors/index.ts",
		"./logger": "./src/logger/index.ts",
		"./types": "./src/types/index.ts",
		"./interfaces": "./src/interfaces/index.ts",
		"./utils": "./src/utils/index.ts"
	},
	"scripts": {
		"test": "vitest run",
		"test:watch": "vitest",
		"test:coverage": "vitest run --coverage",
		"lint": "biome check --write",
		"lint:check": "biome check",
		"lint:fix": "biome check --fix --unsafe",
		"format": "biome format --write",
		"format:check": "biome format",
		"typecheck": "tsc --noEmit"
	},
	"dependencies": {
		"@supabase/supabase-js": "^2.57.4",
		"date-fns": "^4.1.0",
		"fs-extra": "^11.3.2",
		"simple-git": "^3.28.0",
		"steno": "^4.0.2",
		"zod": "^4.1.11"
	},
	"devDependencies": {
		"@types/fs-extra": "^11.0.4",
		"@types/node": "^22.10.5",
		"@vitest/coverage-v8": "^3.2.4",
		"strip-literal": "3.1.0",
		"typescript": "^5.9.2",
		"vitest": "^3.2.4"
	},
	"files": ["src", "README.md", "CHANGELOG.md"],
	"keywords": ["task-management", "typescript", "ai", "prd", "parser"],
	"author": "Task Master AI",
	"version": ""
}

```

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

```javascript
import fs from 'fs';
import path from 'path';
import moveTask from '../../../scripts/modules/task-manager/move-task.js';

const TMP = path.join(process.cwd(), '.tmp_move_task');
const TASKS = path.join(TMP, 'tasks.json');

function seed(initialTasks) {
	fs.rmSync(TMP, { recursive: true, force: true });
	fs.mkdirSync(path.join(TMP, '.taskmaster'), { recursive: true });
	fs.writeFileSync(
		TASKS,
		JSON.stringify(
			{
				master: {
					tasks: initialTasks,
					metadata: { created: new Date().toISOString() }
				}
			},
			null,
			2
		)
	);
}

describe('moveTask basic scenarios', () => {
	afterAll(() => fs.rmSync(TMP, { recursive: true, force: true }));

	it('moves a task to a new ID within same tag', async () => {
		seed([
			{ id: 1, title: 'A' },
			{ id: 2, title: 'B' }
		]);

		await moveTask(TASKS, '1', '3', false, { projectRoot: TMP, tag: 'master' });

		const data = JSON.parse(fs.readFileSync(TASKS, 'utf8'));
		const ids = data.master.tasks.map((t) => t.id);
		expect(ids).toEqual(expect.arrayContaining([2, 3]));
		expect(ids).not.toContain(1);
	});

	it('refuses to move across tags', async () => {
		// build dual-tag structure
		seed([{ id: 1, title: 'task' }]);
		const raw = JSON.parse(fs.readFileSync(TASKS, 'utf8'));
		raw.other = { tasks: [], metadata: { created: new Date().toISOString() } };
		fs.writeFileSync(TASKS, JSON.stringify(raw, null, 2));

		await expect(
			moveTask(TASKS, '1', '2', false, { projectRoot: TMP, tag: 'other' })
		).rejects.toThrow(/Source task/);
	});
});

```

--------------------------------------------------------------------------------
/.taskmaster/templates/example_prd.md:
--------------------------------------------------------------------------------

```markdown
<context>
# Overview  
[Provide a high-level overview of your product here. Explain what problem it solves, who it's for, and why it's valuable.]

# Core Features  
[List and describe the main features of your product. For each feature, include:
- What it does
- Why it's important
- How it works at a high level]

# User Experience  
[Describe the user journey and experience. Include:
- User personas
- Key user flows
- UI/UX considerations]
</context>
<PRD>
# Technical Architecture  
[Outline the technical implementation details:
- System components
- Data models
- APIs and integrations
- Infrastructure requirements]

# Development Roadmap  
[Break down the development process into phases:
- MVP requirements
- Future enhancements
- Do not think about timelines whatsoever -- all that matters is scope and detailing exactly what needs to be build in each phase so it can later be cut up into tasks]

# Logical Dependency Chain
[Define the logical order of development:
- Which features need to be built first (foundation)
- Getting as quickly as possible to something usable/visible front end that works
- Properly pacing and scoping each feature so it is atomic but can also be built upon and improved as development approaches]

# Risks and Mitigations  
[Identify potential risks and how they'll be addressed:
- Technical challenges
- Figuring out the MVP that we can build upon
- Resource constraints]

# Appendix  
[Include any additional information:
- Research findings
- Technical specifications]
</PRD>
```

--------------------------------------------------------------------------------
/assets/example_prd.txt:
--------------------------------------------------------------------------------

```
<context>
# Overview  
[Provide a high-level overview of your product here. Explain what problem it solves, who it's for, and why it's valuable.]

# Core Features  
[List and describe the main features of your product. For each feature, include:
- What it does
- Why it's important
- How it works at a high level]

# User Experience  
[Describe the user journey and experience. Include:
- User personas
- Key user flows
- UI/UX considerations]
</context>
<PRD>
# Technical Architecture  
[Outline the technical implementation details:
- System components
- Data models
- APIs and integrations
- Infrastructure requirements]

# Development Roadmap  
[Break down the development process into phases:
- MVP requirements
- Future enhancements
- Do not think about timelines whatsoever -- all that matters is scope and detailing exactly what needs to be build in each phase so it can later be cut up into tasks]

# Logical Dependency Chain
[Define the logical order of development:
- Which features need to be built first (foundation)
- Getting as quickly as possible to something usable/visible front end that works
- Properly pacing and scoping each feature so it is atomic but can also be built upon and improved as development approaches]

# Risks and Mitigations  
[Identify potential risks and how they'll be addressed:
- Technical challenges
- Figuring out the MVP that we can build upon
- Resource constraints]

# Appendix  
[Include any additional information:
- Research findings
- Technical specifications]
</PRD>
```

--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------

```yaml
name: Release
on:
  push:
    branches:
      - main

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
  contents: write
  pull-requests: write
  id-token: write

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: "npm"

      - name: Cache node_modules
        uses: actions/cache@v4
        with:
          path: |
            node_modules
            */*/node_modules
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-

      - name: Install Dependencies
        run: npm ci
        timeout-minutes: 2

      - name: Check pre-release mode
        run: node ./.github/scripts/check-pre-release-mode.mjs "main"

      - name: Build packages
        run: npm run turbo:build
        env:
          NODE_ENV: production
          FORCE_COLOR: 1
          TM_PUBLIC_BASE_DOMAIN: ${{ secrets.TM_PUBLIC_BASE_DOMAIN }}
          TM_PUBLIC_SUPABASE_URL: ${{ secrets.TM_PUBLIC_SUPABASE_URL }}
          TM_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.TM_PUBLIC_SUPABASE_ANON_KEY }}

      - name: Create Release Pull Request or Publish to npm
        uses: changesets/action@v1
        with:
          publish: node ./.github/scripts/release.mjs
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

```

--------------------------------------------------------------------------------
/apps/extension/src/components/ui/CollapsibleSection.tsx:
--------------------------------------------------------------------------------

```typescript
import type React from 'react';
import { useState } from 'react';
import { Button } from './button';
import { ChevronDown, ChevronRight } from 'lucide-react';
import type { LucideIcon } from 'lucide-react';

interface CollapsibleSectionProps {
	title: string;
	icon?: LucideIcon;
	defaultExpanded?: boolean;
	className?: string;
	headerClassName?: string;
	contentClassName?: string;
	buttonClassName?: string;
	children: React.ReactNode;
	rightElement?: React.ReactNode;
}

export const CollapsibleSection: React.FC<CollapsibleSectionProps> = ({
	title,
	icon: Icon,
	defaultExpanded = false,
	className = '',
	headerClassName = '',
	contentClassName = '',
	buttonClassName = 'text-vscode-foreground/70 hover:text-vscode-foreground',
	children,
	rightElement
}) => {
	const [isExpanded, setIsExpanded] = useState(defaultExpanded);

	return (
		<div className={`mb-8 ${className}`}>
			<div className={`flex items-center gap-2 mb-4 ${headerClassName}`}>
				<Button
					variant="ghost"
					size="sm"
					className={`p-0 h-auto ${buttonClassName}`}
					onClick={() => setIsExpanded(!isExpanded)}
				>
					{isExpanded ? (
						<ChevronDown className="w-4 h-4 mr-1" />
					) : (
						<ChevronRight className="w-4 h-4 mr-1" />
					)}
					{Icon && <Icon className="w-4 h-4 mr-1" />}
					{title}
				</Button>
				{rightElement}
			</div>

			{isExpanded && (
				<div
					className={`bg-widget-background rounded-lg p-4 border border-widget-border ${contentClassName}`}
				>
					{children}
				</div>
			)}
		</div>
	);
};

```

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

```typescript
import React, { useState, useEffect } from 'react';
import { TaskMasterLogo } from '../../components/TaskMasterLogo';

interface SidebarViewProps {
	initialConnectionStatus?: boolean;
}

// Acquire VS Code API only once globally to avoid "already acquired" error
const vscode = window.acquireVsCodeApi ? window.acquireVsCodeApi() : null;

export const SidebarView: React.FC<SidebarViewProps> = ({
	initialConnectionStatus = false
}) => {
	const [isConnected, setIsConnected] = useState(initialConnectionStatus);

	useEffect(() => {
		const handleMessage = (event: MessageEvent) => {
			const message = event.data;
			if (message.type === 'connectionStatus') {
				setIsConnected(message.data.isConnected);
			}
		};

		window.addEventListener('message', handleMessage);
		return () => {
			window.removeEventListener('message', handleMessage);
		};
	}, []);

	const handleOpenBoard = () => {
		vscode?.postMessage({ command: 'openBoard' });
	};

	return (
		<div className="h-full flex items-center justify-center p-6">
			<div className="text-center">
				<TaskMasterLogo className="w-20 h-20 mx-auto mb-5 opacity-80 text-vscode-foreground" />

				<h2 className="text-xl font-semibold mb-6 text-vscode-foreground">
					TaskMaster
				</h2>

				<button
					onClick={handleOpenBoard}
					className="w-full px-4 py-2 bg-vscode-button-background text-vscode-button-foreground rounded hover:bg-vscode-button-hoverBackground transition-colors text-sm font-medium"
				>
					Open Kanban Board
				</button>
			</div>
		</div>
	);
};

```

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

```markdown
---
title: Requirements
sidebarTitle: "Requirements"
---
Before you can start using TaskMaster AI, you'll need to install Node.js and set up at least one model API Key.

## 1. Node.js

TaskMaster AI is built with Node.js and requires it to run. npm (Node Package Manager) comes bundled with Node.js.

<Accordion title="Install Node.js">

### Installation

**Option 1: Download from official website**
1. Visit [nodejs.org](https://nodejs.org)
2. Download the **LTS (Long Term Support)** version for your operating system
3. Run the installer and follow the setup wizard

**Option 2: Use a package manager**

<CodeGroup>

```bash Windows (Chocolatey)
choco install nodejs
```

```bash Windows (winget)
winget install OpenJS.NodeJS
```

</CodeGroup>

</Accordion>

## 2. Model API Key

Taskmaster utilizes AI across several commands, and those require a separate API key. For the purpose of a Quick Start we recommend setting up an API Key with Anthropic for your main model and Perplexity for your research model (optional but recommended).

<Tip>Task Master shows API costs per command used. Most users load $5-10 on their keys and don't have to top it off for a few months.</Tip>

At least one (1) of the following is required:

1. Anthropic API key (Claude API) - **recommended for Quick Start**
2. OpenAI API key
3. Google Gemini API key
4. Perplexity API key (for research model)
5. xAI API Key (for research or main model)
6. OpenRouter API Key (for research or main model)
7. Claude Code (no API key required - requires Claude Code CLI)
```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/convert-task-to-subtask.md:
--------------------------------------------------------------------------------

```markdown
Convert an existing task into a subtask.

Arguments: $ARGUMENTS

Parse parent ID and task ID to convert.

## Task Conversion

Converts an existing standalone task into a subtask of another task.

## Argument Parsing

- "move task 8 under 5"
- "make 8 a subtask of 5"
- "nest 8 in 5"
- "5 8" → make task 8 a subtask of task 5

## Execution

```bash
task-master add-subtask --parent=<parent-id> --task-id=<task-to-convert>
```

## Pre-Conversion Checks

1. **Validation**
   - Both tasks exist and are valid
   - No circular parent relationships
   - Task isn't already a subtask
   - Logical hierarchy makes sense

2. **Impact Analysis**
   - Dependencies that will be affected
   - Tasks that depend on converting task
   - Priority alignment needed
   - Status compatibility

## Conversion Process

1. Change task ID from "8" to "5.1" (next available)
2. Update all dependency references
3. Inherit parent's context where appropriate
4. Adjust priorities if needed
5. Update time estimates

## Smart Features

- Preserve task history
- Maintain dependencies
- Update all references
- Create conversion log

## Example

```
/taskmaster:add-subtask/from-task 5 8
→ Converting: Task #8 becomes subtask #5.1
→ Updated: 3 dependency references
→ Parent task #5 now has 1 subtask
→ Note: Subtask inherits parent's priority

Before: #8 "Implement validation" (standalone)
After:  #5.1 "Implement validation" (subtask of #5)
```

## Post-Conversion

- Show new task hierarchy
- List updated dependencies
- Verify project integrity
- Suggest related conversions
```

--------------------------------------------------------------------------------
/apps/extension/src/components/ui/scroll-area.tsx:
--------------------------------------------------------------------------------

```typescript
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
import type * as React from 'react';

import { cn } from '@/lib/utils';

function ScrollArea({
	className,
	children,
	...props
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
	return (
		<ScrollAreaPrimitive.Root
			data-slot="scroll-area"
			className={cn('relative overflow-hidden', className)}
			{...props}
		>
			<ScrollAreaPrimitive.Viewport
				data-slot="scroll-area-viewport"
				className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 overflow-y-auto"
			>
				{children}
			</ScrollAreaPrimitive.Viewport>
			<ScrollBar />
			<ScrollAreaPrimitive.Corner />
		</ScrollAreaPrimitive.Root>
	);
}

function ScrollBar({
	className,
	orientation = 'vertical',
	...props
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
	return (
		<ScrollAreaPrimitive.ScrollAreaScrollbar
			data-slot="scroll-area-scrollbar"
			orientation={orientation}
			className={cn(
				'flex touch-none p-px transition-colors select-none',
				orientation === 'vertical' &&
					'h-full w-2.5 border-l border-l-transparent',
				orientation === 'horizontal' &&
					'h-2.5 flex-col border-t border-t-transparent',
				className
			)}
			{...props}
		>
			<ScrollAreaPrimitive.ScrollAreaThumb
				data-slot="scroll-area-thumb"
				className="bg-border relative flex-1 rounded-full"
			/>
		</ScrollAreaPrimitive.ScrollAreaScrollbar>
	);
}

export { ScrollArea, ScrollBar };

```

--------------------------------------------------------------------------------
/apps/extension/src/components/ui/badge.tsx:
--------------------------------------------------------------------------------

```typescript
import { Slot } from '@radix-ui/react-slot';
import { type VariantProps, cva } from 'class-variance-authority';
import type * as React from 'react';

import { cn } from '@/lib/utils';

const badgeVariants = cva(
	'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',
	{
		variants: {
			variant: {
				default:
					'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
				secondary:
					'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
				destructive:
					'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
				outline:
					'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground'
			}
		},
		defaultVariants: {
			variant: 'default'
		}
	}
);

function Badge({
	className,
	variant,
	asChild = false,
	...props
}: React.ComponentProps<'span'> &
	VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
	const Comp = asChild ? Slot : 'span';

	return (
		<Comp
			data-slot="badge"
			className={cn(badgeVariants({ variant }), className)}
			{...props}
		/>
	);
}

export { Badge, badgeVariants };

```

--------------------------------------------------------------------------------
/apps/extension/src/services/polling-strategies.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Polling Strategies - Simplified
 * Different algorithms for polling intervals
 */

import type { PollingStrategy } from './polling-service';

/**
 * Fixed interval polling
 */
export class FixedIntervalStrategy implements PollingStrategy {
	constructor(private interval = 10000) {}

	calculateNextInterval(): number {
		return this.interval;
	}

	getName(): string {
		return 'fixed';
	}
}

/**
 * Adaptive polling based on activity
 */
export class AdaptivePollingStrategy implements PollingStrategy {
	private readonly MIN_INTERVAL = 5000; // 5 seconds
	private readonly MAX_INTERVAL = 60000; // 1 minute
	private readonly BASE_INTERVAL = 10000; // 10 seconds

	calculateNextInterval(consecutiveNoChanges: number): number {
		// Start with base interval
		let interval = this.BASE_INTERVAL;

		// If no changes for a while, slow down
		if (consecutiveNoChanges > 5) {
			interval = Math.min(
				this.MAX_INTERVAL,
				this.BASE_INTERVAL * 1.5 ** (consecutiveNoChanges - 5)
			);
		} else if (consecutiveNoChanges === 0) {
			// Recent change, poll more frequently
			interval = this.MIN_INTERVAL;
		}

		return Math.round(interval);
	}

	getName(): string {
		return 'adaptive';
	}
}

/**
 * Create polling strategy from configuration
 */
export function createPollingStrategy(config: any): PollingStrategy {
	const type = config.get('polling.strategy', 'adaptive');
	const interval = config.get('polling.interval', 10000);

	switch (type) {
		case 'fixed':
			return new FixedIntervalStrategy(interval);
		default:
			return new AdaptivePollingStrategy();
	}
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/command-pipeline.md:
--------------------------------------------------------------------------------

```markdown
Execute a pipeline of commands based on a specification.

Arguments: $ARGUMENTS

## Command Pipeline Execution

Parse pipeline specification from arguments. Supported formats:

### Simple Pipeline
`init → expand-all → sprint-plan`

### Conditional Pipeline  
`status → if:pending>10 → sprint-plan → else → next`

### Iterative Pipeline
`for:pending-tasks → expand → complexity-check`

### Smart Pipeline Patterns

**1. Project Setup Pipeline**
```
init [prd] → 
expand-all → 
complexity-report → 
sprint-plan → 
show first-sprint
```

**2. Daily Work Pipeline**
```
standup →
if:in-progress → continue →
else → next → start
```

**3. Task Completion Pipeline**
```
complete [id] →
git-commit →
if:blocked-tasks-freed → show-freed →
next
```

**4. Quality Check Pipeline**
```
list in-progress →
for:each → check-idle-time →
if:idle>1day → prompt-update
```

### Pipeline Features

**Variables**
- Store results: `status → $count=pending-count`
- Use in conditions: `if:$count>10`
- Pass between commands: `expand $high-priority-tasks`

**Error Handling**
- On failure: `try:complete → catch:show-blockers`
- Skip on error: `optional:test-run`
- Retry logic: `retry:3:commit`

**Parallel Execution**
- Parallel branches: `[analyze | test | lint]`
- Join results: `parallel → join:report`

### Execution Flow

1. Parse pipeline specification
2. Validate command sequence
3. Execute with state passing
4. Handle conditions and loops
5. Aggregate results
6. Show summary

This enables complex workflows like:
`parse-prd → expand-all → filter:complex>70 → assign:senior → sprint-plan:weighted`
```

--------------------------------------------------------------------------------
/mcp-server/src/tools/get-operation-status.js:
--------------------------------------------------------------------------------

```javascript
// mcp-server/src/tools/get-operation-status.js
import { z } from 'zod';
import { createErrorResponse, createContentResponse } from './utils.js'; // Assuming these utils exist

/**
 * Register the get_operation_status tool.
 * @param {FastMCP} server - FastMCP server instance.
 * @param {AsyncOperationManager} asyncManager - The async operation manager.
 */
export function registerGetOperationStatusTool(server, asyncManager) {
	server.addTool({
		name: 'get_operation_status',
		description:
			'Retrieves the status and result/error of a background operation.',
		parameters: z.object({
			operationId: z.string().describe('The ID of the operation to check.')
		}),
		execute: async (args, { log }) => {
			try {
				const { operationId } = args;
				log.info(`Checking status for operation ID: ${operationId}`);

				const status = asyncManager.getStatus(operationId);

				// Status will now always return an object, but it might have status='not_found'
				if (status.status === 'not_found') {
					log.warn(`Operation ID not found: ${operationId}`);
					return createErrorResponse(
						status.error?.message || `Operation ID not found: ${operationId}`,
						status.error?.code || 'OPERATION_NOT_FOUND'
					);
				}

				log.info(`Status for ${operationId}: ${status.status}`);
				return createContentResponse(status);
			} catch (error) {
				log.error(`Error in get_operation_status tool: ${error.message}`, {
					stack: error.stack
				});
				return createErrorResponse(
					`Failed to get operation status: ${error.message}`,
					'GET_STATUS_ERROR'
				);
			}
		}
	});
}

```

--------------------------------------------------------------------------------
/packages/tm-core/src/modules/execution/executors/executor-factory.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Factory for creating task executors
 */

import { getLogger } from '../../../common/logger/index.js';
import { ClaudeExecutor } from '../executors/claude-executor.js';
import type { ExecutorOptions, ExecutorType, ITaskExecutor } from '../types.js';

export class ExecutorFactory {
	private static logger = getLogger('ExecutorFactory');

	/**
	 * Create an executor based on the provided options
	 */
	static create(options: ExecutorOptions): ITaskExecutor {
		this.logger.debug(`Creating executor of type: ${options.type}`);

		switch (options.type) {
			case 'claude':
				return new ClaudeExecutor(options.projectRoot, options.config);

			case 'shell':
				// Placeholder for shell executor
				throw new Error('Shell executor not yet implemented');

			case 'custom':
				// Placeholder for custom executor
				throw new Error('Custom executor not yet implemented');

			default:
				throw new Error(`Unknown executor type: ${options.type}`);
		}
	}

	/**
	 * Get the default executor type based on available tools
	 */
	static async getDefaultExecutor(
		projectRoot: string
	): Promise<ExecutorType | null> {
		// Check for Claude first
		const claudeExecutor = new ClaudeExecutor(projectRoot);
		if (await claudeExecutor.isAvailable()) {
			this.logger.info('Claude CLI detected as default executor');
			return 'claude';
		}

		// Could check for other executors here
		this.logger.warn('No default executor available');
		return null;
	}

	/**
	 * Get list of available executor types
	 */
	static getAvailableTypes(): ExecutorType[] {
		return ['claude', 'shell', 'custom'];
	}
}

```

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

```markdown
List tasks with intelligent argument parsing.

Parse arguments to determine filters and display options:
- Status: pending, in-progress, done, review, deferred, cancelled
- Priority: high, medium, low (or priority:high)
- Special: subtasks, tree, dependencies, blocked
- IDs: Direct numbers (e.g., "1,3,5" or "1-5")
- Complex: "pending high" = pending AND high priority

Arguments: $ARGUMENTS

Let me parse your request intelligently:

1. **Detect Filter Intent**
   - If arguments contain status keywords → filter by status
   - If arguments contain priority → filter by priority
   - If arguments contain "subtasks" → include subtasks
   - If arguments contain "tree" → hierarchical view
   - If arguments contain numbers → show specific tasks
   - If arguments contain "blocked" → show blocked tasks only

2. **Smart Combinations**
   Examples of what I understand:
   - "pending high" → pending tasks with high priority
   - "done today" → tasks completed today
   - "blocked" → tasks with unmet dependencies
   - "1-5" → tasks 1 through 5
   - "subtasks tree" → hierarchical view with subtasks

3. **Execute Appropriate Query**
   Based on parsed intent, run the most specific task-master command

4. **Enhanced Display**
   - Group by relevant criteria
   - Show most important information first
   - Use visual indicators for quick scanning
   - Include relevant metrics

5. **Intelligent Suggestions**
   Based on what you're viewing, suggest next actions:
   - Many pending? → Suggest priority order
   - Many blocked? → Show dependency resolution
   - Looking at specific tasks? → Show related tasks
```

--------------------------------------------------------------------------------
/packages/tm-core/src/common/types/repository-types.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Type definitions for repository operations
 */
import { Database, Tables } from './database.types.js';

/**
 * Task row from database with optional joined relations
 */
export interface TaskWithRelations extends Tables<'tasks'> {
	document?: {
		id: string;
		document_name: string;
		title: string;
		description: string | null;
	} | null;
}

/**
 * Dependency row with joined display_id
 */
export interface DependencyWithDisplayId {
	task_id: string;
	depends_on_task: {
		display_id: string;
	} | null;
}

/**
 * Task metadata structure
 */
export interface TaskMetadata {
	details?: string;
	testStrategy?: string;
	[key: string]: unknown; // Allow additional fields but be explicit
}

/**
 * Database update payload for tasks
 */
export type TaskDatabaseUpdate =
	Database['public']['Tables']['tasks']['Update'];
/**
 * Configuration for task queries
 */
export interface TaskQueryConfig {
	briefId: string;
	includeSubtasks?: boolean;
	includeDependencies?: boolean;
	includeDocument?: boolean;
}

/**
 * Result of a task fetch operation
 */
export interface TaskFetchResult {
	task: Tables<'tasks'>;
	subtasks: Tables<'tasks'>[];
	dependencies: Map<string, string[]>;
}

/**
 * Task validation errors
 */
export class TaskValidationError extends Error {
	constructor(
		message: string,
		public readonly field: string,
		public readonly value: unknown
	) {
		super(message);
		this.name = 'TaskValidationError';
	}
}

/**
 * Context validation errors
 */
export class ContextValidationError extends Error {
	constructor(message: string) {
		super(message);
		this.name = 'ContextValidationError';
	}
}

```

--------------------------------------------------------------------------------
/test-config-manager.js:
--------------------------------------------------------------------------------

```javascript
// test-config-manager.js
console.log('=== ENVIRONMENT TEST ===');
console.log('Working directory:', process.cwd());
console.log('NODE_PATH:', process.env.NODE_PATH);

// Test basic imports
try {
	console.log('Importing config-manager');
	// Use dynamic import for ESM
	const configManagerModule = await import(
		'./scripts/modules/config-manager.js'
	);
	const configManager = configManagerModule.default || configManagerModule;
	console.log('Config manager loaded successfully');

	console.log('Loading supported models');
	// Add after line 14 (after "Config manager loaded successfully")
	console.log('Config manager exports:', Object.keys(configManager));
} catch (error) {
	console.error('Import error:', error.message);
	console.error(error.stack);
}

// Test file access
try {
	console.log('Checking for .taskmasterconfig');
	// Use dynamic import for ESM
	const { readFileSync, existsSync } = await import('fs');
	const { resolve } = await import('path');

	const configExists = existsSync('./.taskmasterconfig');
	console.log('.taskmasterconfig exists:', configExists);

	if (configExists) {
		const config = JSON.parse(readFileSync('./.taskmasterconfig', 'utf-8'));
		console.log('Config keys:', Object.keys(config));
	}

	console.log('Checking for supported-models.json');
	const modelsPath = resolve('./scripts/modules/supported-models.json');
	console.log('Models path:', modelsPath);
	const modelsExists = existsSync(modelsPath);
	console.log('supported-models.json exists:', modelsExists);
} catch (error) {
	console.error('File access error:', error.message);
}

console.log('=== TEST COMPLETE ===');

```

--------------------------------------------------------------------------------
/tests/integration/claude-code-error-handling.test.js:
--------------------------------------------------------------------------------

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

// Mock AI SDK functions at the top level
jest.unstable_mockModule('ai', () => ({
	generateObject: jest.fn(),
	generateText: jest.fn(),
	streamText: jest.fn(),
	streamObject: jest.fn(),
	zodSchema: jest.fn(),
	JSONParseError: class JSONParseError extends Error {},
	NoObjectGeneratedError: class NoObjectGeneratedError extends Error {}
}));

// Mock CLI failure scenario
jest.unstable_mockModule('ai-sdk-provider-claude-code', () => ({
	createClaudeCode: jest.fn(() => {
		throw new Error('Claude Code CLI not found');
	})
}));

// Import the provider after mocking
const { ClaudeCodeProvider } = await import(
	'../../src/ai-providers/claude-code.js'
);

describe('Claude Code Error Handling', () => {
	beforeEach(() => {
		jest.clearAllMocks();
	});

	it('should throw a CLI-not-available error (with or without commandName)', () => {
		const provider = new ClaudeCodeProvider();
		expect(() => provider.getClient()).toThrow(
			/Claude Code CLI not available/i
		);
		expect(() => provider.getClient({ commandName: 'test' })).toThrow(
			/Claude Code CLI not available/i
		);
	});

	it('should still support basic provider functionality', () => {
		const provider = new ClaudeCodeProvider();

		// These should work even if CLI is not available
		expect(provider.name).toBe('Claude Code');
		expect(provider.getSupportedModels()).toEqual(['opus', 'sonnet', 'haiku']);
		expect(provider.isModelSupported('sonnet')).toBe(true);
		expect(provider.isModelSupported('haiku')).toBe(true);
		expect(provider.isRequiredApiKey()).toBe(false);
		expect(() => provider.validateAuth()).not.toThrow();
	});
});

```

--------------------------------------------------------------------------------
/packages/ai-sdk-provider-grok-cli/src/types.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * Type definitions for Grok CLI provider
 */

/**
 * Settings for configuring Grok CLI behavior
 */
export interface GrokCliSettings {
	/** API key for Grok CLI */
	apiKey?: string;
	/** Base URL for Grok API */
	baseURL?: string;
	/** Default model to use */
	model?: string;
	/** Timeout in milliseconds */
	timeout?: number;
	/** Working directory for CLI commands */
	workingDirectory?: string;
}

/**
 * Model identifiers supported by Grok CLI
 */
export type GrokCliModelId = string;

/**
 * Error metadata for Grok CLI operations
 */
export interface GrokCliErrorMetadata {
	/** Error code */
	code?: string;
	/** Process exit code */
	exitCode?: number;
	/** Standard error output */
	stderr?: string;
	/** Standard output */
	stdout?: string;
	/** Excerpt of the prompt that caused the error */
	promptExcerpt?: string;
	/** Timeout value in milliseconds */
	timeoutMs?: number;
}

/**
 * Message format for Grok CLI communication
 */
export interface GrokCliMessage {
	/** Message role (user, assistant, system) */
	role: string;
	/** Message content */
	content: string;
}

/**
 * Response format from Grok CLI
 */
export interface GrokCliResponse {
	/** Message role */
	role: string;
	/** Response content */
	content: string;
	/** Token usage information */
	usage?: {
		/** Input tokens used */
		prompt_tokens?: number;
		/** Output tokens used */
		completion_tokens?: number;
		/** Total tokens used */
		total_tokens?: number;
	};
}

/**
 * Configuration options for Grok CLI language model
 */
export interface GrokCliLanguageModelOptions {
	/** Model identifier */
	id: GrokCliModelId;
	/** Model settings */
	settings?: GrokCliSettings;
}

```

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

```typescript
/**
 * @fileoverview Type definitions for complexity analysis reports
 */

/**
 * Analysis result for a single task
 */
export interface ComplexityAnalysis {
	/** Task ID being analyzed */
	taskId: string | number;
	/** Task title */
	taskTitle: string;
	/** Complexity score (1-10 scale) */
	complexityScore: number;
	/** Recommended number of subtasks */
	recommendedSubtasks: number;
	/** AI-generated prompt for task expansion */
	expansionPrompt: string;
	/** Reasoning behind the complexity assessment */
	complexityReasoning: string;
}

/**
 * Metadata about the complexity report
 */
export interface ComplexityReportMetadata {
	/** When the report was generated */
	generatedAt: string;
	/** Number of tasks analyzed in this run */
	tasksAnalyzed: number;
	/** Total number of tasks in the file */
	totalTasks?: number;
	/** Total analyses in the report (across all runs) */
	analysisCount?: number;
	/** Complexity threshold score used */
	thresholdScore: number;
	/** Project name */
	projectName?: string;
	/** Whether research mode was used */
	usedResearch: boolean;
}

/**
 * Complete complexity analysis report
 */
export interface ComplexityReport {
	/** Report metadata */
	meta: ComplexityReportMetadata;
	/** Array of complexity analyses */
	complexityAnalysis: ComplexityAnalysis[];
}

/**
 * Complexity data to be attached to a Task
 */
export interface TaskComplexityData {
	/** Complexity score (1-10 scale) */
	complexityScore?: number;
	/** Recommended number of subtasks */
	recommendedSubtasks?: number;
	/** AI-generated expansion prompt */
	expansionPrompt?: string;
	/** Reasoning behind the assessment */
	complexityReasoning?: string;
}

```

--------------------------------------------------------------------------------
/tests/setup.js:
--------------------------------------------------------------------------------

```javascript
/**
 * Jest setup file
 *
 * This file is run before each test suite to set up the test environment.
 */

import path from 'path';
import { fileURLToPath } from 'url';

// Capture the actual original working directory before any changes
const originalWorkingDirectory = process.cwd();

// Store original working directory and project root
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const projectRoot = path.resolve(__dirname, '..');

// Ensure we're always starting from the project root
if (process.cwd() !== projectRoot) {
	process.chdir(projectRoot);
}

// Mock environment variables
process.env.MODEL = 'sonar-pro';
process.env.MAX_TOKENS = '64000';
process.env.TEMPERATURE = '0.2';
process.env.DEBUG = 'false';
process.env.TASKMASTER_LOG_LEVEL = 'error'; // Set to error to reduce noise in tests
process.env.DEFAULT_SUBTASKS = '5';
process.env.DEFAULT_PRIORITY = 'medium';
process.env.PROJECT_NAME = 'Test Project';
process.env.PROJECT_VERSION = '1.0.0';
// Ensure tests don't make real API calls by setting mock API keys
process.env.ANTHROPIC_API_KEY = 'test-mock-api-key-for-tests';
process.env.PERPLEXITY_API_KEY = 'test-mock-perplexity-key-for-tests';

// Add global test helpers if needed
global.wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

// Store original working directory for tests that need it
global.originalWorkingDirectory = originalWorkingDirectory;
global.projectRoot = projectRoot;

// If needed, silence console during tests
if (process.env.SILENCE_CONSOLE === 'true') {
	global.console = {
		...console,
		log: () => {},
		info: () => {},
		warn: () => {},
		error: () => {}
	};
}

```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/project-status.md:
--------------------------------------------------------------------------------

```markdown
Enhanced status command with comprehensive project insights.

Arguments: $ARGUMENTS

## Intelligent Status Overview

### 1. **Executive Summary**
Quick dashboard view:
- 🏃 Active work (in-progress tasks)
- 📊 Progress metrics (% complete, velocity)
- 🚧 Blockers and risks
- ⏱️ Time analysis (estimated vs actual)
- 🎯 Sprint/milestone progress

### 2. **Contextual Analysis**

Based on $ARGUMENTS, focus on:
- "sprint" → Current sprint progress and burndown
- "blocked" → Dependency chains and resolution paths
- "team" → Task distribution and workload
- "timeline" → Schedule adherence and projections
- "risk" → High complexity or overdue items

### 3. **Smart Insights**

**Workflow Health:**
- Idle tasks (in-progress > 24h without updates)
- Bottlenecks (multiple tasks waiting on same dependency)
- Quick wins (low complexity, high impact)

**Predictive Analytics:**
- Completion projections based on velocity
- Risk of missing deadlines
- Recommended task order for optimal flow

### 4. **Visual Intelligence**

Dynamic visualization based on data:
```
Sprint Progress: ████████░░ 80% (16/20 tasks)
Velocity Trend: ↗️ +15% this week
Blocked Tasks:  🔴 3 critical path items

Priority Distribution:
High:   ████████ 8 tasks (2 blocked)
Medium: ████░░░░ 4 tasks
Low:    ██░░░░░░ 2 tasks
```

### 5. **Actionable Recommendations**

Based on analysis:
1. **Immediate actions** (unblock critical path)
2. **Today's focus** (optimal task sequence)
3. **Process improvements** (recurring patterns)
4. **Resource needs** (skills, time, dependencies)

### 6. **Historical Context**

Compare to previous periods:
- Velocity changes
- Pattern recognition
- Improvement areas
- Success patterns to repeat
```

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

```markdown
---
title: "Example Cursor AI Interactions"
description: "Below are some common interactions with Cursor AI when using Task Master"
---

<AccordionGroup>
  <Accordion title="Starting a new project">
    ```
    I've just initialized a new project with Claude Task Master. I have a PRD at scripts/prd.txt.
    Can you help me parse it and set up the initial tasks?
    ```
  </Accordion>

  <Accordion title="Working on tasks">
    ```
    What's the next task I should work on? Please consider dependencies and priorities.
    ```
  </Accordion>

  <Accordion title="Implementing a specific task">
    ```
    I'd like to implement task 4. Can you help me understand what needs to be done and how to approach it?
    ```
  </Accordion>

  <Accordion title="Managing subtasks">
    ```
    I need to regenerate the subtasks for task 3 with a different approach. Can you help me clear and regenerate them?
    ```
  </Accordion>

  <Accordion title="Handling changes">
    ```
    We've decided to use MongoDB instead of PostgreSQL. Can you update all future tasks to reflect this change?
    ```
  </Accordion>

  <Accordion title="Completing work">
    ```
    I've finished implementing the authentication system described in task 2. All tests are passing.
    Please mark it as complete and tell me what I should work on next.
    ```
  </Accordion>

  <Accordion title="Analyzing complexity">
    ```
    Can you analyze the complexity of our tasks to help me understand which ones need to be broken down further?
    ```
  </Accordion>

  <Accordion title="Viewing complexity report">
    ```
    Can you show me the complexity report in a more readable format?
    ```
  </Accordion>
</AccordionGroup>

```

--------------------------------------------------------------------------------
/src/ai-providers/azure.js:
--------------------------------------------------------------------------------

```javascript
/**
 * azure.js
 * AI provider implementation for Azure OpenAI models using Vercel AI SDK.
 */

import { createAzure } from '@ai-sdk/azure';
import { BaseAIProvider } from './base-provider.js';

export class AzureProvider extends BaseAIProvider {
	constructor() {
		super();
		this.name = 'Azure OpenAI';
	}

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

	/**
	 * Validates Azure-specific authentication parameters
	 * @param {object} params - Parameters to validate
	 * @throws {Error} If required parameters are missing
	 */
	validateAuth(params) {
		if (!params.apiKey) {
			throw new Error('Azure API key is required');
		}

		if (!params.baseURL) {
			throw new Error(
				'Azure endpoint URL is required. Set it in .taskmasterconfig global.azureBaseURL or models.[role].baseURL'
			);
		}
	}

	/**
	 * Creates and returns an Azure OpenAI client instance.
	 * @param {object} params - Parameters for client initialization
	 * @param {string} params.apiKey - Azure OpenAI API key
	 * @param {string} params.baseURL - Azure OpenAI endpoint URL (from .taskmasterconfig global.azureBaseURL or models.[role].baseURL)
	 * @returns {Function} Azure OpenAI client function
	 * @throws {Error} If client initialization fails
	 */
	getClient(params) {
		try {
			const { apiKey, baseURL } = params;
			const fetchImpl = this.createProxyFetch();

			return createAzure({
				apiKey,
				baseURL,
				...(fetchImpl && { fetch: fetchImpl })
			});
		} catch (error) {
			this.handleError('client initialization', error);
		}
	}
}

```

--------------------------------------------------------------------------------
/packages/tm-core/src/common/utils/index.ts:
--------------------------------------------------------------------------------

```typescript
/**
 * @fileoverview Utility functions for the tm-core package
 * This file exports all utility functions and helper classes
 */

// Export ID generation utilities
export {
	generateTaskId as generateId, // Alias for backward compatibility
	generateTaskId,
	generateSubtaskId,
	isValidTaskId,
	isValidSubtaskId,
	getParentTaskId
} from './id-generator.js';

// Export git utilities
export {
	isGitRepository,
	isGitRepositorySync,
	getCurrentBranch,
	getCurrentBranchSync,
	getLocalBranches,
	getRemoteBranches,
	isGhCliAvailable,
	getGitHubRepoInfo,
	getGitRepositoryRoot,
	getDefaultBranch,
	isOnDefaultBranch,
	insideGitWorkTree,
	sanitizeBranchNameForTag,
	isValidBranchForTag,
	type GitHubRepoInfo
} from './git-utils.js';

// Export path normalization utilities
export {
	normalizeProjectPath,
	denormalizeProjectPath,
	isValidNormalizedPath
} from './path-normalizer.js';

// Export run ID generation utilities
export {
	generateRunId,
	isValidRunId,
	parseRunId,
	compareRunIds
} from './run-id-generator.js';

// Export project root finding utilities
export {
	findProjectRoot,
	normalizeProjectRoot
} from './project-root-finder.js';

// Export path construction utilities
export { getProjectPaths } from './path-helpers.js';

// Additional utility exports

/**
 * Formats a date for task timestamps
 * @deprecated This is a placeholder function that will be properly implemented in later tasks
 */
export function formatDate(date: Date = new Date()): string {
	return date.toISOString();
}

/**
 * Deep clones an object
 * @deprecated This is a placeholder function that will be properly implemented in later tasks
 */
export function deepClone<T>(obj: T): T {
	return JSON.parse(JSON.stringify(obj));
}

```

--------------------------------------------------------------------------------
/.taskmaster/tasks/task_007_tm-start.txt:
--------------------------------------------------------------------------------

```
# Task ID: 7
# Title: Integrate execution flow in start command
# Status: pending
# Dependencies: 3, 4
# Priority: high
# Description: Connect all the components to implement the complete execution flow for the start command
# Details:
Update the execute method in the StartCommand class to integrate all the components and implement the complete execution flow as described in the PRD:
1. Validate task exists
2. Build standardized prompt
3. Execute claude-code
4. Check git status for changes
5. Auto-mark task as done if changes detected

```typescript
public async execute(taskId: string): Promise<void> {
  // Validate task exists
  const core = await createTaskMasterCore();
  const task = await core.tasks.getById(parseInt(taskId, 10));
  
  if (!task) {
    console.error(`Task with ID ${taskId} not found`);
    process.exit(1);
  }
  
  // Build prompt
  const prompt = this.buildPrompt(taskId);
  
  // Execute claude-code
  await this.executeClaude(prompt);
  
  // Check git status
  const changedFiles = await this.checkGitChanges();
  
  if (changedFiles.length > 0) {
    console.log('\nChanges detected in the following files:');
    changedFiles.forEach(file => console.log(`- ${file}`));
    
    // Auto-mark task as done
    await this.markTaskAsDone(taskId);
    console.log(`\nTask ${taskId} completed successfully and marked as done.`);
  } else {
    console.warn('\nNo changes detected after claude-code execution. Task not marked as done.');
  }
}
```

# Test Strategy:
Test the complete execution flow by running the start command with a valid task ID and verifying that all steps are executed correctly. Test with both scenarios: when changes are detected and when no changes are detected.

```

--------------------------------------------------------------------------------
/tests/unit/prompts/prompt-migration.test.js:
--------------------------------------------------------------------------------

```javascript
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const promptsDir = path.join(__dirname, '../../../src/prompts');

describe('Prompt Migration Validation', () => {
	const bannedPhrases = [
		'Respond ONLY with',
		'Return only the',
		'valid JSON',
		'Do not include any explanatory text',
		'Do not include any explanation',
		'code block markers'
	];

	// Map banned phrases to contexts where they're allowed
	const allowedContexts = {
		'respond only with': ['Use markdown formatting for better readability'],
		'return only the': ['Use markdown formatting for better readability']
	};

	test('prompts should not contain JSON formatting instructions', () => {
		const promptFiles = fs
			.readdirSync(promptsDir)
			.filter((file) => file.endsWith('.json') && !file.includes('schema'))
			// Exclude update-subtask.json as it returns plain strings, not JSON
			.filter((file) => file !== 'update-subtask.json');

		promptFiles.forEach((file) => {
			const content = fs.readFileSync(path.join(promptsDir, file), 'utf8');

			bannedPhrases.forEach((phrase) => {
				const lowerContent = content.toLowerCase();
				const lowerPhrase = phrase.toLowerCase();

				if (lowerContent.includes(lowerPhrase)) {
					// Check if this phrase is allowed in its context
					const allowedInContext = allowedContexts[lowerPhrase];
					const isAllowed =
						allowedInContext &&
						allowedInContext.some((context) =>
							lowerContent.includes(context.toLowerCase())
						);

					expect(isAllowed).toBe(
						true,
						`File ${file} contains banned phrase "${phrase}" without allowed context`
					);
				}
			});
		});
	});
});

```

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

```javascript
/**
 * tools/rules.js
 * Tool to add or remove rules from a project (MCP server)
 */

import { z } from 'zod';
import {
	createErrorResponse,
	handleApiResult,
	withNormalizedProjectRoot
} from './utils.js';
import { rulesDirect } from '../core/direct-functions/rules.js';
import { RULE_PROFILES } from '../../../src/constants/profiles.js';

/**
 * Register the rules tool with the MCP server
 * @param {Object} server - FastMCP server instance
 */
export function registerRulesTool(server) {
	server.addTool({
		name: 'rules',
		description: 'Add or remove rule profiles from the project.',
		parameters: z.object({
			action: z
				.enum(['add', 'remove'])
				.describe('Whether to add or remove rule profiles.'),
			profiles: z
				.array(z.enum(RULE_PROFILES))
				.min(1)
				.describe(
					`List of rule profiles to add or remove (e.g., [\"cursor\", \"roo\"]). Available options: ${RULE_PROFILES.join(', ')}`
				),
			projectRoot: z
				.string()
				.describe(
					'The root directory of the project. Must be an absolute path.'
				),
			force: z
				.boolean()
				.optional()
				.default(false)
				.describe(
					'DANGEROUS: Force removal even if it would leave no rule profiles. Only use if you are absolutely certain.'
				)
		}),
		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
			try {
				log.info(
					`[rules tool] Executing action: ${args.action} for profiles: ${args.profiles.join(', ')} in ${args.projectRoot}`
				);
				const result = await rulesDirect(args, log, { session });
				return handleApiResult(result, log);
			} catch (error) {
				log.error(`[rules tool] Error: ${error.message}`);
				return createErrorResponse(error.message, { details: error.stack });
			}
		})
	});
}

```
Page 3/50FirstPrevNextLast