This is page 3 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 -------------------------------------------------------------------------------- /.claude/commands/tm/set-status/to-in-progress.md: -------------------------------------------------------------------------------- ```markdown 1 | Start working on a task by setting its status to in-progress. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Starting Work on Task 6 | 7 | This command does more than just change status - it prepares your environment for productive work. 8 | 9 | ## Pre-Start Checks 10 | 11 | 1. Verify dependencies are met 12 | 2. Check if another task is already in-progress 13 | 3. Ensure task details are complete 14 | 4. Validate test strategy exists 15 | 16 | ## Execution 17 | 18 | ```bash 19 | task-master set-status --id=$ARGUMENTS --status=in-progress 20 | ``` 21 | 22 | ## Environment Setup 23 | 24 | After setting to in-progress: 25 | 1. Create/checkout appropriate git branch 26 | 2. Open relevant documentation 27 | 3. Set up test watchers if applicable 28 | 4. Display task details and acceptance criteria 29 | 5. Show similar completed tasks for reference 30 | 31 | ## Smart Suggestions 32 | 33 | - Estimated completion time based on complexity 34 | - Related files from similar tasks 35 | - Potential blockers to watch for 36 | - Recommended first steps ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/set-status/to-in-progress.md: -------------------------------------------------------------------------------- ```markdown 1 | Start working on a task by setting its status to in-progress. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Starting Work on Task 6 | 7 | This command does more than just change status - it prepares your environment for productive work. 8 | 9 | ## Pre-Start Checks 10 | 11 | 1. Verify dependencies are met 12 | 2. Check if another task is already in-progress 13 | 3. Ensure task details are complete 14 | 4. Validate test strategy exists 15 | 16 | ## Execution 17 | 18 | ```bash 19 | task-master set-status --id=$ARGUMENTS --status=in-progress 20 | ``` 21 | 22 | ## Environment Setup 23 | 24 | After setting to in-progress: 25 | 1. Create/checkout appropriate git branch 26 | 2. Open relevant documentation 27 | 3. Set up test watchers if applicable 28 | 4. Display task details and acceptance criteria 29 | 5. Show similar completed tasks for reference 30 | 31 | ## Smart Suggestions 32 | 33 | - Estimated completion time based on complexity 34 | - Related files from similar tasks 35 | - Potential blockers to watch for 36 | - Recommended first steps ``` -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "extends": ["//"], 4 | "tasks": { 5 | "build": { 6 | "dependsOn": ["^build"], 7 | "outputs": ["dist/**"], 8 | "outputLogs": "new-only" 9 | }, 10 | "dev": { 11 | "cache": false, 12 | "persistent": true, 13 | "inputs": [ 14 | "$TURBO_DEFAULT$", 15 | "!{packages,apps}/**/dist/**", 16 | "!{packages,apps}/**/node_modules/**" 17 | ] 18 | }, 19 | "test:watch": { 20 | "cache": false, 21 | "persistent": true, 22 | "dependsOn": ["^build"] 23 | }, 24 | "lint": { 25 | "dependsOn": ["^build"], 26 | "inputs": [ 27 | "$TURBO_DEFAULT$", 28 | "!{packages,apps}/**/dist/**", 29 | "!{packages,apps}/**/node_modules/**" 30 | ], 31 | "outputLogs": "new-only" 32 | }, 33 | "typecheck": { 34 | "dependsOn": ["^build"], 35 | "inputs": [ 36 | "$TURBO_DEFAULT$", 37 | "!{packages,apps}/**/dist/**", 38 | "!{packages,apps}/**/node_modules/**" 39 | ], 40 | "outputLogs": "new-only" 41 | } 42 | }, 43 | "globalDependencies": ["turbo.json", "tsconfig.json", ".env*"] 44 | } 45 | ``` -------------------------------------------------------------------------------- /mcp-server/src/core/direct-functions/response-language.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * response-language.js 3 | * Direct function for managing response language via MCP 4 | */ 5 | 6 | import { setResponseLanguage } from '../../../../scripts/modules/task-manager.js'; 7 | import { 8 | enableSilentMode, 9 | disableSilentMode 10 | } from '../../../../scripts/modules/utils.js'; 11 | import { createLogWrapper } from '../../tools/utils.js'; 12 | 13 | export async function responseLanguageDirect(args, log, context = {}) { 14 | const { projectRoot, language } = args; 15 | const mcpLog = createLogWrapper(log); 16 | 17 | log.info( 18 | `Executing response-language_direct with args: ${JSON.stringify(args)}` 19 | ); 20 | log.info(`Using project root: ${projectRoot}`); 21 | 22 | try { 23 | enableSilentMode(); 24 | return setResponseLanguage(language, { 25 | mcpLog, 26 | projectRoot 27 | }); 28 | } catch (error) { 29 | return { 30 | success: false, 31 | error: { 32 | code: 'DIRECT_FUNCTION_ERROR', 33 | message: error.message, 34 | details: error.stack 35 | } 36 | }; 37 | } finally { 38 | disableSilentMode(); 39 | } 40 | } 41 | ``` -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/integration.md: -------------------------------------------------------------------------------- ```markdown 1 | # 🔌 New Integration 2 | 3 | ## What tool/IDE is being integrated? 4 | 5 | <!-- Name and brief description --> 6 | 7 | ## What can users do with it? 8 | 9 | <!-- Key benefits --> 10 | 11 | ## How to Enable 12 | 13 | ### Setup 14 | 15 | ```bash 16 | task-master rules add [name] 17 | # Any other setup steps 18 | ``` 19 | 20 | ### Example Usage 21 | 22 | <!-- Show it in action --> 23 | 24 | ```bash 25 | # Real example 26 | ``` 27 | 28 | ### Natural Language Hooks (if applicable) 29 | 30 | ``` 31 | "When tests pass, mark task as done" 32 | # Other examples 33 | ``` 34 | 35 | ## Contributor Checklist 36 | 37 | - [ ] Created changeset: `npm run changeset` 38 | - [ ] Tests pass: `npm test` 39 | - [ ] Format check passes: `npm run format-check` 40 | - [ ] Addressed CodeRabbit comments 41 | - [ ] Integration fully tested with target tool/IDE 42 | - [ ] Error scenarios tested 43 | - [ ] Added integration tests 44 | - [ ] Documentation includes setup guide 45 | - [ ] Examples are working and clear 46 | 47 | --- 48 | 49 | ## For Maintainers 50 | 51 | - [ ] Integration stability verified 52 | - [ ] Documentation comprehensive 53 | - [ ] Examples working 54 | ``` -------------------------------------------------------------------------------- /scripts/task-complexity-report.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "meta": { 3 | "generatedAt": "2025-06-14T02:15:51.082Z", 4 | "tasksAnalyzed": 2, 5 | "totalTasks": 3, 6 | "analysisCount": 5, 7 | "thresholdScore": 5, 8 | "projectName": "Test Project", 9 | "usedResearch": false 10 | }, 11 | "complexityAnalysis": [ 12 | { 13 | "id": 1, 14 | "complexity": 3, 15 | "subtaskCount": 2 16 | }, 17 | { 18 | "id": 2, 19 | "complexity": 7, 20 | "subtaskCount": 5 21 | }, 22 | { 23 | "id": 3, 24 | "complexity": 9, 25 | "subtaskCount": 8 26 | }, 27 | { 28 | "taskId": 1, 29 | "taskTitle": "Task 1", 30 | "complexityScore": 5, 31 | "recommendedSubtasks": 3, 32 | "expansionPrompt": "Break down this task with a focus on task 1.", 33 | "reasoning": "Automatically added due to missing analysis in AI response." 34 | }, 35 | { 36 | "taskId": 2, 37 | "taskTitle": "Task 2", 38 | "complexityScore": 5, 39 | "recommendedSubtasks": 3, 40 | "expansionPrompt": "Break down this task with a focus on task 2.", 41 | "reasoning": "Automatically added due to missing analysis in AI response." 42 | } 43 | ] 44 | } 45 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/set-status/to-done.md: -------------------------------------------------------------------------------- ```markdown 1 | Mark a task as completed. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Completing a Task 6 | 7 | This command validates task completion and updates project state intelligently. 8 | 9 | ## Pre-Completion Checks 10 | 11 | 1. Verify test strategy was followed 12 | 2. Check if all subtasks are complete 13 | 3. Validate acceptance criteria met 14 | 4. Ensure code is committed 15 | 16 | ## Execution 17 | 18 | ```bash 19 | task-master set-status --id=$ARGUMENTS --status=done 20 | ``` 21 | 22 | ## Post-Completion Actions 23 | 24 | 1. **Update Dependencies** 25 | - Identify newly unblocked tasks 26 | - Update sprint progress 27 | - Recalculate project timeline 28 | 29 | 2. **Documentation** 30 | - Generate completion summary 31 | - Update CLAUDE.md with learnings 32 | - Log implementation approach 33 | 34 | 3. **Next Steps** 35 | - Show newly available tasks 36 | - Suggest logical next task 37 | - Update velocity metrics 38 | 39 | ## Celebration & Learning 40 | 41 | - Show impact of completion 42 | - Display unblocked work 43 | - Recognize achievement 44 | - Capture lessons learned ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/set-status/to-done.md: -------------------------------------------------------------------------------- ```markdown 1 | Mark a task as completed. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Completing a Task 6 | 7 | This command validates task completion and updates project state intelligently. 8 | 9 | ## Pre-Completion Checks 10 | 11 | 1. Verify test strategy was followed 12 | 2. Check if all subtasks are complete 13 | 3. Validate acceptance criteria met 14 | 4. Ensure code is committed 15 | 16 | ## Execution 17 | 18 | ```bash 19 | task-master set-status --id=$ARGUMENTS --status=done 20 | ``` 21 | 22 | ## Post-Completion Actions 23 | 24 | 1. **Update Dependencies** 25 | - Identify newly unblocked tasks 26 | - Update sprint progress 27 | - Recalculate project timeline 28 | 29 | 2. **Documentation** 30 | - Generate completion summary 31 | - Update CLAUDE.md with learnings 32 | - Log implementation approach 33 | 34 | 3. **Next Steps** 35 | - Show newly available tasks 36 | - Suggest logical next task 37 | - Update velocity metrics 38 | 39 | ## Celebration & Learning 40 | 41 | - Show impact of completion 42 | - Display unblocked work 43 | - Recognize achievement 44 | - Capture lessons learned ``` -------------------------------------------------------------------------------- /apps/docs/logo/dark.svg: -------------------------------------------------------------------------------- ``` 1 | <svg width="800" height="240" viewBox="0 0 800 240" xmlns="http://www.w3.org/2000/svg"> 2 | <!-- Background --> 3 | <rect width="800" height="240" fill="transparent"/> 4 | 5 | <!-- Curly braces --> 6 | <text x="40" y="156" font-size="140" fill="white" font-family="monospace">{</text> 7 | <text x="230" y="156" font-size="140" fill="white" font-family="monospace">}</text> 8 | 9 | <!-- Blue form with check --> 10 | <rect x="120" y="50" width="120" height="140" rx="16" fill="#3366CC"/> 11 | <polyline points="150,110 164,128 190,84" fill="none" stroke="white" stroke-width="10"/> 12 | <circle cx="150" cy="144" r="7" fill="white"/> 13 | <rect x="168" y="140" width="48" height="10" fill="white"/> 14 | <circle cx="150" cy="168" r="7" fill="white"/> 15 | <rect x="168" y="164" width="48" height="10" fill="white"/> 16 | 17 | <!-- Text --> 18 | <text x="340" y="156" font-family="Arial, sans-serif" font-size="76" font-weight="bold" fill="white">Task Master</text> 19 | </svg> 20 | ``` -------------------------------------------------------------------------------- /apps/extension/src/webview/components/AppContent.tsx: -------------------------------------------------------------------------------- ```typescript 1 | import React from 'react'; 2 | import { TaskMasterKanban } from './TaskMasterKanban'; 3 | import TaskDetailsView from '@/components/TaskDetailsView'; 4 | import { ConfigView } from '@/components/ConfigView'; 5 | import { useVSCodeContext } from '../contexts/VSCodeContext'; 6 | 7 | export const AppContent: React.FC = () => { 8 | const { state, dispatch, sendMessage } = useVSCodeContext(); 9 | 10 | if (state.currentView === 'config') { 11 | return ( 12 | <ConfigView 13 | sendMessage={sendMessage} 14 | onNavigateBack={() => dispatch({ type: 'NAVIGATE_TO_KANBAN' })} 15 | /> 16 | ); 17 | } 18 | 19 | if (state.currentView === 'task-details' && state.selectedTaskId) { 20 | return ( 21 | <TaskDetailsView 22 | taskId={state.selectedTaskId} 23 | onNavigateBack={() => dispatch({ type: 'NAVIGATE_TO_KANBAN' })} 24 | onNavigateToTask={(taskId: string) => 25 | dispatch({ type: 'NAVIGATE_TO_TASK', payload: taskId }) 26 | } 27 | /> 28 | ); 29 | } 30 | 31 | // Default to Kanban view 32 | return <TaskMasterKanban />; 33 | }; 34 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/set-status/to-review.md: -------------------------------------------------------------------------------- ```markdown 1 | Set a task's status to review. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Marking Task for Review 6 | 7 | This status indicates work is complete but needs verification before final approval. 8 | 9 | ## When to Use Review Status 10 | 11 | - Code complete but needs peer review 12 | - Implementation done but needs testing 13 | - Documentation written but needs proofreading 14 | - Design complete but needs stakeholder approval 15 | 16 | ## Execution 17 | 18 | ```bash 19 | task-master set-status --id=$ARGUMENTS --status=review 20 | ``` 21 | 22 | ## Review Preparation 23 | 24 | When setting to review: 25 | 1. **Generate Review Checklist** 26 | - Link to PR/MR if applicable 27 | - Highlight key changes 28 | - Note areas needing attention 29 | - Include test results 30 | 31 | 2. **Documentation** 32 | - Update task with review notes 33 | - Link relevant artifacts 34 | - Specify reviewers if known 35 | 36 | 3. **Smart Actions** 37 | - Create review reminders 38 | - Track review duration 39 | - Suggest reviewers based on expertise 40 | - Prepare rollback plan if needed ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/set-status/to-review.md: -------------------------------------------------------------------------------- ```markdown 1 | Set a task's status to review. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Marking Task for Review 6 | 7 | This status indicates work is complete but needs verification before final approval. 8 | 9 | ## When to Use Review Status 10 | 11 | - Code complete but needs peer review 12 | - Implementation done but needs testing 13 | - Documentation written but needs proofreading 14 | - Design complete but needs stakeholder approval 15 | 16 | ## Execution 17 | 18 | ```bash 19 | task-master set-status --id=$ARGUMENTS --status=review 20 | ``` 21 | 22 | ## Review Preparation 23 | 24 | When setting to review: 25 | 1. **Generate Review Checklist** 26 | - Link to PR/MR if applicable 27 | - Highlight key changes 28 | - Note areas needing attention 29 | - Include test results 30 | 31 | 2. **Documentation** 32 | - Update task with review notes 33 | - Link relevant artifacts 34 | - Specify reviewers if known 35 | 36 | 3. **Smart Actions** 37 | - Create review reminders 38 | - Track review duration 39 | - Suggest reviewers based on expertise 40 | - Prepare rollback plan if needed ``` -------------------------------------------------------------------------------- /apps/docs/logo/light.svg: -------------------------------------------------------------------------------- ``` 1 | <svg width="800" height="240" viewBox="0 0 800 240" xmlns="http://www.w3.org/2000/svg"> 2 | <!-- Background --> 3 | <rect width="800" height="240" fill="transparent"/> 4 | 5 | <!-- Curly braces --> 6 | <text x="40" y="156" font-size="140" fill="#000000" font-family="monospace">{</text> 7 | <text x="230" y="156" font-size="140" fill="#000000" font-family="monospace">}</text> 8 | 9 | <!-- Blue form with check --> 10 | <rect x="120" y="50" width="120" height="140" rx="16" fill="#3366CC"/> 11 | <polyline points="150,110 164,128 190,84" fill="none" stroke="#FFFFFF" stroke-width="10"/> 12 | <circle cx="150" cy="144" r="7" fill="#FFFFFF"/> 13 | <rect x="168" y="140" width="48" height="10" fill="#FFFFFF"/> 14 | <circle cx="150" cy="168" r="7" fill="#FFFFFF"/> 15 | <rect x="168" y="164" width="48" height="10" fill="#FFFFFF"/> 16 | 17 | <!-- Text --> 18 | <text x="340" y="156" font-family="Arial, sans-serif" font-size="76" font-weight="bold" fill="#000000">Task Master</text> 19 | </svg> 20 | ``` -------------------------------------------------------------------------------- /apps/cli/tsconfig.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "module": "NodeNext", 5 | "lib": ["ES2022"], 6 | "declaration": true, 7 | "declarationMap": true, 8 | "sourceMap": true, 9 | "outDir": "./dist", 10 | "baseUrl": ".", 11 | "rootDir": "./src", 12 | "strict": true, 13 | "noImplicitAny": true, 14 | "strictNullChecks": true, 15 | "strictFunctionTypes": true, 16 | "strictBindCallApply": true, 17 | "strictPropertyInitialization": true, 18 | "noImplicitThis": true, 19 | "alwaysStrict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "noImplicitReturns": true, 23 | "noFallthroughCasesInSwitch": true, 24 | "esModuleInterop": true, 25 | "skipLibCheck": true, 26 | "forceConsistentCasingInFileNames": true, 27 | "moduleResolution": "NodeNext", 28 | "moduleDetection": "force", 29 | "types": ["node"], 30 | "resolveJsonModule": true, 31 | "isolatedModules": true, 32 | "allowImportingTsExtensions": false 33 | }, 34 | "include": ["src/**/*"], 35 | "exclude": ["node_modules", "dist", "tests", "**/*.test.ts", "**/*.spec.ts"] 36 | } 37 | ``` -------------------------------------------------------------------------------- /packages/tm-core/tsconfig.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "module": "NodeNext", 5 | "lib": ["ES2022"], 6 | "declaration": true, 7 | "declarationMap": true, 8 | "sourceMap": true, 9 | "outDir": "./dist", 10 | "baseUrl": ".", 11 | "rootDir": "./src", 12 | "strict": true, 13 | "noImplicitAny": true, 14 | "strictNullChecks": true, 15 | "strictFunctionTypes": true, 16 | "strictBindCallApply": true, 17 | "strictPropertyInitialization": true, 18 | "noImplicitThis": true, 19 | "alwaysStrict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "noImplicitReturns": true, 23 | "noFallthroughCasesInSwitch": true, 24 | "esModuleInterop": true, 25 | "skipLibCheck": true, 26 | "forceConsistentCasingInFileNames": true, 27 | "moduleResolution": "NodeNext", 28 | "moduleDetection": "force", 29 | "types": ["node"], 30 | "resolveJsonModule": true, 31 | "isolatedModules": true, 32 | "allowImportingTsExtensions": false 33 | }, 34 | "include": ["src/**/*"], 35 | "exclude": ["node_modules", "dist", "tests", "**/*.test.ts", "**/*.spec.ts"] 36 | } 37 | ``` -------------------------------------------------------------------------------- /apps/cli/src/ui/components/header.component.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * @fileoverview Task Master header component 3 | * Displays the banner, version, project info, and file path 4 | */ 5 | 6 | import chalk from 'chalk'; 7 | 8 | /** 9 | * Header configuration options 10 | */ 11 | export interface HeaderOptions { 12 | title?: string; 13 | tag?: string; 14 | filePath?: string; 15 | } 16 | 17 | /** 18 | * Display the Task Master header with project info 19 | */ 20 | export function displayHeader(options: HeaderOptions = {}): void { 21 | const { filePath, tag } = options; 22 | 23 | // Display tag and file path info 24 | if (tag) { 25 | let tagInfo = ''; 26 | 27 | if (tag && tag !== 'master') { 28 | tagInfo = `🏷 tag: ${chalk.cyan(tag)}`; 29 | } else { 30 | tagInfo = `🏷 tag: ${chalk.cyan('master')}`; 31 | } 32 | 33 | console.log(tagInfo); 34 | 35 | if (filePath) { 36 | // Convert to absolute path if it's relative 37 | const absolutePath = filePath.startsWith('/') 38 | ? filePath 39 | : `${process.cwd()}/${filePath}`; 40 | console.log(`Listing tasks from: ${chalk.dim(absolutePath)}`); 41 | } 42 | 43 | console.log(); // Empty line for spacing 44 | } 45 | } 46 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/list/list-tasks-by-status.md: -------------------------------------------------------------------------------- ```markdown 1 | List tasks filtered by a specific status. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse the status from arguments and list only tasks matching that status. 6 | 7 | ## Status Options 8 | - `pending` - Not yet started 9 | - `in-progress` - Currently being worked on 10 | - `done` - Completed 11 | - `review` - Awaiting review 12 | - `deferred` - Postponed 13 | - `cancelled` - Cancelled 14 | 15 | ## Execution 16 | 17 | Based on $ARGUMENTS, run: 18 | ```bash 19 | task-master list --status=$ARGUMENTS 20 | ``` 21 | 22 | ## Enhanced Display 23 | 24 | For the filtered results: 25 | - Group by priority within the status 26 | - Show time in current status 27 | - Highlight tasks approaching deadlines 28 | - Display blockers and dependencies 29 | - Suggest next actions for each status group 30 | 31 | ## Intelligent Insights 32 | 33 | Based on the status filter: 34 | - **Pending**: Show recommended start order 35 | - **In-Progress**: Display idle time warnings 36 | - **Done**: Show newly unblocked tasks 37 | - **Review**: Indicate review duration 38 | - **Deferred**: Show reactivation criteria 39 | - **Cancelled**: Display impact analysis ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/list/list-tasks-by-status.md: -------------------------------------------------------------------------------- ```markdown 1 | List tasks filtered by a specific status. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse the status from arguments and list only tasks matching that status. 6 | 7 | ## Status Options 8 | - `pending` - Not yet started 9 | - `in-progress` - Currently being worked on 10 | - `done` - Completed 11 | - `review` - Awaiting review 12 | - `deferred` - Postponed 13 | - `cancelled` - Cancelled 14 | 15 | ## Execution 16 | 17 | Based on $ARGUMENTS, run: 18 | ```bash 19 | task-master list --status=$ARGUMENTS 20 | ``` 21 | 22 | ## Enhanced Display 23 | 24 | For the filtered results: 25 | - Group by priority within the status 26 | - Show time in current status 27 | - Highlight tasks approaching deadlines 28 | - Display blockers and dependencies 29 | - Suggest next actions for each status group 30 | 31 | ## Intelligent Insights 32 | 33 | Based on the status filter: 34 | - **Pending**: Show recommended start order 35 | - **In-Progress**: Display idle time warnings 36 | - **Done**: Show newly unblocked tasks 37 | - **Review**: Indicate review duration 38 | - **Deferred**: Show reactivation criteria 39 | - **Cancelled**: Display impact analysis ``` -------------------------------------------------------------------------------- /apps/docs/introduction.mdx: -------------------------------------------------------------------------------- ```markdown 1 | <Tip> 2 | Welcome to v1 of the Task Master Docs. Expect weekly updates as we expand and refine each section. 3 | </Tip> 4 | 5 | We've organized the docs into three sections depending on your experience level and goals: 6 | 7 | ### Getting Started - Jump in to [Quick Start](/docs/getting-started/quick-start) 8 | Designed for first-time users. Get set up, create your first PRD, and run your first task. 9 | 10 | ### Best Practices 11 | Covers common workflows, strategic usage of commands, model configuration tips, and real-world usage patterns. Recommended for active users. 12 | 13 | ### Technical Capabilities 14 | A detailed glossary of every root command and available capability — meant for power users and contributors. 15 | 16 | --- 17 | 18 | Thanks for being here early. If you spot something broken or want to contribute, check out the [GitHub repo](https://github.com/eyaltoledano/claude-task-master). 19 | 20 | Have questions? Join our [Discord community](https://discord.gg/fWJkU7rf) to connect with other users and get help from the team. ``` -------------------------------------------------------------------------------- /.taskmaster/config.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "models": { 3 | "main": { 4 | "provider": "anthropic", 5 | "modelId": "claude-sonnet-4-20250514", 6 | "maxTokens": 64000, 7 | "temperature": 0.2 8 | }, 9 | "research": { 10 | "provider": "perplexity", 11 | "modelId": "sonar", 12 | "maxTokens": 8700, 13 | "temperature": 0.1 14 | }, 15 | "fallback": { 16 | "provider": "anthropic", 17 | "modelId": "claude-3-7-sonnet-20250219", 18 | "maxTokens": 120000, 19 | "temperature": 0.2 20 | } 21 | }, 22 | "global": { 23 | "logLevel": "info", 24 | "debug": false, 25 | "defaultNumTasks": 10, 26 | "defaultSubtasks": 5, 27 | "defaultPriority": "medium", 28 | "projectName": "Taskmaster", 29 | "ollamaBaseURL": "http://localhost:11434/api", 30 | "bedrockBaseURL": "https://bedrock.us-east-1.amazonaws.com", 31 | "responseLanguage": "English", 32 | "enableCodebaseAnalysis": true, 33 | "userId": "1234567890", 34 | "azureBaseURL": "https://your-endpoint.azure.com/", 35 | "defaultTag": "master" 36 | }, 37 | "claudeCode": {}, 38 | "grokCli": { 39 | "timeout": 120000, 40 | "workingDirectory": null, 41 | "defaultModel": "grok-4-latest" 42 | } 43 | } 44 | ``` -------------------------------------------------------------------------------- /.github/scripts/tag-extension.mjs: -------------------------------------------------------------------------------- ``` 1 | #!/usr/bin/env node 2 | import assert from 'node:assert/strict'; 3 | import { readFileSync } from 'node:fs'; 4 | import { join, dirname } from 'node:path'; 5 | import { fileURLToPath } from 'node:url'; 6 | import { findRootDir, createAndPushTag } from './utils.mjs'; 7 | 8 | const __filename = fileURLToPath(import.meta.url); 9 | const __dirname = dirname(__filename); 10 | 11 | const rootDir = findRootDir(__dirname); 12 | 13 | // Read the extension's package.json 14 | const extensionDir = join(rootDir, 'apps', 'extension'); 15 | const pkgPath = join(extensionDir, 'package.json'); 16 | 17 | let pkg; 18 | try { 19 | const pkgContent = readFileSync(pkgPath, 'utf8'); 20 | pkg = JSON.parse(pkgContent); 21 | } catch (error) { 22 | console.error('Failed to read package.json:', error.message); 23 | process.exit(1); 24 | } 25 | 26 | // Ensure we have required fields 27 | assert(pkg.name, 'package.json must have a name field'); 28 | assert(pkg.version, 'package.json must have a version field'); 29 | 30 | const tag = `${pkg.name}@${pkg.version}`; 31 | 32 | // Create and push the tag if it doesn't exist 33 | createAndPushTag(tag); 34 | ``` -------------------------------------------------------------------------------- /packages/tm-core/src/config/index.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * @fileoverview Configuration module exports 3 | * Exports the main ConfigManager and all configuration services 4 | */ 5 | 6 | // Export the main ConfigManager 7 | export { ConfigManager } from './config-manager.js'; 8 | 9 | // Export all configuration services for advanced usage 10 | export { 11 | ConfigLoader, 12 | ConfigMerger, 13 | CONFIG_PRECEDENCE, 14 | RuntimeStateManager, 15 | ConfigPersistence, 16 | EnvironmentConfigProvider, 17 | type ConfigSource, 18 | type RuntimeState, 19 | type PersistenceOptions 20 | } from './services/index.js'; 21 | 22 | // Re-export configuration interfaces 23 | export type { 24 | IConfiguration, 25 | PartialConfiguration, 26 | ModelConfig, 27 | ProviderConfig, 28 | TaskSettings, 29 | TagSettings, 30 | StorageSettings, 31 | RetrySettings, 32 | LoggingSettings, 33 | SecuritySettings, 34 | ConfigValidationResult, 35 | EnvironmentConfig, 36 | ConfigSchema, 37 | ConfigProperty, 38 | IConfigurationFactory, 39 | IConfigurationManager 40 | } from '../interfaces/configuration.interface.js'; 41 | 42 | // Re-export default values 43 | export { DEFAULT_CONFIG_VALUES } from '../interfaces/configuration.interface.js'; 44 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/expand/expand-all-tasks.md: -------------------------------------------------------------------------------- ```markdown 1 | Expand all pending tasks that need subtasks. 2 | 3 | ## Bulk Task Expansion 4 | 5 | Intelligently expands all tasks that would benefit from breakdown. 6 | 7 | ## Execution 8 | 9 | ```bash 10 | task-master expand --all 11 | ``` 12 | 13 | ## Smart Selection 14 | 15 | Only expands tasks that: 16 | - Are marked as pending 17 | - Have high complexity (>5) 18 | - Lack existing subtasks 19 | - Would benefit from breakdown 20 | 21 | ## Expansion Process 22 | 23 | 1. **Analysis Phase** 24 | - Identify expansion candidates 25 | - Group related tasks 26 | - Plan expansion strategy 27 | 28 | 2. **Batch Processing** 29 | - Expand tasks in logical order 30 | - Maintain consistency 31 | - Preserve relationships 32 | - Optimize for parallelism 33 | 34 | 3. **Quality Control** 35 | - Ensure subtask quality 36 | - Avoid over-decomposition 37 | - Maintain task coherence 38 | - Update dependencies 39 | 40 | ## Options 41 | 42 | - Add `force` to expand all regardless of complexity 43 | - Add `research` for enhanced AI analysis 44 | 45 | ## Results 46 | 47 | After bulk expansion: 48 | - Summary of tasks expanded 49 | - New subtask count 50 | - Updated complexity metrics 51 | - Suggested task order ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/expand/expand-all-tasks.md: -------------------------------------------------------------------------------- ```markdown 1 | Expand all pending tasks that need subtasks. 2 | 3 | ## Bulk Task Expansion 4 | 5 | Intelligently expands all tasks that would benefit from breakdown. 6 | 7 | ## Execution 8 | 9 | ```bash 10 | task-master expand --all 11 | ``` 12 | 13 | ## Smart Selection 14 | 15 | Only expands tasks that: 16 | - Are marked as pending 17 | - Have high complexity (>5) 18 | - Lack existing subtasks 19 | - Would benefit from breakdown 20 | 21 | ## Expansion Process 22 | 23 | 1. **Analysis Phase** 24 | - Identify expansion candidates 25 | - Group related tasks 26 | - Plan expansion strategy 27 | 28 | 2. **Batch Processing** 29 | - Expand tasks in logical order 30 | - Maintain consistency 31 | - Preserve relationships 32 | - Optimize for parallelism 33 | 34 | 3. **Quality Control** 35 | - Ensure subtask quality 36 | - Avoid over-decomposition 37 | - Maintain task coherence 38 | - Update dependencies 39 | 40 | ## Options 41 | 42 | - Add `force` to expand all regardless of complexity 43 | - Add `research` for enhanced AI analysis 44 | 45 | ## Results 46 | 47 | After bulk expansion: 48 | - Summary of tasks expanded 49 | - New subtask count 50 | - Updated complexity metrics 51 | - Suggested task order ``` -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/feature.md: -------------------------------------------------------------------------------- ```markdown 1 | ## ✨ New Feature 2 | 3 | ### 📋 Feature Description 4 | <!-- Brief description --> 5 | 6 | ### 🎯 Problem Statement 7 | <!-- What problem does this feature solve? Why is it needed? --> 8 | 9 | ### 💡 Solution 10 | <!-- How does this feature solve the problem? What's the approach? --> 11 | 12 | ### 🔗 Related Issues 13 | <!-- Link related issues: Fixes #123, Part of #456 --> 14 | 15 | ## How to Use It 16 | 17 | ### Quick Start 18 | ```bash 19 | # Basic usage example 20 | ``` 21 | 22 | ### Example 23 | <!-- Show a real use case --> 24 | ```bash 25 | # Practical example 26 | ``` 27 | 28 | **What you should see:** 29 | <!-- Expected behavior --> 30 | 31 | ## Contributor Checklist 32 | - [ ] Created changeset: `npm run changeset` 33 | - [ ] Tests pass: `npm test` 34 | - [ ] Format check passes: `npm run format-check` 35 | - [ ] Addressed CodeRabbit comments 36 | - [ ] Added tests for new functionality 37 | - [ ] Manually tested in CLI mode 38 | - [ ] Manually tested in MCP mode (if applicable) 39 | 40 | ## Changelog Entry 41 | <!-- One-liner for release notes --> 42 | 43 | --- 44 | 45 | ### For Maintainers 46 | 47 | - [ ] Feature aligns with project vision 48 | - [ ] CIs pass 49 | - [ ] Changeset file exists 50 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/set-status/to-deferred.md: -------------------------------------------------------------------------------- ```markdown 1 | Defer a task for later consideration. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Deferring a Task 6 | 7 | This status indicates a task is valid but not currently actionable or prioritized. 8 | 9 | ## Valid Reasons for Deferral 10 | 11 | - Waiting for external dependencies 12 | - Reprioritized for future sprint 13 | - Blocked by technical limitations 14 | - Resource constraints 15 | - Strategic timing considerations 16 | 17 | ## Execution 18 | 19 | ```bash 20 | task-master set-status --id=$ARGUMENTS --status=deferred 21 | ``` 22 | 23 | ## Deferral Management 24 | 25 | When deferring: 26 | 1. **Document Reason** 27 | - Capture why it's being deferred 28 | - Set reactivation criteria 29 | - Note any partial work completed 30 | 31 | 2. **Impact Analysis** 32 | - Check dependent tasks 33 | - Update project timeline 34 | - Notify affected stakeholders 35 | 36 | 3. **Future Planning** 37 | - Set review reminders 38 | - Tag for specific milestone 39 | - Preserve context for reactivation 40 | - Link to blocking issues 41 | 42 | ## Smart Tracking 43 | 44 | - Monitor deferral duration 45 | - Alert when criteria met 46 | - Prevent scope creep 47 | - Regular review cycles ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/set-status/to-deferred.md: -------------------------------------------------------------------------------- ```markdown 1 | Defer a task for later consideration. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Deferring a Task 6 | 7 | This status indicates a task is valid but not currently actionable or prioritized. 8 | 9 | ## Valid Reasons for Deferral 10 | 11 | - Waiting for external dependencies 12 | - Reprioritized for future sprint 13 | - Blocked by technical limitations 14 | - Resource constraints 15 | - Strategic timing considerations 16 | 17 | ## Execution 18 | 19 | ```bash 20 | task-master set-status --id=$ARGUMENTS --status=deferred 21 | ``` 22 | 23 | ## Deferral Management 24 | 25 | When deferring: 26 | 1. **Document Reason** 27 | - Capture why it's being deferred 28 | - Set reactivation criteria 29 | - Note any partial work completed 30 | 31 | 2. **Impact Analysis** 32 | - Check dependent tasks 33 | - Update project timeline 34 | - Notify affected stakeholders 35 | 36 | 3. **Future Planning** 37 | - Set review reminders 38 | - Tag for specific milestone 39 | - Preserve context for reactivation 40 | - Link to blocking issues 41 | 42 | ## Smart Tracking 43 | 44 | - Monitor deferral duration 45 | - Alert when criteria met 46 | - Prevent scope creep 47 | - Regular review cycles ``` -------------------------------------------------------------------------------- /packages/tm-core/src/auth/config.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * Centralized authentication configuration 3 | */ 4 | 5 | import os from 'os'; 6 | import path from 'path'; 7 | import { AuthConfig } from './types.js'; 8 | 9 | // Single base domain for all URLs 10 | // Build-time: process.env.TM_PUBLIC_BASE_DOMAIN gets replaced by tsup's env option 11 | // Default: https://tryhamster.com for production 12 | const BASE_DOMAIN = 13 | process.env.TM_PUBLIC_BASE_DOMAIN || // This gets replaced at build time by tsup 14 | 'https://tryhamster.com'; 15 | 16 | /** 17 | * Default authentication configuration 18 | * All URL configuration is derived from the single BASE_DOMAIN 19 | */ 20 | export const DEFAULT_AUTH_CONFIG: AuthConfig = { 21 | // Base domain for all services 22 | baseUrl: BASE_DOMAIN, 23 | 24 | // Configuration directory and file paths 25 | configDir: path.join(os.homedir(), '.taskmaster'), 26 | configFile: path.join(os.homedir(), '.taskmaster', 'auth.json') 27 | }; 28 | 29 | /** 30 | * Get merged configuration with optional overrides 31 | */ 32 | export function getAuthConfig(overrides?: Partial<AuthConfig>): AuthConfig { 33 | return { 34 | ...DEFAULT_AUTH_CONFIG, 35 | ...overrides 36 | }; 37 | } 38 | ``` -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- ```markdown 1 | # What type of PR is this? 2 | <!-- Check one --> 3 | 4 | - [ ] 🐛 Bug fix 5 | - [ ] ✨ Feature 6 | - [ ] 🔌 Integration 7 | - [ ] 📝 Docs 8 | - [ ] 🧹 Refactor 9 | - [ ] Other: 10 | ## Description 11 | <!-- What does this PR do? --> 12 | 13 | ## Related Issues 14 | <!-- Link issues: Fixes #123 --> 15 | 16 | ## How to Test This 17 | <!-- Quick steps to verify the changes work --> 18 | ```bash 19 | # Example commands or steps 20 | ``` 21 | 22 | **Expected result:** 23 | <!-- What should happen? --> 24 | 25 | ## Contributor Checklist 26 | 27 | - [ ] Created changeset: `npm run changeset` 28 | - [ ] Tests pass: `npm test` 29 | - [ ] Format check passes: `npm run format-check` (or `npm run format` to fix) 30 | - [ ] Addressed CodeRabbit comments (if any) 31 | - [ ] Linked related issues (if any) 32 | - [ ] Manually tested the changes 33 | 34 | ## Changelog Entry 35 | <!-- One line describing the change for users --> 36 | <!-- Example: "Added Kiro IDE integration with automatic task status updates" --> 37 | 38 | --- 39 | 40 | ### For Maintainers 41 | 42 | - [ ] PR title follows conventional commits 43 | - [ ] Target branch correct 44 | - [ ] Labels added 45 | - [ ] Milestone assigned (if applicable) 46 | ``` -------------------------------------------------------------------------------- /apps/docs/getting-started/quick-start/quick-start.mdx: -------------------------------------------------------------------------------- ```markdown 1 | --- 2 | title: Quick Start 3 | sidebarTitle: "Quick Start" 4 | --- 5 | 6 | This guide is for new users who want to start using Task Master with minimal setup time. 7 | 8 | It covers: 9 | - [Requirements](/docs/getting-started/quick-start/requirements): You will need Node.js and an AI model API Key. 10 | - [Installation](/docs/getting-started/quick-start/installation): How to Install Task Master. 11 | - [Configuration](/docs/getting-started/quick-start/configuration-quick): Setting up your API Key, MCP, and more. 12 | - [PRD](/docs/getting-started/quick-start/prd-quick): Writing and parsing your first PRD. 13 | - [Task Setup](/docs/getting-started/quick-start/tasks-quick): Preparing your tasks for execution. 14 | - [Executing Tasks](/docs/getting-started/quick-start/execute-quick): Using Task Master to execute tasks. 15 | - [Rules & Context](/docs/getting-started/quick-start/rules-quick): Learn how and why to build context in your project over time. 16 | 17 | <Tip> 18 | By the end of this guide, you'll have everything you need to begin working productively with Task Master. 19 | </Tip> ``` -------------------------------------------------------------------------------- /.claude/commands/tm/init/init-project.md: -------------------------------------------------------------------------------- ```markdown 1 | Initialize a new Task Master project. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse arguments to determine initialization preferences. 6 | 7 | ## Initialization Process 8 | 9 | 1. **Parse Arguments** 10 | - PRD file path (if provided) 11 | - Project name 12 | - Auto-confirm flag (-y) 13 | 14 | 2. **Project Setup** 15 | ```bash 16 | task-master init 17 | ``` 18 | 19 | 3. **Smart Initialization** 20 | - Detect existing project files 21 | - Suggest project name from directory 22 | - Check for git repository 23 | - Verify AI provider configuration 24 | 25 | ## Configuration Options 26 | 27 | Based on arguments: 28 | - `quick` / `-y` → Skip confirmations 29 | - `<file.md>` → Use as PRD after init 30 | - `--name=<name>` → Set project name 31 | - `--description=<desc>` → Set description 32 | 33 | ## Post-Initialization 34 | 35 | After successful init: 36 | 1. Show project structure created 37 | 2. Verify AI models configured 38 | 3. Suggest next steps: 39 | - Parse PRD if available 40 | - Configure AI providers 41 | - Set up git hooks 42 | - Create first tasks 43 | 44 | ## Integration 45 | 46 | If PRD file provided: 47 | ``` 48 | /project:tm/init my-prd.md 49 | → Automatically runs parse-prd after init 50 | ``` ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/init/init-project.md: -------------------------------------------------------------------------------- ```markdown 1 | Initialize a new Task Master project. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse arguments to determine initialization preferences. 6 | 7 | ## Initialization Process 8 | 9 | 1. **Parse Arguments** 10 | - PRD file path (if provided) 11 | - Project name 12 | - Auto-confirm flag (-y) 13 | 14 | 2. **Project Setup** 15 | ```bash 16 | task-master init 17 | ``` 18 | 19 | 3. **Smart Initialization** 20 | - Detect existing project files 21 | - Suggest project name from directory 22 | - Check for git repository 23 | - Verify AI provider configuration 24 | 25 | ## Configuration Options 26 | 27 | Based on arguments: 28 | - `quick` / `-y` → Skip confirmations 29 | - `<file.md>` → Use as PRD after init 30 | - `--name=<name>` → Set project name 31 | - `--description=<desc>` → Set description 32 | 33 | ## Post-Initialization 34 | 35 | After successful init: 36 | 1. Show project structure created 37 | 2. Verify AI models configured 38 | 3. Suggest next steps: 39 | - Parse PRD if available 40 | - Configure AI providers 41 | - Set up git hooks 42 | - Create first tasks 43 | 44 | ## Integration 45 | 46 | If PRD file provided: 47 | ``` 48 | /project:tm/init my-prd.md 49 | → Automatically runs parse-prd after init 50 | ``` ``` -------------------------------------------------------------------------------- /.github/scripts/release.mjs: -------------------------------------------------------------------------------- ``` 1 | #!/usr/bin/env node 2 | import { existsSync, unlinkSync } from 'node:fs'; 3 | import { join, dirname } from 'node:path'; 4 | import { fileURLToPath } from 'node:url'; 5 | import { findRootDir, runCommand } from './utils.mjs'; 6 | 7 | const __filename = fileURLToPath(import.meta.url); 8 | const __dirname = dirname(__filename); 9 | 10 | const rootDir = findRootDir(__dirname); 11 | 12 | console.log('🚀 Starting release process...'); 13 | 14 | // Double-check we're not in pre-release mode (safety net) 15 | const preJsonPath = join(rootDir, '.changeset', 'pre.json'); 16 | if (existsSync(preJsonPath)) { 17 | console.log('⚠️ Warning: pre.json still exists. Removing it...'); 18 | unlinkSync(preJsonPath); 19 | } 20 | 21 | // Check if the extension version has changed and tag it 22 | // This prevents changeset from trying to publish the private package 23 | runCommand('node', [join(__dirname, 'tag-extension.mjs')]); 24 | 25 | // Run changeset publish for npm packages 26 | runCommand('npx', ['changeset', 'publish']); 27 | 28 | console.log('✅ Release process completed!'); 29 | 30 | // The extension tag (if created) will trigger the extension-release workflow 31 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/expand/expand-task.md: -------------------------------------------------------------------------------- ```markdown 1 | Break down a complex task into subtasks. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Intelligent Task Expansion 6 | 7 | Analyzes a task and creates detailed subtasks for better manageability. 8 | 9 | ## Execution 10 | 11 | ```bash 12 | task-master expand --id=$ARGUMENTS 13 | ``` 14 | 15 | ## Expansion Process 16 | 17 | 1. **Task Analysis** 18 | - Review task complexity 19 | - Identify components 20 | - Detect technical challenges 21 | - Estimate time requirements 22 | 23 | 2. **Subtask Generation** 24 | - Create 3-7 subtasks typically 25 | - Each subtask 1-4 hours 26 | - Logical implementation order 27 | - Clear acceptance criteria 28 | 29 | 3. **Smart Breakdown** 30 | - Setup/configuration tasks 31 | - Core implementation 32 | - Testing components 33 | - Integration steps 34 | - Documentation updates 35 | 36 | ## Enhanced Features 37 | 38 | Based on task type: 39 | - **Feature**: Setup → Implement → Test → Integrate 40 | - **Bug Fix**: Reproduce → Diagnose → Fix → Verify 41 | - **Refactor**: Analyze → Plan → Refactor → Validate 42 | 43 | ## Post-Expansion 44 | 45 | After expansion: 46 | 1. Show subtask hierarchy 47 | 2. Update time estimates 48 | 3. Suggest implementation order 49 | 4. Highlight critical path ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/expand/expand-task.md: -------------------------------------------------------------------------------- ```markdown 1 | Break down a complex task into subtasks. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Intelligent Task Expansion 6 | 7 | Analyzes a task and creates detailed subtasks for better manageability. 8 | 9 | ## Execution 10 | 11 | ```bash 12 | task-master expand --id=$ARGUMENTS 13 | ``` 14 | 15 | ## Expansion Process 16 | 17 | 1. **Task Analysis** 18 | - Review task complexity 19 | - Identify components 20 | - Detect technical challenges 21 | - Estimate time requirements 22 | 23 | 2. **Subtask Generation** 24 | - Create 3-7 subtasks typically 25 | - Each subtask 1-4 hours 26 | - Logical implementation order 27 | - Clear acceptance criteria 28 | 29 | 3. **Smart Breakdown** 30 | - Setup/configuration tasks 31 | - Core implementation 32 | - Testing components 33 | - Integration steps 34 | - Documentation updates 35 | 36 | ## Enhanced Features 37 | 38 | Based on task type: 39 | - **Feature**: Setup → Implement → Test → Integrate 40 | - **Bug Fix**: Reproduce → Diagnose → Fix → Verify 41 | - **Refactor**: Analyze → Plan → Refactor → Validate 42 | 43 | ## Post-Expansion 44 | 45 | After expansion: 46 | 1. Show subtask hierarchy 47 | 2. Update time estimates 48 | 3. Suggest implementation order 49 | 4. Highlight critical path ``` -------------------------------------------------------------------------------- /.claude/commands/tm/parse-prd/parse-prd.md: -------------------------------------------------------------------------------- ```markdown 1 | Parse a PRD document to generate tasks. 2 | 3 | Arguments: $ARGUMENTS (PRD file path) 4 | 5 | ## Intelligent PRD Parsing 6 | 7 | Analyzes your requirements document and generates a complete task breakdown. 8 | 9 | ## Execution 10 | 11 | ```bash 12 | task-master parse-prd --input=$ARGUMENTS 13 | ``` 14 | 15 | ## Parsing Process 16 | 17 | 1. **Document Analysis** 18 | - Extract key requirements 19 | - Identify technical components 20 | - Detect dependencies 21 | - Estimate complexity 22 | 23 | 2. **Task Generation** 24 | - Create 10-15 tasks by default 25 | - Include implementation tasks 26 | - Add testing tasks 27 | - Include documentation tasks 28 | - Set logical dependencies 29 | 30 | 3. **Smart Enhancements** 31 | - Group related functionality 32 | - Set appropriate priorities 33 | - Add acceptance criteria 34 | - Include test strategies 35 | 36 | ## Options 37 | 38 | Parse arguments for modifiers: 39 | - Number after filename → `--num-tasks` 40 | - `research` → Use research mode 41 | - `comprehensive` → Generate more tasks 42 | 43 | ## Post-Generation 44 | 45 | After parsing: 46 | 1. Display task summary 47 | 2. Show dependency graph 48 | 3. Suggest task expansion for complex items 49 | 4. Recommend sprint planning ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/parse-prd/parse-prd.md: -------------------------------------------------------------------------------- ```markdown 1 | Parse a PRD document to generate tasks. 2 | 3 | Arguments: $ARGUMENTS (PRD file path) 4 | 5 | ## Intelligent PRD Parsing 6 | 7 | Analyzes your requirements document and generates a complete task breakdown. 8 | 9 | ## Execution 10 | 11 | ```bash 12 | task-master parse-prd --input=$ARGUMENTS 13 | ``` 14 | 15 | ## Parsing Process 16 | 17 | 1. **Document Analysis** 18 | - Extract key requirements 19 | - Identify technical components 20 | - Detect dependencies 21 | - Estimate complexity 22 | 23 | 2. **Task Generation** 24 | - Create 10-15 tasks by default 25 | - Include implementation tasks 26 | - Add testing tasks 27 | - Include documentation tasks 28 | - Set logical dependencies 29 | 30 | 3. **Smart Enhancements** 31 | - Group related functionality 32 | - Set appropriate priorities 33 | - Add acceptance criteria 34 | - Include test strategies 35 | 36 | ## Options 37 | 38 | Parse arguments for modifiers: 39 | - Number after filename → `--num-tasks` 40 | - `research` → Use research mode 41 | - `comprehensive` → Generate more tasks 42 | 43 | ## Post-Generation 44 | 45 | After parsing: 46 | 1. Display task summary 47 | 2. Show dependency graph 48 | 3. Suggest task expansion for complex items 49 | 4. Recommend sprint planning ``` -------------------------------------------------------------------------------- /.claude/commands/tm/parse-prd/parse-prd-with-research.md: -------------------------------------------------------------------------------- ```markdown 1 | Parse PRD with enhanced research mode for better task generation. 2 | 3 | Arguments: $ARGUMENTS (PRD file path) 4 | 5 | ## Research-Enhanced Parsing 6 | 7 | Uses the research AI provider (typically Perplexity) for more comprehensive task generation with current best practices. 8 | 9 | ## Execution 10 | 11 | ```bash 12 | task-master parse-prd --input=$ARGUMENTS --research 13 | ``` 14 | 15 | ## Research Benefits 16 | 17 | 1. **Current Best Practices** 18 | - Latest framework patterns 19 | - Security considerations 20 | - Performance optimizations 21 | - Accessibility requirements 22 | 23 | 2. **Technical Deep Dive** 24 | - Implementation approaches 25 | - Library recommendations 26 | - Architecture patterns 27 | - Testing strategies 28 | 29 | 3. **Comprehensive Coverage** 30 | - Edge cases consideration 31 | - Error handling tasks 32 | - Monitoring setup 33 | - Deployment tasks 34 | 35 | ## Enhanced Output 36 | 37 | Research mode typically: 38 | - Generates more detailed tasks 39 | - Includes industry standards 40 | - Adds compliance considerations 41 | - Suggests modern tooling 42 | 43 | ## When to Use 44 | 45 | - New technology domains 46 | - Complex requirements 47 | - Regulatory compliance needed 48 | - Best practices crucial ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/parse-prd/parse-prd-with-research.md: -------------------------------------------------------------------------------- ```markdown 1 | Parse PRD with enhanced research mode for better task generation. 2 | 3 | Arguments: $ARGUMENTS (PRD file path) 4 | 5 | ## Research-Enhanced Parsing 6 | 7 | Uses the research AI provider (typically Perplexity) for more comprehensive task generation with current best practices. 8 | 9 | ## Execution 10 | 11 | ```bash 12 | task-master parse-prd --input=$ARGUMENTS --research 13 | ``` 14 | 15 | ## Research Benefits 16 | 17 | 1. **Current Best Practices** 18 | - Latest framework patterns 19 | - Security considerations 20 | - Performance optimizations 21 | - Accessibility requirements 22 | 23 | 2. **Technical Deep Dive** 24 | - Implementation approaches 25 | - Library recommendations 26 | - Architecture patterns 27 | - Testing strategies 28 | 29 | 3. **Comprehensive Coverage** 30 | - Edge cases consideration 31 | - Error handling tasks 32 | - Monitoring setup 33 | - Deployment tasks 34 | 35 | ## Enhanced Output 36 | 37 | Research mode typically: 38 | - Generates more detailed tasks 39 | - Includes industry standards 40 | - Adds compliance considerations 41 | - Suggests modern tooling 42 | 43 | ## When to Use 44 | 45 | - New technology domains 46 | - Complex requirements 47 | - Regulatory compliance needed 48 | - Best practices crucial ``` -------------------------------------------------------------------------------- /apps/extension/src/webview/hooks/useWebviewHeight.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * Hook for managing webview height 3 | */ 4 | 5 | import { useState, useEffect, useCallback } from 'react'; 6 | 7 | export const useWebviewHeight = () => { 8 | const [availableHeight, setAvailableHeight] = useState<number>( 9 | window.innerHeight 10 | ); 11 | 12 | const updateAvailableHeight = useCallback(() => { 13 | const height = window.innerHeight; 14 | console.log('📏 Available height updated:', height); 15 | setAvailableHeight(height); 16 | }, []); 17 | 18 | useEffect(() => { 19 | updateAvailableHeight(); 20 | 21 | const handleResize = () => { 22 | updateAvailableHeight(); 23 | }; 24 | 25 | window.addEventListener('resize', handleResize); 26 | 27 | // Also listen for VS Code specific events if available 28 | const handleVisibilityChange = () => { 29 | // Small delay to ensure VS Code has finished resizing 30 | setTimeout(updateAvailableHeight, 100); 31 | }; 32 | 33 | document.addEventListener('visibilitychange', handleVisibilityChange); 34 | 35 | return () => { 36 | window.removeEventListener('resize', handleResize); 37 | document.removeEventListener('visibilitychange', handleVisibilityChange); 38 | }; 39 | }, [updateAvailableHeight]); 40 | 41 | return availableHeight; 42 | }; 43 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/models/setup-models.md: -------------------------------------------------------------------------------- ```markdown 1 | Run interactive setup to configure AI models. 2 | 3 | ## Interactive Model Configuration 4 | 5 | Guides you through setting up AI providers for Task Master. 6 | 7 | ## Execution 8 | 9 | ```bash 10 | task-master models --setup 11 | ``` 12 | 13 | ## Setup Process 14 | 15 | 1. **Environment Check** 16 | - Detect existing API keys 17 | - Show current configuration 18 | - Identify missing providers 19 | 20 | 2. **Provider Selection** 21 | - Choose main provider (required) 22 | - Select research provider (recommended) 23 | - Configure fallback (optional) 24 | 25 | 3. **API Key Configuration** 26 | - Prompt for missing keys 27 | - Validate key format 28 | - Test connectivity 29 | - Save configuration 30 | 31 | ## Smart Recommendations 32 | 33 | Based on your needs: 34 | - **For best results**: Claude + Perplexity 35 | - **Budget conscious**: GPT-3.5 + Perplexity 36 | - **Maximum capability**: GPT-4 + Perplexity + Claude fallback 37 | 38 | ## Configuration Storage 39 | 40 | Keys can be stored in: 41 | 1. Environment variables (recommended) 42 | 2. `.env` file in project 43 | 3. Global `.taskmaster/config` 44 | 45 | ## Post-Setup 46 | 47 | After configuration: 48 | - Test each provider 49 | - Show usage examples 50 | - Suggest next steps 51 | - Verify parse-prd works ``` -------------------------------------------------------------------------------- /.github/workflows/update-models-md.yml: -------------------------------------------------------------------------------- ```yaml 1 | name: Update models.md from supported-models.json 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - next 8 | paths: 9 | - 'scripts/modules/supported-models.json' 10 | - 'docs/scripts/models-json-to-markdown.js' 11 | 12 | jobs: 13 | update_markdown: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout repository 17 | uses: actions/checkout@v4 18 | 19 | - name: Set up Node.js 20 | uses: actions/setup-node@v4 21 | with: 22 | node-version: 20 23 | 24 | - name: Run transformation script 25 | run: node docs/scripts/models-json-to-markdown.js 26 | 27 | - name: Format Markdown with Prettier 28 | run: npx prettier --write docs/models.md 29 | 30 | - name: Stage docs/models.md 31 | run: git add docs/models.md 32 | 33 | - name: Commit & Push docs/models.md 34 | uses: actions-js/push@master 35 | with: 36 | github_token: ${{ secrets.GITHUB_TOKEN }} 37 | branch: ${{ github.ref_name }} 38 | message: 'docs: Auto-update and format models.md' 39 | author_name: 'github-actions[bot]' 40 | author_email: 'github-actions[bot]@users.noreply.github.com' 41 | ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/models/setup-models.md: -------------------------------------------------------------------------------- ```markdown 1 | Run interactive setup to configure AI models. 2 | 3 | ## Interactive Model Configuration 4 | 5 | Guides you through setting up AI providers for Task Master. 6 | 7 | ## Execution 8 | 9 | ```bash 10 | task-master models --setup 11 | ``` 12 | 13 | ## Setup Process 14 | 15 | 1. **Environment Check** 16 | - Detect existing API keys 17 | - Show current configuration 18 | - Identify missing providers 19 | 20 | 2. **Provider Selection** 21 | - Choose main provider (required) 22 | - Select research provider (recommended) 23 | - Configure fallback (optional) 24 | 25 | 3. **API Key Configuration** 26 | - Prompt for missing keys 27 | - Validate key format 28 | - Test connectivity 29 | - Save configuration 30 | 31 | ## Smart Recommendations 32 | 33 | Based on your needs: 34 | - **For best results**: Claude + Perplexity 35 | - **Budget conscious**: GPT-3.5 + Perplexity 36 | - **Maximum capability**: GPT-4 + Perplexity + Claude fallback 37 | 38 | ## Configuration Storage 39 | 40 | Keys can be stored in: 41 | 1. Environment variables (recommended) 42 | 2. `.env` file in project 43 | 3. Global `.taskmaster/config` 44 | 45 | ## Post-Setup 46 | 47 | After configuration: 48 | - Test each provider 49 | - Show usage examples 50 | - Suggest next steps 51 | - Verify parse-prd works ``` -------------------------------------------------------------------------------- /src/prompts/schemas/variant.schema.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/eyaltoledano/claude-task-master/blob/main/src/prompts/schemas/variant.schema.json", 4 | "version": "1.0.0", 5 | "title": "Task Master Prompt Variant", 6 | "description": "Schema for prompt template variants", 7 | "type": "object", 8 | "required": ["system", "user"], 9 | "properties": { 10 | "system": { 11 | "type": "string", 12 | "minLength": 1, 13 | "description": "System prompt template with variable placeholders" 14 | }, 15 | "user": { 16 | "type": "string", 17 | "minLength": 1, 18 | "description": "User prompt template with variable placeholders" 19 | }, 20 | "condition": { 21 | "type": "string", 22 | "description": "JavaScript expression for variant selection (optional, only for non-default variants)" 23 | }, 24 | "metadata": { 25 | "type": "object", 26 | "properties": { 27 | "description": { 28 | "type": "string", 29 | "description": "Description of when this variant should be used" 30 | }, 31 | "tags": { 32 | "type": "array", 33 | "items": { "type": "string" }, 34 | "description": "Tags for categorizing this variant" 35 | } 36 | } 37 | } 38 | } 39 | } 40 | ``` -------------------------------------------------------------------------------- /apps/extension/src/webview/contexts/VSCodeContext.tsx: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * VS Code API Context 3 | * Provides access to VS Code API and webview state 4 | */ 5 | 6 | import React, { createContext, useContext } from 'react'; 7 | import type { AppState, AppAction, ToastNotification } from '../types'; 8 | 9 | export interface VSCodeContextValue { 10 | vscode?: ReturnType<NonNullable<typeof window.acquireVsCodeApi>>; 11 | state: AppState; 12 | dispatch: React.Dispatch<AppAction>; 13 | sendMessage: (message: any) => Promise<any>; 14 | availableHeight: number; 15 | // Toast notification functions 16 | showSuccessToast: (title: string, message: string, duration?: number) => void; 17 | showInfoToast: (title: string, message: string, duration?: number) => void; 18 | showWarningToast: (title: string, message: string, duration?: number) => void; 19 | showErrorToast: (title: string, message: string, duration?: number) => void; 20 | } 21 | 22 | export const VSCodeContext = createContext<VSCodeContextValue | undefined>( 23 | undefined 24 | ); 25 | 26 | export const useVSCodeContext = () => { 27 | const context = useContext(VSCodeContext); 28 | if (!context) { 29 | throw new Error('useVSCodeContext must be used within VSCodeProvider'); 30 | } 31 | return context; 32 | }; 33 | ``` -------------------------------------------------------------------------------- /packages/tm-core/src/logger/factory.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * @fileoverview Logger factory and singleton management 3 | */ 4 | 5 | import { Logger, type LoggerConfig } from './logger.js'; 6 | 7 | // Global logger instance 8 | let globalLogger: Logger | null = null; 9 | 10 | // Named logger instances 11 | const loggers = new Map<string, Logger>(); 12 | 13 | /** 14 | * Create a new logger instance 15 | */ 16 | export function createLogger(config?: LoggerConfig): Logger { 17 | return new Logger(config); 18 | } 19 | 20 | /** 21 | * Get or create a named logger instance 22 | */ 23 | export function getLogger(name?: string, config?: LoggerConfig): Logger { 24 | // If no name provided, return global logger 25 | if (!name) { 26 | if (!globalLogger) { 27 | globalLogger = createLogger(config); 28 | } 29 | return globalLogger; 30 | } 31 | 32 | // Check if named logger exists 33 | if (!loggers.has(name)) { 34 | loggers.set( 35 | name, 36 | createLogger({ 37 | prefix: name, 38 | ...config 39 | }) 40 | ); 41 | } 42 | 43 | return loggers.get(name)!; 44 | } 45 | 46 | /** 47 | * Set the global logger instance 48 | */ 49 | export function setGlobalLogger(logger: Logger): void { 50 | globalLogger = logger; 51 | } 52 | 53 | /** 54 | * Clear all logger instances (useful for testing) 55 | */ 56 | export function clearLoggers(): void { 57 | globalLogger = null; 58 | loggers.clear(); 59 | } 60 | ``` -------------------------------------------------------------------------------- /packages/tm-core/src/repositories/task-repository.interface.ts: -------------------------------------------------------------------------------- ```typescript 1 | import { Task, TaskTag } from '../types/index.js'; 2 | 3 | export interface TaskRepository { 4 | // Task operations 5 | getTasks(projectId: string): Promise<Task[]>; 6 | getTask(projectId: string, taskId: string): Promise<Task | null>; 7 | createTask(projectId: string, task: Omit<Task, 'id'>): Promise<Task>; 8 | updateTask( 9 | projectId: string, 10 | taskId: string, 11 | updates: Partial<Task> 12 | ): Promise<Task>; 13 | deleteTask(projectId: string, taskId: string): Promise<void>; 14 | 15 | // Tag operations 16 | getTags(projectId: string): Promise<TaskTag[]>; 17 | getTag(projectId: string, tagName: string): Promise<TaskTag | null>; 18 | createTag(projectId: string, tag: TaskTag): Promise<TaskTag>; 19 | updateTag( 20 | projectId: string, 21 | tagName: string, 22 | updates: Partial<TaskTag> 23 | ): Promise<TaskTag>; 24 | deleteTag(projectId: string, tagName: string): Promise<void>; 25 | 26 | // Bulk operations 27 | bulkCreateTasks( 28 | projectId: string, 29 | tasks: Omit<Task, 'id'>[] 30 | ): Promise<Task[]>; 31 | bulkUpdateTasks( 32 | projectId: string, 33 | updates: Array<{ id: string; updates: Partial<Task> }> 34 | ): Promise<Task[]>; 35 | bulkDeleteTasks(projectId: string, taskIds: string[]): Promise<void>; 36 | } 37 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/set-status/to-cancelled.md: -------------------------------------------------------------------------------- ```markdown 1 | Cancel a task permanently. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Cancelling a Task 6 | 7 | This status indicates a task is no longer needed and won't be completed. 8 | 9 | ## Valid Reasons for Cancellation 10 | 11 | - Requirements changed 12 | - Feature deprecated 13 | - Duplicate of another task 14 | - Strategic pivot 15 | - Technical approach invalidated 16 | 17 | ## Pre-Cancellation Checks 18 | 19 | 1. Confirm no critical dependencies 20 | 2. Check for partial implementation 21 | 3. Verify cancellation rationale 22 | 4. Document lessons learned 23 | 24 | ## Execution 25 | 26 | ```bash 27 | task-master set-status --id=$ARGUMENTS --status=cancelled 28 | ``` 29 | 30 | ## Cancellation Impact 31 | 32 | When cancelling: 33 | 1. **Dependency Updates** 34 | - Notify dependent tasks 35 | - Update project scope 36 | - Recalculate timelines 37 | 38 | 2. **Clean-up Actions** 39 | - Remove related branches 40 | - Archive any work done 41 | - Update documentation 42 | - Close related issues 43 | 44 | 3. **Learning Capture** 45 | - Document why cancelled 46 | - Note what was learned 47 | - Update estimation models 48 | - Prevent future duplicates 49 | 50 | ## Historical Preservation 51 | 52 | - Keep for reference 53 | - Tag with cancellation reason 54 | - Link to replacement if any 55 | - Maintain audit trail ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/set-status/to-cancelled.md: -------------------------------------------------------------------------------- ```markdown 1 | Cancel a task permanently. 2 | 3 | Arguments: $ARGUMENTS (task ID) 4 | 5 | ## Cancelling a Task 6 | 7 | This status indicates a task is no longer needed and won't be completed. 8 | 9 | ## Valid Reasons for Cancellation 10 | 11 | - Requirements changed 12 | - Feature deprecated 13 | - Duplicate of another task 14 | - Strategic pivot 15 | - Technical approach invalidated 16 | 17 | ## Pre-Cancellation Checks 18 | 19 | 1. Confirm no critical dependencies 20 | 2. Check for partial implementation 21 | 3. Verify cancellation rationale 22 | 4. Document lessons learned 23 | 24 | ## Execution 25 | 26 | ```bash 27 | task-master set-status --id=$ARGUMENTS --status=cancelled 28 | ``` 29 | 30 | ## Cancellation Impact 31 | 32 | When cancelling: 33 | 1. **Dependency Updates** 34 | - Notify dependent tasks 35 | - Update project scope 36 | - Recalculate timelines 37 | 38 | 2. **Clean-up Actions** 39 | - Remove related branches 40 | - Archive any work done 41 | - Update documentation 42 | - Close related issues 43 | 44 | 3. **Learning Capture** 45 | - Document why cancelled 46 | - Note what was learned 47 | - Update estimation models 48 | - Prevent future duplicates 49 | 50 | ## Historical Preservation 51 | 52 | - Keep for reference 53 | - Tag with cancellation reason 54 | - Link to replacement if any 55 | - Maintain audit trail ``` -------------------------------------------------------------------------------- /biome.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "files": { 3 | "ignore": [ 4 | "build", 5 | "coverage", 6 | ".changeset", 7 | "tasks", 8 | "package-lock.json", 9 | "tests/fixture/*.json", 10 | "dist" 11 | ] 12 | }, 13 | "formatter": { 14 | "bracketSpacing": true, 15 | "enabled": true, 16 | "indentStyle": "tab", 17 | "lineWidth": 80 18 | }, 19 | "javascript": { 20 | "formatter": { 21 | "arrowParentheses": "always", 22 | "quoteStyle": "single", 23 | "trailingCommas": "none" 24 | } 25 | }, 26 | "linter": { 27 | "enabled": true, 28 | "include": ["apps/extension/**/*.ts", "apps/extension/**/*.tsx"], 29 | "ignore": ["**/*", "!apps/extension/**/*"], 30 | "rules": { 31 | "recommended": true, 32 | "complexity": { 33 | "noForEach": "off", 34 | "useOptionalChain": "off", 35 | "useArrowFunction": "off" 36 | }, 37 | "correctness": { 38 | "noConstantCondition": "off", 39 | "noUnreachable": "off" 40 | }, 41 | "suspicious": { 42 | "noDuplicateTestHooks": "off", 43 | "noPrototypeBuiltins": "off" 44 | }, 45 | "style": { 46 | "noUselessElse": "off", 47 | "useNodejsImportProtocol": "off", 48 | "useNumberNamespace": "off", 49 | "noParameterAssign": "off", 50 | "useTemplate": "off", 51 | "noUnusedTemplateLiteral": "off", 52 | "noNonNullAssertion": "warn" 53 | } 54 | } 55 | } 56 | } 57 | ``` -------------------------------------------------------------------------------- /.github/workflows/claude.yml: -------------------------------------------------------------------------------- ```yaml 1 | name: Claude Code 2 | 3 | on: 4 | issue_comment: 5 | types: [created] 6 | pull_request_review_comment: 7 | types: [created] 8 | issues: 9 | types: [opened, assigned] 10 | pull_request_review: 11 | types: [submitted] 12 | 13 | jobs: 14 | claude: 15 | if: | 16 | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || 17 | (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || 18 | (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || 19 | (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) 20 | runs-on: ubuntu-latest 21 | permissions: 22 | contents: read 23 | pull-requests: read 24 | issues: read 25 | id-token: write 26 | steps: 27 | - name: Checkout repository 28 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 29 | with: 30 | fetch-depth: 1 31 | 32 | - name: Run Claude Code 33 | id: claude 34 | uses: anthropics/claude-code-action@beta 35 | with: 36 | anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} 37 | ``` -------------------------------------------------------------------------------- /src/constants/task-priority.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * @typedef {'high' | 'medium' | 'low'} TaskPriority 3 | */ 4 | 5 | /** 6 | * Task priority options 7 | * @type {TaskPriority[]} 8 | * @description Defines possible task priorities: 9 | * - high: Critical tasks that need immediate attention 10 | * - medium: Standard priority tasks (default) 11 | * - low: Tasks that can be deferred or are nice-to-have 12 | */ 13 | export const TASK_PRIORITY_OPTIONS = ['high', 'medium', 'low']; 14 | 15 | /** 16 | * Default task priority 17 | * @type {TaskPriority} 18 | */ 19 | export const DEFAULT_TASK_PRIORITY = 'medium'; 20 | 21 | /** 22 | * Check if a given priority is valid 23 | * @param {string} priority - The priority to check 24 | * @returns {boolean} True if the priority is valid, false otherwise 25 | */ 26 | export function isValidTaskPriority(priority) { 27 | return TASK_PRIORITY_OPTIONS.includes(priority?.toLowerCase()); 28 | } 29 | 30 | /** 31 | * Normalize a priority value to lowercase 32 | * @param {string} priority - The priority to normalize 33 | * @returns {TaskPriority|null} The normalized priority or null if invalid 34 | */ 35 | export function normalizeTaskPriority(priority) { 36 | if (!priority) return null; 37 | const normalized = priority.toLowerCase(); 38 | return isValidTaskPriority(normalized) ? normalized : null; 39 | } 40 | ``` -------------------------------------------------------------------------------- /src/ai-providers/xai.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * xai.js 3 | * AI provider implementation for xAI models using Vercel AI SDK. 4 | */ 5 | 6 | import { createXai } from '@ai-sdk/xai'; 7 | import { BaseAIProvider } from './base-provider.js'; 8 | 9 | export class XAIProvider extends BaseAIProvider { 10 | constructor() { 11 | super(); 12 | this.name = 'xAI'; 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 xAI API key 18 | */ 19 | getRequiredApiKeyName() { 20 | return 'XAI_API_KEY'; 21 | } 22 | 23 | /** 24 | * Creates and returns an xAI client instance. 25 | * @param {object} params - Parameters for client initialization 26 | * @param {string} params.apiKey - xAI API key 27 | * @param {string} [params.baseURL] - Optional custom API endpoint 28 | * @returns {Function} xAI 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('xAI API key is required.'); 37 | } 38 | 39 | return createXai({ 40 | apiKey, 41 | baseURL: baseURL || 'https://api.x.ai/v1' 42 | }); 43 | } catch (error) { 44 | this.handleError('client initialization', error); 45 | } 46 | } 47 | } 48 | ``` -------------------------------------------------------------------------------- /scripts/modules/task-manager/task-exists.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * Checks if a task with the given ID exists 3 | * @param {Array} tasks - Array of tasks to search 4 | * @param {string|number} taskId - ID of task or subtask to check 5 | * @returns {boolean} Whether the task exists 6 | */ 7 | function taskExists(tasks, taskId) { 8 | // Handle subtask IDs (e.g., "1.2") 9 | if (typeof taskId === 'string' && taskId.includes('.')) { 10 | const parts = taskId.split('.'); 11 | // Validate that it's a proper subtask format (parentId.subtaskId) 12 | if (parts.length !== 2 || !parts[0] || !parts[1]) { 13 | // Invalid format - treat as regular task ID 14 | const id = parseInt(taskId, 10); 15 | return tasks.some((t) => t.id === id); 16 | } 17 | 18 | const [parentIdStr, subtaskIdStr] = parts; 19 | const parentId = parseInt(parentIdStr, 10); 20 | const subtaskId = parseInt(subtaskIdStr, 10); 21 | 22 | // Find the parent task 23 | const parentTask = tasks.find((t) => t.id === parentId); 24 | 25 | // If parent exists, check if subtask exists 26 | return ( 27 | parentTask && 28 | parentTask.subtasks && 29 | parentTask.subtasks.some((st) => st.id === subtaskId) 30 | ); 31 | } 32 | 33 | // Handle regular task IDs 34 | const id = parseInt(taskId, 10); 35 | return tasks.some((t) => t.id === id); 36 | } 37 | 38 | export default taskExists; 39 | ``` -------------------------------------------------------------------------------- /scripts/modules/task-manager/is-task-dependent.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * Check if a task is dependent on another task (directly or indirectly) 3 | * Used to prevent circular dependencies 4 | * @param {Array} allTasks - Array of all tasks 5 | * @param {Object} task - The task to check 6 | * @param {number} targetTaskId - The task ID to check dependency against 7 | * @returns {boolean} Whether the task depends on the target task 8 | */ 9 | function isTaskDependentOn(allTasks, task, targetTaskId) { 10 | // If the task is a subtask, check if its parent is the target 11 | if (task.parentTaskId === targetTaskId) { 12 | return true; 13 | } 14 | 15 | // Check direct dependencies 16 | if (task.dependencies && task.dependencies.includes(targetTaskId)) { 17 | return true; 18 | } 19 | 20 | // Check dependencies of dependencies (recursive) 21 | if (task.dependencies) { 22 | for (const depId of task.dependencies) { 23 | const depTask = allTasks.find((t) => t.id === depId); 24 | if (depTask && isTaskDependentOn(allTasks, depTask, targetTaskId)) { 25 | return true; 26 | } 27 | } 28 | } 29 | 30 | // Check subtasks for dependencies 31 | if (task.subtasks) { 32 | for (const subtask of task.subtasks) { 33 | if (isTaskDependentOn(allTasks, subtask, targetTaskId)) { 34 | return true; 35 | } 36 | } 37 | } 38 | 39 | return false; 40 | } 41 | 42 | export default isTaskDependentOn; 43 | ``` -------------------------------------------------------------------------------- /packages/tm-core/src/parser/index.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * @fileoverview Task parsing functionality for the tm-core package 3 | * This file exports all parsing-related classes and functions 4 | */ 5 | 6 | import type { PlaceholderTask } from '../types/index.js'; 7 | 8 | // Parser implementations will be defined here 9 | // export * from './prd-parser.js'; 10 | // export * from './task-parser.js'; 11 | // export * from './markdown-parser.js'; 12 | 13 | // Placeholder exports - these will be implemented in later tasks 14 | export interface TaskParser { 15 | parse(content: string): Promise<PlaceholderTask[]>; 16 | validate(content: string): Promise<boolean>; 17 | } 18 | 19 | /** 20 | * @deprecated This is a placeholder class that will be properly implemented in later tasks 21 | */ 22 | export class PlaceholderParser implements TaskParser { 23 | async parse(content: string): Promise<PlaceholderTask[]> { 24 | // Simple placeholder parsing logic 25 | const lines = content 26 | .split('\n') 27 | .filter((line) => line.trim().startsWith('-')); 28 | return lines.map((line, index) => ({ 29 | id: `task-${index + 1}`, 30 | title: line.trim().replace(/^-\s*/, ''), 31 | status: 'pending' as const, 32 | priority: 'medium' as const 33 | })); 34 | } 35 | 36 | async validate(content: string): Promise<boolean> { 37 | return content.trim().length > 0; 38 | } 39 | } 40 | ``` -------------------------------------------------------------------------------- /test-version-check.js: -------------------------------------------------------------------------------- ```javascript 1 | import { 2 | displayUpgradeNotification, 3 | compareVersions 4 | } from './scripts/modules/commands.js'; 5 | 6 | // Simulate different version scenarios 7 | console.log('=== Simulating version check ===\n'); 8 | 9 | // 1. Current version is older than latest (should show update notice) 10 | console.log('Scenario 1: Current version older than latest'); 11 | displayUpgradeNotification('0.9.30', '1.0.0'); 12 | 13 | // 2. Current version same as latest (no update needed) 14 | console.log( 15 | '\nScenario 2: Current version same as latest (this would not normally show a notice)' 16 | ); 17 | console.log('Current: 1.0.0, Latest: 1.0.0'); 18 | console.log('compareVersions result:', compareVersions('1.0.0', '1.0.0')); 19 | console.log( 20 | 'Update needed:', 21 | compareVersions('1.0.0', '1.0.0') < 0 ? 'Yes' : 'No' 22 | ); 23 | 24 | // 3. Current version newer than latest (e.g., development version, would not show notice) 25 | console.log( 26 | '\nScenario 3: Current version newer than latest (this would not normally show a notice)' 27 | ); 28 | console.log('Current: 1.1.0, Latest: 1.0.0'); 29 | console.log('compareVersions result:', compareVersions('1.1.0', '1.0.0')); 30 | console.log( 31 | 'Update needed:', 32 | compareVersions('1.1.0', '1.0.0') < 0 ? 'Yes' : 'No' 33 | ); 34 | 35 | console.log('\n=== Test complete ==='); 36 | ``` -------------------------------------------------------------------------------- /src/ai-providers/groq.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * src/ai-providers/groq.js 3 | * 4 | * Implementation for interacting with Groq models 5 | * using the Vercel AI SDK. 6 | */ 7 | 8 | import { createGroq } from '@ai-sdk/groq'; 9 | import { BaseAIProvider } from './base-provider.js'; 10 | 11 | export class GroqProvider extends BaseAIProvider { 12 | constructor() { 13 | super(); 14 | this.name = 'Groq'; 15 | } 16 | 17 | /** 18 | * Returns the environment variable name required for this provider's API key. 19 | * @returns {string} The environment variable name for the Groq API key 20 | */ 21 | getRequiredApiKeyName() { 22 | return 'GROQ_API_KEY'; 23 | } 24 | 25 | /** 26 | * Creates and returns a Groq client instance. 27 | * @param {object} params - Parameters for client initialization 28 | * @param {string} params.apiKey - Groq API key 29 | * @param {string} [params.baseURL] - Optional custom API endpoint 30 | * @returns {Function} Groq client function 31 | * @throws {Error} If API key is missing or initialization fails 32 | */ 33 | getClient(params) { 34 | try { 35 | const { apiKey, baseURL } = params; 36 | 37 | if (!apiKey) { 38 | throw new Error('Groq API key is required.'); 39 | } 40 | 41 | return createGroq({ 42 | apiKey, 43 | ...(baseURL && { baseURL }) 44 | }); 45 | } catch (error) { 46 | this.handleError('client initialization', error); 47 | } 48 | } 49 | } 50 | ``` -------------------------------------------------------------------------------- /src/ai-providers/google.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * google.js 3 | * AI provider implementation for Google AI models using Vercel AI SDK. 4 | */ 5 | 6 | import { createGoogleGenerativeAI } from '@ai-sdk/google'; 7 | import { BaseAIProvider } from './base-provider.js'; 8 | 9 | export class GoogleAIProvider extends BaseAIProvider { 10 | constructor() { 11 | super(); 12 | this.name = 'Google'; 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 Google API key 18 | */ 19 | getRequiredApiKeyName() { 20 | return 'GOOGLE_API_KEY'; 21 | } 22 | 23 | /** 24 | * Creates and returns a Google AI client instance. 25 | * @param {object} params - Parameters for client initialization 26 | * @param {string} params.apiKey - Google API key 27 | * @param {string} [params.baseURL] - Optional custom API endpoint 28 | * @returns {Function} Google AI 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('Google API key is required.'); 37 | } 38 | 39 | return createGoogleGenerativeAI({ 40 | apiKey, 41 | ...(baseURL && { baseURL }) 42 | }); 43 | } catch (error) { 44 | this.handleError('client initialization', error); 45 | } 46 | } 47 | } 48 | ``` -------------------------------------------------------------------------------- /src/ai-providers/bedrock.js: -------------------------------------------------------------------------------- ```javascript 1 | import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock'; 2 | import { fromNodeProviderChain } from '@aws-sdk/credential-providers'; 3 | import { BaseAIProvider } from './base-provider.js'; 4 | 5 | export class BedrockAIProvider extends BaseAIProvider { 6 | constructor() { 7 | super(); 8 | this.name = 'Bedrock'; 9 | } 10 | 11 | isRequiredApiKey() { 12 | return false; 13 | } 14 | 15 | /** 16 | * Returns the required API key environment variable name for Bedrock. 17 | * Bedrock uses AWS credentials, so we return the AWS access key identifier. 18 | * @returns {string} The environment variable name 19 | */ 20 | getRequiredApiKeyName() { 21 | return 'AWS_ACCESS_KEY_ID'; 22 | } 23 | 24 | /** 25 | * Override auth validation - Bedrock uses AWS credentials instead of API keys 26 | * @param {object} params - Parameters to validate 27 | */ 28 | validateAuth(params) {} 29 | 30 | /** 31 | * Creates and returns a Bedrock client instance. 32 | * See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html 33 | * for AWS SDK environment variables and configuration options. 34 | */ 35 | getClient(params) { 36 | try { 37 | const credentialProvider = fromNodeProviderChain(); 38 | 39 | return createAmazonBedrock({ 40 | credentialProvider 41 | }); 42 | } catch (error) { 43 | this.handleError('client initialization', error); 44 | } 45 | } 46 | } 47 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/add-dependency/add-dependency.md: -------------------------------------------------------------------------------- ```markdown 1 | Add a dependency between tasks. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse the task IDs to establish dependency relationship. 6 | 7 | ## Adding Dependencies 8 | 9 | Creates a dependency where one task must be completed before another can start. 10 | 11 | ## Argument Parsing 12 | 13 | Parse natural language or IDs: 14 | - "make 5 depend on 3" → task 5 depends on task 3 15 | - "5 needs 3" → task 5 depends on task 3 16 | - "5 3" → task 5 depends on task 3 17 | - "5 after 3" → task 5 depends on task 3 18 | 19 | ## Execution 20 | 21 | ```bash 22 | task-master add-dependency --id=<task-id> --depends-on=<dependency-id> 23 | ``` 24 | 25 | ## Validation 26 | 27 | Before adding: 28 | 1. **Verify both tasks exist** 29 | 2. **Check for circular dependencies** 30 | 3. **Ensure dependency makes logical sense** 31 | 4. **Warn if creating complex chains** 32 | 33 | ## Smart Features 34 | 35 | - Detect if dependency already exists 36 | - Suggest related dependencies 37 | - Show impact on task flow 38 | - Update task priorities if needed 39 | 40 | ## Post-Addition 41 | 42 | After adding dependency: 43 | 1. Show updated dependency graph 44 | 2. Identify any newly blocked tasks 45 | 3. Suggest task order changes 46 | 4. Update project timeline 47 | 48 | ## Example Flows 49 | 50 | ``` 51 | /project:tm/add-dependency 5 needs 3 52 | → Task #5 now depends on Task #3 53 | → Task #5 is now blocked until #3 completes 54 | → Suggested: Also consider if #5 needs #4 55 | ``` ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/add-dependency/add-dependency.md: -------------------------------------------------------------------------------- ```markdown 1 | Add a dependency between tasks. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse the task IDs to establish dependency relationship. 6 | 7 | ## Adding Dependencies 8 | 9 | Creates a dependency where one task must be completed before another can start. 10 | 11 | ## Argument Parsing 12 | 13 | Parse natural language or IDs: 14 | - "make 5 depend on 3" → task 5 depends on task 3 15 | - "5 needs 3" → task 5 depends on task 3 16 | - "5 3" → task 5 depends on task 3 17 | - "5 after 3" → task 5 depends on task 3 18 | 19 | ## Execution 20 | 21 | ```bash 22 | task-master add-dependency --id=<task-id> --depends-on=<dependency-id> 23 | ``` 24 | 25 | ## Validation 26 | 27 | Before adding: 28 | 1. **Verify both tasks exist** 29 | 2. **Check for circular dependencies** 30 | 3. **Ensure dependency makes logical sense** 31 | 4. **Warn if creating complex chains** 32 | 33 | ## Smart Features 34 | 35 | - Detect if dependency already exists 36 | - Suggest related dependencies 37 | - Show impact on task flow 38 | - Update task priorities if needed 39 | 40 | ## Post-Addition 41 | 42 | After adding dependency: 43 | 1. Show updated dependency graph 44 | 2. Identify any newly blocked tasks 45 | 3. Suggest task order changes 46 | 4. Update project timeline 47 | 48 | ## Example Flows 49 | 50 | ``` 51 | /project:tm/add-dependency 5 needs 3 52 | → Task #5 now depends on Task #3 53 | → Task #5 is now blocked until #3 completes 54 | → Suggested: Also consider if #5 needs #4 55 | ``` ``` -------------------------------------------------------------------------------- /apps/cli/package.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "name": "@tm/cli", 3 | "description": "Task Master CLI - Command line interface for task management", 4 | "type": "module", 5 | "private": true, 6 | "main": "./dist/index.js", 7 | "types": "./src/index.ts", 8 | "exports": { 9 | ".": "./src/index.ts" 10 | }, 11 | "files": ["dist", "README.md"], 12 | "scripts": { 13 | "typecheck": "tsc --noEmit", 14 | "lint": "biome check src", 15 | "format": "biome format --write src", 16 | "test": "vitest run", 17 | "test:watch": "vitest", 18 | "test:coverage": "vitest run --coverage", 19 | "test:unit": "vitest run -t unit", 20 | "test:integration": "vitest run -t integration", 21 | "test:e2e": "vitest run --dir tests/e2e", 22 | "test:ci": "vitest run --coverage --reporter=dot" 23 | }, 24 | "dependencies": { 25 | "@tm/core": "*", 26 | "boxen": "^8.0.1", 27 | "chalk": "5.6.2", 28 | "cli-table3": "^0.6.5", 29 | "commander": "^12.1.0", 30 | "inquirer": "^12.5.0", 31 | "ora": "^8.2.0" 32 | }, 33 | "devDependencies": { 34 | "@biomejs/biome": "^1.9.4", 35 | "@types/inquirer": "^9.0.3", 36 | "@types/node": "^22.10.5", 37 | "tsx": "^4.20.4", 38 | "typescript": "^5.7.3", 39 | "vitest": "^2.1.8" 40 | }, 41 | "engines": { 42 | "node": ">=18.0.0" 43 | }, 44 | "keywords": ["task-master", "cli", "task-management", "productivity"], 45 | "author": "", 46 | "license": "MIT", 47 | "typesVersions": { 48 | "*": { 49 | "*": ["src/*"] 50 | } 51 | } 52 | } 53 | ``` -------------------------------------------------------------------------------- /packages/build-config/src/tsdown.base.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * Base tsdown configuration for Task Master monorepo 3 | * Provides shared configuration that can be extended by individual packages 4 | */ 5 | import type { UserConfig } from 'tsdown'; 6 | 7 | const isProduction = process.env.NODE_ENV === 'production'; 8 | const isDevelopment = !isProduction; 9 | 10 | /** 11 | * Environment helpers 12 | */ 13 | export const env = { 14 | isProduction, 15 | isDevelopment, 16 | NODE_ENV: process.env.NODE_ENV || 'development' 17 | }; 18 | 19 | /** 20 | * Base tsdown configuration for all packages 21 | * Since everything gets bundled into root dist/ anyway, use consistent settings 22 | */ 23 | export const baseConfig: Partial<UserConfig> = { 24 | sourcemap: isDevelopment, 25 | format: 'esm', 26 | platform: 'node', 27 | dts: isDevelopment, 28 | minify: isProduction, 29 | treeshake: isProduction, 30 | // Better debugging in development 31 | ...(isDevelopment && { 32 | keepNames: true, 33 | splitting: false // Disable code splitting for better stack traces 34 | }), 35 | // Keep all npm dependencies external (available via node_modules) 36 | external: [/^[^@./]/, /^@(?!tm\/)/] 37 | }; 38 | 39 | /** 40 | * Utility function to merge configurations 41 | * Simplified for tsdown usage 42 | */ 43 | export function mergeConfig( 44 | base: Partial<UserConfig>, 45 | overrides: Partial<UserConfig> 46 | ): Partial<UserConfig> { 47 | return { 48 | ...base, 49 | ...overrides 50 | }; 51 | } 52 | ``` -------------------------------------------------------------------------------- /tsdown.config.ts: -------------------------------------------------------------------------------- ```typescript 1 | import { defineConfig } from 'tsdown'; 2 | import { baseConfig, mergeConfig } from '@tm/build-config'; 3 | import { load as dotenvLoad } from 'dotenv-mono'; 4 | 5 | dotenvLoad(); 6 | 7 | // Get all TM_PUBLIC_* env variables for build-time injection 8 | const getBuildTimeEnvs = () => { 9 | const envs: Record<string, string> = {}; 10 | 11 | // Inject package.json version at build time 12 | try { 13 | const packageJson = JSON.parse( 14 | require('fs').readFileSync('package.json', 'utf8') 15 | ); 16 | envs['TM_PUBLIC_VERSION'] = packageJson.version || 'unknown'; 17 | } catch (error) { 18 | console.warn('Could not read package.json version during build:', error); 19 | envs['TM_PUBLIC_VERSION'] = 'unknown'; 20 | } 21 | 22 | for (const [key, value] of Object.entries(process.env)) { 23 | if (key.startsWith('TM_PUBLIC_')) { 24 | // Return the actual value, not JSON.stringify'd 25 | envs[key] = value || ''; 26 | } 27 | } 28 | return envs; 29 | }; 30 | 31 | export default defineConfig( 32 | mergeConfig(baseConfig, { 33 | entry: { 34 | 'task-master': 'scripts/dev.js', 35 | 'mcp-server': 'mcp-server/server.js' 36 | }, 37 | outDir: 'dist', 38 | copy: ['assets'], 39 | ignoreWatch: ['node_modules', 'dist', 'tests', 'apps/extension'], 40 | // Bundle only our workspace packages, keep npm dependencies external 41 | noExternal: [/^@tm\//], 42 | env: getBuildTimeEnvs() 43 | }) 44 | ); 45 | ``` -------------------------------------------------------------------------------- /src/ai-providers/openrouter.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * openrouter.js 3 | * AI provider implementation for OpenRouter models using Vercel AI SDK. 4 | */ 5 | 6 | import { createOpenRouter } from '@openrouter/ai-sdk-provider'; 7 | import { BaseAIProvider } from './base-provider.js'; 8 | 9 | export class OpenRouterAIProvider extends BaseAIProvider { 10 | constructor() { 11 | super(); 12 | this.name = 'OpenRouter'; 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 OpenRouter API key 18 | */ 19 | getRequiredApiKeyName() { 20 | return 'OPENROUTER_API_KEY'; 21 | } 22 | 23 | /** 24 | * Creates and returns an OpenRouter client instance. 25 | * @param {object} params - Parameters for client initialization 26 | * @param {string} params.apiKey - OpenRouter API key 27 | * @param {string} [params.baseURL] - Optional custom API endpoint 28 | * @returns {Function} OpenRouter 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('OpenRouter API key is required.'); 37 | } 38 | 39 | return createOpenRouter({ 40 | apiKey, 41 | ...(baseURL && { baseURL }) 42 | }); 43 | } catch (error) { 44 | this.handleError('client initialization', error); 45 | } 46 | } 47 | } 48 | ``` -------------------------------------------------------------------------------- /src/utils/logger-utils.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * Logger utility functions for Task Master 3 | * Provides standardized logging patterns for both CLI and utility contexts 4 | */ 5 | 6 | import { log as utilLog } from '../../scripts/modules/utils.js'; 7 | 8 | /** 9 | * Creates a standard logger object that wraps the utility log function 10 | * This provides a consistent logger interface across different parts of the application 11 | * @returns {Object} A logger object with standard logging methods (info, warn, error, debug, success) 12 | */ 13 | export function createStandardLogger() { 14 | return { 15 | info: (msg, ...args) => utilLog('info', msg, ...args), 16 | warn: (msg, ...args) => utilLog('warn', msg, ...args), 17 | error: (msg, ...args) => utilLog('error', msg, ...args), 18 | debug: (msg, ...args) => utilLog('debug', msg, ...args), 19 | success: (msg, ...args) => utilLog('success', msg, ...args) 20 | }; 21 | } 22 | 23 | /** 24 | * Creates a logger using either the provided logger or a default standard logger 25 | * This is the recommended pattern for functions that accept an optional logger parameter 26 | * @param {Object|null} providedLogger - Optional logger object passed from caller 27 | * @returns {Object} A logger object with standard logging methods 28 | */ 29 | export function getLoggerOrDefault(providedLogger = null) { 30 | return providedLogger || createStandardLogger(); 31 | } 32 | ``` -------------------------------------------------------------------------------- /mcp-server/src/tools/response-language.js: -------------------------------------------------------------------------------- ```javascript 1 | import { z } from 'zod'; 2 | import { 3 | createErrorResponse, 4 | handleApiResult, 5 | withNormalizedProjectRoot 6 | } from './utils.js'; 7 | import { responseLanguageDirect } from '../core/direct-functions/response-language.js'; 8 | 9 | export function registerResponseLanguageTool(server) { 10 | server.addTool({ 11 | name: 'response-language', 12 | description: 'Get or set the response language for the project', 13 | parameters: z.object({ 14 | projectRoot: z 15 | .string() 16 | .describe( 17 | 'The root directory for the project. ALWAYS SET THIS TO THE PROJECT ROOT DIRECTORY. IF NOT SET, THE TOOL WILL NOT WORK.' 18 | ), 19 | language: z 20 | .string() 21 | .describe( 22 | 'The new response language to set. like "中文" "English" or "español".' 23 | ) 24 | }), 25 | execute: withNormalizedProjectRoot(async (args, { log, session }) => { 26 | try { 27 | log.info( 28 | `Executing response-language tool with args: ${JSON.stringify(args)}` 29 | ); 30 | 31 | const result = await responseLanguageDirect( 32 | { 33 | ...args, 34 | projectRoot: args.projectRoot 35 | }, 36 | log, 37 | { session } 38 | ); 39 | return handleApiResult(result, log, 'Error setting response language'); 40 | } catch (error) { 41 | log.error(`Error in response-language tool: ${error.message}`); 42 | return createErrorResponse(error.message); 43 | } 44 | }) 45 | }); 46 | } 47 | ``` -------------------------------------------------------------------------------- /.github/workflows/backfill-duplicate-comments.yml: -------------------------------------------------------------------------------- ```yaml 1 | name: Backfill Duplicate Comments 2 | # description: Triggers duplicate detection for old issues that don't have duplicate comments 3 | 4 | on: 5 | workflow_dispatch: 6 | inputs: 7 | days_back: 8 | description: "How many days back to look for old issues" 9 | required: false 10 | default: "90" 11 | type: string 12 | dry_run: 13 | description: "Dry run mode (true to only log what would be done)" 14 | required: false 15 | default: "true" 16 | type: choice 17 | options: 18 | - "true" 19 | - "false" 20 | 21 | jobs: 22 | backfill-duplicate-comments: 23 | runs-on: ubuntu-latest 24 | timeout-minutes: 30 25 | permissions: 26 | contents: read 27 | issues: read 28 | actions: write 29 | 30 | steps: 31 | - name: Checkout repository 32 | uses: actions/checkout@v4 33 | 34 | - name: Setup Node.js 35 | uses: actions/setup-node@v4 36 | with: 37 | node-version: 20 38 | 39 | - name: Backfill duplicate comments 40 | run: node .github/scripts/backfill-duplicate-comments.mjs 41 | env: 42 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 43 | GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} 44 | GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }} 45 | DAYS_BACK: ${{ inputs.days_back }} 46 | DRY_RUN: ${{ inputs.dry_run }} 47 | ``` -------------------------------------------------------------------------------- /apps/extension/src/webview/utils/toast.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * Toast notification utilities 3 | */ 4 | 5 | import type { ToastNotification, AppAction } from '../types'; 6 | 7 | let toastIdCounter = 0; 8 | 9 | export const createToast = ( 10 | type: ToastNotification['type'], 11 | title: string, 12 | message: string, 13 | duration?: number 14 | ): ToastNotification => ({ 15 | id: `toast-${++toastIdCounter}`, 16 | type, 17 | title, 18 | message, 19 | duration 20 | }); 21 | 22 | export const showSuccessToast = 23 | (dispatch: React.Dispatch<AppAction>) => 24 | (title: string, message: string, duration?: number) => { 25 | dispatch({ 26 | type: 'ADD_TOAST', 27 | payload: createToast('success', title, message, duration) 28 | }); 29 | }; 30 | 31 | export const showInfoToast = 32 | (dispatch: React.Dispatch<AppAction>) => 33 | (title: string, message: string, duration?: number) => { 34 | dispatch({ 35 | type: 'ADD_TOAST', 36 | payload: createToast('info', title, message, duration) 37 | }); 38 | }; 39 | 40 | export const showWarningToast = 41 | (dispatch: React.Dispatch<AppAction>) => 42 | (title: string, message: string, duration?: number) => { 43 | dispatch({ 44 | type: 'ADD_TOAST', 45 | payload: createToast('warning', title, message, duration) 46 | }); 47 | }; 48 | 49 | export const showErrorToast = 50 | (dispatch: React.Dispatch<AppAction>) => 51 | (title: string, message: string, duration?: number) => { 52 | dispatch({ 53 | type: 'ADD_TOAST', 54 | payload: createToast('error', title, message, duration) 55 | }); 56 | }; 57 | ``` -------------------------------------------------------------------------------- /packages/tm-core/src/storage/index.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * @fileoverview Storage layer for the tm-core package 3 | * This file exports all storage-related classes and interfaces 4 | */ 5 | 6 | // Export storage implementations 7 | export { FileStorage } from './file-storage/index.js'; 8 | export { ApiStorage, type ApiStorageConfig } from './api-storage.js'; 9 | export { StorageFactory } from './storage-factory.js'; 10 | 11 | // Export storage interface and types 12 | export type { 13 | IStorage, 14 | StorageStats 15 | } from '../interfaces/storage.interface.js'; 16 | 17 | // Placeholder exports - these will be implemented in later tasks 18 | export interface StorageAdapter { 19 | read(path: string): Promise<string | null>; 20 | write(path: string, data: string): Promise<void>; 21 | exists(path: string): Promise<boolean>; 22 | delete(path: string): Promise<void>; 23 | } 24 | 25 | /** 26 | * @deprecated This is a placeholder class that will be properly implemented in later tasks 27 | */ 28 | export class PlaceholderStorage implements StorageAdapter { 29 | private data = new Map<string, string>(); 30 | 31 | async read(path: string): Promise<string | null> { 32 | return this.data.get(path) || null; 33 | } 34 | 35 | async write(path: string, data: string): Promise<void> { 36 | this.data.set(path, data); 37 | } 38 | 39 | async exists(path: string): Promise<boolean> { 40 | return this.data.has(path); 41 | } 42 | 43 | async delete(path: string): Promise<void> { 44 | this.data.delete(path); 45 | } 46 | } 47 | ``` -------------------------------------------------------------------------------- /src/prompts/schemas/parameter.schema.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/eyaltoledano/claude-task-master/blob/main/src/prompts/schemas/parameter.schema.json", 4 | "version": "1.0.0", 5 | "title": "Task Master Prompt Parameter", 6 | "description": "Schema for individual prompt template parameters", 7 | "type": "object", 8 | "required": ["type", "description"], 9 | "properties": { 10 | "type": { 11 | "type": "string", 12 | "enum": ["string", "number", "boolean", "array", "object"], 13 | "description": "The expected data type for this parameter" 14 | }, 15 | "description": { 16 | "type": "string", 17 | "minLength": 1, 18 | "description": "Human-readable description of the parameter" 19 | }, 20 | "required": { 21 | "type": "boolean", 22 | "default": false, 23 | "description": "Whether this parameter is required" 24 | }, 25 | "default": { 26 | "description": "Default value for optional parameters" 27 | }, 28 | "enum": { 29 | "type": "array", 30 | "description": "Valid values for string parameters", 31 | "items": { 32 | "type": "string" 33 | } 34 | }, 35 | "pattern": { 36 | "type": "string", 37 | "description": "Regular expression pattern for string validation" 38 | }, 39 | "minimum": { 40 | "type": "number", 41 | "description": "Minimum value for number parameters" 42 | }, 43 | "maximum": { 44 | "type": "number", 45 | "description": "Maximum value for number parameters" 46 | } 47 | } 48 | } 49 | ``` -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancements---feature-requests.md: -------------------------------------------------------------------------------- ```markdown 1 | --- 2 | name: Enhancements & feature requests 3 | about: Suggest an idea for this project 4 | title: 'feat: ' 5 | labels: enhancement 6 | assignees: '' 7 | --- 8 | 9 | > "Direct quote or clear summary of user request or need or user story." 10 | 11 | ### Motivation 12 | 13 | Detailed explanation of why this feature is important. Describe the problem it solves or the benefit it provides. 14 | 15 | ### Proposed Solution 16 | 17 | Clearly describe the proposed feature, including: 18 | 19 | - High-level overview of the feature 20 | - Relevant technologies or integrations 21 | - How it fits into the existing workflow or architecture 22 | 23 | ### High-Level Workflow 24 | 25 | 1. Step-by-step description of how the feature will be implemented 26 | 2. Include necessary intermediate milestones 27 | 28 | ### Key Elements 29 | 30 | - Bullet-point list of technical or UX/UI enhancements 31 | - Mention specific integrations or APIs 32 | - Highlight changes needed in existing data models or commands 33 | 34 | ### Example Workflow 35 | 36 | Provide a clear, concrete example demonstrating the feature: 37 | 38 | ```shell 39 | $ task-master [action] 40 | → Expected response/output 41 | ``` 42 | 43 | ### Implementation Considerations 44 | 45 | - Dependencies on external components or APIs 46 | - Backward compatibility requirements 47 | - Potential performance impacts or resource usage 48 | 49 | ### Out of Scope (Future Considerations) 50 | 51 | Clearly list any features or improvements not included but relevant for future iterations. 52 | ``` -------------------------------------------------------------------------------- /packages/tm-core/src/executors/types.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * Executor types and interfaces for Task Master 3 | */ 4 | 5 | import type { Task } from '../types/index.js'; 6 | 7 | /** 8 | * Supported executor types 9 | */ 10 | export type ExecutorType = 'claude' | 'shell' | 'custom'; 11 | 12 | /** 13 | * Options for executor creation 14 | */ 15 | export interface ExecutorOptions { 16 | type: ExecutorType; 17 | projectRoot: string; 18 | config?: Record<string, any>; 19 | } 20 | 21 | /** 22 | * Result from task execution 23 | */ 24 | export interface ExecutionResult { 25 | success: boolean; 26 | taskId: string; 27 | executorType: ExecutorType; 28 | output?: string; 29 | error?: string; 30 | startTime: string; 31 | endTime?: string; 32 | processId?: number; 33 | } 34 | 35 | /** 36 | * Base interface for all task executors 37 | */ 38 | export interface ITaskExecutor { 39 | /** 40 | * Execute a task 41 | */ 42 | execute(task: Task): Promise<ExecutionResult>; 43 | 44 | /** 45 | * Stop a running task execution 46 | */ 47 | stop?(): Promise<void>; 48 | 49 | /** 50 | * Get executor type 51 | */ 52 | getType(): ExecutorType; 53 | 54 | /** 55 | * Check if executor is available/configured 56 | */ 57 | isAvailable(): Promise<boolean>; 58 | } 59 | 60 | /** 61 | * Configuration for Claude executor 62 | */ 63 | export interface ClaudeExecutorConfig { 64 | command?: string; // Default: 'claude' 65 | systemPrompt?: string; 66 | additionalFlags?: string[]; 67 | } 68 | 69 | /** 70 | * Configuration for Shell executor 71 | */ 72 | export interface ShellExecutorConfig { 73 | shell?: string; // Default: '/bin/bash' 74 | env?: Record<string, string>; 75 | cwd?: string; 76 | } 77 | ``` -------------------------------------------------------------------------------- /src/ai-providers/ollama.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * ollama.js 3 | * AI provider implementation for Ollama models using the ollama-ai-provider package. 4 | */ 5 | 6 | import { createOllama } from 'ollama-ai-provider'; 7 | import { BaseAIProvider } from './base-provider.js'; 8 | 9 | export class OllamaAIProvider extends BaseAIProvider { 10 | constructor() { 11 | super(); 12 | this.name = 'Ollama'; 13 | } 14 | 15 | /** 16 | * Override auth validation - Ollama doesn't require API keys 17 | * @param {object} params - Parameters to validate 18 | */ 19 | validateAuth(_params) { 20 | // Ollama runs locally and doesn't require API keys 21 | // No authentication validation needed 22 | } 23 | 24 | /** 25 | * Creates and returns an Ollama client instance. 26 | * @param {object} params - Parameters for client initialization 27 | * @param {string} [params.baseURL] - Optional Ollama base URL (defaults to http://localhost:11434) 28 | * @returns {Function} Ollama client function 29 | * @throws {Error} If initialization fails 30 | */ 31 | getClient(params) { 32 | try { 33 | const { baseURL } = params; 34 | 35 | return createOllama({ 36 | ...(baseURL && { baseURL }) 37 | }); 38 | } catch (error) { 39 | this.handleError('client initialization', error); 40 | } 41 | } 42 | 43 | isRequiredApiKey() { 44 | return false; 45 | } 46 | 47 | /** 48 | * Returns the required API key environment variable name for Ollama. 49 | * @returns {string} The environment variable name 50 | */ 51 | getRequiredApiKeyName() { 52 | return 'OLLAMA_API_KEY'; 53 | } 54 | } 55 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/remove-dependency/remove-dependency.md: -------------------------------------------------------------------------------- ```markdown 1 | Remove a dependency between tasks. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse the task IDs to remove dependency relationship. 6 | 7 | ## Removing Dependencies 8 | 9 | Removes a dependency relationship, potentially unblocking tasks. 10 | 11 | ## Argument Parsing 12 | 13 | Parse natural language or IDs: 14 | - "remove dependency between 5 and 3" 15 | - "5 no longer needs 3" 16 | - "unblock 5 from 3" 17 | - "5 3" → remove dependency of 5 on 3 18 | 19 | ## Execution 20 | 21 | ```bash 22 | task-master remove-dependency --id=<task-id> --depends-on=<dependency-id> 23 | ``` 24 | 25 | ## Pre-Removal Checks 26 | 27 | 1. **Verify dependency exists** 28 | 2. **Check impact on task flow** 29 | 3. **Warn if it breaks logical sequence** 30 | 4. **Show what will be unblocked** 31 | 32 | ## Smart Analysis 33 | 34 | Before removing: 35 | - Show why dependency might have existed 36 | - Check if removal makes tasks executable 37 | - Verify no critical path disruption 38 | - Suggest alternative dependencies 39 | 40 | ## Post-Removal 41 | 42 | After removing: 43 | 1. Show updated task status 44 | 2. List newly unblocked tasks 45 | 3. Update project timeline 46 | 4. Suggest next actions 47 | 48 | ## Safety Features 49 | 50 | - Confirm if removing critical dependency 51 | - Show tasks that become immediately actionable 52 | - Warn about potential issues 53 | - Keep removal history 54 | 55 | ## Example 56 | 57 | ``` 58 | /project:tm/remove-dependency 5 from 3 59 | → Removed: Task #5 no longer depends on #3 60 | → Task #5 is now UNBLOCKED and ready to start 61 | → Warning: Consider if #5 still needs #2 completed first 62 | ``` ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/remove-dependency/remove-dependency.md: -------------------------------------------------------------------------------- ```markdown 1 | Remove a dependency between tasks. 2 | 3 | Arguments: $ARGUMENTS 4 | 5 | Parse the task IDs to remove dependency relationship. 6 | 7 | ## Removing Dependencies 8 | 9 | Removes a dependency relationship, potentially unblocking tasks. 10 | 11 | ## Argument Parsing 12 | 13 | Parse natural language or IDs: 14 | - "remove dependency between 5 and 3" 15 | - "5 no longer needs 3" 16 | - "unblock 5 from 3" 17 | - "5 3" → remove dependency of 5 on 3 18 | 19 | ## Execution 20 | 21 | ```bash 22 | task-master remove-dependency --id=<task-id> --depends-on=<dependency-id> 23 | ``` 24 | 25 | ## Pre-Removal Checks 26 | 27 | 1. **Verify dependency exists** 28 | 2. **Check impact on task flow** 29 | 3. **Warn if it breaks logical sequence** 30 | 4. **Show what will be unblocked** 31 | 32 | ## Smart Analysis 33 | 34 | Before removing: 35 | - Show why dependency might have existed 36 | - Check if removal makes tasks executable 37 | - Verify no critical path disruption 38 | - Suggest alternative dependencies 39 | 40 | ## Post-Removal 41 | 42 | After removing: 43 | 1. Show updated task status 44 | 2. List newly unblocked tasks 45 | 3. Update project timeline 46 | 4. Suggest next actions 47 | 48 | ## Safety Features 49 | 50 | - Confirm if removing critical dependency 51 | - Show tasks that become immediately actionable 52 | - Warn about potential issues 53 | - Keep removal history 54 | 55 | ## Example 56 | 57 | ``` 58 | /project:tm/remove-dependency 5 from 3 59 | → Removed: Task #5 no longer depends on #3 60 | → Task #5 is now UNBLOCKED and ready to start 61 | → Warning: Consider if #5 still needs #2 completed first 62 | ``` ``` -------------------------------------------------------------------------------- /.taskmaster/tasks/task_004_tm-start.txt: -------------------------------------------------------------------------------- ``` 1 | # Task ID: 4 2 | # Title: Implement claude-code executor 3 | # Status: pending 4 | # Dependencies: 3 5 | # Priority: high 6 | # Description: Add functionality to execute the claude-code command with the built prompt 7 | # Details: 8 | Implement the functionality to execute the claude command with the built prompt. This should use Node.js child_process.exec() to run the command directly in the terminal. 9 | 10 | ```typescript 11 | import { exec } from 'child_process'; 12 | 13 | // Inside execute method, after task validation 14 | private async executeClaude(prompt: string): Promise<void> { 15 | console.log('Starting claude-code to implement the task...'); 16 | 17 | try { 18 | // Execute claude with the prompt 19 | const claudeCommand = `claude "${prompt.replace(/"/g, '\\"')}"`; 20 | 21 | // Use execSync to wait for the command to complete 22 | const { execSync } = require('child_process'); 23 | execSync(claudeCommand, { stdio: 'inherit' }); 24 | 25 | console.log('Claude session completed.'); 26 | } catch (error) { 27 | console.error('Error executing claude-code:', error.message); 28 | process.exit(1); 29 | } 30 | } 31 | ``` 32 | 33 | Then call this method from the execute method after building the prompt. 34 | 35 | # Test Strategy: 36 | Test by running the command with a valid task ID and verifying that the claude command is executed with the correct prompt. Check that the command handles errors appropriately if claude-code is not available. 37 | ``` -------------------------------------------------------------------------------- /apps/extension/src/components/TaskDetails/PriorityBadge.tsx: -------------------------------------------------------------------------------- ```typescript 1 | import type React from 'react'; 2 | import type { TaskMasterTask } from '../../webview/types'; 3 | 4 | // Custom Priority Badge Component with theme-adaptive styling 5 | export const PriorityBadge: React.FC<{ 6 | priority: TaskMasterTask['priority']; 7 | }> = ({ priority }) => { 8 | const getPriorityColors = (priority: string) => { 9 | switch (priority) { 10 | case 'high': 11 | return { 12 | backgroundColor: 'rgba(239, 68, 68, 0.2)', // red-500 with opacity 13 | color: '#dc2626', // red-600 - works in both themes 14 | borderColor: 'rgba(239, 68, 68, 0.4)' 15 | }; 16 | case 'medium': 17 | return { 18 | backgroundColor: 'rgba(245, 158, 11, 0.2)', // amber-500 with opacity 19 | color: '#d97706', // amber-600 - works in both themes 20 | borderColor: 'rgba(245, 158, 11, 0.4)' 21 | }; 22 | case 'low': 23 | return { 24 | backgroundColor: 'rgba(34, 197, 94, 0.2)', // green-500 with opacity 25 | color: '#16a34a', // green-600 - works in both themes 26 | borderColor: 'rgba(34, 197, 94, 0.4)' 27 | }; 28 | default: 29 | return { 30 | backgroundColor: 'rgba(156, 163, 175, 0.2)', 31 | color: 'var(--vscode-foreground)', 32 | borderColor: 'rgba(156, 163, 175, 0.4)' 33 | }; 34 | } 35 | }; 36 | 37 | const colors = getPriorityColors(priority || ''); 38 | 39 | return ( 40 | <span 41 | className="inline-flex items-center px-2 py-1 text-xs font-medium rounded-md border" 42 | style={colors} 43 | > 44 | {priority || 'None'} 45 | </span> 46 | ); 47 | }; 48 | ``` -------------------------------------------------------------------------------- /.taskmaster/reports/task-complexity-report.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "meta": { 3 | "generatedAt": "2025-08-02T14:28:59.851Z", 4 | "tasksAnalyzed": 1, 5 | "totalTasks": 93, 6 | "analysisCount": 1, 7 | "thresholdScore": 5, 8 | "projectName": "Taskmaster", 9 | "usedResearch": false 10 | }, 11 | "complexityAnalysis": [ 12 | { 13 | "taskId": 24, 14 | "taskTitle": "Implement AI-Powered Test Generation Command", 15 | "complexityScore": 8, 16 | "recommendedSubtasks": 6, 17 | "expansionPrompt": "Expand task 24 'Implement AI-Powered Test Generation Command' into 6 subtasks, focusing on: 1) Command structure implementation, 2) AI prompt engineering for test generation, 3) Test file generation and output, 4) Framework-specific template implementation, 5) MCP tool integration, and 6) Documentation and help system integration. Include detailed implementation steps, dependencies, and testing approaches for each subtask.", 18 | "reasoning": "This task has high complexity due to several challenging aspects: 1) AI integration requiring sophisticated prompt engineering, 2) Test generation across multiple frameworks, 3) File system operations with proper error handling, 4) MCP tool integration, 5) Complex configuration requirements, and 6) Framework-specific template generation. The task already has 5 subtasks but could benefit from reorganization based on the updated implementation details in the info blocks, particularly around framework support and configuration." 19 | } 20 | ] 21 | } 22 | ``` -------------------------------------------------------------------------------- /mcp-server/src/custom-sdk/index.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * src/ai-providers/custom-sdk/mcp/index.js 3 | * 4 | * AI SDK factory function for MCP provider. 5 | * Creates MCP language model instances with session-based AI operations. 6 | */ 7 | 8 | import { MCPLanguageModel } from './language-model.js'; 9 | 10 | /** 11 | * Create MCP provider factory function following AI SDK patterns 12 | * @param {object} options - Provider options 13 | * @param {object} options.session - MCP session object 14 | * @param {object} options.defaultSettings - Default settings for the provider 15 | * @returns {Function} Provider factory function 16 | */ 17 | export function createMCP(options = {}) { 18 | if (!options.session) { 19 | throw new Error('MCP provider requires session object'); 20 | } 21 | 22 | // Return the provider factory function that AI SDK expects 23 | const provider = function (modelId, settings = {}) { 24 | if (new.target) { 25 | throw new Error( 26 | 'The MCP model function cannot be called with the new keyword.' 27 | ); 28 | } 29 | 30 | return new MCPLanguageModel({ 31 | session: options.session, 32 | modelId: modelId || 'claude-3-5-sonnet-20241022', 33 | settings: { 34 | temperature: settings.temperature, 35 | maxTokens: settings.maxTokens, 36 | ...options.defaultSettings, 37 | ...settings 38 | } 39 | }); 40 | }; 41 | 42 | // Add required methods for AI SDK compatibility 43 | provider.languageModel = (modelId, settings) => provider(modelId, settings); 44 | provider.chat = (modelId, settings) => provider(modelId, settings); 45 | 46 | return provider; 47 | } 48 | ``` -------------------------------------------------------------------------------- /packages/tm-core/vitest.config.ts: -------------------------------------------------------------------------------- ```typescript 1 | import path from 'node:path'; 2 | import { fileURLToPath } from 'node:url'; 3 | import { defineConfig } from 'vitest/config'; 4 | 5 | // __dirname in ESM 6 | const __filename = fileURLToPath(import.meta.url); 7 | const __dirname = path.dirname(__filename); 8 | 9 | export default defineConfig({ 10 | test: { 11 | globals: true, 12 | environment: 'node', 13 | include: [ 14 | 'tests/**/*.test.ts', 15 | 'tests/**/*.spec.ts', 16 | 'tests/{unit,integration,e2e}/**/*.{test,spec}.ts', 17 | 'src/**/*.test.ts', 18 | 'src/**/*.spec.ts' 19 | ], 20 | exclude: ['node_modules', 'dist', '.git', '.cache'], 21 | coverage: { 22 | provider: 'v8', 23 | reporter: ['text', 'json', 'html', 'lcov'], 24 | exclude: [ 25 | 'node_modules', 26 | 'dist', 27 | 'tests', 28 | '**/*.test.ts', 29 | '**/*.spec.ts', 30 | '**/*.d.ts', 31 | 'src/index.ts' 32 | ], 33 | thresholds: { 34 | branches: 80, 35 | functions: 80, 36 | lines: 80, 37 | statements: 80 38 | } 39 | }, 40 | setupFiles: ['./tests/setup.ts'], 41 | testTimeout: 10000, 42 | clearMocks: true, 43 | restoreMocks: true, 44 | mockReset: true 45 | }, 46 | resolve: { 47 | alias: { 48 | '@': path.resolve(__dirname, './src'), 49 | '@/types': path.resolve(__dirname, './src/types'), 50 | '@/providers': path.resolve(__dirname, './src/providers'), 51 | '@/storage': path.resolve(__dirname, './src/storage'), 52 | '@/parser': path.resolve(__dirname, './src/parser'), 53 | '@/utils': path.resolve(__dirname, './src/utils'), 54 | '@/errors': path.resolve(__dirname, './src/errors') 55 | } 56 | } 57 | }); 58 | ``` -------------------------------------------------------------------------------- /.taskmaster/tasks/task_001_tm-start.txt: -------------------------------------------------------------------------------- ``` 1 | # Task ID: 1 2 | # Title: Create start command class structure 3 | # Status: pending 4 | # Dependencies: None 5 | # Priority: high 6 | # Description: Create the basic structure for the start command following the Commander class pattern 7 | # Details: 8 | Create a new file `apps/cli/src/commands/start.command.ts` based on the existing list.command.ts pattern. Implement the command class with proper command registration, description, and argument handling for the task_id parameter. The class should extend the base Command class and implement the required methods. 9 | 10 | Example structure: 11 | ```typescript 12 | import { Command } from 'commander'; 13 | import { BaseCommand } from './base.command'; 14 | 15 | export class StartCommand extends BaseCommand { 16 | public register(program: Command): void { 17 | program 18 | .command('start') 19 | .alias('tm start') 20 | .description('Start implementing a task using claude-code') 21 | .argument('<task_id>', 'ID of the task to start') 22 | .action(async (taskId: string) => { 23 | await this.execute(taskId); 24 | }); 25 | } 26 | 27 | public async execute(taskId: string): Promise<void> { 28 | // Implementation will be added in subsequent tasks 29 | } 30 | } 31 | ``` 32 | 33 | # Test Strategy: 34 | Verify the command registers correctly by running the CLI with --help and checking that the start command appears with proper description and arguments. Test the basic structure by ensuring the command can be invoked without errors. 35 | ``` -------------------------------------------------------------------------------- /packages/tm-core/src/constants/index.ts: -------------------------------------------------------------------------------- ```typescript 1 | /** 2 | * @fileoverview Constants for Task Master Core 3 | * Single source of truth for all constant values 4 | */ 5 | 6 | import type { 7 | TaskStatus, 8 | TaskPriority, 9 | TaskComplexity 10 | } from '../types/index.js'; 11 | 12 | /** 13 | * Valid task status values 14 | */ 15 | export const TASK_STATUSES: readonly TaskStatus[] = [ 16 | 'pending', 17 | 'in-progress', 18 | 'done', 19 | 'deferred', 20 | 'cancelled', 21 | 'blocked', 22 | 'review' 23 | ] as const; 24 | 25 | /** 26 | * Valid task priority values 27 | */ 28 | export const TASK_PRIORITIES: readonly TaskPriority[] = [ 29 | 'low', 30 | 'medium', 31 | 'high', 32 | 'critical' 33 | ] as const; 34 | 35 | /** 36 | * Valid task complexity values 37 | */ 38 | export const TASK_COMPLEXITIES: readonly TaskComplexity[] = [ 39 | 'simple', 40 | 'moderate', 41 | 'complex', 42 | 'very-complex' 43 | ] as const; 44 | 45 | /** 46 | * Valid output formats for task display 47 | */ 48 | export const OUTPUT_FORMATS = ['text', 'json', 'compact'] as const; 49 | export type OutputFormat = (typeof OUTPUT_FORMATS)[number]; 50 | 51 | /** 52 | * Status icons for display 53 | */ 54 | export const STATUS_ICONS: Record<TaskStatus, string> = { 55 | done: '✓', 56 | completed: '✓', 57 | 'in-progress': '►', 58 | blocked: '⭕', 59 | pending: '○', 60 | deferred: '⏸', 61 | cancelled: '✗', 62 | review: '👁' 63 | } as const; 64 | 65 | /** 66 | * Status colors for display (using chalk color names) 67 | */ 68 | export const STATUS_COLORS: Record<TaskStatus, string> = { 69 | pending: 'yellow', 70 | 'in-progress': 'blue', 71 | done: 'green', 72 | deferred: 'gray', 73 | cancelled: 'red', 74 | blocked: 'magenta', 75 | review: 'cyan', 76 | completed: 'green' 77 | } as const; 78 | ``` -------------------------------------------------------------------------------- /.claude/commands/tm/workflows/smart-workflow.md: -------------------------------------------------------------------------------- ```markdown 1 | Execute an intelligent workflow based on current project state and recent commands. 2 | 3 | This command analyzes: 4 | 1. Recent commands you've run 5 | 2. Current project state 6 | 3. Time of day / day of week 7 | 4. Your working patterns 8 | 9 | Arguments: $ARGUMENTS 10 | 11 | ## Intelligent Workflow Selection 12 | 13 | Based on context, I'll determine the best workflow: 14 | 15 | ### Context Analysis 16 | - Previous command executed 17 | - Current task states 18 | - Unfinished work from last session 19 | - Your typical patterns 20 | 21 | ### Smart Execution 22 | 23 | If last command was: 24 | - `status` → Likely starting work → Run daily standup 25 | - `complete` → Task finished → Find next task 26 | - `list pending` → Planning → Suggest sprint planning 27 | - `expand` → Breaking down work → Show complexity analysis 28 | - `init` → New project → Show onboarding workflow 29 | 30 | If no recent commands: 31 | - Morning? → Daily standup workflow 32 | - Many pending tasks? → Sprint planning 33 | - Tasks blocked? → Dependency resolution 34 | - Friday? → Weekly review 35 | 36 | ### Workflow Composition 37 | 38 | I'll chain appropriate commands: 39 | 1. Analyze current state 40 | 2. Execute primary workflow 41 | 3. Suggest follow-up actions 42 | 4. Prepare environment for coding 43 | 44 | ### Learning Mode 45 | 46 | This command learns from your patterns: 47 | - Track command sequences 48 | - Note time preferences 49 | - Remember common workflows 50 | - Adapt to your style 51 | 52 | Example flows detected: 53 | - Morning: standup → next → start 54 | - After lunch: status → continue task 55 | - End of day: complete → commit → status ``` -------------------------------------------------------------------------------- /assets/claude/commands/tm/workflows/smart-workflow.md: -------------------------------------------------------------------------------- ```markdown 1 | Execute an intelligent workflow based on current project state and recent commands. 2 | 3 | This command analyzes: 4 | 1. Recent commands you've run 5 | 2. Current project state 6 | 3. Time of day / day of week 7 | 4. Your working patterns 8 | 9 | Arguments: $ARGUMENTS 10 | 11 | ## Intelligent Workflow Selection 12 | 13 | Based on context, I'll determine the best workflow: 14 | 15 | ### Context Analysis 16 | - Previous command executed 17 | - Current task states 18 | - Unfinished work from last session 19 | - Your typical patterns 20 | 21 | ### Smart Execution 22 | 23 | If last command was: 24 | - `status` → Likely starting work → Run daily standup 25 | - `complete` → Task finished → Find next task 26 | - `list pending` → Planning → Suggest sprint planning 27 | - `expand` → Breaking down work → Show complexity analysis 28 | - `init` → New project → Show onboarding workflow 29 | 30 | If no recent commands: 31 | - Morning? → Daily standup workflow 32 | - Many pending tasks? → Sprint planning 33 | - Tasks blocked? → Dependency resolution 34 | - Friday? → Weekly review 35 | 36 | ### Workflow Composition 37 | 38 | I'll chain appropriate commands: 39 | 1. Analyze current state 40 | 2. Execute primary workflow 41 | 3. Suggest follow-up actions 42 | 4. Prepare environment for coding 43 | 44 | ### Learning Mode 45 | 46 | This command learns from your patterns: 47 | - Track command sequences 48 | - Note time preferences 49 | - Remember common workflows 50 | - Adapt to your style 51 | 52 | Example flows detected: 53 | - Morning: standup → next → start 54 | - After lunch: status → continue task 55 | - End of day: complete → commit → status ``` -------------------------------------------------------------------------------- /.kiro/steering/kiro_rules.md: -------------------------------------------------------------------------------- ```markdown 1 | --- 2 | inclusion: always 3 | --- 4 | 5 | - **Required Rule Structure:** 6 | ```markdown 7 | --- 8 | description: Clear, one-line description of what the rule enforces 9 | globs: path/to/files/*.ext, other/path/**/* 10 | alwaysApply: boolean 11 | --- 12 | 13 | - **Main Points in Bold** 14 | - Sub-points with details 15 | - Examples and explanations 16 | ``` 17 | 18 | - **File References:** 19 | - Use `[filename](mdc:path/to/file)` ([filename](mdc:filename)) to reference files 20 | - Example: [prisma.md](.kiro/steering/prisma.md) for rule references 21 | - Example: [schema.prisma](mdc:prisma/schema.prisma) for code references 22 | 23 | - **Code Examples:** 24 | - Use language-specific code blocks 25 | ```typescript 26 | // ✅ DO: Show good examples 27 | const goodExample = true; 28 | 29 | // ❌ DON'T: Show anti-patterns 30 | const badExample = false; 31 | ``` 32 | 33 | - **Rule Content Guidelines:** 34 | - Start with high-level overview 35 | - Include specific, actionable requirements 36 | - Show examples of correct implementation 37 | - Reference existing code when possible 38 | - Keep rules DRY by referencing other rules 39 | 40 | - **Rule Maintenance:** 41 | - Update rules when new patterns emerge 42 | - Add examples from actual codebase 43 | - Remove outdated patterns 44 | - Cross-reference related rules 45 | 46 | - **Best Practices:** 47 | - Use bullet points for clarity 48 | - Keep descriptions concise 49 | - Include both DO and DON'T examples 50 | - Reference actual code over theoretical examples 51 | - Use consistent formatting across rules ``` -------------------------------------------------------------------------------- /scripts/modules/update-config-tokens.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * update-config-tokens.js 3 | * Updates config.json with correct maxTokens values from supported-models.json 4 | */ 5 | 6 | import fs from 'fs'; 7 | import supportedModels from './supported-models.json' with { type: 'json' }; 8 | 9 | /** 10 | * Updates the config file with correct maxTokens values from supported-models.json 11 | * @param {string} configPath - Path to the config.json file to update 12 | * @returns {boolean} True if successful, false otherwise 13 | */ 14 | export function updateConfigMaxTokens(configPath) { 15 | try { 16 | // Load config 17 | const config = JSON.parse(fs.readFileSync(configPath, 'utf-8')); 18 | 19 | // Update each role's maxTokens if the model exists in supported-models.json 20 | const roles = ['main', 'research', 'fallback']; 21 | 22 | for (const role of roles) { 23 | if (config.models && config.models[role]) { 24 | const provider = config.models[role].provider; 25 | const modelId = config.models[role].modelId; 26 | 27 | // Find the model in supported models 28 | if (supportedModels[provider]) { 29 | const modelData = supportedModels[provider].find( 30 | (m) => m.id === modelId 31 | ); 32 | if (modelData && modelData.max_tokens) { 33 | config.models[role].maxTokens = modelData.max_tokens; 34 | } 35 | } 36 | } 37 | } 38 | 39 | // Write back the updated config 40 | fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); 41 | return true; 42 | } catch (error) { 43 | console.error('Error updating config maxTokens:', error.message); 44 | return false; 45 | } 46 | } 47 | ``` -------------------------------------------------------------------------------- /tests/unit/task-manager/clear-subtasks.test.js: -------------------------------------------------------------------------------- ```javascript 1 | import fs from 'fs'; 2 | import path from 'path'; 3 | import clearSubtasks from '../../../scripts/modules/task-manager/clear-subtasks.js'; 4 | 5 | const TMP = path.join(process.cwd(), '.tmp_clear_subtasks'); 6 | const TASKS = path.join(TMP, 'tasks.json'); 7 | 8 | function seed() { 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: [ 17 | { 18 | id: 1, 19 | title: 'Parent', 20 | subtasks: [ 21 | { id: 1, title: 'Sub1' }, 22 | { id: 2, title: 'Sub2' } 23 | ] 24 | }, 25 | { id: 2, title: 'Solo' } 26 | ], 27 | metadata: { created: new Date().toISOString() } 28 | } 29 | }, 30 | null, 31 | 2 32 | ) 33 | ); 34 | } 35 | 36 | describe('clearSubtasks', () => { 37 | beforeEach(seed); 38 | afterAll(() => fs.rmSync(TMP, { recursive: true, force: true })); 39 | 40 | it('clears subtasks for given task id', () => { 41 | clearSubtasks(TASKS, '1', { projectRoot: TMP, tag: 'master' }); 42 | const data = JSON.parse(fs.readFileSync(TASKS, 'utf8')); 43 | const parent = data.master.tasks.find((t) => t.id === 1); 44 | expect(parent.subtasks.length).toBe(0); 45 | }); 46 | 47 | it('does nothing when task has no subtasks', () => { 48 | clearSubtasks(TASKS, '2', { projectRoot: TMP, tag: 'master' }); 49 | const data = JSON.parse(fs.readFileSync(TASKS, 'utf8')); 50 | const solo = data.master.tasks.find((t) => t.id === 2); 51 | expect(solo.subtasks).toBeUndefined(); 52 | }); 53 | }); 54 | ``` -------------------------------------------------------------------------------- /mcp-server/src/core/utils/env-utils.js: -------------------------------------------------------------------------------- ```javascript 1 | /** 2 | * Temporarily sets environment variables from session.env, executes an action, 3 | * and restores the original environment variables. 4 | * @param {object | undefined} sessionEnv - The environment object from the session. 5 | * @param {Function} actionFn - An async function to execute with the temporary environment. 6 | * @returns {Promise<any>} The result of the actionFn. 7 | */ 8 | export async function withSessionEnv(sessionEnv, actionFn) { 9 | if ( 10 | !sessionEnv || 11 | typeof sessionEnv !== 'object' || 12 | Object.keys(sessionEnv).length === 0 13 | ) { 14 | // If no sessionEnv is provided, just run the action directly 15 | return await actionFn(); 16 | } 17 | 18 | const originalEnv = {}; 19 | const keysToRestore = []; 20 | 21 | // Set environment variables from sessionEnv 22 | for (const key in sessionEnv) { 23 | if (Object.prototype.hasOwnProperty.call(sessionEnv, key)) { 24 | // Store original value if it exists, otherwise mark for deletion 25 | if (process.env[key] !== undefined) { 26 | originalEnv[key] = process.env[key]; 27 | } 28 | keysToRestore.push(key); 29 | process.env[key] = sessionEnv[key]; 30 | } 31 | } 32 | 33 | try { 34 | // Execute the provided action function 35 | return await actionFn(); 36 | } finally { 37 | // Restore original environment variables 38 | for (const key of keysToRestore) { 39 | if (Object.prototype.hasOwnProperty.call(originalEnv, key)) { 40 | process.env[key] = originalEnv[key]; 41 | } else { 42 | // If the key didn't exist originally, delete it 43 | delete process.env[key]; 44 | } 45 | } 46 | } 47 | } 48 | ```