#
tokens: 49359/50000 52/975 files (page 5/69)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 5 of 69. Use http://codebase.md/eyaltoledano/claude-task-master?lines=true&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

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

```markdown
 1 | ---
 2 | title: "Example Cursor AI Interactions"
 3 | description: "Below are some common interactions with Cursor AI when using Task Master"
 4 | ---
 5 | 
 6 | <AccordionGroup>
 7 |   <Accordion title="Starting a new project">
 8 |     ```
 9 |     I've just initialized a new project with Claude Task Master. I have a PRD at scripts/prd.txt.
10 |     Can you help me parse it and set up the initial tasks?
11 |     ```
12 |   </Accordion>
13 | 
14 |   <Accordion title="Working on tasks">
15 |     ```
16 |     What's the next task I should work on? Please consider dependencies and priorities.
17 |     ```
18 |   </Accordion>
19 | 
20 |   <Accordion title="Implementing a specific task">
21 |     ```
22 |     I'd like to implement task 4. Can you help me understand what needs to be done and how to approach it?
23 |     ```
24 |   </Accordion>
25 | 
26 |   <Accordion title="Managing subtasks">
27 |     ```
28 |     I need to regenerate the subtasks for task 3 with a different approach. Can you help me clear and regenerate them?
29 |     ```
30 |   </Accordion>
31 | 
32 |   <Accordion title="Handling changes">
33 |     ```
34 |     We've decided to use MongoDB instead of PostgreSQL. Can you update all future tasks to reflect this change?
35 |     ```
36 |   </Accordion>
37 | 
38 |   <Accordion title="Completing work">
39 |     ```
40 |     I've finished implementing the authentication system described in task 2. All tests are passing.
41 |     Please mark it as complete and tell me what I should work on next.
42 |     ```
43 |   </Accordion>
44 | 
45 |   <Accordion title="Analyzing complexity">
46 |     ```
47 |     Can you analyze the complexity of our tasks to help me understand which ones need to be broken down further?
48 |     ```
49 |   </Accordion>
50 | 
51 |   <Accordion title="Viewing complexity report">
52 |     ```
53 |     Can you show me the complexity report in a more readable format?
54 |     ```
55 |   </Accordion>
56 | </AccordionGroup>
57 | 
```

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

```javascript
 1 | /**
 2 |  * azure.js
 3 |  * AI provider implementation for Azure OpenAI models using Vercel AI SDK.
 4 |  */
 5 | 
 6 | import { createAzure } from '@ai-sdk/azure';
 7 | import { BaseAIProvider } from './base-provider.js';
 8 | 
 9 | export class AzureProvider extends BaseAIProvider {
10 | 	constructor() {
11 | 		super();
12 | 		this.name = 'Azure OpenAI';
13 | 	}
14 | 
15 | 	/**
16 | 	 * Returns the environment variable name required for this provider's API key.
17 | 	 * @returns {string} The environment variable name for the Azure OpenAI API key
18 | 	 */
19 | 	getRequiredApiKeyName() {
20 | 		return 'AZURE_OPENAI_API_KEY';
21 | 	}
22 | 
23 | 	/**
24 | 	 * Validates Azure-specific authentication parameters
25 | 	 * @param {object} params - Parameters to validate
26 | 	 * @throws {Error} If required parameters are missing
27 | 	 */
28 | 	validateAuth(params) {
29 | 		if (!params.apiKey) {
30 | 			throw new Error('Azure API key is required');
31 | 		}
32 | 
33 | 		if (!params.baseURL) {
34 | 			throw new Error(
35 | 				'Azure endpoint URL is required. Set it in .taskmasterconfig global.azureBaseURL or models.[role].baseURL'
36 | 			);
37 | 		}
38 | 	}
39 | 
40 | 	/**
41 | 	 * Creates and returns an Azure OpenAI client instance.
42 | 	 * @param {object} params - Parameters for client initialization
43 | 	 * @param {string} params.apiKey - Azure OpenAI API key
44 | 	 * @param {string} params.baseURL - Azure OpenAI endpoint URL (from .taskmasterconfig global.azureBaseURL or models.[role].baseURL)
45 | 	 * @returns {Function} Azure OpenAI client function
46 | 	 * @throws {Error} If client initialization fails
47 | 	 */
48 | 	getClient(params) {
49 | 		try {
50 | 			const { apiKey, baseURL } = params;
51 | 			const fetchImpl = this.createProxyFetch();
52 | 
53 | 			return createAzure({
54 | 				apiKey,
55 | 				baseURL,
56 | 				...(fetchImpl && { fetch: fetchImpl })
57 | 			});
58 | 		} catch (error) {
59 | 			this.handleError('client initialization', error);
60 | 		}
61 | 	}
62 | }
63 | 
```

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

```typescript
 1 | /**
 2 |  * @fileoverview Utility functions for the tm-core package
 3 |  * This file exports all utility functions and helper classes
 4 |  */
 5 | 
 6 | // Export ID generation utilities
 7 | export {
 8 | 	generateTaskId as generateId, // Alias for backward compatibility
 9 | 	generateTaskId,
10 | 	generateSubtaskId,
11 | 	isValidTaskId,
12 | 	isValidSubtaskId,
13 | 	getParentTaskId
14 | } from './id-generator.js';
15 | 
16 | // Export git utilities
17 | export {
18 | 	isGitRepository,
19 | 	isGitRepositorySync,
20 | 	getCurrentBranch,
21 | 	getCurrentBranchSync,
22 | 	getLocalBranches,
23 | 	getRemoteBranches,
24 | 	isGhCliAvailable,
25 | 	getGitHubRepoInfo,
26 | 	getGitRepositoryRoot,
27 | 	getDefaultBranch,
28 | 	isOnDefaultBranch,
29 | 	insideGitWorkTree,
30 | 	sanitizeBranchNameForTag,
31 | 	isValidBranchForTag,
32 | 	type GitHubRepoInfo
33 | } from './git-utils.js';
34 | 
35 | // Export path normalization utilities
36 | export {
37 | 	normalizeProjectPath,
38 | 	denormalizeProjectPath,
39 | 	isValidNormalizedPath
40 | } from './path-normalizer.js';
41 | 
42 | // Export run ID generation utilities
43 | export {
44 | 	generateRunId,
45 | 	isValidRunId,
46 | 	parseRunId,
47 | 	compareRunIds
48 | } from './run-id-generator.js';
49 | 
50 | // Export project root finding utilities
51 | export {
52 | 	findProjectRoot,
53 | 	normalizeProjectRoot
54 | } from './project-root-finder.js';
55 | 
56 | // Export path construction utilities
57 | export { getProjectPaths } from './path-helpers.js';
58 | 
59 | // Additional utility exports
60 | 
61 | /**
62 |  * Formats a date for task timestamps
63 |  * @deprecated This is a placeholder function that will be properly implemented in later tasks
64 |  */
65 | export function formatDate(date: Date = new Date()): string {
66 | 	return date.toISOString();
67 | }
68 | 
69 | /**
70 |  * Deep clones an object
71 |  * @deprecated This is a placeholder function that will be properly implemented in later tasks
72 |  */
73 | export function deepClone<T>(obj: T): T {
74 | 	return JSON.parse(JSON.stringify(obj));
75 | }
76 | 
```

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

```
 1 | # Task ID: 7
 2 | # Title: Integrate execution flow in start command
 3 | # Status: pending
 4 | # Dependencies: 3, 4
 5 | # Priority: high
 6 | # Description: Connect all the components to implement the complete execution flow for the start command
 7 | # Details:
 8 | Update the execute method in the StartCommand class to integrate all the components and implement the complete execution flow as described in the PRD:
 9 | 1. Validate task exists
10 | 2. Build standardized prompt
11 | 3. Execute claude-code
12 | 4. Check git status for changes
13 | 5. Auto-mark task as done if changes detected
14 | 
15 | ```typescript
16 | public async execute(taskId: string): Promise<void> {
17 |   // Validate task exists
18 |   const core = await createTaskMasterCore();
19 |   const task = await core.tasks.getById(parseInt(taskId, 10));
20 |   
21 |   if (!task) {
22 |     console.error(`Task with ID ${taskId} not found`);
23 |     process.exit(1);
24 |   }
25 |   
26 |   // Build prompt
27 |   const prompt = this.buildPrompt(taskId);
28 |   
29 |   // Execute claude-code
30 |   await this.executeClaude(prompt);
31 |   
32 |   // Check git status
33 |   const changedFiles = await this.checkGitChanges();
34 |   
35 |   if (changedFiles.length > 0) {
36 |     console.log('\nChanges detected in the following files:');
37 |     changedFiles.forEach(file => console.log(`- ${file}`));
38 |     
39 |     // Auto-mark task as done
40 |     await this.markTaskAsDone(taskId);
41 |     console.log(`\nTask ${taskId} completed successfully and marked as done.`);
42 |   } else {
43 |     console.warn('\nNo changes detected after claude-code execution. Task not marked as done.');
44 |   }
45 | }
46 | ```
47 | 
48 | # Test Strategy:
49 | 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.
50 | 
```

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

```javascript
 1 | import fs from 'fs';
 2 | import path from 'path';
 3 | import { fileURLToPath } from 'url';
 4 | 
 5 | const __dirname = path.dirname(fileURLToPath(import.meta.url));
 6 | const promptsDir = path.join(__dirname, '../../../src/prompts');
 7 | 
 8 | describe('Prompt Migration Validation', () => {
 9 | 	const bannedPhrases = [
10 | 		'Respond ONLY with',
11 | 		'Return only the',
12 | 		'valid JSON',
13 | 		'Do not include any explanatory text',
14 | 		'Do not include any explanation',
15 | 		'code block markers'
16 | 	];
17 | 
18 | 	// Map banned phrases to contexts where they're allowed
19 | 	const allowedContexts = {
20 | 		'respond only with': ['Use markdown formatting for better readability'],
21 | 		'return only the': ['Use markdown formatting for better readability']
22 | 	};
23 | 
24 | 	test('prompts should not contain JSON formatting instructions', () => {
25 | 		const promptFiles = fs
26 | 			.readdirSync(promptsDir)
27 | 			.filter((file) => file.endsWith('.json') && !file.includes('schema'))
28 | 			// Exclude update-subtask.json as it returns plain strings, not JSON
29 | 			.filter((file) => file !== 'update-subtask.json');
30 | 
31 | 		promptFiles.forEach((file) => {
32 | 			const content = fs.readFileSync(path.join(promptsDir, file), 'utf8');
33 | 
34 | 			bannedPhrases.forEach((phrase) => {
35 | 				const lowerContent = content.toLowerCase();
36 | 				const lowerPhrase = phrase.toLowerCase();
37 | 
38 | 				if (lowerContent.includes(lowerPhrase)) {
39 | 					// Check if this phrase is allowed in its context
40 | 					const allowedInContext = allowedContexts[lowerPhrase];
41 | 					const isAllowed =
42 | 						allowedInContext &&
43 | 						allowedInContext.some((context) =>
44 | 							lowerContent.includes(context.toLowerCase())
45 | 						);
46 | 
47 | 					expect(isAllowed).toBe(
48 | 						true,
49 | 						`File ${file} contains banned phrase "${phrase}" without allowed context`
50 | 					);
51 | 				}
52 | 			});
53 | 		});
54 | 	});
55 | });
56 | 
```

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

```javascript
 1 | /**
 2 |  * tools/rules.js
 3 |  * Tool to add or remove rules from a project (MCP server)
 4 |  */
 5 | 
 6 | import { z } from 'zod';
 7 | import {
 8 | 	createErrorResponse,
 9 | 	handleApiResult,
10 | 	withNormalizedProjectRoot
11 | } from './utils.js';
12 | import { rulesDirect } from '../core/direct-functions/rules.js';
13 | import { RULE_PROFILES } from '../../../src/constants/profiles.js';
14 | 
15 | /**
16 |  * Register the rules tool with the MCP server
17 |  * @param {Object} server - FastMCP server instance
18 |  */
19 | export function registerRulesTool(server) {
20 | 	server.addTool({
21 | 		name: 'rules',
22 | 		description: 'Add or remove rule profiles from the project.',
23 | 		parameters: z.object({
24 | 			action: z
25 | 				.enum(['add', 'remove'])
26 | 				.describe('Whether to add or remove rule profiles.'),
27 | 			profiles: z
28 | 				.array(z.enum(RULE_PROFILES))
29 | 				.min(1)
30 | 				.describe(
31 | 					`List of rule profiles to add or remove (e.g., [\"cursor\", \"roo\"]). Available options: ${RULE_PROFILES.join(', ')}`
32 | 				),
33 | 			projectRoot: z
34 | 				.string()
35 | 				.describe(
36 | 					'The root directory of the project. Must be an absolute path.'
37 | 				),
38 | 			force: z
39 | 				.boolean()
40 | 				.optional()
41 | 				.default(false)
42 | 				.describe(
43 | 					'DANGEROUS: Force removal even if it would leave no rule profiles. Only use if you are absolutely certain.'
44 | 				)
45 | 		}),
46 | 		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
47 | 			try {
48 | 				log.info(
49 | 					`[rules tool] Executing action: ${args.action} for profiles: ${args.profiles.join(', ')} in ${args.projectRoot}`
50 | 				);
51 | 				const result = await rulesDirect(args, log, { session });
52 | 				return handleApiResult(result, log);
53 | 			} catch (error) {
54 | 				log.error(`[rules tool] Error: ${error.message}`);
55 | 				return createErrorResponse(error.message, { details: error.stack });
56 | 			}
57 | 		})
58 | 	});
59 | }
60 | 
```

--------------------------------------------------------------------------------
/apps/cli/src/utils/error-handler.ts:
--------------------------------------------------------------------------------

```typescript
 1 | /**
 2 |  * @fileoverview Centralized error handling utilities for CLI
 3 |  * Provides consistent error formatting and debug mode detection
 4 |  */
 5 | 
 6 | import chalk from 'chalk';
 7 | 
 8 | /**
 9 |  * Check if debug mode is enabled via environment variable
10 |  * Only returns true when DEBUG is explicitly set to 'true' or '1'
11 |  *
12 |  * @returns True if debug mode is enabled
13 |  */
14 | export function isDebugMode(): boolean {
15 | 	return process.env.DEBUG === 'true' || process.env.DEBUG === '1';
16 | }
17 | 
18 | /**
19 |  * Display an error to the user with optional stack trace in debug mode
20 |  * Handles both TaskMasterError instances and regular errors
21 |  *
22 |  * @param error - The error to display
23 |  * @param options - Display options
24 |  */
25 | export function displayError(
26 | 	error: any,
27 | 	options: {
28 | 		/** Skip exit, useful when caller wants to handle exit */
29 | 		skipExit?: boolean;
30 | 		/** Force show stack trace regardless of debug mode */
31 | 		forceStack?: boolean;
32 | 	} = {}
33 | ): void {
34 | 	// Check if it's a TaskMasterError with sanitized details
35 | 	if (error?.getSanitizedDetails) {
36 | 		const sanitized = error.getSanitizedDetails();
37 | 		console.error(chalk.red(`\n${sanitized.message}`));
38 | 
39 | 		// Show stack trace in debug mode or if forced
40 | 		if ((isDebugMode() || options.forceStack) && error.stack) {
41 | 			console.error(chalk.gray('\nStack trace:'));
42 | 			console.error(chalk.gray(error.stack));
43 | 		}
44 | 	} else {
45 | 		// For other errors, show the message
46 | 		const message = error?.message ?? String(error);
47 | 		console.error(chalk.red(`\nError: ${message}`));
48 | 
49 | 		// Show stack trace in debug mode or if forced
50 | 		if ((isDebugMode() || options.forceStack) && error?.stack) {
51 | 			console.error(chalk.gray('\nStack trace:'));
52 | 			console.error(chalk.gray(error.stack));
53 | 		}
54 | 	}
55 | 
56 | 	// Exit if not skipped
57 | 	if (!options.skipExit) {
58 | 		process.exit(1);
59 | 	}
60 | }
61 | 
```

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

```typescript
 1 | /**
 2 |  * Shared utility functions for bridge operations
 3 |  */
 4 | 
 5 | import { type TmCore, createTmCore } from '@tm/core';
 6 | import type { ReportFunction, StorageCheckResult } from './bridge-types.js';
 7 | 
 8 | /**
 9 |  * Initialize TmCore and check if API storage is being used.
10 |  *
11 |  * This function encapsulates the common pattern used by all bridge functions:
12 |  * 1. Try to create TmCore instance
13 |  * 2. Check the storage type
14 |  * 3. Return results or handle errors gracefully
15 |  *
16 |  * @param projectRoot - Project root directory
17 |  * @param report - Logging function
18 |  * @param fallbackMessage - Message to log if TmCore initialization fails
19 |  * @returns Storage check result with TmCore instance if successful
20 |  *
21 |  * @example
22 |  * const { isApiStorage, tmCore } = await checkStorageType(
23 |  *   projectRoot,
24 |  *   report,
25 |  *   'falling back to file-based operation'
26 |  * );
27 |  *
28 |  * if (!isApiStorage) {
29 |  *   // Continue with file-based logic
30 |  *   return null;
31 |  * }
32 |  */
33 | export async function checkStorageType(
34 | 	projectRoot: string,
35 | 	report: ReportFunction,
36 | 	fallbackMessage = 'falling back to file-based operation'
37 | ): Promise<StorageCheckResult> {
38 | 	let tmCore: TmCore;
39 | 
40 | 	try {
41 | 		tmCore = await createTmCore({
42 | 			projectPath: projectRoot || process.cwd()
43 | 		});
44 | 	} catch (tmCoreError) {
45 | 		const errorMessage =
46 | 			tmCoreError instanceof Error ? tmCoreError.message : String(tmCoreError);
47 | 		report('warn', `TmCore check failed, ${fallbackMessage}: ${errorMessage}`);
48 | 
49 | 		return {
50 | 			isApiStorage: false,
51 | 			error: errorMessage
52 | 		};
53 | 	}
54 | 
55 | 	// Check if we're using API storage (use resolved storage type, not config)
56 | 	const storageType = tmCore.tasks.getStorageType();
57 | 
58 | 	if (storageType !== 'api') {
59 | 		return {
60 | 			isApiStorage: false,
61 | 			tmCore
62 | 		};
63 | 	}
64 | 
65 | 	return {
66 | 		isApiStorage: true,
67 | 		tmCore
68 | 	};
69 | }
70 | 
```

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

```typescript
 1 | /**
 2 |  * Centralized authentication configuration
 3 |  */
 4 | 
 5 | import os from 'os';
 6 | import path from 'path';
 7 | import { AuthConfig } from './types.js';
 8 | 
 9 | /**
10 |  * Get the base domain from environment variables
11 |  * Evaluated lazily to allow dotenv to load first
12 |  * Runtime vars (TM_*) take precedence over build-time vars (TM_PUBLIC_*)
13 |  * Build-time: process.env.TM_PUBLIC_BASE_DOMAIN gets replaced by tsdown's env option
14 |  * Runtime: process.env.TM_BASE_DOMAIN can override for staging/development
15 |  * Default: https://tryhamster.com for production
16 |  */
17 | function getBaseDomain(): string {
18 | 	return (
19 | 		process.env.TM_BASE_DOMAIN || // Runtime override (for staging/tux)
20 | 		process.env.TM_PUBLIC_BASE_DOMAIN || // Build-time (baked into compiled code)
21 | 		'https://tryhamster.com' // Fallback default
22 | 	);
23 | }
24 | 
25 | /**
26 |  * Get default authentication configuration
27 |  * All URL configuration is derived from the single BASE_DOMAIN
28 |  * Evaluated lazily to allow dotenv to load environment variables first
29 |  */
30 | function getDefaultAuthConfig(): AuthConfig {
31 | 	return {
32 | 		// Base domain for all services
33 | 		baseUrl: getBaseDomain(),
34 | 
35 | 		// Configuration directory and file paths
36 | 		configDir: path.join(os.homedir(), '.taskmaster'),
37 | 		configFile: path.join(os.homedir(), '.taskmaster', 'auth.json')
38 | 	};
39 | }
40 | 
41 | /**
42 |  * Get merged configuration with optional overrides
43 |  */
44 | export function getAuthConfig(overrides?: Partial<AuthConfig>): AuthConfig {
45 | 	return {
46 | 		...getDefaultAuthConfig(),
47 | 		...overrides
48 | 	};
49 | }
50 | 
51 | /**
52 |  * Default authentication configuration (exported for backward compatibility)
53 |  * Note: This is now a getter property that evaluates lazily
54 |  */
55 | export const DEFAULT_AUTH_CONFIG: AuthConfig = new Proxy({} as AuthConfig, {
56 | 	get(_target, prop) {
57 | 		return getDefaultAuthConfig()[prop as keyof AuthConfig];
58 | 	}
59 | });
60 | 
```

--------------------------------------------------------------------------------
/test-clean-tags.js:
--------------------------------------------------------------------------------

```javascript
 1 | import fs from 'fs';
 2 | import {
 3 | 	createTag,
 4 | 	listTags
 5 | } from './scripts/modules/task-manager/tag-management.js';
 6 | 
 7 | console.log('=== Testing Tag Management with Clean File ===');
 8 | 
 9 | // Create a clean test tasks.json file
