This is page 4 of 52. 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 │ ├── agents │ │ ├── task-checker.md │ │ ├── task-executor.md │ │ └── task-orchestrator.md │ ├── commands │ │ ├── dedupe.md │ │ └── tm │ │ ├── add-dependency │ │ │ └── add-dependency.md │ │ ├── add-subtask │ │ │ ├── add-subtask.md │ │ │ └── convert-task-to-subtask.md │ │ ├── add-task │ │ │ └── add-task.md │ │ ├── analyze-complexity │ │ │ └── analyze-complexity.md │ │ ├── complexity-report │ │ │ └── complexity-report.md │ │ ├── expand │ │ │ ├── expand-all-tasks.md │ │ │ └── expand-task.md │ │ ├── fix-dependencies │ │ │ └── fix-dependencies.md │ │ ├── generate │ │ │ └── generate-tasks.md │ │ ├── help.md │ │ ├── init │ │ │ ├── init-project-quick.md │ │ │ └── init-project.md │ │ ├── learn.md │ │ ├── list │ │ │ ├── list-tasks-by-status.md │ │ │ ├── list-tasks-with-subtasks.md │ │ │ └── list-tasks.md │ │ ├── models │ │ │ ├── setup-models.md │ │ │ └── view-models.md │ │ ├── next │ │ │ └── next-task.md │ │ ├── parse-prd │ │ │ ├── parse-prd-with-research.md │ │ │ └── parse-prd.md │ │ ├── remove-dependency │ │ │ └── remove-dependency.md │ │ ├── remove-subtask │ │ │ └── remove-subtask.md │ │ ├── remove-subtasks │ │ │ ├── remove-all-subtasks.md │ │ │ └── remove-subtasks.md │ │ ├── remove-task │ │ │ └── remove-task.md │ │ ├── set-status │ │ │ ├── to-cancelled.md │ │ │ ├── to-deferred.md │ │ │ ├── to-done.md │ │ │ ├── to-in-progress.md │ │ │ ├── to-pending.md │ │ │ └── to-review.md │ │ ├── setup │ │ │ ├── install-taskmaster.md │ │ │ └── quick-install-taskmaster.md │ │ ├── show │ │ │ └── show-task.md │ │ ├── status │ │ │ └── project-status.md │ │ ├── sync-readme │ │ │ └── sync-readme.md │ │ ├── tm-main.md │ │ ├── update │ │ │ ├── update-single-task.md │ │ │ ├── update-task.md │ │ │ └── update-tasks-from-id.md │ │ ├── utils │ │ │ └── analyze-project.md │ │ ├── validate-dependencies │ │ │ └── validate-dependencies.md │ │ └── workflows │ │ ├── auto-implement-tasks.md │ │ ├── command-pipeline.md │ │ └── smart-workflow.md │ └── TM_COMMANDS_GUIDE.md ├── .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 │ └── 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 │ │ ├── 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 │ │ ├── test-prd.txt │ │ └── tm-core-phase-1.txt │ ├── reports │ │ ├── task-complexity-report_cc-kiro-hooks.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.txt ├── .vscode │ ├── extensions.json │ └── settings.json ├── apps │ ├── cli │ │ ├── CHANGELOG.md │ │ ├── package.json │ │ ├── src │ │ │ ├── commands │ │ │ │ ├── auth.command.ts │ │ │ │ ├── context.command.ts │ │ │ │ ├── list.command.ts │ │ │ │ ├── set-status.command.ts │ │ │ │ ├── show.command.ts │ │ │ │ └── start.command.ts │ │ │ ├── index.ts │ │ │ ├── ui │ │ │ │ ├── components │ │ │ │ │ ├── dashboard.component.ts │ │ │ │ │ ├── header.component.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── next-task.component.ts │ │ │ │ │ ├── suggested-steps.component.ts │ │ │ │ │ └── task-detail.component.ts │ │ │ │ └── index.ts │ │ │ └── utils │ │ │ ├── auto-update.ts │ │ │ └── ui.ts │ │ └── tsconfig.json │ ├── 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 │ │ │ └── task-structure.mdx │ │ ├── CHANGELOG.md │ │ ├── docs.json │ │ ├── favicon.svg │ │ ├── getting-started │ │ │ ├── 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 │ │ ├── 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 ├── assets │ ├── .windsurfrules │ ├── AGENTS.md │ ├── claude │ │ ├── agents │ │ │ ├── task-checker.md │ │ │ ├── task-executor.md │ │ │ └── task-orchestrator.md │ │ ├── commands │ │ │ └── tm │ │ │ ├── add-dependency │ │ │ │ └── add-dependency.md │ │ │ ├── add-subtask │ │ │ │ ├── add-subtask.md │ │ │ │ └── convert-task-to-subtask.md │ │ │ ├── add-task │ │ │ │ └── add-task.md │ │ │ ├── analyze-complexity │ │ │ │ └── analyze-complexity.md │ │ │ ├── clear-subtasks │ │ │ │ ├── clear-all-subtasks.md │ │ │ │ └── clear-subtasks.md │ │ │ ├── complexity-report │ │ │ │ └── complexity-report.md │ │ │ ├── expand │ │ │ │ ├── expand-all-tasks.md │ │ │ │ └── expand-task.md │ │ │ ├── fix-dependencies │ │ │ │ └── fix-dependencies.md │ │ │ ├── generate │ │ │ │ └── generate-tasks.md │ │ │ ├── help.md │ │ │ ├── init │ │ │ │ ├── init-project-quick.md │ │ │ │ └── init-project.md │ │ │ ├── learn.md │ │ │ ├── list │ │ │ │ ├── list-tasks-by-status.md │ │ │ │ ├── list-tasks-with-subtasks.md │ │ │ │ └── list-tasks.md │ │ │ ├── models │ │ │ │ ├── setup-models.md │ │ │ │ └── view-models.md │ │ │ ├── next │ │ │ │ └── next-task.md │ │ │ ├── parse-prd │ │ │ │ ├── parse-prd-with-research.md │ │ │ │ └── parse-prd.md │ │ │ ├── remove-dependency │ │ │ │ └── remove-dependency.md │ │ │ ├── remove-subtask │ │ │ │ └── remove-subtask.md │ │ │ ├── remove-subtasks │ │ │ │ ├── remove-all-subtasks.md │ │ │ │ └── remove-subtasks.md │ │ │ ├── remove-task │ │ │ │ └── remove-task.md │ │ │ ├── set-status │ │ │ │ ├── to-cancelled.md │ │ │ │ ├── to-deferred.md │ │ │ │ ├── to-done.md │ │ │ │ ├── to-in-progress.md │ │ │ │ ├── to-pending.md │ │ │ │ └── to-review.md │ │ │ ├── setup │ │ │ │ ├── install-taskmaster.md │ │ │ │ └── quick-install-taskmaster.md │ │ │ ├── show │ │ │ │ └── show-task.md │ │ │ ├── status │ │ │ │ └── project-status.md │ │ │ ├── sync-readme │ │ │ │ └── sync-readme.md │ │ │ ├── tm-main.md │ │ │ ├── update │ │ │ │ ├── update-single-task.md │ │ │ │ ├── update-task.md │ │ │ │ └── update-tasks-from-id.md │ │ │ ├── utils │ │ │ │ └── analyze-project.md │ │ │ ├── validate-dependencies │ │ │ │ └── validate-dependencies.md │ │ │ └── workflows │ │ │ ├── auto-implement-tasks.md │ │ │ ├── command-pipeline.md │ │ │ └── smart-workflow.md │ │ └── TM_COMMANDS_GUIDE.md │ ├── config.json │ ├── env.example │ ├── example_prd.txt │ ├── 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.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 │ ├── CLI-COMMANDER-PATTERN.md │ ├── command-reference.md │ ├── configuration.md │ ├── contributor-docs │ │ └── testing-roo-integration.md │ ├── cross-tag-task-movement.md │ ├── examples │ │ └── claude-code-usage.md │ ├── examples.md │ ├── licensing.md │ ├── mcp-provider-guide.md │ ├── mcp-provider.md │ ├── migration-guide.md │ ├── models.md │ ├── providers │ │ └── gemini-cli.md │ ├── README.md │ ├── scripts │ │ └── models-json-to-markdown.js │ ├── task-structure.md │ └── tutorial.md ├── images │ └── 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 │ │ │ ├── list-tasks.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 │ │ │ ├── show-task.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 │ ├── get-task.js │ ├── get-tasks.js │ ├── index.js │ ├── initialize-project.js │ ├── list-tags.js │ ├── models.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.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 │ ├── build-config │ │ ├── CHANGELOG.md │ │ ├── package.json │ │ ├── src │ │ │ └── tsdown.base.ts │ │ └── tsconfig.json │ └── tm-core │ ├── .gitignore │ ├── CHANGELOG.md │ ├── docs │ │ └── listTasks-architecture.md │ ├── package.json │ ├── POC-STATUS.md │ ├── README.md │ ├── src │ │ ├── auth │ │ │ ├── auth-manager.test.ts │ │ │ ├── auth-manager.ts │ │ │ ├── config.ts │ │ │ ├── credential-store.test.ts │ │ │ ├── credential-store.ts │ │ │ ├── index.ts │ │ │ ├── oauth-service.ts │ │ │ ├── supabase-session-storage.ts │ │ │ └── types.ts │ │ ├── clients │ │ │ ├── index.ts │ │ │ └── supabase-client.ts │ │ ├── config │ │ │ ├── config-manager.spec.ts │ │ │ ├── config-manager.ts │ │ │ ├── index.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 │ │ ├── constants │ │ │ └── index.ts │ │ ├── entities │ │ │ └── task.entity.ts │ │ ├── errors │ │ │ ├── index.ts │ │ │ └── task-master-error.ts │ │ ├── executors │ │ │ ├── base-executor.ts │ │ │ ├── claude-executor.ts │ │ │ ├── executor-factory.ts │ │ │ ├── executor-service.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── index.ts │ │ ├── interfaces │ │ │ ├── ai-provider.interface.ts │ │ │ ├── configuration.interface.ts │ │ │ ├── index.ts │ │ │ └── storage.interface.ts │ │ ├── logger │ │ │ ├── factory.ts │ │ │ ├── index.ts │ │ │ └── logger.ts │ │ ├── mappers │ │ │ └── TaskMapper.ts │ │ ├── parser │ │ │ └── index.ts │ │ ├── providers │ │ │ ├── ai │ │ │ │ ├── base-provider.ts │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── repositories │ │ │ ├── supabase-task-repository.ts │ │ │ └── task-repository.interface.ts │ │ ├── services │ │ │ ├── index.ts │ │ │ ├── organization.service.ts │ │ │ ├── task-execution-service.ts │ │ │ └── task-service.ts │ │ ├── storage │ │ │ ├── api-storage.ts │ │ │ ├── file-storage │ │ │ │ ├── file-operations.ts │ │ │ │ ├── file-storage.ts │ │ │ │ ├── format-handler.ts │ │ │ │ ├── index.ts │ │ │ │ └── path-resolver.ts │ │ │ ├── index.ts │ │ │ └── storage-factory.ts │ │ ├── subpath-exports.test.ts │ │ ├── task-master-core.ts │ │ ├── types │ │ │ ├── database.types.ts │ │ │ ├── index.ts │ │ │ └── legacy.ts │ │ └── utils │ │ ├── id-generator.ts │ │ └── index.ts │ ├── tests │ │ ├── integration │ │ │ └── list-tasks.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 │ ├── dev.js │ ├── init.js │ ├── modules │ │ ├── ai-services-unified.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 ├── src │ ├── ai-providers │ │ ├── anthropic.js │ │ ├── azure.js │ │ ├── base-provider.js │ │ ├── bedrock.js │ │ ├── claude-code.js │ │ ├── custom-sdk │ │ │ ├── claude-code │ │ │ │ ├── errors.js │ │ │ │ ├── index.js │ │ │ │ ├── json-extractor.js │ │ │ │ ├── language-model.js │ │ │ │ ├── message-converter.js │ │ │ │ └── types.js │ │ │ └── grok-cli │ │ │ ├── errors.js │ │ │ ├── index.js │ │ │ ├── json-extractor.js │ │ │ ├── language-model.js │ │ │ ├── message-converter.js │ │ │ └── types.js │ │ ├── gemini-cli.js │ │ ├── google-vertex.js │ │ ├── google.js │ │ ├── grok-cli.js │ │ ├── groq.js │ │ ├── index.js │ │ ├── ollama.js │ │ ├── openai.js │ │ ├── openrouter.js │ │ ├── perplexity.js │ │ └── xai.js │ ├── constants │ │ ├── commands.js │ │ ├── paths.js │ │ ├── profiles.js │ │ ├── providers.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 │ ├── 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 │ ├── fixture │ │ └── test-tasks.json │ ├── fixtures │ │ ├── .taskmasterconfig │ │ ├── sample-claude-response.js │ │ ├── sample-prd.txt │ │ └── sample-tasks.js │ ├── integration │ │ ├── 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 │ ├── 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 │ │ ├── claude-code.test.js │ │ ├── custom-sdk │ │ │ └── claude-code │ │ │ └── language-model.test.js │ │ ├── gemini-cli.test.js │ │ ├── mcp-components.test.js │ │ └── openai.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 │ ├── 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 │ ├── providers │ │ └── provider-registry.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 │ │ │ ├── move-task-cross-tag.test.js │ │ │ ├── move-task.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 ``` # Files -------------------------------------------------------------------------------- /packages/tm-core/src/index.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * @fileoverview Main entry point for the tm-core package 3 | * This file exports all public APIs from the core Task Master library 4 | */ 5 | 6 | // Export main facade 7 | export { 8 | TaskMasterCore, 9 | createTaskMasterCore, 10 | type TaskMasterCoreOptions, 11 | type ListTasksResult, 12 | type StartTaskOptions, 13 | type StartTaskResult, 14 | type ConflictCheckResult 15 | } from './task-master-core.js'; 16 | 17 | // Re-export types 18 | export type * from './types/index.js'; 19 | 20 | // Re-export interfaces (types only to avoid conflicts) 21 | export type * from './interfaces/index.js'; 22 | 23 | // Re-export constants 24 | export * from './constants/index.js'; 25 | 26 | // Re-export providers 27 | export * from './providers/index.js'; 28 | 29 | // Re-export storage (selectively to avoid conflicts) 30 | export { 31 | FileStorage, 32 | ApiStorage, 33 | StorageFactory, 34 | type ApiStorageConfig 35 | } from './storage/index.js'; 36 | export { PlaceholderStorage, type StorageAdapter } from './storage/index.js'; 37 | 38 | // Re-export parser 39 | export * from './parser/index.js'; 40 | 41 | // Re-export utilities 42 | export * from './utils/index.js'; 43 | 44 | // Re-export errors 45 | export * from './errors/index.js'; 46 | 47 | // Re-export entities 48 | export { TaskEntity } from './entities/task.entity.js'; 49 | 50 | // Re-export authentication 51 | export { 52 | AuthManager, 53 | AuthenticationError, 54 | type AuthCredentials, 55 | type OAuthFlowOptions, 56 | type AuthConfig 57 | } from './auth/index.js'; 58 | 59 | // Re-export logger 60 | export { getLogger, createLogger, setGlobalLogger } from './logger/index.js'; 61 | 62 | // Re-export executors 63 | export * from './executors/index.js'; 64 | ``` -------------------------------------------------------------------------------- /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 | coverageThreshold: { 47 | global: { 48 | branches: 80, 49 | functions: 80, 50 | lines: 80, 51 | statements: 80 52 | } 53 | }, 54 | 55 | // Generate coverage report in these formats 56 | coverageReporters: ['text', 'lcov'], 57 | 58 | // Verbose output 59 | verbose: true, 60 | 61 | // Setup file 62 | setupFilesAfterEnv: ['<rootDir>/tests/setup.js'] 63 | }; 64 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/validate-dependencies/validate-dependencies.md: -------------------------------------------------------------------------------- ```markdown 1 | Validate all task dependencies for issues. 2 | 3 | ## Dependency Validation 4 | 5 | Comprehensive check for dependency problems across the entire project. 6 | 7 | ## Execution 8 | 9 | ```bash 10 | task-master validate-dependencies 11 | ``` 12 | 13 | ## Validation Checks 14 | 15 | 1. **Circular Dependencies** 16 | - A depends on B, B depends on A 17 | - Complex circular chains 18 | - Self-dependencies 19 | 20 | 2. **Missing Dependencies** 21 | - References to non-existent tasks 22 | - Deleted task references 23 | - Invalid task IDs 24 | 25 | 3. **Logical Issues** 26 | - Completed tasks depending on pending 27 | - Cancelled tasks in dependency chains 28 | - Impossible sequences 29 | 30 | 4. **Complexity Warnings** 31 | - Over-complex dependency chains 32 | - Too many dependencies per task 33 | - Bottleneck tasks 34 | 35 | ## Smart Analysis 36 | 37 | The validation provides: 38 | - Visual dependency graph 39 | - Critical path analysis 40 | - Bottleneck identification 41 | - Suggested optimizations 42 | 43 | ## Report Format 44 | 45 | ``` 46 | Dependency Validation Report 47 | ━━━━━━━━━━━━━━━━━━━━━━━━━━ 48 | ✅ No circular dependencies found 49 | ⚠️ 2 warnings found: 50 | - Task #23 has 7 dependencies (consider breaking down) 51 | - Task #45 blocks 5 other tasks (potential bottleneck) 52 | ❌ 1 error found: 53 | - Task #67 depends on deleted task #66 54 | 55 | Critical Path: #1 → #5 → #23 → #45 → #50 (15 days) 56 | ``` 57 | 58 | ## Actionable Output 59 | 60 | For each issue found: 61 | - Clear description 62 | - Impact assessment 63 | - Suggested fix 64 | - Command to resolve 65 | 66 | ## Next Steps 67 | 68 | After validation: 69 | - Run `/project:tm/fix-dependencies` to auto-fix 70 | - Manually adjust problematic dependencies 71 | - Rerun to verify fixes ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/validate-dependencies/validate-dependencies.md: -------------------------------------------------------------------------------- ```markdown 1 | Validate all task dependencies for issues. 2 | 3 | ## Dependency Validation 4 | 5 | Comprehensive check for dependency problems across the entire project. 6 | 7 | ## Execution 8 | 9 | ```bash 10 | task-master validate-dependencies 11 | ``` 12 | 13 | ## Validation Checks 14 | 15 | 1. **Circular Dependencies** 16 | - A depends on B, B depends on A 17 | - Complex circular chains 18 | - Self-dependencies 19 | 20 | 2. **Missing Dependencies** 21 | - References to non-existent tasks 22 | - Deleted task references 23 | - Invalid task IDs 24 | 25 | 3. **Logical Issues** 26 | - Completed tasks depending on pending 27 | - Cancelled tasks in dependency chains 28 | - Impossible sequences 29 | 30 | 4. **Complexity Warnings** 31 | - Over-complex dependency chains 32 | - Too many dependencies per task 33 | - Bottleneck tasks 34 | 35 | ## Smart Analysis 36 | 37 | The validation provides: 38 | - Visual dependency graph 39 | - Critical path analysis 40 | - Bottleneck identification 41 | - Suggested optimizations 42 | 43 | ## Report Format 44 | 45 | ``` 46 | Dependency Validation Report 47 | ━━━━━━━━━━━━━━━━━━━━━━━━━━ 48 | ✅ No circular dependencies found 49 | ⚠️ 2 warnings found: 50 | - Task #23 has 7 dependencies (consider breaking down) 51 | - Task #45 blocks 5 other tasks (potential bottleneck) 52 | ❌ 1 error found: 53 | - Task #67 depends on deleted task #66 54 | 55 | Critical Path: #1 → #5 → #23 → #45 → #50 (15 days) 56 | ``` 57 | 58 | ## Actionable Output 59 | 60 | For each issue found: 61 | - Clear description 62 | - Impact assessment 63 | - Suggested fix 64 | - Command to resolve 65 | 66 | ## Next Steps 67 | 68 | After validation: 69 | - Run `/project:tm/fix-dependencies` to auto-fix 70 | - Manually adjust problematic dependencies 71 | - Rerun to verify fixes ``` -------------------------------------------------------------------------------- /packages/tm-core/package.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "name": "@tm/core", 3 | "private": true, 4 | "description": "Core library for Task Master - TypeScript task management system", 5 | "type": "module", 6 | "types": "./src/index.ts", 7 | "main": "./dist/index.js", 8 | "exports": { 9 | ".": "./src/index.ts", 10 | "./auth": "./src/auth/index.ts", 11 | "./storage": "./src/storage/index.ts", 12 | "./config": "./src/config/index.ts", 13 | "./providers": "./src/providers/index.ts", 14 | "./services": "./src/services/index.ts", 15 | "./errors": "./src/errors/index.ts", 16 | "./logger": "./src/logger/index.ts", 17 | "./types": "./src/types/index.ts", 18 | "./interfaces": "./src/interfaces/index.ts", 19 | "./utils": "./src/utils/index.ts" 20 | }, 21 | "scripts": { 22 | "test": "vitest run", 23 | "test:watch": "vitest", 24 | "test:coverage": "vitest run --coverage", 25 | "lint": "biome check --write", 26 | "lint:check": "biome check", 27 | "lint:fix": "biome check --fix --unsafe", 28 | "format": "biome format --write", 29 | "format:check": "biome format", 30 | "typecheck": "tsc --noEmit" 31 | }, 32 | "dependencies": { 33 | "@supabase/supabase-js": "^2.57.4", 34 | "zod": "^3.23.8" 35 | }, 36 | "devDependencies": { 37 | "@biomejs/biome": "^1.9.4", 38 | "@tm/build-config": "*", 39 | "@types/node": "^22.10.5", 40 | "@vitest/coverage-v8": "^2.0.5", 41 | "dotenv-mono": "^1.5.1", 42 | "ts-node": "^10.9.2", 43 | "tsup": "^8.5.0", 44 | "typescript": "^5.7.3", 45 | "vitest": "^2.1.8" 46 | }, 47 | "engines": { 48 | "node": ">=18.0.0" 49 | }, 50 | "files": ["src", "README.md", "CHANGELOG.md"], 51 | "keywords": ["task-management", "typescript", "ai", "prd", "parser"], 52 | "author": "Task Master AI", 53 | "license": "MIT" 54 | } 55 | ``` -------------------------------------------------------------------------------- /tests/unit/task-manager/move-task.test.js: -------------------------------------------------------------------------------- ```javascript 1 | import fs from 'fs'; 2 | import path from 'path'; 3 | import moveTask from '../../../scripts/modules/task-manager/move-task.js'; 4 | 5 | const TMP = path.join(process.cwd(), '.tmp_move_task'); 6 | const TASKS = path.join(TMP, 'tasks.json'); 7 | 8 | function seed(initialTasks) { 9 | fs.rmSync(TMP, { recursive: true, force: true }); 10 | fs.mkdirSync(path.join(TMP, '.taskmaster'), { recursive: true }); 11 | fs.writeFileSync( 12 | TASKS, 13 | JSON.stringify( 14 | { 15 | master: { 16 | tasks: initialTasks, 17 | metadata: { created: new Date().toISOString() } 18 | } 19 | }, 20 | null, 21 | 2 22 | ) 23 | ); 24 | } 25 | 26 | describe('moveTask basic scenarios', () => { 27 | afterAll(() => fs.rmSync(TMP, { recursive: true, force: true })); 28 | 29 | it('moves a task to a new ID within same tag', async () => { 30 | seed([ 31 | { id: 1, title: 'A' }, 32 | { id: 2, title: 'B' } 33 | ]); 34 | 35 | await moveTask(TASKS, '1', '3', false, { projectRoot: TMP, tag: 'master' }); 36 | 37 | const data = JSON.parse(fs.readFileSync(TASKS, 'utf8')); 38 | const ids = data.master.tasks.map((t) => t.id); 39 | expect(ids).toEqual(expect.arrayContaining([2, 3])); 40 | expect(ids).not.toContain(1); 41 | }); 42 | 43 | it('refuses to move across tags', async () => { 44 | // build dual-tag structure 45 | seed([{ id: 1, title: 'task' }]); 46 | const raw = JSON.parse(fs.readFileSync(TASKS, 'utf8')); 47 | raw.other = { tasks: [], metadata: { created: new Date().toISOString() } }; 48 | fs.writeFileSync(TASKS, JSON.stringify(raw, null, 2)); 49 | 50 | await expect( 51 | moveTask(TASKS, '1', '2', false, { projectRoot: TMP, tag: 'other' }) 52 | ).rejects.toThrow(/Source task/); 53 | }); 54 | }); 55 | ``` -------------------------------------------------------------------------------- /.taskmaster/templates/example_prd.txt: -------------------------------------------------------------------------------- ``` 1 | <context> 2 | # Overview 3 | [Provide a high-level overview of your product here. Explain what problem it solves, who it's for, and why it's valuable.] 4 | 5 | # Core Features 6 | [List and describe the main features of your product. For each feature, include: 7 | - What it does 8 | - Why it's important 9 | - How it works at a high level] 10 | 11 | # User Experience 12 | [Describe the user journey and experience. Include: 13 | - User personas 14 | - Key user flows 15 | - UI/UX considerations] 16 | </context> 17 | <PRD> 18 | # Technical Architecture 19 | [Outline the technical implementation details: 20 | - System components 21 | - Data models 22 | - APIs and integrations 23 | - Infrastructure requirements] 24 | 25 | # Development Roadmap 26 | [Break down the development process into phases: 27 | - MVP requirements 28 | - Future enhancements 29 | - Do not think about timelines whatsoever -- all that matters is scope and detailing exactly what needs to be build in each phase so it can later be cut up into tasks] 30 | 31 | # Logical Dependency Chain 32 | [Define the logical order of development: 33 | - Which features need to be built first (foundation) 34 | - Getting as quickly as possible to something usable/visible front end that works 35 | - Properly pacing and scoping each feature so it is atomic but can also be built upon and improved as development approaches] 36 | 37 | # Risks and Mitigations 38 | [Identify potential risks and how they'll be addressed: 39 | - Technical challenges 40 | - Figuring out the MVP that we can build upon 41 | - Resource constraints] 42 | 43 | # Appendix 44 | [Include any additional information: 45 | - Research findings 46 | - Technical specifications] 47 | </PRD> ``` -------------------------------------------------------------------------------- /assets/example_prd.txt: -------------------------------------------------------------------------------- ``` 1 | <context> 2 | # Overview 3 | [Provide a high-level overview of your product here. Explain what problem it solves, who it's for, and why it's valuable.] 4 | 5 | # Core Features 6 | [List and describe the main features of your product. For each feature, include: 7 | - What it does 8 | - Why it's important 9 | - How it works at a high level] 10 | 11 | # User Experience 12 | [Describe the user journey and experience. Include: 13 | - User personas 14 | - Key user flows 15 | - UI/UX considerations] 16 | </context> 17 | <PRD> 18 | # Technical Architecture 19 | [Outline the technical implementation details: 20 | - System components 21 | - Data models 22 | - APIs and integrations 23 | - Infrastructure requirements] 24 | 25 | # Development Roadmap 26 | [Break down the development process into phases: 27 | - MVP requirements 28 | - Future enhancements 29 | - Do not think about timelines whatsoever -- all that matters is scope and detailing exactly what needs to be build in each phase so it can later be cut up into tasks] 30 | 31 | # Logical Dependency Chain 32 | [Define the logical order of development: 33 | - Which features need to be built first (foundation) 34 | - Getting as quickly as possible to something usable/visible front end that works 35 | - Properly pacing and scoping each feature so it is atomic but can also be built upon and improved as development approaches] 36 | 37 | # Risks and Mitigations 38 | [Identify potential risks and how they'll be addressed: 39 | - Technical challenges 40 | - Figuring out the MVP that we can build upon 41 | - Resource constraints] 42 | 43 | # Appendix 44 | [Include any additional information: 45 | - Research findings 46 | - Technical specifications] 47 | </PRD> ``` -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- ```yaml 1 | name: Release 2 | on: 3 | push: 4 | branches: 5 | - main 6 | 7 | concurrency: ${{ github.workflow }}-${{ github.ref }} 8 | 9 | permissions: 10 | contents: write 11 | pull-requests: write 12 | id-token: write 13 | 14 | jobs: 15 | release: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v4 19 | with: 20 | fetch-depth: 0 21 | 22 | - uses: actions/setup-node@v4 23 | with: 24 | node-version: 20 25 | cache: "npm" 26 | 27 | - name: Cache node_modules 28 | uses: actions/cache@v4 29 | with: 30 | path: | 31 | node_modules 32 | */*/node_modules 33 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 34 | restore-keys: | 35 | ${{ runner.os }}-node- 36 | 37 | - name: Install Dependencies 38 | run: npm ci 39 | timeout-minutes: 2 40 | 41 | - name: Check pre-release mode 42 | run: node ./.github/scripts/check-pre-release-mode.mjs "main" 43 | 44 | - name: Build packages 45 | run: npm run turbo:build 46 | env: 47 | NODE_ENV: production 48 | FORCE_COLOR: 1 49 | TM_PUBLIC_BASE_DOMAIN: ${{ secrets.TM_PUBLIC_BASE_DOMAIN }} 50 | TM_PUBLIC_SUPABASE_URL: ${{ secrets.TM_PUBLIC_SUPABASE_URL }} 51 | TM_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.TM_PUBLIC_SUPABASE_ANON_KEY }} 52 | 53 | - name: Create Release Pull Request or Publish to npm 54 | uses: changesets/action@v1 55 | with: 56 | publish: node ./.github/scripts/release.mjs 57 | env: 58 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 59 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 60 | ``` -------------------------------------------------------------------------------- /apps/extension/src/components/ui/CollapsibleSection.tsx: -------------------------------------------------------------------------------- ```typescript 1 | import type React from 'react'; 2 | import { useState } from 'react'; 3 | import { Button } from './button'; 4 | import { ChevronDown, ChevronRight } from 'lucide-react'; 5 | import type { LucideIcon } from 'lucide-react'; 6 | 7 | interface CollapsibleSectionProps { 8 | title: string; 9 | icon?: LucideIcon; 10 | defaultExpanded?: boolean; 11 | className?: string; 12 | headerClassName?: string; 13 | contentClassName?: string; 14 | buttonClassName?: string; 15 | children: React.ReactNode; 16 | rightElement?: React.ReactNode; 17 | } 18 | 19 | export const CollapsibleSection: React.FC<CollapsibleSectionProps> = ({ 20 | title, 21 | icon: Icon, 22 | defaultExpanded = false, 23 | className = '', 24 | headerClassName = '', 25 | contentClassName = '', 26 | buttonClassName = 'text-vscode-foreground/70 hover:text-vscode-foreground', 27 | children, 28 | rightElement 29 | }) => { 30 | const [isExpanded, setIsExpanded] = useState(defaultExpanded); 31 | 32 | return ( 33 | <div className={`mb-8 ${className}`}> 34 | <div className={`flex items-center gap-2 mb-4 ${headerClassName}`}> 35 | <Button 36 | variant="ghost" 37 | size="sm" 38 | className={`p-0 h-auto ${buttonClassName}`} 39 | onClick={() => setIsExpanded(!isExpanded)} 40 | > 41 | {isExpanded ? ( 42 | <ChevronDown className="w-4 h-4 mr-1" /> 43 | ) : ( 44 | <ChevronRight className="w-4 h-4 mr-1" /> 45 | )} 46 | {Icon && <Icon className="w-4 h-4 mr-1" />} 47 | {title} 48 | </Button> 49 | {rightElement} 50 | </div> 51 | 52 | {isExpanded && ( 53 | <div 54 | className={`bg-widget-background rounded-lg p-4 border border-widget-border ${contentClassName}`} 55 | > 56 | {children} 57 | </div> 58 | )} 59 | </div> 60 | ); 61 | }; 62 | ``` -------------------------------------------------------------------------------- /apps/extension/src/webview/components/SidebarView.tsx: -------------------------------------------------------------------------------- ```typescript 1 | import React, { useState, useEffect } from 'react'; 2 | import { TaskMasterLogo } from '../../components/TaskMasterLogo'; 3 | 4 | interface SidebarViewProps { 5 | initialConnectionStatus?: boolean; 6 | } 7 | 8 | // Acquire VS Code API only once globally to avoid "already acquired" error 9 | const vscode = window.acquireVsCodeApi ? window.acquireVsCodeApi() : null; 10 | 11 | export const SidebarView: React.FC<SidebarViewProps> = ({ 12 | initialConnectionStatus = false 13 | }) => { 14 | const [isConnected, setIsConnected] = useState(initialConnectionStatus); 15 | 16 | useEffect(() => { 17 | const handleMessage = (event: MessageEvent) => { 18 | const message = event.data; 19 | if (message.type === 'connectionStatus') { 20 | setIsConnected(message.data.isConnected); 21 | } 22 | }; 23 | 24 | window.addEventListener('message', handleMessage); 25 | return () => { 26 | window.removeEventListener('message', handleMessage); 27 | }; 28 | }, []); 29 | 30 | const handleOpenBoard = () => { 31 | vscode?.postMessage({ command: 'openBoard' }); 32 | }; 33 | 34 | return ( 35 | <div className="h-full flex items-center justify-center p-6"> 36 | <div className="text-center"> 37 | <TaskMasterLogo className="w-20 h-20 mx-auto mb-5 opacity-80 text-vscode-foreground" /> 38 | 39 | <h2 className="text-xl font-semibold mb-6 text-vscode-foreground"> 40 | TaskMaster 41 | </h2> 42 | 43 | <button 44 | onClick={handleOpenBoard} 45 | className="w-full px-4 py-2 bg-vscode-button-background text-vscode-button-foreground rounded hover:bg-vscode-button-hoverBackground transition-colors text-sm font-medium" 46 | > 47 | Open Kanban Board 48 | </button> 49 | </div> 50 | </div> 51 | ); 52 | }; 53 | ``` -------------------------------------------------------------------------------- /apps/docs/getting-started/quick-start/requirements.mdx: -------------------------------------------------------------------------------- ```markdown 1 | --- 2 | title: Requirements 3 | sidebarTitle: "Requirements" 4 | --- 5 | Before you can start using TaskMaster AI, you'll need to install Node.js and set up at least one model API Key. 6 | 7 | ## 1. Node.js 8 | 9 | TaskMaster AI is built with Node.js and requires it to run. npm (Node Package Manager) comes bundled with Node.js. 10 | 11 | <Accordion title="Install Node.js"> 12 | 13 | ### Installation 14 | 15 | **Option 1: Download from official website** 16 | 1. Visit [nodejs.org](https://nodejs.org) 17 | 2. Download the **LTS (Long Term Support)** version for your operating system 18 | 3. Run the installer and follow the setup wizard 19 | 20 | **Option 2: Use a package manager** 21 | 22 | <CodeGroup> 23 | 24 | ```bash Windows (Chocolatey) 25 | choco install nodejs 26 | ``` 27 | 28 | ```bash Windows (winget) 29 | winget install OpenJS.NodeJS 30 | ``` 31 | 32 | </CodeGroup> 33 | 34 | </Accordion> 35 | 36 | ## 2. Model API Key 37 | 38 | Taskmaster utilizes AI across several commands, and those require a separate API key. For the purpose of a Quick Start we recommend setting up an API Key with Anthropic for your main model and Perplexity for your research model (optional but recommended). 39 | 40 | <Tip>Task Master shows API costs per command used. Most users load $5-10 on their keys and don't have to top it off for a few months.</Tip> 41 | 42 | At least one (1) of the following is required: 43 | 44 | 1. Anthropic API key (Claude API) - **recommended for Quick Start** 45 | 2. OpenAI API key 46 | 3. Google Gemini API key 47 | 4. Perplexity API key (for research model) 48 | 5. xAI API Key (for research or main model) 49 | 6. OpenRouter API Key (for research or main model) 50 | 7. Claude Code (no API key required - requires Claude Code CLI) ``` -------------------------------------------------------------------------------- /src/ai-providers/claude-code.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * src/ai-providers/claude-code.js 3 | * 4 | * Implementation for interacting with Claude models via Claude Code CLI 5 | * using a custom AI SDK implementation. 6 | */ 7 | 8 | import { createClaudeCode } from './custom-sdk/claude-code/index.js'; 9 | import { BaseAIProvider } from './base-provider.js'; 10 | import { getClaudeCodeSettingsForCommand } from '../../scripts/modules/config-manager.js'; 11 | 12 | export class ClaudeCodeProvider extends BaseAIProvider { 13 | constructor() { 14 | super(); 15 | this.name = 'Claude Code'; 16 | } 17 | 18 | getRequiredApiKeyName() { 19 | return 'CLAUDE_CODE_API_KEY'; 20 | } 21 | 22 | isRequiredApiKey() { 23 | return false; 24 | } 25 | 26 | /** 27 | * Override validateAuth to skip API key validation for Claude Code 28 | * @param {object} params - Parameters to validate 29 | */ 30 | validateAuth(params) { 31 | // Claude Code doesn't require an API key 32 | // No validation needed 33 | } 34 | 35 | /** 36 | * Creates and returns a Claude Code client instance. 37 | * @param {object} params - Parameters for client initialization 38 | * @param {string} [params.commandName] - Name of the command invoking the service 39 | * @param {string} [params.baseURL] - Optional custom API endpoint (not used by Claude Code) 40 | * @returns {Function} Claude Code client function 41 | * @throws {Error} If initialization fails 42 | */ 43 | getClient(params) { 44 | try { 45 | // Claude Code doesn't use API keys or base URLs 46 | // Just return the provider factory 47 | return createClaudeCode({ 48 | defaultSettings: getClaudeCodeSettingsForCommand(params?.commandName) 49 | }); 50 | } catch (error) { 51 | this.handleError('client initialization', error); 52 | } 53 | } 54 | } 55 | ``` -------------------------------------------------------------------------------- /src/ai-providers/openai.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * openai.js 3 | * AI provider implementation for OpenAI models using Vercel AI SDK. 4 | */ 5 | 6 | import { createOpenAI } from '@ai-sdk/openai'; 7 | import { BaseAIProvider } from './base-provider.js'; 8 | 9 | export class OpenAIProvider extends BaseAIProvider { 10 | constructor() { 11 | super(); 12 | this.name = '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 OpenAI API key 18 | */ 19 | getRequiredApiKeyName() { 20 | return 'OPENAI_API_KEY'; 21 | } 22 | 23 | /** 24 | * Determines if a model requires max_completion_tokens instead of maxTokens 25 | * GPT-5 models require max_completion_tokens parameter 26 | * @param {string} modelId - The model ID to check 27 | * @returns {boolean} True if the model requires max_completion_tokens 28 | */ 29 | requiresMaxCompletionTokens(modelId) { 30 | return modelId && modelId.startsWith('gpt-5'); 31 | } 32 | 33 | /** 34 | * Creates and returns an OpenAI client instance. 35 | * @param {object} params - Parameters for client initialization 36 | * @param {string} params.apiKey - OpenAI API key 37 | * @param {string} [params.baseURL] - Optional custom API endpoint 38 | * @returns {Function} OpenAI client function 39 | * @throws {Error} If API key is missing or initialization fails 40 | */ 41 | getClient(params) { 42 | try { 43 | const { apiKey, baseURL } = params; 44 | 45 | if (!apiKey) { 46 | throw new Error('OpenAI API key is required.'); 47 | } 48 | 49 | return createOpenAI({ 50 | apiKey, 51 | ...(baseURL && { baseURL }) 52 | }); 53 | } catch (error) { 54 | this.handleError('client initialization', error); 55 | } 56 | } 57 | } 58 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/add-subtask/convert-task-to-subtask.md: -------------------------------------------------------------------------------- ```markdown 1 | Convert an existing task into a subtask. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse parent ID and task ID to convert. 6 | 7 | ## Task Conversion 8 | 9 | Converts an existing standalone task into a subtask of another task. 10 | 11 | ## Argument Parsing 12 | 13 | - "move task 8 under 5" 14 | - "make 8 a subtask of 5" 15 | - "nest 8 in 5" 16 | - "5 8" → make task 8 a subtask of task 5 17 | 18 | ## Execution 19 | 20 | ```bash 21 | task-master add-subtask --parent=<parent-id> --task-id=<task-to-convert> 22 | ``` 23 | 24 | ## Pre-Conversion Checks 25 | 26 | 1. **Validation** 27 | - Both tasks exist and are valid 28 | - No circular parent relationships 29 | - Task isn't already a subtask 30 | - Logical hierarchy makes sense 31 | 32 | 2. **Impact Analysis** 33 | - Dependencies that will be affected 34 | - Tasks that depend on converting task 35 | - Priority alignment needed 36 | - Status compatibility 37 | 38 | ## Conversion Process 39 | 40 | 1. Change task ID from "8" to "5.1" (next available) 41 | 2. Update all dependency references 42 | 3. Inherit parent's context where appropriate 43 | 4. Adjust priorities if needed 44 | 5. Update time estimates 45 | 46 | ## Smart Features 47 | 48 | - Preserve task history 49 | - Maintain dependencies 50 | - Update all references 51 | - Create conversion log 52 | 53 | ## Example 54 | 55 | ``` 56 | /project:tm/add-subtask/from-task 5 8 57 | → Converting: Task #8 becomes subtask #5.1 58 | → Updated: 3 dependency references 59 | → Parent task #5 now has 1 subtask 60 | → Note: Subtask inherits parent's priority 61 | 62 | Before: #8 "Implement validation" (standalone) 63 | After: #5.1 "Implement validation" (subtask of #5) 64 | ``` 65 | 66 | ## Post-Conversion 67 | 68 | - Show new task hierarchy 69 | - List updated dependencies 70 | - Verify project integrity 71 | - Suggest related conversions ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/add-subtask/convert-task-to-subtask.md: -------------------------------------------------------------------------------- ```markdown 1 | Convert an existing task into a subtask. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse parent ID and task ID to convert. 6 | 7 | ## Task Conversion 8 | 9 | Converts an existing standalone task into a subtask of another task. 10 | 11 | ## Argument Parsing 12 | 13 | - "move task 8 under 5" 14 | - "make 8 a subtask of 5" 15 | - "nest 8 in 5" 16 | - "5 8" → make task 8 a subtask of task 5 17 | 18 | ## Execution 19 | 20 | ```bash 21 | task-master add-subtask --parent=<parent-id> --task-id=<task-to-convert> 22 | ``` 23 | 24 | ## Pre-Conversion Checks 25 | 26 | 1. **Validation** 27 | - Both tasks exist and are valid 28 | - No circular parent relationships 29 | - Task isn't already a subtask 30 | - Logical hierarchy makes sense 31 | 32 | 2. **Impact Analysis** 33 | - Dependencies that will be affected 34 | - Tasks that depend on converting task 35 | - Priority alignment needed 36 | - Status compatibility 37 | 38 | ## Conversion Process 39 | 40 | 1. Change task ID from "8" to "5.1" (next available) 41 | 2. Update all dependency references 42 | 3. Inherit parent's context where appropriate 43 | 4. Adjust priorities if needed 44 | 5. Update time estimates 45 | 46 | ## Smart Features 47 | 48 | - Preserve task history 49 | - Maintain dependencies 50 | - Update all references 51 | - Create conversion log 52 | 53 | ## Example 54 | 55 | ``` 56 | /project:tm/add-subtask/from-task 5 8 57 | → Converting: Task #8 becomes subtask #5.1 58 | → Updated: 3 dependency references 59 | → Parent task #5 now has 1 subtask 60 | → Note: Subtask inherits parent's priority 61 | 62 | Before: #8 "Implement validation" (standalone) 63 | After: #5.1 "Implement validation" (subtask of #5) 64 | ``` 65 | 66 | ## Post-Conversion 67 | 68 | - Show new task hierarchy 69 | - List updated dependencies 70 | - Verify project integrity 71 | - Suggest related conversions ``` -------------------------------------------------------------------------------- /apps/extension/src/components/ui/scroll-area.tsx: -------------------------------------------------------------------------------- ```typescript 1 | import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; 2 | import type * as React from 'react'; 3 | 4 | import { cn } from '@/lib/utils'; 5 | 6 | function ScrollArea({ 7 | className, 8 | children, 9 | ...props 10 | }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) { 11 | return ( 12 | <ScrollAreaPrimitive.Root 13 | data-slot="scroll-area" 14 | className={cn('relative overflow-hidden', className)} 15 | {...props} 16 | > 17 | <ScrollAreaPrimitive.Viewport 18 | data-slot="scroll-area-viewport" 19 | className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 overflow-y-auto" 20 | > 21 | {children} 22 | </ScrollAreaPrimitive.Viewport> 23 | <ScrollBar /> 24 | <ScrollAreaPrimitive.Corner /> 25 | </ScrollAreaPrimitive.Root> 26 | ); 27 | } 28 | 29 | function ScrollBar({ 30 | className, 31 | orientation = 'vertical', 32 | ...props 33 | }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) { 34 | return ( 35 | <ScrollAreaPrimitive.ScrollAreaScrollbar 36 | data-slot="scroll-area-scrollbar" 37 | orientation={orientation} 38 | className={cn( 39 | 'flex touch-none p-px transition-colors select-none', 40 | orientation === 'vertical' && 41 | 'h-full w-2.5 border-l border-l-transparent', 42 | orientation === 'horizontal' && 43 | 'h-2.5 flex-col border-t border-t-transparent', 44 | className 45 | )} 46 | {...props} 47 | > 48 | <ScrollAreaPrimitive.ScrollAreaThumb 49 | data-slot="scroll-area-thumb" 50 | className="bg-border relative flex-1 rounded-full" 51 | /> 52 | </ScrollAreaPrimitive.ScrollAreaScrollbar> 53 | ); 54 | } 55 | 56 | export { ScrollArea, ScrollBar }; 57 | ``` -------------------------------------------------------------------------------- /apps/extension/src/components/ui/badge.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 badgeVariants = cva( 8 | 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden', 9 | { 10 | variants: { 11 | variant: { 12 | default: 13 | 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90', 14 | secondary: 15 | 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90', 16 | destructive: 17 | 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60', 18 | outline: 19 | 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground' 20 | } 21 | }, 22 | defaultVariants: { 23 | variant: 'default' 24 | } 25 | } 26 | ); 27 | 28 | function Badge({ 29 | className, 30 | variant, 31 | asChild = false, 32 | ...props 33 | }: React.ComponentProps<'span'> & 34 | VariantProps<typeof badgeVariants> & { asChild?: boolean }) { 35 | const Comp = asChild ? Slot : 'span'; 36 | 37 | return ( 38 | <Comp 39 | data-slot="badge" 40 | className={cn(badgeVariants({ variant }), className)} 41 | {...props} 42 | /> 43 | ); 44 | } 45 | 46 | export { Badge, badgeVariants }; 47 | ``` -------------------------------------------------------------------------------- /apps/extension/src/services/polling-strategies.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * Polling Strategies - Simplified 3 | * Different algorithms for polling intervals 4 | */ 5 | 6 | import type { PollingStrategy } from './polling-service'; 7 | 8 | /** 9 | * Fixed interval polling 10 | */ 11 | export class FixedIntervalStrategy implements PollingStrategy { 12 | constructor(private interval = 10000) {} 13 | 14 | calculateNextInterval(): number { 15 | return this.interval; 16 | } 17 | 18 | getName(): string { 19 | return 'fixed'; 20 | } 21 | } 22 | 23 | /** 24 | * Adaptive polling based on activity 25 | */ 26 | export class AdaptivePollingStrategy implements PollingStrategy { 27 | private readonly MIN_INTERVAL = 5000; // 5 seconds 28 | private readonly MAX_INTERVAL = 60000; // 1 minute 29 | private readonly BASE_INTERVAL = 10000; // 10 seconds 30 | 31 | calculateNextInterval(consecutiveNoChanges: number): number { 32 | // Start with base interval 33 | let interval = this.BASE_INTERVAL; 34 | 35 | // If no changes for a while, slow down 36 | if (consecutiveNoChanges > 5) { 37 | interval = Math.min( 38 | this.MAX_INTERVAL, 39 | this.BASE_INTERVAL * 1.5 ** (consecutiveNoChanges - 5) 40 | ); 41 | } else if (consecutiveNoChanges === 0) { 42 | // Recent change, poll more frequently 43 | interval = this.MIN_INTERVAL; 44 | } 45 | 46 | return Math.round(interval); 47 | } 48 | 49 | getName(): string { 50 | return 'adaptive'; 51 | } 52 | } 53 | 54 | /** 55 | * Create polling strategy from configuration 56 | */ 57 | export function createPollingStrategy(config: any): PollingStrategy { 58 | const type = config.get('polling.strategy', 'adaptive'); 59 | const interval = config.get('polling.interval', 10000); 60 | 61 | switch (type) { 62 | case 'fixed': 63 | return new FixedIntervalStrategy(interval); 64 | default: 65 | return new AdaptivePollingStrategy(); 66 | } 67 | } 68 | ``` -------------------------------------------------------------------------------- /packages/tm-core/src/executors/executor-factory.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * Factory for creating task executors 3 | */ 4 | 5 | import type { ITaskExecutor, ExecutorOptions, ExecutorType } from './types.js'; 6 | import { ClaudeExecutor } from './claude-executor.js'; 7 | import { getLogger } from '../logger/index.js'; 8 | 9 | export class ExecutorFactory { 10 | private static logger = getLogger('ExecutorFactory'); 11 | 12 | /** 13 | * Create an executor based on the provided options 14 | */ 15 | static create(options: ExecutorOptions): ITaskExecutor { 16 | this.logger.debug(`Creating executor of type: ${options.type}`); 17 | 18 | switch (options.type) { 19 | case 'claude': 20 | return new ClaudeExecutor(options.projectRoot, options.config); 21 | 22 | case 'shell': 23 | // Placeholder for shell executor 24 | throw new Error('Shell executor not yet implemented'); 25 | 26 | case 'custom': 27 | // Placeholder for custom executor 28 | throw new Error('Custom executor not yet implemented'); 29 | 30 | default: 31 | throw new Error(`Unknown executor type: ${options.type}`); 32 | } 33 | } 34 | 35 | /** 36 | * Get the default executor type based on available tools 37 | */ 38 | static async getDefaultExecutor( 39 | projectRoot: string 40 | ): Promise<ExecutorType | null> { 41 | // Check for Claude first 42 | const claudeExecutor = new ClaudeExecutor(projectRoot); 43 | if (await claudeExecutor.isAvailable()) { 44 | this.logger.info('Claude CLI detected as default executor'); 45 | return 'claude'; 46 | } 47 | 48 | // Could check for other executors here 49 | this.logger.warn('No default executor available'); 50 | return null; 51 | } 52 | 53 | /** 54 | * Get list of available executor types 55 | */ 56 | static getAvailableTypes(): ExecutorType[] { 57 | return ['claude', 'shell', 'custom']; 58 | } 59 | } 60 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/workflows/command-pipeline.md: -------------------------------------------------------------------------------- ```markdown 1 | Execute a pipeline of commands based on a specification. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | ## Command Pipeline Execution 6 | 7 | Parse pipeline specification from arguments. Supported formats: 8 | 9 | ### Simple Pipeline 10 | `init → expand-all → sprint-plan` 11 | 12 | ### Conditional Pipeline 13 | `status → if:pending>10 → sprint-plan → else → next` 14 | 15 | ### Iterative Pipeline 16 | `for:pending-tasks → expand → complexity-check` 17 | 18 | ### Smart Pipeline Patterns 19 | 20 | **1. Project Setup Pipeline** 21 | ``` 22 | init [prd] → 23 | expand-all → 24 | complexity-report → 25 | sprint-plan → 26 | show first-sprint 27 | ``` 28 | 29 | **2. Daily Work Pipeline** 30 | ``` 31 | standup → 32 | if:in-progress → continue → 33 | else → next → start 34 | ``` 35 | 36 | **3. Task Completion Pipeline** 37 | ``` 38 | complete [id] → 39 | git-commit → 40 | if:blocked-tasks-freed → show-freed → 41 | next 42 | ``` 43 | 44 | **4. Quality Check Pipeline** 45 | ``` 46 | list in-progress → 47 | for:each → check-idle-time → 48 | if:idle>1day → prompt-update 49 | ``` 50 | 51 | ### Pipeline Features 52 | 53 | **Variables** 54 | - Store results: `status → $count=pending-count` 55 | - Use in conditions: `if:$count>10` 56 | - Pass between commands: `expand $high-priority-tasks` 57 | 58 | **Error Handling** 59 | - On failure: `try:complete → catch:show-blockers` 60 | - Skip on error: `optional:test-run` 61 | - Retry logic: `retry:3:commit` 62 | 63 | **Parallel Execution** 64 | - Parallel branches: `[analyze | test | lint]` 65 | - Join results: `parallel → join:report` 66 | 67 | ### Execution Flow 68 | 69 | 1. Parse pipeline specification 70 | 2. Validate command sequence 71 | 3. Execute with state passing 72 | 4. Handle conditions and loops 73 | 5. Aggregate results 74 | 6. Show summary 75 | 76 | This enables complex workflows like: 77 | `parse-prd → expand-all → filter:complex>70 → assign:senior → sprint-plan:weighted` ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/workflows/command-pipeline.md: -------------------------------------------------------------------------------- ```markdown 1 | Execute a pipeline of commands based on a specification. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | ## Command Pipeline Execution 6 | 7 | Parse pipeline specification from arguments. Supported formats: 8 | 9 | ### Simple Pipeline 10 | `init → expand-all → sprint-plan` 11 | 12 | ### Conditional Pipeline 13 | `status → if:pending>10 → sprint-plan → else → next` 14 | 15 | ### Iterative Pipeline 16 | `for:pending-tasks → expand → complexity-check` 17 | 18 | ### Smart Pipeline Patterns 19 | 20 | **1. Project Setup Pipeline** 21 | ``` 22 | init [prd] → 23 | expand-all → 24 | complexity-report → 25 | sprint-plan → 26 | show first-sprint 27 | ``` 28 | 29 | **2. Daily Work Pipeline** 30 | ``` 31 | standup → 32 | if:in-progress → continue → 33 | else → next → start 34 | ``` 35 | 36 | **3. Task Completion Pipeline** 37 | ``` 38 | complete [id] → 39 | git-commit → 40 | if:blocked-tasks-freed → show-freed → 41 | next 42 | ``` 43 | 44 | **4. Quality Check Pipeline** 45 | ``` 46 | list in-progress → 47 | for:each → check-idle-time → 48 | if:idle>1day → prompt-update 49 | ``` 50 | 51 | ### Pipeline Features 52 | 53 | **Variables** 54 | - Store results: `status → $count=pending-count` 55 | - Use in conditions: `if:$count>10` 56 | - Pass between commands: `expand $high-priority-tasks` 57 | 58 | **Error Handling** 59 | - On failure: `try:complete → catch:show-blockers` 60 | - Skip on error: `optional:test-run` 61 | - Retry logic: `retry:3:commit` 62 | 63 | **Parallel Execution** 64 | - Parallel branches: `[analyze | test | lint]` 65 | - Join results: `parallel → join:report` 66 | 67 | ### Execution Flow 68 | 69 | 1. Parse pipeline specification 70 | 2. Validate command sequence 71 | 3. Execute with state passing 72 | 4. Handle conditions and loops 73 | 5. Aggregate results 74 | 6. Show summary 75 | 76 | This enables complex workflows like: 77 | `parse-prd → expand-all → filter:complex>70 → assign:senior → sprint-plan:weighted` ``` -------------------------------------------------------------------------------- /mcp-server/src/tools/get-operation-status.js: -------------------------------------------------------------------------------- ```javascript 1 | // mcp-server/src/tools/get-operation-status.js 2 | import { z } from 'zod'; 3 | import { createErrorResponse, createContentResponse } from './utils.js'; // Assuming these utils exist 4 | 5 | /** 6 | * Register the get_operation_status tool. 7 | * @param {FastMCP} server - FastMCP server instance. 8 | * @param {AsyncOperationManager} asyncManager - The async operation manager. 9 | */ 10 | export function registerGetOperationStatusTool(server, asyncManager) { 11 | server.addTool({ 12 | name: 'get_operation_status', 13 | description: 14 | 'Retrieves the status and result/error of a background operation.', 15 | parameters: z.object({ 16 | operationId: z.string().describe('The ID of the operation to check.') 17 | }), 18 | execute: async (args, { log }) => { 19 | try { 20 | const { operationId } = args; 21 | log.info(`Checking status for operation ID: ${operationId}`); 22 | 23 | const status = asyncManager.getStatus(operationId); 24 | 25 | // Status will now always return an object, but it might have status='not_found' 26 | if (status.status === 'not_found') { 27 | log.warn(`Operation ID not found: ${operationId}`); 28 | return createErrorResponse( 29 | status.error?.message || `Operation ID not found: ${operationId}`, 30 | status.error?.code || 'OPERATION_NOT_FOUND' 31 | ); 32 | } 33 | 34 | log.info(`Status for ${operationId}: ${status.status}`); 35 | return createContentResponse(status); 36 | } catch (error) { 37 | log.error(`Error in get_operation_status tool: ${error.message}`, { 38 | stack: error.stack 39 | }); 40 | return createErrorResponse( 41 | `Failed to get operation status: ${error.message}`, 42 | 'GET_STATUS_ERROR' 43 | ); 44 | } 45 | } 46 | }); 47 | } 48 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/list/list-tasks.md: -------------------------------------------------------------------------------- ```markdown 1 | List tasks with intelligent argument parsing. 2 | 3 | Parse arguments to determine filters and display options: 4 | - Status: pending, in-progress, done, review, deferred, cancelled 5 | - Priority: high, medium, low (or priority:high) 6 | - Special: subtasks, tree, dependencies, blocked 7 | - IDs: Direct numbers (e.g., "1,3,5" or "1-5") 8 | - Complex: "pending high" = pending AND high priority 9 | 10 | Arguments: $ARGUMENTS 11 | 12 | Let me parse your request intelligently: 13 | 14 | 1. **Detect Filter Intent** 15 | - If arguments contain status keywords → filter by status 16 | - If arguments contain priority → filter by priority 17 | - If arguments contain "subtasks" → include subtasks 18 | - If arguments contain "tree" → hierarchical view 19 | - If arguments contain numbers → show specific tasks 20 | - If arguments contain "blocked" → show blocked tasks only 21 | 22 | 2. **Smart Combinations** 23 | Examples of what I understand: 24 | - "pending high" → pending tasks with high priority 25 | - "done today" → tasks completed today 26 | - "blocked" → tasks with unmet dependencies 27 | - "1-5" → tasks 1 through 5 28 | - "subtasks tree" → hierarchical view with subtasks 29 | 30 | 3. **Execute Appropriate Query** 31 | Based on parsed intent, run the most specific task-master command 32 | 33 | 4. **Enhanced Display** 34 | - Group by relevant criteria 35 | - Show most important information first 36 | - Use visual indicators for quick scanning 37 | - Include relevant metrics 38 | 39 | 5. **Intelligent Suggestions** 40 | Based on what you're viewing, suggest next actions: 41 | - Many pending? → Suggest priority order 42 | - Many blocked? → Show dependency resolution 43 | - Looking at specific tasks? → Show related tasks ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/list/list-tasks.md: -------------------------------------------------------------------------------- ```markdown 1 | List tasks with intelligent argument parsing. 2 | 3 | Parse arguments to determine filters and display options: 4 | - Status: pending, in-progress, done, review, deferred, cancelled 5 | - Priority: high, medium, low (or priority:high) 6 | - Special: subtasks, tree, dependencies, blocked 7 | - IDs: Direct numbers (e.g., "1,3,5" or "1-5") 8 | - Complex: "pending high" = pending AND high priority 9 | 10 | Arguments: $ARGUMENTS 11 | 12 | Let me parse your request intelligently: 13 | 14 | 1. **Detect Filter Intent** 15 | - If arguments contain status keywords → filter by status 16 | - If arguments contain priority → filter by priority 17 | - If arguments contain "subtasks" → include subtasks 18 | - If arguments contain "tree" → hierarchical view 19 | - If arguments contain numbers → show specific tasks 20 | - If arguments contain "blocked" → show blocked tasks only 21 | 22 | 2. **Smart Combinations** 23 | Examples of what I understand: 24 | - "pending high" → pending tasks with high priority 25 | - "done today" → tasks completed today 26 | - "blocked" → tasks with unmet dependencies 27 | - "1-5" → tasks 1 through 5 28 | - "subtasks tree" → hierarchical view with subtasks 29 | 30 | 3. **Execute Appropriate Query** 31 | Based on parsed intent, run the most specific task-master command 32 | 33 | 4. **Enhanced Display** 34 | - Group by relevant criteria 35 | - Show most important information first 36 | - Use visual indicators for quick scanning 37 | - Include relevant metrics 38 | 39 | 5. **Intelligent Suggestions** 40 | Based on what you're viewing, suggest next actions: 41 | - Many pending? → Suggest priority order 42 | - Many blocked? → Show dependency resolution 43 | - Looking at specific tasks? → Show related tasks ``` -------------------------------------------------------------------------------- /test-config-manager.js: -------------------------------------------------------------------------------- ```javascript 1 | // test-config-manager.js 2 | console.log('=== ENVIRONMENT TEST ==='); 3 | console.log('Working directory:', process.cwd()); 4 | console.log('NODE_PATH:', process.env.NODE_PATH); 5 | 6 | // Test basic imports 7 | try { 8 | console.log('Importing config-manager'); 9 | // Use dynamic import for ESM 10 | const configManagerModule = await import( 11 | './scripts/modules/config-manager.js' 12 | ); 13 | const configManager = configManagerModule.default || configManagerModule; 14 | console.log('Config manager loaded successfully'); 15 | 16 | console.log('Loading supported models'); 17 | // Add after line 14 (after "Config manager loaded successfully") 18 | console.log('Config manager exports:', Object.keys(configManager)); 19 | } catch (error) { 20 | console.error('Import error:', error.message); 21 | console.error(error.stack); 22 | } 23 | 24 | // Test file access 25 | try { 26 | console.log('Checking for .taskmasterconfig'); 27 | // Use dynamic import for ESM 28 | const { readFileSync, existsSync } = await import('fs'); 29 | const { resolve } = await import('path'); 30 | 31 | const configExists = existsSync('./.taskmasterconfig'); 32 | console.log('.taskmasterconfig exists:', configExists); 33 | 34 | if (configExists) { 35 | const config = JSON.parse(readFileSync('./.taskmasterconfig', 'utf-8')); 36 | console.log('Config keys:', Object.keys(config)); 37 | } 38 | 39 | console.log('Checking for supported-models.json'); 40 | const modelsPath = resolve('./scripts/modules/supported-models.json'); 41 | console.log('Models path:', modelsPath); 42 | const modelsExists = existsSync(modelsPath); 43 | console.log('supported-models.json exists:', modelsExists); 44 | } catch (error) { 45 | console.error('File access error:', error.message); 46 | } 47 | 48 | console.log('=== TEST COMPLETE ==='); 49 | ``` -------------------------------------------------------------------------------- /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 required parameters are missing or initialization fails 47 | */ 48 | getClient(params) { 49 | try { 50 | const { apiKey, baseURL } = params; 51 | 52 | return createAzure({ 53 | apiKey, 54 | baseURL 55 | }); 56 | } catch (error) { 57 | this.handleError('client initialization', error); 58 | } 59 | } 60 | } 61 | ``` -------------------------------------------------------------------------------- /tests/setup.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * Jest setup file 3 | * 4 | * This file is run before each test suite to set up the test environment. 5 | */ 6 | 7 | import path from 'path'; 8 | import { fileURLToPath } from 'url'; 9 | 10 | // Capture the actual original working directory before any changes 11 | const originalWorkingDirectory = process.cwd(); 12 | 13 | // Store original working directory and project root 14 | const __filename = fileURLToPath(import.meta.url); 15 | const __dirname = path.dirname(__filename); 16 | const projectRoot = path.resolve(__dirname, '..'); 17 | 18 | // Ensure we're always starting from the project root 19 | if (process.cwd() !== projectRoot) { 20 | process.chdir(projectRoot); 21 | } 22 | 23 | // Mock environment variables 24 | process.env.MODEL = 'sonar-pro'; 25 | process.env.MAX_TOKENS = '64000'; 26 | process.env.TEMPERATURE = '0.2'; 27 | process.env.DEBUG = 'false'; 28 | process.env.TASKMASTER_LOG_LEVEL = 'error'; // Set to error to reduce noise in tests 29 | process.env.DEFAULT_SUBTASKS = '5'; 30 | process.env.DEFAULT_PRIORITY = 'medium'; 31 | process.env.PROJECT_NAME = 'Test Project'; 32 | process.env.PROJECT_VERSION = '1.0.0'; 33 | // Ensure tests don't make real API calls by setting mock API keys 34 | process.env.ANTHROPIC_API_KEY = 'test-mock-api-key-for-tests'; 35 | process.env.PERPLEXITY_API_KEY = 'test-mock-perplexity-key-for-tests'; 36 | 37 | // Add global test helpers if needed 38 | global.wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); 39 | 40 | // Store original working directory for tests that need it 41 | global.originalWorkingDirectory = originalWorkingDirectory; 42 | global.projectRoot = projectRoot; 43 | 44 | // If needed, silence console during tests 45 | if (process.env.SILENCE_CONSOLE === 'true') { 46 | global.console = { 47 | ...console, 48 | log: () => {}, 49 | info: () => {}, 50 | warn: () => {}, 51 | error: () => {} 52 | }; 53 | } 54 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/status/project-status.md: -------------------------------------------------------------------------------- ```markdown 1 | Enhanced status command with comprehensive project insights. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | ## Intelligent Status Overview 6 | 7 | ### 1. **Executive Summary** 8 | Quick dashboard view: 9 | - 🏃 Active work (in-progress tasks) 10 | - 📊 Progress metrics (% complete, velocity) 11 | - 🚧 Blockers and risks 12 | - ⏱️ Time analysis (estimated vs actual) 13 | - 🎯 Sprint/milestone progress 14 | 15 | ### 2. **Contextual Analysis** 16 | 17 | Based on $ARGUMENTS, focus on: 18 | - "sprint" → Current sprint progress and burndown 19 | - "blocked" → Dependency chains and resolution paths 20 | - "team" → Task distribution and workload 21 | - "timeline" → Schedule adherence and projections 22 | - "risk" → High complexity or overdue items 23 | 24 | ### 3. **Smart Insights** 25 | 26 | **Workflow Health:** 27 | - Idle tasks (in-progress > 24h without updates) 28 | - Bottlenecks (multiple tasks waiting on same dependency) 29 | - Quick wins (low complexity, high impact) 30 | 31 | **Predictive Analytics:** 32 | - Completion projections based on velocity 33 | - Risk of missing deadlines 34 | - Recommended task order for optimal flow 35 | 36 | ### 4. **Visual Intelligence** 37 | 38 | Dynamic visualization based on data: 39 | ``` 40 | Sprint Progress: ████████░░ 80% (16/20 tasks) 41 | Velocity Trend: ↗️ +15% this week 42 | Blocked Tasks: 🔴 3 critical path items 43 | 44 | Priority Distribution: 45 | High: ████████ 8 tasks (2 blocked) 46 | Medium: ████░░░░ 4 tasks 47 | Low: ██░░░░░░ 2 tasks 48 | ``` 49 | 50 | ### 5. **Actionable Recommendations** 51 | 52 | Based on analysis: 53 | 1. **Immediate actions** (unblock critical path) 54 | 2. **Today's focus** (optimal task sequence) 55 | 3. **Process improvements** (recurring patterns) 56 | 4. **Resource needs** (skills, time, dependencies) 57 | 58 | ### 6. **Historical Context** 59 | 60 | Compare to previous periods: 61 | - Velocity changes 62 | - Pattern recognition 63 | - Improvement areas 64 | - Success patterns to repeat ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/status/project-status.md: -------------------------------------------------------------------------------- ```markdown 1 | Enhanced status command with comprehensive project insights. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | ## Intelligent Status Overview 6 | 7 | ### 1. **Executive Summary** 8 | Quick dashboard view: 9 | - 🏃 Active work (in-progress tasks) 10 | - 📊 Progress metrics (% complete, velocity) 11 | - 🚧 Blockers and risks 12 | - ⏱️ Time analysis (estimated vs actual) 13 | - 🎯 Sprint/milestone progress 14 | 15 | ### 2. **Contextual Analysis** 16 | 17 | Based on $ARGUMENTS, focus on: 18 | - "sprint" → Current sprint progress and burndown 19 | - "blocked" → Dependency chains and resolution paths 20 | - "team" → Task distribution and workload 21 | - "timeline" → Schedule adherence and projections 22 | - "risk" → High complexity or overdue items 23 | 24 | ### 3. **Smart Insights** 25 | 26 | **Workflow Health:** 27 | - Idle tasks (in-progress > 24h without updates) 28 | - Bottlenecks (multiple tasks waiting on same dependency) 29 | - Quick wins (low complexity, high impact) 30 | 31 | **Predictive Analytics:** 32 | - Completion projections based on velocity 33 | - Risk of missing deadlines 34 | - Recommended task order for optimal flow 35 | 36 | ### 4. **Visual Intelligence** 37 | 38 | Dynamic visualization based on data: 39 | ``` 40 | Sprint Progress: ████████░░ 80% (16/20 tasks) 41 | Velocity Trend: ↗️ +15% this week 42 | Blocked Tasks: 🔴 3 critical path items 43 | 44 | Priority Distribution: 45 | High: ████████ 8 tasks (2 blocked) 46 | Medium: ████░░░░ 4 tasks 47 | Low: ██░░░░░░ 2 tasks 48 | ``` 49 | 50 | ### 5. **Actionable Recommendations** 51 | 52 | Based on analysis: 53 | 1. **Immediate actions** (unblock critical path) 54 | 2. **Today's focus** (optimal task sequence) 55 | 3. **Process improvements** (recurring patterns) 56 | 4. **Resource needs** (skills, time, dependencies) 57 | 58 | ### 6. **Historical Context** 59 | 60 | Compare to previous periods: 61 | - Velocity changes 62 | - Pattern recognition 63 | - Improvement areas 64 | - Success patterns to repeat ``` -------------------------------------------------------------------------------- /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 | ``` -------------------------------------------------------------------------------- /.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 | ``` -------------------------------------------------------------------------------- /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 | ``` -------------------------------------------------------------------------------- /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 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/add-subtask/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 | /project:tm/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 | /project:tm/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 ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/add-subtask/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 | /project:tm/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 | /project:tm/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 ``` -------------------------------------------------------------------------------- /.claude/commands/tm/remove-subtasks/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 | /project:tm/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 | ``` ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/clear-subtasks/clear-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 | /project:tm/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 | ``` ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/remove-subtasks/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 | /project:tm/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 | ``` ``` -------------------------------------------------------------------------------- /.claude/commands/tm/remove-subtask/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 | /project:tm/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 | /project:tm/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 ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/remove-subtask/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 | /project:tm/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 | /project:tm/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 ``` -------------------------------------------------------------------------------- /.claude/commands/tm/next/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. ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/next/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. ``` -------------------------------------------------------------------------------- /.claude/commands/tm/fix-dependencies/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 '/project:tm/validate-dependencies' to verify fixes 74 | ``` 75 | 76 | ## Safety 77 | 78 | - Preview mode available 79 | - Rollback capability 80 | - Change logging 81 | - No data loss ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/fix-dependencies/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 '/project:tm/validate-dependencies' to verify fixes 74 | ``` 75 | 76 | ## Safety 77 | 78 | - Preview mode available 79 | - Rollback capability 80 | - Change logging 81 | - No data loss ``` -------------------------------------------------------------------------------- /src/ai-providers/custom-sdk/grok-cli/types.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * @fileoverview Type definitions for Grok CLI provider 3 | */ 4 | 5 | /** 6 | * @typedef {Object} GrokCliSettings 7 | * @property {string} [apiKey] - API key for Grok CLI 8 | * @property {string} [baseURL] - Base URL for Grok API 9 | * @property {string} [model] - Default model to use 10 | * @property {number} [timeout] - Timeout in milliseconds 11 | * @property {string} [workingDirectory] - Working directory for CLI commands 12 | */ 13 | 14 | /** 15 | * @typedef {string} GrokCliModelId 16 | * Model identifiers supported by Grok CLI 17 | */ 18 | 19 | /** 20 | * @typedef {Object} GrokCliErrorMetadata 21 | * @property {string} [code] - Error code 22 | * @property {number} [exitCode] - Process exit code 23 | * @property {string} [stderr] - Standard error output 24 | * @property {string} [stdout] - Standard output 25 | * @property {string} [promptExcerpt] - Excerpt of the prompt that caused the error 26 | * @property {number} [timeoutMs] - Timeout value in milliseconds 27 | */ 28 | 29 | /** 30 | * @typedef {Function} GrokCliProvider 31 | * @property {Function} languageModel - Create a language model 32 | * @property {Function} chat - Alias for languageModel 33 | * @property {Function} textEmbeddingModel - Text embedding model (throws error) 34 | */ 35 | 36 | /** 37 | * @typedef {Object} GrokCliProviderSettings 38 | * @property {GrokCliSettings} [defaultSettings] - Default settings for all models 39 | */ 40 | 41 | /** 42 | * @typedef {Object} GrokCliMessage 43 | * @property {string} role - Message role (user, assistant, system) 44 | * @property {string} content - Message content 45 | */ 46 | 47 | /** 48 | * @typedef {Object} GrokCliResponse 49 | * @property {string} content - Response content 50 | * @property {Object} [usage] - Token usage information 51 | * @property {number} [usage.prompt_tokens] - Input tokens used 52 | * @property {number} [usage.completion_tokens] - Output tokens used 53 | * @property {number} [usage.total_tokens] - Total tokens used 54 | */ 55 | 56 | export {}; 57 | ``` -------------------------------------------------------------------------------- /packages/tm-core/src/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 | ``` -------------------------------------------------------------------------------- /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 API key is missing or initialization fails 30 | */ 31 | getClient(params) { 32 | try { 33 | const { apiKey, baseURL } = params; 34 | 35 | if (!apiKey) { 36 | throw new Error('Perplexity API key is required.'); 37 | } 38 | 39 | return createPerplexity({ 40 | apiKey, 41 | baseURL: baseURL || 'https://api.perplexity.ai' 42 | }); 43 | } catch (error) { 44 | this.handleError('client initialization', error); 45 | } 46 | } 47 | 48 | /** 49 | * Override generateObject to use JSON mode for Perplexity 50 | * 51 | * NOTE: Perplexity models (especially sonar models) have known issues 52 | * generating valid JSON, particularly with array fields. They often 53 | * generate malformed JSON like "dependencies": , instead of "dependencies": [] 54 | * 55 | * The base provider now handles JSON repair automatically for all providers. 56 | */ 57 | async generateObject(params) { 58 | // Force JSON mode for Perplexity as it may help with reliability 59 | return super.generateObject({ 60 | ...params, 61 | mode: 'json' 62 | }); 63 | } 64 | } 65 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/add-task/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. ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/add-task/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. ``` -------------------------------------------------------------------------------- /.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/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/faq", 36 | "getting-started/contribute" 37 | ] 38 | }, 39 | { 40 | "group": "Best Practices", 41 | "pages": [ 42 | "best-practices/index", 43 | "best-practices/configuration-advanced", 44 | "best-practices/advanced-tasks" 45 | ] 46 | }, 47 | { 48 | "group": "Technical Capabilities", 49 | "pages": [ 50 | "capabilities/mcp", 51 | "capabilities/cli-root-commands", 52 | "capabilities/task-structure" 53 | ] 54 | } 55 | ] 56 | } 57 | ], 58 | "global": { 59 | "anchors": [ 60 | { 61 | "anchor": "Github", 62 | "href": "https://github.com/eyaltoledano/claude-task-master", 63 | "icon": "github" 64 | }, 65 | { 66 | "anchor": "Discord", 67 | "href": "https://discord.gg/fWJkU7rf", 68 | "icon": "discord" 69 | } 70 | ] 71 | } 72 | }, 73 | "logo": { 74 | "light": "/logo/task-master-logo.png", 75 | "dark": "/logo/task-master-logo.png" 76 | }, 77 | "footer": { 78 | "socials": { 79 | "x": "https://x.com/TaskmasterAI", 80 | "github": "https://github.com/eyaltoledano/claude-task-master" 81 | } 82 | } 83 | } 84 | ``` -------------------------------------------------------------------------------- /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/ai-providers/custom-sdk/grok-cli/json-extractor.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * @fileoverview Extract JSON from Grok's response, handling markdown blocks and other formatting 3 | */ 4 | 5 | /** 6 | * Extract JSON from Grok's response 7 | * @param {string} text - The text to extract JSON from 8 | * @returns {string} - The extracted JSON string 9 | */ 10 | export function extractJson(text) { 11 | // Remove markdown code blocks if present 12 | let jsonText = text.trim(); 13 | 14 | // Remove ```json blocks 15 | jsonText = jsonText.replace(/^```json\s*/gm, ''); 16 | jsonText = jsonText.replace(/^```\s*/gm, ''); 17 | jsonText = jsonText.replace(/```\s*$/gm, ''); 18 | 19 | // Remove common TypeScript/JavaScript patterns 20 | jsonText = jsonText.replace(/^const\s+\w+\s*=\s*/, ''); // Remove "const varName = " 21 | jsonText = jsonText.replace(/^let\s+\w+\s*=\s*/, ''); // Remove "let varName = " 22 | jsonText = jsonText.replace(/^var\s+\w+\s*=\s*/, ''); // Remove "var varName = " 23 | jsonText = jsonText.replace(/;?\s*$/, ''); // Remove trailing semicolons 24 | 25 | // Try to extract JSON object or array 26 | const objectMatch = jsonText.match(/{[\s\S]*}/); 27 | const arrayMatch = jsonText.match(/\[[\s\S]*\]/); 28 | 29 | if (objectMatch) { 30 | jsonText = objectMatch[0]; 31 | } else if (arrayMatch) { 32 | jsonText = arrayMatch[0]; 33 | } 34 | 35 | // First try to parse as valid JSON 36 | try { 37 | JSON.parse(jsonText); 38 | return jsonText; 39 | } catch { 40 | // If it's not valid JSON, it might be a JavaScript object literal 41 | // Try to convert it to valid JSON 42 | try { 43 | // This is a simple conversion that handles basic cases 44 | // Replace unquoted keys with quoted keys 45 | const converted = jsonText 46 | .replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g, '$1"$2":') 47 | // Replace single quotes with double quotes 48 | .replace(/'/g, '"'); 49 | 50 | // Validate the converted JSON 51 | JSON.parse(converted); 52 | return converted; 53 | } catch { 54 | // If all else fails, return the original text 55 | // The AI SDK will handle the error appropriately 56 | return text; 57 | } 58 | } 59 | } 60 | ``` -------------------------------------------------------------------------------- /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 | ``` -------------------------------------------------------------------------------- /src/ai-providers/custom-sdk/claude-code/json-extractor.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * @fileoverview Extract JSON from Claude's response, handling markdown blocks and other formatting 3 | */ 4 | 5 | /** 6 | * Extract JSON from Claude's response 7 | * @param {string} text - The text to extract JSON from 8 | * @returns {string} - The extracted JSON string 9 | */ 10 | export function extractJson(text) { 11 | // Remove markdown code blocks if present 12 | let jsonText = text.trim(); 13 | 14 | // Remove ```json blocks 15 | jsonText = jsonText.replace(/^```json\s*/gm, ''); 16 | jsonText = jsonText.replace(/^```\s*/gm, ''); 17 | jsonText = jsonText.replace(/```\s*$/gm, ''); 18 | 19 | // Remove common TypeScript/JavaScript patterns 20 | jsonText = jsonText.replace(/^const\s+\w+\s*=\s*/, ''); // Remove "const varName = " 21 | jsonText = jsonText.replace(/^let\s+\w+\s*=\s*/, ''); // Remove "let varName = " 22 | jsonText = jsonText.replace(/^var\s+\w+\s*=\s*/, ''); // Remove "var varName = " 23 | jsonText = jsonText.replace(/;?\s*$/, ''); // Remove trailing semicolons 24 | 25 | // Try to extract JSON object or array 26 | const objectMatch = jsonText.match(/{[\s\S]*}/); 27 | const arrayMatch = jsonText.match(/\[[\s\S]*\]/); 28 | 29 | if (objectMatch) { 30 | jsonText = objectMatch[0]; 31 | } else if (arrayMatch) { 32 | jsonText = arrayMatch[0]; 33 | } 34 | 35 | // First try to parse as valid JSON 36 | try { 37 | JSON.parse(jsonText); 38 | return jsonText; 39 | } catch { 40 | // If it's not valid JSON, it might be a JavaScript object literal 41 | // Try to convert it to valid JSON 42 | try { 43 | // This is a simple conversion that handles basic cases 44 | // Replace unquoted keys with quoted keys 45 | const converted = jsonText 46 | .replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g, '$1"$2":') 47 | // Replace single quotes with double quotes 48 | .replace(/'/g, '"'); 49 | 50 | // Validate the converted JSON 51 | JSON.parse(converted); 52 | return converted; 53 | } catch { 54 | // If all else fails, return the original text 55 | // The AI SDK will handle the error appropriately 56 | return text; 57 | } 58 | } 59 | } 60 | ``` -------------------------------------------------------------------------------- /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](/docs/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 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/update/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. ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/update/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 API key is missing or initialization fails 41 | */ 42 | getClient(params) { 43 | try { 44 | const { apiKey, baseURL } = params; 45 | 46 | if (!apiKey) { 47 | throw new Error('Anthropic API key is required.'); 48 | } 49 | 50 | return createAnthropic({ 51 | apiKey, 52 | ...(baseURL && { baseURL }), 53 | headers: { 54 | 'anthropic-beta': 'output-128k-2025-02-19' 55 | } 56 | }); 57 | } catch (error) { 58 | this.handleError('client initialization', error); 59 | } 60 | } 61 | } 62 | 63 | // TODO: Implement streamAnthropicObject if needed and supported well by the SDK for Anthropic. 64 | // The basic structure would be similar to generateAnthropicObject but using streamObject. 65 | ```