@hhsw2015/task-master-ai 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +4072 -0
  2. package/LICENSE +25 -0
  3. package/README-task-master.md +648 -0
  4. package/README.md +415 -0
  5. package/dist/ai-services-unified-BgdcS4fE.js +7 -0
  6. package/dist/ai-services-unified-DVAKOPK0.js +1 -0
  7. package/dist/assets/.windsurfrules +524 -0
  8. package/dist/assets/AGENTS.md +435 -0
  9. package/dist/assets/GEMINI.md +110 -0
  10. package/dist/assets/claude/TM_COMMANDS_GUIDE.md +147 -0
  11. package/dist/assets/config.json +34 -0
  12. package/dist/assets/env.example +12 -0
  13. package/dist/assets/example_prd.txt +47 -0
  14. package/dist/assets/example_prd_rpg.txt +511 -0
  15. package/dist/assets/gitignore +25 -0
  16. package/dist/assets/hamster-art.txt +49 -0
  17. package/dist/assets/kiro-hooks/tm-code-change-task-tracker.kiro.hook +23 -0
  18. package/dist/assets/kiro-hooks/tm-complexity-analyzer.kiro.hook +16 -0
  19. package/dist/assets/kiro-hooks/tm-daily-standup-assistant.kiro.hook +13 -0
  20. package/dist/assets/kiro-hooks/tm-git-commit-task-linker.kiro.hook +13 -0
  21. package/dist/assets/kiro-hooks/tm-pr-readiness-checker.kiro.hook +13 -0
  22. package/dist/assets/kiro-hooks/tm-task-dependency-auto-progression.kiro.hook +17 -0
  23. package/dist/assets/kiro-hooks/tm-test-success-task-completer.kiro.hook +23 -0
  24. package/dist/assets/roocode/.roo/rules-architect/architect-rules +93 -0
  25. package/dist/assets/roocode/.roo/rules-ask/ask-rules +89 -0
  26. package/dist/assets/roocode/.roo/rules-code/code-rules +61 -0
  27. package/dist/assets/roocode/.roo/rules-debug/debug-rules +68 -0
  28. package/dist/assets/roocode/.roo/rules-orchestrator/orchestrator-rules +181 -0
  29. package/dist/assets/roocode/.roo/rules-test/test-rules +61 -0
  30. package/dist/assets/roocode/.roomodes +63 -0
  31. package/dist/assets/rules/cursor_rules.mdc +53 -0
  32. package/dist/assets/rules/dev_workflow.mdc +424 -0
  33. package/dist/assets/rules/hamster.mdc +173 -0
  34. package/dist/assets/rules/self_improve.mdc +72 -0
  35. package/dist/assets/rules/taskmaster.mdc +573 -0
  36. package/dist/assets/rules/taskmaster_hooks_workflow.mdc +59 -0
  37. package/dist/assets/scripts_README.md +445 -0
  38. package/dist/commands-D7m4KWx1.js +329 -0
  39. package/dist/config-manager-CvbfYtIR.js +1 -0
  40. package/dist/config-manager-cjltSxIS.js +270 -0
  41. package/dist/dependency-manager-CyOxi5uo.js +1078 -0
  42. package/dist/git-utils-DllbRE35.js +1 -0
  43. package/dist/git-utils-PBP1PRVP.js +1 -0
  44. package/dist/mcp-server.js +44 -0
  45. package/dist/profiles-DcD-JxPM.js +3528 -0
  46. package/dist/research-DN4RyyJY.js +1 -0
  47. package/dist/response-language-C5AwQSfD.js +1 -0
  48. package/dist/response-language-LzM2RD6-.js +1 -0
  49. package/dist/sentry-CBAZ4LSk.js +1 -0
  50. package/dist/tag-management-6HOtYZMj.js +1 -0
  51. package/dist/task-manager-BtFURFe0.js +1 -0
  52. package/dist/task-master.js +2 -0
  53. package/dist/update-subtask-by-id-DiWMqGfw.js +1 -0
  54. package/dist/update-task-by-id-eyL-PNVX.js +1 -0
  55. package/dist/utils-CGk8TL6x.js +1 -0
  56. package/index.js +160 -0
  57. package/package.json +183 -0