10 | const testTasksPath = './test-tasks.json';
11 | const cleanData = {
12 | 	master: {
13 | 		tasks: [
14 | 			{ id: 1, title: 'Test Task 1', status: 'pending' },
15 | 			{ id: 2, title: 'Test Task 2', status: 'done' }
16 | 		],
17 | 		metadata: {
18 | 			created: new Date().toISOString(),
19 | 			description: 'Master tag'
20 | 		}
21 | 	}
22 | };
23 | 
24 | // Write clean test file
25 | fs.writeFileSync(testTasksPath, JSON.stringify(cleanData, null, 2));
26 | console.log('Created clean test file');
27 | 
28 | try {
29 | 	// Test creating a new tag
30 | 	console.log('\n--- Testing createTag ---');
31 | 	await createTag(
32 | 		testTasksPath,
33 | 		'test-branch',
34 | 		{ copyFromCurrent: true, description: 'Test branch' },
35 | 		{ projectRoot: process.cwd() },
36 | 		'json'
37 | 	);
38 | 
39 | 	// Read the file and check for corruption
40 | 	const resultData = JSON.parse(fs.readFileSync(testTasksPath, 'utf8'));
41 | 	console.log('Keys in result file:', Object.keys(resultData));
42 | 	console.log('Has _rawTaggedData in file:', !!resultData._rawTaggedData);
43 | 
44 | 	if (resultData._rawTaggedData) {
45 | 		console.log('❌ CORRUPTION DETECTED: _rawTaggedData found in file!');
46 | 	} else {
47 | 		console.log('✅ SUCCESS: No _rawTaggedData corruption in file');
48 | 	}
49 | 
50 | 	// Test listing tags
51 | 	console.log('\n--- Testing listTags ---');
52 | 	const tagList = await listTags(
53 | 		testTasksPath,
54 | 		{},
55 | 		{ projectRoot: process.cwd() },
56 | 		'json'
57 | 	);
58 | 	console.log(
59 | 		'Found tags:',
60 | 		tagList.tags.map((t) => t.name)
61 | 	);
62 | } catch (error) {
63 | 	console.error('Error during test:', error.message);
64 | } finally {
65 | 	// Clean up test file
66 | 	if (fs.existsSync(testTasksPath)) {
67 | 		fs.unlinkSync(testTasksPath);
68 | 		console.log('\nCleaned up test file');
69 | 	}
70 | }
71 | 
```

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

```markdown
 1 | Add a subtask to a parent task.
 2 | 
 3 | Arguments: $ARGUMENTS
 4 | 
 5 | Parse arguments to create a new subtask or convert existing task.
 6 | 
 7 | ## Adding Subtasks
 8 | 
 9 | Creates subtasks to break down complex parent tasks into manageable pieces.
10 | 
11 | ## Argument Parsing
12 | 
13 | Flexible natural language:
14 | - "add subtask to 5: implement login form"
15 | - "break down 5 with: setup, implement, test"
16 | - "subtask for 5: handle edge cases"
17 | - "5: validate user input" → adds subtask to task 5
18 | 
19 | ## Execution Modes
20 | 
21 | ### 1. Create New Subtask
22 | ```bash
23 | task-master add-subtask --parent=<id> --title="<title>" --description="<desc>"
24 | ```
25 | 
26 | ### 2. Convert Existing Task
27 | ```bash
28 | task-master add-subtask --parent=<id> --task-id=<existing-id>
29 | ```
30 | 
31 | ## Smart Features
32 | 
33 | 1. **Automatic Subtask Generation**
34 |    - If title contains "and" or commas, create multiple
35 |    - Suggest common subtask patterns
36 |    - Inherit parent's context
37 | 
38 | 2. **Intelligent Defaults**
39 |    - Priority based on parent
40 |    - Appropriate time estimates
41 |    - Logical dependencies between subtasks
42 | 
43 | 3. **Validation**
44 |    - Check parent task complexity
45 |    - Warn if too many subtasks
46 |    - Ensure subtask makes sense
47 | 
48 | ## Creation Process
49 | 
50 | 1. Parse parent task context
51 | 2. Generate subtask with ID like "5.1"
52 | 3. Set appropriate defaults
53 | 4. Link to parent task
54 | 5. Update parent's time estimate
55 | 
56 | ## Example Flows
57 | 
58 | ```
59 | /taskmaster:add-subtask to 5: implement user authentication
60 | → Created subtask #5.1: "implement user authentication"
61 | → Parent task #5 now has 1 subtask
62 | → Suggested next subtasks: tests, documentation
63 | 
64 | /taskmaster:add-subtask 5: setup, implement, test
65 | → Created 3 subtasks:
66 |   #5.1: setup
67 |   #5.2: implement  
68 |   #5.3: test
69 | ```
70 | 
71 | ## Post-Creation
72 | 
73 | - Show updated task hierarchy
74 | - Suggest logical next subtasks
75 | - Update complexity estimates
76 | - Recommend subtask order
```

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

```markdown
 1 | Clear all subtasks from a specific task.
 2 | 
 3 | Arguments: $ARGUMENTS (task ID)
 4 | 
 5 | Remove all subtasks from a parent task at once.
 6 | 
 7 | ## Clearing Subtasks
 8 | 
 9 | Bulk removal of all subtasks from a parent task.
10 | 
11 | ## Execution
12 | 
13 | ```bash
14 | task-master clear-subtasks --id=<task-id>
15 | ```
16 | 
17 | ## Pre-Clear Analysis
18 | 
19 | 1. **Subtask Summary**
20 |    - Number of subtasks
21 |    - Completion status of each
22 |    - Work already done
23 |    - Dependencies affected
24 | 
25 | 2. **Impact Assessment**
26 |    - Data that will be lost
27 |    - Dependencies to be removed
28 |    - Effect on project timeline
29 |    - Parent task implications
30 | 
31 | ## Confirmation Required
32 | 
33 | ```
34 | Clear Subtasks Confirmation
35 | ━━━━━━━━━━━━━━━━━━━━━━━━━
36 | Parent Task: #5 "Implement user authentication"
37 | Subtasks to remove: 4
38 | - #5.1 "Setup auth framework" (done)
39 | - #5.2 "Create login form" (in-progress)
40 | - #5.3 "Add validation" (pending)
41 | - #5.4 "Write tests" (pending)
42 | 
43 | ⚠️  This will permanently delete all subtask data
44 | Continue? (y/n)
45 | ```
46 | 
47 | ## Smart Features
48 | 
49 | - Option to convert to standalone tasks
50 | - Backup task data before clearing
51 | - Preserve completed work history
52 | - Update parent task appropriately
53 | 
54 | ## Process
55 | 
56 | 1. List all subtasks for confirmation
57 | 2. Check for in-progress work
58 | 3. Remove all subtasks
59 | 4. Update parent task
60 | 5. Clean up dependencies
61 | 
62 | ## Alternative Options
63 | 
64 | Suggest alternatives:
65 | - Convert important subtasks to tasks
66 | - Keep completed subtasks
67 | - Archive instead of delete
68 | - Export subtask data first
69 | 
70 | ## Post-Clear
71 | 
72 | - Show updated parent task
73 | - Recalculate time estimates
74 | - Update task complexity
75 | - Suggest next steps
76 | 
77 | ## Example
78 | 
79 | ```
80 | /taskmaster:clear-subtasks 5
81 | → Found 4 subtasks to remove
82 | → Warning: Subtask #5.2 is in-progress
83 | → Cleared all subtasks from task #5
84 | → Updated parent task estimates
85 | → Suggestion: Consider re-expanding with better breakdown
86 | ```
```

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

```markdown
 1 | Remove a subtask from its parent task.
 2 | 
 3 | Arguments: $ARGUMENTS
 4 | 
 5 | Parse subtask ID to remove, with option to convert to standalone task.
 6 | 
 7 | ## Removing Subtasks
 8 | 
 9 | Remove a subtask and optionally convert it back to a standalone task.
10 | 
11 | ## Argument Parsing
12 | 
13 | - "remove subtask 5.1"
14 | - "delete 5.1"
15 | - "convert 5.1 to task" → remove and convert
16 | - "5.1 standalone" → convert to standalone
17 | 
18 | ## Execution Options
19 | 
20 | ### 1. Delete Subtask
21 | ```bash
22 | task-master remove-subtask --id=<parentId.subtaskId>
23 | ```
24 | 
25 | ### 2. Convert to Standalone
26 | ```bash
27 | task-master remove-subtask --id=<parentId.subtaskId> --convert
28 | ```
29 | 
30 | ## Pre-Removal Checks
31 | 
32 | 1. **Validate Subtask**
33 |    - Verify subtask exists
34 |    - Check completion status
35 |    - Review dependencies
36 | 
37 | 2. **Impact Analysis**
38 |    - Other subtasks that depend on it
39 |    - Parent task implications
40 |    - Data that will be lost
41 | 
42 | ## Removal Process
43 | 
44 | ### For Deletion:
45 | 1. Confirm if subtask has work done
46 | 2. Update parent task estimates
47 | 3. Remove subtask and its data
48 | 4. Clean up dependencies
49 | 
50 | ### For Conversion:
51 | 1. Assign new standalone task ID
52 | 2. Preserve all task data
53 | 3. Update dependency references
54 | 4. Maintain task history
55 | 
56 | ## Smart Features
57 | 
58 | - Warn if subtask is in-progress
59 | - Show impact on parent task
60 | - Preserve important data
61 | - Update related estimates
62 | 
63 | ## Example Flows
64 | 
65 | ```
66 | /taskmaster:remove-subtask 5.1
67 | → Warning: Subtask #5.1 is in-progress
68 | → This will delete all subtask data
69 | → Parent task #5 will be updated
70 | Confirm deletion? (y/n)
71 | 
72 | /taskmaster:remove-subtask 5.1 convert
73 | → Converting subtask #5.1 to standalone task #89
74 | → Preserved: All task data and history
75 | → Updated: 2 dependency references
76 | → New task #89 is now independent
77 | ```
78 | 
79 | ## Post-Removal
80 | 
81 | - Update parent task status
82 | - Recalculate estimates
83 | - Show updated hierarchy
84 | - Suggest next actions
```

--------------------------------------------------------------------------------
/mcp-server/src/tools/README-ZOD-V3.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Why MCP Tools Use Zod v3
 2 | 
 3 | ## Problem
 4 | 
 5 | - **FastMCP** uses `xsschema` to convert schemas → outputs JSON Schema **Draft 2020-12**
 6 | - **MCP clients** (Augment IDE, gemini-cli, etc.) only support **Draft-07**
 7 | - Using Zod v4 in tools causes "vendor undefined" errors and tool discovery failures
 8 | 
 9 | ## Temporary Solution
10 | 
11 | All MCP tool files import from `zod/v3` instead of `zod`:
12 | 
13 | ```javascript
14 | import { z } from 'zod/v3';  // ✅ Draft-07 compatible
15 | // NOT: import { z } from 'zod';  // ❌ Would use Draft 2020-12
16 | ```
17 | 
18 | ### Why This Works
19 | 
20 | - Zod v4 ships with v3 compatibility at `zod/v3`
21 | - FastMCP + zod-to-json-schema converts Zod v3 schemas → **Draft-07**
22 | - This ensures MCP clients can discover and use our tools
23 | 
24 | ### What This Means
25 | 
26 | - ✅ **MCP tools** → use `zod/v3` (this directory)
27 | - ✅ **Rest of codebase** → uses `zod` (Zod v4)
28 | - ✅ **No conflicts** → they're from the same package, just different versions
29 | 
30 | ## When Can We Remove This?
31 | 
32 | This workaround can be removed when **either**:
33 | 
34 | 1. **FastMCP adds JSON Schema version configuration**
35 |    - e.g., `new FastMCP({ jsonSchema: { target: 'draft-07' } })`
36 |    - Tracking: https://github.com/punkpeye/fastmcp/issues/189
37 | 
38 | 2. **MCP spec adds Draft 2020-12 support**
39 |    - Unlikely in the short term
40 | 
41 | 3. **xsschema adds version targeting**
42 |    - Would allow FastMCP to use Draft-07
43 | 
44 | ## How to Maintain
45 | 
46 | When adding new MCP tools:
47 | 
48 | ```javascript
49 | // ✅ CORRECT
50 | import { z } from 'zod/v3';
51 | 
52 | server.addTool({
53 |   name: 'my_tool',
54 |   parameters: z.object({ ... }),  // Will use Draft-07
55 |   execute: async (args) => { ... }
56 | });
57 | ```
58 | 
59 | ```javascript
60 | // ❌ WRONG - Will break MCP client compatibility
61 | import { z } from 'zod';  // Don't do this in mcp-server/src/tools/
62 | ```
63 | 
64 | ---
65 | 
66 | **Last Updated:** 2025-10-18
67 | **Affects:** All files in `mcp-server/src/tools/`
68 | 
```

--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------

