How neno-is-ooo/claude-task-master works
Project Type and Purpose
• Task Master is an AI-driven CLI tool plus an MCP server (Model Control Protocol) that integrates into editors (Cursor, Windsurf, VS Code).
• It parses PRDs, generates and manages tasks in a .taskmaster workspace, and invokes LLMs via modular AI providers.
Top-Level Components
a. Editor / IDE
• Examples: Cursor, Windsurf, VS Code
• Loads MCP server (via .cursor/mcp.json, .vscode/mcp.json)
• Presents AI chat pane and CLI interface
b. MCP Server (mcp-server/)
• Entry point: mcp-server/server.js
• Exposes MCP protocol over stdio
• Core layer: task-master-core.js, direct-functions/* (one per command)
• Custom SDK: src/custom-sdk/* (message conversion, schema)
• Tools layer: tools/* (CLI wrappers for direct functions)
c. CLI Tool
• Entry point: bin/task-master.js & index.js
• Uses src/task-master.js, src/commands, src/prompts, src/utils
• Scripted helpers: scripts/*.js and scripts/modules/*
d. Domain / Core Modules (src/)
• AI Providers (src/ai-providers/*): wrappers for Claude, OpenAI, Gemini, etc.
• Provider Registry (src/provider-registry): selects the active provider by config
• Profiles (src/profiles): editor-specific or use-case profiles
• Prompts (src/prompts): JSON templates + schemas
• Constants & Utils (src/constants, src/utils)
e. Persistence & Workspace
• Project state: .taskmaster/state.json, .taskmaster/tasks/tasks.json
• Templates: .taskmaster/templates/
• Generated docs & reports: .taskmaster/docs/, .taskmaster/reports/
f. Configuration
• mcp.json / .env / env.example for API keys & server config
• package.json / tsconfig.json / biome.json / jest.config.js
g. External Services
• AI endpoints: Anthropic (Claude), OpenAI, Google Gemini, xAI, Perplexity, Ollama, etc.
• Git (for .gitignore management)
Relationships & Data Flows
• Editor → (MCP protocol over stdio) → MCP Server
• Editor → (CLI invocation via npx) → CLI Tool
• Both MCP Server & CLI Tool → load Core Modules → invoke AI Providers → receive LLM responses
• Responses → Direct Functions / Command Handlers → update .taskmaster files → return output to Editor/CLI
• Scripts can be invoked directly or by the CLI for maintenance (e.g., scripts/init.js, scripts/dev.js)
• Tests (tests/, mcp-server/src/core/__tests__) validate unit, integration, E2E
Architectural Patterns & Principles
• Layered Architecture: UI (Editor/CLI), Application (MCP Server/CLI), Domain (direct-functions), Infrastructure (AI providers, file I/O)
• Modularity: one file per command, one provider per file, provider-registry decouples domain logic from AI endpoints
• Hexagonal (“Ports & Adapters”): prompts & direct-functions are “ports”; AI providers & file system are “adapters”
• Separation of Concerns:
• mcp-server/ for MCP protocol
• bin/ for CLI bootstrap
• scripts/ for tooling
• apps/extension/ for a VS Code GUI