This is page 1 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 -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- ``` 1 | 22 ``` -------------------------------------------------------------------------------- /.cursorignore: -------------------------------------------------------------------------------- ``` 1 | package-lock.json 2 | 3 | # Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv) 4 | 5 | node_modules/ 6 | 7 | ``` -------------------------------------------------------------------------------- /.mcp.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "mcpServers": { 3 | "task-master-ai": { 4 | "type": "stdio", 5 | "command": "npx", 6 | "args": ["-y", "task-master-ai"] 7 | } 8 | } 9 | } 10 | ``` -------------------------------------------------------------------------------- /.coderabbit.yaml: -------------------------------------------------------------------------------- ```yaml 1 | reviews: 2 | profile: assertive 3 | poem: false 4 | auto_review: 5 | base_branches: 6 | - rc 7 | - beta 8 | - alpha 9 | - production 10 | - next ``` -------------------------------------------------------------------------------- /.manypkg.json: -------------------------------------------------------------------------------- ```json 1 | { 2 | "$schema": "https://unpkg.com/@manypkg/[email protected]/schema.json", 3 | "defaultBranch": "main", 4 | "ignoredRules": ["ROOT_HAS_DEPENDENCIES", "INTERNAL_MISMATCH"], 5 | "ignoredPackages": ["@tm/core", "@tm/cli", "@tm/build-config"] 6 | } 7 | ``` -------------------------------------------------------------------------------- /tests/fixtures/.taskmasterconfig: -------------------------------------------------------------------------------- ``` 1 | { 2 | "models": { 3 | "main": { 4 | "provider": "openai", 5 | "modelId": "gpt-4o" 6 | }, 7 | "research": { 8 | "provider": "perplexity", 9 | "modelId": "sonar-pro" 10 | }, 11 | "fallback": { 12 | "provider": "anthropic", 13 | "modelId": "claude-3-haiku-20240307" 14 | } 15 | } 16 | } ``` -------------------------------------------------------------------------------- /apps/extension/.vscodeignore: -------------------------------------------------------------------------------- ``` 1 | # Ignore everything by default 2 | * 3 | 4 | # Only include specific essential files 5 | !package.json 6 | !README.md 7 | !CHANGELOG.md 8 | !LICENSE 9 | !icon.png 10 | !assets/** 11 | 12 | # Include only the built files we need (not source maps) 13 | !dist/extension.js 14 | !dist/index.js 15 | !dist/index.css 16 | 17 | # Exclude development documentation 18 | docs/extension-CI-setup.md 19 | docs/extension-DEV-guide.md 20 | 21 | # Exclude 22 | assets/.DS_Store 23 | assets/banner.png 24 | 25 | 26 | ``` -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- ``` 1 | # Development files 2 | .git 3 | .github 4 | .vscode 5 | .idea 6 | .DS_Store 7 | 8 | # Logs 9 | logs 10 | *.log 11 | npm-debug.log* 12 | dev-debug.log 13 | init-debug.log 14 | 15 | # Source files not needed in the package 16 | src 17 | test 18 | tests 19 | docs 20 | examples 21 | .editorconfig 22 | .eslintrc 23 | .prettierrc 24 | .travis.yml 25 | .gitlab-ci.yml 26 | tsconfig.json 27 | jest.config.js 28 | 29 | # Original project files 30 | tasks.json 31 | tasks/ 32 | prd.txt 33 | scripts/prd.txt 34 | .env 35 | 36 | # Temporary files 37 | .tmp 38 | .temp 39 | *.swp 40 | *.swo 41 | 42 | # Node modules 43 | node_modules/ 44 | 45 | # Debug files 46 | *.debug ``` -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- ``` 1 | # API Keys (Required for using in any role i.e. main/research/fallback -- see `task-master models`) 2 | ANTHROPIC_API_KEY=YOUR_ANTHROPIC_KEY_HERE 3 | PERPLEXITY_API_KEY=YOUR_PERPLEXITY_KEY_HERE 4 | OPENAI_API_KEY=YOUR_OPENAI_KEY_HERE 5 | GOOGLE_API_KEY=YOUR_GOOGLE_KEY_HERE 6 | MISTRAL_API_KEY=YOUR_MISTRAL_KEY_HERE 7 | GROQ_API_KEY=YOUR_GROQ_KEY_HERE 8 | OPENROUTER_API_KEY=YOUR_OPENROUTER_KEY_HERE 9 | XAI_API_KEY=YOUR_XAI_KEY_HERE 10 | AZURE_OPENAI_API_KEY=YOUR_AZURE_KEY_HERE 11 | OLLAMA_API_KEY=YOUR_OLLAMA_API_KEY_HERE 12 | 13 | # Google Vertex AI Configuration 14 | VERTEX_PROJECT_ID=your-gcp-project-id 15 | VERTEX_LOCATION=us-central1 16 | # Optional: Path to service account credentials JSON file (alternative to API key) 17 | GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-credentials.json 18 | ``` -------------------------------------------------------------------------------- /packages/tm-core/.gitignore: -------------------------------------------------------------------------------- ``` 1 | # Dependencies 2 | node_modules/ 3 | *.pnp 4 | .pnp.js 5 | 6 | # Build output 7 | dist/ 8 | build/ 9 | *.tsbuildinfo 10 | 11 | # Coverage reports 12 | coverage/ 13 | *.lcov 14 | 15 | # Runtime data 16 | pids 17 | *.pid 18 | *.seed 19 | *.pid.lock 20 | 21 | # Logs 22 | logs 23 | *.log 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | lerna-debug.log* 28 | 29 | # Diagnostic reports 30 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 31 | 32 | # Runtime data 33 | pids 34 | *.pid 35 | *.seed 36 | *.pid.lock 37 | 38 | # Directory for instrumented libs generated by jscoverage/JSCover 39 | lib-cov 40 | 41 | # nyc test coverage 42 | .nyc_output 43 | 44 | # Dependency directories 45 | jspm_packages/ 46 | 47 | # Optional npm cache directory 48 | .npm 49 | 50 | # Optional eslint cache 51 | .eslintcache 52 | 53 | # Optional REPL history 54 | .node_repl_history 55 | 56 | # Output of 'npm pack' 57 | *.tgz 58 | 59 | # Yarn Integrity file 60 | .yarn-integrity 61 | 62 | # Environment variables 63 | .env 64 | .env.local 65 | .env.development.local 66 | .env.test.local 67 | .env.production.local 68 | 69 | # IDE 70 | .vscode/ 71 | .idea/ 72 | *.swp 73 | *.swo 74 | *~ 75 | 76 | # OS generated files 77 | .DS_Store 78 | .DS_Store? 79 | ._* 80 | .Spotlight-V100 81 | .Trashes 82 | ehthumbs.db 83 | Thumbs.db ``` -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- ``` 1 | # Dependency directories 2 | node_modules/ 3 | jspm_packages/ 4 | 5 | # Environment variables 6 | .env 7 | .env.local 8 | .env.development.local 9 | .env.test.local 10 | .env.production.local 11 | 12 | # Cursor configuration -- might have ENV variables. Included by default 13 | # .cursor/mcp.json 14 | 15 | # Logs 16 | logs 17 | *.log 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | lerna-debug.log* 22 | 23 | # Coverage directory used by tools like istanbul 24 | coverage/ 25 | *.lcov 26 | 27 | # Jest cache 28 | .jest/ 29 | 30 | # Test temporary files and directories 31 | tests/temp/ 32 | tests/e2e/_runs/ 33 | tests/e2e/log/ 34 | tests/**/*.log 35 | tests/**/coverage/ 36 | 37 | # Test database files (if any) 38 | tests/**/*.db 39 | tests/**/*.sqlite 40 | tests/**/*.sqlite3 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env.test 59 | 60 | # parcel-bundler cache 61 | .cache 62 | 63 | # Next.js build output 64 | .next 65 | 66 | # Nuxt.js build / generate output 67 | .nuxt 68 | dist 69 | 70 | # Mac files 71 | .DS_Store 72 | 73 | # Debug files 74 | *.debug 75 | init-debug.log 76 | dev-debug.log 77 | 78 | # NPMRC 79 | .npmrc 80 | 81 | # Added by Task Master AI 82 | # Editor directories and files 83 | .idea 84 | .vscode 85 | *.suo 86 | *.ntvs* 87 | *.njsproj 88 | *.sln 89 | *.sw? 90 | 91 | # VS Code extension test files 92 | .vscode-test/ 93 | apps/extension/.vscode-test/ 94 | 95 | # apps/extension 96 | apps/extension/vsix-build/ 97 | 98 | # turbo 99 | .turbo ``` -------------------------------------------------------------------------------- /assets/roocode/.roomodes: -------------------------------------------------------------------------------- ``` 1 | { 2 | "customModes": [ 3 | { 4 | "slug": "orchestrator", 5 | "name": "Orchestrator", 6 | "roleDefinition": "You are Roo, a strategic workflow orchestrator who coordinates complex tasks by delegating them to appropriate specialized modes. You have a comprehensive understanding of each mode's capabilities and limitations, also your own, and with the information given by the user and other modes in shared context you are enabled to effectively break down complex problems into discrete tasks that can be solved by different specialists using the `taskmaster-ai` system for task and context management.", 7 | "customInstructions": "Your role is to coordinate complex workflows by delegating tasks to specialized modes, using `taskmaster-ai` as the central hub for task definition, progress tracking, and context management. \nAs an orchestrator, you should:\nn1. When given a complex task, use contextual information (which gets updated frequently) to break it down into logical subtasks that can be delegated to appropriate specialized modes.\nn2. For each subtask, use the `new_task` tool to delegate. Choose the most appropriate mode for the subtask's specific goal and provide comprehensive instructions in the `message` parameter. \nThese instructions must include:\n* All necessary context from the parent task or previous subtasks required to complete the work.\n* A clearly defined scope, specifying exactly what the subtask should accomplish.\n* An explicit statement that the subtask should *only* perform the work outlined in these instructions and not deviate.\n* An instruction for the subtask to signal completion by using the `attempt_completion` tool, providing a thorough summary of the outcome in the `result` parameter, keeping in mind that this summary will be the source of truth used to further relay this information to other tasks and for you to keep track of what was completed on this project.\nn3. Track and manage the progress of all subtasks. When a subtask is completed, acknowledge its results and determine the next steps.\nn4. Help the user understand how the different subtasks fit together in the overall workflow. Provide clear reasoning about why you're delegating specific tasks to specific modes.\nn5. Ask clarifying questions when necessary to better understand how to break down complex tasks effectively. If it seems complex delegate to architect to accomplish that \nn6. Use subtasks to maintain clarity. If a request significantly shifts focus or requires a different expertise (mode), consider creating a subtask rather than overloading the current one.", 8 | "groups": [ 9 | "read", 10 | "edit", 11 | "browser", 12 | "command", 13 | "mcp" 14 | ] 15 | }, 16 | { 17 | "slug": "architect", 18 | "name": "Architect", 19 | "roleDefinition": "You are Roo, an expert technical leader operating in Architect mode. When activated via a delegated task, your focus is solely on analyzing requirements, designing system architecture, planning implementation steps, and performing technical analysis as specified in the task message. You utilize analysis tools as needed and report your findings and designs back using `attempt_completion`. You do not deviate from the delegated task scope.", 20 | "customInstructions": "1. Do some information gathering (for example using read_file or search_files) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, you should create a detailed plan for how to accomplish the task. Include Mermaid diagrams if they help make your plan clearer.\n\n4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it.\n\n5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file.\n\n6. Use the switch_mode tool to request that the user switch to another mode to implement the solution.", 21 | "groups": [ 22 | "read", 23 | ["edit", { "fileRegex": "\\.md$", "description": "Markdown files only" }], 24 | "command", 25 | "mcp" 26 | ] 27 | }, 28 | { 29 | "slug": "ask", 30 | "name": "Ask", 31 | "roleDefinition": "You are Roo, a knowledgeable technical assistant.\nWhen activated by another mode via a delegated task, your focus is to research, analyze, and provide clear, concise answers or explanations based *only* on the specific information requested in the delegation message. Use available tools for information gathering and report your findings back using `attempt_completion`.", 32 | "customInstructions": "You can analyze code, explain concepts, and access external resources. Make sure to answer the user's questions and don't rush to switch to implementing code. Include Mermaid diagrams if they help make your response clearer.", 33 | "groups": [ 34 | "read", 35 | "browser", 36 | "mcp" 37 | ] 38 | }, 39 | { 40 | "slug": "debug", 41 | "name": "Debug", 42 | "roleDefinition": "You are Roo, an expert software debugger specializing in systematic problem diagnosis and resolution. When activated by another mode, your task is to meticulously analyze the provided debugging request (potentially referencing Taskmaster tasks, logs, or metrics), use diagnostic tools as instructed to investigate the issue, identify the root cause, and report your findings and recommended next steps back via `attempt_completion`. You focus solely on diagnostics within the scope defined by the delegated task.", 43 | "customInstructions": "Reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions. Explicitly ask the user to confirm the diagnosis before fixing the problem.", 44 | "groups": [ 45 | "read", 46 | "edit", 47 | "command", 48 | "mcp" 49 | ] 50 | }, 51 | { 52 | "slug": "test", 53 | "name": "Test", 54 | "roleDefinition": "You are Roo, an expert software tester. Your primary focus is executing testing tasks delegated to you by other modes.\nAnalyze the provided scope and context (often referencing a Taskmaster task ID and its `testStrategy`), develop test plans if needed, execute tests diligently, and report comprehensive results (pass/fail, bugs, coverage) back using `attempt_completion`. You operate strictly within the delegated task's boundaries.", 55 | "customInstructions": "Focus on the `testStrategy` defined in the Taskmaster task. Develop and execute test plans accordingly. Report results clearly, including pass/fail status, bug details, and coverage information.", 56 | "groups": [ 57 | "read", 58 | "command", 59 | "mcp" 60 | ] 61 | } 62 | ] 63 | } ``` -------------------------------------------------------------------------------- /assets/.windsurfrules: -------------------------------------------------------------------------------- ``` 1 | Below you will find a variety of important rules spanning: 2 | 3 | - the dev_workflow 4 | - the .windsurfrules document self-improvement workflow 5 | - the template to follow when modifying or adding new sections/rules to this document. 6 | 7 | --- 8 | 9 | ## DEV_WORKFLOW 10 | 11 | description: Guide for using meta-development script (scripts/dev.js) to manage task-driven development workflows 12 | globs: **/\* 13 | filesToApplyRule: **/\* 14 | alwaysApply: true 15 | 16 | --- 17 | 18 | - **Global CLI Commands** 19 | 20 | - Task Master now provides a global CLI through the `task-master` command 21 | - All functionality from `scripts/dev.js` is available through this interface 22 | - Install globally with `npm install -g claude-task-master` or use locally via `npx` 23 | - Use `task-master <command>` instead of `node scripts/dev.js <command>` 24 | - Examples: 25 | - `task-master list` instead of `node scripts/dev.js list` 26 | - `task-master next` instead of `node scripts/dev.js next` 27 | - `task-master expand --id=3` instead of `node scripts/dev.js expand --id=3` 28 | - All commands accept the same options as their script equivalents 29 | - The CLI provides additional commands like `task-master init` for project setup 30 | 31 | - **Development Workflow Process** 32 | 33 | - Start new projects by running `task-master init` or `node scripts/dev.js parse-prd --input=<prd-file.txt>` to generate initial tasks.json 34 | - Begin coding sessions with `task-master list` to see current tasks, status, and IDs 35 | - Analyze task complexity with `task-master analyze-complexity --research` before breaking down tasks 36 | - Select tasks based on dependencies (all marked 'done'), priority level, and ID order 37 | - Clarify tasks by checking task files in tasks/ directory or asking for user input 38 | - View specific task details using `task-master show <id>` to understand implementation requirements 39 | - Break down complex tasks using `task-master expand --id=<id>` with appropriate flags 40 | - Clear existing subtasks if needed using `task-master clear-subtasks --id=<id>` before regenerating 41 | - Implement code following task details, dependencies, and project standards 42 | - Verify tasks according to test strategies before marking as complete 43 | - Mark completed tasks with `task-master set-status --id=<id> --status=done` 44 | - Update dependent tasks when implementation differs from original plan 45 | - Generate task files with `task-master generate` after updating tasks.json 46 | - Maintain valid dependency structure with `task-master fix-dependencies` when needed 47 | - Respect dependency chains and task priorities when selecting work 48 | - Report progress regularly using the list command 49 | 50 | - **Task Complexity Analysis** 51 | 52 | - Run `node scripts/dev.js analyze-complexity --research` for comprehensive analysis 53 | - Review complexity report in scripts/task-complexity-report.json 54 | - Or use `node scripts/dev.js complexity-report` for a formatted, readable version of the report 55 | - Focus on tasks with highest complexity scores (8-10) for detailed breakdown 56 | - Use analysis results to determine appropriate subtask allocation 57 | - Note that reports are automatically used by the expand command 58 | 59 | - **Task Breakdown Process** 60 | 61 | - For tasks with complexity analysis, use `node scripts/dev.js expand --id=<id>` 62 | - Otherwise use `node scripts/dev.js expand --id=<id> --subtasks=<number>` 63 | - Add `--research` flag to leverage Perplexity AI for research-backed expansion 64 | - Use `--prompt="<context>"` to provide additional context when needed 65 | - Review and adjust generated subtasks as necessary 66 | - Use `--all` flag to expand multiple pending tasks at once 67 | - If subtasks need regeneration, clear them first with `clear-subtasks` command 68 | 69 | - **Implementation Drift Handling** 70 | 71 | - When implementation differs significantly from planned approach 72 | - When future tasks need modification due to current implementation choices 73 | - When new dependencies or requirements emerge 74 | - Call `node scripts/dev.js update --from=<futureTaskId> --prompt="<explanation>"` to update tasks.json 75 | 76 | - **Task Status Management** 77 | 78 | - Use 'pending' for tasks ready to be worked on 79 | - Use 'done' for completed and verified tasks 80 | - Use 'deferred' for postponed tasks 81 | - Add custom status values as needed for project-specific workflows 82 | 83 | - **Task File Format Reference** 84 | 85 | ``` 86 | # Task ID: <id> 87 | # Title: <title> 88 | # Status: <status> 89 | # Dependencies: <comma-separated list of dependency IDs> 90 | # Priority: <priority> 91 | # Description: <brief description> 92 | # Details: 93 | <detailed implementation notes> 94 | 95 | # Test Strategy: 96 | <verification approach> 97 | ``` 98 | 99 | - **Command Reference: parse-prd** 100 | 101 | - Legacy Syntax: `node scripts/dev.js parse-prd --input=<prd-file.txt>` 102 | - CLI Syntax: `task-master parse-prd --input=<prd-file.txt>` 103 | - Description: Parses a PRD document and generates a tasks.json file with structured tasks 104 | - Parameters: 105 | - `--input=<file>`: Path to the PRD text file (default: sample-prd.txt) 106 | - Example: `task-master parse-prd --input=requirements.txt` 107 | - Notes: Will overwrite existing tasks.json file. Use with caution. 108 | 109 | - **Command Reference: update** 110 | 111 | - Legacy Syntax: `node scripts/dev.js update --from=<id> --prompt="<prompt>"` 112 | - CLI Syntax: `task-master update --from=<id> --prompt="<prompt>"` 113 | - Description: Updates tasks with ID >= specified ID based on the provided prompt 114 | - Parameters: 115 | - `--from=<id>`: Task ID from which to start updating (required) 116 | - `--prompt="<text>"`: Explanation of changes or new context (required) 117 | - Example: `task-master update --from=4 --prompt="Now we are using Express instead of Fastify."` 118 | - Notes: Only updates tasks not marked as 'done'. Completed tasks remain unchanged. 119 | 120 | - **Command Reference: generate** 121 | 122 | - Legacy Syntax: `node scripts/dev.js generate` 123 | - CLI Syntax: `task-master generate` 124 | - Description: Generates individual task files based on tasks.json 125 | - Parameters: 126 | - `--file=<path>, -f`: Use alternative tasks.json file (default: '.taskmaster/tasks/tasks.json') 127 | - `--output=<dir>, -o`: Output directory (default: '.taskmaster/tasks') 128 | - Example: `task-master generate` 129 | - Notes: Overwrites existing task files. Creates output directory if needed. 130 | 131 | - **Command Reference: set-status** 132 | 133 | - Legacy Syntax: `node scripts/dev.js set-status --id=<id> --status=<status>` 134 | - CLI Syntax: `task-master set-status --id=<id> --status=<status>` 135 | - Description: Updates the status of a specific task in tasks.json 136 | - Parameters: 137 | - `--id=<id>`: ID of the task to update (required) 138 | - `--status=<status>`: New status value (required) 139 | - Example: `task-master set-status --id=3 --status=done` 140 | - Notes: Common values are 'done', 'pending', and 'deferred', but any string is accepted. 141 | 142 | - **Command Reference: list** 143 | 144 | - Legacy Syntax: `node scripts/dev.js list` 145 | - CLI Syntax: `task-master list` 146 | - Description: Lists all tasks in tasks.json with IDs, titles, and status 147 | - Parameters: 148 | - `--status=<status>, -s`: Filter by status 149 | - `--with-subtasks`: Show subtasks for each task 150 | - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json') 151 | - Example: `task-master list` 152 | - Notes: Provides quick overview of project progress. Use at start of sessions. 153 | 154 | - **Command Reference: expand** 155 | 156 | - Legacy Syntax: `node scripts/dev.js expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]` 157 | - CLI Syntax: `task-master expand --id=<id> [--num=<number>] [--research] [--prompt="<context>"]` 158 | - Description: Expands a task with subtasks for detailed implementation 159 | - Parameters: 160 | - `--id=<id>`: ID of task to expand (required unless using --all) 161 | - `--all`: Expand all pending tasks, prioritized by complexity 162 | - `--num=<number>`: Number of subtasks to generate (default: from complexity report) 163 | - `--research`: Use Perplexity AI for research-backed generation 164 | - `--prompt="<text>"`: Additional context for subtask generation 165 | - `--force`: Regenerate subtasks even for tasks that already have them 166 | - Example: `task-master expand --id=3 --num=5 --research --prompt="Focus on security aspects"` 167 | - Notes: Uses complexity report recommendations if available. 168 | 169 | - **Command Reference: analyze-complexity** 170 | 171 | - Legacy Syntax: `node scripts/dev.js analyze-complexity [options]` 172 | - CLI Syntax: `task-master analyze-complexity [options]` 173 | - Description: Analyzes task complexity and generates expansion recommendations 174 | - Parameters: 175 | - `--output=<file>, -o`: Output file path (default: scripts/task-complexity-report.json) 176 | - `--model=<model>, -m`: Override LLM model to use 177 | - `--threshold=<number>, -t`: Minimum score for expansion recommendation (default: 5) 178 | - `--file=<path>, -f`: Use alternative tasks.json file 179 | - `--research, -r`: Use Perplexity AI for research-backed analysis 180 | - Example: `task-master analyze-complexity --research` 181 | - Notes: Report includes complexity scores, recommended subtasks, and tailored prompts. 182 | 183 | - **Command Reference: clear-subtasks** 184 | 185 | - Legacy Syntax: `node scripts/dev.js clear-subtasks --id=<id>` 186 | - CLI Syntax: `task-master clear-subtasks --id=<id>` 187 | - Description: Removes subtasks from specified tasks to allow regeneration 188 | - Parameters: 189 | - `--id=<id>`: ID or comma-separated IDs of tasks to clear subtasks from 190 | - `--all`: Clear subtasks from all tasks 191 | - Examples: 192 | - `task-master clear-subtasks --id=3` 193 | - `task-master clear-subtasks --id=1,2,3` 194 | - `task-master clear-subtasks --all` 195 | - Notes: 196 | - Task files are automatically regenerated after clearing subtasks 197 | - Can be combined with expand command to immediately generate new subtasks 198 | - Works with both parent tasks and individual subtasks 199 | 200 | - **Task Structure Fields** 201 | 202 | - **id**: Unique identifier for the task (Example: `1`) 203 | - **title**: Brief, descriptive title (Example: `"Initialize Repo"`) 204 | - **description**: Concise summary of what the task involves (Example: `"Create a new repository, set up initial structure."`) 205 | - **status**: Current state of the task (Example: `"pending"`, `"done"`, `"deferred"`) 206 | - **dependencies**: IDs of prerequisite tasks (Example: `[1, 2]`) 207 | - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending) 208 | - This helps quickly identify which prerequisite tasks are blocking work 209 | - **priority**: Importance level (Example: `"high"`, `"medium"`, `"low"`) 210 | - **details**: In-depth implementation instructions (Example: `"Use GitHub client ID/secret, handle callback, set session token."`) 211 | - **testStrategy**: Verification approach (Example: `"Deploy and call endpoint to confirm 'Hello World' response."`) 212 | - **subtasks**: List of smaller, more specific tasks (Example: `[{"id": 1, "title": "Configure OAuth", ...}]`) 213 | 214 | - **Environment Variables Configuration** 215 | 216 | - **ANTHROPIC_API_KEY** (Required): Your Anthropic API key for Claude (Example: `ANTHROPIC_API_KEY=sk-ant-api03-...`) 217 | - **MODEL** (Default: `"claude-3-7-sonnet-20250219"`): Claude model to use (Example: `MODEL=claude-3-opus-20240229`) 218 | - **MAX_TOKENS** (Default: `"4000"`): Maximum tokens for responses (Example: `MAX_TOKENS=8000`) 219 | - **TEMPERATURE** (Default: `"0.7"`): Temperature for model responses (Example: `TEMPERATURE=0.5`) 220 | - **DEBUG** (Default: `"false"`): Enable debug logging (Example: `DEBUG=true`) 221 | - **TASKMASTER_LOG_LEVEL** (Default: `"info"`): Console output level (Example: `TASKMASTER_LOG_LEVEL=debug`) 222 | - **DEFAULT_SUBTASKS** (Default: `"3"`): Default subtask count (Example: `DEFAULT_SUBTASKS=5`) 223 | - **DEFAULT_PRIORITY** (Default: `"medium"`): Default priority (Example: `DEFAULT_PRIORITY=high`) 224 | - **PROJECT_NAME** (Default: `"MCP SaaS MVP"`): Project name in metadata (Example: `PROJECT_NAME=My Awesome Project`) 225 | - **PROJECT_VERSION** (Default: `"1.0.0"`): Version in metadata (Example: `PROJECT_VERSION=2.1.0`) 226 | - **PERPLEXITY_API_KEY**: For research-backed features (Example: `PERPLEXITY_API_KEY=pplx-...`) 227 | - **PERPLEXITY_MODEL** (Default: `"sonar-medium-online"`): Perplexity model (Example: `PERPLEXITY_MODEL=sonar-large-online`) 228 | 229 | - **Determining the Next Task** 230 | 231 | - Run `task-master next` to show the next task to work on 232 | - The next command identifies tasks with all dependencies satisfied 233 | - Tasks are prioritized by priority level, dependency count, and ID 234 | - The command shows comprehensive task information including: 235 | - Basic task details and description 236 | - Implementation details 237 | - Subtasks (if they exist) 238 | - Contextual suggested actions 239 | - Recommended before starting any new development work 240 | - Respects your project's dependency structure 241 | - Ensures tasks are completed in the appropriate sequence 242 | - Provides ready-to-use commands for common task actions 243 | 244 | - **Viewing Specific Task Details** 245 | 246 | - Run `task-master show <id>` or `task-master show --id=<id>` to view a specific task 247 | - Use dot notation for subtasks: `task-master show 1.2` (shows subtask 2 of task 1) 248 | - Displays comprehensive information similar to the next command, but for a specific task 249 | - For parent tasks, shows all subtasks and their current status 250 | - For subtasks, shows parent task information and relationship 251 | - Provides contextual suggested actions appropriate for the specific task 252 | - Useful for examining task details before implementation or checking status 253 | 254 | - **Managing Task Dependencies** 255 | 256 | - Use `task-master add-dependency --id=<id> --depends-on=<id>` to add a dependency 257 | - Use `task-master remove-dependency --id=<id> --depends-on=<id>` to remove a dependency 258 | - The system prevents circular dependencies and duplicate dependency entries 259 | - Dependencies are checked for existence before being added or removed 260 | - Task files are automatically regenerated after dependency changes 261 | - Dependencies are visualized with status indicators in task listings and files 262 | 263 | - **Command Reference: add-dependency** 264 | 265 | - Legacy Syntax: `node scripts/dev.js add-dependency --id=<id> --depends-on=<id>` 266 | - CLI Syntax: `task-master add-dependency --id=<id> --depends-on=<id>` 267 | - Description: Adds a dependency relationship between two tasks 268 | - Parameters: 269 | - `--id=<id>`: ID of task that will depend on another task (required) 270 | - `--depends-on=<id>`: ID of task that will become a dependency (required) 271 | - Example: `task-master add-dependency --id=22 --depends-on=21` 272 | - Notes: Prevents circular dependencies and duplicates; updates task files automatically 273 | 274 | - **Command Reference: remove-dependency** 275 | 276 | - Legacy Syntax: `node scripts/dev.js remove-dependency --id=<id> --depends-on=<id>` 277 | - CLI Syntax: `task-master remove-dependency --id=<id> --depends-on=<id>` 278 | - Description: Removes a dependency relationship between two tasks 279 | - Parameters: 280 | - `--id=<id>`: ID of task to remove dependency from (required) 281 | - `--depends-on=<id>`: ID of task to remove as a dependency (required) 282 | - Example: `task-master remove-dependency --id=22 --depends-on=21` 283 | - Notes: Checks if dependency actually exists; updates task files automatically 284 | 285 | - **Command Reference: validate-dependencies** 286 | 287 | - Legacy Syntax: `node scripts/dev.js validate-dependencies [options]` 288 | - CLI Syntax: `task-master validate-dependencies [options]` 289 | - Description: Checks for and identifies invalid dependencies in tasks.json and task files 290 | - Parameters: 291 | - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json') 292 | - Example: `task-master validate-dependencies` 293 | - Notes: 294 | - Reports all non-existent dependencies and self-dependencies without modifying files 295 | - Provides detailed statistics on task dependency state 296 | - Use before fix-dependencies to audit your task structure 297 | 298 | - **Command Reference: fix-dependencies** 299 | 300 | - Legacy Syntax: `node scripts/dev.js fix-dependencies [options]` 301 | - CLI Syntax: `task-master fix-dependencies [options]` 302 | - Description: Finds and fixes all invalid dependencies in tasks.json and task files 303 | - Parameters: 304 | - `--file=<path>, -f`: Use alternative tasks.json file (default: 'tasks/tasks.json') 305 | - Example: `task-master fix-dependencies` 306 | - Notes: 307 | - Removes references to non-existent tasks and subtasks 308 | - Eliminates self-dependencies (tasks depending on themselves) 309 | - Regenerates task files with corrected dependencies 310 | - Provides detailed report of all fixes made 311 | 312 | - **Command Reference: complexity-report** 313 | 314 | - Legacy Syntax: `node scripts/dev.js complexity-report [options]` 315 | - CLI Syntax: `task-master complexity-report [options]` 316 | - Description: Displays the task complexity analysis report in a formatted, easy-to-read way 317 | - Parameters: 318 | - `--file=<path>, -f`: Path to the complexity report file (default: 'scripts/task-complexity-report.json') 319 | - Example: `task-master complexity-report` 320 | - Notes: 321 | - Shows tasks organized by complexity score with recommended actions 322 | - Provides complexity distribution statistics 323 | - Displays ready-to-use expansion commands for complex tasks 324 | - If no report exists, offers to generate one interactively 325 | 326 | - **Command Reference: add-task** 327 | 328 | - CLI Syntax: `task-master add-task [options]` 329 | - Description: Add a new task to tasks.json using AI 330 | - Parameters: 331 | - `--file=<path>, -f`: Path to the tasks file (default: 'tasks/tasks.json') 332 | - `--prompt=<text>, -p`: Description of the task to add (required) 333 | - `--dependencies=<ids>, -d`: Comma-separated list of task IDs this task depends on 334 | - `--priority=<priority>`: Task priority (high, medium, low) (default: 'medium') 335 | - Example: `task-master add-task --prompt="Create user authentication using Auth0"` 336 | - Notes: Uses AI to convert description into structured task with appropriate details 337 | 338 | - **Command Reference: init** 339 | 340 | - CLI Syntax: `task-master init` 341 | - Description: Initialize a new project with Task Master structure 342 | - Parameters: None 343 | - Example: `task-master init` 344 | - Notes: 345 | - Creates initial project structure with required files 346 | - Prompts for project settings if not provided 347 | - Merges with existing files when appropriate 348 | - Can be used to bootstrap a new Task Master project quickly 349 | 350 | - **Code Analysis & Refactoring Techniques** 351 | - **Top-Level Function Search** 352 | - Use grep pattern matching to find all exported functions across the codebase 353 | - Command: `grep -E "export (function|const) \w+|function \w+\(|const \w+ = \(|module\.exports" --include="*.js" -r ./` 354 | - Benefits: 355 | - Quickly identify all public API functions without reading implementation details 356 | - Compare functions between files during refactoring (e.g., monolithic to modular structure) 357 | - Verify all expected functions exist in refactored modules 358 | - Identify duplicate functionality or naming conflicts 359 | - Usage examples: 360 | - When migrating from `scripts/dev.js` to modular structure: `grep -E "function \w+\(" scripts/dev.js` 361 | - Check function exports in a directory: `grep -E "export (function|const)" scripts/modules/` 362 | - Find potential naming conflicts: `grep -E "function (get|set|create|update)\w+\(" -r ./` 363 | - Variations: 364 | - Add `-n` flag to include line numbers 365 | - Add `--include="*.ts"` to filter by file extension 366 | - Use with `| sort` to alphabetize results 367 | - Integration with refactoring workflow: 368 | - Start by mapping all functions in the source file 369 | - Create target module files based on function grouping 370 | - Verify all functions were properly migrated 371 | - Check for any unintentional duplications or omissions 372 | 373 | --- 374 | 375 | ## WINDSURF_RULES 376 | 377 | description: Guidelines for creating and maintaining Windsurf rules to ensure consistency and effectiveness. 378 | globs: .windsurfrules 379 | filesToApplyRule: .windsurfrules 380 | alwaysApply: true 381 | 382 | --- 383 | 384 | The below describes how you should be structuring new rule sections in this document. 385 | 386 | - **Required Rule Structure:** 387 | 388 | ```markdown 389 | --- 390 | description: Clear, one-line description of what the rule enforces 391 | globs: path/to/files/*.ext, other/path/**/* 392 | alwaysApply: boolean 393 | --- 394 | 395 | - **Main Points in Bold** 396 | - Sub-points with details 397 | - Examples and explanations 398 | ``` 399 | 400 | - **Section References:** 401 | 402 | - Use `ALL_CAPS_SECTION` to reference files 403 | - Example: `WINDSURF_RULES` 404 | 405 | - **Code Examples:** 406 | 407 | - Use language-specific code blocks 408 | 409 | ```typescript 410 | // ✅ DO: Show good examples 411 | const goodExample = true; 412 | 413 | // ❌ DON'T: Show anti-patterns 414 | const badExample = false; 415 | ``` 416 | 417 | - **Rule Content Guidelines:** 418 | 419 | - Start with high-level overview 420 | - Include specific, actionable requirements 421 | - Show examples of correct implementation 422 | - Reference existing code when possible 423 | - Keep rules DRY by referencing other rules 424 | 425 | - **Rule Maintenance:** 426 | 427 | - Update rules when new patterns emerge 428 | - Add examples from actual codebase 429 | - Remove outdated patterns 430 | - Cross-reference related rules 431 | 432 | - **Best Practices:** 433 | - Use bullet points for clarity 434 | - Keep descriptions concise 435 | - Include both DO and DON'T examples 436 | - Reference actual code over theoretical examples 437 | - Use consistent formatting across rules 438 | 439 | --- 440 | 441 | ## SELF_IMPROVE 442 | 443 | description: Guidelines for continuously improving this rules document based on emerging code patterns and best practices. 444 | globs: **/\* 445 | filesToApplyRule: **/\* 446 | alwaysApply: true 447 | 448 | --- 449 | 450 | - **Rule Improvement Triggers:** 451 | 452 | - New code patterns not covered by existing rules 453 | - Repeated similar implementations across files 454 | - Common error patterns that could be prevented 455 | - New libraries or tools being used consistently 456 | - Emerging best practices in the codebase 457 | 458 | - **Analysis Process:** 459 | 460 | - Compare new code with existing rules 461 | - Identify patterns that should be standardized 462 | - Look for references to external documentation 463 | - Check for consistent error handling patterns 464 | - Monitor test patterns and coverage 465 | 466 | - **Rule Updates:** 467 | 468 | - **Add New Rules When:** 469 | 470 | - A new technology/pattern is used in 3+ files 471 | - Common bugs could be prevented by a rule 472 | - Code reviews repeatedly mention the same feedback 473 | - New security or performance patterns emerge 474 | 475 | - **Modify Existing Rules When:** 476 | - Better examples exist in the codebase 477 | - Additional edge cases are discovered 478 | - Related rules have been updated 479 | - Implementation details have changed 480 | 481 | - **Example Pattern Recognition:** 482 | 483 | ```typescript 484 | // If you see repeated patterns like: 485 | const data = await prisma.user.findMany({ 486 | select: { id: true, email: true }, 487 | where: { status: "ACTIVE" }, 488 | }); 489 | 490 | // Consider adding a PRISMA section in the .windsurfrules: 491 | // - Standard select fields 492 | // - Common where conditions 493 | // - Performance optimization patterns 494 | ``` 495 | 496 | - **Rule Quality Checks:** 497 | 498 | - Rules should be actionable and specific 499 | - Examples should come from actual code 500 | - References should be up to date 501 | - Patterns should be consistently enforced 502 | 503 | - **Continuous Improvement:** 504 | 505 | - Monitor code review comments 506 | - Track common development questions 507 | - Update rules after major refactors 508 | - Add links to relevant documentation 509 | - Cross-reference related rules 510 | 511 | - **Rule Deprecation:** 512 | 513 | - Mark outdated patterns as deprecated 514 | - Remove rules that no longer apply 515 | - Update references to deprecated rules 516 | - Document migration paths for old patterns 517 | 518 | - **Documentation Updates:** 519 | - Keep examples synchronized with code 520 | - Update references to external docs 521 | - Maintain links between related rules 522 | - Document breaking changes 523 | 524 | Follow WINDSURF_RULES for proper rule formatting and structure of windsurf rule sections. 525 | ``` -------------------------------------------------------------------------------- /apps/docs/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # Task Master Documentation 2 | 3 | Welcome to the Task Master documentation. Use the links below to navigate to the information you need: 4 | 5 | ## Getting Started 6 | 7 | - [Configuration Guide](archive/configuration.md) - Set up environment variables and customize Task Master 8 | - [Tutorial](archive/ctutorial.md) - Step-by-step guide to getting started with Task Master 9 | 10 | ## Reference 11 | 12 | - [Command Reference](archive/ccommand-reference.md) - Complete list of all available commands 13 | - [Task Structure](archive/ctask-structure.md) - Understanding the task format and features 14 | 15 | ## Examples & Licensing 16 | 17 | - [Example Interactions](archive/cexamples.md) - Common Cursor AI interaction examples 18 | - [Licensing Information](archive/clicensing.md) - Detailed information about the license 19 | 20 | ## Need More Help? 21 | 22 | If you can't find what you're looking for in these docs, please check the [main README](../README.md) or visit our [GitHub repository](https://github.com/eyaltoledano/claude-task-master). 23 | ``` -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # Task Master Documentation 2 | 3 | Welcome to the Task Master documentation. Use the links below to navigate to the information you need: 4 | 5 | ## Getting Started 6 | 7 | - [Configuration Guide](configuration.md) - Set up environment variables and customize Task Master 8 | - [Tutorial](tutorial.md) - Step-by-step guide to getting started with Task Master 9 | 10 | ## Reference 11 | 12 | - [Command Reference](command-reference.md) - Complete list of all available commands (including research and multi-task viewing) 13 | - [Task Structure](task-structure.md) - Understanding the task format and features 14 | - [Available Models](models.md) - Complete list of supported AI models and providers 15 | 16 | ## Examples & Licensing 17 | 18 | - [Example Interactions](examples.md) - Common Cursor AI interaction examples 19 | - [Licensing Information](licensing.md) - Detailed information about the license 20 | 21 | ## Need More Help? 22 | 23 | If you can't find what you're looking for in these docs, please check the [main README](../README.md) or visit our [GitHub repository](https://github.com/eyaltoledano/claude-task-master). 24 | ``` -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # Task Master Test Suite 2 | 3 | This directory contains tests for the Task Master CLI. The tests are organized into different categories to ensure comprehensive test coverage. 4 | 5 | ## Test Structure 6 | 7 | - `unit/`: Unit tests for individual functions and components 8 | - `integration/`: Integration tests for testing interactions between components 9 | - `e2e/`: End-to-end tests for testing complete workflows 10 | - `fixtures/`: Test fixtures and sample data 11 | 12 | ## Running Tests 13 | 14 | To run all tests: 15 | 16 | ```bash 17 | npm test 18 | ``` 19 | 20 | To run tests in watch mode (for development): 21 | 22 | ```bash 23 | npm run test:watch 24 | ``` 25 | 26 | To run tests with coverage reporting: 27 | 28 | ```bash 29 | npm run test:coverage 30 | ``` 31 | 32 | ## Testing Approach 33 | 34 | ### Unit Tests 35 | 36 | Unit tests focus on testing individual functions and components in isolation. These tests should be fast and should mock external dependencies. 37 | 38 | ### Integration Tests 39 | 40 | Integration tests focus on testing interactions between components. These tests ensure that components work together correctly. 41 | 42 | ### End-to-End Tests 43 | 44 | End-to-end tests focus on testing complete workflows from a user's perspective. These tests ensure that the CLI works correctly as a whole. 45 | 46 | ## Test Fixtures 47 | 48 | Test fixtures provide sample data for tests. Fixtures should be small, focused, and representative of real-world data. 49 | 50 | ## Mocking 51 | 52 | For external dependencies like file system operations and API calls, we use mocking to isolate the code being tested. 53 | 54 | - File system operations: Use `mock-fs` to mock the file system 55 | - API calls: Use Jest's mocking capabilities to mock API responses 56 | 57 | ## Test Coverage 58 | 59 | We aim for at least 80% test coverage for all code paths. Coverage reports can be generated with: 60 | 61 | ```bash 62 | npm run test:coverage 63 | ``` 64 | ``` -------------------------------------------------------------------------------- /tests/unit/scripts/modules/commands/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # Mock System Documentation 2 | 3 | ## Overview 4 | 5 | The `move-cross-tag.test.js` file has been refactored to use a focused, maintainable mock system that addresses the brittleness and complexity of the original implementation. 6 | 7 | ## Key Improvements 8 | 9 | ### 1. **Focused Mocking** 10 | 11 | - **Before**: Mocked 20+ modules, many irrelevant to cross-tag functionality 12 | - **After**: Only mocks 5 core modules actually used in cross-tag moves 13 | 14 | ### 2. **Configuration-Driven Mocking** 15 | 16 | ```javascript 17 | const mockConfig = { 18 | core: { 19 | moveTasksBetweenTags: true, 20 | generateTaskFiles: true, 21 | readJSON: true, 22 | initTaskMaster: true, 23 | findProjectRoot: true 24 | } 25 | }; 26 | ``` 27 | 28 | ### 3. **Reusable Mock Factory** 29 | 30 | ```javascript 31 | function createMockFactory(config = mockConfig) { 32 | const mocks = {}; 33 | 34 | if (config.core?.moveTasksBetweenTags) { 35 | mocks.moveTasksBetweenTags = createMock('moveTasksBetweenTags'); 36 | } 37 | // ... other mocks 38 | 39 | return mocks; 40 | } 41 | ``` 42 | 43 | ## Mock Configuration 44 | 45 | ### Core Mocks (Required for Cross-Tag Functionality) 46 | 47 | - `moveTasksBetweenTags`: Core move functionality 48 | - `generateTaskFiles`: File generation after moves 49 | - `readJSON`: Reading task data 50 | - `initTaskMaster`: TaskMaster initialization 51 | - `findProjectRoot`: Project path resolution 52 | 53 | ### Optional Mocks 54 | 55 | - Console methods: `error`, `log`, `exit` 56 | - TaskMaster instance methods: `getCurrentTag`, `getTasksPath`, `getProjectRoot` 57 | 58 | ## Usage Examples 59 | 60 | ### Default Configuration 61 | 62 | ```javascript 63 | const mocks = setupMocks(); // Uses default mockConfig 64 | ``` 65 | 66 | ### Minimal Configuration 67 | 68 | ```javascript 69 | const minimalConfig = { 70 | core: { 71 | moveTasksBetweenTags: true, 72 | generateTaskFiles: true, 73 | readJSON: true 74 | } 75 | }; 76 | const mocks = setupMocks(minimalConfig); 77 | ``` 78 | 79 | ### Selective Mocking 80 | 81 | ```javascript 82 | const selectiveConfig = { 83 | core: { 84 | moveTasksBetweenTags: true, 85 | generateTaskFiles: false, // Disabled 86 | readJSON: true 87 | } 88 | }; 89 | const mocks = setupMocks(selectiveConfig); 90 | ``` 91 | 92 | ## Benefits 93 | 94 | 1. **Reduced Complexity**: From 150+ lines of mock setup to 50 lines 95 | 2. **Better Maintainability**: Clear configuration object shows dependencies 96 | 3. **Focused Testing**: Only mocks what's actually used 97 | 4. **Flexible Configuration**: Easy to enable/disable specific mocks 98 | 5. **Consistent Naming**: All mocks use `createMock()` with descriptive names 99 | 100 | ## Migration Guide 101 | 102 | ### For Other Test Files 103 | 104 | 1. Identify actual module dependencies 105 | 2. Create configuration object for required mocks 106 | 3. Use `createMockFactory()` and `setupMocks()` 107 | 4. Remove unnecessary mocks 108 | 109 | ### Example Migration 110 | 111 | ```javascript 112 | // Before: 20+ jest.mock() calls 113 | jest.mock('module1', () => ({ ... })); 114 | jest.mock('module2', () => ({ ... })); 115 | // ... many more 116 | 117 | // After: Configuration-driven 118 | const mockConfig = { 119 | core: { 120 | requiredFunction1: true, 121 | requiredFunction2: true 122 | } 123 | }; 124 | const mocks = setupMocks(mockConfig); 125 | ``` 126 | 127 | ## Testing the Mock System 128 | 129 | The test suite includes validation tests: 130 | 131 | - `should work with minimal mock configuration` 132 | - `should allow disabling specific mocks` 133 | 134 | These ensure the mock factory works correctly and can be configured flexibly. 135 | ``` -------------------------------------------------------------------------------- /.changeset/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # Changesets 2 | 3 | This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos or single-package repos to help version and publish code. Full documentation is available in the [Changesets repository](https://github.com/changesets/changesets). 4 | 5 | ## What are Changesets? 6 | 7 | Changesets are a way to track changes to packages in your repository. Each changeset: 8 | 9 | - Describes the changes you've made 10 | - Specifies the type of version bump needed (patch, minor, or major) 11 | - Connects these changes with release notes 12 | - Automates the versioning and publishing process 13 | 14 | ## How to Use Changesets in Task Master 15 | 16 | ### 2. Making Changes 17 | 18 | 1. Create a new branch for your changes 19 | 2. Make your code changes 20 | 3. Write tests and ensure all tests pass 21 | 22 | ### 3. Creating a Changeset 23 | 24 | After making changes, create a changeset by running: 25 | 26 | ```bash 27 | npx changeset 28 | ``` 29 | 30 | This will: 31 | 32 | - Walk you through a CLI to describe your changes 33 | - Ask you to select impact level (patch, minor, major) 34 | - Create a markdown file in the `.changeset` directory 35 | 36 | ### 4. Impact Level Guidelines 37 | 38 | When choosing the impact level for your changes: 39 | 40 | - **Patch**: Bug fixes and minor changes that don't affect how users interact with the system 41 | - Example: Fixing a typo in output text, optimizing code without changing behavior 42 | - **Minor**: New features or enhancements that don't break existing functionality 43 | - Example: Adding a new flag to an existing command, adding new task metadata fields 44 | - **Major**: Breaking changes that require users to update their usage 45 | - Example: Renaming a command, changing the format of the tasks.json file 46 | 47 | ### 5. Writing Good Changeset Descriptions 48 | 49 | Your changeset description should: 50 | 51 | - Be written for end-users, not developers 52 | - Clearly explain what changed and why 53 | - Include any migration steps or backward compatibility notes 54 | - Reference related issues or pull requests with `#issue-number` 55 | 56 | Examples: 57 | 58 | ```md 59 | # Good 60 | 61 | Added new `--research` flag to the `expand` command that uses Perplexity AI 62 | to provide research-backed task expansions. Requires PERPLEXITY_API_KEY 63 | environment variable. 64 | 65 | # Not Good 66 | 67 | Fixed stuff and added new flag 68 | ``` 69 | 70 | ### 6. Committing Your Changes 71 | 72 | Commit both your code changes and the generated changeset file: 73 | 74 | ```bash 75 | git add . 76 | git commit -m "Add feature X with changeset" 77 | git push 78 | ``` 79 | 80 | ### 7. Pull Request Process 81 | 82 | 1. Open a pull request 83 | 2. Ensure CI passes 84 | 3. Await code review 85 | 4. Once approved and merged, your changeset will be used during the next release 86 | 87 | ## Release Process (for Maintainers) 88 | 89 | When it's time to make a release: 90 | 91 | 1. Ensure all desired changesets are merged 92 | 2. Run `npx changeset version` to update package versions and changelog 93 | 3. Review and commit the changes 94 | 4. Run `npm publish` to publish to npm 95 | 96 | This can be automated through Github Actions 97 | 98 | ## Common Issues and Solutions 99 | 100 | - **Merge Conflicts in Changeset Files**: Resolve just like any other merge conflict 101 | - **Multiple Changes in One PR**: Create multiple changesets if changes affect different areas 102 | - **Accidentally Committed Without Changeset**: Create the changeset after the fact and commit it separately 103 | 104 | ## Additional Resources 105 | 106 | - [Changesets Documentation](https://github.com/changesets/changesets) 107 | - [Common Questions](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 108 | ``` -------------------------------------------------------------------------------- /packages/tm-core/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # @task-master/tm-core 2 | 3 | Core library for Task Master AI - providing task management and orchestration capabilities with TypeScript support. 4 | 5 | ## Overview 6 | 7 | `tm-core` is the foundational library that powers Task Master AI's task management system. It provides a comprehensive set of tools for creating, managing, and orchestrating tasks with AI integration. 8 | 9 | ## Features 10 | 11 | - **TypeScript-first**: Built with full TypeScript support and strict type checking 12 | - **Dual Format**: Supports both ESM and CommonJS with automatic format detection 13 | - **Modular Architecture**: Clean separation of concerns with dedicated modules for different functionality 14 | - **AI Provider Integration**: Pluggable AI provider system for task generation and management 15 | - **Flexible Storage**: Abstracted storage layer supporting different persistence strategies 16 | - **Task Parsing**: Advanced parsing capabilities for various task definition formats 17 | - **Error Handling**: Comprehensive error system with specific error types 18 | - **Testing**: Complete test coverage with Jest and TypeScript support 19 | 20 | ## Installation 21 | 22 | ```bash 23 | npm install @task-master/tm-core 24 | ``` 25 | 26 | ## Usage 27 | 28 | ### Basic Usage 29 | 30 | ```typescript 31 | import { generateTaskId, PlaceholderTask } from '@task-master/tm-core'; 32 | 33 | // Generate a unique task ID 34 | const taskId = generateTaskId(); 35 | 36 | // Create a task (coming soon - full implementation) 37 | const task: PlaceholderTask = { 38 | id: taskId, 39 | title: 'My Task', 40 | status: 'pending', 41 | priority: 'medium' 42 | }; 43 | ``` 44 | 45 | ### Modular Imports 46 | 47 | You can import specific modules to reduce bundle size: 48 | 49 | ```typescript 50 | // Import types only 51 | import type { TaskId, TaskStatus } from '@task-master/tm-core/types'; 52 | 53 | // Import utilities 54 | import { generateTaskId, formatDate } from '@task-master/tm-core/utils'; 55 | 56 | // Import providers (AI providers coming soon) 57 | // import { AIProvider } from '@task-master/tm-core/providers'; 58 | 59 | // Import storage 60 | import { PlaceholderStorage } from '@task-master/tm-core/storage'; 61 | 62 | // Import parsers 63 | import { PlaceholderParser } from '@task-master/tm-core/parser'; 64 | 65 | // Import errors 66 | import { TmCoreError, TaskNotFoundError } from '@task-master/tm-core/errors'; 67 | ``` 68 | 69 | ## Architecture 70 | 71 | The library is organized into several key modules: 72 | 73 | - **types/**: TypeScript type definitions and interfaces 74 | - **providers/**: AI provider implementations for task generation 75 | - **storage/**: Storage adapters for different persistence strategies 76 | - **parser/**: Task parsing utilities for various formats 77 | - **utils/**: Common utility functions and helpers 78 | - **errors/**: Custom error classes and error handling 79 | 80 | ## Development 81 | 82 | ### Prerequisites 83 | 84 | - Node.js >= 18.0.0 85 | - npm or yarn 86 | 87 | ### Setup 88 | 89 | ```bash 90 | # Install dependencies 91 | npm install 92 | 93 | # Build the library 94 | npm run build 95 | 96 | # Run tests 97 | npm test 98 | 99 | # Run tests with coverage 100 | npm run test:coverage 101 | 102 | # Lint code 103 | npm run lint 104 | 105 | # Format code 106 | npm run format 107 | ``` 108 | 109 | ### Scripts 110 | 111 | - `build`: Build the library for both ESM and CJS formats 112 | - `build:watch`: Build in watch mode for development 113 | - `test`: Run the test suite 114 | - `test:watch`: Run tests in watch mode 115 | - `test:coverage`: Run tests with coverage reporting 116 | - `lint`: Lint TypeScript files 117 | - `lint:fix`: Lint and auto-fix issues 118 | - `format`: Format code with Prettier 119 | - `format:check`: Check code formatting 120 | - `typecheck`: Type-check without emitting files 121 | - `clean`: Clean build artifacts 122 | - `dev`: Development mode with watch 123 | 124 | ## ESM and CommonJS Support 125 | 126 | This package supports both ESM and CommonJS formats automatically: 127 | 128 | ```javascript 129 | // ESM 130 | import { generateTaskId } from '@task-master/tm-core'; 131 | 132 | // CommonJS 133 | const { generateTaskId } = require('@task-master/tm-core'); 134 | ``` 135 | 136 | ## Roadmap 137 | 138 | This is the initial package structure. The following features are planned for implementation: 139 | 140 | ### Task 116: TypeScript Types 141 | - [ ] Complete type definitions for tasks, projects, and configurations 142 | - [ ] Zod schema validation 143 | - [ ] Generic type utilities 144 | 145 | ### Task 117: AI Provider System 146 | - [ ] Base provider interface 147 | - [ ] Anthropic Claude integration 148 | - [ ] OpenAI integration 149 | - [ ] Perplexity integration 150 | - [ ] Provider factory and registry 151 | 152 | ### Task 118: Storage Layer 153 | - [ ] File system storage adapter 154 | - [ ] Memory storage adapter 155 | - [ ] Storage interface and factory 156 | 157 | ### Task 119: Task Parser 158 | - [ ] PRD parser implementation 159 | - [ ] Markdown parser 160 | - [ ] JSON task format parser 161 | - [ ] Validation utilities 162 | 163 | ### Task 120: Utility Functions 164 | - [ ] Task ID generation 165 | - [ ] Date formatting 166 | - [ ] Validation helpers 167 | - [ ] File system utilities 168 | 169 | ### Task 121: Error Handling 170 | - [ ] Task-specific errors 171 | - [ ] Storage errors 172 | - [ ] Provider errors 173 | - [ ] Validation errors 174 | 175 | ### Task 122: Configuration System 176 | - [ ] Configuration schema 177 | - [ ] Default configurations 178 | - [ ] Environment variable support 179 | 180 | ### Task 123: Testing Infrastructure 181 | - [ ] Unit test coverage 182 | - [ ] Integration tests 183 | - [ ] Mock utilities 184 | 185 | ### Task 124: Documentation 186 | - [ ] API documentation 187 | - [ ] Usage examples 188 | - [ ] Migration guides 189 | 190 | ### Task 125: Package Finalization 191 | - [ ] Final testing and validation 192 | - [ ] Release preparation 193 | - [ ] CI/CD integration 194 | 195 | ## Implementation Checklist 196 | 197 | ### ✅ Task 115: Initialize tm-core Package Structure (COMPLETED) 198 | - [x] Create tm-core directory structure and base configuration files 199 | - [x] Configure build and test infrastructure 200 | - [x] Create barrel export files for all directories 201 | - [x] Add development tooling and documentation 202 | - [x] Validate package structure and prepare for development 203 | 204 | ### 🚧 Remaining Implementation Tasks 205 | - [ ] **Task 116**: TypeScript Types - Complete type definitions for tasks, projects, and configurations 206 | - [ ] **Task 117**: AI Provider System - Base provider interface and integrations 207 | - [ ] **Task 118**: Storage Layer - File system and memory storage adapters 208 | - [ ] **Task 119**: Task Parser - PRD, Markdown, and JSON parsers 209 | - [ ] **Task 120**: Utility Functions - Task ID generation, validation helpers 210 | - [ ] **Task 121**: Error Handling - Task-specific and validation errors 211 | - [ ] **Task 122**: Configuration System - Schema and environment support 212 | - [ ] **Task 123**: Testing Infrastructure - Complete unit and integration tests 213 | - [ ] **Task 124**: Documentation - API docs and usage examples 214 | - [ ] **Task 125**: Package Finalization - Release preparation and CI/CD 215 | 216 | ## Contributing 217 | 218 | This package is part of the Task Master AI project. Please refer to the main project's contributing guidelines. 219 | 220 | ## License 221 | 222 | MIT - See the main project's LICENSE file for details. 223 | 224 | ## Support 225 | 226 | For questions and support, please refer to the main Task Master AI documentation. ``` -------------------------------------------------------------------------------- /apps/extension/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # Official Taskmaster AI Extension 2 | 3 | Transform your AI-driven development workflow with a beautiful, interactive Kanban board directly in VS Code. Seamlessly manage tasks from [Taskmaster AI](https://github.com/eyaltoledano/claude-task-master) projects with real-time synchronization and intelligent task management. 4 | 5 |  6 |  7 |  8 |  9 | 10 | ## 🎯 What is Taskmaster AI? 11 | 12 | Taskmaster AI is an intelligent task management system designed for AI-assisted development. It helps you break down complex projects into manageable tasks, track progress, and leverage AI to enhance your development workflow. 13 | 14 | ## ✨ Key Features 15 | 16 | ### 📊 **Interactive Kanban Board** 17 | - **Drag & Drop Interface** - Effortlessly move tasks between status columns 18 | - **Real-time Sync** - Changes instantly reflect in your Taskmaster project files 19 | - **Multiple Views** - Board view and detailed task sidebar 20 | - **Smart Columns** - Pending, In Progress, Review, Done, Deferred, and Cancelled 21 | 22 |  23 | 24 | ### 🤖 **AI-Powered Features** 25 | - **Task Content Generation** - Regenerate task descriptions using AI 26 | - **Smart Task Updates** - Append findings and progress notes automatically 27 | - **MCP Integration** - Seamless connection to Taskmaster AI via Model Context Protocol 28 | - **Intelligent Caching** - Smart performance optimization with background refresh 29 | 30 |  31 | 32 | ### 🚀 **Performance & Usability** 33 | - **Offline Support** - Continue working even when disconnected 34 | - **Auto-refresh** - Automatic polling for task changes with smart frequency 35 | - **VS Code Native** - Perfectly integrated with VS Code themes and UI 36 | - **Modern Interface** - Built with ShadCN UI components and Tailwind CSS 37 | 38 | ## 🛠️ Installation 39 | 40 | ### Prerequisites 41 | 42 | 1. **VS Code** 1.90.0 or higher 43 | 2. **Node.js** 18.0 or higher (for Taskmaster MCP server) 44 | 45 | ### Install the Extension 46 | 47 | 1. **From VS Code Marketplace:** 48 | - Click the **Install** button above 49 | - The extension will be automatically added to your VS Code instance 50 | 51 | ## 🚀 Quick Start 52 | 53 | ### 1. **Initialize Taskmaster Project** 54 | If you don't have a Taskmaster project yet: 55 | ```bash 56 | cd your-project 57 | npm i -g task-master-ai 58 | task-master init 59 | ``` 60 | 61 | ### 2. **Open Kanban Board** 62 | - **Command Palette** (Ctrl+Shift+P): `Taskmaster Kanban: Show Board` 63 | - **Or** the extension automatically activates when you have a `.taskmaster` folder in your workspace 64 | 65 | ### 3. **MCP Server Setup** 66 | The extension automatically handles the Taskmaster MCP server connection: 67 | - **No manual installation required** - The extension spawns the MCP server automatically 68 | - **Uses npx by default** - Automatically downloads Taskmaster AI when needed 69 | - **Configurable** - You can customize the MCP server command in settings if needed 70 | 71 | ### 4. **Start Managing Tasks** 72 | - **Drag tasks** between columns to change status 73 | - **Click tasks** to view detailed information 74 | - **Use AI features** to enhance task content 75 | - **Add subtasks** with the + button on parent tasks 76 | 77 | ## 📋 Usage Guide 78 | 79 | ### Task Management 80 | 81 | | Action | How to Do It | 82 | |--------|--------------| 83 | | **View Kanban Board** | `Ctrl/Cmd + Shift + P` → "Taskmaster: Show Board" | 84 | | **Change Task Status** | Drag task card to different column | 85 | | **View Task Details** | Click on any task card | 86 | | **Edit Task Content** | Click task → Use edit buttons in details panel | 87 | | **Add Subtasks** | Click the + button on parent task cards | 88 | | **Use AI Features** | Open task details → Click AI action buttons | 89 | 90 | ### Understanding Task Statuses 91 | 92 | - 📋 **Pending** - Tasks ready to be started 93 | - 🚀 **In Progress** - Currently being worked on 94 | - 👀 **Review** - Awaiting review or feedback 95 | - ✅ **Done** - Completed tasks 96 | - ⏸️ **Deferred** - Postponed for later 97 | 98 | ### **AI-Powered Task Management** 99 | 100 | The extension integrates seamlessly with Taskmaster AI via MCP to provide: 101 | - **Smart Task Generation** - AI creates detailed implementation plans 102 | - **Progress Tracking** - Append timestamped notes and findings 103 | - **Content Enhancement** - Regenerate task descriptions for clarity 104 | - **Research Integration** - Get up-to-date information for your tasks 105 | 106 | ## ⚙️ Configuration 107 | 108 | Access settings via **File → Preferences → Settings** and search for "Taskmaster": 109 | 110 | ### **MCP Connection Settings** 111 | - **MCP Server Command** - Path to task-master-ai executable (default: `npx`) 112 | - **MCP Server Args** - Arguments for the server command (default: `-y`, `task-master-ai`) 113 | - **Connection Timeout** - Server response timeout (default: 30s) 114 | - **Auto Refresh** - Enable automatic task updates (default: enabled) 115 | 116 | ### **UI Preferences** 117 | - **Theme** - Auto, Light, or Dark mode 118 | - **Show Completed Tasks** - Display done tasks in board (default: enabled) 119 | - **Task Display Limit** - Maximum tasks to show (default: 100) 120 | 121 | ### **Performance Options** 122 | - **Cache Duration** - How long to cache task data (default: 5s) 123 | - **Concurrent Requests** - Max simultaneous API calls (default: 5) 124 | 125 | ## 🔧 Troubleshooting 126 | 127 | ### **Extension Not Loading** 128 | 1. Ensure Node.js 18+ is installed 129 | 2. Check workspace contains `.taskmaster` folder 130 | 3. Restart VS Code 131 | 4. Check Output panel (View → Output → Taskmaster Kanban) 132 | 133 | ### **MCP Connection Issues** 134 | 1. **Command not found**: Ensure Node.js and npx are in your PATH 135 | 2. **Timeout errors**: Increase timeout in settings 136 | 3. **Permission errors**: Check Node.js permissions 137 | 4. **Network issues**: Verify internet connection for npx downloads 138 | 139 | ### **Tasks Not Updating** 140 | 1. Check MCP connection status in status bar 141 | 2. Verify `.taskmaster/tasks/tasks.json` exists 142 | 3. Try manual refresh: `Taskmaster Kanban: Check Connection` 143 | 4. Review error logs in Output panel 144 | 145 | ### **Performance Issues** 146 | 1. Reduce task display limit in settings 147 | 2. Increase cache duration 148 | 3. Disable auto-refresh if needed 149 | 4. Close other VS Code extensions temporarily 150 | 151 | ## 🆘 Support & Resources 152 | 153 | ### **Getting Help** 154 | - 📖 **Documentation**: [Taskmaster AI Docs](https://github.com/eyaltoledano/claude-task-master) 155 | - 🐛 **Report Issues**: [GitHub Issues](https://github.com/eyaltoledano/claude-task-master/issues) 156 | - 💬 **Discussions**: [GitHub Discussions](https://github.com/eyaltoledano/claude-task-master/discussions) 157 | - 🐛 **Report Issues**: [GitHub Issues](https://github.com/eyaltoledano/claude-task-master/issues) 158 | 159 | ## 🎯 Tips for Best Results 160 | 161 | ### **Project Organization** 162 | - Use descriptive task titles 163 | - Add detailed implementation notes 164 | - Set appropriate task dependencies 165 | - Leverage AI features for complex tasks 166 | 167 | ### **Workflow Optimization** 168 | - Review task details before starting work 169 | - Use subtasks for complex features 170 | - Update task status as you progress 171 | - Add findings and learnings to task notes 172 | 173 | ### **Collaboration** 174 | - Keep task descriptions updated 175 | - Use consistent status conventions 176 | - Document decisions in task details 177 | - Share knowledge through task notes 178 | 179 | --- 180 | 181 | ## 🏆 Why Taskmaster Kanban? 182 | 183 | ✅ **Visual workflow management** for your Taskmaster projects 184 | ✅ **AI-powered task enhancement** built right in 185 | ✅ **Real-time synchronization** keeps everything in sync 186 | ✅ **Native VS Code integration** feels like part of the editor 187 | ✅ **Free and open source** with active development 188 | 189 | **Transform your development workflow today!** 🚀 190 | 191 | --- 192 | 193 | *Originally Made with ❤️ by [David Maliglowka](https://x.com/DavidMaliglowka)* 194 | 195 | ## Support 196 | 197 | This is an open-source project maintained in my spare time. While I strive to fix bugs and improve the extension, support is provided on a best-effort basis. Feel free to: 198 | - Report issues on [GitHub](https://github.com/eyaltoledano/claude-task-master/issues) 199 | - Submit pull requests with improvements 200 | - Fork the project if you need specific modifications 201 | 202 | ## Disclaimer 203 | 204 | This extension is provided "as is" without any warranties. Use at your own risk. The author is not responsible for any issues, data loss, or damages that may occur from using this extension. Please backup your work regularly and test thoroughly before using in important projects. ``` -------------------------------------------------------------------------------- /tests/manual/prompts/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # Task Master Prompt Template Testing 2 | 3 | This directory contains comprehensive testing tools for Task Master's centralized prompt template system. 4 | 5 | ## Interactive Menu System (Recommended) 6 | 7 | The test script now includes an interactive menu system for easy testing and exploration: 8 | 9 | ```bash 10 | node prompt-test.js 11 | ``` 12 | 13 | ### Menu Features 14 | 15 | **Main Menu Options:** 16 | 1. **Test specific prompt template** - Choose individual templates and variants 17 | 2. **Run all tests** - Execute the full test suite 18 | 3. **Toggle full prompt display** - Switch between preview and full prompt output (default: ON) 19 | 4. **Generate HTML report** - Create a professional HTML report and open in browser 20 | 5. **Exit** - Close the application 21 | 22 | **Template Selection:** 23 | - Choose from 8 available prompt templates 24 | - See available variants for each template 25 | - Test individual variants or all variants at once 26 | 27 | **Interactive Flow:** 28 | - Select template → Select variant → View results → Choose next action 29 | - Easy navigation back to previous menus 30 | - Color-coded output for better readability 31 | 32 | ## Batch Mode Options 33 | 34 | ### Run All Tests (Batch) 35 | ```bash 36 | node prompt-test.js --batch 37 | ``` 38 | Runs all tests non-interactively and exits with appropriate status code. 39 | 40 | ### Generate HTML Report 41 | ```bash 42 | node prompt-test.js --html 43 | ``` 44 | Generates a professional HTML report with all test results and full prompt content. The report includes: 45 | - **Test summary dashboard** with pass/fail statistics at the top 46 | - **Compact single-line format** - Each template shows: `template: [variant ✓] [variant ✗] - x/y passed` 47 | - **Individual pass/fail badges** - Visual ✓/✗ indicators for each variant test result 48 | - **Template status summary** - Shows x/y passed count at the end of each line 49 | - **Separate error condition section** - Tests for missing parameters, invalid variants, nonexistent templates 50 | - **Alphabetically sorted** - Templates and variants are sorted for predictable ordering 51 | - **Space-efficient layout** - Optimized for developer review with minimal vertical space 52 | - **Two-section layout**: 53 | 1. **Prompt Templates** - Real template variants testing 54 | 2. **Error Condition Tests** - Error handling validation (empty-prompt, missing-parameters, invalid-variant, etc.) 55 | 3. **Detailed Content** - Full system and user prompts below 56 | - **Full prompt content** displayed without scrolling (no truncation) 57 | - **Professional styling** with clear visual hierarchy and responsive design 58 | - **Automatic browser opening** (cross-platform) 59 | 60 | Reports are saved to `tests/manual/prompts/output/` with timestamps. 61 | 62 | ### Legacy Full Test Mode 63 | ```bash 64 | node prompt-test.js --full 65 | ``` 66 | Runs all tests and shows sample full prompts for verification. 67 | 68 | ### Help 69 | ```bash 70 | node prompt-test.js --help 71 | ``` 72 | Shows usage information and examples. 73 | 74 | ## Test Coverage 75 | 76 | The comprehensive test suite covers: 77 | 78 | ## Test Coverage Summary 79 | 80 | **Total Test Cases: 23** (18 functional + 5 error condition tests) 81 | 82 | ### Templates with Research Conditional Content 83 | These templates have `useResearch` or `research` parameters that modify prompt content: 84 | - **add-task** (default, research variants) 85 | - **analyze-complexity** (default, research variants) 86 | - **parse-prd** (default, research variants) 87 | - **update-subtask** (default, research variants) 88 | - **update-task** (default, append, research variants) 89 | 90 | ### Templates with Legitimate Separate Variants 91 | These templates have genuinely different prompts for different use cases: 92 | - **expand-task** (default, research, complexity-report variants) - Three sophisticated strategies with advanced parameter support 93 | - **research** (low, medium, high detail level variants) 94 | 95 | ### Single Variant Templates 96 | These templates only have one variant because research mode only changes AI role, not prompt content: 97 | - **update-tasks** (default variant only) 98 | 99 | ### Prompt Templates (8 total) 100 | - **add-task** (default, research variants) 101 | - **expand-task** (default, research, complexity-report variants) - Enhanced with sophisticated parameter support and context handling 102 | - **analyze-complexity** (default variant) 103 | - **research** (low, medium, high detail variants) 104 | - **parse-prd** (default variant) - Enhanced with sophisticated numTasks conditional logic 105 | - **update-subtask** (default variant with `useResearch` conditional content) 106 | - **update-task** (default, append variants; research uses `useResearch` conditional content) 107 | - **update-tasks** (default variant with `useResearch` conditional content) 108 | 109 | ### Test Scenarios (27 total) 110 | - 16 valid template/variant combinations (including enhanced expand-task with new parameter support) 111 | - 4 conditional logic validation tests (testing new gt/gte helper functions) 112 | - 7 error condition tests (nonexistent variants, templates, missing params, invalid detail levels) 113 | 114 | ### Validation 115 | - Parameter schema compliance 116 | - Template loading success/failure 117 | - Error handling for invalid inputs 118 | - Realistic test data for each template type 119 | - **Output content validation** for conditional logic (NEW) 120 | 121 | #### Conditional Logic Testing (NEW) 122 | The test suite now includes specific validation for the new `gt` (greater than) and `gte` (greater than or equal) helper functions: 123 | 124 | **Helper Function Tests:** 125 | - `conditional-zero-tasks`: Validates `numTasks = 0` produces "an appropriate number of" text 126 | - `conditional-positive-tasks`: Validates `numTasks = 5` produces "approximately 5" text 127 | - `conditional-zero-subtasks`: Validates `subtaskCount = 0` produces "an appropriate number of" text 128 | - `conditional-positive-subtasks`: Validates `subtaskCount = 3` produces "exactly 3" text 129 | 130 | These tests use the new `validateOutput` function to verify that conditional template logic produces the expected rendered content, ensuring our helper functions work correctly beyond just successful template loading. 131 | 132 | ## Output Modes 133 | 134 | ### Preview Mode (Default) 135 | Shows truncated prompts (200 characters) for quick overview: 136 | ``` 137 | System Prompt Preview: 138 | You are an AI assistant helping with task management... 139 | 140 | User Prompt Preview: 141 | Create a new task based on the following description... 142 | 143 | Tip: Use option 3 in main menu to toggle full prompt display 144 | ``` 145 | 146 | ### Full Mode 147 | Shows complete system and user prompts for detailed verification: 148 | ``` 149 | System Prompt: 150 | [Complete system prompt content] 151 | 152 | User Prompt: 153 | [Complete user prompt content] 154 | ``` 155 | 156 | ## Test Data 157 | 158 | Each template uses realistic test data: 159 | 160 | - **Tasks**: Complete task objects with proper IDs, titles, descriptions 161 | - **Context**: Simulated project context and gathered information 162 | - **Parameters**: Properly formatted parameters matching each template's schema 163 | - **Research**: Sample queries and detail levels for research prompts 164 | 165 | ## Error Testing 166 | 167 | The test suite includes error condition validation: 168 | - Nonexistent template variants 169 | - Invalid template names 170 | - Missing required parameters 171 | - Malformed parameter data 172 | 173 | ## Exit Codes (Batch Mode) 174 | 175 | - **0**: All tests passed 176 | - **1**: One or more tests failed 177 | 178 | ## Use Cases 179 | 180 | ### Development Workflow 181 | 1. **Template Development**: Test new templates interactively 182 | 2. **Variant Testing**: Verify all variants work correctly 183 | 3. **Parameter Validation**: Ensure parameter schemas are working 184 | 4. **Regression Testing**: Run batch tests after changes 185 | 186 | ### Manual Verification 187 | 1. **Prompt Review**: Human verification of generated prompts 188 | 2. **Parameter Exploration**: See how different parameters affect output 189 | 3. **Context Testing**: Verify context inclusion and formatting 190 | 191 | ### CI/CD Integration 192 | ```bash 193 | # In CI pipeline 194 | node tests/manual/prompts/prompt-test.js --batch 195 | ``` 196 | 197 | The interactive menu makes it easy to explore and verify prompt templates during development, while batch mode enables automated testing in CI/CD pipelines. 198 | 199 | ## 🎯 Purpose 200 | 201 | - **Verify all 8 prompt templates** work correctly with the prompt manager 202 | - **Test multiple variants** for each prompt (default, research, complexity-report, etc.) 203 | - **Show full generated prompts** for human verification and debugging 204 | - **Test error conditions** and parameter validation 205 | - **Provide realistic sample data** for each prompt type 206 | 207 | ## 📁 Files 208 | 209 | - `prompt-test.js` - Main test script 210 | - `output/` - Generated HTML reports (when using --html flag or menu option) 211 | 212 | ## 🎯 Use Cases 213 | 214 | ### For Developers 215 | - **Verify prompt changes** don't break existing functionality 216 | - **Test new prompt variants** before deployment 217 | - **Debug prompt generation** issues with full output 218 | - **Validate parameter schemas** work correctly 219 | 220 | ### For QA 221 | - **Regression testing** after prompt template changes 222 | - **Verification of prompt outputs** match expectations 223 | - **Parameter validation testing** for robustness 224 | - **Cross-variant consistency** checking 225 | 226 | ### For Documentation 227 | - **Reference for prompt usage** with realistic examples 228 | - **Parameter requirements** demonstration 229 | - **Variant differences** visualization 230 | - **Expected output formats** examples 231 | 232 | ## ⚠️ Important Notes 233 | 234 | 1. **Real Prompt Manager**: This test uses the actual prompt manager, not mocks 235 | 2. **Parameter Accuracy**: All parameters match the exact schema requirements of each prompt template 236 | 3. **Variant Coverage**: Tests all documented variants for each prompt type 237 | 4. **Sample Data**: Uses realistic project scenarios, not dummy data 238 | 5. **Exit Codes**: Returns exit code 1 if any tests fail, 0 if all pass 239 | 240 | ## 🔄 Maintenance 241 | 242 | When adding new prompt templates or variants: 243 | 244 | 1. Add sample data to the `sampleData` object 245 | 2. Include realistic parameters matching the prompt's schema 246 | 3. Test all documented variants 247 | 4. Verify with the `--full` flag that prompts generate correctly 248 | 5. Update this README with new coverage information 249 | 250 | This test suite should be run whenever: 251 | - Prompt templates are modified 252 | - New variants are added 253 | - Parameter schemas change 254 | - Prompt manager logic is updated 255 | - Before major releases ``` -------------------------------------------------------------------------------- /src/prompts/schemas/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # Task Master JSON Schemas 2 | 3 | This directory contains JSON schemas for validating Task Master prompt templates. These schemas provide IDE support, validation, and better developer experience when working with prompt templates. 4 | 5 | ## Overview 6 | 7 | The schema system provides: 8 | - **Structural Validation**: Ensures all required fields and proper JSON structure 9 | - **Type Safety**: Validates parameter types and value constraints 10 | - **IDE Integration**: IntelliSense and auto-completion in VS Code 11 | - **Development Safety**: Catches errors before runtime 12 | - **Documentation**: Self-documenting templates through schema definitions 13 | 14 | ## Schema Files 15 | 16 | ### `prompt-template.schema.json` (Main Schema) 17 | **Version**: 1.0.0 18 | **Purpose**: Main schema for Task Master prompt template files 19 | 20 | **Validates**: 21 | - Template metadata (id, version, description) 22 | - Parameter definitions with comprehensive type validation 23 | - Prompt variants with conditional logic 24 | - Cross-references between parameters and template variables 25 | - Semantic versioning compliance 26 | - Handlebars template syntax 27 | 28 | **Required Fields**: 29 | - `id`: Unique template identifier (kebab-case) 30 | - `version`: Semantic version (e.g., "1.0.0") 31 | - `description`: Human-readable description 32 | - `prompts.default`: Default prompt variant 33 | 34 | **Optional Fields**: 35 | - `metadata`: Additional template information 36 | - `parameters`: Parameter definitions for template variables 37 | - `prompts.*`: Additional prompt variants 38 | 39 | ### `parameter.schema.json` (Parameter Schema) 40 | **Version**: 1.0.0 41 | **Purpose**: Reusable schema for individual prompt parameters 42 | 43 | **Supports**: 44 | - **Type Validation**: `string`, `number`, `boolean`, `array`, `object` 45 | - **Constraints**: Required/optional parameters, default values 46 | - **String Validation**: Pattern matching (regex), enum constraints 47 | - **Numeric Validation**: Minimum/maximum values, integer constraints 48 | - **Array Validation**: Item types, minimum/maximum length 49 | - **Object Validation**: Property definitions and required fields 50 | 51 | **Parameter Properties**: 52 | ```json 53 | { 54 | "type": "string|number|boolean|array|object", 55 | "required": true|false, 56 | "default": "any value matching type", 57 | "description": "Parameter documentation", 58 | "enum": ["option1", "option2"], 59 | "pattern": "^regex$", 60 | "minimum": 0, 61 | "maximum": 100, 62 | "minLength": 1, 63 | "maxLength": 255, 64 | "items": { "type": "string" }, 65 | "properties": { "key": { "type": "string" } } 66 | } 67 | ``` 68 | 69 | ### `variant.schema.json` (Variant Schema) 70 | **Version**: 1.0.0 71 | **Purpose**: Schema for prompt template variants 72 | 73 | **Validates**: 74 | - System and user prompt templates 75 | - Conditional expressions for variant selection 76 | - Variable placeholders using Handlebars syntax 77 | - Variant metadata and descriptions 78 | 79 | **Variant Structure**: 80 | ```json 81 | { 82 | "condition": "JavaScript expression", 83 | "system": "System prompt template", 84 | "user": "User prompt template", 85 | "metadata": { 86 | "description": "When to use this variant" 87 | } 88 | } 89 | ``` 90 | 91 | ## Schema Validation Rules 92 | 93 | ### Template ID Validation 94 | - **Pattern**: `^[a-z][a-z0-9-]*[a-z0-9]$` 95 | - **Format**: Kebab-case, alphanumeric with hyphens 96 | - **Examples**: 97 | - ✅ `add-task`, `parse-prd`, `analyze-complexity` 98 | - ❌ `AddTask`, `add_task`, `-invalid-`, `task-` 99 | 100 | ### Version Validation 101 | - **Pattern**: Semantic versioning (semver) 102 | - **Format**: `MAJOR.MINOR.PATCH` 103 | - **Examples**: 104 | - ✅ `1.0.0`, `2.1.3`, `10.0.0` 105 | - ❌ `1.0`, `v1.0.0`, `1.0.0-beta` 106 | 107 | ### Parameter Type Validation 108 | - **String**: Text values with optional pattern/enum constraints 109 | - **Number**: Numeric values with optional min/max constraints 110 | - **Boolean**: True/false values 111 | - **Array**: Lists with optional item type validation 112 | - **Object**: Complex structures with property definitions 113 | 114 | ### Template Variable Validation 115 | - **Handlebars Syntax**: `{{variable}}`, `{{#if condition}}`, `{{#each array}}` 116 | - **Parameter References**: All template variables must have corresponding parameters 117 | - **Nested Access**: Support for `{{object.property}}` notation 118 | - **Special Variables**: `{{@index}}`, `{{@first}}`, `{{@last}}` in loops 119 | 120 | ## IDE Integration 121 | 122 | ### VS Code Setup 123 | The VS Code profile automatically configures schema validation: 124 | 125 | ```json 126 | { 127 | "json.schemas": [ 128 | { 129 | "fileMatch": [ 130 | "src/prompts/**/*.json", 131 | ".taskmaster/prompts/**/*.json", 132 | "prompts/**/*.json" 133 | ], 134 | "url": "./src/prompts/schemas/prompt-template.schema.json" 135 | } 136 | ] 137 | } 138 | ``` 139 | 140 | **Features Provided**: 141 | - **Auto-completion**: IntelliSense for all schema properties 142 | - **Real-time Validation**: Immediate error highlighting 143 | - **Hover Documentation**: Parameter descriptions on hover 144 | - **Error Messages**: Detailed validation error explanations 145 | 146 | ### Other IDEs 147 | For other development environments: 148 | 149 | **Schema URLs**: 150 | - **Local Development**: `./src/prompts/schemas/prompt-template.schema.json` 151 | - **GitHub Reference**: `https://github.com/eyaltoledano/claude-task-master/blob/main/src/prompts/schemas/prompt-template.schema.json` 152 | 153 | **File Patterns**: 154 | - `src/prompts/**/*.json` 155 | - `.taskmaster/prompts/**/*.json` 156 | - `prompts/**/*.json` 157 | 158 | ## Validation Examples 159 | 160 | ### Valid Template Example 161 | ```json 162 | { 163 | "id": "example-prompt", 164 | "version": "1.0.0", 165 | "description": "Example prompt template with comprehensive validation", 166 | "metadata": { 167 | "author": "Task Master Team", 168 | "category": "task", 169 | "tags": ["example", "validation"] 170 | }, 171 | "parameters": { 172 | "taskDescription": { 173 | "type": "string", 174 | "description": "Description of the task to perform", 175 | "required": true, 176 | "minLength": 5, 177 | "maxLength": 500 178 | }, 179 | "priority": { 180 | "type": "string", 181 | "description": "Task priority level", 182 | "required": false, 183 | "enum": ["high", "medium", "low"], 184 | "default": "medium" 185 | }, 186 | "maxTokens": { 187 | "type": "number", 188 | "description": "Maximum tokens for response", 189 | "required": false, 190 | "minimum": 100, 191 | "maximum": 4000, 192 | "default": 1000 193 | }, 194 | "useResearch": { 195 | "type": "boolean", 196 | "description": "Whether to include research context", 197 | "required": false, 198 | "default": false 199 | }, 200 | "tags": { 201 | "type": "array", 202 | "description": "Task tags for categorization", 203 | "required": false, 204 | "items": { 205 | "type": "string", 206 | "pattern": "^[a-z][a-z0-9-]*$" 207 | } 208 | } 209 | }, 210 | "prompts": { 211 | "default": { 212 | "system": "You are a helpful AI assistant that creates tasks with {{priority}} priority.", 213 | "user": "Create a task: {{taskDescription}}{{#if tags}}\nTags: {{#each tags}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}{{/if}}" 214 | }, 215 | "research": { 216 | "condition": "useResearch === true", 217 | "system": "You are a research-focused AI assistant with access to current information.", 218 | "user": "Research and create a task: {{taskDescription}}" 219 | } 220 | } 221 | } 222 | ``` 223 | 224 | ### Common Validation Errors 225 | 226 | **Missing Required Fields**: 227 | ```json 228 | // ❌ Error: Missing required 'id' field 229 | { 230 | "version": "1.0.0", 231 | "description": "Missing ID" 232 | } 233 | ``` 234 | 235 | **Invalid ID Format**: 236 | ```json 237 | // ❌ Error: ID must be kebab-case 238 | { 239 | "id": "InvalidID_Format", 240 | "version": "1.0.0" 241 | } 242 | ``` 243 | 244 | **Parameter Type Mismatch**: 245 | ```json 246 | // ❌ Error: Parameter type doesn't match usage 247 | { 248 | "parameters": { 249 | "count": { "type": "string" } 250 | }, 251 | "prompts": { 252 | "default": { 253 | "user": "Process {{count}} items" // Should be number for counting 254 | } 255 | } 256 | } 257 | ``` 258 | 259 | **Invalid Condition Syntax**: 260 | ```json 261 | // ❌ Error: Invalid JavaScript in condition 262 | { 263 | "prompts": { 264 | "variant": { 265 | "condition": "useResearch = true", // Should be === 266 | "user": "Research prompt" 267 | } 268 | } 269 | } 270 | ``` 271 | 272 | ## Development Workflow 273 | 274 | ### Creating New Templates 275 | 1. **Start with Schema**: Use VS Code with schema validation enabled 276 | 2. **Define Structure**: Begin with required fields (id, version, description) 277 | 3. **Add Parameters**: Define all template variables with proper types 278 | 4. **Create Prompts**: Write system and user prompts with template variables 279 | 5. **Test Validation**: Ensure template validates without errors 280 | 6. **Add Variants**: Create additional variants if needed 281 | 7. **Document Usage**: Update the main README with template details 282 | 283 | ### Modifying Existing Templates 284 | 1. **Check Current Version**: Note the current version number 285 | 2. **Assess Changes**: Determine if changes are breaking or non-breaking 286 | 3. **Update Version**: Increment version following semantic versioning 287 | 4. **Maintain Compatibility**: Avoid breaking existing parameter contracts 288 | 5. **Test Thoroughly**: Verify all existing code still works 289 | 6. **Update Documentation**: Reflect changes in README files 290 | 291 | ### Schema Evolution 292 | When updating schemas themselves: 293 | 294 | 1. **Backward Compatibility**: Ensure existing templates remain valid 295 | 2. **Version Increment**: Update schema version in `$id` and `version` fields 296 | 3. **Test Migration**: Validate all existing templates against new schema 297 | 4. **Document Changes**: Update this README with schema changes 298 | 5. **Coordinate Release**: Ensure schema and template changes are synchronized 299 | 300 | ## Advanced Validation Features 301 | 302 | ### Cross-Reference Validation 303 | The schema validates that: 304 | - All template variables have corresponding parameters 305 | - Parameter types match their usage in templates 306 | - Variant conditions reference valid parameters 307 | - Nested property access is properly defined 308 | 309 | ### Conditional Validation 310 | - **Dynamic Schemas**: Different validation rules based on parameter values 311 | - **Variant Conditions**: JavaScript expression validation 312 | - **Template Syntax**: Handlebars syntax validation 313 | - **Parameter Dependencies**: Required parameters based on other parameters 314 | 315 | ### Custom Validation Rules 316 | The schema includes custom validation for: 317 | - **Semantic Versioning**: Proper version format validation 318 | - **Template Variables**: Handlebars syntax and parameter references 319 | - **Condition Expressions**: JavaScript expression syntax validation 320 | - **File Patterns**: Consistent naming conventions 321 | 322 | ## Performance Considerations 323 | 324 | ### Schema Loading 325 | - **Caching**: Schemas are loaded once and cached 326 | - **Lazy Loading**: Validation only occurs when templates are accessed 327 | - **Memory Efficiency**: Shared schema instances across templates 328 | 329 | ### Validation Performance 330 | - **Fast Validation**: AJV provides optimized validation 331 | - **Error Batching**: Multiple errors reported in single validation pass 332 | - **Minimal Overhead**: Validation adds minimal runtime cost 333 | 334 | ### Development Impact 335 | - **IDE Responsiveness**: Real-time validation without performance impact 336 | - **Build Time**: Schema validation during development, not production 337 | - **Testing Speed**: Fast validation during test execution 338 | 339 | ## Troubleshooting 340 | 341 | ### Common Schema Issues 342 | 343 | **Schema Not Loading**: 344 | - Check file paths in VS Code settings 345 | - Verify schema files exist and are valid JSON 346 | - Restart VS Code if changes aren't recognized 347 | 348 | **Validation Not Working**: 349 | - Ensure `ajv` and `ajv-formats` dependencies are installed 350 | - Check for JSON syntax errors in templates 351 | - Verify schema file paths are correct 352 | 353 | **Performance Issues**: 354 | - Check for circular references in schemas 355 | - Verify schema caching is working 356 | - Monitor validation frequency in development 357 | 358 | ### Debugging Validation Errors 359 | 360 | **Understanding Error Messages**: 361 | ```javascript 362 | // Example error output 363 | { 364 | "instancePath": "/parameters/priority/type", 365 | "schemaPath": "#/properties/parameters/additionalProperties/properties/type/enum", 366 | "keyword": "enum", 367 | "params": { "allowedValues": ["string", "number", "boolean", "array", "object"] }, 368 | "message": "must be equal to one of the allowed values" 369 | } 370 | ``` 371 | 372 | **Common Error Patterns**: 373 | - `instancePath`: Shows where in the template the error occurred 374 | - `schemaPath`: Shows which schema rule was violated 375 | - `keyword`: Indicates the type of validation that failed 376 | - `params`: Provides additional context about the validation rule 377 | - `message`: Human-readable description of the error 378 | 379 | ### Getting Help 380 | 381 | **Internal Resources**: 382 | - Main prompt README: `src/prompts/README.md` 383 | - Schema files: `src/prompts/schemas/*.json` 384 | - PromptManager code: `scripts/modules/prompt-manager.js` 385 | 386 | **External Resources**: 387 | - JSON Schema documentation: https://json-schema.org/ 388 | - AJV validation library: https://ajv.js.org/ 389 | - Handlebars template syntax: https://handlebarsjs.com/ 390 | 391 | ## Schema URLs and References 392 | 393 | ### Current Schema Locations 394 | - **Local Development**: `./src/prompts/schemas/prompt-template.schema.json` 395 | - **GitHub Blob**: `https://github.com/eyaltoledano/claude-task-master/blob/main/src/prompts/schemas/prompt-template.schema.json` 396 | - **Schema ID**: Used for internal references and validation 397 | 398 | ### URL Usage Guidelines 399 | - **`$id` Field**: Use GitHub blob URLs for stable schema identification 400 | - **Local References**: Use relative paths for development and testing 401 | - **External Tools**: GitHub blob URLs provide stable, version-controlled access 402 | - **Documentation**: Link to GitHub for public schema access ``` -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- ```markdown 1 | <a name="readme-top"></a> 2 | 3 | <div align='center'> 4 | <a href="https://trendshift.io/repositories/13971" target="_blank"><img src="https://trendshift.io/api/badge/repositories/13971" alt="eyaltoledano%2Fclaude-task-master | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> 5 | </div> 6 | 7 | <p align="center"> 8 | <a href="https://task-master.dev"><img src="./images/logo.png?raw=true" alt="Taskmaster logo"></a> 9 | </p> 10 | 11 | <p align="center"> 12 | <b>Taskmaster</b>: A task management system for AI-driven development, designed to work seamlessly with any AI chat. 13 | </p> 14 | 15 | <p align="center"> 16 | <a href="https://discord.gg/taskmasterai" target="_blank"><img src="https://dcbadge.limes.pink/api/server/https://discord.gg/taskmasterai?style=flat" alt="Discord"></a> | 17 | <a href="https://docs.task-master.dev" target="_blank">Docs</a> 18 | </p> 19 | 20 | <p align="center"> 21 | <a href="https://github.com/eyaltoledano/claude-task-master/actions/workflows/ci.yml"><img src="https://github.com/eyaltoledano/claude-task-master/actions/workflows/ci.yml/badge.svg" alt="CI"></a> 22 | <a href="https://github.com/eyaltoledano/claude-task-master/stargazers"><img src="https://img.shields.io/github/stars/eyaltoledano/claude-task-master?style=social" alt="GitHub stars"></a> 23 | <a href="https://badge.fury.io/js/task-master-ai"><img src="https://badge.fury.io/js/task-master-ai.svg" alt="npm version"></a> 24 | <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT%20with%20Commons%20Clause-blue.svg" alt="License"></a> 25 | </p> 26 | 27 | <p align="center"> 28 | <a href="https://www.npmjs.com/package/task-master-ai"><img src="https://img.shields.io/npm/d18m/task-master-ai?style=flat" alt="NPM Downloads"></a> 29 | <a href="https://www.npmjs.com/package/task-master-ai"><img src="https://img.shields.io/npm/dm/task-master-ai?style=flat" alt="NPM Downloads"></a> 30 | <a href="https://www.npmjs.com/package/task-master-ai"><img src="https://img.shields.io/npm/dw/task-master-ai?style=flat" alt="NPM Downloads"></a> 31 | </p> 32 | 33 | ## By [@eyaltoledano](https://x.com/eyaltoledano) & [@RalphEcom](https://x.com/RalphEcom) 34 | 35 | [](https://x.com/eyaltoledano) 36 | [](https://x.com/RalphEcom) 37 | 38 | A task management system for AI-driven development with Claude, designed to work seamlessly with Cursor AI. 39 | 40 | ## Documentation 41 | 42 | 📚 **[View Full Documentation](https://docs.task-master.dev)** 43 | 44 | For detailed guides, API references, and comprehensive examples, visit our documentation site. 45 | 46 | ### Quick Reference 47 | 48 | The following documentation is also available in the `docs` directory: 49 | 50 | - [Configuration Guide](docs/configuration.md) - Set up environment variables and customize Task Master 51 | - [Tutorial](docs/tutorial.md) - Step-by-step guide to getting started with Task Master 52 | - [Command Reference](docs/command-reference.md) - Complete list of all available commands 53 | - [Task Structure](docs/task-structure.md) - Understanding the task format and features 54 | - [Example Interactions](docs/examples.md) - Common Cursor AI interaction examples 55 | - [Migration Guide](docs/migration-guide.md) - Guide to migrating to the new project structure 56 | 57 | #### Quick Install for Cursor 1.0+ (One-Click) 58 | 59 | [](https://cursor.com/en/install-mcp?name=task-master-ai&config=eyJjb21tYW5kIjoibnB4IC15IC0tcGFja2FnZT10YXNrLW1hc3Rlci1haSB0YXNrLW1hc3Rlci1haSIsImVudiI6eyJBTlRIUk9QSUNfQVBJX0tFWSI6IllPVVJfQU5USFJPUElDX0FQSV9LRVlfSEVSRSIsIlBFUlBMRVhJVFlfQVBJX0tFWSI6IllPVVJfUEVSUExFWElUWV9BUElfS0VZX0hFUkUiLCJPUEVOQUlfQVBJX0tFWSI6IllPVVJfT1BFTkFJX0tFWV9IRVJFIiwiR09PR0xFX0FQSV9LRVkiOiJZT1VSX0dPT0dMRV9LRVlfSEVSRSIsIk1JU1RSQUxfQVBJX0tFWSI6IllPVVJfTUlTVFJBTF9LRVlfSEVSRSIsIkdST1FfQVBJX0tFWSI6IllPVVJfR1JPUV9LRVlfSEVSRSIsIk9QRU5ST1VURVJfQVBJX0tFWSI6IllPVVJfT1BFTlJPVVRFUl9LRVlfSEVSRSIsIlhBSV9BUElfS0VZIjoiWU9VUl9YQUlfS0VZX0hFUkUiLCJBWlVSRV9PUEVOQUlfQVBJX0tFWSI6IllPVVJfQVpVUkVfS0VZX0hFUkUiLCJPTExBTUFfQVBJX0tFWSI6IllPVVJfT0xMQU1BX0FQSV9LRVlfSEVSRSJ9fQ%3D%3D) 60 | 61 | > **Note:** After clicking the link, you'll still need to add your API keys to the configuration. The link installs the MCP server with placeholder keys that you'll need to replace with your actual API keys. 62 | 63 | ## Requirements 64 | 65 | Taskmaster utilizes AI across several commands, and those require a separate API key. You can use a variety of models from different AI providers provided you add your API keys. For example, if you want to use Claude 3.7, you'll need an Anthropic API key. 66 | 67 | You can define 3 types of models to be used: the main model, the research model, and the fallback model (in case either the main or research fail). Whatever model you use, its provider API key must be present in either mcp.json or .env. 68 | 69 | At least one (1) of the following is required: 70 | 71 | - Anthropic API key (Claude API) 72 | - OpenAI API key 73 | - Google Gemini API key 74 | - Perplexity API key (for research model) 75 | - xAI API Key (for research or main model) 76 | - OpenRouter API Key (for research or main model) 77 | - Claude Code (no API key required - requires Claude Code CLI) 78 | 79 | Using the research model is optional but highly recommended. You will need at least ONE API key (unless using Claude Code). Adding all API keys enables you to seamlessly switch between model providers at will. 80 | 81 | ## Quick Start 82 | 83 | ### Option 1: MCP (Recommended) 84 | 85 | MCP (Model Control Protocol) lets you run Task Master directly from your editor. 86 | 87 | #### 1. Add your MCP config at the following path depending on your editor 88 | 89 | | Editor | Scope | Linux/macOS Path | Windows Path | Key | 90 | | ------------ | ------- | ------------------------------------- | ------------------------------------------------- | ------------ | 91 | | **Cursor** | Global | `~/.cursor/mcp.json` | `%USERPROFILE%\.cursor\mcp.json` | `mcpServers` | 92 | | | Project | `<project_folder>/.cursor/mcp.json` | `<project_folder>\.cursor\mcp.json` | `mcpServers` | 93 | | **Windsurf** | Global | `~/.codeium/windsurf/mcp_config.json` | `%USERPROFILE%\.codeium\windsurf\mcp_config.json` | `mcpServers` | 94 | | **VS Code** | Project | `<project_folder>/.vscode/mcp.json` | `<project_folder>\.vscode\mcp.json` | `servers` | 95 | 96 | ##### Manual Configuration 97 | 98 | ###### Cursor & Windsurf (`mcpServers`) 99 | 100 | ```json 101 | { 102 | "mcpServers": { 103 | "task-master-ai": { 104 | "command": "npx", 105 | "args": ["-y", "task-master-ai"], 106 | "env": { 107 | "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE", 108 | "PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE", 109 | "OPENAI_API_KEY": "YOUR_OPENAI_KEY_HERE", 110 | "GOOGLE_API_KEY": "YOUR_GOOGLE_KEY_HERE", 111 | "MISTRAL_API_KEY": "YOUR_MISTRAL_KEY_HERE", 112 | "GROQ_API_KEY": "YOUR_GROQ_KEY_HERE", 113 | "OPENROUTER_API_KEY": "YOUR_OPENROUTER_KEY_HERE", 114 | "XAI_API_KEY": "YOUR_XAI_KEY_HERE", 115 | "AZURE_OPENAI_API_KEY": "YOUR_AZURE_KEY_HERE", 116 | "OLLAMA_API_KEY": "YOUR_OLLAMA_API_KEY_HERE" 117 | } 118 | } 119 | } 120 | } 121 | ``` 122 | 123 | > 🔑 Replace `YOUR_…_KEY_HERE` with your real API keys. You can remove keys you don't use. 124 | 125 | > **Note**: If you see `0 tools enabled` in the MCP settings, restart your editor and check that your API keys are correctly configured. 126 | 127 | ###### VS Code (`servers` + `type`) 128 | 129 | ```json 130 | { 131 | "servers": { 132 | "task-master-ai": { 133 | "command": "npx", 134 | "args": ["-y", "task-master-ai"], 135 | "env": { 136 | "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE", 137 | "PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE", 138 | "OPENAI_API_KEY": "YOUR_OPENAI_KEY_HERE", 139 | "GOOGLE_API_KEY": "YOUR_GOOGLE_KEY_HERE", 140 | "MISTRAL_API_KEY": "YOUR_MISTRAL_KEY_HERE", 141 | "GROQ_API_KEY": "YOUR_GROQ_KEY_HERE", 142 | "OPENROUTER_API_KEY": "YOUR_OPENROUTER_KEY_HERE", 143 | "XAI_API_KEY": "YOUR_XAI_KEY_HERE", 144 | "AZURE_OPENAI_API_KEY": "YOUR_AZURE_KEY_HERE", 145 | "OLLAMA_API_KEY": "YOUR_OLLAMA_API_KEY_HERE" 146 | }, 147 | "type": "stdio" 148 | } 149 | } 150 | } 151 | ``` 152 | 153 | > 🔑 Replace `YOUR_…_KEY_HERE` with your real API keys. You can remove keys you don't use. 154 | 155 | #### 2. (Cursor-only) Enable Taskmaster MCP 156 | 157 | Open Cursor Settings (Ctrl+Shift+J) ➡ Click on MCP tab on the left ➡ Enable task-master-ai with the toggle 158 | 159 | #### 3. (Optional) Configure the models you want to use 160 | 161 | In your editor's AI chat pane, say: 162 | 163 | ```txt 164 | Change the main, research and fallback models to <model_name>, <model_name> and <model_name> respectively. 165 | ``` 166 | 167 | For example, to use Claude Code (no API key required): 168 | ```txt 169 | Change the main model to claude-code/sonnet 170 | ``` 171 | 172 | [Table of available models](docs/models.md) | [Claude Code setup](docs/examples/claude-code-usage.md) 173 | 174 | #### 4. Initialize Task Master 175 | 176 | In your editor's AI chat pane, say: 177 | 178 | ```txt 179 | Initialize taskmaster-ai in my project 180 | ``` 181 | 182 | #### 5. Make sure you have a PRD (Recommended) 183 | 184 | For **new projects**: Create your PRD at `.taskmaster/docs/prd.txt` 185 | For **existing projects**: You can use `scripts/prd.txt` or migrate with `task-master migrate` 186 | 187 | An example PRD template is available after initialization in `.taskmaster/templates/example_prd.txt`. 188 | 189 | > [!NOTE] 190 | > While a PRD is recommended for complex projects, you can always create individual tasks by asking "Can you help me implement [description of what you want to do]?" in chat. 191 | 192 | **Always start with a detailed PRD.** 193 | 194 | The more detailed your PRD, the better the generated tasks will be. 195 | 196 | #### 6. Common Commands 197 | 198 | Use your AI assistant to: 199 | 200 | - Parse requirements: `Can you parse my PRD at scripts/prd.txt?` 201 | - Plan next step: `What's the next task I should work on?` 202 | - Implement a task: `Can you help me implement task 3?` 203 | - View multiple tasks: `Can you show me tasks 1, 3, and 5?` 204 | - Expand a task: `Can you help me expand task 4?` 205 | - **Research fresh information**: `Research the latest best practices for implementing JWT authentication with Node.js` 206 | - **Research with context**: `Research React Query v5 migration strategies for our current API implementation in src/api.js` 207 | 208 | [More examples on how to use Task Master in chat](docs/examples.md) 209 | 210 | ### Option 2: Using Command Line 211 | 212 | #### Installation 213 | 214 | ```bash 215 | # Install globally 216 | npm install -g task-master-ai 217 | 218 | # OR install locally within your project 219 | npm install task-master-ai 220 | ``` 221 | 222 | #### Initialize a new project 223 | 224 | ```bash 225 | # If installed globally 226 | task-master init 227 | 228 | # If installed locally 229 | npx task-master init 230 | 231 | # Initialize project with specific rules 232 | task-master init --rules cursor,windsurf,vscode 233 | ``` 234 | 235 | This will prompt you for project details and set up a new project with the necessary files and structure. 236 | 237 | #### Common Commands 238 | 239 | ```bash 240 | # Initialize a new project 241 | task-master init 242 | 243 | # Parse a PRD and generate tasks 244 | task-master parse-prd your-prd.txt 245 | 246 | # List all tasks 247 | task-master list 248 | 249 | # Show the next task to work on 250 | task-master next 251 | 252 | # Show specific task(s) - supports comma-separated IDs 253 | task-master show 1,3,5 254 | 255 | # Research fresh information with project context 256 | task-master research "What are the latest best practices for JWT authentication?" 257 | 258 | # Move tasks between tags (cross-tag movement) 259 | task-master move --from=5 --from-tag=backlog --to-tag=in-progress 260 | task-master move --from=5,6,7 --from-tag=backlog --to-tag=done --with-dependencies 261 | task-master move --from=5 --from-tag=backlog --to-tag=in-progress --ignore-dependencies 262 | 263 | # Generate task files 264 | task-master generate 265 | 266 | # Add rules after initialization 267 | task-master rules add windsurf,roo,vscode 268 | ``` 269 | 270 | ## Claude Code Support 271 | 272 | Task Master now supports Claude models through the Claude Code CLI, which requires no API key: 273 | 274 | - **Models**: `claude-code/opus` and `claude-code/sonnet` 275 | - **Requirements**: Claude Code CLI installed 276 | - **Benefits**: No API key needed, uses your local Claude instance 277 | 278 | [Learn more about Claude Code setup](docs/examples/claude-code-usage.md) 279 | 280 | ## Troubleshooting 281 | 282 | ### If `task-master init` doesn't respond 283 | 284 | Try running it with Node directly: 285 | 286 | ```bash 287 | node node_modules/claude-task-master/scripts/init.js 288 | ``` 289 | 290 | Or clone the repository and run: 291 | 292 | ```bash 293 | git clone https://github.com/eyaltoledano/claude-task-master.git 294 | cd claude-task-master 295 | node scripts/init.js 296 | ``` 297 | 298 | ## Contributors 299 | 300 | <a href="https://github.com/eyaltoledano/claude-task-master/graphs/contributors"> 301 | <img src="https://contrib.rocks/image?repo=eyaltoledano/claude-task-master" alt="Task Master project contributors" /> 302 | </a> 303 | 304 | ## Star History 305 | 306 | [](https://www.star-history.com/#eyaltoledano/claude-task-master&Timeline) 307 | 308 | ## Licensing 309 | 310 | Task Master is licensed under the MIT License with Commons Clause. This means you can: 311 | 312 | ✅ **Allowed**: 313 | 314 | - Use Task Master for any purpose (personal, commercial, academic) 315 | - Modify the code 316 | - Distribute copies 317 | - Create and sell products built using Task Master 318 | 319 | ❌ **Not Allowed**: 320 | 321 | - Sell Task Master itself 322 | - Offer Task Master as a hosted service 323 | - Create competing products based on Task Master 324 | 325 | See the [LICENSE](LICENSE) file for the complete license text and [licensing details](docs/licensing.md) for more information. 326 | ``` -------------------------------------------------------------------------------- /.taskmaster/docs/README.md: -------------------------------------------------------------------------------- ```markdown 1 | # Meta-Development Script 2 | 3 | This folder contains a **meta-development script** (`dev.js`) and related utilities that manage tasks for an AI-driven or traditional software development workflow. The script revolves around a `tasks.json` file, which holds an up-to-date list of development tasks. 4 | 5 | ## Overview 6 | 7 | In an AI-driven development process—particularly with tools like [Cursor](https://www.cursor.so/)—it's beneficial to have a **single source of truth** for tasks. This script allows you to: 8 | 9 | 1. **Parse** a PRD or requirements document (`.txt`) to initialize a set of tasks (`tasks.json`). 10 | 2. **List** all existing tasks (IDs, statuses, titles). 11 | 3. **Update** tasks to accommodate new prompts or architecture changes (useful if you discover "implementation drift"). 12 | 4. **Generate** individual task files (e.g., `task_001.txt`) for easy reference or to feed into an AI coding workflow. 13 | 5. **Set task status**—mark tasks as `done`, `pending`, or `deferred` based on progress. 14 | 6. **Expand** tasks with subtasks—break down complex tasks into smaller, more manageable subtasks. 15 | 7. **Research-backed subtask generation**—use Perplexity AI to generate more informed and contextually relevant subtasks. 16 | 8. **Clear subtasks**—remove subtasks from specified tasks to allow regeneration or restructuring. 17 | 9. **Show task details**—display detailed information about a specific task and its subtasks. 18 | 19 | ## Configuration 20 | 21 | The script can be configured through environment variables in a `.env` file at the root of the project: 22 | 23 | ### Required Configuration 24 | 25 | - `ANTHROPIC_API_KEY`: Your Anthropic API key for Claude 26 | 27 | ### Optional Configuration 28 | 29 | - `MODEL`: Specify which Claude model to use (default: "claude-3-7-sonnet-20250219") 30 | - `MAX_TOKENS`: Maximum tokens for model responses (default: 4000) 31 | - `TEMPERATURE`: Temperature for model responses (default: 0.7) 32 | - `PERPLEXITY_API_KEY`: Your Perplexity API key for research-backed subtask generation 33 | - `PERPLEXITY_MODEL`: Specify which Perplexity model to use (default: "sonar-medium-online") 34 | - `DEBUG`: Enable debug logging (default: false) 35 | - `TASKMASTER_LOG_LEVEL`: Log level - debug, info, warn, error (default: info) 36 | - `DEFAULT_SUBTASKS`: Default number of subtasks when expanding (default: 3) 37 | - `DEFAULT_PRIORITY`: Default priority for generated tasks (default: medium) 38 | - `PROJECT_NAME`: Override default project name in tasks.json 39 | - `PROJECT_VERSION`: Override default version in tasks.json 40 | 41 | ## How It Works 42 | 43 | 1. **`tasks.json`**: 44 | 45 | - A JSON file at the project root containing an array of tasks (each with `id`, `title`, `description`, `status`, etc.). 46 | - The `meta` field can store additional info like the project's name, version, or reference to the PRD. 47 | - Tasks can have `subtasks` for more detailed implementation steps. 48 | - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending) to easily track progress. 49 | 50 | 2. **Script Commands** 51 | You can run the script via: 52 | 53 | ```bash 54 | node scripts/dev.js [command] [options] 55 | ``` 56 | 57 | Available commands: 58 | 59 | - `parse-prd`: Generate tasks from a PRD document 60 | - `list`: Display all tasks with their status 61 | - `update`: Update tasks based on new information 62 | - `generate`: Create individual task files 63 | - `set-status`: Change a task's status 64 | - `expand`: Add subtasks to a task or all tasks 65 | - `clear-subtasks`: Remove subtasks from specified tasks 66 | - `next`: Determine the next task to work on based on dependencies 67 | - `show`: Display detailed information about a specific task 68 | 69 | Run `node scripts/dev.js` without arguments to see detailed usage information. 70 | 71 | ## Listing Tasks 72 | 73 | The `list` command allows you to view all tasks and their status: 74 | 75 | ```bash 76 | # List all tasks 77 | node scripts/dev.js list 78 | 79 | # List tasks with a specific status 80 | node scripts/dev.js list --status=pending 81 | 82 | # List tasks and include their subtasks 83 | node scripts/dev.js list --with-subtasks 84 | 85 | # List tasks with a specific status and include their subtasks 86 | node scripts/dev.js list --status=pending --with-subtasks 87 | ``` 88 | 89 | ## Updating Tasks 90 | 91 | The `update` command allows you to update tasks based on new information or implementation changes: 92 | 93 | ```bash 94 | # Update tasks starting from ID 4 with a new prompt 95 | node scripts/dev.js update --from=4 --prompt="Refactor tasks from ID 4 onward to use Express instead of Fastify" 96 | 97 | # Update all tasks (default from=1) 98 | node scripts/dev.js update --prompt="Add authentication to all relevant tasks" 99 | 100 | # With research-backed updates using Perplexity AI 101 | node scripts/dev.js update --from=4 --prompt="Integrate OAuth 2.0" --research 102 | 103 | # Specify a different tasks file 104 | node scripts/dev.js update --file=custom-tasks.json --from=5 --prompt="Change database from MongoDB to PostgreSQL" 105 | ``` 106 | 107 | Notes: 108 | 109 | - The `--prompt` parameter is required and should explain the changes or new context 110 | - Only tasks that aren't marked as 'done' will be updated 111 | - Tasks with ID >= the specified --from value will be updated 112 | - The `--research` flag uses Perplexity AI for more informed updates when available 113 | 114 | ## Updating a Single Task 115 | 116 | The `update-task` command allows you to update a specific task instead of multiple tasks: 117 | 118 | ```bash 119 | # Update a specific task with new information 120 | node scripts/dev.js update-task --id=4 --prompt="Use JWT for authentication" 121 | 122 | # With research-backed updates using Perplexity AI 123 | node scripts/dev.js update-task --id=4 --prompt="Use JWT for authentication" --research 124 | ``` 125 | 126 | This command: 127 | 128 | - Updates only the specified task rather than a range of tasks 129 | - Provides detailed validation with helpful error messages 130 | - Checks for required API keys when using research mode 131 | - Falls back gracefully if Perplexity API is unavailable 132 | - Preserves tasks that are already marked as "done" 133 | - Includes contextual error handling for common issues 134 | 135 | ## Setting Task Status 136 | 137 | The `set-status` command allows you to change a task's status: 138 | 139 | ```bash 140 | # Mark a task as done 141 | node scripts/dev.js set-status --id=3 --status=done 142 | 143 | # Mark a task as pending 144 | node scripts/dev.js set-status --id=4 --status=pending 145 | 146 | # Mark a specific subtask as done 147 | node scripts/dev.js set-status --id=3.1 --status=done 148 | 149 | # Mark multiple tasks at once 150 | node scripts/dev.js set-status --id=1,2,3 --status=done 151 | ``` 152 | 153 | Notes: 154 | 155 | - When marking a parent task as "done", all of its subtasks will automatically be marked as "done" as well 156 | - Common status values are 'done', 'pending', and 'deferred', but any string is accepted 157 | - You can specify multiple task IDs by separating them with commas 158 | - Subtask IDs are specified using the format `parentId.subtaskId` (e.g., `3.1`) 159 | - Dependencies are updated to show completion status (✅ for completed, ⏱️ for pending) throughout the system 160 | 161 | ## Expanding Tasks 162 | 163 | The `expand` command allows you to break down tasks into subtasks for more detailed implementation: 164 | 165 | ```bash 166 | # Expand a specific task with 3 subtasks (default) 167 | node scripts/dev.js expand --id=3 168 | 169 | # Expand a specific task with 5 subtasks 170 | node scripts/dev.js expand --id=3 --num=5 171 | 172 | # Expand a task with additional context 173 | node scripts/dev.js expand --id=3 --prompt="Focus on security aspects" 174 | 175 | # Expand all pending tasks that don't have subtasks 176 | node scripts/dev.js expand --all 177 | 178 | # Force regeneration of subtasks for all pending tasks 179 | node scripts/dev.js expand --all --force 180 | 181 | # Use Perplexity AI for research-backed subtask generation 182 | node scripts/dev.js expand --id=3 --research 183 | 184 | # Use Perplexity AI for research-backed generation on all pending tasks 185 | node scripts/dev.js expand --all --research 186 | ``` 187 | 188 | ## Clearing Subtasks 189 | 190 | The `clear-subtasks` command allows you to remove subtasks from specified tasks: 191 | 192 | ```bash 193 | # Clear subtasks from a specific task 194 | node scripts/dev.js clear-subtasks --id=3 195 | 196 | # Clear subtasks from multiple tasks 197 | node scripts/dev.js clear-subtasks --id=1,2,3 198 | 199 | # Clear subtasks from all tasks 200 | node scripts/dev.js clear-subtasks --all 201 | ``` 202 | 203 | Notes: 204 | 205 | - After clearing subtasks, task files are automatically regenerated 206 | - This is useful when you want to regenerate subtasks with a different approach 207 | - Can be combined with the `expand` command to immediately generate new subtasks 208 | - Works with both parent tasks and individual subtasks 209 | 210 | ## AI Integration 211 | 212 | The script integrates with two AI services: 213 | 214 | 1. **Anthropic Claude**: Used for parsing PRDs, generating tasks, and creating subtasks. 215 | 2. **Perplexity AI**: Used for research-backed subtask generation when the `--research` flag is specified. 216 | 217 | The Perplexity integration uses the OpenAI client to connect to Perplexity's API, which provides enhanced research capabilities for generating more informed subtasks. If the Perplexity API is unavailable or encounters an error, the script will automatically fall back to using Anthropic's Claude. 218 | 219 | To use the Perplexity integration: 220 | 221 | 1. Obtain a Perplexity API key 222 | 2. Add `PERPLEXITY_API_KEY` to your `.env` file 223 | 3. Optionally specify `PERPLEXITY_MODEL` in your `.env` file (default: "sonar-medium-online") 224 | 4. Use the `--research` flag with the `expand` command 225 | 226 | ## Logging 227 | 228 | The script supports different logging levels controlled by the `TASKMASTER_LOG_LEVEL` environment variable: 229 | 230 | - `debug`: Detailed information, typically useful for troubleshooting 231 | - `info`: Confirmation that things are working as expected (default) 232 | - `warn`: Warning messages that don't prevent execution 233 | - `error`: Error messages that might prevent execution 234 | 235 | When `DEBUG=true` is set, debug logs are also written to a `dev-debug.log` file in the project root. 236 | 237 | ## Managing Task Dependencies 238 | 239 | The `add-dependency` and `remove-dependency` commands allow you to manage task dependencies: 240 | 241 | ```bash 242 | # Add a dependency to a task 243 | node scripts/dev.js add-dependency --id=<id> --depends-on=<id> 244 | 245 | # Remove a dependency from a task 246 | node scripts/dev.js remove-dependency --id=<id> --depends-on=<id> 247 | ``` 248 | 249 | These commands: 250 | 251 | 1. **Allow precise dependency management**: 252 | 253 | - Add dependencies between tasks with automatic validation 254 | - Remove dependencies when they're no longer needed 255 | - Update task files automatically after changes 256 | 257 | 2. **Include validation checks**: 258 | 259 | - Prevent circular dependencies (a task depending on itself) 260 | - Prevent duplicate dependencies 261 | - Verify that both tasks exist before adding/removing dependencies 262 | - Check if dependencies exist before attempting to remove them 263 | 264 | 3. **Provide clear feedback**: 265 | 266 | - Success messages confirm when dependencies are added/removed 267 | - Error messages explain why operations failed (if applicable) 268 | 269 | 4. **Automatically update task files**: 270 | - Regenerates task files to reflect dependency changes 271 | - Ensures tasks and their files stay synchronized 272 | 273 | ## Dependency Validation and Fixing 274 | 275 | The script provides two specialized commands to ensure task dependencies remain valid and properly maintained: 276 | 277 | ### Validating Dependencies 278 | 279 | The `validate-dependencies` command allows you to check for invalid dependencies without making changes: 280 | 281 | ```bash 282 | # Check for invalid dependencies in tasks.json 283 | node scripts/dev.js validate-dependencies 284 | 285 | # Specify a different tasks file 286 | node scripts/dev.js validate-dependencies --file=custom-tasks.json 287 | ``` 288 | 289 | This command: 290 | 291 | - Scans all tasks and subtasks for non-existent dependencies 292 | - Identifies potential self-dependencies (tasks referencing themselves) 293 | - Reports all found issues without modifying files 294 | - Provides a comprehensive summary of dependency state 295 | - Gives detailed statistics on task dependencies 296 | 297 | Use this command to audit your task structure before applying fixes. 298 | 299 | ### Fixing Dependencies 300 | 301 | The `fix-dependencies` command proactively finds and fixes all invalid dependencies: 302 | 303 | ```bash 304 | # Find and fix all invalid dependencies 305 | node scripts/dev.js fix-dependencies 306 | 307 | # Specify a different tasks file 308 | node scripts/dev.js fix-dependencies --file=custom-tasks.json 309 | ``` 310 | 311 | This command: 312 | 313 | 1. **Validates all dependencies** across tasks and subtasks 314 | 2. **Automatically removes**: 315 | - References to non-existent tasks and subtasks 316 | - Self-dependencies (tasks depending on themselves) 317 | 3. **Fixes issues in both**: 318 | - The tasks.json data structure 319 | - Individual task files during regeneration 320 | 4. **Provides a detailed report**: 321 | - Types of issues fixed (non-existent vs. self-dependencies) 322 | - Number of tasks affected (tasks vs. subtasks) 323 | - Where fixes were applied (tasks.json vs. task files) 324 | - List of all individual fixes made 325 | 326 | This is especially useful when tasks have been deleted or IDs have changed, potentially breaking dependency chains. 327 | 328 | ## Analyzing Task Complexity 329 | 330 | The `analyze-complexity` command allows you to automatically assess task complexity and generate expansion recommendations: 331 | 332 | ```bash 333 | # Analyze all tasks and generate expansion recommendations 334 | node scripts/dev.js analyze-complexity 335 | 336 | # Specify a custom output file 337 | node scripts/dev.js analyze-complexity --output=custom-report.json 338 | 339 | # Override the model used for analysis 340 | node scripts/dev.js analyze-complexity --model=claude-3-opus-20240229 341 | 342 | # Set a custom complexity threshold (1-10) 343 | node scripts/dev.js analyze-complexity --threshold=6 344 | 345 | # Use Perplexity AI for research-backed complexity analysis 346 | node scripts/dev.js analyze-complexity --research 347 | ``` 348 | 349 | Notes: 350 | 351 | - The command uses Claude to analyze each task's complexity (or Perplexity with --research flag) 352 | - Tasks are scored on a scale of 1-10 353 | - Each task receives a recommended number of subtasks based on DEFAULT_SUBTASKS configuration 354 | - The default output path is `scripts/task-complexity-report.json` 355 | - Each task in the analysis includes a ready-to-use `expansionCommand` that can be copied directly to the terminal or executed programmatically 356 | - Tasks with complexity scores below the threshold (default: 5) may not need expansion 357 | - The research flag provides more contextual and informed complexity assessments 358 | 359 | ### Integration with Expand Command 360 | 361 | The `expand` command automatically checks for and uses complexity analysis if available: 362 | 363 | ```bash 364 | # Expand a task, using complexity report recommendations if available 365 | node scripts/dev.js expand --id=8 366 | 367 | # Expand all tasks, prioritizing by complexity score if a report exists 368 | node scripts/dev.js expand --all 369 | 370 | # Override recommendations with explicit values 371 | node scripts/dev.js expand --id=8 --num=5 --prompt="Custom prompt" 372 | ``` 373 | 374 | When a complexity report exists: 375 | 376 | - The `expand` command will use the recommended subtask count from the report (unless overridden) 377 | - It will use the tailored expansion prompt from the report (unless a custom prompt is provided) 378 | - When using `--all`, tasks are sorted by complexity score (highest first) 379 | - The `--research` flag is preserved from the complexity analysis to expansion 380 | 381 | The output report structure is: 382 | 383 | ```json 384 | { 385 | "meta": { 386 | "generatedAt": "2023-06-15T12:34:56.789Z", 387 | "tasksAnalyzed": 20, 388 | "thresholdScore": 5, 389 | "projectName": "Your Project Name", 390 | "usedResearch": true 391 | }, 392 | "complexityAnalysis": [ 393 | { 394 | "taskId": 8, 395 | "taskTitle": "Develop Implementation Drift Handling", 396 | "complexityScore": 9.5, 397 | "recommendedSubtasks": 6, 398 | "expansionPrompt": "Create subtasks that handle detecting...", 399 | "reasoning": "This task requires sophisticated logic...", 400 | "expansionCommand": "node scripts/dev.js expand --id=8 --num=6 --prompt=\"Create subtasks...\" --research" 401 | } 402 | // More tasks sorted by complexity score (highest first) 403 | ] 404 | } 405 | ``` 406 | 407 | ## Finding the Next Task 408 | 409 | The `next` command helps you determine which task to work on next based on dependencies and status: 410 | 411 | ```bash 412 | # Show the next task to work on 413 | node scripts/dev.js next 414 | 415 | # Specify a different tasks file 416 | node scripts/dev.js next --file=custom-tasks.json 417 | ``` 418 | 419 | This command: 420 | 421 | 1. Identifies all **eligible tasks** - pending or in-progress tasks whose dependencies are all satisfied (marked as done) 422 | 2. **Prioritizes** these eligible tasks by: 423 | - Priority level (high > medium > low) 424 | - Number of dependencies (fewer dependencies first) 425 | - Task ID (lower ID first) 426 | 3. **Displays** comprehensive information about the selected task: 427 | - Basic task details (ID, title, priority, dependencies) 428 | - Detailed description and implementation details 429 | - Subtasks if they exist 430 | 4. Provides **contextual suggested actions**: 431 | - Command to mark the task as in-progress 432 | - Command to mark the task as done when completed 433 | - Commands for working with subtasks (update status or expand) 434 | 435 | This feature ensures you're always working on the most appropriate task based on your project's current state and dependency structure. 436 | 437 | ## Showing Task Details 438 | 439 | The `show` command allows you to view detailed information about a specific task: 440 | 441 | ```bash 442 | # Show details for a specific task 443 | node scripts/dev.js show 1 444 | 445 | # Alternative syntax with --id option 446 | node scripts/dev.js show --id=1 447 | 448 | # Show details for a subtask 449 | node scripts/dev.js show --id=1.2 450 | 451 | # Specify a different tasks file 452 | node scripts/dev.js show 3 --file=custom-tasks.json 453 | ``` 454 | 455 | This command: 456 | 457 | 1. **Displays comprehensive information** about the specified task: 458 | - Basic task details (ID, title, priority, dependencies, status) 459 | - Full description and implementation details 460 | - Test strategy information 461 | - Subtasks if they exist 462 | 2. **Handles both regular tasks and subtasks**: 463 | - For regular tasks, shows all subtasks and their status 464 | - For subtasks, shows the parent task relationship 465 | 3. **Provides contextual suggested actions**: 466 | - Commands to update the task status 467 | - Commands for working with subtasks 468 | - For subtasks, provides a link to view the parent task 469 | 470 | This command is particularly useful when you need to examine a specific task in detail before implementing it or when you want to check the status and details of a particular task. 471 | 472 | ## Enhanced Error Handling 473 | 474 | The script now includes improved error handling throughout all commands: 475 | 476 | 1. **Detailed Validation**: 477 | 478 | - Required parameters (like task IDs and prompts) are validated early 479 | - File existence is checked with customized errors for common scenarios 480 | - Parameter type conversion is handled with clear error messages 481 | 482 | 2. **Contextual Error Messages**: 483 | 484 | - Task not found errors include suggestions to run the list command 485 | - API key errors include reminders to check environment variables 486 | - Invalid ID format errors show the expected format 487 | 488 | 3. **Command-Specific Help Displays**: 489 | 490 | - When validation fails, detailed help for the specific command is shown 491 | - Help displays include usage examples and parameter descriptions 492 | - Formatted in clear, color-coded boxes with examples 493 | 494 | 4. **Helpful Error Recovery**: 495 | - Detailed troubleshooting steps for common errors 496 | - Graceful fallbacks for missing optional dependencies 497 | - Clear instructions for how to fix configuration issues 498 | 499 | ## Version Checking 500 | 501 | The script now automatically checks for updates without slowing down execution: 502 | 503 | 1. **Background Version Checking**: 504 | 505 | - Non-blocking version checks run in the background while commands execute 506 | - Actual command execution isn't delayed by version checking 507 | - Update notifications appear after command completion 508 | 509 | 2. **Update Notifications**: 510 | 511 | - When a newer version is available, a notification is displayed 512 | - Notifications include current version, latest version, and update command 513 | - Formatted in an attention-grabbing box with clear instructions 514 | 515 | 3. **Implementation Details**: 516 | - Uses semantic versioning to compare current and latest versions 517 | - Fetches version information from npm registry with a timeout 518 | - Gracefully handles connection issues without affecting command execution 519 | 520 | ## Subtask Management 521 | 522 | The script now includes enhanced commands for managing subtasks: 523 | 524 | ### Adding Subtasks 525 | 526 | ```bash 527 | # Add a subtask to an existing task 528 | node scripts/dev.js add-subtask --parent=5 --title="Implement login UI" --description="Create login form" 529 | 530 | # Convert an existing task to a subtask 531 | node scripts/dev.js add-subtask --parent=5 --task-id=8 532 | 533 | # Add a subtask with dependencies 534 | node scripts/dev.js add-subtask --parent=5 --title="Authentication middleware" --dependencies=5.1,5.2 535 | 536 | # Skip regenerating task files 537 | node scripts/dev.js add-subtask --parent=5 --title="Login API route" --skip-generate 538 | ``` 539 | 540 | Key features: 541 | 542 | - Create new subtasks with detailed properties or convert existing tasks 543 | - Define dependencies between subtasks 544 | - Set custom status for new subtasks 545 | - Provides next-step suggestions after creation 546 | 547 | ### Removing Subtasks 548 | 549 | ```bash 550 | # Remove a subtask 551 | node scripts/dev.js remove-subtask --id=5.2 552 | 553 | # Remove multiple subtasks 554 | node scripts/dev.js remove-subtask --id=5.2,5.3,5.4 555 | 556 | # Convert a subtask to a standalone task 557 | node scripts/dev.js remove-subtask --id=5.2 --convert 558 | 559 | # Skip regenerating task files 560 | node scripts/dev.js remove-subtask --id=5.2 --skip-generate 561 | ``` 562 | 563 | Key features: 564 | 565 | - Remove subtasks individually or in batches 566 | - Optionally convert subtasks to standalone tasks 567 | - Control whether task files are regenerated 568 | - Provides detailed success messages and next steps 569 | ```