```javascript
 1 | export default {
 2 | 	// Use Node.js environment for testing
 3 | 	testEnvironment: 'node',
 4 | 
 5 | 	// Automatically clear mock calls between every test
 6 | 	clearMocks: true,
 7 | 
 8 | 	// Indicates whether the coverage information should be collected while executing the test
 9 | 	collectCoverage: false,
10 | 
11 | 	// The directory where Jest should output its coverage files
12 | 	coverageDirectory: 'coverage',
13 | 
14 | 	// A list of paths to directories that Jest should use to search for files in
15 | 	roots: ['<rootDir>/tests'],
16 | 
17 | 	// The glob patterns Jest uses to detect test files
18 | 	testMatch: ['**/__tests__/**/*.js', '**/?(*.)+(spec|test).js'],
19 | 
20 | 	// Transform files
21 | 	preset: 'ts-jest/presets/default-esm',
22 | 	extensionsToTreatAsEsm: ['.ts'],
23 | 	moduleFileExtensions: ['js', 'ts', 'json', 'node'],
24 | 	transform: {
25 | 		'^.+\\.ts$': [
26 | 			'ts-jest',
27 | 			{
28 | 				useESM: true
29 | 			}
30 | 		]
31 | 	},
32 | 
33 | 	// Disable transformations for node_modules
34 | 	transformIgnorePatterns: ['/node_modules/'],
35 | 
36 | 	// Set moduleNameMapper for absolute paths
37 | 	moduleNameMapper: {
38 | 		'^@/(.*)$': '<rootDir>/$1'
39 | 	},
40 | 	resolver: '<rootDir>/jest.resolver.cjs',
41 | 
42 | 	// Setup module aliases
43 | 	moduleDirectories: ['node_modules', '<rootDir>'],
44 | 
45 | 	// Configure test coverage thresholds
46 | 	// Note: ts-jest reports coverage against .ts files, not .js
47 | 	coverageThreshold: {
48 | 		global: {
49 | 			branches: 80,
50 | 			functions: 80,
51 | 			lines: 80,
52 | 			statements: 80
53 | 		},
54 | 		// Critical code requires higher coverage
55 | 		'./src/utils/**/*.ts': {
56 | 			branches: 70,
57 | 			functions: 90,
58 | 			lines: 90,
59 | 			statements: 90
60 | 		},
61 | 		'./src/middleware/**/*.ts': {
62 | 			branches: 70,
63 | 			functions: 85,
64 | 			lines: 85,
65 | 			statements: 85
66 | 		}
67 | 	},
68 | 
69 | 	// Generate coverage report in these formats
70 | 	coverageReporters: ['text', 'lcov'],
71 | 
72 | 	// Verbose output
73 | 	verbose: true,
74 | 
75 | 	// Setup file
76 | 	setupFilesAfterEnv: ['<rootDir>/tests/setup.js']
77 | };
78 | 
```

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

```markdown
 1 | Intelligently determine and prepare the next action based on comprehensive context.
 2 | 
 3 | This enhanced version of 'next' considers:
 4 | - Current task states
 5 | - Recent activity
 6 | - Time constraints
 7 | - Dependencies
 8 | - Your working patterns
 9 | 
10 | Arguments: $ARGUMENTS
11 | 
12 | ## Intelligent Next Action
13 | 
14 | ### 1. **Context Gathering**
15 | Let me analyze the current situation:
16 | - Active tasks (in-progress)
17 | - Recently completed tasks
18 | - Blocked tasks
19 | - Time since last activity
20 | - Arguments provided: $ARGUMENTS
21 | 
22 | ### 2. **Smart Decision Tree**
23 | 
24 | **If you have an in-progress task:**
25 | - Has it been idle > 2 hours? → Suggest resuming or switching
26 | - Near completion? → Show remaining steps
27 | - Blocked? → Find alternative task
28 | 
29 | **If no in-progress tasks:**
30 | - Unblocked high-priority tasks? → Start highest
31 | - Complex tasks need breakdown? → Suggest expansion
32 | - All tasks blocked? → Show dependency resolution
33 | 
34 | **Special arguments handling:**
35 | - "quick" → Find task < 2 hours
36 | - "easy" → Find low complexity task
37 | - "important" → Find high priority regardless of complexity
38 | - "continue" → Resume last worked task
39 | 
40 | ### 3. **Preparation Workflow**
41 | 
42 | Based on selected task:
43 | 1. Show full context and history
44 | 2. Set up development environment
45 | 3. Run relevant tests
46 | 4. Open related files
47 | 5. Show similar completed tasks
48 | 6. Estimate completion time
49 | 
50 | ### 4. **Alternative Suggestions**
51 | 
52 | Always provide options:
53 | - Primary recommendation
54 | - Quick alternative (< 1 hour)
55 | - Strategic option (unblocks most tasks)
56 | - Learning option (new technology/skill)
57 | 
58 | ### 5. **Workflow Integration**
59 | 
60 | Seamlessly connect to:
61 | - `/project:task-master:start [selected]` 
62 | - `/project:workflows:auto-implement`
63 | - `/project:task-master:expand` (if complex)
64 | - `/project:utils:complexity-report` (if unsure)
65 | 
66 | The goal: Zero friction from decision to implementation.
```

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

```javascript
 1 | /**
 2 |  * perplexity.js
 3 |  * AI provider implementation for Perplexity models using Vercel AI SDK.
 4 |  */
 5 | 
 6 | import { createPerplexity } from '@ai-sdk/perplexity';
 7 | import { BaseAIProvider } from './base-provider.js';
 8 | 
 9 | export class PerplexityAIProvider extends BaseAIProvider {
10 | 	constructor() {
11 | 		super();
12 | 		this.name = 'Perplexity';
13 | 	}
14 | 
15 | 	/**
16 | 	 * Returns the environment variable name required for this provider's API key.
17 | 	 * @returns {string} The environment variable name for the Perplexity API key
18 | 	 */
19 | 	getRequiredApiKeyName() {
20 | 		return 'PERPLEXITY_API_KEY';
21 | 	}
22 | 
23 | 	/**
24 | 	 * Creates and returns a Perplexity client instance.
25 | 	 * @param {object} params - Parameters for client initialization
26 | 	 * @param {string} params.apiKey - Perplexity API key
27 | 	 * @param {string} [params.baseURL] - Optional custom API endpoint
28 | 	 * @returns {Function} Perplexity client function
29 | 	 * @throws {Error} If initialization fails
30 | 	 */
31 | 	getClient(params) {
32 | 		try {
33 | 			const { apiKey, baseURL } = params;
34 | 			const fetchImpl = this.createProxyFetch();
35 | 
36 | 			return createPerplexity({
37 | 				apiKey,
38 | 				baseURL: baseURL || 'https://api.perplexity.ai',
39 | 				...(fetchImpl && { fetch: fetchImpl })
40 | 			});
41 | 		} catch (error) {
42 | 			this.handleError('client initialization', error);
43 | 		}
44 | 	}
45 | 
46 | 	/**
47 | 	 * Override generateObject to use JSON mode for Perplexity
48 | 	 *
49 | 	 * NOTE: Perplexity models (especially sonar models) have known issues
50 | 	 * generating valid JSON, particularly with array fields. They often
51 | 	 * generate malformed JSON like "dependencies": , instead of "dependencies": []
52 | 	 *
53 | 	 * The base provider now handles JSON repair automatically for all providers.
54 | 	 */
55 | 	async generateObject(params) {
56 | 		// Force JSON mode for Perplexity as it may help with reliability
57 | 		return super.generateObject({
58 | 			...params,
59 | 			mode: 'json'
60 | 		});
61 | 	}
62 | }
63 | 
```

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

```markdown
 1 | Automatically fix dependency issues found during validation.
 2 | 
 3 | ## Automatic Dependency Repair
 4 | 
 5 | Intelligently fixes common dependency problems while preserving project logic.
 6 | 
 7 | ## Execution
 8 | 
 9 | ```bash
10 | task-master fix-dependencies
11 | ```
12 | 
13 | ## What Gets Fixed
14 | 
15 | ### 1. **Auto-Fixable Issues**
16 | - Remove references to deleted tasks
17 | - Break simple circular dependencies
18 | - Remove self-dependencies
19 | - Clean up duplicate dependencies
20 | 
21 | ### 2. **Smart Resolutions**
22 | - Reorder dependencies to maintain logic
23 | - Suggest task merging for over-dependent tasks
24 | - Flatten unnecessary dependency chains
25 | - Remove redundant transitive dependencies
26 | 
27 | ### 3. **Manual Review Required**
28 | - Complex circular dependencies
29 | - Critical path modifications
30 | - Business logic dependencies
31 | - High-impact changes
32 | 
33 | ## Fix Process
34 | 
35 | 1. **Analysis Phase**
36 |    - Run validation check
37 |    - Categorize issues by type
38 |    - Determine fix strategy
39 | 
40 | 2. **Execution Phase**
41 |    - Apply automatic fixes
42 |    - Log all changes made
43 |    - Preserve task relationships
44 | 
45 | 3. **Verification Phase**
46 |    - Re-validate after fixes
47 |    - Show before/after comparison
48 |    - Highlight manual fixes needed
49 | 
50 | ## Smart Features
51 | 
52 | - Preserves intended task flow
53 | - Minimal disruption approach
54 | - Creates fix history/log
55 | - Suggests manual interventions
56 | 
57 | ## Output Example
58 | 
59 | ```
60 | Dependency Auto-Fix Report
61 | ━━━━━━━━━━━━━━━━━━━━━━━━
62 | Fixed Automatically:
63 | ✅ Removed 2 references to deleted tasks
64 | ✅ Resolved 1 self-dependency
65 | ✅ Cleaned 3 redundant dependencies
66 | 
67 | Manual Review Needed:
68 | ⚠️ Complex circular dependency: #12 → #15 → #18 → #12
69 |   Suggestion: Make #15 not depend on #12
70 | ⚠️ Task #45 has 8 dependencies
71 |   Suggestion: Break into subtasks
72 | 
73 | Run '/taskmaster:validate-dependencies' to verify fixes
74 | ```
75 | 
76 | ## Safety
77 | 
78 | - Preview mode available
79 | - Rollback capability
80 | - Change logging
81 | - No data loss
```

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

```typescript
 1 | /**
 2 |  * @fileoverview Custom error classes for the tm-core package
 3 |  * This file exports all custom error types and error handling utilities
 4 |  */
 5 | 
 6 | // Export the main TaskMasterError class
 7 | export {
 8 | 	TaskMasterError,
 9 | 	ERROR_CODES,
10 | 	type ErrorCode,
11 | 	type ErrorContext,
12 | 	type SerializableError
13 | } from './task-master-error.js';
14 | 
15 | // Error implementations will be defined here
16 | // export * from './task-errors.js';
17 | // export * from './storage-errors.js';
18 | // export * from './provider-errors.js';
19 | // export * from './validation-errors.js';
20 | 
21 | // Placeholder exports - these will be implemented in later tasks
22 | 
23 | /**
24 |  * Base error class for all tm-core errors
25 |  * @deprecated This is a placeholder class that will be properly implemented in later tasks
26 |  */
27 | export class TmCoreError extends Error {
28 | 	constructor(
29 | 		message: string,
30 | 		public code?: string
31 | 	) {
32 | 		super(message);
33 | 		this.name = 'TmCoreError';
34 | 	}
35 | }
36 | 
37 | /**
38 |  * Error thrown when a task is not found
39 |  * @deprecated This is a placeholder class that will be properly implemented in later tasks
40 |  */
41 | export class TaskNotFoundError extends TmCoreError {
42 | 	constructor(taskId: string) {
43 | 		super(`Task not found: ${taskId}`, 'TASK_NOT_FOUND');
44 | 		this.name = 'TaskNotFoundError';
45 | 	}
46 | }
47 | 
48 | /**
49 |  * Error thrown when validation fails
50 |  * @deprecated This is a placeholder class that will be properly implemented in later tasks
51 |  */
52 | export class ValidationError extends TmCoreError {
53 | 	constructor(message: string) {
54 | 		super(message, 'VALIDATION_ERROR');
55 | 		this.name = 'ValidationError';
56 | 	}
57 | }
58 | 
59 | /**
60 |  * Error thrown when storage operations fail
61 |  * @deprecated This is a placeholder class that will be properly implemented in later tasks
62 |  */
63 | export class StorageError extends TmCoreError {
64 | 	constructor(message: string) {
65 | 		super(message, 'STORAGE_ERROR');
66 | 		this.name = 'StorageError';
67 | 	}
68 | }
69 | 
```

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

```markdown
 1 | Add new tasks with intelligent parsing and context awareness.
 2 | 
 3 | Arguments: $ARGUMENTS
 4 | 
 5 | ## Smart Task Addition
 6 | 
 7 | Parse natural language to create well-structured tasks.
 8 | 
 9 | ### 1. **Input Understanding**
10 | 
11 | I'll intelligently parse your request:
12 | - Natural language → Structured task
13 | - Detect priority from keywords (urgent, ASAP, important)
14 | - Infer dependencies from context
15 | - Suggest complexity based on description
16 | - Determine task type (feature, bug, refactor, test, docs)
17 | 
18 | ### 2. **Smart Parsing Examples**
19 | 
20 | **"Add urgent task to fix login bug"**
21 | → Title: Fix login bug
22 | → Priority: high
23 | → Type: bug
24 | → Suggested complexity: medium
25 | 
26 | **"Create task for API documentation after task 23 is done"**
27 | → Title: API documentation
28 | → Dependencies: [23]
29 | → Type: documentation
30 | → Priority: medium
31 | 
32 | **"Need to refactor auth module - depends on 12 and 15, high complexity"**
33 | → Title: Refactor auth module
34 | → Dependencies: [12, 15]
35 | → Complexity: high
36 | → Type: refactor
37 | 
38 | ### 3. **Context Enhancement**
39 | 
40 | Based on current project state:
41 | - Suggest related existing tasks
42 | - Warn about potential conflicts
43 | - Recommend dependencies
44 | - Propose subtasks if complex
45 | 
46 | ### 4. **Interactive Refinement**
47 | 
48 | ```yaml
49 | Task Preview:
50 | ─────────────
51 | Title: [Extracted title]
52 | Priority: [Inferred priority]
53 | Dependencies: [Detected dependencies]
54 | Complexity: [Estimated complexity]
55 | 
56 | Suggestions:
57 | - Similar task #34 exists, consider as dependency?
58 | - This seems complex, break into subtasks?
59 | - Tasks #45-47 work on same module
60 | ```
61 | 
62 | ### 5. **Validation & Creation**
63 | 
64 | Before creating:
65 | - Validate dependencies exist
66 | - Check for duplicates
67 | - Ensure logical ordering
68 | - Verify task completeness
69 | 
70 | ### 6. **Smart Defaults**
71 | 
72 | Intelligent defaults based on:
73 | - Task type patterns
74 | - Team conventions
75 | - Historical data
76 | - Current sprint/phase
77 | 
78 | Result: High-quality tasks from minimal input.
```

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

```typescript
 1 | /**
 2 |  * @fileoverview Authentication helpers for CLI commands
 3 |  */
 4 | 
 5 | import type { AuthManager } from '@tm/core';
 6 | import { displayCardBox } from '../ui/components/cardBox.component.js';
 7 | 
 8 | /**
 9 |  * Options for authentication check
10 |  */
11 | export interface CheckAuthOptions {
12 | 	/** Custom message describing what requires authentication (defaults to generic message) */
13 | 	message?: string;
14 | 	/** Optional footer text (e.g., alternative local commands) */
15 | 	footer?: string;
16 | 	/** Command to run to authenticate (defaults to "tm auth login") */
17 | 	authCommand?: string;
18 | }
19 | 
20 | /**
21 |  * Check if user is authenticated and display a friendly card box if not.
22 |  * Used by commands that require Hamster authentication (briefs, context, etc.)
23 |  *
24 |  * @param authManager - AuthManager instance
25 |  * @param options - Optional customization for the authentication prompt
26 |  * @returns true if authenticated, false if not
27 |  *
28 |  * @example
29 |  * ```typescript
30 |  * const isAuthenticated = await checkAuthentication(authManager, {
31 |  *   message: 'The "briefs" command requires you to be logged in to your Hamster account.',
32 |  *   footer: 'Working locally instead?\n  → Use "tm tags" for local tag management.'
33 |  * });
34 |  *
35 |  * if (!isAuthenticated) {
36 |  *   process.exit(1);
37 |  * }
38 |  * ```
39 |  */
40 | export async function checkAuthentication(
41 | 	authManager: AuthManager,
42 | 	options: CheckAuthOptions = {}
43 | ): Promise<boolean> {
44 | 	const hasSession = await authManager.hasValidSession();
45 | 
46 | 	if (!hasSession) {
47 | 		const {
48 | 			message = 'This command requires you to be logged in to your Hamster account.',
49 | 			footer,
50 | 			authCommand = 'tm auth login'
51 | 		} = options;
52 | 
53 | 		console.log(
54 | 			displayCardBox({
55 | 				header: '[!] Not logged in to Hamster',
56 | 				body: [message],
57 | 				callToAction: {
58 | 					label: 'To get started:',
59 | 					action: authCommand
60 | 				},
61 | 				footer
62 | 			})
63 | 		);
64 | 		return false;
65 | 	}
66 | 
67 | 	return true;
68 | }
69 | 
```