package/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ Task Master License
2
+
3
+ MIT License
4
+
5
+ Copyright (c) 2025 — Eyal Toledano, Ralph Khreish
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
+
13
+ "Commons Clause" License Condition v1.0
14
+
15
+ The Software is provided to you by the Licensor under the License (defined below), subject to the following condition:
16
+
17
+ Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.
18
+
19
+ For purposes of the foregoing, "Sell" means practicing any or all of the rights granted to you under the License to provide the Software to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/support services related to the Software), as part of a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice.
20
+
21
+ Software: All Task Master associated files (including all files in the GitHub repository "claude-task-master" and in the npm package "task-master-ai").
22
+
23
+ License: MIT
24
+
25
+ Licensor: Eyal Toledano, Ralph Khreish
@@ -0,0 +1,648 @@
1
+ # Task Master
2
+
3
+ ### by [@eyaltoledano](https://x.com/eyaltoledano)
4
+
5
+ A task management system for AI-driven development with Claude, designed to work seamlessly with Cursor AI.
6
+
7
+ ## Requirements
8
+
9
+ - Node.js 14.0.0 or higher
10
+ - Anthropic API key (Claude API)
11
+ - Anthropic SDK version 0.39.0 or higher
12
+ - OpenAI SDK (for Perplexity API integration, optional)
13
+
14
+ ## Configuration
15
+
16
+ Taskmaster uses two primary configuration methods:
17
+
18
+ 1. **`.taskmasterconfig` File (Project Root)**
19
+
20
+ - Stores most settings: AI model selections (main, research, fallback), parameters (max tokens, temperature), logging level, default priority/subtasks, project name.
21
+ - **Created and managed using `task-master models --setup` CLI command or the `models` MCP tool.**
22
+ - Do not edit manually unless you know what you are doing.
23
+
24
+ 2. **Environment Variables (`.env` file or MCP `env` block)**
25
+ - Used **only** for sensitive **API Keys** (e.g., `ANTHROPIC_API_KEY`, `PERPLEXITY_API_KEY`, etc.) and specific endpoints (like `OLLAMA_BASE_URL`).
26
+ - **For CLI:** Place keys in a `.env` file in your project root.
27
+ - **For MCP/Cursor:** Place keys in the `env` section of your `.cursor/mcp.json` (or other MCP config according to the AI IDE or client you use) file under the `taskmaster-ai` server definition.
28
+
29
+ **Important:** Settings like model choices, max tokens, temperature, and log level are **no longer configured via environment variables.** Use the `task-master models` command or tool.
30
+
31
+ See the [Configuration Guide](docs/configuration.md) for full details.
32
+
33
+ ## Installation
34
+
35
+ ```bash
36
+ # Install globally
37
+ npm install -g task-master-ai
38
+
39
+ # OR install locally within your project
40
+ npm install task-master-ai
41
+ ```
42
+
43
+ ### Initialize a new project
44
+
45
+ ```bash
46
+ # If installed globally
47
+ task-master init
48
+
49
+ # If installed locally
50
+ npx task-master init
51
+ ```
52
+
53
+ This will prompt you for project details and set up a new project with the necessary files and structure.
54
+
55
+ ### Important Notes
56
+
57
+ 1. **ES Modules Configuration:**
58
+
59
+ - This project uses ES Modules (ESM) instead of CommonJS.
60
+ - This is set via `"type": "module"` in your package.json.
61
+ - Use `import/export` syntax instead of `require()`.
62
+ - Files should use `.js` or `.mjs` extensions.
63
+ - To use a CommonJS module, either:
64
+ - Rename it with `.cjs` extension
65
+ - Use `await import()` for dynamic imports
66
+ - If you need CommonJS throughout your project, remove `"type": "module"` from package.json, but Task Master scripts expect ESM.
67
+
68
+ 2. The Anthropic SDK version should be 0.39.0 or higher.
69
+
70
+ ## Quick Start with Global Commands
71
+
72
+ After installing the package globally, you can use these CLI commands from any directory:
73
+
74
+ ```bash
75
+ # Initialize a new project
76
+ task-master init
77
+
78
+ # Parse a PRD and generate tasks
79
+ task-master parse-prd your-prd.txt
80
+
81
+ # List all tasks
82
+ task-master list
83
+
84
+ # Show the next task to work on
85
+ task-master next
86
+
87
+ # Generate task files
88
+ task-master generate
89
+ ```
90
+
91
+ ## Troubleshooting
92
+
93
+ ### If `task-master init` doesn't respond:
94
+
95
+ Try running it with Node directly:
96
+
97
+ ```bash
98
+ node node_modules/claude-task-master/scripts/init.js
99
+ ```
100
+
101
+ Or clone the repository and run:
102
+
103
+ ```bash
104
+ git clone https://github.com/eyaltoledano/claude-task-master.git
105
+ cd claude-task-master
106
+ node scripts/init.js
107
+ ```
108
+
109
+ ## Task Structure
110
+
111
+ Tasks in tasks.json have the following structure:
112
+
113
+ - `id`: Unique identifier for the task (Example: `1`)
114
+ - `title`: Brief, descriptive title of the task (Example: `"Initialize Repo"`)
115
+ - `description`: Concise description of what the task involves (Example: `"Create a new repository, set up initial structure."`)
116
+ - `status`: Current state of the task (Example: `"pending"`, `"done"`, `"deferred"`)
117
+ - `dependencies`: IDs of tasks that must be completed before this task (Example: `[1, 2]`)
118
+ - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending)
119
+ - This helps quickly identify which prerequisite tasks are blocking work
120
+ - `priority`: Importance level of the task (Example: `"high"`, `"medium"`, `"low"`)
121
+ - `details`: In-depth implementation instructions (Example: `"Use GitHub client ID/secret, handle callback, set session token."`)
122
+ - `testStrategy`: Verification approach (Example: `"Deploy and call endpoint to confirm 'Hello World' response."`)
123
+ - `subtasks`: List of smaller, more specific tasks that make up the main task (Example: `[{"id": 1, "title": "Configure OAuth", ...}]`)
124
+
125
+ ## Integrating with Cursor AI
126
+
127
+ Claude Task Master is designed to work seamlessly with [Cursor AI](https://www.cursor.so/), providing a structured workflow for AI-driven development.
128
+
129
+ ### Setup with Cursor
130
+
131
+ 1. After initializing your project, open it in Cursor
132
+ 2. The `.cursor/rules/dev_workflow.mdc` file is automatically loaded by Cursor, providing the AI with knowledge about the task management system
133
+ 3. Place your PRD document in the `scripts/` directory (e.g., `scripts/prd.txt`)
134
+ 4. Open Cursor's AI chat and switch to Agent mode
135
+
136
+ ### Setting up MCP in Cursor
137
+
138
+ To enable enhanced task management capabilities directly within Cursor using the Model Control Protocol (MCP):
139
+
140
+ 1. Go to Cursor settings
141
+ 2. Navigate to the MCP section
142
+ 3. Click on "Add New MCP Server"
143
+ 4. Configure with the following details:
144
+ - Name: "Task Master"
145
+ - Type: "Command"
146
+ - Command: "npx -y task-master-ai"
147
+ 5. Save the settings
148
+
149
+ Once configured, you can interact with Task Master's task management commands directly through Cursor's interface, providing a more integrated experience.
150
+
151
+ ### Initial Task Generation
152
+
153
+ In Cursor's AI chat, instruct the agent to generate tasks from your PRD:
154
+
155
+ ```
156
+ Please use the task-master parse-prd command to generate tasks from my PRD. The PRD is located at scripts/prd.txt.
157
+ ```
158
+
159
+ The agent will execute:
160
+
161
+ ```bash
162
+ task-master parse-prd scripts/prd.txt
163
+ ```
164
+
165
+ This will:
166
+
167
+ - Parse your PRD document
168
+ - Generate a structured `tasks.json` file with tasks, dependencies, priorities, and test strategies
169
+ - The agent will understand this process due to the Cursor rules
170
+
171
+ ### Generate Individual Task Files
172
+
173
+ Next, ask the agent to generate individual task files:
174
+
175
+ ```
176
+ Please generate individual task files from tasks.json
177
+ ```
178
+
179
+ The agent will execute:
180
+
181
+ ```bash
182
+ task-master generate
183
+ ```
184
+
185
+ This creates individual task files in the `tasks/` directory (e.g., `task_001.txt`, `task_002.txt`), making it easier to reference specific tasks.
186
+
187
+ ## AI-Driven Development Workflow
188
+
189
+ The Cursor agent is pre-configured (via the rules file) to follow this workflow:
190
+
191
+ ### 1. Task Discovery and Selection
192
+
193
+ Ask the agent to list available tasks:
194
+
195
+ ```
196
+ What tasks are available to work on next?
197
+ ```
198
+
199
+ The agent will:
200
+
201
+ - Run `task-master list` to see all tasks
202
+ - Run `task-master next` to determine the next task to work on
203
+ - Analyze dependencies to determine which tasks are ready to be worked on
204
+ - Prioritize tasks based on priority level and ID order
205
+ - Suggest the next task(s) to implement
206
+
207
+ ### 2. Task Implementation
208
+
209
+ When implementing a task, the agent will:
210
+
211
+ - Reference the task's details section for implementation specifics
212
+ - Consider dependencies on previous tasks
213
+ - Follow the project's coding standards
214
+ - Create appropriate tests based on the task's testStrategy
215
+
216
+ You can ask:
217
+
218
+ ```
219
+ Let's implement task 3. What does it involve?
220
+ ```
221
+
222
+ ### 3. Task Verification
223
+
224
+ Before marking a task as complete, verify it according to:
225
+
226
+ - The task's specified testStrategy
227
+ - Any automated tests in the codebase
228
+ - Manual verification if required
229
+
230
+ ### 4. Task Completion
231
+
232
+ When a task is completed, tell the agent:
233
+
234
+ ```
235
+ Task 3 is now complete. Please update its status.
236
+ ```
237
+
238
+ The agent will execute:
239
+
240
+ ```bash
241
+ task-master set-status --id=3 --status=done
242
+ ```
243
+
244
+ ### 5. Handling Implementation Drift
245
+
246
+ If during implementation, you discover that:
247
+
248
+ - The current approach differs significantly from what was planned
249
+ - Future tasks need to be modified due to current implementation choices
250
+ - New dependencies or requirements have emerged
251
+
252
+ Tell the agent:
253
+
254
+ ```
255
+ We've changed our approach. We're now using Express instead of Fastify. Please update all future tasks to reflect this change.
256
+ ```
257
+
258
+ The agent will execute:
259
+
260
+ ```bash
261
+ task-master update --from=4 --prompt="Now we are using Express instead of Fastify."
262
+ ```
263
+
264
+ This will rewrite or re-scope subsequent tasks in tasks.json while preserving completed work.
265
+
266
+ ### 6. Breaking Down Complex Tasks
267
+
268
+ For complex tasks that need more granularity:
269
+
270
+ ```
271
+ Task 5 seems complex. Can you break it down into subtasks?
272
+ ```
273
+
274
+ The agent will execute:
275
+
276
+ ```bash
277
+ task-master expand --id=5 --num=3
278
+ ```
279
+
280
+ You can provide additional context:
281
+
282
+ ```
283
+ Please break down task 5 with a focus on security considerations.
284
+ ```
285
+
286
+ The agent will execute:
287
+
288
+ ```bash
289
+ task-master expand --id=5 --prompt="Focus on security aspects"
290
+ ```
291
+
292
+ You can also expand all pending tasks:
293
+
294
+ ```
295
+ Please break down all pending tasks into subtasks.
296
+ ```
297
+
298
+ The agent will execute:
299
+
300
+ ```bash
301
+ task-master expand --all
302
+ ```
303
+
304
+ For research-backed subtask generation using Perplexity AI:
305
+
306
+ ```
307
+ Please break down task 5 using research-backed generation.
308
+ ```
309
+
310
+ The agent will execute:
311
+
312
+ ```bash
313
+ task-master expand --id=5 --research
314
+ ```
315
+
316
+ ## Command Reference
317
+
318
+ Here's a comprehensive reference of all available commands:
319
+
320
+ ### Parse PRD
321
+
322
+ ```bash
323
+ # Parse a PRD file and generate tasks
324
+ task-master parse-prd <prd-file.txt>
325
+
326
+ # Limit the number of tasks generated (default is 10)
327
+ task-master parse-prd <prd-file.txt> --num-tasks=5
328
+
329
+ # Allow task master to determine the number of tasks based on complexity
330
+ task-master parse-prd <prd-file.txt> --num-tasks=0
331
+ ```
332
+
333
+ ### List Tasks
334
+
335
+ ```bash
336
+ # List all tasks
337
+ task-master list
338
+
339
+ # List tasks with a specific status
340
+ task-master list --status=<status>
341
+
342
+ # List tasks with subtasks
343
+ task-master list --with-subtasks
344
+
345
+ # List tasks with a specific status and include subtasks
346
+ task-master list --status=<status> --with-subtasks
347
+ ```
348
+
349
+ ### Show Next Task
350
+
351
+ ```bash
352
+ # Show the next task to work on based on dependencies and status
353
+ task-master next
354
+ ```
355
+
356
+ ### Show Specific Task
357
+
358
+ ```bash
359
+ # Show details of a specific task
360
+ task-master show <id>
361
+ # or
362
+ task-master show --id=<id>
363
+
364
+ # View a specific subtask (e.g., subtask 2 of task 1)
365
+ task-master show 1.2
366
+ ```
367
+
368
+ ### Update Tasks
369
+
370
+ ```bash
371
+ # Update tasks from a specific ID and provide context
372
+ task-master update --from=<id> --prompt="<prompt>"
373
+ ```
374
+
375
+ ### Generate Task Files
376
+
377
+ ```bash
378
+ # Generate individual task files from tasks.json
379
+ task-master generate
380
+ ```
381
+
382
+ ### Set Task Status
383
+
384
+ ```bash
385
+ # Set status of a single task
386
+ task-master set-status --id=<id> --status=<status>
387
+
388
+ # Set status for multiple tasks
389
+ task-master set-status --id=1,2,3 --status=<status>
390
+
391
+ # Set status for subtasks
392
+ task-master set-status --id=1.1,1.2 --status=<status>
393
+ ```
394
+
395
+ When marking a task as "done", all of its subtasks will automatically be marked as "done" as well.
396
+
397
+ ### Expand Tasks
398
+
399
+ ```bash
400
+ # Expand a specific task with subtasks
401
+ task-master expand --id=<id> --num=<number>
402
+
403
+ # Expand a task with a dynamic number of subtasks (ignoring complexity report)
404
+ task-master expand --id=<id> --num=0
405
+
406
+ # Expand with additional context
407
+ task-master expand --id=<id> --prompt="<context>"
408
+
409
+ # Expand all pending tasks
410
+ task-master expand --all
411
+
412
+ # Force regeneration of subtasks for tasks that already have them
413
+ task-master expand --all --force
414
+
415
+ # Research-backed subtask generation for a specific task
416
+ task-master expand --id=<id> --research
417
+
418
+ # Research-backed generation for all tasks
419
+ task-master expand --all --research
420
+ ```
421
+
422
+ ### Clear Subtasks
423
+
424
+ ```bash
425
+ # Clear subtasks from a specific task
426
+ task-master clear-subtasks --id=<id>
427
+
428
+ # Clear subtasks from multiple tasks
429
+ task-master clear-subtasks --id=1,2,3
430
+
431
+ # Clear subtasks from all tasks
432
+ task-master clear-subtasks --all
433
+ ```
434
+
435
+ ### Analyze Task Complexity
436
+
437
+ ```bash
438
+ # Analyze complexity of all tasks
439
+ task-master analyze-complexity
440
+
441
+ # Save report to a custom location
442
+ task-master analyze-complexity --output=my-report.json
443
+
444
+ # Use a specific LLM model
445
+ task-master analyze-complexity --model=claude-3-opus-20240229
446
+
447
+ # Set a custom complexity threshold (1-10)
448
+ task-master analyze-complexity --threshold=6
449
+
450
+ # Use an alternative tasks file
451
+ task-master analyze-complexity --file=custom-tasks.json
452
+
453
+ # Use Perplexity AI for research-backed complexity analysis
454
+ task-master analyze-complexity --research
455
+ ```
456
+
457
+ ### View Complexity Report
458
+
459
+ ```bash
460
+ # Display the task complexity analysis report
461
+ task-master complexity-report
462
+
463
+ # View a report at a custom location
464
+ task-master complexity-report --file=my-report.json
465
+ ```
466
+
467
+ ### Managing Task Dependencies
468
+
469
+ ```bash
470
+ # Add a dependency to a task
471
+ task-master add-dependency --id=<id> --depends-on=<id>
472
+
473
+ # Remove a dependency from a task
474
+ task-master remove-dependency --id=<id> --depends-on=<id>
475
+
476
+ # Validate dependencies without fixing them
477
+ task-master validate-dependencies
478
+
479
+ # Find and fix invalid dependencies automatically
480
+ task-master fix-dependencies
481
+ ```
482
+
483
+ ### Add a New Task
484
+
485
+ ```bash
486
+ # Add a new task using AI
487
+ task-master add-task --prompt="Description of the new task"
488
+
489
+ # Add a task with dependencies
490
+ task-master add-task --prompt="Description" --dependencies=1,2,3
491
+
492
+ # Add a task with priority
493
+ task-master add-task --prompt="Description" --priority=high
494
+ ```
495
+
496
+ ## Feature Details
497
+
498
+ ### Analyzing Task Complexity
499
+
500
+ The `analyze-complexity` command:
501
+
502
+ - Analyzes each task using AI to assess its complexity on a scale of 1-10
503
+ - Recommends optimal number of subtasks based on configured DEFAULT_SUBTASKS
504
+ - Generates tailored prompts for expanding each task
505
+ - Creates a comprehensive JSON report with ready-to-use commands
506
+ - Saves the report to scripts/task-complexity-report.json by default
507
+
508
+ The generated report contains:
509
+
510
+ - Complexity analysis for each task (scored 1-10)
511
+ - Recommended number of subtasks based on complexity
512
+ - AI-generated expansion prompts customized for each task
513
+ - Ready-to-run expansion commands directly within each task analysis
514
+
515
+ ### Viewing Complexity Report
516
+
517
+ The `complexity-report` command:
518
+
519
+ - Displays a formatted, easy-to-read version of the complexity analysis report
520
+ - Shows tasks organized by complexity score (highest to lowest)
521
+ - Provides complexity distribution statistics (low, medium, high)
522
+ - Highlights tasks recommended for expansion based on threshold score
523
+ - Includes ready-to-use expansion commands for each complex task
524
+ - If no report exists, offers to generate one on the spot
525
+
526
+ ### Smart Task Expansion
527
+
528
+ The `expand` command automatically checks for and uses the complexity report:
529
+
530
+ When a complexity report exists:
531
+
532
+ - Tasks are automatically expanded using the recommended subtask count and prompts
533
+ - When expanding all tasks, they're processed in order of complexity (highest first)
534
+ - Research-backed generation is preserved from the complexity analysis
535
+ - You can still override recommendations with explicit command-line options
536
+
537
+ Example workflow:
538
+
539
+ ```bash
540
+ # Generate the complexity analysis report with research capabilities
541
+ task-master analyze-complexity --research
542
+
543
+ # Review the report in a readable format
544
+ task-master complexity-report
545
+
546
+ # Expand tasks using the optimized recommendations
547
+ task-master expand --id=8
548
+ # or expand all tasks
549
+ task-master expand --all
550
+ ```
551
+
552
+ ### Finding the Next Task
553
+
554
+ The `next` command:
555
+
556
+ - Identifies tasks that are pending/in-progress and have all dependencies satisfied
557
+ - Prioritizes tasks by priority level, dependency count, and task ID
558
+ - Displays comprehensive information about the selected task:
559
+ - Basic task details (ID, title, priority, dependencies)
560
+ - Implementation details
561
+ - Subtasks (if they exist)
562
+ - Provides contextual suggested actions:
563
+ - Command to mark the task as in-progress
564
+ - Command to mark the task as done
565
+ - Commands for working with subtasks
566
+
567
+ ### Viewing Specific Task Details
568
+
569
+ The `show` command:
570
+
571
+ - Displays comprehensive details about a specific task or subtask
572
+ - Shows task status, priority, dependencies, and detailed implementation notes
573
+ - For parent tasks, displays all subtasks and their status
574
+ - For subtasks, shows parent task relationship
575
+ - Provides contextual action suggestions based on the task's state
576
+ - Works with both regular tasks and subtasks (using the format taskId.subtaskId)
577
+
578
+ ## Best Practices for AI-Driven Development
579
+
580
+ 1. **Start with a detailed PRD**: The more detailed your PRD, the better the generated tasks will be.
581
+
582
+ 2. **Review generated tasks**: After parsing the PRD, review the tasks to ensure they make sense and have appropriate dependencies.
583
+
584
+ 3. **Analyze task complexity**: Use the complexity analysis feature to identify which tasks should be broken down further.
585
+
586
+ 4. **Follow the dependency chain**: Always respect task dependencies - the Cursor agent will help with this.
587
+
588
+ 5. **Update as you go**: If your implementation diverges from the plan, use the update command to keep future tasks aligned with your current approach.
589
+
590
+ 6. **Break down complex tasks**: Use the expand command to break down complex tasks into manageable subtasks.
591
+
592
+ 7. **Regenerate task files**: After any updates to tasks.json, regenerate the task files to keep them in sync.
593
+
594
+ 8. **Communicate context to the agent**: When asking the Cursor agent to help with a task, provide context about what you're trying to achieve.
595
+
596
+ 9. **Validate dependencies**: Periodically run the validate-dependencies command to check for invalid or circular dependencies.
597
+
598
+ ## Example Cursor AI Interactions
599
+
600
+ ### Starting a new project
601
+
602
+ ```
603
+ I've just initialized a new project with Claude Task Master. I have a PRD at scripts/prd.txt.
604
+ Can you help me parse it and set up the initial tasks?
605
+ ```
606
+
607
+ ### Working on tasks
608
+
609
+ ```
610
+ What's the next task I should work on? Please consider dependencies and priorities.
611
+ ```
612
+
613
+ ### Implementing a specific task
614
+
615
+ ```
616
+ I'd like to implement task 4. Can you help me understand what needs to be done and how to approach it?
617
+ ```
618
+
619
+ ### Managing subtasks
620
+
621
+ ```
622
+ I need to regenerate the subtasks for task 3 with a different approach. Can you help me clear and regenerate them?
623
+ ```
624
+
625
+ ### Handling changes
626
+
627
+ ```
628
+ We've decided to use MongoDB instead of PostgreSQL. Can you update all future tasks to reflect this change?
629
+ ```
630
+
631
+ ### Completing work
632
+
633
+ ```
634
+ I've finished implementing the authentication system described in task 2. All tests are passing.
635
+ Please mark it as complete and tell me what I should work on next.
636
+ ```
637
+
638
+ ### Analyzing complexity
639
+
640
+ ```
641
+ Can you analyze the complexity of our tasks to help me understand which ones need to be broken down further?
642
+ ```
643
+
644
+ ### Viewing complexity report
645
+
646
+ ```
647
+ Can you show me the complexity report in a more readable format?
648
+ ```