--------------------------------------------------------------------------------
/packages/tm-core/src/modules/git/services/branch-name-generator.spec.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { describe, expect, it } from 'vitest';
 2 | import {
 3 | 	generateBranchName,
 4 | 	sanitizeBranchName
 5 | } from './branch-name-generator.js';
 6 | 
 7 | describe('Branch Name Generator', () => {
 8 | 	describe('sanitizeBranchName', () => {
 9 | 		it('should remove invalid characters', () => {
10 | 			const result = sanitizeBranchName('feature/my feature!');
11 | 			expect(result).toBe('feature-my-feature');
12 | 		});
13 | 
14 | 		it('should replace spaces with hyphens', () => {
15 | 			const result = sanitizeBranchName('my feature branch');
16 | 			expect(result).toBe('my-feature-branch');
17 | 		});
18 | 
19 | 		it('should convert to lowercase', () => {
20 | 			const result = sanitizeBranchName('MyFeature');
21 | 			expect(result).toBe('myfeature');
22 | 		});
23 | 
24 | 		it('should remove consecutive hyphens', () => {
25 | 			const result = sanitizeBranchName('my---feature');
26 | 			expect(result).toBe('my-feature');
27 | 		});
28 | 
29 | 		it('should handle empty string', () => {
30 | 			const result = sanitizeBranchName('');
31 | 			expect(result).toBe('branch');
32 | 		});
33 | 	});
34 | 
35 | 	describe('generateBranchName', () => {
36 | 		it('should generate branch name from task ID', () => {
37 | 			const result = generateBranchName({ taskId: '2.7' });
38 | 			expect(result).toMatch(/^task-2-7-/);
39 | 		});
40 | 
41 | 		it('should include description in branch name', () => {
42 | 			const result = generateBranchName({
43 | 				taskId: '2.7',
44 | 				description: 'Add Feature'
45 | 			});
46 | 			expect(result).toContain('task-2-7');
47 | 			expect(result).toContain('add-feature');
48 | 		});
49 | 
50 | 		it('should handle custom pattern', () => {
51 | 			const result = generateBranchName({
52 | 				taskId: '2.7',
53 | 				pattern: 'feature/{taskId}'
54 | 			});
55 | 			expect(result).toBe('feature-2-7');
56 | 		});
57 | 
58 | 		it('should truncate long descriptions', () => {
59 | 			const longDesc = 'a'.repeat(100);
60 | 			const result = generateBranchName({
61 | 				taskId: '2.7',
62 | 				description: longDesc
63 | 			});
64 | 			expect(result.length).toBeLessThan(80);
65 | 		});
66 | 	});
67 | });
68 | 
```

--------------------------------------------------------------------------------
/packages/tm-core/src/modules/tasks/repositories/supabase/dependency-fetcher.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { SupabaseClient } from '@supabase/supabase-js';
 2 | import { Database } from '../../../../common/types/database.types.js';
 3 | import { DependencyWithDisplayId } from '../../../../common/types/repository-types.js';
 4 | 
 5 | /**
 6 |  * Handles fetching and processing of task dependencies with display_ids
 7 |  */
 8 | export class DependencyFetcher {
 9 | 	constructor(private supabase: SupabaseClient<Database>) {}
10 | 
11 | 	/**
12 | 	 * Fetches dependencies for given task IDs with display_ids joined
13 | 	 * @param taskIds Array of task IDs to fetch dependencies for
14 | 	 * @returns Map of task ID to array of dependency display_ids
15 | 	 */
16 | 	async fetchDependenciesWithDisplayIds(
17 | 		taskIds: string[]
18 | 	): Promise<Map<string, string[]>> {
19 | 		if (!taskIds || taskIds.length === 0) {
20 | 			return new Map();
21 | 		}
22 | 
23 | 		const { data, error } = await this.supabase
24 | 			.from('task_dependencies')
25 | 			.select(`
26 | 				task_id,
27 | 				depends_on_task:tasks!task_dependencies_depends_on_task_id_fkey (
28 | 					display_id
29 | 				)
30 | 			`)
31 | 			.in('task_id', taskIds);
32 | 
33 | 		if (error) {
34 | 			throw new Error(`Failed to fetch task dependencies: ${error.message}`);
35 | 		}
36 | 
37 | 		return this.processDependencyData(data as DependencyWithDisplayId[]);
38 | 	}
39 | 
40 | 	/**
41 | 	 * Processes raw dependency data into a map structure
42 | 	 */
43 | 	private processDependencyData(
44 | 		dependencies: DependencyWithDisplayId[]
45 | 	): Map<string, string[]> {
46 | 		const dependenciesByTaskId = new Map<string, string[]>();
47 | 
48 | 		if (!dependencies) {
49 | 			return dependenciesByTaskId;
50 | 		}
51 | 
52 | 		for (const dep of dependencies) {
53 | 			if (!dep.task_id) continue;
54 | 
55 | 			const currentDeps = dependenciesByTaskId.get(dep.task_id) || [];
56 | 
57 | 			// Extract display_id from the joined object
58 | 			const displayId = dep.depends_on_task?.display_id;
59 | 			if (displayId) {
60 | 				currentDeps.push(displayId);
61 | 			}
62 | 
63 | 			dependenciesByTaskId.set(dep.task_id, currentDeps);
64 | 		}
65 | 
66 | 		return dependenciesByTaskId;
67 | 	}
68 | }
69 | 
```

--------------------------------------------------------------------------------
/.claude/commands/dedupe.md:
--------------------------------------------------------------------------------

```markdown
 1 | ---
 2 | allowed-tools: Bash(gh issue view:*), Bash(gh search:*), Bash(gh issue list:*), Bash(gh api:*), Bash(gh issue comment:*)
 3 | description: Find duplicate GitHub issues
 4 | ---
 5 | 
 6 | Find up to 3 likely duplicate issues for a given GitHub issue.
 7 | 
 8 | To do this, follow these steps precisely:
 9 | 
10 | 1. Use an agent to check if the Github issue (a) is closed, (b) does not need to be deduped (eg. because it is broad product feedback without a specific solution, or positive feedback), or (c) already has a duplicates comment that you made earlier. If so, do not proceed.
11 | 2. Use an agent to view a Github issue, and ask the agent to return a summary of the issue
12 | 3. Then, launch 5 parallel agents to search Github for duplicates of this issue, using diverse keywords and search approaches, using the summary from #1
13 | 4. Next, feed the results from #1 and #2 into another agent, so that it can filter out false positives, that are likely not actually duplicates of the original issue. If there are no duplicates remaining, do not proceed.
14 | 5. Finally, comment back on the issue with a list of up to three duplicate issues (or zero, if there are no likely duplicates)
15 | 
16 | Notes (be sure to tell this to your agents, too):
17 | 
18 | - Use `gh` to interact with Github, rather than web fetch
19 | - Do not use other tools, beyond `gh` (eg. don't use other MCP servers, file edit, etc.)
20 | - Make a todo list first
21 | - For your comment, follow the following format precisely (assuming for this example that you found 3 suspected duplicates):
22 | 
23 | ---
24 | 
25 | Found 3 possible duplicate issues:
26 | 
27 | 1. <link to issue>
28 | 2. <link to issue>
29 | 3. <link to issue>
30 | 
31 | This issue will be automatically closed as a duplicate in 3 days.
32 | 
33 | - If your issue is a duplicate, please close it and 👍 the existing issue instead
34 | - To prevent auto-closure, add a comment or 👎 this comment
35 | 
36 | 🤖 Generated with \[Task Master Bot\]
37 | 
38 | ---
```

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

```typescript
 1 | import type * as React from 'react';
 2 | 
 3 | import { cn } from '@/lib/utils';
 4 | 
 5 | function Card({ className, ...props }: React.ComponentProps<'div'>) {
 6 | 	return (
 7 | 		<div
 8 | 			data-slot="card"
 9 | 			className={cn(
10 | 				'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',
11 | 				className
12 | 			)}
13 | 			{...props}
14 | 		/>
15 | 	);
16 | }
17 | 
18 | function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
19 | 	return (
20 | 		<div
21 | 			data-slot="card-header"
22 | 			className={cn(
23 | 				'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
24 | 				className
25 | 			)}
26 | 			{...props}
27 | 		/>
28 | 	);
29 | }
30 | 
31 | function CardTitle({ className, ...props }: React.ComponentProps<'div'>) {
32 | 	return (
33 | 		<div
34 | 			data-slot="card-title"
35 | 			className={cn('leading-none font-semibold', className)}
36 | 			{...props}
37 | 		/>
38 | 	);
39 | }
40 | 
41 | function CardDescription({ className, ...props }: React.ComponentProps<'div'>) {
42 | 	return (
43 | 		<div
44 | 			data-slot="card-description"
45 | 			className={cn('text-muted-foreground text-sm', className)}
46 | 			{...props}
47 | 		/>
48 | 	);
49 | }
50 | 
51 | function CardAction({ className, ...props }: React.ComponentProps<'div'>) {
52 | 	return (
53 | 		<div
54 | 			data-slot="card-action"
55 | 			className={cn(
56 | 				'col-start-2 row-span-2 row-start-1 self-start justify-self-end',
57 | 				className
58 | 			)}
59 | 			{...props}
60 | 		/>
61 | 	);
62 | }
63 | 
64 | function CardContent({ className, ...props }: React.ComponentProps<'div'>) {
65 | 	return (
66 | 		<div
67 | 			data-slot="card-content"
68 | 			className={cn('px-6', className)}
69 | 			{...props}
70 | 		/>
71 | 	);
72 | }
73 | 
74 | function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
75 | 	return (
76 | 		<div
77 | 			data-slot="card-footer"
78 | 			className={cn('flex items-center px-6 [.border-t]:pt-6', className)}
79 | 			{...props}
80 | 		/>
81 | 	);
82 | }
83 | 
84 | export {
85 | 	Card,
86 | 	CardHeader,
87 | 	CardFooter,
88 | 	CardTitle,
89 | 	CardAction,
90 | 	CardDescription,
91 | 	CardContent
92 | };
93 | 
```

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

```typescript
 1 | /**
 2 |  * Polling Status Indicator Component
 3 |  */
 4 | 
 5 | import React from 'react';
 6 | import type { AppState } from '../types';
 7 | 
 8 | interface PollingStatusProps {
 9 | 	polling: AppState['polling'];
10 | 	onRetry?: () => void;
11 | }
12 | 
13 | export const PollingStatus: React.FC<PollingStatusProps> = ({
14 | 	polling,
15 | 	onRetry
16 | }) => {
17 | 	const {
18 | 		isActive,
19 | 		errorCount,
20 | 		isOfflineMode,
21 | 		connectionStatus,
22 | 		reconnectAttempts,
23 | 		maxReconnectAttempts
24 | 	} = polling;
25 | 
26 | 	if (isOfflineMode || connectionStatus === 'offline') {
27 | 		return (
28 | 			<div className="flex items-center gap-2">
29 | 				<div
30 | 					className="flex items-center gap-1 text-red-400"
31 | 					title="Offline mode - using cached data"
32 | 				>
33 | 					<div className="w-2 h-2 rounded-full bg-red-400" />
34 | 					<span className="text-xs">Offline</span>
35 | 				</div>
36 | 				<button
37 | 					onClick={onRetry}
38 | 					className="text-xs text-blue-400 hover:underline"
39 | 					title="Attempt to reconnect"
40 | 				>
41 | 					Retry
42 | 				</button>
43 | 			</div>
44 | 		);
45 | 	}
46 | 
47 | 	if (connectionStatus === 'reconnecting') {
48 | 		return (
49 | 			<div
50 | 				className="flex items-center gap-1 text-yellow-400"
51 | 				title={`Reconnecting... (${reconnectAttempts}/${maxReconnectAttempts})`}
52 | 			>
53 | 				<div className="w-2 h-2 rounded-full bg-yellow-400 animate-pulse" />
54 | 				<span className="text-xs">Reconnecting</span>
55 | 			</div>
56 | 		);
57 | 	}
58 | 
59 | 	if (errorCount > 0) {
60 | 		return (
61 | 			<div
62 | 				className="flex items-center gap-1 text-yellow-400"
63 | 				title={`${errorCount} polling error${errorCount > 1 ? 's' : ''}`}
64 | 			>
65 | 				<div className="w-2 h-2 rounded-full bg-yellow-400" />
66 | 				<span className="text-xs">Live (errors)</span>
67 | 			</div>
68 | 		);
69 | 	}
70 | 
71 | 	if (isActive) {
72 | 		return (
73 | 			<div
74 | 				className="flex items-center gap-1 text-green-400"
75 | 				title="Live updates active"
76 | 			>
77 | 				<div className="w-2 h-2 rounded-full bg-green-400 animate-pulse" />
78 | 				<span className="text-xs">Live</span>
79 | 			</div>
80 | 		);
81 | 	}
82 | 
83 | 	return null;
84 | };
85 | 
```

--------------------------------------------------------------------------------
/src/constants/profiles.js:
--------------------------------------------------------------------------------

```javascript
 1 | /**
 2 |  * @typedef {'amp' | 'claude' | 'cline' | 'codex' | 'cursor' | 'gemini' | 'kiro' | 'opencode' | 'kilo' | 'roo' | 'trae' | 'windsurf' | 'vscode' | 'zed'} RulesProfile
 3 |  */
 4 | 
 5 | /**
 6 |  * Available rule profiles for project initialization and rules command
 7 |  *
 8 |  * ⚠️  SINGLE SOURCE OF TRUTH: This is the authoritative list of all supported rule profiles.
 9 |  * This constant is used directly throughout the codebase (previously aliased as PROFILE_NAMES).
10 |  *
11 |  * @type {RulesProfile[]}
12 |  * @description Defines possible rule profile sets:
13 |  * - amp: Amp Code integration
14 |  * - claude: Claude Code integration
15 |  * - cline: Cline IDE rules
16 |  * - codex: Codex integration
17 |  * - cursor: Cursor IDE rules
18 |  * - gemini: Gemini integration
19 |  * - kiro: Kiro IDE rules
20 |  * - opencode: OpenCode integration
21 |  * - kilo: Kilo Code integration
22 |  * - roo: Roo Code IDE rules
23 |  * - trae: Trae IDE rules
24 |  * - vscode: VS Code with GitHub Copilot integration
25 |  * - windsurf: Windsurf IDE rules
26 |  * - zed: Zed IDE rules
27 |  *
28 |  * To add a new rule profile:
29 |  * 1. Add the profile name to this array
30 |  * 2. Create a profile file in src/profiles/{profile}.js
31 |  * 3. Export it as {profile}Profile in src/profiles/index.js
32 |  */
33 | export const RULE_PROFILES = [
34 | 	'amp',
35 | 	'claude',
36 | 	'cline',
37 | 	'codex',
38 | 	'cursor',
39 | 	'gemini',
40 | 	'kiro',
41 | 	'opencode',
42 | 	'kilo',
43 | 	'roo',
44 | 	'trae',
45 | 	'vscode',
46 | 	'windsurf',
47 | 	'zed'
48 | ];
49 | 
50 | /**
51 |  * Centralized enum for all supported Roo agent modes
52 |  * @type {string[]}
53 |  * @description Available Roo Code IDE modes for rule generation
54 |  */
55 | export const ROO_MODES = [
56 | 	'architect',
57 | 	'ask',
58 | 	'orchestrator',
59 | 	'code',
60 | 	'debug',
61 | 	'test'
62 | ];
63 | 
64 | /**
65 |  * Check if a given rule profile is valid
66 |  * @param {string} rulesProfile - The rule profile to check
67 |  * @returns {boolean} True if the rule profile is valid, false otherwise
68 |  */
69 | export function isValidRulesProfile(rulesProfile) {
70 | 	return RULE_PROFILES.includes(rulesProfile);
71 | }
72 | 
```

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

```markdown
 1 | ---
 2 | title: Executing Tasks
 3 | sidebarTitle: "Executing Tasks"
 4 | ---
 5 | 
 6 | Now that your tasks are generated and reviewed you are ready to begin executing.
 7 | 
 8 | ## Select the Task to Work on: Next Task
 9 | 
10 | Task Master has the "next" command to find the next task to work on. You can access it with the following request:
11 | ```
12 | What's the next task I should work on? Please consider dependencies and priorities.
13 | ```
14 | Alternatively you can use the CLI to show the next task
15 | ```bash
16 | task-master next
17 | ```
18 | 
19 | ## Discuss Task
20 | When you know what task to work on next you can then start chatting with the agent to make sure it understands the plan of action.
21 | 
22 | You can tag relevant files and folders so it knows what context to pull up as it generates its plan. For example:
23 | ```
24 | Please review Task 5 and confirm you understand how to execute before beginning. Refer to @models @api and @schema 
25 | ```
26 | The agent will begin analyzing the task and files and respond with the steps to complete the task. 
27 | 
28 | ## Agent Task execution
29 | 
30 | If you agree with the plan of action, tell the agent to get started.
31 | ```
32 | You may begin. I believe in you.
33 | ```
34 | 
35 | ## Review and Test
36 | 
37 | Once the agent is finished with the task you can refer to the task testing strategy to make sure it was completed correctly.
38 | 
39 | ## Update Task Status
40 | 
41 | If the task was completed correctly you can update the status to done
42 | 
43 | ```
44 | Please mark Task 5 as done
45 | ```
46 | The agent will execute
47 | ```bash
48 | task-master set-status --id=5 --status=done
49 | ```
50 | 
51 | ## Rules and Context
52 | 
53 | If you ran into problems and had to debug errors you can create new rules as you go. This helps build context on your codebase that helps the creation and execution of future tasks.
54 | 
55 | ## On to the Next Task!
56 | 
57 | By now you have all you need to get started executing code faster and smarter with Task Master.
58 | 
59 | If you have any questions please check out [Frequently Asked Questions](/getting-started/faq)
60 | 
```

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

```
 1 | # Task ID: 3
 2 | # Title: Create standardized prompt builder
 3 | # Status: pending
 4 | # Dependencies: 1
 5 | # Priority: medium
 6 | # Description: Implement a function to build the standardized prompt for claude-code based on the task details
 7 | # Details:
 8 | Create a function in the StartCommand class that builds the standardized prompt according to the template provided in the PRD. The prompt should include instructions for Claude to first run `tm show <task_id>` to get task details, and then implement the required changes.
 9 | 
10 | ```typescript
11 | private buildPrompt(taskId: string): string {
12 |   return `You are an AI coding assistant with access to this repository's codebase.
13 | 
14 | First, run this command to get the task details:
15 | tm show ${taskId}
16 | 
17 | Then implement the task with these requirements:
18 | - Make the SMALLEST number of code changes possible
19 | - Follow ALL existing patterns in the codebase (you have access to analyze the code)
20 | - Do NOT over-engineer the solution
21 | - Use existing files/functions/patterns wherever possible
22 | - When complete, print: COMPLETED: <brief summary of changes>
23 | 
24 | Begin by running tm show ${taskId} to understand what needs to be implemented.`;
25 | }
26 | ```
27 | <info added on 2025-09-12T02:40:01.812Z>
28 | The prompt builder function will handle task context retrieval by instructing Claude to use the task-master show command. This approach ensures Claude has access to all necessary task details before implementation begins. The command syntax "tm show ${taskId}" embedded in the prompt will direct Claude to first gather the complete task context, including description, requirements, and any existing implementation details, before proceeding with code changes.
29 | </info added on 2025-09-12T02:40:01.812Z>
30 | 
31 | # Test Strategy:
32 | Verify the prompt is correctly formatted by calling the function with a sample task ID and checking that the output matches the expected template with the task ID properly inserted.
33 | 
```

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

```markdown
 1 | Update tasks with intelligent field detection and bulk operations.
 2 | 
 3 | Arguments: $ARGUMENTS
 4 | 
 5 | ## Intelligent Task Updates
 6 | 
 7 | Parse arguments to determine update intent and execute smartly.
 8 | 
 9 | ### 1. **Natural Language Processing**
10 | 
11 | Understand update requests like:
12 | - "mark 23 as done" → Update status to done
13 | - "increase priority of 45" → Set priority to high
14 | - "add dependency on 12 to task 34" → Add dependency
15 | - "tasks 20-25 need review" → Bulk status update
16 | - "all API tasks high priority" → Pattern-based update
17 | 
18 | ### 2. **Smart Field Detection**
19 | 
20 | Automatically detect what to update:
21 | - Status keywords: done, complete, start, pause, review
22 | - Priority changes: urgent, high, low, deprioritize
23 | - Dependency updates: depends on, blocks, after
24 | - Assignment: assign to, owner, responsible
25 | - Time: estimate, spent, deadline
26 | 
27 | ### 3. **Bulk Operations**
28 | 
29 | Support for multiple task updates:
30 | ```
31 | Examples:
32 | - "complete tasks 12, 15, 18"
33 | - "all pending auth tasks to in-progress"
34 | - "increase priority for tasks blocking 45"
35 | - "defer all documentation tasks"
36 | ```
37 | 
38 | ### 4. **Contextual Validation**
39 | 
40 | Before updating, check:
41 | - Status transitions are valid
42 | - Dependencies don't create cycles
43 | - Priority changes make sense
44 | - Bulk updates won't break project flow
45 | 
46 | Show preview:
47 | ```
48 | Update Preview:
49 | ─────────────────
50 | Tasks to update: #23, #24, #25
51 | Change: status → in-progress
52 | Impact: Will unblock tasks #30, #31
53 | Warning: Task #24 has unmet dependencies
54 | ```
55 | 
56 | ### 5. **Smart Suggestions**
57 | 
58 | Based on update:
59 | - Completing task? → Show newly unblocked tasks
60 | - Changing priority? → Show impact on sprint
61 | - Adding dependency? → Check for conflicts
62 | - Bulk update? → Show summary of changes
63 | 
64 | ### 6. **Workflow Integration**
65 | 
66 | After updates:
67 | - Auto-update dependent task states
68 | - Trigger status recalculation
69 | - Update sprint/milestone progress
70 | - Log changes with context
71 | 
72 | Result: Flexible, intelligent task updates with safety checks.
```

--------------------------------------------------------------------------------
/tests/fixtures/sample-claude-response.js:
--------------------------------------------------------------------------------

```javascript
 1 | /**
 2 |  * Sample Claude API response for testing
 3 |  */
 4 | 
 5 | export const sampleClaudeResponse = {
 6 | 	tasks: [
 7 | 		{
 8 | 			id: 1,
 9 | 			title: 'Setup Task Data Structure',
10 | 			description: 'Implement the core task data structure and file operations',
11 | 			status: 'pending',
12 | 			dependencies: [],
13 | 			priority: 'high',
14 | 			details:
15 | 				'Create the tasks.json file structure with support for task properties including ID, title, description, status, dependencies, priority, details, and test strategy. Implement file system operations for reading and writing task data.',
16 | 			testStrategy:
17 | 				'Verify tasks.json is created with the correct structure and that task data can be read from and written to the file.'
18 | 		},
19 | 		{
20 | 			id: 2,
21 | 			title: 'Implement CLI Foundation',
22 | 			description:
23 | 				'Create the command-line interface foundation with basic commands',
24 | 			status: 'pending',
25 | 			dependencies: [1],
26 | 			priority: 'high',
27 | 			details:
28 | 				'Set up Commander.js for handling CLI commands. Implement the basic command structure including help documentation. Create the foundational command parsing logic.',
29 | 			testStrategy:
30 | 				'Test each command to ensure it properly parses arguments and options. Verify help documentation is displayed correctly.'
31 | 		},
32 | 		{
33 | 			id: 3,
34 | 			title: 'Develop Task Management Operations',
35 | 			description:
36 | 				'Implement core operations for creating, reading, updating, and deleting tasks',
37 | 			status: 'pending',
38 | 			dependencies: [1],
39 | 			priority: 'medium',
40 | 			details:
41 | 				'Implement functions for listing tasks, adding new tasks, updating task status, and removing tasks. Include support for filtering tasks by status and other properties.',
42 | 			testStrategy:
43 | 				'Create unit tests for each CRUD operation to verify they correctly modify the task data.'
44 | 		}
45 | 	],
46 | 	metadata: {
47 | 		projectName: 'Task Management CLI',
48 | 		totalTasks: 3,
49 | 		sourceFile: 'tests/fixtures/sample-prd.txt',
50 | 		generatedAt: '2023-12-15'
51 | 	}
52 | };
53 | 
```

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

```javascript
 1 | /**
 2 |  * src/ai-providers/anthropic.js
 3 |  *
 4 |  * Implementation for interacting with Anthropic models (e.g., Claude)
 5 |  * using the Vercel AI SDK.
 6 |  */
 7 | 
 8 | import { createAnthropic } from '@ai-sdk/anthropic';
 9 | import { BaseAIProvider } from './base-provider.js';
10 | 
11 | // TODO: Implement standardized functions for generateText, streamText, generateObject
12 | 
13 | // --- Client Instantiation ---
14 | // Note: API key resolution should ideally happen closer to the call site
15 | // using the config manager/resolver which checks process.env and session.env.
16 | // This is a placeholder for basic functionality.
17 | // Remove the global variable and caching logic
18 | // let anthropicClient;
19 | 
20 | export class AnthropicAIProvider extends BaseAIProvider {
21 | 	constructor() {
22 | 		super();
23 | 		this.name = 'Anthropic';
24 | 	}
25 | 
26 | 	/**
27 | 	 * Returns the environment variable name required for this provider's API key.
28 | 	 * @returns {string} The environment variable name for the Anthropic API key
29 | 	 */
30 | 	getRequiredApiKeyName() {
31 | 		return 'ANTHROPIC_API_KEY';
32 | 	}
33 | 
34 | 	/**
35 | 	 * Creates and returns an Anthropic client instance.
36 | 	 * @param {object} params - Parameters for client initialization
37 | 	 * @param {string} params.apiKey - Anthropic API key
38 | 	 * @param {string} [params.baseURL] - Optional custom API endpoint
39 | 	 * @returns {Function} Anthropic client function
40 | 	 * @throws {Error} If initialization fails
41 | 	 */
42 | 	getClient(params) {
43 | 		try {
44 | 			const { apiKey, baseURL } = params;
45 | 			const fetchImpl = this.createProxyFetch();
46 | 
47 | 			return createAnthropic({
48 | 				apiKey,
49 | 				...(baseURL && { baseURL }),
50 | 				headers: {
51 | 					'anthropic-beta': 'output-128k-2025-02-19'
52 | 				},
53 | 				...(fetchImpl && { fetch: fetchImpl })
54 | 			});
55 | 		} catch (error) {
56 | 			this.handleError('client initialization', error);
57 | 		}
58 | 	}
59 | }
60 | 
61 | // TODO: Implement streamAnthropicObject if needed and supported well by the SDK for Anthropic.
62 | // The basic structure would be similar to generateAnthropicObject but using streamObject.
63 | 
```

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

```javascript
 1 | /**
 2 |  * tools/use-tag.js
 3 |  * Tool to switch to a different tag context
 4 |  */
 5 | 
 6 | import { z } from 'zod';
 7 | import {
 8 | 	createErrorResponse,
 9 | 	handleApiResult,
10 | 	withNormalizedProjectRoot
11 | } from './utils.js';
12 | import { useTagDirect } from '../core/task-master-core.js';
13 | import { findTasksPath } from '../core/utils/path-utils.js';
14 | 
15 | /**
16 |  * Register the useTag tool with the MCP server
17 |  * @param {Object} server - FastMCP server instance
18 |  */
19 | export function registerUseTagTool(server) {
20 | 	server.addTool({
21 | 		name: 'use_tag',
22 | 		description: 'Switch to a different tag context for task operations',
23 | 		parameters: z.object({
24 | 			name: z.string().describe('Name of the tag to switch to'),
25 | 			file: z
26 | 				.string()
27 | 				.optional()
28 | 				.describe('Path to the tasks file (default: tasks/tasks.json)'),
29 | 			projectRoot: z
30 | 				.string()
31 | 				.describe('The directory of the project. Must be an absolute path.')
32 | 		}),
33 | 		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
34 | 			try {
35 | 				log.info(`Starting use-tag with args: ${JSON.stringify(args)}`);
36 | 
37 | 				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
38 | 				let tasksJsonPath;
39 | 				try {
40 | 					tasksJsonPath = findTasksPath(
41 | 						{ projectRoot: args.projectRoot, file: args.file },
42 | 						log
43 | 					);
44 | 				} catch (error) {
45 | 					log.error(`Error finding tasks.json: ${error.message}`);
46 | 					return createErrorResponse(
47 | 						`Failed to find tasks.json: ${error.message}`
48 | 					);
49 | 				}
50 | 
51 | 				// Call the direct function
52 | 				const result = await useTagDirect(
53 | 					{
54 | 						tasksJsonPath: tasksJsonPath,
55 | 						name: args.name,
56 | 						projectRoot: args.projectRoot
57 | 					},
58 | 					log,
59 | 					{ session }
60 | 				);
61 | 
62 | 				return handleApiResult(
63 | 					result,
64 | 					log,
65 | 					'Error switching tag',
66 | 					undefined,
67 | 					args.projectRoot
68 | 				);
69 | 			} catch (error) {
70 | 				log.error(`Error in use-tag tool: ${error.message}`);
71 | 				return createErrorResponse(error.message);
72 | 			}
73 | 		})
74 | 	});
75 | }
76 | 
```

--------------------------------------------------------------------------------
/apps/mcp/src/tools/README-ZOD-V3.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Why MCP Tools Use Zod v3
 2 | 
 3 | ## Problem
 4 | 
 5 | - **FastMCP** uses `xsschema` to convert schemas → outputs JSON Schema **Draft 2020-12**
 6 | - **MCP clients** (Augment IDE, gemini-cli, etc.) only support **Draft-07**
 7 | - Using Zod v4 in tools causes "vendor undefined" errors and tool discovery failures
 8 | 
 9 | ## Temporary Solution
10 | 
11 | All MCP tool files import from `zod/v3` instead of `zod`:
12 | 
13 | ```typescript
14 | import { z } from 'zod/v3';  // ✅ Draft-07 compatible
15 | // NOT: import { z } from 'zod';  // ❌ Would use Draft 2020-12
16 | ```
17 | 
18 | ### Why This Works
19 | 
20 | - Zod v4 ships with v3 compatibility at `zod/v3`
21 | - FastMCP + zod-to-json-schema converts Zod v3 schemas → **Draft-07**
22 | - This ensures MCP clients can discover and use our tools
23 | 
24 | ### What This Means
25 | 
26 | - ✅ **MCP tools** → use `zod/v3` (apps/mcp & mcp-server/src/tools)
27 | - ✅ **Rest of codebase** → uses `zod` (Zod v4)
28 | - ✅ **No conflicts** → they're from the same package, just different versions
29 | 
30 | ## When Can We Remove This?
31 | 
32 | This workaround can be removed when **either**:
33 | 
34 | 1. **FastMCP adds JSON Schema version configuration**
35 |    - e.g., `new FastMCP({ jsonSchema: { target: 'draft-07' } })`
36 |    - Tracking: https://github.com/punkpeye/fastmcp/issues/189
37 | 
38 | 2. **MCP spec adds Draft 2020-12 support**
39 |    - Unlikely in the short term
40 | 
41 | 3. **xsschema adds version targeting**
42 |    - Would allow FastMCP to use Draft-07
43 | 
44 | ## How to Maintain
45 | 
46 | When adding new MCP tools:
47 | 
48 | ```typescript
49 | // ✅ CORRECT
50 | import { z } from 'zod/v3';
51 | 
52 | export function registerMyTool(server: FastMCP) {
53 |   server.addTool({
54 |     name: 'my_tool',
55 |     parameters: z.object({ ... }),  // Will use Draft-07
56 |     execute: async (args, context) => { ... }
57 |   });
58 | }
59 | ```
60 | 
61 | ```typescript
62 | // ❌ WRONG - Will break MCP client compatibility
63 | import { z } from 'zod';  // Don't do this in apps/mcp/src/tools/
64 | ```
65 | 
66 | ---
67 | 
68 | **Last Updated:** 2025-10-18
69 | **Affects:** All files in `apps/mcp/src/tools/`
70 | **See Also:** `mcp-server/src/tools/README-ZOD-V3.md` (same workaround)
71 | 
```

--------------------------------------------------------------------------------
/tests/unit/utils-strip-ansi.test.js:
--------------------------------------------------------------------------------

```javascript
 1 | /**
 2 |  * Tests for the stripAnsiCodes utility function
 3 |  */
 4 | import { jest } from '@jest/globals';
 5 | 
 6 | // Import the module under test
 7 | const { stripAnsiCodes } = await import('../../scripts/modules/utils.js');
 8 | 
 9 | describe('stripAnsiCodes', () => {
10 | 	test('should remove ANSI color codes from text', () => {
11 | 		const textWithColors = '\x1b[31mRed text\x1b[0m \x1b[32mGreen text\x1b[0m';
12 | 		const result = stripAnsiCodes(textWithColors);
13 | 		expect(result).toBe('Red text Green text');
14 | 	});
15 | 
16 | 	test('should handle text without ANSI codes', () => {
17 | 		const plainText = 'This is plain text';
18 | 		const result = stripAnsiCodes(plainText);
19 | 		expect(result).toBe('This is plain text');
20 | 	});
21 | 
22 | 	test('should handle empty string', () => {
23 | 		const result = stripAnsiCodes('');
24 | 		expect(result).toBe('');
25 | 	});
26 | 
27 | 	test('should handle complex ANSI sequences', () => {
28 | 		// Test with various ANSI escape sequences
29 | 		const complexText =
30 | 			'\x1b[1;31mBold red\x1b[0m \x1b[4;32mUnderlined green\x1b[0m \x1b[33;46mYellow on cyan\x1b[0m';
31 | 		const result = stripAnsiCodes(complexText);
32 | 		expect(result).toBe('Bold red Underlined green Yellow on cyan');
33 | 	});
34 | 
35 | 	test('should handle non-string input gracefully', () => {
36 | 		expect(stripAnsiCodes(null)).toBe(null);
37 | 		expect(stripAnsiCodes(undefined)).toBe(undefined);
38 | 		expect(stripAnsiCodes(123)).toBe(123);
39 | 		expect(stripAnsiCodes({})).toEqual({});
40 | 	});
41 | 
42 | 	test('should handle real chalk output patterns', () => {
43 | 		// Test patterns similar to what chalk produces
44 | 		const chalkLikeText =
45 | 			'1 \x1b[32m✓ done\x1b[39m Setup Project \x1b[31m(high)\x1b[39m';
46 | 		const result = stripAnsiCodes(chalkLikeText);
47 | 		expect(result).toBe('1 ✓ done Setup Project (high)');
48 | 	});
49 | 
50 | 	test('should handle multiline text with ANSI codes', () => {
51 | 		const multilineText =
52 | 			'\x1b[31mLine 1\x1b[0m\n\x1b[32mLine 2\x1b[0m\n\x1b[33mLine 3\x1b[0m';
53 | 		const result = stripAnsiCodes(multilineText);
54 | 		expect(result).toBe('Line 1\nLine 2\nLine 3');
55 | 	});
56 | });
57 | 
```

--------------------------------------------------------------------------------
/mcp-test.js:
--------------------------------------------------------------------------------

```javascript
 1 | #!/usr/bin/env node
 2 | 
 3 | import { Config } from 'fastmcp';
 4 | import path from 'path';
 5 | import fs from 'fs';
 6 | 
 7 | // Log the current directory
 8 | console.error(`Current working directory: ${process.cwd()}`);
 9 | 
10 | try {
11 | 	console.error('Attempting to load FastMCP Config...');
12 | 
13 | 	// Check if .cursor/mcp.json exists
14 | 	const mcpPath = path.join(process.cwd(), '.cursor', 'mcp.json');
15 | 	console.error(`Checking if mcp.json exists at: ${mcpPath}`);
16 | 
17 | 	if (fs.existsSync(mcpPath)) {
18 | 		console.error('mcp.json file found');
19 | 		console.error(
20 | 			`File content: ${JSON.stringify(JSON.parse(fs.readFileSync(mcpPath, 'utf8')), null, 2)}`
21 | 		);
22 | 	} else {
23 | 		console.error('mcp.json file not found');
24 | 	}
25 | 
26 | 	// Try to create Config
27 | 	const config = new Config();
28 | 	console.error('Config created successfully');
29 | 
30 | 	// Check if env property exists
31 | 	if (config.env) {
32 | 		console.error(
33 | 			`Config.env exists with keys: ${Object.keys(config.env).join(', ')}`
34 | 		);
35 | 
36 | 		// Print each env var value (careful with sensitive values)
37 | 		for (const [key, value] of Object.entries(config.env)) {
38 | 			if (key.includes('KEY')) {
39 | 				console.error(`${key}: [value hidden]`);
40 | 			} else {
41 | 				console.error(`${key}: ${value}`);
42 | 			}
43 | 		}
44 | 	} else {
45 | 		console.error('Config.env does not exist');
46 | 	}
47 | } catch (error) {
48 | 	console.error(`Error loading Config: ${error.message}`);
49 | 	console.error(`Stack trace: ${error.stack}`);
50 | }
51 | 
52 | // Log process.env to see if values from mcp.json were loaded automatically
53 | console.error('\nChecking if process.env already has values from mcp.json:');
54 | const envVars = [
55 | 	'ANTHROPIC_API_KEY',
56 | 	'PERPLEXITY_API_KEY',
57 | 	'MODEL',
58 | 	'PERPLEXITY_MODEL',
59 | 	'MAX_TOKENS',
60 | 	'TEMPERATURE',
61 | 	'DEFAULT_SUBTASKS',
62 | 	'DEFAULT_PRIORITY'
63 | ];
64 | 
65 | for (const varName of envVars) {
66 | 	if (process.env[varName]) {
67 | 		if (varName.includes('KEY')) {
68 | 			console.error(`${varName}: [value hidden]`);
69 | 		} else {
70 | 			console.error(`${varName}: ${process.env[varName]}`);
71 | 		}
72 | 	} else {
73 | 		console.error(`${varName}: not set`);
74 | 	}
75 | }
76 | 
```

--------------------------------------------------------------------------------
/apps/cli/CHANGELOG.md:
--------------------------------------------------------------------------------

```markdown
 1 | # @tm/cli
 2 | 
 3 | ## null
 4 | 
 5 | ### Patch Changes
 6 | 
 7 | - [#1396](https://github.com/eyaltoledano/claude-task-master/pull/1396) [`9883e83`](https://github.com/eyaltoledano/claude-task-master/commit/9883e83b78306e55003e960ea072a11048d89ec9) Thanks [@bjcoombs](https://github.com/bjcoombs)! - Fix box title alignment by adding emoji variant selector to warning sign
 8 | 
 9 | - Updated dependencies []:
10 |   - @tm/core@null
11 | 
12 | ## null
13 | 
14 | ### Patch Changes
15 | 
16 | - Updated dependencies []:
17 |   - @tm/core@null
18 | 
19 | ## null
20 | 
21 | ### Patch Changes
22 | 
23 | - Updated dependencies []:
24 |   - @tm/core@null
25 | 
26 | ## null
27 | 
28 | ### Patch Changes
29 | 
30 | - [#1305](https://github.com/eyaltoledano/claude-task-master/pull/1305) [`a98d96e`](https://github.com/eyaltoledano/claude-task-master/commit/a98d96ef0414833b948672f86da4acc11f700ebb) Thanks [@bjcoombs](https://github.com/bjcoombs)! - Fix warning message box width to match dashboard box width for consistent UI alignment
31 | 
32 | - Updated dependencies []:
33 |   - @tm/core@null
34 | 
35 | ## null
36 | 
37 | ### Patch Changes
38 | 
39 | - Updated dependencies []:
40 |   - @tm/core@null
41 | 
42 | ## null
43 | 
44 | ### Patch Changes
45 | 
46 | - Updated dependencies []:
47 |   - @tm/core@null
48 | 
49 | ## null
50 | 
51 | ### Patch Changes
52 | 
53 | - Updated dependencies []:
54 |   - @tm/core@null
55 | 
56 | ## 0.27.0
57 | 
58 | ### Patch Changes
59 | 
60 | - Updated dependencies []:
61 |   - @tm/[email protected]
62 | 
63 | ## 0.27.0-rc.0
64 | 
65 | ### Minor Changes
66 | 
67 | - [#1213](https://github.com/eyaltoledano/claude-task-master/pull/1213) [`137ef36`](https://github.com/eyaltoledano/claude-task-master/commit/137ef362789a9cdfdb1925e35e0438c1fa6c69ee) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - testing this stuff out to see how the release candidate works with monorepo
68 | 
69 | ## 1.1.0-rc.0
70 | 
71 | ### Minor Changes
72 | 
73 | - [#1213](https://github.com/eyaltoledano/claude-task-master/pull/1213) [`cd90b4d`](https://github.com/eyaltoledano/claude-task-master/commit/cd90b4d65fc2f04bdad9fb73aba320b58a124240) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - testing this stuff out to see how the release candidate works with monorepo
74 | 
```

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

```javascript
 1 | /**
 2 |  * tools/rename-tag.js
 3 |  * Tool to rename an existing tag
 4 |  */
 5 | 
 6 | import { z } from 'zod';
 7 | import {
 8 | 	createErrorResponse,
 9 | 	handleApiResult,
10 | 	withNormalizedProjectRoot
11 | } from './utils.js';
12 | import { renameTagDirect } from '../core/task-master-core.js';
13 | import { findTasksPath } from '../core/utils/path-utils.js';
14 | 
15 | /**
16 |  * Register the renameTag tool with the MCP server
17 |  * @param {Object} server - FastMCP server instance
18 |  */
19 | export function registerRenameTagTool(server) {
20 | 	server.addTool({
21 | 		name: 'rename_tag',
22 | 		description: 'Rename an existing tag',
23 | 		parameters: z.object({
24 | 			oldName: z.string().describe('Current name of the tag to rename'),
25 | 			newName: z.string().describe('New name for the tag'),
26 | 			file: z
27 | 				.string()
28 | 				.optional()
29 | 				.describe('Path to the tasks file (default: tasks/tasks.json)'),
30 | 			projectRoot: z
31 | 				.string()
32 | 				.describe('The directory of the project. Must be an absolute path.')
33 | 		}),
34 | 		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
35 | 			try {
36 | 				log.info(`Starting rename-tag with args: ${JSON.stringify(args)}`);
37 | 
38 | 				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
39 | 				let tasksJsonPath;
40 | 				try {
41 | 					tasksJsonPath = findTasksPath(
42 | 						{ projectRoot: args.projectRoot, file: args.file },
43 | 						log
44 | 					);
45 | 				} catch (error) {
46 | 					log.error(`Error finding tasks.json: ${error.message}`);
47 | 					return createErrorResponse(
48 | 						`Failed to find tasks.json: ${error.message}`
49 | 					);
50 | 				}
51 | 
52 | 				// Call the direct function
53 | 				const result = await renameTagDirect(
54 | 					{
55 | 						tasksJsonPath: tasksJsonPath,
56 | 						oldName: args.oldName,
57 | 						newName: args.newName,
58 | 						projectRoot: args.projectRoot
59 | 					},
60 | 					log,
61 | 					{ session }
62 | 				);
63 | 
64 | 				return handleApiResult(
65 | 					result,
66 | 					log,
67 | 					'Error renaming tag',
68 | 					undefined,
69 | 					args.projectRoot
70 | 				);
71 | 			} catch (error) {
72 | 				log.error(`Error in rename-tag tool: ${error.message}`);
73 | 				return createErrorResponse(error.message);
74 | 			}
75 | 		})
76 | 	});
77 | }
78 | 
```

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

```typescript
 1 | import { Slot } from '@radix-ui/react-slot';
 2 | import { type VariantProps, cva } from 'class-variance-authority';
 3 | import type * as React from 'react';
 4 | 
 5 | import { cn } from '../../lib/utils';
 6 | 
 7 | const buttonVariants = cva(
 8 | 	"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-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",
 9 | 	{
10 | 		variants: {
11 | 			variant: {
12 | 				default:
13 | 					'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
14 | 				destructive:
15 | 					'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
16 | 				outline:
17 | 					'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
18 | 				secondary:
19 | 					'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
20 | 				ghost:
21 | 					'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
22 | 				link: 'text-primary underline-offset-4 hover:underline'
23 | 			},
24 | 			size: {
25 | 				default: 'h-9 px-4 py-2 has-[>svg]:px-3',
26 | 				sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
27 | 				lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
28 | 				icon: 'size-9'
29 | 			}
30 | 		},
31 | 		defaultVariants: {
32 | 			variant: 'default',
33 | 			size: 'default'
34 | 		}
35 | 	}
36 | );
37 | 
38 | function Button({
39 | 	className,
40 | 	variant,
41 | 	size,
42 | 	asChild = false,
43 | 	...props
44 | }: React.ComponentProps<'button'> &
45 | 	VariantProps<typeof buttonVariants> & {
46 | 		asChild?: boolean;
47 | 	}) {
48 | 	const Comp = asChild ? Slot : 'button';
49 | 
50 | 	return (
51 | 		<Comp
52 | 			data-slot="button"
53 | 			className={cn(buttonVariants({ variant, size, className }))}
54 | 			{...props}
55 | 		/>
56 | 	);
57 | }
58 | 
59 | export { Button, buttonVariants };
60 | 
```

--------------------------------------------------------------------------------
/mcp-server/src/tools/list-tags.js:
--------------------------------------------------------------------------------

```javascript
 1 | /**
 2 |  * tools/list-tags.js
 3 |  * Tool to list all available tags
 4 |  */
 5 | 
 6 | import { z } from 'zod';
 7 | import {
 8 | 	createErrorResponse,
 9 | 	handleApiResult,
10 | 	withNormalizedProjectRoot
11 | } from './utils.js';
12 | import { listTagsDirect } from '../core/task-master-core.js';
13 | import { findTasksPath } from '../core/utils/path-utils.js';
14 | 
15 | /**
16 |  * Register the listTags tool with the MCP server
17 |  * @param {Object} server - FastMCP server instance
18 |  */
19 | export function registerListTagsTool(server) {
20 | 	server.addTool({
21 | 		name: 'list_tags',
22 | 		description: 'List all available tags with task counts and metadata',
23 | 		parameters: z.object({
24 | 			showMetadata: z
25 | 				.boolean()
26 | 				.optional()
27 | 				.describe('Whether to include metadata in the output (default: false)'),
28 | 			file: z
29 | 				.string()
30 | 				.optional()
31 | 				.describe('Path to the tasks file (default: tasks/tasks.json)'),
32 | 			projectRoot: z
33 | 				.string()
34 | 				.describe('The directory of the project. Must be an absolute path.')
35 | 		}),
36 | 		execute: withNormalizedProjectRoot(async (args, { log, session }) => {
37 | 			try {
38 | 				log.info(`Starting list-tags with args: ${JSON.stringify(args)}`);
39 | 
40 | 				// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
41 | 				let tasksJsonPath;
42 | 				try {
43 | 					tasksJsonPath = findTasksPath(
44 | 						{ projectRoot: args.projectRoot, file: args.file },
45 | 						log
46 | 					);
47 | 				} catch (error) {
48 | 					log.error(`Error finding tasks.json: ${error.message}`);
49 | 					return createErrorResponse(
50 | 						`Failed to find tasks.json: ${error.message}`
51 | 					);
52 | 				}
53 | 
54 | 				// Call the direct function
55 | 				const result = await listTagsDirect(
56 | 					{
57 | 						tasksJsonPath: tasksJsonPath,
58 | 						showMetadata: args.showMetadata,
59 | 						projectRoot: args.projectRoot
60 | 					},
61 | 					log,
62 | 					{ session }
63 | 				);
64 | 
65 | 				return handleApiResult(
66 | 					result,
67 | 					log,
68 | 					'Error listing tags',
69 | 					undefined,
70 | 					args.projectRoot
71 | 				);
72 | 			} catch (error) {
73 | 				log.error(`Error in list-tags tool: ${error.message}`);
74 | 				return createErrorResponse(error.message);
75 | 			}
76 | 		})
77 | 	});
78 | }
79 | 
```

--------------------------------------------------------------------------------
/tests/e2e/test_llm_analysis.sh:
--------------------------------------------------------------------------------

```bash
 1 | #!/bin/bash
 2 | 
 3 | # Script to test the LLM analysis function independently
 4 | 
 5 | # Exit on error
 6 | set -u
 7 | set -o pipefail
 8 | 
 9 | # Source the helper functions
10 | HELPER_SCRIPT="tests/e2e/e2e_helpers.sh"
11 | if [ -f "$HELPER_SCRIPT" ]; then
12 |   source "$HELPER_SCRIPT"
13 |   echo "[INFO] Sourced helper script: $HELPER_SCRIPT"
14 | else
15 |   echo "[ERROR] Helper script not found at $HELPER_SCRIPT. Exiting." >&2
16 |   exit 1
17 | fi
18 | 
19 | # --- Configuration ---
20 | # Get the absolute path to the project root (assuming this script is run from the root)
21 | PROJECT_ROOT="$(pwd)"
22 | 
23 | # --- Argument Parsing ---
24 | if [ "$#" -ne 2 ]; then
25 |   echo "Usage: $0 <path_to_log_file> <path_to_test_run_directory>" >&2
26 |   echo "Example: $0 tests/e2e/log/e2e_run_YYYYMMDD_HHMMSS.log tests/e2e/_runs/run_YYYYMMDD_HHMMSS" >&2
27 |   exit 1
28 | fi
29 | 
30 | LOG_FILE_REL="$1"     # Relative path from project root
31 | TEST_RUN_DIR_REL="$2" # Relative path from project root
32 | 
33 | # Construct absolute paths
34 | LOG_FILE_ABS="$PROJECT_ROOT/$LOG_FILE_REL"
35 | TEST_RUN_DIR_ABS="$PROJECT_ROOT/$TEST_RUN_DIR_REL"
36 | 
37 | # --- Validation ---
38 | if [ ! -f "$LOG_FILE_ABS" ]; then
39 |   echo "[ERROR] Log file not found: $LOG_FILE_ABS" >&2
40 |   exit 1
41 | fi
42 | 
43 | if [ ! -d "$TEST_RUN_DIR_ABS" ]; then
44 |   echo "[ERROR] Test run directory not found: $TEST_RUN_DIR_ABS" >&2
45 |   exit 1
46 | fi
47 | 
48 | if [ ! -f "$TEST_RUN_DIR_ABS/.env" ]; then
49 |   echo "[ERROR] .env file not found in test run directory: $TEST_RUN_DIR_ABS/.env" >&2
50 |   exit 1
51 | fi
52 | 
53 | 
54 | # --- Execution ---
55 | echo "[INFO] Changing directory to test run directory: $TEST_RUN_DIR_ABS"
56 | cd "$TEST_RUN_DIR_ABS" || { echo "[ERROR] Failed to cd into $TEST_RUN_DIR_ABS"; exit 1; }
57 | 
58 | echo "[INFO] Current directory: $(pwd)"
59 | echo "[INFO] Calling analyze_log_with_llm function with log file: $LOG_FILE_ABS"
60 | 
61 | # Call the function (sourced earlier)
62 | analyze_log_with_llm "$LOG_FILE_ABS"
63 | ANALYSIS_EXIT_CODE=$?
64 | 
65 | echo "[INFO] analyze_log_with_llm finished with exit code: $ANALYSIS_EXIT_CODE"
66 | 
67 | # Optional: cd back to original directory
68 | # echo "[INFO] Changing back to project root: $PROJECT_ROOT"
69 | # cd "$PROJECT_ROOT"
70 | 
71 | exit $ANALYSIS_EXIT_CODE 
```

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

```typescript
 1 | /**
 2 |  * Polling Service - Simplified version
 3 |  * Uses strategy pattern for different polling behaviors
 4 |  */
 5 | 
 6 | import type { ExtensionLogger } from '../utils/logger';
 7 | import type { TaskRepository } from './task-repository';
 8 | 
 9 | export interface PollingStrategy {
10 | 	calculateNextInterval(
11 | 		consecutiveNoChanges: number,
12 | 		lastChangeTime?: number
13 | 	): number;
14 | 	getName(): string;
15 | }
16 | 
17 | export class PollingService {
18 | 	private timer?: NodeJS.Timeout;
19 | 	private consecutiveNoChanges = 0;
20 | 	private lastChangeTime?: number;
21 | 	private lastTasksJson?: string;
22 | 
23 | 	constructor(
24 | 		private repository: TaskRepository,
25 | 		private strategy: PollingStrategy,
26 | 		private logger: ExtensionLogger
27 | 	) {}
28 | 
29 | 	start(): void {
30 | 		if (this.timer) {
31 | 			return;
32 | 		}
33 | 
34 | 		this.logger.log(
35 | 			`Starting polling with ${this.strategy.getName()} strategy`
36 | 		);
37 | 		this.scheduleNextPoll();
38 | 	}
39 | 
40 | 	stop(): void {
41 | 		if (this.timer) {
42 | 			clearTimeout(this.timer);
43 | 			this.timer = undefined;
44 | 			this.logger.log('Polling stopped');
45 | 		}
46 | 	}
47 | 
48 | 	setStrategy(strategy: PollingStrategy): void {
49 | 		this.strategy = strategy;
50 | 		this.logger.log(`Changed to ${strategy.getName()} polling strategy`);
51 | 
52 | 		// Restart with new strategy if running
53 | 		if (this.timer) {
54 | 			this.stop();
55 | 			this.start();
56 | 		}
57 | 	}
58 | 
59 | 	private async poll(): Promise<void> {
60 | 		try {
61 | 			const tasks = await this.repository.getAll();
62 | 			const tasksJson = JSON.stringify(tasks);
63 | 
64 | 			// Check for changes
65 | 			if (tasksJson !== this.lastTasksJson) {
66 | 				this.consecutiveNoChanges = 0;
67 | 				this.lastChangeTime = Date.now();
68 | 				this.logger.debug('Tasks changed');
69 | 			} else {
70 | 				this.consecutiveNoChanges++;
71 | 			}
72 | 
73 | 			this.lastTasksJson = tasksJson;
74 | 		} catch (error) {
75 | 			this.logger.error('Polling error', error);
76 | 		}
77 | 	}
78 | 
79 | 	private scheduleNextPoll(): void {
80 | 		const interval = this.strategy.calculateNextInterval(
81 | 			this.consecutiveNoChanges,
82 | 			this.lastChangeTime
83 | 		);
84 | 
85 | 		this.timer = setTimeout(async () => {
86 | 			await this.poll();
87 | 			this.scheduleNextPoll();
88 | 		}, interval);
89 | 
90 | 		this.logger.debug(`Next poll in ${interval}ms`);
91 | 	}
92 | }
93 | 
```

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

```yaml
 1 | name: Trigger Claude Documentation Update
 2 | 
 3 | on:
 4 |   push:
 5 |     branches:
 6 |       - next
 7 |     paths-ignore:
 8 |       - "apps/docs/**"
 9 |       - "*.md"
10 |       - ".github/workflows/**"
11 | 
12 | jobs:
13 |   trigger-docs-update:
14 |     # Only run if changes were merged (not direct pushes from bots)
15 |     if: github.actor != 'github-actions[bot]' && github.actor != 'dependabot[bot]'
16 |     runs-on: ubuntu-latest
17 |     permissions:
18 |       contents: read
19 |       actions: write
20 |     steps:
21 |       - name: Checkout repository
22 |         uses: actions/checkout@v4
23 |         with:
24 |           fetch-depth: 2 # Need previous commit for comparison
25 | 
26 |       - name: Get changed files
27 |         id: changed-files
28 |         run: |
29 |           echo "Changed files in this push:"
30 |           git diff --name-only HEAD^ HEAD | tee changed_files.txt
31 | 
32 |           # Store changed files for Claude to analyze (escaped for JSON)
33 |           CHANGED_FILES=$(git diff --name-only HEAD^ HEAD | jq -Rs .)
34 |           echo "changed_files=$CHANGED_FILES" >> $GITHUB_OUTPUT
35 | 
36 |           # Get the commit message (escaped for JSON)
37 |           COMMIT_MSG=$(git log -1 --pretty=%B | jq -Rs .)
38 |           echo "commit_message=$COMMIT_MSG" >> $GITHUB_OUTPUT
39 | 
40 |           # Get diff for documentation context (escaped for JSON)
41 |           COMMIT_DIFF=$(git diff HEAD^ HEAD --stat | jq -Rs .)
42 |           echo "commit_diff=$COMMIT_DIFF" >> $GITHUB_OUTPUT
43 | 
44 |           # Get commit SHA
45 |           echo "commit_sha=${{ github.sha }}" >> $GITHUB_OUTPUT
46 | 
47 |       - name: Trigger Claude workflow
48 |         env:
49 |           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50 |         run: |
51 |           # Trigger the Claude docs updater workflow with the change information
52 |           gh workflow run claude-docs-updater.yml \
53 |             --ref next \
54 |             -f commit_sha="${{ steps.changed-files.outputs.commit_sha }}" \
55 |             -f commit_message=${{ steps.changed-files.outputs.commit_message }} \
56 |             -f changed_files=${{ steps.changed-files.outputs.changed_files }} \
57 |             -f commit_diff=${{ steps.changed-files.outputs.commit_diff }}
```

--------------------------------------------------------------------------------
/src/constants/paths.js:
--------------------------------------------------------------------------------

```javascript
 1 | /**
 2 |  * Path constants for Task Master application
 3 |  */
 4 | 
 5 | // .taskmaster directory structure paths
 6 | export const TASKMASTER_DIR = '.taskmaster';
 7 | export const TASKMASTER_TASKS_DIR = '.taskmaster/tasks';
 8 | export const TASKMASTER_DOCS_DIR = '.taskmaster/docs';
 9 | export const TASKMASTER_REPORTS_DIR = '.taskmaster/reports';
10 | export const TASKMASTER_TEMPLATES_DIR = '.taskmaster/templates';
11 | 
12 | // Task Master configuration files
13 | export const TASKMASTER_CONFIG_FILE = '.taskmaster/config.json';
14 | export const TASKMASTER_STATE_FILE = '.taskmaster/state.json';
15 | export const LEGACY_CONFIG_FILE = '.taskmasterconfig';
16 | 
17 | // Task Master report files
18 | export const COMPLEXITY_REPORT_FILE =
19 | 	'.taskmaster/reports/task-complexity-report.json';
20 | export const LEGACY_COMPLEXITY_REPORT_FILE =
21 | 	'scripts/task-complexity-report.json';
22 | 
23 | // Task Master PRD file paths
24 | export const PRD_FILE = '.taskmaster/docs/prd.txt';
25 | export const LEGACY_PRD_FILE = 'scripts/prd.txt';
26 | 
27 | // Task Master template files
28 | export const EXAMPLE_PRD_FILE = '.taskmaster/templates/example_prd.txt';
29 | export const LEGACY_EXAMPLE_PRD_FILE = 'scripts/example_prd.txt';
30 | 
31 | // Task Master task file paths
32 | export const TASKMASTER_TASKS_FILE = '.taskmaster/tasks/tasks.json';
33 | export const LEGACY_TASKS_FILE = 'tasks/tasks.json';
34 | 
35 | // General project files (not Task Master specific but commonly used)
36 | export const ENV_EXAMPLE_FILE = '.env.example';
37 | export const GITIGNORE_FILE = '.gitignore';
38 | 
39 | // Task file naming pattern
40 | export const TASK_FILE_PREFIX = 'task_';
41 | export const TASK_FILE_EXTENSION = '.txt';
42 | 
43 | /**
44 |  * Project markers used to identify a task-master project root
45 |  * These files/directories indicate that a directory is a Task Master project
46 |  */
47 | export const PROJECT_MARKERS = [
48 | 	'.taskmaster', // New taskmaster directory
49 | 	LEGACY_CONFIG_FILE, // .taskmasterconfig
50 | 	'tasks.json', // Generic tasks file
51 | 	LEGACY_TASKS_FILE, // tasks/tasks.json (legacy location)
52 | 	TASKMASTER_TASKS_FILE, // .taskmaster/tasks/tasks.json (new location)
53 | 	'.git', // Git repository
54 | 	'.svn' // SVN repository
55 | ];
56 | 
```

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

```javascript
 1 | import { jest } from '@jest/globals';
 2 | import fs from 'fs';
 3 | import path from 'path';
 4 | import os from 'os';
 5 | 
 6 | // Mock external modules
 7 | jest.mock('child_process', () => ({
 8 | 	execSync: jest.fn()
 9 | }));
10 | 
11 | // Mock console methods
12 | jest.mock('console', () => ({
13 | 	log: jest.fn(),
14 | 	info: jest.fn(),
15 | 	warn: jest.fn(),
16 | 	error: jest.fn(),
17 | 	clear: jest.fn()
18 | }));
19 | 
20 | describe('Windsurf Integration', () => {
21 | 	let tempDir;
22 | 
23 | 	beforeEach(() => {
24 | 		jest.clearAllMocks();
25 | 
26 | 		// Create a temporary directory for testing
27 | 		tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'task-master-test-'));
28 | 
29 | 		// Spy on fs methods
30 | 		jest.spyOn(fs, 'writeFileSync').mockImplementation(() => {});
31 | 		jest.spyOn(fs, 'readFileSync').mockImplementation((filePath) => {
32 | 			if (filePath.toString().includes('mcp.json')) {
33 | 				return JSON.stringify({ mcpServers: {} }, null, 2);
34 | 			}
35 | 			return '{}';
36 | 		});
37 | 		jest.spyOn(fs, 'existsSync').mockImplementation(() => false);
38 | 		jest.spyOn(fs, 'mkdirSync').mockImplementation(() => {});
39 | 	});
40 | 
41 | 	afterEach(() => {
42 | 		// Clean up the temporary directory
43 | 		try {
44 | 			fs.rmSync(tempDir, { recursive: true, force: true });
45 | 		} catch (err) {
46 | 			console.error(`Error cleaning up: ${err.message}`);
47 | 		}
48 | 	});
49 | 
50 | 	// Test function that simulates the createProjectStructure behavior for Windsurf files
51 | 	function mockCreateWindsurfStructure() {
52 | 		// Create main .windsurf directory
53 | 		fs.mkdirSync(path.join(tempDir, '.windsurf'), { recursive: true });
54 | 
55 | 		// Create rules directory
56 | 		fs.mkdirSync(path.join(tempDir, '.windsurf', 'rules'), { recursive: true });
57 | 
58 | 		// Create MCP config file
59 | 		fs.writeFileSync(
60 | 			path.join(tempDir, '.windsurf', 'mcp.json'),
61 | 			JSON.stringify({ mcpServers: {} }, null, 2)
62 | 		);
63 | 	}
64 | 
65 | 	test('creates all required .windsurf directories', () => {
66 | 		// Act
67 | 		mockCreateWindsurfStructure();
68 | 
69 | 		// Assert
70 | 		expect(fs.mkdirSync).toHaveBeenCalledWith(path.join(tempDir, '.windsurf'), {
71 | 			recursive: true
72 | 		});
73 | 		expect(fs.mkdirSync).toHaveBeenCalledWith(
74 | 			path.join(tempDir, '.windsurf', 'rules'),
75 | 			{ recursive: true }
76 | 		);
77 | 	});
78 | });
79 | 
```

--------------------------------------------------------------------------------
/apps/docs/docs.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"$schema": "https://mintlify.com/docs.json",
 3 | 	"theme": "mint",
 4 | 	"name": "Task Master",
 5 | 	"colors": {
 6 | 		"primary": "#3366CC",
 7 | 		"light": "#6699FF",
 8 | 		"dark": "#24478F"
 9 | 	},
10 | 	"favicon": "/favicon.svg",
11 | 	"navigation": {
12 | 		"tabs": [
13 | 			{
14 | 				"tab": "Task Master Documentation",
15 | 				"groups": [
16 | 					{
17 | 						"group": "Welcome",
18 | 						"pages": ["introduction"]
19 | 					},
20 | 					{
21 | 						"group": "Getting Started",
22 | 						"pages": [
23 | 							{
24 | 								"group": "Quick Start",
25 | 								"pages": [
26 | 									"getting-started/quick-start/quick-start",
27 | 									"getting-started/quick-start/requirements",
28 | 									"getting-started/quick-start/installation",
29 | 									"getting-started/quick-start/configuration-quick",
30 | 									"getting-started/quick-start/prd-quick",
31 | 									"getting-started/quick-start/tasks-quick",
32 | 									"getting-started/quick-start/execute-quick"
33 | 								]
34 | 							},
35 | 							"getting-started/api-keys",
36 | 							"getting-started/faq",
37 | 							"getting-started/contribute"
38 | 						]
39 | 					},
40 | 					{
41 | 						"group": "Best Practices",
42 | 						"pages": [
43 | 							"best-practices/index",
44 | 							"best-practices/configuration-advanced",
45 | 							"best-practices/advanced-tasks"
46 | 						]
47 | 					},
48 | 					{
49 | 						"group": "Technical Capabilities",
50 | 						"pages": [
51 | 							"capabilities/mcp",
52 | 							"capabilities/cli-root-commands",
53 | 							"capabilities/task-structure"
54 | 						]
55 | 					},
56 | 					{
57 | 						"group": "TDD Workflow (Autopilot)",
58 | 						"pages": [
59 | 							"tdd-workflow/quickstart",
60 | 							"tdd-workflow/ai-agent-integration"
61 | 						]
62 | 					}
63 | 				]
64 | 			}
65 | 		],
66 | 		"global": {
67 | 			"anchors": [
68 | 				{
69 | 					"anchor": "Github",
70 | 					"href": "https://github.com/eyaltoledano/claude-task-master",
71 | 					"icon": "github"
72 | 				},
73 | 				{
74 | 					"anchor": "Discord",
75 | 					"href": "https://discord.gg/fWJkU7rf",
76 | 					"icon": "discord"
77 | 				}
78 | 			]
79 | 		}
80 | 	},
81 | 	"logo": {
82 | 		"light": "/logo/task-master-logo.png",
83 | 		"dark": "/logo/task-master-logo.png"
84 | 	},
85 | 	"footer": {
86 | 		"socials": {
87 | 			"x": "https://x.com/TaskmasterAI",
88 | 			"github": "https://github.com/eyaltoledano/claude-task-master"
89 | 		}
90 | 	}
91 | }
92 | 
```

--------------------------------------------------------------------------------
/scripts/modules/task-manager/response-language.js:
--------------------------------------------------------------------------------

```javascript
 1 | import {
 2 | 	getConfig,
 3 | 	isConfigFilePresent,
 4 | 	writeConfig
 5 | } from '../config-manager.js';
 6 | import { findConfigPath } from '../../../src/utils/path-utils.js';
 7 | import { log } from '../utils.js';
 8 | 
 9 | function setResponseLanguage(lang, options = {}) {
10 | 	const { mcpLog, projectRoot } = options;
11 | 
12 | 	const report = (level, ...args) => {
13 | 		if (mcpLog && typeof mcpLog[level] === 'function') {
14 | 			mcpLog[level](...args);
15 | 		}
16 | 	};
17 | 
18 | 	// Use centralized config path finding instead of hardcoded path
19 | 	const configPath = findConfigPath(null, { projectRoot });
20 | 	const configExists = isConfigFilePresent(projectRoot);
21 | 
22 | 	log(
23 | 		'debug',
24 | 		`Checking for config file using findConfigPath, found: ${configPath}`
25 | 	);
26 | 	log(
27 | 		'debug',
28 | 		`Checking config file using isConfigFilePresent(), exists: ${configExists}`
29 | 	);
30 | 
31 | 	if (!configExists) {
32 | 		return {
33 | 			success: false,
34 | 			error: {
35 | 				code: 'CONFIG_MISSING',
36 | 				message:
37 | 					'The configuration file is missing. Run "task-master init" to create it.'
38 | 			}
39 | 		};
40 | 	}
41 | 
42 | 	// Validate response language
43 | 	if (typeof lang !== 'string' || lang.trim() === '') {
44 | 		return {
45 | 			success: false,
46 | 			error: {
47 | 				code: 'INVALID_RESPONSE_LANGUAGE',
48 | 				message: `Invalid response language: ${lang}. Must be a non-empty string.`
49 | 			}
50 | 		};
51 | 	}
52 | 
53 | 	try {
54 | 		const currentConfig = getConfig(projectRoot);
55 | 		currentConfig.global.responseLanguage = lang;
56 | 		const writeResult = writeConfig(currentConfig, projectRoot);
57 | 
58 | 		if (!writeResult) {
59 | 			return {
60 | 				success: false,
61 | 				error: {
62 | 					code: 'WRITE_ERROR',
63 | 					message: 'Error writing updated configuration to configuration file'
64 | 				}
65 | 			};
66 | 		}
67 | 
68 | 		const successMessage = `Successfully set response language to: ${lang}`;
69 | 		report('info', successMessage);
70 | 		return {
71 | 			success: true,
72 | 			data: {
73 | 				responseLanguage: lang,
74 | 				message: successMessage
75 | 			}
76 | 		};
77 | 	} catch (error) {
78 | 		report('error', `Error setting response language: ${error.message}`);
79 | 		return {
80 | 			success: false,
81 | 			error: {
82 | 				code: 'SET_RESPONSE_LANGUAGE_ERROR',
83 | 				message: error.message
84 | 			}
85 | 		};
86 | 	}
87 | }
88 | 
89 | export default setResponseLanguage;
90 | 
```

--------------------------------------------------------------------------------
/tests/unit/ai-providers/zai-schema-introspection.test.js:
--------------------------------------------------------------------------------

```javascript
 1 | import { describe, it, expect } from '@jest/globals';
 2 | import { z } from 'zod';
 3 | import { ZAIProvider } from '../../../src/ai-providers/zai.js';
 4 | 
 5 | describe('ZAIProvider - Schema Introspection', () => {
 6 | 	const provider = new ZAIProvider();
 7 | 
 8 | 	it('should find array property in schema with single array', () => {
 9 | 		const schema = z.object({
10 | 			subtasks: z.array(z.string()),
11 | 			metadata: z.object({ count: z.number() }).nullable()
12 | 		});
13 | 
14 | 		const result = provider.findArrayPropertyInSchema(schema);
15 | 		expect(result).toBe('subtasks');
16 | 	});
17 | 
18 | 	it('should find first array property when multiple arrays exist', () => {
19 | 		const schema = z.object({
20 | 			tasks: z.array(z.string()),
21 | 			items: z.array(z.number())
22 | 		});
23 | 
24 | 		const result = provider.findArrayPropertyInSchema(schema);
25 | 		expect(result).toBe('tasks');
26 | 	});
27 | 
28 | 	it('should handle schema with no arrays', () => {
29 | 		const schema = z.object({
30 | 			name: z.string(),
31 | 			count: z.number()
32 | 		});
33 | 
34 | 		const result = provider.findArrayPropertyInSchema(schema);
35 | 		expect(result).toBeNull();
36 | 	});
37 | 
38 | 	it('should handle non-object schemas gracefully', () => {
39 | 		const schema = z.array(z.string());
40 | 
41 | 		const result = provider.findArrayPropertyInSchema(schema);
42 | 		expect(result).toBeNull();
43 | 	});
44 | 
45 | 	it('should find complexityAnalysis array property', () => {
46 | 		const schema = z.object({
47 | 			complexityAnalysis: z.array(
48 | 				z.object({
49 | 					taskId: z.number(),
50 | 					score: z.number()
51 | 				})
52 | 			),
53 | 			metadata: z
54 | 				.union([z.object({ total: z.number() }), z.null()])
55 | 				.default(null)
56 | 		});
57 | 
58 | 		const result = provider.findArrayPropertyInSchema(schema);
59 | 		expect(result).toBe('complexityAnalysis');
60 | 	});
61 | 
62 | 	it('should work with actual PRD response schema', () => {
63 | 		const schema = z.object({
64 | 			tasks: z.array(
65 | 				z.object({
66 | 					id: z.number(),
67 | 					title: z.string()
68 | 				})
69 | 			),
70 | 			metadata: z
71 | 				.union([
72 | 					z.object({
73 | 						projectName: z.string(),
74 | 						totalTasks: z.number()
75 | 					}),
76 | 					z.null()
77 | 				])
78 | 				.default(null)
79 | 		});
80 | 
81 | 		const result = provider.findArrayPropertyInSchema(schema);
82 | 		expect(result).toBe('tasks');
83 | 	});
84 | });
85 | 
```

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

```typescript
 1 | /**
 2 |  * Base executor class providing common functionality for all executors
 3 |  */
 4 | 
 5 | import { getLogger } from '../../../common/logger/index.js';
 6 | import type { Task } from '../../../common/types/index.js';
 7 | import type { ExecutionResult, ExecutorType, ITaskExecutor } from '../types.js';
 8 | 
 9 | export abstract class BaseExecutor implements ITaskExecutor {
10 | 	protected readonly logger = getLogger('BaseExecutor');
11 | 	protected readonly projectRoot: string;
12 | 	protected readonly config: Record<string, any>;
13 | 
14 | 	constructor(projectRoot: string, config: Record<string, any> = {}) {
15 | 		this.projectRoot = projectRoot;
16 | 		this.config = config;
17 | 	}
18 | 
19 | 	abstract execute(task: Task): Promise<ExecutionResult>;
20 | 	abstract getType(): ExecutorType;
21 | 	abstract isAvailable(): Promise<boolean>;
22 | 
23 | 	/**
24 | 	 * Format task details into a readable prompt
25 | 	 */
26 | 	protected formatTaskPrompt(task: Task): string {
27 | 		const sections: string[] = [];
28 | 
29 | 		sections.push(`Task ID: ${task.id}`);
30 | 		sections.push(`Title: ${task.title}`);
31 | 
32 | 		if (task.description) {
33 | 			sections.push(`\nDescription:\n${task.description}`);
34 | 		}
35 | 
36 | 		if (task.details) {
37 | 			sections.push(`\nImplementation Details:\n${task.details}`);
38 | 		}
39 | 
40 | 		if (task.testStrategy) {
41 | 			sections.push(`\nTest Strategy:\n${task.testStrategy}`);
42 | 		}
43 | 
44 | 		if (task.dependencies && task.dependencies.length > 0) {
45 | 			sections.push(`\nDependencies: ${task.dependencies.join(', ')}`);
46 | 		}
47 | 
48 | 		if (task.subtasks && task.subtasks.length > 0) {
49 | 			const subtaskList = task.subtasks
50 | 				.map((st) => `  - [${st.status}] ${st.id}: ${st.title}`)
51 | 				.join('\n');
52 | 			sections.push(`\nSubtasks:\n${subtaskList}`);
53 | 		}
54 | 
55 | 		sections.push(`\nStatus: ${task.status}`);
56 | 		sections.push(`Priority: ${task.priority}`);
57 | 
58 | 		return sections.join('\n');
59 | 	}
60 | 
61 | 	/**
62 | 	 * Create base execution result
63 | 	 */
64 | 	protected createResult(
65 | 		taskId: string,
66 | 		success: boolean,
67 | 		output?: string,
68 | 		error?: string
69 | 	): ExecutionResult {
70 | 		return {
71 | 			success,
72 | 			taskId,
73 | 			executorType: this.getType(),
74 | 			output,
75 | 			error,
76 | 			startTime: new Date().toISOString(),
77 | 			endTime: new Date().toISOString()
78 | 		};
79 | 	}
80 | }
81 | 
```

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

```markdown
 1 | Show detailed task information with rich context and insights.
 2 | 
 3 | Arguments: $ARGUMENTS
 4 | 
 5 | ## Enhanced Task Display
 6 | 
 7 | Parse arguments to determine what to show and how.
 8 | 
 9 | ### 1. **Smart Task Selection**
10 | 
11 | Based on $ARGUMENTS:
12 | - Number → Show specific task with full context
13 | - "current" → Show active in-progress task(s)
14 | - "next" → Show recommended next task
15 | - "blocked" → Show all blocked tasks with reasons
16 | - "critical" → Show critical path tasks
17 | - Multiple IDs → Comparative view
18 | 
19 | ### 2. **Contextual Information**
20 | 
21 | For each task, intelligently include:
22 | 
23 | **Core Details**
24 | - Full task information (id, title, description, details)
25 | - Current status with history
26 | - Test strategy and acceptance criteria
27 | - Priority and complexity analysis
28 | 
29 | **Relationships**
30 | - Dependencies (what it needs)
31 | - Dependents (what needs it)
32 | - Parent/subtask hierarchy
33 | - Related tasks (similar work)
34 | 
35 | **Time Intelligence**
36 | - Created/updated timestamps
37 | - Time in current status
38 | - Estimated vs actual time
39 | - Historical completion patterns
40 | 
41 | ### 3. **Visual Enhancements**
42 | 
43 | ```
44 | 📋 Task #45: Implement User Authentication
45 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
46 | Status: 🟡 in-progress (2 hours)
47 | Priority: 🔴 High | Complexity: 73/100
48 | 
49 | Dependencies: ✅ #41, ✅ #42, ⏳ #43 (blocked)
50 | Blocks: #46, #47, #52
51 | 
52 | Progress: ████████░░ 80% complete
53 | 
54 | Recent Activity:
55 | - 2h ago: Status changed to in-progress
56 | - 4h ago: Dependency #42 completed
57 | - Yesterday: Task expanded with 3 subtasks
58 | ```
59 | 
60 | ### 4. **Intelligent Insights**
61 | 
62 | Based on task analysis:
63 | - **Risk Assessment**: Complexity vs time remaining
64 | - **Bottleneck Analysis**: Is this blocking critical work?
65 | - **Recommendation**: Suggested approach or concerns
66 | - **Similar Tasks**: How others completed similar work
67 | 
68 | ### 5. **Action Suggestions**
69 | 
70 | Context-aware next steps:
71 | - If blocked → Show how to unblock
72 | - If complex → Suggest expansion
73 | - If in-progress → Show completion checklist
74 | - If done → Show dependent tasks ready to start
75 | 
76 | ### 6. **Multi-Task View**
77 | 
78 | When showing multiple tasks:
79 | - Common dependencies
80 | - Optimal completion order
81 | - Parallel work opportunities
82 | - Combined complexity analysis
```

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

```javascript
 1 | /**
 2 |  * Tests for ZAIProvider
 3 |  */
 4 | 
 5 | import { ZAIProvider } from '../../../src/ai-providers/zai.js';
 6 | 
 7 | describe('ZAIProvider', () => {
 8 | 	let provider;
 9 | 
10 | 	beforeEach(() => {
11 | 		provider = new ZAIProvider();
12 | 	});
13 | 
14 | 	describe('constructor', () => {
15 | 		it('should initialize with correct name', () => {
16 | 			expect(provider.name).toBe('Z.ai');
17 | 		});
18 | 
19 | 		it('should initialize with correct default baseURL', () => {
20 | 			expect(provider.defaultBaseURL).toBe('https://api.z.ai/api/paas/v4/');
21 | 		});
22 | 
23 | 		it('should inherit from OpenAICompatibleProvider', () => {
24 | 			expect(provider).toHaveProperty('generateText');
25 | 			expect(provider).toHaveProperty('streamText');
26 | 			expect(provider).toHaveProperty('generateObject');
27 | 		});
28 | 	});
29 | 
30 | 	describe('getRequiredApiKeyName', () => {
31 | 		it('should return correct environment variable name', () => {
32 | 			expect(provider.getRequiredApiKeyName()).toBe('ZAI_API_KEY');
33 | 		});
34 | 	});
35 | 
36 | 	describe('isRequiredApiKey', () => {
37 | 		it('should return true as API key is required', () => {
38 | 			expect(provider.isRequiredApiKey()).toBe(true);
39 | 		});
40 | 	});
41 | 
42 | 	describe('getClient', () => {
43 | 		it('should create client with API key', () => {
44 | 			const params = { apiKey: 'test-key' };
45 | 			const client = provider.getClient(params);
46 | 			expect(client).toBeDefined();
47 | 		});
48 | 
49 | 		it('should create client with custom baseURL', () => {
50 | 			const params = {
51 | 				apiKey: 'test-key',
52 | 				baseURL: 'https://custom.api.com/v1'
53 | 			};
54 | 			const client = provider.getClient(params);
55 | 			expect(client).toBeDefined();
56 | 		});
57 | 
58 | 		it('should create client even without API key (validation deferred to SDK)', () => {
59 | 			// getClient() no longer validates API key - validation is deferred to SDK initialization
60 | 			const client = provider.getClient({});
61 | 			expect(typeof client).toBe('function');
62 | 		});
63 | 	});
64 | 
65 | 	describe('validateAuth', () => {
66 | 		it('should validate API key is present', () => {
67 | 			expect(() => {
68 | 				provider.validateAuth({});
69 | 			}).toThrow('Z.ai API key is required');
70 | 		});
71 | 
72 | 		it('should pass with valid API key', () => {
73 | 			expect(() => {
74 | 				provider.validateAuth({ apiKey: 'test-key' });
75 | 			}).not.toThrow();
76 | 		});
77 | 	});
78 | });
79 | 
```

--------------------------------------------------------------------------------
/packages/claude-code-plugin/commands/sync-readme.md:
--------------------------------------------------------------------------------

```markdown
  1 | Export tasks to README.md with professional formatting.
  2 | 
  3 | Arguments: $ARGUMENTS
  4 | 
  5 | Generate a well-formatted README with current task information.
  6 | 
  7 | ## README Synchronization
  8 | 
  9 | Creates or updates README.md with beautifully formatted task information.
 10 | 
 11 | ## Argument Parsing
 12 | 
 13 | Optional filters:
 14 | - "pending" → Only pending tasks
 15 | - "with-subtasks" → Include subtask details
 16 | - "by-priority" → Group by priority
 17 | - "sprint" → Current sprint only
 18 | 
 19 | ## Execution
 20 | 
 21 | ```bash
 22 | task-master sync-readme [--with-subtasks] [--status=<status>]
 23 | ```
 24 | 
 25 | ## README Generation
 26 | 
 27 | ### 1. **Project Header**
 28 | ```markdown
 29 | # Project Name
 30 | 
 31 | ## 📋 Task Progress
 32 | 
 33 | Last Updated: 2024-01-15 10:30 AM
 34 | 
 35 | ### Summary
 36 | - Total Tasks: 45
 37 | - Completed: 15 (33%)
 38 | - In Progress: 5 (11%)
 39 | - Pending: 25 (56%)
 40 | ```
 41 | 
 42 | ### 2. **Task Sections**
 43 | Organized by status or priority:
 44 | - Progress indicators
 45 | - Task descriptions
 46 | - Dependencies noted
 47 | - Time estimates
 48 | 
 49 | ### 3. **Visual Elements**
 50 | - Progress bars
 51 | - Status badges
 52 | - Priority indicators
 53 | - Completion checkmarks
 54 | 
 55 | ## Smart Features
 56 | 
 57 | 1. **Intelligent Grouping**
 58 |    - By feature area
 59 |    - By sprint/milestone
 60 |    - By assigned developer
 61 |    - By priority
 62 | 
 63 | 2. **Progress Tracking**
 64 |    - Overall completion
 65 |    - Sprint velocity
 66 |    - Burndown indication
 67 |    - Time tracking
 68 | 
 69 | 3. **Formatting Options**
 70 |    - GitHub-flavored markdown
 71 |    - Task checkboxes
 72 |    - Collapsible sections
 73 |    - Table format available
 74 | 
 75 | ## Example Output
 76 | 
 77 | ```markdown
 78 | ## 🚀 Current Sprint
 79 | 
 80 | ### In Progress
 81 | - [ ] 🔄 #5 **Implement user authentication** (60% complete)
 82 |   - Dependencies: API design (#3 ✅)
 83 |   - Subtasks: 4 (2 completed)
 84 |   - Est: 8h / Spent: 5h
 85 | 
 86 | ### Pending (High Priority)
 87 | - [ ] ⚡ #8 **Create dashboard UI**
 88 |   - Blocked by: #5
 89 |   - Complexity: High
 90 |   - Est: 12h
 91 | ```
 92 | 
 93 | ## Customization
 94 | 
 95 | Based on arguments:
 96 | - Include/exclude sections
 97 | - Detail level control
 98 | - Custom grouping
 99 | - Filter by criteria
100 | 
101 | ## Post-Sync
102 | 
103 | After generation:
104 | 1. Show diff preview
105 | 2. Backup existing README
106 | 3. Write new content
107 | 4. Commit reminder
108 | 5. Update timestamp
109 | 
110 | ## Integration
111 | 
112 | Works well with:
113 | - Git workflows
114 | - CI/CD pipelines
115 | - Project documentation
116 | - Team updates
117 | - Client reports
```
Page 5/69FirstPrevNextLast