@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
@@ -0,0 +1,3528 @@
1
+ import{c as e}from"./ai-services-unified-BgdcS4fE.js";import{Bt as t,E as n,Ft as r,Gt as i,Ht as a,It as o,J as s,Pt as c,Ut as l,Vt as u,Wt as d,hn as f,qt as p,vt as m,yt as h}from"./config-manager-cjltSxIS.js";import{r as g}from"./git-utils-DllbRE35.js";import{Ct as _,St as v,Tt as y,x as ee}from"./dependency-manager-CyOxi5uo.js";import*as b from"node:path";import x from"chalk";import S from"fs";import C from"path";import{randomUUID as w}from"crypto";import T from"os";import*as E from"node:fs";import{execSync as D}from"child_process";import*as O from"node:os";import{fileURLToPath as te}from"url";import k from"boxen";import A from"readline";import ne from"figlet";import re from"gradient-string";import ie from"inquirer";import ae from"ora";import oe from"open";const j=[`amp`,`claude`,`cline`,`codex`,`cursor`,`gemini`,`kiro`,`opencode`,`kilo`,`roo`,`trae`,`vscode`,`windsurf`,`zed`],se=[`architect`,`ask`,`orchestrator`,`code`,`debug`,`test`],M=`# Task files`,ce=`tasks.json`,N=`tasks/`;function le(e){return e.trim().replace(/^#/,``).trim()}function P(e){let t=le(e);return t===ce||t===N}function ue(e,t){return e.map(e=>{if(P(e)){let n=le(e),r=e.match(/\s*$/)[0];return t?`# ${n}${r}`:`${n}${r}`}return e})}function de(e){let t=[],n=!1;for(let r of e){if(r.trim()===M){n=!0;continue}P(r)||n&&!r.trim()||(n&&r.trim()&&!P(r)&&(n=!1),n||t.push(r))}return t}function fe(e,t){return e.filter(e=>{let n=e.trim();return!n||P(e)||n===M?!1:!t.has(n)})}function pe(e){let t=[M];return e?t.push(`# ${ce}`,`# ${N} `):t.push(ce,`${N} `),t}function me(e){if(e.some(e=>e.trim())){let t=e[e.length-1];t&&t.trim()&&e.push(``)}}function he(e,t,n){if(!e||typeof e!=`string`)throw Error(`targetPath must be a non-empty string`);if(!e.endsWith(`.gitignore`))throw Error(`targetPath must end with .gitignore`);if(!t||typeof t!=`string`)throw Error(`content must be a non-empty string`);if(typeof n!=`boolean`)throw Error(`storeTasksInGit must be a boolean`)}function ge(e,t,n){try{S.writeFileSync(e,t.join(`
2
+ `)+`
3
+ `),typeof n==`function`&&n(`success`,`Created ${e} with full template`)}catch(t){throw typeof n==`function`&&n(`error`,`Failed to create ${e}: ${t.message}`),t}}function _e(e,t,n,r){try{let i=de(S.readFileSync(e,`utf8`).split(`
4
+ `)),a=fe(t,new Set(i.map(e=>e.trim()).filter(e=>e))),o=[...i];a.length>0&&(me(o),o.push(...a)),me(o),o.push(...pe(n)),S.writeFileSync(e,o.join(`
5
+ `)+`
6
+ `),typeof r==`function`&&r(`debug`,`Updated ${e} according to user preference${a.length>0?` and merged new content`:``}`)}catch(t){throw typeof r==`function`&&r(`error`,`Failed to merge content with ${e}: ${t.message}`),t}}function ve(e,t,n=!0,r=null){he(e,t,n);let i=ue(t.split(`
7
+ `),n);S.existsSync(e)?_e(e,i,n,r):ge(e,i,r)}const ye=te(import.meta.url),F=C.dirname(ye);function I(){let e=[C.join(F,`assets`),C.join(F,`..`,`assets`),C.join(F,`..`,`..`,`public`,`assets`),C.join(process.cwd(),`assets`),C.join(process.cwd(),`node_modules`,`task-master-ai`,`dist`,`assets`),C.join(process.cwd(),`node_modules`,`task-master-ai`,`assets`)];for(let t of e)if(S.existsSync(t)){let e=C.join(t,`rules`,`taskmaster.mdc`);if(S.existsSync(e))return t}throw Error(`Assets directory not found. This is likely a packaging issue.`)}function be(e){let t=I();return C.join(t,e)}function xe(e){try{let t=be(e);return S.existsSync(t)}catch{return!1}}function L(e,t=`utf8`){let n=be(e);return S.readFileSync(n,t)}function R(e){let t=JSON.stringify(e,null,` `);return t=t.replace(/(\[\n\t+)([^[\]]+?)(\n\t+\])/g,(e,t,n,r)=>!n.includes(`{`)&&!n.includes(`[`)?`[${n.replace(/\n\t+/g,` `).replace(/\s+/g,` `).trim()}]`:e),t}function Se(e,t){if(!t){h(`debug`,`[MCP Config] No mcpConfigPath provided, skipping MCP configuration setup`);return}let n=C.join(e,t),r=C.dirname(n);h(`info`,`Setting up MCP configuration at ${n}...`);let i={"task-master-ai":{command:`npx`,args:[`-y`,`task-master-ai`],env:{TASK_MASTER_TOOLS:`core`,ANTHROPIC_API_KEY:`YOUR_ANTHROPIC_API_KEY_HERE`,PERPLEXITY_API_KEY:`YOUR_PERPLEXITY_API_KEY_HERE`,OPENAI_API_KEY:`YOUR_OPENAI_KEY_HERE`,GOOGLE_API_KEY:`YOUR_GOOGLE_KEY_HERE`,XAI_API_KEY:`YOUR_XAI_KEY_HERE`,OPENROUTER_API_KEY:`YOUR_OPENROUTER_KEY_HERE`,MISTRAL_API_KEY:`YOUR_MISTRAL_KEY_HERE`,AZURE_OPENAI_API_KEY:`YOUR_AZURE_KEY_HERE`,OLLAMA_API_KEY:`YOUR_OLLAMA_API_KEY_HERE`}}};if(S.existsSync(r)||S.mkdirSync(r,{recursive:!0}),S.existsSync(n)){h(`info`,`MCP configuration file already exists, checking for existing task-master-ai...`);try{let e=JSON.parse(S.readFileSync(n,`utf8`));if(e.mcpServers||={},Object.values(e.mcpServers).some(e=>e.args&&Array.isArray(e.args)&&e.args.some(e=>typeof e==`string`&&e.includes(`task-master-ai`)))){h(`info`,`Found existing task-master-ai MCP configuration in mcp.json, leaving untouched`);return}e.mcpServers[`task-master-ai`]?h(`info`,`task-master-ai server already configured in mcp.json`):(e.mcpServers[`task-master-ai`]=i[`task-master-ai`],h(`info`,`Added task-master-ai server to existing MCP configuration`)),S.writeFileSync(n,R(e)+`
8
+ `),h(`success`,`Updated MCP configuration file`)}catch(e){h(`error`,`Failed to update MCP configuration: ${e.message}`);let t=`${n}.backup-${Date.now()}`;S.existsSync(n)&&(S.copyFileSync(n,t),h(`info`,`Created backup of existing mcp.json at ${t}`));let r={mcpServers:i};S.writeFileSync(n,R(r)+`
9
+ `),h(`warn`,`Created new MCP configuration file (backup of original file was created if it existed)`)}}else{let e={mcpServers:i};S.writeFileSync(n,R(e)+`
10
+ `),h(`success`,`Created MCP configuration file at ${n}`)}h(`info`,`MCP server will use the installed task-master-ai package`)}function Ce(e,t){if(!t)return{success:!0,removed:!1,deleted:!1,error:null,hasOtherServers:!1};let n=C.join(e,t),r={success:!1,removed:!1,deleted:!1,error:null,hasOtherServers:!1};if(!S.existsSync(n))return r.success=!0,r.removed=!1,h(`debug`,`[MCP Config] MCP config file does not exist: ${n}`),r;try{let e=JSON.parse(S.readFileSync(n,`utf8`));if(!e.mcpServers)return r.success=!0,r.removed=!1,h(`debug`,`[MCP Config] No mcpServers section found in: ${n}`),r;if(!(e.mcpServers[`task-master-ai`]||Object.values(e.mcpServers).some(e=>e.args&&Array.isArray(e.args)&&e.args.some(e=>typeof e==`string`&&e.includes(`task-master-ai`)))))return r.success=!0,r.removed=!1,h(`debug`,`[MCP Config] Task Master not found in MCP config: ${n}`),r;delete e.mcpServers[`task-master-ai`],Object.keys(e.mcpServers).forEach(t=>{let n=e.mcpServers[t];n.args&&Array.isArray(n.args)&&n.args.some(e=>typeof e==`string`&&e.includes(`task-master-ai`))&&(delete e.mcpServers[t],h(`debug`,`[MCP Config] Removed server '${t}' containing task-master-ai`))});let t=Object.keys(e.mcpServers);r.hasOtherServers=t.length>0,r.hasOtherServers?(S.writeFileSync(n,R(e)+`
11
+ `),r.success=!0,r.removed=!0,r.deleted=!1,h(`info`,`[MCP Config] Removed Task Master from MCP config, preserving other servers: ${t.join(`, `)}`)):(S.rmSync(n,{force:!0}),r.success=!0,r.removed=!0,r.deleted=!0,h(`info`,`[MCP Config] Removed MCP config file (no other servers remaining): ${n}`))}catch(e){r.error=e.message,h(`error`,`[MCP Config] Failed to remove Task Master from MCP config: ${e.message}`)}return r}function z(e){let{name:t,description:n,content:r,argumentHint:i,mode:a}=e;return{type:`static`,metadata:{name:t,description:n,...i&&{argumentHint:i},...a&&{mode:a}},content:r}}function B(e,t,n,r,i){if(!r.includes(`$ARGUMENTS`))throw Error(`Dynamic slash command "${e}" must contain $ARGUMENTS placeholder`);return{type:`dynamic`,metadata:{name:e,description:t,argumentHint:n,...i&&{mode:i}},content:r}}const we=B(`parse-prd`,`Parse PRD`,`<prd-file>`,`Parse a PRD document to generate tasks.
12
+
13
+ Arguments: $ARGUMENTS (PRD file path)
14
+
15
+ ## Intelligent PRD Parsing
16
+
17
+ Analyzes your requirements document and generates a complete task breakdown.
18
+
19
+ ## Execution
20
+
21
+ \`\`\`bash
22
+ task-master parse-prd --input=$ARGUMENTS
23
+ \`\`\`
24
+
25
+ ## Parsing Process
26
+
27
+ 1. **Document Analysis**
28
+ - Extract key requirements
29
+ - Identify technical components
30
+ - Detect dependencies
31
+ - Estimate complexity
32
+
33
+ 2. **Task Generation**
34
+ - Create 10-15 tasks by default
35
+ - Include implementation tasks
36
+ - Add testing tasks
37
+ - Include documentation tasks
38
+ - Set logical dependencies
39
+
40
+ 3. **Smart Enhancements**
41
+ - Group related functionality
42
+ - Set appropriate priorities
43
+ - Add acceptance criteria
44
+ - Include test strategies
45
+
46
+ ## Options
47
+
48
+ Parse arguments for modifiers:
49
+ - Number after filename → \`--num-tasks\`
50
+ - \`research\` → Use research mode
51
+ - \`comprehensive\` → Generate more tasks
52
+
53
+ ## Post-Generation
54
+
55
+ After parsing:
56
+ 1. Display task summary
57
+ 2. Show dependency graph
58
+ 3. Suggest task expansion for complex items
59
+ 4. Recommend sprint planning`,`solo`),Te=B(`parse-prd-with-research`,`Parse PRD With Research`,`<prd-file>`,`Parse PRD with enhanced research mode for better task generation.
60
+
61
+ Arguments: $ARGUMENTS (PRD file path)
62
+
63
+ ## Research-Enhanced Parsing
64
+
65
+ Uses the research AI provider (typically Perplexity) for more comprehensive task generation with current best practices.
66
+
67
+ ## Execution
68
+
69
+ \`\`\`bash
70
+ task-master parse-prd --input=$ARGUMENTS --research
71
+ \`\`\`
72
+
73
+ ## Research Benefits
74
+
75
+ 1. **Current Best Practices**
76
+ - Latest framework patterns
77
+ - Security considerations
78
+ - Performance optimizations
79
+ - Accessibility requirements
80
+
81
+ 2. **Technical Deep Dive**
82
+ - Implementation approaches
83
+ - Library recommendations
84
+ - Architecture patterns
85
+ - Testing strategies
86
+
87
+ 3. **Comprehensive Coverage**
88
+ - Edge cases consideration
89
+ - Error handling tasks
90
+ - Monitoring setup
91
+ - Deployment tasks
92
+
93
+ ## Enhanced Output
94
+
95
+ Research mode typically:
96
+ - Generates more detailed tasks
97
+ - Includes industry standards
98
+ - Adds compliance considerations
99
+ - Suggests modern tooling
100
+
101
+ ## When to Use
102
+
103
+ - New technology domains
104
+ - Complex requirements
105
+ - Regulatory compliance needed
106
+ - Best practices crucial`,`solo`),Ee=B(`analyze-complexity`,`Analyze Complexity`,`[options]`,`Analyze task complexity and generate expansion recommendations.
107
+
108
+ Arguments: $ARGUMENTS
109
+
110
+ Perform deep analysis of task complexity across the project.
111
+
112
+ ## Complexity Analysis
113
+
114
+ Uses AI to analyze tasks and recommend which ones need breakdown.
115
+
116
+ ## Execution Options
117
+
118
+ \`\`\`bash
119
+ task-master analyze-complexity [--research] [--threshold=5]
120
+ \`\`\`
121
+
122
+ ## Analysis Parameters
123
+
124
+ - \`--research\` → Use research AI for deeper analysis
125
+ - \`--threshold=5\` → Only flag tasks above complexity 5
126
+ - Default: Analyze all pending tasks
127
+
128
+ ## Analysis Process
129
+
130
+ ### 1. **Task Evaluation**
131
+ For each task, AI evaluates:
132
+ - Technical complexity
133
+ - Time requirements
134
+ - Dependency complexity
135
+ - Risk factors
136
+ - Knowledge requirements
137
+
138
+ ### 2. **Complexity Scoring**
139
+ Assigns score 1-10 based on:
140
+ - Implementation difficulty
141
+ - Integration challenges
142
+ - Testing requirements
143
+ - Unknown factors
144
+ - Technical debt risk
145
+
146
+ ### 3. **Recommendations**
147
+ For complex tasks:
148
+ - Suggest expansion approach
149
+ - Recommend subtask breakdown
150
+ - Identify risk areas
151
+ - Propose mitigation strategies
152
+
153
+ ## Smart Analysis Features
154
+
155
+ 1. **Pattern Recognition**
156
+ - Similar task comparisons
157
+ - Historical complexity accuracy
158
+ - Team velocity consideration
159
+ - Technology stack factors
160
+
161
+ 2. **Contextual Factors**
162
+ - Team expertise
163
+ - Available resources
164
+ - Timeline constraints
165
+ - Business criticality
166
+
167
+ 3. **Risk Assessment**
168
+ - Technical risks
169
+ - Timeline risks
170
+ - Dependency risks
171
+ - Knowledge gaps
172
+
173
+ ## Output Format
174
+
175
+ \`\`\`
176
+ Task Complexity Analysis Report
177
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
178
+
179
+ High Complexity Tasks (>7):
180
+ šŸ“ #5 "Implement real-time sync" - Score: 9/10
181
+ Factors: WebSocket complexity, state management, conflict resolution
182
+ Recommendation: Expand into 5-7 subtasks
183
+ Risks: Performance, data consistency
184
+
185
+ šŸ“ #12 "Migrate database schema" - Score: 8/10
186
+ Factors: Data migration, zero downtime, rollback strategy
187
+ Recommendation: Expand into 4-5 subtasks
188
+ Risks: Data loss, downtime
189
+
190
+ Medium Complexity Tasks (5-7):
191
+ šŸ“ #23 "Add export functionality" - Score: 6/10
192
+ Consider expansion if timeline tight
193
+
194
+ Low Complexity Tasks (<5):
195
+ āœ… 15 tasks - No expansion needed
196
+
197
+ Summary:
198
+ - Expand immediately: 2 tasks
199
+ - Consider expanding: 5 tasks
200
+ - Keep as-is: 15 tasks
201
+ \`\`\`
202
+
203
+ ## Actionable Output
204
+
205
+ For each high-complexity task:
206
+ 1. Complexity score with reasoning
207
+ 2. Specific expansion suggestions
208
+ 3. Risk mitigation approaches
209
+ 4. Recommended subtask structure
210
+
211
+ ## Integration
212
+
213
+ Results are:
214
+ - Saved to \`.taskmaster/reports/complexity-analysis.md\`
215
+ - Used by expand command
216
+ - Inform sprint planning
217
+ - Guide resource allocation
218
+
219
+ ## Next Steps
220
+
221
+ After analysis:
222
+ \`\`\`
223
+ /taskmaster:expand 5 # Expand specific task
224
+ /taskmaster:expand-all # Expand all recommended
225
+ /taskmaster:complexity-report # View detailed report
226
+ \`\`\``,`solo`),De=B(`complexity-report`,`Complexity Report`,`[--file=<path>]`,`Display the task complexity analysis report.
227
+
228
+ Arguments: $ARGUMENTS
229
+
230
+ View the detailed complexity analysis generated by analyze-complexity command.
231
+
232
+ ## Viewing Complexity Report
233
+
234
+ Shows comprehensive task complexity analysis with actionable insights.
235
+
236
+ ## Execution
237
+
238
+ \`\`\`bash
239
+ task-master complexity-report [--file=<path>]
240
+ \`\`\`
241
+
242
+ ## Report Location
243
+
244
+ Default: \`.taskmaster/reports/complexity-analysis.md\`
245
+ Custom: Specify with --file parameter
246
+
247
+ ## Report Contents
248
+
249
+ ### 1. **Executive Summary**
250
+ \`\`\`
251
+ Complexity Analysis Summary
252
+ ━━━━━━━━━━━━━━━━━━━━━━━━
253
+ Analysis Date: 2024-01-15
254
+ Tasks Analyzed: 32
255
+ High Complexity: 5 (16%)
256
+ Medium Complexity: 12 (37%)
257
+ Low Complexity: 15 (47%)
258
+
259
+ Critical Findings:
260
+ - 5 tasks need immediate expansion
261
+ - 3 tasks have high technical risk
262
+ - 2 tasks block critical path
263
+ \`\`\`
264
+
265
+ ### 2. **Detailed Task Analysis**
266
+ For each complex task:
267
+ - Complexity score breakdown
268
+ - Contributing factors
269
+ - Specific risks identified
270
+ - Expansion recommendations
271
+ - Similar completed tasks
272
+
273
+ ### 3. **Risk Matrix**
274
+ Visual representation:
275
+ \`\`\`
276
+ Risk vs Complexity Matrix
277
+ ━━━━━━━━━━━━━━━━━━━━━━━
278
+ High Risk | #5(9) #12(8) | #23(6)
279
+ Med Risk | #34(7) | #45(5) #67(5)
280
+ Low Risk | #78(8) | [15 tasks]
281
+ | High Complex | Med Complex
282
+ \`\`\`
283
+
284
+ ### 4. **Recommendations**
285
+
286
+ **Immediate Actions:**
287
+ 1. Expand task #5 - Critical path + high complexity
288
+ 2. Expand task #12 - High risk + dependencies
289
+ 3. Review task #34 - Consider splitting
290
+
291
+ **Sprint Planning:**
292
+ - Don't schedule multiple high-complexity tasks together
293
+ - Ensure expertise available for complex tasks
294
+ - Build in buffer time for unknowns
295
+
296
+ ## Interactive Features
297
+
298
+ When viewing report:
299
+ 1. **Quick Actions**
300
+ - Press 'e' to expand a task
301
+ - Press 'd' for task details
302
+ - Press 'r' to refresh analysis
303
+
304
+ 2. **Filtering**
305
+ - View by complexity level
306
+ - Filter by risk factors
307
+ - Show only actionable items
308
+
309
+ 3. **Export Options**
310
+ - Markdown format
311
+ - CSV for spreadsheets
312
+ - JSON for tools
313
+
314
+ ## Report Intelligence
315
+
316
+ - Compares with historical data
317
+ - Shows complexity trends
318
+ - Identifies patterns
319
+ - Suggests process improvements
320
+
321
+ ## Integration
322
+
323
+ Use report for:
324
+ - Sprint planning sessions
325
+ - Resource allocation
326
+ - Risk assessment
327
+ - Team discussions
328
+ - Client updates
329
+
330
+ ## Example Usage
331
+
332
+ \`\`\`
333
+ /taskmaster:complexity-report
334
+ → Opens latest analysis
335
+
336
+ /taskmaster:complexity-report --file=archived/2024-01-01.md
337
+ → View historical analysis
338
+
339
+ After viewing:
340
+ /taskmaster:expand 5
341
+ → Expand high-complexity task
342
+ \`\`\``,`solo`),Oe=B(`expand-task`,`Expand Task`,`<task-id>`,`Break down a complex task into subtasks.
343
+
344
+ Arguments: $ARGUMENTS (task ID)
345
+
346
+ ## Intelligent Task Expansion
347
+
348
+ Analyzes a task and creates detailed subtasks for better manageability.
349
+
350
+ ## Execution
351
+
352
+ \`\`\`bash
353
+ task-master expand --id=$ARGUMENTS
354
+ \`\`\`
355
+
356
+ ## Expansion Process
357
+
358
+ 1. **Task Analysis**
359
+ - Review task complexity
360
+ - Identify components
361
+ - Detect technical challenges
362
+ - Estimate time requirements
363
+
364
+ 2. **Subtask Generation**
365
+ - Create 3-7 subtasks typically
366
+ - Each subtask 1-4 hours
367
+ - Logical implementation order
368
+ - Clear acceptance criteria
369
+
370
+ 3. **Smart Breakdown**
371
+ - Setup/configuration tasks
372
+ - Core implementation
373
+ - Testing components
374
+ - Integration steps
375
+ - Documentation updates
376
+
377
+ ## Enhanced Features
378
+
379
+ Based on task type:
380
+ - **Feature**: Setup → Implement → Test → Integrate
381
+ - **Bug Fix**: Reproduce → Diagnose → Fix → Verify
382
+ - **Refactor**: Analyze → Plan → Refactor → Validate
383
+
384
+ ## Post-Expansion
385
+
386
+ After expansion:
387
+ 1. Show subtask hierarchy
388
+ 2. Update time estimates
389
+ 3. Suggest implementation order
390
+ 4. Highlight critical path`,`solo`),ke=z({name:`expand-all-tasks`,description:`Expand All Tasks`,content:`Expand all pending tasks that need subtasks.
391
+
392
+ ## Bulk Task Expansion
393
+
394
+ Intelligently expands all tasks that would benefit from breakdown.
395
+
396
+ ## Execution
397
+
398
+ \`\`\`bash
399
+ task-master expand --all
400
+ \`\`\`
401
+
402
+ ## Smart Selection
403
+
404
+ Only expands tasks that:
405
+ - Are marked as pending
406
+ - Have high complexity (>5)
407
+ - Lack existing subtasks
408
+ - Would benefit from breakdown
409
+
410
+ ## Expansion Process
411
+
412
+ 1. **Analysis Phase**
413
+ - Identify expansion candidates
414
+ - Group related tasks
415
+ - Plan expansion strategy
416
+
417
+ 2. **Batch Processing**
418
+ - Expand tasks in logical order
419
+ - Maintain consistency
420
+ - Preserve relationships
421
+ - Optimize for parallelism
422
+
423
+ 3. **Quality Control**
424
+ - Ensure subtask quality
425
+ - Avoid over-decomposition
426
+ - Maintain task coherence
427
+ - Update dependencies
428
+
429
+ ## Options
430
+
431
+ - Add \`force\` to expand all regardless of complexity
432
+ - Add \`research\` for enhanced AI analysis
433
+
434
+ ## Results
435
+
436
+ After bulk expansion:
437
+ - Summary of tasks expanded
438
+ - New subtask count
439
+ - Updated complexity metrics
440
+ - Suggested task order`,mode:`solo`}),Ae=B(`add-task`,`Add Task`,`<description>`,`Add new tasks with intelligent parsing and context awareness.
441
+
442
+ Arguments: $ARGUMENTS
443
+
444
+ ## Smart Task Addition
445
+
446
+ Parse natural language to create well-structured tasks.
447
+
448
+ ### 1. **Input Understanding**
449
+
450
+ I'll intelligently parse your request:
451
+ - Natural language → Structured task
452
+ - Detect priority from keywords (urgent, ASAP, important)
453
+ - Infer dependencies from context
454
+ - Suggest complexity based on description
455
+ - Determine task type (feature, bug, refactor, test, docs)
456
+
457
+ ### 2. **Smart Parsing Examples**
458
+
459
+ **"Add urgent task to fix login bug"**
460
+ → Title: Fix login bug
461
+ → Priority: high
462
+ → Type: bug
463
+ → Suggested complexity: medium
464
+
465
+ **"Create task for API documentation after task 23 is done"**
466
+ → Title: API documentation
467
+ → Dependencies: [23]
468
+ → Type: documentation
469
+ → Priority: medium
470
+
471
+ **"Need to refactor auth module - depends on 12 and 15, high complexity"**
472
+ → Title: Refactor auth module
473
+ → Dependencies: [12, 15]
474
+ → Complexity: high
475
+ → Type: refactor
476
+
477
+ ### 3. **Context Enhancement**
478
+
479
+ Based on current project state:
480
+ - Suggest related existing tasks
481
+ - Warn about potential conflicts
482
+ - Recommend dependencies
483
+ - Propose subtasks if complex
484
+
485
+ ### 4. **Interactive Refinement**
486
+
487
+ \`\`\`yaml
488
+ Task Preview:
489
+ ─────────────
490
+ Title: [Extracted title]
491
+ Priority: [Inferred priority]
492
+ Dependencies: [Detected dependencies]
493
+ Complexity: [Estimated complexity]
494
+
495
+ Suggestions:
496
+ - Similar task #34 exists, consider as dependency?
497
+ - This seems complex, break into subtasks?
498
+ - Tasks #45-47 work on same module
499
+ \`\`\`
500
+
501
+ ### 5. **Validation & Creation**
502
+
503
+ Before creating:
504
+ - Validate dependencies exist
505
+ - Check for duplicates
506
+ - Ensure logical ordering
507
+ - Verify task completeness
508
+
509
+ ### 6. **Smart Defaults**
510
+
511
+ Intelligent defaults based on:
512
+ - Task type patterns
513
+ - Team conventions
514
+ - Historical data
515
+ - Current sprint/phase
516
+
517
+ Result: High-quality tasks from minimal input.`,`solo`),je=B(`add-subtask`,`Add Subtask`,`<parent-id> <title>`,`Add a subtask to a parent task.
518
+
519
+ Arguments: $ARGUMENTS
520
+
521
+ Parse arguments to create a new subtask or convert existing task.
522
+
523
+ ## Adding Subtasks
524
+
525
+ Creates subtasks to break down complex parent tasks into manageable pieces.
526
+
527
+ ## Argument Parsing
528
+
529
+ Flexible natural language:
530
+ - "add subtask to 5: implement login form"
531
+ - "break down 5 with: setup, implement, test"
532
+ - "subtask for 5: handle edge cases"
533
+ - "5: validate user input" → adds subtask to task 5
534
+
535
+ ## Execution Modes
536
+
537
+ ### 1. Create New Subtask
538
+ \`\`\`bash
539
+ task-master add-subtask --parent=<id> --title="<title>" --description="<desc>"
540
+ \`\`\`
541
+
542
+ ### 2. Convert Existing Task
543
+ \`\`\`bash
544
+ task-master add-subtask --parent=<id> --task-id=<existing-id>
545
+ \`\`\`
546
+
547
+ ## Smart Features
548
+
549
+ 1. **Automatic Subtask Generation**
550
+ - If title contains "and" or commas, create multiple
551
+ - Suggest common subtask patterns
552
+ - Inherit parent's context
553
+
554
+ 2. **Intelligent Defaults**
555
+ - Priority based on parent
556
+ - Appropriate time estimates
557
+ - Logical dependencies between subtasks
558
+
559
+ 3. **Validation**
560
+ - Check parent task complexity
561
+ - Warn if too many subtasks
562
+ - Ensure subtask makes sense
563
+
564
+ ## Creation Process
565
+
566
+ 1. Parse parent task context
567
+ 2. Generate subtask with ID like "5.1"
568
+ 3. Set appropriate defaults
569
+ 4. Link to parent task
570
+ 5. Update parent's time estimate
571
+
572
+ ## Example Flows
573
+
574
+ \`\`\`
575
+ /taskmaster:add-subtask to 5: implement user authentication
576
+ → Created subtask #5.1: "implement user authentication"
577
+ → Parent task #5 now has 1 subtask
578
+ → Suggested next subtasks: tests, documentation
579
+
580
+ /taskmaster:add-subtask 5: setup, implement, test
581
+ → Created 3 subtasks:
582
+ #5.1: setup
583
+ #5.2: implement
584
+ #5.3: test
585
+ \`\`\`
586
+
587
+ ## Post-Creation
588
+
589
+ - Show updated task hierarchy
590
+ - Suggest logical next subtasks
591
+ - Update complexity estimates
592
+ - Recommend subtask order`,`solo`),Me=B(`remove-task`,`Remove Task`,`<task-id>`,`Remove a task permanently from the project.
593
+
594
+ Arguments: $ARGUMENTS (task ID)
595
+
596
+ Delete a task and handle all its relationships properly.
597
+
598
+ ## Task Removal
599
+
600
+ Permanently removes a task while maintaining project integrity.
601
+
602
+ ## Argument Parsing
603
+
604
+ - "remove task 5"
605
+ - "delete 5"
606
+ - "5" → remove task 5
607
+ - Can include "-y" for auto-confirm
608
+
609
+ ## Execution
610
+
611
+ \`\`\`bash
612
+ task-master remove-task --id=<id> [-y]
613
+ \`\`\`
614
+
615
+ ## Pre-Removal Analysis
616
+
617
+ 1. **Task Details**
618
+ - Current status
619
+ - Work completed
620
+ - Time invested
621
+ - Associated data
622
+
623
+ 2. **Relationship Check**
624
+ - Tasks that depend on this
625
+ - Dependencies this task has
626
+ - Subtasks that will be removed
627
+ - Blocking implications
628
+
629
+ 3. **Impact Assessment**
630
+ \`\`\`
631
+ Task Removal Impact
632
+ ━━━━━━━━━━━━━━━━━━
633
+ Task: #5 "Implement authentication" (in-progress)
634
+ Status: 60% complete (~8 hours work)
635
+
636
+ Will affect:
637
+ - 3 tasks depend on this (will be blocked)
638
+ - Has 4 subtasks (will be deleted)
639
+ - Part of critical path
640
+
641
+ āš ļø This action cannot be undone
642
+ \`\`\`
643
+
644
+ ## Smart Warnings
645
+
646
+ - Warn if task is in-progress
647
+ - Show dependent tasks that will be blocked
648
+ - Highlight if part of critical path
649
+ - Note any completed work being lost
650
+
651
+ ## Removal Process
652
+
653
+ 1. Show comprehensive impact
654
+ 2. Require confirmation (unless -y)
655
+ 3. Update dependent task references
656
+ 4. Remove task and subtasks
657
+ 5. Clean up orphaned dependencies
658
+ 6. Log removal with timestamp
659
+
660
+ ## Alternative Actions
661
+
662
+ Suggest before deletion:
663
+ - Mark as cancelled instead
664
+ - Convert to documentation
665
+ - Archive task data
666
+ - Transfer work to another task
667
+
668
+ ## Post-Removal
669
+
670
+ - List affected tasks
671
+ - Show broken dependencies
672
+ - Update project statistics
673
+ - Suggest dependency fixes
674
+ - Recalculate timeline
675
+
676
+ ## Example Flows
677
+
678
+ \`\`\`
679
+ /taskmaster:remove-task 5
680
+ → Task #5 is in-progress with 8 hours logged
681
+ → 3 other tasks depend on this
682
+ → Suggestion: Mark as cancelled instead?
683
+ Remove anyway? (y/n)
684
+
685
+ /taskmaster:remove-task 5 -y
686
+ → Removed: Task #5 and 4 subtasks
687
+ → Updated: 3 task dependencies
688
+ → Warning: Tasks #7, #8, #9 now have missing dependency
689
+ → Run /taskmaster:fix-dependencies to resolve
690
+ \`\`\`
691
+
692
+ ## Safety Features
693
+
694
+ - Confirmation required
695
+ - Impact preview
696
+ - Removal logging
697
+ - Suggest alternatives
698
+ - No cascade delete of dependents`,`solo`),Ne=B(`remove-subtask`,`Remove Subtask`,`<subtask-id>`,`Remove a subtask from its parent task.
699
+
700
+ Arguments: $ARGUMENTS
701
+
702
+ Parse subtask ID to remove, with option to convert to standalone task.
703
+
704
+ ## Removing Subtasks
705
+
706
+ Remove a subtask and optionally convert it back to a standalone task.
707
+
708
+ ## Argument Parsing
709
+
710
+ - "remove subtask 5.1"
711
+ - "delete 5.1"
712
+ - "convert 5.1 to task" → remove and convert
713
+ - "5.1 standalone" → convert to standalone
714
+
715
+ ## Execution Options
716
+
717
+ ### 1. Delete Subtask
718
+ \`\`\`bash
719
+ task-master remove-subtask --id=<parentId.subtaskId>
720
+ \`\`\`
721
+
722
+ ### 2. Convert to Standalone
723
+ \`\`\`bash
724
+ task-master remove-subtask --id=<parentId.subtaskId> --convert
725
+ \`\`\`
726
+
727
+ ## Pre-Removal Checks
728
+
729
+ 1. **Validate Subtask**
730
+ - Verify subtask exists
731
+ - Check completion status
732
+ - Review dependencies
733
+
734
+ 2. **Impact Analysis**
735
+ - Other subtasks that depend on it
736
+ - Parent task implications
737
+ - Data that will be lost
738
+
739
+ ## Removal Process
740
+
741
+ ### For Deletion:
742
+ 1. Confirm if subtask has work done
743
+ 2. Update parent task estimates
744
+ 3. Remove subtask and its data
745
+ 4. Clean up dependencies
746
+
747
+ ### For Conversion:
748
+ 1. Assign new standalone task ID
749
+ 2. Preserve all task data
750
+ 3. Update dependency references
751
+ 4. Maintain task history
752
+
753
+ ## Smart Features
754
+
755
+ - Warn if subtask is in-progress
756
+ - Show impact on parent task
757
+ - Preserve important data
758
+ - Update related estimates
759
+
760
+ ## Example Flows
761
+
762
+ \`\`\`
763
+ /taskmaster:remove-subtask 5.1
764
+ → Warning: Subtask #5.1 is in-progress
765
+ → This will delete all subtask data
766
+ → Parent task #5 will be updated
767
+ Confirm deletion? (y/n)
768
+
769
+ /taskmaster:remove-subtask 5.1 convert
770
+ → Converting subtask #5.1 to standalone task #89
771
+ → Preserved: All task data and history
772
+ → Updated: 2 dependency references
773
+ → New task #89 is now independent
774
+ \`\`\`
775
+
776
+ ## Post-Removal
777
+
778
+ - Update parent task status
779
+ - Recalculate estimates
780
+ - Show updated hierarchy
781
+ - Suggest next actions`,`solo`),Pe=B(`remove-subtasks`,`Remove Subtasks`,`<task-id>`,`Clear all subtasks from a specific task.
782
+
783
+ Arguments: $ARGUMENTS (task ID)
784
+
785
+ Remove all subtasks from a parent task at once.
786
+
787
+ ## Clearing Subtasks
788
+
789
+ Bulk removal of all subtasks from a parent task.
790
+
791
+ ## Execution
792
+
793
+ \`\`\`bash
794
+ task-master remove-subtasks --id=$ARGUMENTS
795
+ \`\`\`
796
+
797
+ ## Pre-Clear Analysis
798
+
799
+ 1. **Subtask Summary**
800
+ - Number of subtasks
801
+ - Completion status of each
802
+ - Work already done
803
+ - Dependencies affected
804
+
805
+ 2. **Impact Assessment**
806
+ - Data that will be lost
807
+ - Dependencies to be removed
808
+ - Effect on project timeline
809
+ - Parent task implications
810
+
811
+ ## Confirmation Required
812
+
813
+ \`\`\`
814
+ Remove Subtasks Confirmation
815
+ ━━━━━━━━━━━━━━━━━━━━━━━━━
816
+ Parent Task: #5 "Implement user authentication"
817
+ Subtasks to remove: 4
818
+ - #5.1 "Setup auth framework" (done)
819
+ - #5.2 "Create login form" (in-progress)
820
+ - #5.3 "Add validation" (pending)
821
+ - #5.4 "Write tests" (pending)
822
+
823
+ āš ļø This will permanently delete all subtask data
824
+ Continue? (y/n)
825
+ \`\`\`
826
+
827
+ ## Smart Features
828
+
829
+ - Option to convert to standalone tasks
830
+ - Backup task data before clearing
831
+ - Preserve completed work history
832
+ - Update parent task appropriately
833
+
834
+ ## Process
835
+
836
+ 1. List all subtasks for confirmation
837
+ 2. Check for in-progress work
838
+ 3. Remove all subtasks
839
+ 4. Update parent task
840
+ 5. Clean up dependencies
841
+
842
+ ## Alternative Options
843
+
844
+ Suggest alternatives:
845
+ - Convert important subtasks to tasks
846
+ - Keep completed subtasks
847
+ - Archive instead of delete
848
+ - Export subtask data first
849
+
850
+ ## Post-Clear
851
+
852
+ - Show updated parent task
853
+ - Recalculate time estimates
854
+ - Update task complexity
855
+ - Suggest next steps
856
+
857
+ ## Example
858
+
859
+ \`\`\`
860
+ /taskmaster:remove-subtasks 5
861
+ → Found 4 subtasks to remove
862
+ → Warning: Subtask #5.2 is in-progress
863
+ → Cleared all subtasks from task #5
864
+ → Updated parent task estimates
865
+ → Suggestion: Consider re-expanding with better breakdown
866
+ \`\`\``,`solo`),Fe=z({name:`remove-all-subtasks`,description:`Remove All Subtasks`,content:`Clear all subtasks from all tasks globally.
867
+
868
+ ## Global Subtask Clearing
869
+
870
+ Remove all subtasks across the entire project. Use with extreme caution.
871
+
872
+ ## Execution
873
+
874
+ \`\`\`bash
875
+ task-master clear-subtasks --all
876
+ \`\`\`
877
+
878
+ ## Pre-Clear Analysis
879
+
880
+ 1. **Project-Wide Summary**
881
+ \`\`\`
882
+ Global Subtask Summary
883
+ ━━━━━━━━━━━━━━━━━━━━
884
+ Total parent tasks: 12
885
+ Total subtasks: 47
886
+ - Completed: 15
887
+ - In-progress: 8
888
+ - Pending: 24
889
+
890
+ Work at risk: ~120 hours
891
+ \`\`\`
892
+
893
+ 2. **Critical Warnings**
894
+ - In-progress subtasks that will lose work
895
+ - Completed subtasks with valuable history
896
+ - Complex dependency chains
897
+ - Integration test results
898
+
899
+ ## Double Confirmation
900
+
901
+ \`\`\`
902
+ āš ļø DESTRUCTIVE OPERATION WARNING āš ļø
903
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
904
+ This will remove ALL 47 subtasks from your project
905
+ Including 8 in-progress and 15 completed subtasks
906
+
907
+ This action CANNOT be undone
908
+
909
+ Type 'CLEAR ALL SUBTASKS' to confirm:
910
+ \`\`\`
911
+
912
+ ## Smart Safeguards
913
+
914
+ - Require explicit confirmation phrase
915
+ - Create automatic backup
916
+ - Log all removed data
917
+ - Option to export first
918
+
919
+ ## Use Cases
920
+
921
+ Valid reasons for global clear:
922
+ - Project restructuring
923
+ - Major pivot in approach
924
+ - Starting fresh breakdown
925
+ - Switching to different task organization
926
+
927
+ ## Process
928
+
929
+ 1. Full project analysis
930
+ 2. Create backup file
931
+ 3. Show detailed impact
932
+ 4. Require confirmation
933
+ 5. Execute removal
934
+ 6. Generate summary report
935
+
936
+ ## Alternative Suggestions
937
+
938
+ Before clearing all:
939
+ - Export subtasks to file
940
+ - Clear only pending subtasks
941
+ - Clear by task category
942
+ - Archive instead of delete
943
+
944
+ ## Post-Clear Report
945
+
946
+ \`\`\`
947
+ Global Subtask Clear Complete
948
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━
949
+ Removed: 47 subtasks from 12 tasks
950
+ Backup saved: .taskmaster/backup/subtasks-20240115.json
951
+ Parent tasks updated: 12
952
+ Time estimates adjusted: Yes
953
+
954
+ Next steps:
955
+ - Review updated task list
956
+ - Re-expand complex tasks as needed
957
+ - Check project timeline
958
+ \`\`\``,mode:`solo`}),Ie=B(`convert-task-to-subtask`,`Convert Task To Subtask`,`<parent-id> <task-id>`,`Convert an existing task into a subtask.
959
+
960
+ Arguments: $ARGUMENTS
961
+
962
+ Parse parent ID and task ID to convert.
963
+
964
+ ## Task Conversion
965
+
966
+ Converts an existing standalone task into a subtask of another task.
967
+
968
+ ## Argument Parsing
969
+
970
+ - "move task 8 under 5"
971
+ - "make 8 a subtask of 5"
972
+ - "nest 8 in 5"
973
+ - "5 8" → make task 8 a subtask of task 5
974
+
975
+ ## Execution
976
+
977
+ \`\`\`bash
978
+ task-master add-subtask --parent=<parent-id> --task-id=<task-to-convert>
979
+ \`\`\`
980
+
981
+ ## Pre-Conversion Checks
982
+
983
+ 1. **Validation**
984
+ - Both tasks exist and are valid
985
+ - No circular parent relationships
986
+ - Task isn't already a subtask
987
+ - Logical hierarchy makes sense
988
+
989
+ 2. **Impact Analysis**
990
+ - Dependencies that will be affected
991
+ - Tasks that depend on converting task
992
+ - Priority alignment needed
993
+ - Status compatibility
994
+
995
+ ## Conversion Process
996
+
997
+ 1. Change task ID from "8" to "5.1" (next available)
998
+ 2. Update all dependency references
999
+ 3. Inherit parent's context where appropriate
1000
+ 4. Adjust priorities if needed
1001
+ 5. Update time estimates
1002
+
1003
+ ## Smart Features
1004
+
1005
+ - Preserve task history
1006
+ - Maintain dependencies
1007
+ - Update all references
1008
+ - Create conversion log
1009
+
1010
+ ## Example
1011
+
1012
+ \`\`\`
1013
+ /taskmaster:add-subtask/from-task 5 8
1014
+ → Converting: Task #8 becomes subtask #5.1
1015
+ → Updated: 3 dependency references
1016
+ → Parent task #5 now has 1 subtask
1017
+ → Note: Subtask inherits parent's priority
1018
+
1019
+ Before: #8 "Implement validation" (standalone)
1020
+ After: #5.1 "Implement validation" (subtask of #5)
1021
+ \`\`\`
1022
+
1023
+ ## Post-Conversion
1024
+
1025
+ - Show new task hierarchy
1026
+ - List updated dependencies
1027
+ - Verify project integrity
1028
+ - Suggest related conversions`,`solo`),Le=B(`add-dependency`,`Add Dependency`,`<task-id> <depends-on-id>`,`Add a dependency between tasks.
1029
+
1030
+ Arguments: $ARGUMENTS
1031
+
1032
+ Parse the task IDs to establish dependency relationship.
1033
+
1034
+ ## Adding Dependencies
1035
+
1036
+ Creates a dependency where one task must be completed before another can start.
1037
+
1038
+ ## Argument Parsing
1039
+
1040
+ Parse natural language or IDs:
1041
+ - "make 5 depend on 3" → task 5 depends on task 3
1042
+ - "5 needs 3" → task 5 depends on task 3
1043
+ - "5 3" → task 5 depends on task 3
1044
+ - "5 after 3" → task 5 depends on task 3
1045
+
1046
+ ## Execution
1047
+
1048
+ \`\`\`bash
1049
+ task-master add-dependency --id=<task-id> --depends-on=<dependency-id>
1050
+ \`\`\`
1051
+
1052
+ ## Validation
1053
+
1054
+ Before adding:
1055
+ 1. **Verify both tasks exist**
1056
+ 2. **Check for circular dependencies**
1057
+ 3. **Ensure dependency makes logical sense**
1058
+ 4. **Warn if creating complex chains**
1059
+
1060
+ ## Smart Features
1061
+
1062
+ - Detect if dependency already exists
1063
+ - Suggest related dependencies
1064
+ - Show impact on task flow
1065
+ - Update task priorities if needed
1066
+
1067
+ ## Post-Addition
1068
+
1069
+ After adding dependency:
1070
+ 1. Show updated dependency graph
1071
+ 2. Identify any newly blocked tasks
1072
+ 3. Suggest task order changes
1073
+ 4. Update project timeline
1074
+
1075
+ ## Example Flows
1076
+
1077
+ \`\`\`
1078
+ /taskmaster:add-dependency 5 needs 3
1079
+ → Task #5 now depends on Task #3
1080
+ → Task #5 is now blocked until #3 completes
1081
+ → Suggested: Also consider if #5 needs #4
1082
+ \`\`\``,`solo`),Re=B(`remove-dependency`,`Remove Dependency`,`<task-id> <depends-on-id>`,`Remove a dependency between tasks.
1083
+
1084
+ Arguments: $ARGUMENTS
1085
+
1086
+ Parse the task IDs to remove dependency relationship.
1087
+
1088
+ ## Removing Dependencies
1089
+
1090
+ Removes a dependency relationship, potentially unblocking tasks.
1091
+
1092
+ ## Argument Parsing
1093
+
1094
+ Parse natural language or IDs:
1095
+ - "remove dependency between 5 and 3"
1096
+ - "5 no longer needs 3"
1097
+ - "unblock 5 from 3"
1098
+ - "5 3" → remove dependency of 5 on 3
1099
+
1100
+ ## Execution
1101
+
1102
+ \`\`\`bash
1103
+ task-master remove-dependency --id=<task-id> --depends-on=<dependency-id>
1104
+ \`\`\`
1105
+
1106
+ ## Pre-Removal Checks
1107
+
1108
+ 1. **Verify dependency exists**
1109
+ 2. **Check impact on task flow**
1110
+ 3. **Warn if it breaks logical sequence**
1111
+ 4. **Show what will be unblocked**
1112
+
1113
+ ## Smart Analysis
1114
+
1115
+ Before removing:
1116
+ - Show why dependency might have existed
1117
+ - Check if removal makes tasks executable
1118
+ - Verify no critical path disruption
1119
+ - Suggest alternative dependencies
1120
+
1121
+ ## Post-Removal
1122
+
1123
+ After removing:
1124
+ 1. Show updated task status
1125
+ 2. List newly unblocked tasks
1126
+ 3. Update project timeline
1127
+ 4. Suggest next actions
1128
+
1129
+ ## Safety Features
1130
+
1131
+ - Confirm if removing critical dependency
1132
+ - Show tasks that become immediately actionable
1133
+ - Warn about potential issues
1134
+ - Keep removal history
1135
+
1136
+ ## Example
1137
+
1138
+ \`\`\`
1139
+ /taskmaster:remove-dependency 5 from 3
1140
+ → Removed: Task #5 no longer depends on #3
1141
+ → Task #5 is now UNBLOCKED and ready to start
1142
+ → Warning: Consider if #5 still needs #2 completed first
1143
+ \`\`\``,`solo`),ze=z({name:`fix-dependencies`,description:`Fix Dependencies`,content:`Automatically fix dependency issues found during validation.
1144
+
1145
+ ## Automatic Dependency Repair
1146
+
1147
+ Intelligently fixes common dependency problems while preserving project logic.
1148
+
1149
+ ## Execution
1150
+
1151
+ \`\`\`bash
1152
+ task-master fix-dependencies
1153
+ \`\`\`
1154
+
1155
+ ## What Gets Fixed
1156
+
1157
+ ### 1. **Auto-Fixable Issues**
1158
+ - Remove references to deleted tasks
1159
+ - Break simple circular dependencies
1160
+ - Remove self-dependencies
1161
+ - Clean up duplicate dependencies
1162
+
1163
+ ### 2. **Smart Resolutions**
1164
+ - Reorder dependencies to maintain logic
1165
+ - Suggest task merging for over-dependent tasks
1166
+ - Flatten unnecessary dependency chains
1167
+ - Remove redundant transitive dependencies
1168
+
1169
+ ### 3. **Manual Review Required**
1170
+ - Complex circular dependencies
1171
+ - Critical path modifications
1172
+ - Business logic dependencies
1173
+ - High-impact changes
1174
+
1175
+ ## Fix Process
1176
+
1177
+ 1. **Analysis Phase**
1178
+ - Run validation check
1179
+ - Categorize issues by type
1180
+ - Determine fix strategy
1181
+
1182
+ 2. **Execution Phase**
1183
+ - Apply automatic fixes
1184
+ - Log all changes made
1185
+ - Preserve task relationships
1186
+
1187
+ 3. **Verification Phase**
1188
+ - Re-validate after fixes
1189
+ - Show before/after comparison
1190
+ - Highlight manual fixes needed
1191
+
1192
+ ## Smart Features
1193
+
1194
+ - Preserves intended task flow
1195
+ - Minimal disruption approach
1196
+ - Creates fix history/log
1197
+ - Suggests manual interventions
1198
+
1199
+ ## Output Example
1200
+
1201
+ \`\`\`
1202
+ Dependency Auto-Fix Report
1203
+ ━━━━━━━━━━━━━━━━━━━━━━━━
1204
+ Fixed Automatically:
1205
+ āœ… Removed 2 references to deleted tasks
1206
+ āœ… Resolved 1 self-dependency
1207
+ āœ… Cleaned 3 redundant dependencies
1208
+
1209
+ Manual Review Needed:
1210
+ āš ļø Complex circular dependency: #12 → #15 → #18 → #12
1211
+ Suggestion: Make #15 not depend on #12
1212
+ āš ļø Task #45 has 8 dependencies
1213
+ Suggestion: Break into subtasks
1214
+
1215
+ Run '/taskmaster:validate-dependencies' to verify fixes
1216
+ \`\`\`
1217
+
1218
+ ## Safety
1219
+
1220
+ - Preview mode available
1221
+ - Rollback capability
1222
+ - Change logging
1223
+ - No data loss`,mode:`solo`}),Be=z({name:`validate-dependencies`,description:`Validate Dependencies`,content:`Validate all task dependencies for issues.
1224
+
1225
+ ## Dependency Validation
1226
+
1227
+ Comprehensive check for dependency problems across the entire project.
1228
+
1229
+ ## Execution
1230
+
1231
+ \`\`\`bash
1232
+ task-master validate-dependencies
1233
+ \`\`\`
1234
+
1235
+ ## Validation Checks
1236
+
1237
+ 1. **Circular Dependencies**
1238
+ - A depends on B, B depends on A
1239
+ - Complex circular chains
1240
+ - Self-dependencies
1241
+
1242
+ 2. **Missing Dependencies**
1243
+ - References to non-existent tasks
1244
+ - Deleted task references
1245
+ - Invalid task IDs
1246
+
1247
+ 3. **Logical Issues**
1248
+ - Completed tasks depending on pending
1249
+ - Cancelled tasks in dependency chains
1250
+ - Impossible sequences
1251
+
1252
+ 4. **Complexity Warnings**
1253
+ - Over-complex dependency chains
1254
+ - Too many dependencies per task
1255
+ - Bottleneck tasks
1256
+
1257
+ ## Smart Analysis
1258
+
1259
+ The validation provides:
1260
+ - Visual dependency graph
1261
+ - Critical path analysis
1262
+ - Bottleneck identification
1263
+ - Suggested optimizations
1264
+
1265
+ ## Report Format
1266
+
1267
+ \`\`\`
1268
+ Dependency Validation Report
1269
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━
1270
+ āœ… No circular dependencies found
1271
+ āš ļø 2 warnings found:
1272
+ - Task #23 has 7 dependencies (consider breaking down)
1273
+ - Task #45 blocks 5 other tasks (potential bottleneck)
1274
+ āŒ 1 error found:
1275
+ - Task #67 depends on deleted task #66
1276
+
1277
+ Critical Path: #1 → #5 → #23 → #45 → #50 (15 days)
1278
+ \`\`\`
1279
+
1280
+ ## Actionable Output
1281
+
1282
+ For each issue found:
1283
+ - Clear description
1284
+ - Impact assessment
1285
+ - Suggested fix
1286
+ - Command to resolve
1287
+
1288
+ ## Next Steps
1289
+
1290
+ After validation:
1291
+ - Run \`/taskmaster:fix-dependencies\` to auto-fix
1292
+ - Manually adjust problematic dependencies
1293
+ - Rerun to verify fixes`,mode:`solo`}),Ve=z({name:`setup-models`,description:`Setup Models`,content:`Run interactive setup to configure AI models.
1294
+
1295
+ ## Interactive Model Configuration
1296
+
1297
+ Guides you through setting up AI providers for Task Master.
1298
+
1299
+ ## Execution
1300
+
1301
+ \`\`\`bash
1302
+ task-master models --setup
1303
+ \`\`\`
1304
+
1305
+ ## Setup Process
1306
+
1307
+ 1. **Environment Check**
1308
+ - Detect existing API keys
1309
+ - Show current configuration
1310
+ - Identify missing providers
1311
+
1312
+ 2. **Provider Selection**
1313
+ - Choose main provider (required)
1314
+ - Select research provider (recommended)
1315
+ - Configure fallback (optional)
1316
+
1317
+ 3. **API Key Configuration**
1318
+ - Prompt for missing keys
1319
+ - Validate key format
1320
+ - Test connectivity
1321
+ - Save configuration
1322
+
1323
+ ## Smart Recommendations
1324
+
1325
+ Based on your needs:
1326
+ - **For best results**: Claude + Perplexity
1327
+ - **Budget conscious**: GPT-3.5 + Perplexity
1328
+ - **Maximum capability**: GPT-4 + Perplexity + Claude fallback
1329
+
1330
+ ## Configuration Storage
1331
+
1332
+ Keys can be stored in:
1333
+ 1. Environment variables (recommended)
1334
+ 2. \`.env\` file in project
1335
+ 3. Global \`.taskmaster/config\`
1336
+
1337
+ ## Post-Setup
1338
+
1339
+ After configuration:
1340
+ - Test each provider
1341
+ - Show usage examples
1342
+ - Suggest next steps
1343
+ - Verify parse-prd works`,mode:`solo`}),He=z({name:`view-models`,description:`View Models`,content:`View current AI model configuration.
1344
+
1345
+ ## Model Configuration Display
1346
+
1347
+ Shows the currently configured AI providers and models for Task Master.
1348
+
1349
+ ## Execution
1350
+
1351
+ \`\`\`bash
1352
+ task-master models
1353
+ \`\`\`
1354
+
1355
+ ## Information Displayed
1356
+
1357
+ 1. **Main Provider**
1358
+ - Model ID and name
1359
+ - API key status (configured/missing)
1360
+ - Usage: Primary task generation
1361
+
1362
+ 2. **Research Provider**
1363
+ - Model ID and name
1364
+ - API key status
1365
+ - Usage: Enhanced research mode
1366
+
1367
+ 3. **Fallback Provider**
1368
+ - Model ID and name
1369
+ - API key status
1370
+ - Usage: Backup when main fails
1371
+
1372
+ ## Visual Status
1373
+
1374
+ \`\`\`
1375
+ Task Master AI Model Configuration
1376
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1377
+ Main: āœ… claude-3-5-sonnet (configured)
1378
+ Research: āœ… perplexity-sonar (configured)
1379
+ Fallback: āš ļø Not configured (optional)
1380
+
1381
+ Available Models:
1382
+ - claude-3-5-sonnet
1383
+ - gpt-4-turbo
1384
+ - gpt-3.5-turbo
1385
+ - perplexity-sonar
1386
+ \`\`\`
1387
+
1388
+ ## Next Actions
1389
+
1390
+ Based on configuration:
1391
+ - If missing API keys → Suggest setup
1392
+ - If no research model → Explain benefits
1393
+ - If all configured → Show usage tips`,mode:`solo`}),Ue=z({name:`install-taskmaster`,description:`Install TaskMaster`,content:`Check if Task Master is installed and install it if needed.
1394
+
1395
+ This command helps you get Task Master set up globally on your system.
1396
+
1397
+ ## Detection and Installation Process
1398
+
1399
+ 1. **Check Current Installation**
1400
+ \`\`\`bash
1401
+ # Check if task-master command exists
1402
+ which task-master || echo "Task Master not found"
1403
+
1404
+ # Check npm global packages
1405
+ npm list -g task-master-ai
1406
+ \`\`\`
1407
+
1408
+ 2. **System Requirements Check**
1409
+ \`\`\`bash
1410
+ # Verify Node.js is installed
1411
+ node --version
1412
+
1413
+ # Verify npm is installed
1414
+ npm --version
1415
+
1416
+ # Check Node version (need 16+)
1417
+ \`\`\`
1418
+
1419
+ 3. **Install Task Master Globally**
1420
+ If not installed, run:
1421
+ \`\`\`bash
1422
+ npm install -g task-master-ai
1423
+ \`\`\`
1424
+
1425
+ 4. **Verify Installation**
1426
+ \`\`\`bash
1427
+ # Check version
1428
+ task-master --version
1429
+
1430
+ # Verify command is available
1431
+ which task-master
1432
+ \`\`\`
1433
+
1434
+ 5. **Initial Setup**
1435
+ \`\`\`bash
1436
+ # Initialize in current directory
1437
+ task-master init
1438
+ \`\`\`
1439
+
1440
+ 6. **Configure AI Provider**
1441
+ Ensure you have at least one AI provider API key set:
1442
+ \`\`\`bash
1443
+ # Check current configuration
1444
+ task-master models --status
1445
+
1446
+ # If no API keys found, guide setup
1447
+ echo "You'll need at least one API key:"
1448
+ echo "- ANTHROPIC_API_KEY for Claude"
1449
+ echo "- OPENAI_API_KEY for GPT models"
1450
+ echo "- PERPLEXITY_API_KEY for research"
1451
+ echo ""
1452
+ echo "Set them in your shell profile or .env file"
1453
+ \`\`\`
1454
+
1455
+ 7. **Quick Test**
1456
+ \`\`\`bash
1457
+ # Create a test PRD
1458
+ echo "Build a simple hello world API" > test-prd.txt
1459
+
1460
+ # Try parsing it
1461
+ task-master parse-prd test-prd.txt -n 3
1462
+ \`\`\`
1463
+
1464
+ ## Troubleshooting
1465
+
1466
+ If installation fails:
1467
+
1468
+ **Permission Errors:**
1469
+ \`\`\`bash
1470
+ # Try with sudo (macOS/Linux)
1471
+ sudo npm install -g task-master-ai
1472
+
1473
+ # Or fix npm permissions
1474
+ npm config set prefix ~/.npm-global
1475
+ export PATH=~/.npm-global/bin:$PATH
1476
+ \`\`\`
1477
+
1478
+ **Network Issues:**
1479
+ \`\`\`bash
1480
+ # Use different registry
1481
+ npm install -g task-master-ai --registry https://registry.npmjs.org/
1482
+ \`\`\`
1483
+
1484
+ **Node Version Issues:**
1485
+ \`\`\`bash
1486
+ # Install Node 20+ via nvm
1487
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
1488
+ nvm install 20
1489
+ nvm use 20
1490
+ \`\`\`
1491
+
1492
+ ## Success Confirmation
1493
+
1494
+ Once installed, you should see:
1495
+ \`\`\`
1496
+ āœ… Task Master installed
1497
+ āœ… Command 'task-master' available globally
1498
+ āœ… AI provider configured
1499
+ āœ… Ready to use slash commands!
1500
+
1501
+ Try: /taskmaster:init your-prd.md
1502
+ \`\`\`
1503
+
1504
+ ## Next Steps
1505
+
1506
+ After installation:
1507
+ 1. Run \`/taskmaster:status\` to verify setup
1508
+ 2. Configure AI providers with \`/taskmaster:setup-models\`
1509
+ 3. Start using Task Master commands!`,mode:`solo`}),We=z({name:`quick-install-taskmaster`,description:`Quick Install TaskMaster`,content:`Quick install Task Master globally if not already installed.
1510
+
1511
+ Execute this streamlined installation:
1512
+
1513
+ \`\`\`bash
1514
+ # Check and install in one command
1515
+ task-master --version 2>/dev/null || npm install -g task-master-ai
1516
+
1517
+ # Verify installation
1518
+ task-master --version
1519
+
1520
+ # Quick setup check
1521
+ task-master models --status || echo "Note: You'll need to set up an AI provider API key"
1522
+ \`\`\`
1523
+
1524
+ If you see "command not found" after installation, you may need to:
1525
+ 1. Restart your terminal
1526
+ 2. Or add npm global bin to PATH: \`export PATH=$(npm bin -g):$PATH\`
1527
+
1528
+ Once installed, you can use all the Task Master commands!
1529
+
1530
+ Quick test: Run \`/taskmaster:help\` to see all available commands.`,mode:`solo`}),Ge=B(`to-review`,`To Review`,`<task-id>`,`Set a task's status to review.
1531
+
1532
+ Arguments: $ARGUMENTS (task ID)
1533
+
1534
+ ## Marking Task for Review
1535
+
1536
+ This status indicates work is complete but needs verification before final approval.
1537
+
1538
+ ## When to Use Review Status
1539
+
1540
+ - Code complete but needs peer review
1541
+ - Implementation done but needs testing
1542
+ - Documentation written but needs proofreading
1543
+ - Design complete but needs stakeholder approval
1544
+
1545
+ ## Execution
1546
+
1547
+ \`\`\`bash
1548
+ task-master set-status --id=$ARGUMENTS --status=review
1549
+ \`\`\`
1550
+
1551
+ ## Review Preparation
1552
+
1553
+ When setting to review:
1554
+ 1. **Generate Review Checklist**
1555
+ - Link to PR/MR if applicable
1556
+ - Highlight key changes
1557
+ - Note areas needing attention
1558
+ - Include test results
1559
+
1560
+ 2. **Documentation**
1561
+ - Update task with review notes
1562
+ - Link relevant artifacts
1563
+ - Specify reviewers if known
1564
+
1565
+ 3. **Smart Actions**
1566
+ - Create review reminders
1567
+ - Track review duration
1568
+ - Suggest reviewers based on expertise
1569
+ - Prepare rollback plan if needed`,`solo`),Ke=B(`to-deferred`,`To Deferred`,`<task-id>`,`Defer a task for later consideration.
1570
+
1571
+ Arguments: $ARGUMENTS (task ID)
1572
+
1573
+ ## Deferring a Task
1574
+
1575
+ This status indicates a task is valid but not currently actionable or prioritized.
1576
+
1577
+ ## Valid Reasons for Deferral
1578
+
1579
+ - Waiting for external dependencies
1580
+ - Reprioritized for future sprint
1581
+ - Blocked by technical limitations
1582
+ - Resource constraints
1583
+ - Strategic timing considerations
1584
+
1585
+ ## Execution
1586
+
1587
+ \`\`\`bash
1588
+ task-master set-status --id=$ARGUMENTS --status=deferred
1589
+ \`\`\`
1590
+
1591
+ ## Deferral Management
1592
+
1593
+ When deferring:
1594
+ 1. **Document Reason**
1595
+ - Capture why it's being deferred
1596
+ - Set reactivation criteria
1597
+ - Note any partial work completed
1598
+
1599
+ 2. **Impact Analysis**
1600
+ - Check dependent tasks
1601
+ - Update project timeline
1602
+ - Notify affected stakeholders
1603
+
1604
+ 3. **Future Planning**
1605
+ - Set review reminders
1606
+ - Tag for specific milestone
1607
+ - Preserve context for reactivation
1608
+ - Link to blocking issues
1609
+
1610
+ ## Smart Tracking
1611
+
1612
+ - Monitor deferral duration
1613
+ - Alert when criteria met
1614
+ - Prevent scope creep
1615
+ - Regular review cycles`,`solo`),qe=B(`to-cancelled`,`To Cancelled`,`<task-id>`,`Cancel a task permanently.
1616
+
1617
+ Arguments: $ARGUMENTS (task ID)
1618
+
1619
+ ## Cancelling a Task
1620
+
1621
+ This status indicates a task is no longer needed and won't be completed.
1622
+
1623
+ ## Valid Reasons for Cancellation
1624
+
1625
+ - Requirements changed
1626
+ - Feature deprecated
1627
+ - Duplicate of another task
1628
+ - Strategic pivot
1629
+ - Technical approach invalidated
1630
+
1631
+ ## Pre-Cancellation Checks
1632
+
1633
+ 1. Confirm no critical dependencies
1634
+ 2. Check for partial implementation
1635
+ 3. Verify cancellation rationale
1636
+ 4. Document lessons learned
1637
+
1638
+ ## Execution
1639
+
1640
+ \`\`\`bash
1641
+ task-master set-status --id=$ARGUMENTS --status=cancelled
1642
+ \`\`\`
1643
+
1644
+ ## Cancellation Impact
1645
+
1646
+ When cancelling:
1647
+ 1. **Dependency Updates**
1648
+ - Notify dependent tasks
1649
+ - Update project scope
1650
+ - Recalculate timelines
1651
+
1652
+ 2. **Clean-up Actions**
1653
+ - Remove related branches
1654
+ - Archive any work done
1655
+ - Update documentation
1656
+ - Close related issues
1657
+
1658
+ 3. **Learning Capture**
1659
+ - Document why cancelled
1660
+ - Note what was learned
1661
+ - Update estimation models
1662
+ - Prevent future duplicates
1663
+
1664
+ ## Historical Preservation
1665
+
1666
+ - Keep for reference
1667
+ - Tag with cancellation reason
1668
+ - Link to replacement if any
1669
+ - Maintain audit trail`,`solo`),Je=B(`init-project`,`Init Project`,`[prd-file]`,`Initialize a new Task Master project.
1670
+
1671
+ Arguments: $ARGUMENTS
1672
+
1673
+ Parse arguments to determine initialization preferences.
1674
+
1675
+ ## Initialization Process
1676
+
1677
+ 1. **Parse Arguments**
1678
+ - PRD file path (if provided)
1679
+ - Project name
1680
+ - Auto-confirm flag (-y)
1681
+
1682
+ 2. **Project Setup**
1683
+ \`\`\`bash
1684
+ task-master init
1685
+ \`\`\`
1686
+
1687
+ 3. **Smart Initialization**
1688
+ - Detect existing project files
1689
+ - Suggest project name from directory
1690
+ - Check for git repository
1691
+ - Verify AI provider configuration
1692
+
1693
+ ## Configuration Options
1694
+
1695
+ Based on arguments:
1696
+ - \`quick\` / \`-y\` → Skip confirmations
1697
+ - \`<file.md>\` → Use as PRD after init
1698
+ - \`--name=<name>\` → Set project name
1699
+ - \`--description=<desc>\` → Set description
1700
+
1701
+ ## Post-Initialization
1702
+
1703
+ After successful init:
1704
+ 1. Show project structure created
1705
+ 2. Verify AI models configured
1706
+ 3. Suggest next steps:
1707
+ - Parse PRD if available
1708
+ - Configure AI providers
1709
+ - Set up git hooks
1710
+ - Create first tasks
1711
+
1712
+ ## Integration
1713
+
1714
+ If PRD file provided:
1715
+ \`\`\`
1716
+ /taskmaster:init my-prd.md
1717
+ → Automatically runs parse-prd after init
1718
+ \`\`\``,`solo`),Ye=B(`init-project-quick`,`Init Project Quick`,`[prd-file]`,`Quick initialization with auto-confirmation.
1719
+
1720
+ Arguments: $ARGUMENTS
1721
+
1722
+ Initialize a Task Master project without prompts, accepting all defaults.
1723
+
1724
+ ## Quick Setup
1725
+
1726
+ \`\`\`bash
1727
+ task-master init -y
1728
+ \`\`\`
1729
+
1730
+ ## What It Does
1731
+
1732
+ 1. Creates \`.taskmaster/\` directory structure
1733
+ 2. Initializes empty \`tasks.json\`
1734
+ 3. Sets up default configuration
1735
+ 4. Uses directory name as project name
1736
+ 5. Skips all confirmation prompts
1737
+
1738
+ ## Smart Defaults
1739
+
1740
+ - Project name: Current directory name
1741
+ - Description: "Task Master Project"
1742
+ - Model config: Existing environment vars
1743
+ - Task structure: Standard format
1744
+
1745
+ ## Next Steps
1746
+
1747
+ After quick init:
1748
+ 1. Configure AI models if needed:
1749
+ \`\`\`
1750
+ /taskmaster:models/setup
1751
+ \`\`\`
1752
+
1753
+ 2. Parse PRD if available:
1754
+ \`\`\`
1755
+ /taskmaster:parse-prd <file>
1756
+ \`\`\`
1757
+
1758
+ 3. Or create first task:
1759
+ \`\`\`
1760
+ /taskmaster:add-task create initial setup
1761
+ \`\`\`
1762
+
1763
+ Perfect for rapid project setup!`,`solo`);z({name:`generate-tasks`,description:`Generate Task Files`,content:`Generate individual task files from tasks.json.
1764
+
1765
+ ## Task File Generation
1766
+
1767
+ Creates separate markdown files for each task, perfect for AI agents or documentation.
1768
+
1769
+ ## Execution
1770
+
1771
+ \`\`\`bash
1772
+ task-master generate
1773
+ \`\`\`
1774
+
1775
+ ## What It Creates
1776
+
1777
+ For each task, generates a file like \`task_001.md\`:
1778
+
1779
+ \`\`\`
1780
+ Task ID: 1
1781
+ Title: Implement user authentication
1782
+ Status: pending
1783
+ Priority: high
1784
+ Dependencies: []
1785
+ Created: 2024-01-15
1786
+ Complexity: 7
1787
+
1788
+ ## Description
1789
+ Create a secure user authentication system with login, logout, and session management.
1790
+
1791
+ ## Details
1792
+ - Use JWT tokens for session management
1793
+ - Implement secure password hashing
1794
+ - Add remember me functionality
1795
+ - Include password reset flow
1796
+
1797
+ ## Test Strategy
1798
+ - Unit tests for auth functions
1799
+ - Integration tests for login flow
1800
+ - Security testing for vulnerabilities
1801
+ - Performance tests for concurrent logins
1802
+
1803
+ ## Subtasks
1804
+ 1.1 Setup authentication framework (pending)
1805
+ 1.2 Create login endpoints (pending)
1806
+ 1.3 Implement session management (pending)
1807
+ 1.4 Add password reset (pending)
1808
+ \`\`\`
1809
+
1810
+ ## File Organization
1811
+
1812
+ Creates structure:
1813
+ \`\`\`
1814
+ .taskmaster/
1815
+ └── tasks/
1816
+ ā”œā”€ā”€ task_001.md
1817
+ ā”œā”€ā”€ task_002.md
1818
+ ā”œā”€ā”€ task_003.md
1819
+ └── ...
1820
+ \`\`\`
1821
+
1822
+ ## Smart Features
1823
+
1824
+ 1. **Consistent Formatting**
1825
+ - Standardized structure
1826
+ - Clear sections
1827
+ - AI-readable format
1828
+ - Markdown compatible
1829
+
1830
+ 2. **Contextual Information**
1831
+ - Full task details
1832
+ - Related task references
1833
+ - Progress indicators
1834
+ - Implementation notes
1835
+
1836
+ 3. **Incremental Updates**
1837
+ - Only regenerate changed tasks
1838
+ - Preserve custom additions
1839
+ - Track generation timestamp
1840
+ - Version control friendly
1841
+
1842
+ ## Use Cases
1843
+
1844
+ - **AI Context**: Provide task context to AI assistants
1845
+ - **Documentation**: Standalone task documentation
1846
+ - **Archival**: Task history preservation
1847
+ - **Sharing**: Send specific tasks to team members
1848
+ - **Review**: Easier task review process
1849
+
1850
+ ## Post-Generation
1851
+
1852
+ \`\`\`
1853
+ Task File Generation Complete
1854
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━
1855
+ Generated: 45 task files
1856
+ Location: .taskmaster/tasks/
1857
+ Total size: 156 KB
1858
+
1859
+ New files: 5
1860
+ Updated files: 12
1861
+ Unchanged: 28
1862
+
1863
+ Ready for:
1864
+ - AI agent consumption
1865
+ - Version control
1866
+ - Team distribution
1867
+ \`\`\`
1868
+
1869
+ ## Integration Benefits
1870
+
1871
+ - Git-trackable task history
1872
+ - Easy task sharing
1873
+ - AI tool compatibility
1874
+ - Offline task access
1875
+ - Backup redundancy`,mode:`solo`});const V=[we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,z({name:`goham`,description:`Start Working with Hamster Brief`,argumentHint:`[brief-url]`,mode:`team`,content:`# Start Working with Hamster Brief
1876
+
1877
+ End-to-end workflow for working on tasks from a connected Hamster brief. All tasks from the brief are worked on in a single branch, with one PR created at the end.
1878
+
1879
+ ## Step 1: Verify Connection & Authentication
1880
+
1881
+ \`\`\`bash
1882
+ # Check current context and authentication status
1883
+ tm context
1884
+ \`\`\`
1885
+
1886
+ If not connected or authentication fails:
1887
+ - Get brief URL from user if not available
1888
+ - Connect: \`tm context <brief url>\`
1889
+ - Refresh token if needed: \`tm auth refresh\`
1890
+
1891
+ ## Step 2: List Available Tasks
1892
+
1893
+ \`\`\`bash
1894
+ # View all tasks from the brief
1895
+ tm list
1896
+ \`\`\`
1897
+
1898
+ Review the task list to understand what needs to be done. Note the total number of tasks.
1899
+
1900
+ ## Step 3: Initialize Git Branch for Brief
1901
+
1902
+ \`\`\`bash
1903
+ # Ensure you're on dev branch and pull latest
1904
+ git checkout dev
1905
+ git pull origin dev
1906
+
1907
+ # Create a single branch for the entire brief (e.g., hamster-brief-YYYY-MM-DD or brief-specific name)
1908
+ git checkout -b hamster-brief
1909
+
1910
+ # Verify branch creation
1911
+ git branch
1912
+ \`\`\`
1913
+
1914
+ **Note**: This branch will be used for ALL tasks in the brief. Do not create separate branches per task.
1915
+
1916
+ ## Step 4: Task Loop (Repeat for Each Task)
1917
+
1918
+ Work through all tasks sequentially in the same branch:
1919
+
1920
+ ### 4.1: Read Task Details
1921
+
1922
+ \`\`\`bash
1923
+ # Get detailed information about the task
1924
+ tm show 1
1925
+
1926
+ # If task has subtasks, examine them all
1927
+ tm show 1,1.1,1.2,1.3 # Adjust IDs as needed
1928
+ \`\`\`
1929
+
1930
+ ### 4.2: Log Initial Context
1931
+
1932
+ \`\`\`bash
1933
+ # Document task understanding and initial findings
1934
+ tm update-task -i 1 --append --prompt="Starting task implementation.
1935
+
1936
+ Initial context:
1937
+ - Task requirements: [summarize key requirements]
1938
+ - Dependencies identified: [list any dependencies]
1939
+ - Files that may need modification: [list relevant files]
1940
+ - Approach planned: [brief implementation approach]"
1941
+ \`\`\`
1942
+
1943
+ ### 4.3: Mark Task as In-Progress
1944
+
1945
+ \`\`\`bash
1946
+ # Mark task and first subtask (if exists) as in-progress
1947
+ tm set-status -i 1,1.1 -s in-progress
1948
+ \`\`\`
1949
+
1950
+ ### 4.4: Subtask Implementation Loop
1951
+
1952
+ For each subtask (1.1, 1.2, 1.3, etc.):
1953
+
1954
+ #### 4.4.1: Read Subtask Details
1955
+ \`\`\`bash
1956
+ tm show 1.1 # Replace with current subtask ID
1957
+ \`\`\`
1958
+
1959
+ #### 4.4.2: Log Research & Context Gathering
1960
+ \`\`\`bash
1961
+ # Document findings during implementation
1962
+ tm update-task -i 1 --append --prompt="Subtask 1.1 - Context gathered:
1963
+
1964
+ - Code exploration findings: [what you discovered]
1965
+ - Implementation approach: [how you plan to implement]
1966
+ - Key decisions made: [important choices]
1967
+ - Challenges encountered: [any blockers or issues]"
1968
+ \`\`\`
1969
+
1970
+ #### 4.4.3: Implement Subtask
1971
+ - Write code following the subtask requirements
1972
+ - Make necessary changes to files
1973
+
1974
+ #### 4.4.4: Quality Verification
1975
+ \`\`\`bash
1976
+ # Run linting
1977
+ pnpm lint
1978
+
1979
+ # Run type checking
1980
+ pnpm typecheck
1981
+
1982
+ # If either fails, fix issues and re-run until both pass
1983
+ \`\`\`
1984
+
1985
+ #### 4.4.5: CodeRabbit Review
1986
+ \`\`\`bash
1987
+ # Generate code review (wait for plain text results)
1988
+ coderabbit --prompt-only
1989
+
1990
+ # Review the output and address any critical issues if needed
1991
+ \`\`\`
1992
+
1993
+ #### 4.4.6: Log Implementation Completion
1994
+ \`\`\`bash
1995
+ # Document what was completed
1996
+ tm update-task -i 1 --append --prompt="Subtask 1.1 - Implementation complete:
1997
+
1998
+ - Files modified: [list files changed]
1999
+ - Key changes: [summary of implementation]
2000
+ - CodeRabbit feedback addressed: [if any issues were fixed]
2001
+ - Ready for commit"
2002
+ \`\`\`
2003
+
2004
+ #### 4.4.7: Commit Subtask Work
2005
+ \`\`\`bash
2006
+ # Stage changes
2007
+ git add .
2008
+
2009
+ # Commit with detailed message following git_workflow.mdc format
2010
+ git commit -m "feat(task-1): Complete subtask 1.1 - [Subtask Title]
2011
+
2012
+ - Implementation details
2013
+ - Key changes made
2014
+ - Files modified: [list files]
2015
+ - CodeRabbit review completed
2016
+
2017
+ Subtask 1.1: [Brief description of what was accomplished]
2018
+ Relates to Task 1: [Main task title]"
2019
+ \`\`\`
2020
+
2021
+ #### 4.4.8: Mark Subtask as Done
2022
+ \`\`\`bash
2023
+ tm set-status -i 1.1 -s done
2024
+ \`\`\`
2025
+
2026
+ #### 4.4.9: Move to Next Subtask
2027
+ Repeat steps 4.4.1 through 4.4.8 for the next subtask (1.2, 1.3, etc.)
2028
+
2029
+ ### 4.5: Complete Parent Task
2030
+
2031
+ After all subtasks are complete:
2032
+
2033
+ #### 4.5.1: Final Quality Checks
2034
+ \`\`\`bash
2035
+ # Final linting
2036
+ pnpm lint
2037
+
2038
+ # Final type checking
2039
+ pnpm typecheck
2040
+
2041
+ # Final CodeRabbit review
2042
+ coderabbit --prompt-only
2043
+
2044
+ # Address any remaining issues if critical
2045
+ \`\`\`
2046
+
2047
+ #### 4.5.2: Log Task Completion
2048
+ \`\`\`bash
2049
+ # Document final task completion
2050
+ tm update-task -i 1 --append --prompt="Task 1 - Complete:
2051
+
2052
+ - All subtasks completed: [list all subtasks]
2053
+ - Final verification passed: lint, typecheck, CodeRabbit review
2054
+ - Files changed: [comprehensive list]
2055
+ - Committed to brief branch"
2056
+ \`\`\`
2057
+
2058
+ #### 4.5.3: Mark Parent Task as Done
2059
+ \`\`\`bash
2060
+ tm set-status -i 1 -s done
2061
+ \`\`\`
2062
+
2063
+ **Note**: Do NOT push or create PR yet. Continue to next task in the same branch.
2064
+
2065
+ ### 4.6: Move to Next Task
2066
+
2067
+ \`\`\`bash
2068
+ # Verify remaining tasks
2069
+ tm list
2070
+
2071
+ # Continue with next task (e.g., Task 2)
2072
+ # Repeat steps 4.1 through 4.5 for Task 2, then Task 3, etc.
2073
+ \`\`\`
2074
+
2075
+ ## Step 5: Complete All Tasks
2076
+
2077
+ Continue working through all tasks (Steps 4.1-4.6) until all tasks in the brief are complete. All work is committed to the same \`hamster-brief\` branch.
2078
+
2079
+ ## Step 6: Final Verification & PR Creation
2080
+
2081
+ After ALL tasks are complete:
2082
+
2083
+ ### 6.1: Verify All Tasks Complete
2084
+ \`\`\`bash
2085
+ # Verify all tasks are done
2086
+ tm list
2087
+
2088
+ # Should show all tasks with status 'done'
2089
+ \`\`\`
2090
+
2091
+ ### 6.2: Final Quality Checks
2092
+ \`\`\`bash
2093
+ # Final comprehensive checks
2094
+ pnpm lint
2095
+ pnpm typecheck
2096
+ coderabbit --prompt-only
2097
+
2098
+ # Address any remaining issues if critical
2099
+ \`\`\`
2100
+
2101
+ ### 6.3: Push Branch
2102
+ \`\`\`bash
2103
+ # Push the brief branch to remote
2104
+ git push origin hamster-brief
2105
+ \`\`\`
2106
+
2107
+ ### 6.4: Create Pull Request to Dev
2108
+ \`\`\`bash
2109
+ # Get all task titles (adjust task IDs as needed)
2110
+ # Create comprehensive PR description
2111
+
2112
+ gh pr create \\
2113
+ --base dev \\
2114
+ --title "Hamster Brief: Complete Implementation" \\
2115
+ --body "## Brief Overview
2116
+ Completed all tasks from Hamster brief.
2117
+
2118
+ ## Tasks Completed
2119
+ - [x] Task 1: [Task 1 title]
2120
+ - Subtasks: 1.1, 1.2, 1.3
2121
+ - [x] Task 2: [Task 2 title]
2122
+ - Subtasks: 2.1, 2.2
2123
+ - [x] Task 3: [Task 3 title]
2124
+ - [Continue listing all tasks]
2125
+
2126
+ ## Implementation Summary
2127
+ - Total tasks: [number]
2128
+ - Total subtasks: [number]
2129
+ - Files modified: [comprehensive list]
2130
+ - All quality checks passed
2131
+
2132
+ ## Quality Checks
2133
+ - Linting passed (pnpm lint)
2134
+ - Type checking passed (pnpm typecheck)
2135
+ - CodeRabbit review completed for all changes
2136
+
2137
+ ## Testing
2138
+ - [ ] Manual testing completed
2139
+ - [ ] All checks passing
2140
+
2141
+ Complete implementation of Hamster brief tasks"
2142
+ \`\`\`
2143
+
2144
+ ## Step 7: Cleanup
2145
+
2146
+ \`\`\`bash
2147
+ # After PR is merged, switch back to dev
2148
+ git checkout dev
2149
+ git pull origin dev
2150
+
2151
+ # Delete local branch (optional)
2152
+ git branch -d hamster-brief
2153
+ \`\`\`
2154
+
2155
+ ## Important Notes
2156
+
2157
+ - **Use ONLY**: \`tm list\`, \`tm show <id>\`, \`tm set-status\`, \`tm update-task\`, \`tm auth refresh\`, \`tm context <brief url>\`
2158
+ - **DON'T use MCP tools** - not compatible with Hamster integration
2159
+ - **Single branch per brief**: All tasks work in the same branch (\`hamster-brief\`)
2160
+ - **Single PR per brief**: One PR created after all tasks are complete
2161
+ - **Always target dev branch** - never main branch
2162
+ - **Regular logging**: Use \`tm update-task -i <id> --append\` frequently to document:
2163
+ - Context gathered during exploration
2164
+ - Implementation decisions made
2165
+ - Challenges encountered
2166
+ - Completion status
2167
+ - **Quality gates**: Never skip lint, typecheck, or CodeRabbit review
2168
+ - **Commit format**: Follow git_workflow.mdc commit message standards
2169
+ - **PR format**: Always use \`--base dev\` when creating PRs
2170
+
2171
+ ## Workflow Summary
2172
+
2173
+ \`\`\`
2174
+ 1. Verify connection -> tm context
2175
+ 2. List tasks -> tm list
2176
+ 3. Create single branch -> git checkout -b hamster-brief
2177
+ 4. For each task (in same branch):
2178
+ a. Read task -> tm show X
2179
+ b. Log context -> tm update-task -i X --append
2180
+ c. Mark in-progress -> tm set-status -i X,X.Y -s in-progress
2181
+ d. For each subtask:
2182
+ - Read -> tm show X.Y
2183
+ - Log context -> tm update-task -i X --append
2184
+ - Implement code
2185
+ - Verify -> pnpm lint && pnpm typecheck
2186
+ - Review -> coderabbit --prompt-only
2187
+ - Log completion -> tm update-task -i X --append
2188
+ - Commit -> git commit (following git_workflow.mdc format)
2189
+ - Mark done -> tm set-status -i X.Y -s done
2190
+ e. Final checks -> pnpm lint && pnpm typecheck && coderabbit --prompt-only
2191
+ f. Log completion -> tm update-task -i X --append
2192
+ g. Mark task done -> tm set-status -i X -s done
2193
+ h. Continue to next task (same branch)
2194
+ 5. After ALL tasks complete:
2195
+ a. Final verification -> pnpm lint && pnpm typecheck && coderabbit --prompt-only
2196
+ b. Push branch -> git push origin hamster-brief
2197
+ c. Create PR -> gh pr create --base dev
2198
+ \`\`\`
2199
+ `}),B(`show-task`,`Show Task`,`<task-id>`,`Show detailed task information with rich context and insights.
2200
+
2201
+ Arguments: $ARGUMENTS
2202
+
2203
+ ## Enhanced Task Display
2204
+
2205
+ Parse arguments to determine what to show and how.
2206
+
2207
+ ### 1. **Smart Task Selection**
2208
+
2209
+ Based on $ARGUMENTS:
2210
+ - Number → Show specific task with full context
2211
+ - "current" → Show active in-progress task(s)
2212
+ - "next" → Show recommended next task
2213
+ - "blocked" → Show all blocked tasks with reasons
2214
+ - "critical" → Show critical path tasks
2215
+ - Multiple IDs → Comparative view
2216
+
2217
+ ### 2. **Contextual Information**
2218
+
2219
+ For each task, intelligently include:
2220
+
2221
+ **Core Details**
2222
+ - Full task information (id, title, description, details)
2223
+ - Current status with history
2224
+ - Test strategy and acceptance criteria
2225
+ - Priority and complexity analysis
2226
+
2227
+ **Relationships**
2228
+ - Dependencies (what it needs)
2229
+ - Dependents (what needs it)
2230
+ - Parent/subtask hierarchy
2231
+ - Related tasks (similar work)
2232
+
2233
+ **Time Intelligence**
2234
+ - Created/updated timestamps
2235
+ - Time in current status
2236
+ - Estimated vs actual time
2237
+ - Historical completion patterns
2238
+
2239
+ ### 3. **Visual Enhancements**
2240
+
2241
+ \`\`\`
2242
+ šŸ“‹ Task #45: Implement User Authentication
2243
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2244
+ Status: 🟔 in-progress (2 hours)
2245
+ Priority: šŸ”“ High | Complexity: 73/100
2246
+
2247
+ Dependencies: āœ… #41, āœ… #42, ā³ #43 (blocked)
2248
+ Blocks: #46, #47, #52
2249
+
2250
+ Progress: ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘ 80% complete
2251
+
2252
+ Recent Activity:
2253
+ - 2h ago: Status changed to in-progress
2254
+ - 4h ago: Dependency #42 completed
2255
+ - Yesterday: Task expanded with 3 subtasks
2256
+ \`\`\`
2257
+
2258
+ ### 4. **Intelligent Insights**
2259
+
2260
+ Based on task analysis:
2261
+ - **Risk Assessment**: Complexity vs time remaining
2262
+ - **Bottleneck Analysis**: Is this blocking critical work?
2263
+ - **Recommendation**: Suggested approach or concerns
2264
+ - **Similar Tasks**: How others completed similar work
2265
+
2266
+ ### 5. **Action Suggestions**
2267
+
2268
+ Context-aware next steps:
2269
+ - If blocked → Show how to unblock
2270
+ - If complex → Suggest expansion
2271
+ - If in-progress → Show completion checklist
2272
+ - If done → Show dependent tasks ready to start
2273
+
2274
+ ### 6. **Multi-Task View**
2275
+
2276
+ When showing multiple tasks:
2277
+ - Common dependencies
2278
+ - Optimal completion order
2279
+ - Parallel work opportunities
2280
+ - Combined complexity analysis`),B(`list-tasks`,`List Tasks`,`[filters]`,`List tasks with intelligent argument parsing.
2281
+
2282
+ Parse arguments to determine filters and display options:
2283
+ - Status: pending, in-progress, done, review, deferred, cancelled
2284
+ - Priority: high, medium, low (or priority:high)
2285
+ - Special: subtasks, tree, dependencies, blocked
2286
+ - IDs: Direct numbers (e.g., "1,3,5" or "1-5")
2287
+ - Complex: "pending high" = pending AND high priority
2288
+
2289
+ Arguments: $ARGUMENTS
2290
+
2291
+ Let me parse your request intelligently:
2292
+
2293
+ 1. **Detect Filter Intent**
2294
+ - If arguments contain status keywords → filter by status
2295
+ - If arguments contain priority → filter by priority
2296
+ - If arguments contain "subtasks" → include subtasks
2297
+ - If arguments contain "tree" → hierarchical view
2298
+ - If arguments contain numbers → show specific tasks
2299
+ - If arguments contain "blocked" → show blocked tasks only
2300
+
2301
+ 2. **Smart Combinations**
2302
+ Examples of what I understand:
2303
+ - "pending high" → pending tasks with high priority
2304
+ - "done today" → tasks completed today
2305
+ - "blocked" → tasks with unmet dependencies
2306
+ - "1-5" → tasks 1 through 5
2307
+ - "subtasks tree" → hierarchical view with subtasks
2308
+
2309
+ 3. **Execute Appropriate Query**
2310
+ Based on parsed intent, run the most specific task-master command
2311
+
2312
+ 4. **Enhanced Display**
2313
+ - Group by relevant criteria
2314
+ - Show most important information first
2315
+ - Use visual indicators for quick scanning
2316
+ - Include relevant metrics
2317
+
2318
+ 5. **Intelligent Suggestions**
2319
+ Based on what you're viewing, suggest next actions:
2320
+ - Many pending? → Suggest priority order
2321
+ - Many blocked? → Show dependency resolution
2322
+ - Looking at specific tasks? → Show related tasks`),z({name:`list-tasks-with-subtasks`,description:`List Tasks With Subtasks`,content:`List all tasks including their subtasks in a hierarchical view.
2323
+
2324
+ This command shows all tasks with their nested subtasks, providing a complete project overview.
2325
+
2326
+ ## Execution
2327
+
2328
+ Run the Task Master list command with subtasks flag:
2329
+ \`\`\`bash
2330
+ task-master list --with-subtasks
2331
+ \`\`\`
2332
+
2333
+ ## Enhanced Display
2334
+
2335
+ I'll organize the output to show:
2336
+ - Parent tasks with clear indicators
2337
+ - Nested subtasks with proper indentation
2338
+ - Status badges for quick scanning
2339
+ - Dependencies and blockers highlighted
2340
+ - Progress indicators for tasks with subtasks
2341
+
2342
+ ## Smart Filtering
2343
+
2344
+ Based on the task hierarchy:
2345
+ - Show completion percentage for parent tasks
2346
+ - Highlight blocked subtask chains
2347
+ - Group by functional areas
2348
+ - Indicate critical path items
2349
+
2350
+ This gives you a complete tree view of your project structure.`}),B(`list-tasks-by-status`,`List Tasks By Status`,`<status>`,`List tasks filtered by a specific status.
2351
+
2352
+ Arguments: $ARGUMENTS
2353
+
2354
+ Parse the status from arguments and list only tasks matching that status.
2355
+
2356
+ ## Status Options
2357
+ - \`pending\` - Not yet started
2358
+ - \`in-progress\` - Currently being worked on
2359
+ - \`done\` - Completed
2360
+ - \`review\` - Awaiting review
2361
+ - \`deferred\` - Postponed
2362
+ - \`cancelled\` - Cancelled
2363
+
2364
+ ## Execution
2365
+
2366
+ Based on $ARGUMENTS, run:
2367
+ \`\`\`bash
2368
+ task-master list --status=$ARGUMENTS
2369
+ \`\`\`
2370
+
2371
+ ## Enhanced Display
2372
+
2373
+ For the filtered results:
2374
+ - Group by priority within the status
2375
+ - Show time in current status
2376
+ - Highlight tasks approaching deadlines
2377
+ - Display blockers and dependencies
2378
+ - Suggest next actions for each status group
2379
+
2380
+ ## Intelligent Insights
2381
+
2382
+ Based on the status filter:
2383
+ - **Pending**: Show recommended start order
2384
+ - **In-Progress**: Display idle time warnings
2385
+ - **Done**: Show newly unblocked tasks
2386
+ - **Review**: Indicate review duration
2387
+ - **Deferred**: Show reactivation criteria
2388
+ - **Cancelled**: Display impact analysis`),B(`project-status`,`Project Status`,`[focus-area]`,`Enhanced status command with comprehensive project insights.
2389
+
2390
+ Arguments: $ARGUMENTS
2391
+
2392
+ ## Intelligent Status Overview
2393
+
2394
+ ### 1. **Executive Summary**
2395
+ Quick dashboard view:
2396
+ - šŸƒ Active work (in-progress tasks)
2397
+ - šŸ“Š Progress metrics (% complete, velocity)
2398
+ - 🚧 Blockers and risks
2399
+ - ā±ļø Time analysis (estimated vs actual)
2400
+ - šŸŽÆ Sprint/milestone progress
2401
+
2402
+ ### 2. **Contextual Analysis**
2403
+
2404
+ Based on $ARGUMENTS, focus on:
2405
+ - "sprint" → Current sprint progress and burndown
2406
+ - "blocked" → Dependency chains and resolution paths
2407
+ - "team" → Task distribution and workload
2408
+ - "timeline" → Schedule adherence and projections
2409
+ - "risk" → High complexity or overdue items
2410
+
2411
+ ### 3. **Smart Insights**
2412
+
2413
+ **Workflow Health:**
2414
+ - Idle tasks (in-progress > 24h without updates)
2415
+ - Bottlenecks (multiple tasks waiting on same dependency)
2416
+ - Quick wins (low complexity, high impact)
2417
+
2418
+ **Predictive Analytics:**
2419
+ - Completion projections based on velocity
2420
+ - Risk of missing deadlines
2421
+ - Recommended task order for optimal flow
2422
+
2423
+ ### 4. **Visual Intelligence**
2424
+
2425
+ Dynamic visualization based on data:
2426
+ \`\`\`
2427
+ Sprint Progress: ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘ 80% (16/20 tasks)
2428
+ Velocity Trend: ā†—ļø +15% this week
2429
+ Blocked Tasks: šŸ”“ 3 critical path items
2430
+
2431
+ Priority Distribution:
2432
+ High: ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ 8 tasks (2 blocked)
2433
+ Medium: ā–ˆā–ˆā–ˆā–ˆā–‘ā–‘ā–‘ā–‘ 4 tasks
2434
+ Low: ā–ˆā–ˆā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ 2 tasks
2435
+ \`\`\`
2436
+
2437
+ ### 5. **Actionable Recommendations**
2438
+
2439
+ Based on analysis:
2440
+ 1. **Immediate actions** (unblock critical path)
2441
+ 2. **Today's focus** (optimal task sequence)
2442
+ 3. **Process improvements** (recurring patterns)
2443
+ 4. **Resource needs** (skills, time, dependencies)
2444
+
2445
+ ### 6. **Historical Context**
2446
+
2447
+ Compare to previous periods:
2448
+ - Velocity changes
2449
+ - Pattern recognition
2450
+ - Improvement areas
2451
+ - Success patterns to repeat`),B(`next-task`,`Next Task`,`[preference]`,`Intelligently determine and prepare the next action based on comprehensive context.
2452
+
2453
+ This enhanced version of 'next' considers:
2454
+ - Current task states
2455
+ - Recent activity
2456
+ - Time constraints
2457
+ - Dependencies
2458
+ - Your working patterns
2459
+
2460
+ Arguments: $ARGUMENTS
2461
+
2462
+ ## Intelligent Next Action
2463
+
2464
+ ### 1. **Context Gathering**
2465
+ Let me analyze the current situation:
2466
+ - Active tasks (in-progress)
2467
+ - Recently completed tasks
2468
+ - Blocked tasks
2469
+ - Time since last activity
2470
+ - Arguments provided: $ARGUMENTS
2471
+
2472
+ ### 2. **Smart Decision Tree**
2473
+
2474
+ **If you have an in-progress task:**
2475
+ - Has it been idle > 2 hours? → Suggest resuming or switching
2476
+ - Near completion? → Show remaining steps
2477
+ - Blocked? → Find alternative task
2478
+
2479
+ **If no in-progress tasks:**
2480
+ - Unblocked high-priority tasks? → Start highest
2481
+ - Complex tasks need breakdown? → Suggest expansion
2482
+ - All tasks blocked? → Show dependency resolution
2483
+
2484
+ **Special arguments handling:**
2485
+ - "quick" → Find task < 2 hours
2486
+ - "easy" → Find low complexity task
2487
+ - "important" → Find high priority regardless of complexity
2488
+ - "continue" → Resume last worked task
2489
+
2490
+ ### 3. **Preparation Workflow**
2491
+
2492
+ Based on selected task:
2493
+ 1. Show full context and history
2494
+ 2. Set up development environment
2495
+ 3. Run relevant tests
2496
+ 4. Open related files
2497
+ 5. Show similar completed tasks
2498
+ 6. Estimate completion time
2499
+
2500
+ ### 4. **Alternative Suggestions**
2501
+
2502
+ Always provide options:
2503
+ - Primary recommendation
2504
+ - Quick alternative (< 1 hour)
2505
+ - Strategic option (unblocks most tasks)
2506
+ - Learning option (new technology/skill)
2507
+
2508
+ ### 5. **Workflow Integration**
2509
+
2510
+ Seamlessly connect to:
2511
+ - \`/project:task-master:start [selected]\`
2512
+ - \`/project:workflows:auto-implement\`
2513
+ - \`/project:task-master:expand\` (if complex)
2514
+ - \`/project:utils:complexity-report\` (if unsure)
2515
+
2516
+ The goal: Zero friction from decision to implementation.`),B(`help`,`Help`,`[command-name]`,"Show help for Task Master AI commands.\n\nArguments: $ARGUMENTS\n\nDisplay help for Task Master commands and available options.\n\n## Task Master AI Command Help\n\n### Quick Navigation\n\nType `/taskmaster:` and use tab completion to explore all commands.\n\n### Command Categories\n\n#### šŸš€ Setup & Installation\n- `/taskmaster:install-taskmaster` - Comprehensive installation guide\n- `/taskmaster:quick-install-taskmaster` - One-line global install\n\n#### šŸ“‹ Project Setup\n- `/taskmaster:init-project` - Initialize new project\n- `/taskmaster:init-project-quick` - Quick setup with auto-confirm\n- `/taskmaster:view-models` - View AI configuration\n- `/taskmaster:setup-models` - Configure AI providers\n\n#### šŸŽÆ Task Generation\n- `/taskmaster:parse-prd` - Generate tasks from PRD\n- `/taskmaster:parse-prd-with-research` - Enhanced parsing\n- `/taskmaster:generate-tasks` - Create task files\n\n#### šŸ“ Task Management\n- `/taskmaster:list-tasks` - List all tasks\n- `/taskmaster:list-tasks-by-status` - List tasks filtered by status\n- `/taskmaster:list-tasks-with-subtasks` - List tasks with subtasks\n- `/taskmaster:show-task` - Display task details\n- `/taskmaster:add-task` - Create new task\n- `/taskmaster:update-task` - Update single task\n- `/taskmaster:update-tasks-from-id` - Update multiple tasks\n- `/taskmaster:next-task` - Get next task recommendation\n\n#### šŸ”„ Status Management\n- `/taskmaster:to-pending` - Set task to pending\n- `/taskmaster:to-in-progress` - Set task to in-progress\n- `/taskmaster:to-done` - Set task to done\n- `/taskmaster:to-review` - Set task to review\n- `/taskmaster:to-deferred` - Set task to deferred\n- `/taskmaster:to-cancelled` - Set task to cancelled\n\n#### šŸ” Analysis & Breakdown\n- `/taskmaster:analyze-complexity` - Analyze task complexity\n- `/taskmaster:complexity-report` - View complexity report\n- `/taskmaster:expand-task` - Break down complex task\n- `/taskmaster:expand-all-tasks` - Expand all eligible tasks\n\n#### šŸ”— Dependencies\n- `/taskmaster:add-dependency` - Add task dependency\n- `/taskmaster:remove-dependency` - Remove dependency\n- `/taskmaster:validate-dependencies` - Check for issues\n- `/taskmaster:fix-dependencies` - Auto-fix dependency issues\n\n#### šŸ“¦ Subtasks\n- `/taskmaster:add-subtask` - Add subtask to task\n- `/taskmaster:convert-task-to-subtask` - Convert task to subtask\n- `/taskmaster:remove-subtask` - Remove subtask\n- `/taskmaster:remove-subtasks` - Clear specific task subtasks\n- `/taskmaster:remove-all-subtasks` - Clear all subtasks\n\n#### šŸ—‘ļø Task Removal\n- `/taskmaster:remove-task` - Remove task permanently\n\n#### šŸ¤– Workflows\n- `/taskmaster:smart-workflow` - Intelligent workflows\n- `/taskmaster:command-pipeline` - Command chaining\n- `/taskmaster:auto-implement-tasks` - Auto-implementation\n\n#### šŸ“Š Utilities\n- `/taskmaster:analyze-project` - Project analysis\n- `/taskmaster:project-status` - Project dashboard\n- `/taskmaster:sync-readme` - Sync README with tasks\n- `/taskmaster:learn` - Interactive learning\n- `/taskmaster:tm-main` - Main Task Master interface\n\n### Quick Start Examples\n\n```\n/taskmaster:list-tasks\n/taskmaster:show-task 1.2\n/taskmaster:add-task\n/taskmaster:next-task\n```\n\n### Getting Started\n\n1. Install: `/taskmaster:quick-install-taskmaster`\n2. Initialize: `/taskmaster:init-project-quick`\n3. Learn: `/taskmaster:learn`\n4. Work: `/taskmaster:smart-workflow`\n\nFor detailed command info, run the specific command with `--help` or check command documentation."),B(`to-done`,`To Done`,`<task-id>`,`Mark a task as completed.
2517
+
2518
+ Arguments: $ARGUMENTS (task ID)
2519
+
2520
+ ## Completing a Task
2521
+
2522
+ This command validates task completion and updates project state intelligently.
2523
+
2524
+ ## Pre-Completion Checks
2525
+
2526
+ 1. Verify test strategy was followed
2527
+ 2. Check if all subtasks are complete
2528
+ 3. Validate acceptance criteria met
2529
+ 4. Ensure code is committed
2530
+
2531
+ ## Execution
2532
+
2533
+ \`\`\`bash
2534
+ task-master set-status --id=$ARGUMENTS --status=done
2535
+ \`\`\`
2536
+
2537
+ ## Post-Completion Actions
2538
+
2539
+ 1. **Update Dependencies**
2540
+ - Identify newly unblocked tasks
2541
+ - Update sprint progress
2542
+ - Recalculate project timeline
2543
+
2544
+ 2. **Documentation**
2545
+ - Generate completion summary
2546
+ - Update CLAUDE.md with learnings
2547
+ - Log implementation approach
2548
+
2549
+ 3. **Next Steps**
2550
+ - Show newly available tasks
2551
+ - Suggest logical next task
2552
+ - Update velocity metrics
2553
+
2554
+ ## Celebration & Learning
2555
+
2556
+ - Show impact of completion
2557
+ - Display unblocked work
2558
+ - Recognize achievement
2559
+ - Capture lessons learned`),B(`to-pending`,`To Pending`,`<task-id>`,`Set a task's status to pending.
2560
+
2561
+ Arguments: $ARGUMENTS (task ID)
2562
+
2563
+ ## Setting Task to Pending
2564
+
2565
+ This moves a task back to the pending state, useful for:
2566
+ - Resetting erroneously started tasks
2567
+ - Deferring work that was prematurely begun
2568
+ - Reorganizing sprint priorities
2569
+
2570
+ ## Execution
2571
+
2572
+ \`\`\`bash
2573
+ task-master set-status --id=$ARGUMENTS --status=pending
2574
+ \`\`\`
2575
+
2576
+ ## Validation
2577
+
2578
+ Before setting to pending:
2579
+ - Warn if task is currently in-progress
2580
+ - Check if this will block other tasks
2581
+ - Suggest documenting why it's being reset
2582
+ - Preserve any work already done
2583
+
2584
+ ## Smart Actions
2585
+
2586
+ After setting to pending:
2587
+ - Update sprint planning if needed
2588
+ - Notify about freed resources
2589
+ - Suggest priority reassessment
2590
+ - Log the status change with context`),B(`to-in-progress`,`To In Progress`,`<task-id>`,`Start working on a task by setting its status to in-progress.
2591
+
2592
+ Arguments: $ARGUMENTS (task ID)
2593
+
2594
+ ## Starting Work on Task
2595
+
2596
+ This command does more than just change status - it prepares your environment for productive work.
2597
+
2598
+ ## Pre-Start Checks
2599
+
2600
+ 1. Verify dependencies are met
2601
+ 2. Check if another task is already in-progress
2602
+ 3. Ensure task details are complete
2603
+ 4. Validate test strategy exists
2604
+
2605
+ ## Execution
2606
+
2607
+ \`\`\`bash
2608
+ task-master set-status --id=$ARGUMENTS --status=in-progress
2609
+ \`\`\`
2610
+
2611
+ ## Environment Setup
2612
+
2613
+ After setting to in-progress:
2614
+ 1. Create/checkout appropriate git branch
2615
+ 2. Open relevant documentation
2616
+ 3. Set up test watchers if applicable
2617
+ 4. Display task details and acceptance criteria
2618
+ 5. Show similar completed tasks for reference
2619
+
2620
+ ## Smart Suggestions
2621
+
2622
+ - Estimated completion time based on complexity
2623
+ - Related files from similar tasks
2624
+ - Potential blockers to watch for
2625
+ - Recommended first steps`),B(`update-task`,`Update Task`,`<update-spec>`,`Update tasks with intelligent field detection and bulk operations.
2626
+
2627
+ Arguments: $ARGUMENTS
2628
+
2629
+ ## Intelligent Task Updates
2630
+
2631
+ Parse arguments to determine update intent and execute smartly.
2632
+
2633
+ ### 1. **Natural Language Processing**
2634
+
2635
+ Understand update requests like:
2636
+ - "mark 23 as done" → Update status to done
2637
+ - "increase priority of 45" → Set priority to high
2638
+ - "add dependency on 12 to task 34" → Add dependency
2639
+ - "tasks 20-25 need review" → Bulk status update
2640
+ - "all API tasks high priority" → Pattern-based update
2641
+
2642
+ ### 2. **Smart Field Detection**
2643
+
2644
+ Automatically detect what to update:
2645
+ - Status keywords: done, complete, start, pause, review
2646
+ - Priority changes: urgent, high, low, deprioritize
2647
+ - Dependency updates: depends on, blocks, after
2648
+ - Assignment: assign to, owner, responsible
2649
+ - Time: estimate, spent, deadline
2650
+
2651
+ ### 3. **Bulk Operations**
2652
+
2653
+ Support for multiple task updates:
2654
+ \`\`\`
2655
+ Examples:
2656
+ - "complete tasks 12, 15, 18"
2657
+ - "all pending auth tasks to in-progress"
2658
+ - "increase priority for tasks blocking 45"
2659
+ - "defer all documentation tasks"
2660
+ \`\`\`
2661
+
2662
+ ### 4. **Contextual Validation**
2663
+
2664
+ Before updating, check:
2665
+ - Status transitions are valid
2666
+ - Dependencies don't create cycles
2667
+ - Priority changes make sense
2668
+ - Bulk updates won't break project flow
2669
+
2670
+ Show preview:
2671
+ \`\`\`
2672
+ Update Preview:
2673
+ ─────────────────
2674
+ Tasks to update: #23, #24, #25
2675
+ Change: status → in-progress
2676
+ Impact: Will unblock tasks #30, #31
2677
+ Warning: Task #24 has unmet dependencies
2678
+ \`\`\`
2679
+
2680
+ ### 5. **Smart Suggestions**
2681
+
2682
+ Based on update:
2683
+ - Completing task? → Show newly unblocked tasks
2684
+ - Changing priority? → Show impact on sprint
2685
+ - Adding dependency? → Check for conflicts
2686
+ - Bulk update? → Show summary of changes
2687
+
2688
+ ### 6. **Workflow Integration**
2689
+
2690
+ After updates:
2691
+ - Auto-update dependent task states
2692
+ - Trigger status recalculation
2693
+ - Update sprint/milestone progress
2694
+ - Log changes with context
2695
+
2696
+ Result: Flexible, intelligent task updates with safety checks.`),B(`update-single-task`,`Update Single Task`,`<task-id> <changes>`,`Update a single specific task with new information.
2697
+
2698
+ Arguments: $ARGUMENTS
2699
+
2700
+ Parse task ID and update details.
2701
+
2702
+ ## Single Task Update
2703
+
2704
+ Precisely update one task with AI assistance to maintain consistency.
2705
+
2706
+ ## Argument Parsing
2707
+
2708
+ Natural language updates:
2709
+ - "5: add caching requirement"
2710
+ - "update 5 to include error handling"
2711
+ - "task 5 needs rate limiting"
2712
+ - "5 change priority to high"
2713
+
2714
+ ## Execution
2715
+
2716
+ \`\`\`bash
2717
+ task-master update-task --id=<id> --prompt="<context>"
2718
+ \`\`\`
2719
+
2720
+ ## Update Types
2721
+
2722
+ ### 1. **Content Updates**
2723
+ - Enhance description
2724
+ - Add requirements
2725
+ - Clarify details
2726
+ - Update acceptance criteria
2727
+
2728
+ ### 2. **Metadata Updates**
2729
+ - Change priority
2730
+ - Adjust time estimates
2731
+ - Update complexity
2732
+ - Modify dependencies
2733
+
2734
+ ### 3. **Strategic Updates**
2735
+ - Revise approach
2736
+ - Change test strategy
2737
+ - Update implementation notes
2738
+ - Adjust subtask needs
2739
+
2740
+ ## AI-Powered Updates
2741
+
2742
+ The AI:
2743
+ 1. **Understands Context**
2744
+ - Reads current task state
2745
+ - Identifies update intent
2746
+ - Maintains consistency
2747
+ - Preserves important info
2748
+
2749
+ 2. **Applies Changes**
2750
+ - Updates relevant fields
2751
+ - Keeps style consistent
2752
+ - Adds without removing
2753
+ - Enhances clarity
2754
+
2755
+ 3. **Validates Results**
2756
+ - Checks coherence
2757
+ - Verifies completeness
2758
+ - Maintains relationships
2759
+ - Suggests related updates
2760
+
2761
+ ## Example Updates
2762
+
2763
+ \`\`\`
2764
+ /taskmaster:update/single 5: add rate limiting
2765
+ → Updating Task #5: "Implement API endpoints"
2766
+
2767
+ Current: Basic CRUD endpoints
2768
+ Adding: Rate limiting requirements
2769
+
2770
+ Updated sections:
2771
+ āœ“ Description: Added rate limiting mention
2772
+ āœ“ Details: Added specific limits (100/min)
2773
+ āœ“ Test Strategy: Added rate limit tests
2774
+ āœ“ Complexity: Increased from 5 to 6
2775
+ āœ“ Time Estimate: Increased by 2 hours
2776
+
2777
+ Suggestion: Also update task #6 (API Gateway) for consistency?
2778
+ \`\`\`
2779
+
2780
+ ## Smart Features
2781
+
2782
+ 1. **Incremental Updates**
2783
+ - Adds without overwriting
2784
+ - Preserves work history
2785
+ - Tracks what changed
2786
+ - Shows diff view
2787
+
2788
+ 2. **Consistency Checks**
2789
+ - Related task alignment
2790
+ - Subtask compatibility
2791
+ - Dependency validity
2792
+ - Timeline impact
2793
+
2794
+ 3. **Update History**
2795
+ - Timestamp changes
2796
+ - Track who/what updated
2797
+ - Reason for update
2798
+ - Previous versions
2799
+
2800
+ ## Field-Specific Updates
2801
+
2802
+ Quick syntax for specific fields:
2803
+ - "5 priority:high" → Update priority only
2804
+ - "5 add-time:4h" → Add to time estimate
2805
+ - "5 status:review" → Change status
2806
+ - "5 depends:3,4" → Add dependencies
2807
+
2808
+ ## Post-Update
2809
+
2810
+ - Show updated task
2811
+ - Highlight changes
2812
+ - Check related tasks
2813
+ - Update suggestions
2814
+ - Timeline adjustments`),B(`update-tasks-from-id`,`Update Tasks From ID`,`<from-id> <changes>`,`Update multiple tasks starting from a specific ID.
2815
+
2816
+ Arguments: $ARGUMENTS
2817
+
2818
+ Parse starting task ID and update context.
2819
+
2820
+ ## Bulk Task Updates
2821
+
2822
+ Update multiple related tasks based on new requirements or context changes.
2823
+
2824
+ ## Argument Parsing
2825
+
2826
+ - "from 5: add security requirements"
2827
+ - "5 onwards: update API endpoints"
2828
+ - "starting at 5: change to use new framework"
2829
+
2830
+ ## Execution
2831
+
2832
+ \`\`\`bash
2833
+ task-master update --from=<id> --prompt="<context>"
2834
+ \`\`\`
2835
+
2836
+ ## Update Process
2837
+
2838
+ ### 1. **Task Selection**
2839
+ Starting from specified ID:
2840
+ - Include the task itself
2841
+ - Include all dependent tasks
2842
+ - Include related subtasks
2843
+ - Smart boundary detection
2844
+
2845
+ ### 2. **Context Application**
2846
+ AI analyzes the update context and:
2847
+ - Identifies what needs changing
2848
+ - Maintains consistency
2849
+ - Preserves completed work
2850
+ - Updates related information
2851
+
2852
+ ### 3. **Intelligent Updates**
2853
+ - Modify descriptions appropriately
2854
+ - Update test strategies
2855
+ - Adjust time estimates
2856
+ - Revise dependencies if needed
2857
+
2858
+ ## Smart Features
2859
+
2860
+ 1. **Scope Detection**
2861
+ - Find natural task groupings
2862
+ - Identify related features
2863
+ - Stop at logical boundaries
2864
+ - Avoid over-updating
2865
+
2866
+ 2. **Consistency Maintenance**
2867
+ - Keep naming conventions
2868
+ - Preserve relationships
2869
+ - Update cross-references
2870
+ - Maintain task flow
2871
+
2872
+ 3. **Change Preview**
2873
+ \`\`\`
2874
+ Bulk Update Preview
2875
+ ━━━━━━━━━━━━━━━━━━
2876
+ Starting from: Task #5
2877
+ Tasks to update: 8 tasks + 12 subtasks
2878
+
2879
+ Context: "add security requirements"
2880
+
2881
+ Changes will include:
2882
+ - Add security sections to descriptions
2883
+ - Update test strategies for security
2884
+ - Add security-related subtasks where needed
2885
+ - Adjust time estimates (+20% average)
2886
+
2887
+ Continue? (y/n)
2888
+ \`\`\`
2889
+
2890
+ ## Example Updates
2891
+
2892
+ \`\`\`
2893
+ /taskmaster:update-tasks-from-id 5: change database to PostgreSQL
2894
+ → Analyzing impact starting from task #5
2895
+ → Found 6 related tasks to update
2896
+ → Updates will maintain consistency
2897
+ → Preview changes? (y/n)
2898
+
2899
+ Applied updates:
2900
+ āœ“ Task #5: Updated connection logic references
2901
+ āœ“ Task #6: Changed migration approach
2902
+ āœ“ Task #7: Updated query syntax notes
2903
+ āœ“ Task #8: Revised testing strategy
2904
+ āœ“ Task #9: Updated deployment steps
2905
+ āœ“ Task #12: Changed backup procedures
2906
+ \`\`\`
2907
+
2908
+ ## Safety Features
2909
+
2910
+ - Preview all changes
2911
+ - Selective confirmation
2912
+ - Rollback capability
2913
+ - Change logging
2914
+ - Validation checks
2915
+
2916
+ ## Post-Update
2917
+
2918
+ - Summary of changes
2919
+ - Consistency verification
2920
+ - Suggest review tasks
2921
+ - Update timeline if needed`),z({name:`tm-main`,description:`Task Master Main`,content:"# Task Master Command Reference\n\nComprehensive command structure for Task Master integration with Claude Code.\n\n## Command Organization\n\nCommands are organized hierarchically to match Task Master's CLI structure while providing enhanced Claude Code integration.\n\n## Project Setup & Configuration\n\n### `/taskmaster:init`\n- `init-project` - Initialize new project (handles PRD files intelligently)\n- `init-project-quick` - Quick setup with auto-confirmation (-y flag)\n\n### `/taskmaster:models`\n- `view-models` - View current AI model configuration\n- `setup-models` - Interactive model configuration\n- `set-main` - Set primary generation model\n- `set-research` - Set research model\n- `set-fallback` - Set fallback model\n\n## Task Generation\n\n### `/taskmaster:parse-prd`\n- `parse-prd` - Generate tasks from PRD document\n- `parse-prd-with-research` - Enhanced parsing with research mode\n\n### `/taskmaster:generate`\n- `generate-tasks` - Create individual task files from tasks.json\n\n## Task Management\n\n### `/taskmaster:list`\n- `list-tasks` - Smart listing with natural language filters\n- `list-tasks-with-subtasks` - Include subtasks in hierarchical view\n- `list-tasks-by-status` - Filter by specific status\n\n### `/taskmaster:set-status`\n- `to-pending` - Reset task to pending\n- `to-in-progress` - Start working on task\n- `to-done` - Mark task complete\n- `to-review` - Submit for review\n- `to-deferred` - Defer task\n- `to-cancelled` - Cancel task\n\n### `/taskmaster:sync-readme`\n- `sync-readme` - Export tasks to README.md with formatting\n\n### `/taskmaster:update`\n- `update-task` - Update tasks with natural language\n- `update-tasks-from-id` - Update multiple tasks from a starting point\n- `update-single-task` - Update specific task\n\n### `/taskmaster:add-task`\n- `add-task` - Add new task with AI assistance\n\n### `/taskmaster:remove-task`\n- `remove-task` - Remove task with confirmation\n\n## Subtask Management\n\n### `/taskmaster:add-subtask`\n- `add-subtask` - Add new subtask to parent\n- `convert-task-to-subtask` - Convert existing task to subtask\n\n### `/taskmaster:remove-subtask`\n- `remove-subtask` - Remove subtask (with optional conversion)\n\n### `/taskmaster:clear-subtasks`\n- `clear-subtasks` - Clear subtasks from specific task\n- `clear-all-subtasks` - Clear all subtasks globally\n\n## Task Analysis & Breakdown\n\n### `/taskmaster:analyze-complexity`\n- `analyze-complexity` - Analyze and generate expansion recommendations\n\n### `/taskmaster:complexity-report`\n- `complexity-report` - Display complexity analysis report\n\n### `/taskmaster:expand`\n- `expand-task` - Break down specific task\n- `expand-all-tasks` - Expand all eligible tasks\n- `with-research` - Enhanced expansion\n\n## Task Navigation\n\n### `/taskmaster:next`\n- `next-task` - Intelligent next task recommendation\n\n### `/taskmaster:show`\n- `show-task` - Display detailed task information\n\n### `/taskmaster:status`\n- `project-status` - Comprehensive project dashboard\n\n## Dependency Management\n\n### `/taskmaster:add-dependency`\n- `add-dependency` - Add task dependency\n\n### `/taskmaster:remove-dependency`\n- `remove-dependency` - Remove task dependency\n\n### `/taskmaster:validate-dependencies`\n- `validate-dependencies` - Check for dependency issues\n\n### `/taskmaster:fix-dependencies`\n- `fix-dependencies` - Automatically fix dependency problems\n\n## Workflows & Automation\n\n### `/taskmaster:workflows`\n- `smart-workflow` - Context-aware intelligent workflow execution\n- `command-pipeline` - Chain multiple commands together\n- `auto-implement-tasks` - Advanced auto-implementation with code generation\n\n## Utilities\n\n### `/taskmaster:utils`\n- `analyze-project` - Deep project analysis and insights\n\n### `/taskmaster:setup`\n- `install-taskmaster` - Comprehensive installation guide\n- `quick-install-taskmaster` - One-line global installation\n\n## Usage Patterns\n\n### Natural Language\nMost commands accept natural language arguments:\n```\n/taskmaster:add-task create user authentication system\n/taskmaster:update mark all API tasks as high priority\n/taskmaster:list show blocked tasks\n```\n\n### ID-Based Commands\nCommands requiring IDs intelligently parse from $ARGUMENTS:\n```\n/taskmaster:show 45\n/taskmaster:expand 23\n/taskmaster:set-status/to-done 67\n```\n\n### Smart Defaults\nCommands provide intelligent defaults and suggestions based on context."}),B(`smart-workflow`,`Smart Workflow`,`[context]`,`Execute an intelligent workflow based on current project state and recent commands.
2922
+
2923
+ This command analyzes:
2924
+ 1. Recent commands you've run
2925
+ 2. Current project state
2926
+ 3. Time of day / day of week
2927
+ 4. Your working patterns
2928
+
2929
+ Arguments: $ARGUMENTS
2930
+
2931
+ ## Intelligent Workflow Selection
2932
+
2933
+ Based on context, I'll determine the best workflow:
2934
+
2935
+ ### Context Analysis
2936
+ - Previous command executed
2937
+ - Current task states
2938
+ - Unfinished work from last session
2939
+ - Your typical patterns
2940
+
2941
+ ### Smart Execution
2942
+
2943
+ If last command was:
2944
+ - \`status\` → Likely starting work → Run daily standup
2945
+ - \`complete\` → Task finished → Find next task
2946
+ - \`list pending\` → Planning → Suggest sprint planning
2947
+ - \`expand\` → Breaking down work → Show complexity analysis
2948
+ - \`init\` → New project → Show onboarding workflow
2949
+
2950
+ If no recent commands:
2951
+ - Morning? → Daily standup workflow
2952
+ - Many pending tasks? → Sprint planning
2953
+ - Tasks blocked? → Dependency resolution
2954
+ - Friday? → Weekly review
2955
+
2956
+ ### Workflow Composition
2957
+
2958
+ I'll chain appropriate commands:
2959
+ 1. Analyze current state
2960
+ 2. Execute primary workflow
2961
+ 3. Suggest follow-up actions
2962
+ 4. Prepare environment for coding
2963
+
2964
+ ### Learning Mode
2965
+
2966
+ This command learns from your patterns:
2967
+ - Track command sequences
2968
+ - Note time preferences
2969
+ - Remember common workflows
2970
+ - Adapt to your style
2971
+
2972
+ Example flows detected:
2973
+ - Morning: standup → next → start
2974
+ - After lunch: status → continue task
2975
+ - End of day: complete → commit → status`),B(`learn`,`Learn`,`[topic]`,`Learn about Task Master capabilities through interactive exploration.
2976
+
2977
+ Arguments: $ARGUMENTS
2978
+
2979
+ ## Interactive Task Master Learning
2980
+
2981
+ Based on your input, I'll help you discover capabilities:
2982
+
2983
+ ### 1. **What are you trying to do?**
2984
+
2985
+ If $ARGUMENTS contains:
2986
+ - "start" / "begin" → Show project initialization workflows
2987
+ - "manage" / "organize" → Show task management commands
2988
+ - "automate" / "auto" → Show automation workflows
2989
+ - "analyze" / "report" → Show analysis tools
2990
+ - "fix" / "problem" → Show troubleshooting commands
2991
+ - "fast" / "quick" → Show efficiency shortcuts
2992
+
2993
+ ### 2. **Intelligent Suggestions**
2994
+
2995
+ Based on your project state:
2996
+
2997
+ **No tasks yet?**
2998
+ \`\`\`
2999
+ You'll want to start with:
3000
+ 1. /project:task-master:init <prd-file>
3001
+ → Creates tasks from requirements
3002
+
3003
+ 2. /project:task-master:parse-prd <file>
3004
+ → Alternative task generation
3005
+
3006
+ Try: /project:task-master:init demo-prd.md
3007
+ \`\`\`
3008
+
3009
+ **Have tasks?**
3010
+ Let me analyze what you might need...
3011
+ - Many pending tasks? → Learn sprint planning
3012
+ - Complex tasks? → Learn task expansion
3013
+ - Daily work? → Learn workflow automation
3014
+
3015
+ ### 3. **Command Discovery**
3016
+
3017
+ **By Category:**
3018
+ - šŸ“‹ Task Management: list, show, add, update, complete
3019
+ - šŸ”„ Workflows: auto-implement, sprint-plan, daily-standup
3020
+ - šŸ› ļø Utilities: check-health, complexity-report, sync-memory
3021
+ - šŸ” Analysis: validate-deps, show dependencies
3022
+
3023
+ **By Scenario:**
3024
+ - "I want to see what to work on" → \`/project:task-master:next\`
3025
+ - "I need to break this down" → \`/project:task-master:expand <id>\`
3026
+ - "Show me everything" → \`/project:task-master:status\`
3027
+ - "Just do it for me" → \`/project:workflows:auto-implement\`
3028
+
3029
+ ### 4. **Power User Patterns**
3030
+
3031
+ **Command Chaining:**
3032
+ \`\`\`
3033
+ /project:task-master:next
3034
+ /project:task-master:start <id>
3035
+ /project:workflows:auto-implement
3036
+ \`\`\`
3037
+
3038
+ **Smart Filters:**
3039
+ \`\`\`
3040
+ /project:task-master:list pending high
3041
+ /project:task-master:list blocked
3042
+ /project:task-master:list 1-5 tree
3043
+ \`\`\`
3044
+
3045
+ **Automation:**
3046
+ \`\`\`
3047
+ /project:workflows:pipeline init → expand-all → sprint-plan
3048
+ \`\`\`
3049
+
3050
+ ### 5. **Learning Path**
3051
+
3052
+ Based on your experience level:
3053
+
3054
+ **Beginner Path:**
3055
+ 1. init → Create project
3056
+ 2. status → Understand state
3057
+ 3. next → Find work
3058
+ 4. complete → Finish task
3059
+
3060
+ **Intermediate Path:**
3061
+ 1. expand → Break down complex tasks
3062
+ 2. sprint-plan → Organize work
3063
+ 3. complexity-report → Understand difficulty
3064
+ 4. validate-deps → Ensure consistency
3065
+
3066
+ **Advanced Path:**
3067
+ 1. pipeline → Chain operations
3068
+ 2. smart-flow → Context-aware automation
3069
+ 3. Custom commands → Extend the system
3070
+
3071
+ ### 6. **Try This Now**
3072
+
3073
+ Based on what you asked about, try:
3074
+ [Specific command suggestion based on $ARGUMENTS]
3075
+
3076
+ Want to learn more about a specific command?
3077
+ Type: /project:help <command-name>`),B(`command-pipeline`,`Command Pipeline`,`<pipeline-spec>`,`Execute a pipeline of commands based on a specification.
3078
+
3079
+ Arguments: $ARGUMENTS
3080
+
3081
+ ## Command Pipeline Execution
3082
+
3083
+ Parse pipeline specification from arguments. Supported formats:
3084
+
3085
+ ### Simple Pipeline
3086
+ \`init → expand-all → sprint-plan\`
3087
+
3088
+ ### Conditional Pipeline
3089
+ \`status → if:pending>10 → sprint-plan → else → next\`
3090
+
3091
+ ### Iterative Pipeline
3092
+ \`for:pending-tasks → expand → complexity-check\`
3093
+
3094
+ ### Smart Pipeline Patterns
3095
+
3096
+ **1. Project Setup Pipeline**
3097
+ \`\`\`
3098
+ init [prd] →
3099
+ expand-all →
3100
+ complexity-report →
3101
+ sprint-plan →
3102
+ show first-sprint
3103
+ \`\`\`
3104
+
3105
+ **2. Daily Work Pipeline**
3106
+ \`\`\`
3107
+ standup →
3108
+ if:in-progress → continue →
3109
+ else → next → start
3110
+ \`\`\`
3111
+
3112
+ **3. Task Completion Pipeline**
3113
+ \`\`\`
3114
+ complete [id] →
3115
+ git-commit →
3116
+ if:blocked-tasks-freed → show-freed →
3117
+ next
3118
+ \`\`\`
3119
+
3120
+ **4. Quality Check Pipeline**
3121
+ \`\`\`
3122
+ list in-progress →
3123
+ for:each → check-idle-time →
3124
+ if:idle>1day → prompt-update
3125
+ \`\`\`
3126
+
3127
+ ### Pipeline Features
3128
+
3129
+ **Variables**
3130
+ - Store results: \`status → $count=pending-count\`
3131
+ - Use in conditions: \`if:$count>10\`
3132
+ - Pass between commands: \`expand $high-priority-tasks\`
3133
+
3134
+ **Error Handling**
3135
+ - On failure: \`try:complete → catch:show-blockers\`
3136
+ - Skip on error: \`optional:test-run\`
3137
+ - Retry logic: \`retry:3:commit\`
3138
+
3139
+ **Parallel Execution**
3140
+ - Parallel branches: \`[analyze | test | lint]\`
3141
+ - Join results: \`parallel → join:report\`
3142
+
3143
+ ### Execution Flow
3144
+
3145
+ 1. Parse pipeline specification
3146
+ 2. Validate command sequence
3147
+ 3. Execute with state passing
3148
+ 4. Handle conditions and loops
3149
+ 5. Aggregate results
3150
+ 6. Show summary
3151
+
3152
+ This enables complex workflows like:
3153
+ \`parse-prd → expand-all → filter:complex>70 → assign:senior → sprint-plan:weighted\``),B(`auto-implement-tasks`,`Auto Implement Tasks`,`[task-id]`,`Enhanced auto-implementation with intelligent code generation and testing.
3154
+
3155
+ Arguments: $ARGUMENTS
3156
+
3157
+ ## Intelligent Auto-Implementation
3158
+
3159
+ Advanced implementation with context awareness and quality checks.
3160
+
3161
+ ### 1. **Pre-Implementation Analysis**
3162
+
3163
+ Before starting:
3164
+ - Analyze task complexity and requirements
3165
+ - Check codebase patterns and conventions
3166
+ - Identify similar completed tasks
3167
+ - Assess test coverage needs
3168
+ - Detect potential risks
3169
+
3170
+ ### 2. **Smart Implementation Strategy**
3171
+
3172
+ Based on task type and context:
3173
+
3174
+ **Feature Tasks**
3175
+ 1. Research existing patterns
3176
+ 2. Design component architecture
3177
+ 3. Implement with tests
3178
+ 4. Integrate with system
3179
+ 5. Update documentation
3180
+
3181
+ **Bug Fix Tasks**
3182
+ 1. Reproduce issue
3183
+ 2. Identify root cause
3184
+ 3. Implement minimal fix
3185
+ 4. Add regression tests
3186
+ 5. Verify side effects
3187
+
3188
+ **Refactoring Tasks**
3189
+ 1. Analyze current structure
3190
+ 2. Plan incremental changes
3191
+ 3. Maintain test coverage
3192
+ 4. Refactor step-by-step
3193
+ 5. Verify behavior unchanged
3194
+
3195
+ ### 3. **Code Intelligence**
3196
+
3197
+ **Pattern Recognition**
3198
+ - Learn from existing code
3199
+ - Follow team conventions
3200
+ - Use preferred libraries
3201
+ - Match style guidelines
3202
+
3203
+ **Test-Driven Approach**
3204
+ - Write tests first when possible
3205
+ - Ensure comprehensive coverage
3206
+ - Include edge cases
3207
+ - Performance considerations
3208
+
3209
+ ### 4. **Progressive Implementation**
3210
+
3211
+ Step-by-step with validation:
3212
+ \`\`\`
3213
+ Step 1/5: Setting up component structure āœ“
3214
+ Step 2/5: Implementing core logic āœ“
3215
+ Step 3/5: Adding error handling ⚔ (in progress)
3216
+ Step 4/5: Writing tests ā³
3217
+ Step 5/5: Integration testing ā³
3218
+
3219
+ Current: Adding try-catch blocks and validation...
3220
+ \`\`\`
3221
+
3222
+ ### 5. **Quality Assurance**
3223
+
3224
+ Automated checks:
3225
+ - Linting and formatting
3226
+ - Test execution
3227
+ - Type checking
3228
+ - Dependency validation
3229
+ - Performance analysis
3230
+
3231
+ ### 6. **Smart Recovery**
3232
+
3233
+ If issues arise:
3234
+ - Diagnostic analysis
3235
+ - Suggestion generation
3236
+ - Fallback strategies
3237
+ - Manual intervention points
3238
+ - Learning from failures
3239
+
3240
+ ### 7. **Post-Implementation**
3241
+
3242
+ After completion:
3243
+ - Generate PR description
3244
+ - Update documentation
3245
+ - Log lessons learned
3246
+ - Suggest follow-up tasks
3247
+ - Update task relationships
3248
+
3249
+ Result: High-quality, production-ready implementations.`),B(`analyze-project`,`Analyze Project`,`[focus-area]`,`Advanced project analysis with actionable insights and recommendations.
3250
+
3251
+ Arguments: $ARGUMENTS
3252
+
3253
+ ## Comprehensive Project Analysis
3254
+
3255
+ Multi-dimensional analysis based on requested focus area.
3256
+
3257
+ ### 1. **Analysis Modes**
3258
+
3259
+ Based on $ARGUMENTS:
3260
+ - "velocity" → Sprint velocity and trends
3261
+ - "quality" → Code quality metrics
3262
+ - "risk" → Risk assessment and mitigation
3263
+ - "dependencies" → Dependency graph analysis
3264
+ - "team" → Workload and skill distribution
3265
+ - "architecture" → System design coherence
3266
+ - Default → Full spectrum analysis
3267
+
3268
+ ### 2. **Velocity Analytics**
3269
+
3270
+ \`\`\`
3271
+ šŸ“Š Velocity Analysis
3272
+ ━━━━━━━━━━━━━━━━━━━
3273
+ Current Sprint: 24 points/week ā†—ļø +20%
3274
+ Rolling Average: 20 points/week
3275
+ Efficiency: 85% (17/20 tasks on time)
3276
+
3277
+ Bottlenecks Detected:
3278
+ - Code review delays (avg 4h wait)
3279
+ - Test environment availability
3280
+ - Dependency on external team
3281
+
3282
+ Recommendations:
3283
+ 1. Implement parallel review process
3284
+ 2. Add staging environment
3285
+ 3. Mock external dependencies
3286
+ \`\`\`
3287
+
3288
+ ### 3. **Risk Assessment**
3289
+
3290
+ **Technical Risks**
3291
+ - High complexity tasks without backup assignee
3292
+ - Single points of failure in architecture
3293
+ - Insufficient test coverage in critical paths
3294
+ - Technical debt accumulation rate
3295
+
3296
+ **Project Risks**
3297
+ - Critical path dependencies
3298
+ - Resource availability gaps
3299
+ - Deadline feasibility analysis
3300
+ - Scope creep indicators
3301
+
3302
+ ### 4. **Dependency Intelligence**
3303
+
3304
+ Visual dependency analysis:
3305
+ \`\`\`
3306
+ Critical Path:
3307
+ #12 → #15 → #23 → #45 → #50 (20 days)
3308
+ ā†˜ #24 → #46 ↗
3309
+
3310
+ Optimization: Parallelize #15 and #24
3311
+ Time Saved: 3 days
3312
+ \`\`\`
3313
+
3314
+ ### 5. **Quality Metrics**
3315
+
3316
+ **Code Quality**
3317
+ - Test coverage trends
3318
+ - Complexity scores
3319
+ - Technical debt ratio
3320
+ - Review feedback patterns
3321
+
3322
+ **Process Quality**
3323
+ - Rework frequency
3324
+ - Bug introduction rate
3325
+ - Time to resolution
3326
+ - Knowledge distribution
3327
+
3328
+ ### 6. **Predictive Insights**
3329
+
3330
+ Based on patterns:
3331
+ - Completion probability by deadline
3332
+ - Resource needs projection
3333
+ - Risk materialization likelihood
3334
+ - Suggested interventions
3335
+
3336
+ ### 7. **Executive Dashboard**
3337
+
3338
+ High-level summary with:
3339
+ - Health score (0-100)
3340
+ - Top 3 risks
3341
+ - Top 3 opportunities
3342
+ - Recommended actions
3343
+ - Success probability
3344
+
3345
+ Result: Data-driven decisions with clear action paths.`),B(`sync-readme`,`Sync README`,`[options]`,`Export tasks to README.md with professional formatting.
3346
+
3347
+ Arguments: $ARGUMENTS
3348
+
3349
+ Generate a well-formatted README with current task information.
3350
+
3351
+ ## README Synchronization
3352
+
3353
+ Creates or updates README.md with beautifully formatted task information.
3354
+
3355
+ ## Argument Parsing
3356
+
3357
+ Optional filters:
3358
+ - "pending" → Only pending tasks
3359
+ - "with-subtasks" → Include subtask details
3360
+ - "by-priority" → Group by priority
3361
+ - "sprint" → Current sprint only
3362
+
3363
+ ## Execution
3364
+
3365
+ \`\`\`bash
3366
+ task-master sync-readme [--with-subtasks] [--status=<status>]
3367
+ \`\`\`
3368
+
3369
+ ## README Generation
3370
+
3371
+ ### 1. **Project Header**
3372
+ \`\`\`markdown
3373
+ # Project Name
3374
+
3375
+ ## šŸ“‹ Task Progress
3376
+
3377
+ Last Updated: 2024-01-15 10:30 AM
3378
+
3379
+ ### Summary
3380
+ - Total Tasks: 45
3381
+ - Completed: 15 (33%)
3382
+ - In Progress: 5 (11%)
3383
+ - Pending: 25 (56%)
3384
+ \`\`\`
3385
+
3386
+ ### 2. **Task Sections**
3387
+ Organized by status or priority:
3388
+ - Progress indicators
3389
+ - Task descriptions
3390
+ - Dependencies noted
3391
+ - Time estimates
3392
+
3393
+ ### 3. **Visual Elements**
3394
+ - Progress bars
3395
+ - Status badges
3396
+ - Priority indicators
3397
+ - Completion checkmarks
3398
+
3399
+ ## Smart Features
3400
+
3401
+ 1. **Intelligent Grouping**
3402
+ - By feature area
3403
+ - By sprint/milestone
3404
+ - By assigned developer
3405
+ - By priority
3406
+
3407
+ 2. **Progress Tracking**
3408
+ - Overall completion
3409
+ - Sprint velocity
3410
+ - Burndown indication
3411
+ - Time tracking
3412
+
3413
+ 3. **Formatting Options**
3414
+ - GitHub-flavored markdown
3415
+ - Task checkboxes
3416
+ - Collapsible sections
3417
+ - Table format available
3418
+
3419
+ ## Example Output
3420
+
3421
+ \`\`\`markdown
3422
+ ## šŸš€ Current Sprint
3423
+
3424
+ ### In Progress
3425
+ - [ ] šŸ”„ #5 **Implement user authentication** (60% complete)
3426
+ - Dependencies: API design (#3 āœ…)
3427
+ - Subtasks: 4 (2 completed)
3428
+ - Est: 8h / Spent: 5h
3429
+
3430
+ ### Pending (High Priority)
3431
+ - [ ] ⚔ #8 **Create dashboard UI**
3432
+ - Blocked by: #5
3433
+ - Complexity: High
3434
+ - Est: 12h
3435
+ \`\`\`
3436
+
3437
+ ## Customization
3438
+
3439
+ Based on arguments:
3440
+ - Include/exclude sections
3441
+ - Detail level control
3442
+ - Custom grouping
3443
+ - Filter by criteria
3444
+
3445
+ ## Post-Sync
3446
+
3447
+ After generation:
3448
+ 1. Show diff preview
3449
+ 2. Backup existing README
3450
+ 3. Write new content
3451
+ 4. Commit reminder
3452
+ 5. Update timestamp
3453
+
3454
+ ## Integration
3455
+
3456
+ Works well with:
3457
+ - Git workflows
3458
+ - CI/CD pipelines
3459
+ - Project documentation
3460
+ - Team updates
3461
+ - Client reports`)];function H(e,t){return t===`team`?e.filter(e=>e.metadata.mode===`team`||e.metadata.mode===`common`||!e.metadata.mode):e.filter(e=>e.metadata.mode===`solo`||e.metadata.mode===`common`||!e.metadata.mode)}H(V,`solo`),H(V,`team`),V.filter(e=>e.metadata.mode===`common`||!e.metadata.mode);var U=class{supportsNestedCommands=!0;get supportsCommands(){return this.commandsDir!==``}formatAll(e){return e.map(e=>this.format(e))}getFilename(e){return this.supportsNestedCommands?`${e}${this.extension}`:`tm-${e}${this.extension}`}transformArgumentPlaceholder(e){return e}postProcess(e){return e}getCommandsPath(e){return this.supportsNestedCommands?b.join(e,this.commandsDir,`tm`):b.join(e,this.commandsDir)}addSlashCommands(e,t,n){let r=this.getCommandsPath(e),i=[];if(!this.supportsCommands)return{success:!1,count:0,directory:r,files:[],error:`Profile "${this.name}" does not support slash commands`};try{n?.mode&&this.removeSlashCommands(e,t,!1);let a=n?.mode?H(t,n.mode):t;E.existsSync(r)||E.mkdirSync(r,{recursive:!0});let o=this.formatAll(a);for(let e of o){let t=b.join(r,e.filename);E.writeFileSync(t,e.content),i.push(e.filename)}return{success:!0,count:i.length,directory:r,files:i}}catch(e){return{success:!1,count:0,directory:r,files:[],error:e instanceof Error?e.message:String(e)}}}removeSlashCommands(e,t,n=!0){let r=this.getCommandsPath(e),i=[];if(!this.supportsCommands)return{success:!1,count:0,directory:r,files:[],error:`Profile "${this.name}" does not support slash commands`};if(!E.existsSync(r))return{success:!0,count:0,directory:r,files:[]};try{let e=new Set(t.map(e=>{let t=e.metadata.name.toLowerCase();return this.supportsNestedCommands?t:`tm-${t}`})),a=E.readdirSync(r);for(let t of a){let n=b.basename(t,b.extname(t)).toLowerCase();if(e.has(n)){let e=b.join(r,t);E.rmSync(e,{force:!0}),i.push(t)}}return n&&E.readdirSync(r).length===0&&E.rmSync(r,{recursive:!0,force:!0}),{success:!0,count:i.length,directory:r,files:i}}catch(e){return{success:!1,count:i.length,directory:r,files:i,error:e instanceof Error?e.message:String(e)}}}replaceSlashCommands(e,t,n){let r=this.removeSlashCommands(e,t);return r.success?this.addSlashCommands(e,t,{mode:n}):r}},Xe=class extends U{name=`claude`;displayName=`Claude Code`;commandsDir=`.claude/commands`;extension=`.md`;format(e){let t=this.buildHeader(e),n=this.transformArgumentPlaceholder(e.content);return{filename:this.getFilename(e.metadata.name),content:`${t}${n}`}}buildHeader(e){let t=[e.metadata.description,``];return e.metadata.argumentHint&&(t.push(`Arguments: $ARGUMENTS`),t.push(``)),t.join(`
3462
+ `)}},Ze=class extends U{name=`codex`;displayName=`Codex`;commandsDir=`.codex/prompts`;extension=`.md`;supportsNestedCommands=!1;isHomeRelative=!0;homeDir;constructor(e){super(),this.homeDir=e?.homeDir??O.homedir()}getCommandsPath(e){return b.join(this.homeDir,this.commandsDir)}format(e){let t=this.buildFrontmatter(e);return{filename:this.getFilename(e.metadata.name),content:`${t}${e.content}`}}buildFrontmatter(e){let t=e=>e.replace(/"/g,`\\"`),n=[`---`,`description: "${t(e.metadata.description)}"`];return e.metadata.argumentHint&&n.push(`argument-hint: "${t(e.metadata.argumentHint)}"`),n.push(`---`,``),n.join(`
3463
+ `)}},Qe=class extends U{name=`cursor`;displayName=`Cursor`;commandsDir=`.cursor/commands`;extension=`.md`;format(e){return{filename:this.getFilename(e.metadata.name),content:e.content}}},$e=class extends U{name=`gemini`;displayName=`Gemini`;commandsDir=`.gemini/commands`;extension=`.toml`;format(e){let t=this.escapeForPython(e.metadata.description),n=this.escapeForTripleQuotedString(e.content.trim());return{filename:this.getFilename(e.metadata.name),content:`description="${t}"
3464
+ prompt = """
3465
+ ${n}
3466
+ """
3467
+ `}}escapeForPython(e){return e.replace(/"/g,`\\"`)}escapeForTripleQuotedString(e){return e.replace(/"""/g,`""\\"`)}},et=class extends U{name=`opencode`;displayName=`OpenCode`;commandsDir=`.opencode/command`;extension=`.md`;supportsNestedCommands=!1;format(e){let t=this.buildFrontmatter(e),n=this.transformArgumentPlaceholder(e.content);return{filename:this.getFilename(e.metadata.name),content:`${t}${n}`}}buildFrontmatter(e){return[`---`,`description: ${e.metadata.description}`,`---`,``].join(`
3468
+ `)}},tt=class extends U{name=`roo`;displayName=`Roo Code`;commandsDir=`.roo/commands`;extension=`.md`;supportsNestedCommands=!1;format(e){let t=this.buildFrontmatter(e),n=this.transformArgumentPlaceholder(e.content);return{filename:this.getFilename(e.metadata.name),content:`${t}${n}`}}buildFrontmatter(e){let t=[`---`,`description: ${e.metadata.description}`];return e.metadata.argumentHint&&t.push(`argument-hint: ${e.metadata.argumentHint}`),t.push(`---`,``,``),t.join(`
3469
+ `)}};const nt={claude:new Xe,codex:new Ze,cursor:new Qe,gemini:new $e,opencode:new et,roo:new tt};function rt(e){return nt[e.toLowerCase()]}function it(){let e=T.homedir(),t=process.env.SHELL||``;if(t.includes(`zsh`))return C.join(e,`.zshrc`);if(t.includes(`bash`)){let t=C.join(e,`.bash_profile`);return process.platform===`darwin`?t:C.join(e,`.bashrc`)}if(t.includes(`fish`))return C.join(e,`.config`,`fish`,`config.fish`);if(process.platform===`win32`){if(process.env.PSModulePath){let t=process.env.PROFILE||C.join(e,`Documents`,`WindowsPowerShell`,`Microsoft.PowerShell_profile.ps1`),n=C.join(e,`Documents`,`PowerShell`,`Microsoft.PowerShell_profile.ps1`);return S.existsSync(n)?n:S.existsSync(t)?t:n}let t=C.join(e,`.bashrc`);if(S.existsSync(t))return t}let n=C.join(e,`.zshrc`);if(S.existsSync(n))return n;let r=C.join(e,`.bashrc`);return S.existsSync(r)?r:null}function W(e){return e.endsWith(`.ps1`)}function at(e){return e.includes(`config.fish`)}function ot(e,t,n){if(!/^[A-Z_][A-Z0-9_]*$/i.test(e))return{success:!1,message:`Invalid environment variable name: ${e}. Must start with a letter or underscore and contain only alphanumeric characters and underscores.`};if(typeof t!=`string`||t.includes(`
3470
+ `)||t.includes(`\r`))return{success:!1,message:`Invalid value: must be a single-line string without newlines`};let r=it();if(!r)return{success:!1,message:`Could not determine shell type (zsh, bash, fish, or PowerShell)`};try{let i=C.dirname(r);if(S.existsSync(i)||S.mkdirSync(i,{recursive:!0}),!S.existsSync(r)){let e=process.platform===`darwin`&&r.endsWith(`.bash_profile`);if(W(r)||e)S.writeFileSync(r,``);else return{success:!1,shellConfigFile:r,message:`Shell config file ${r} not found`}}let a=S.readFileSync(r,`utf8`),o;if(o=W(r)?RegExp(`^\\s*\\$env:${e}\\s*=`,`m`).test(a):at(r)?RegExp(`^\\s*set\\s+-[gux]*x[gux]*\\s+${e}\\s+`,`m`).test(a):RegExp(`^\\s*export\\s+${e}\\s*=`,`m`).test(a),o)return{success:!0,shellConfigFile:r,message:`${e} already configured`,alreadyExists:!0};let s,c;W(r)?(s=`$env:${e} = "${t.replace(/["`$]/g,"`$&")}"`,c=`#`):at(r)?(s=`set -gx ${e} '${t.replace(/'/g,`'\\''`)}'`,c=`#`):(s=`export ${e}='${t.replace(/'/g,`'\\''`)}'`,c=`#`);let l=`\n${n?`${c} ${n}\n`:``}${s}\n`;return S.appendFileSync(r,l),{success:!0,shellConfigFile:r,message:`Added ${e} to ${r}`}}catch(e){return{success:!1,shellConfigFile:r,message:`Failed to modify shell config: ${e.message}`}}}function st(){return ot(`ENABLE_EXPERIMENTAL_MCP_CLI`,`true`,`Claude Code deferred MCP loading (added by Taskmaster)`)}const ct=[{profileName:`cursor`,markers:[{path:`.cursor`,type:`directory`}],displayName:`Cursor`},{profileName:`claude`,markers:[{path:`.claude`,type:`directory`}],displayName:`Claude Code`},{profileName:`windsurf`,markers:[{path:`.windsurf`,type:`directory`}],displayName:`Windsurf`},{profileName:`vscode`,markers:[{path:`.vscode`,type:`directory`}],displayName:`VS Code`},{profileName:`roo`,markers:[{path:`.roo`,type:`directory`}],displayName:`Roo Code`},{profileName:`cline`,markers:[{path:`.cline`,type:`directory`}],displayName:`Cline`},{profileName:`kiro`,markers:[{path:`.kiro`,type:`directory`}],displayName:`Kiro`},{profileName:`zed`,markers:[{path:`.zed`,type:`directory`}],displayName:`Zed`},{profileName:`kilo`,markers:[{path:`.kilo`,type:`directory`}],displayName:`Kilo Code`},{profileName:`trae`,markers:[{path:`.trae`,type:`directory`}],displayName:`Trae`},{profileName:`gemini`,markers:[{path:`.gemini`,type:`directory`},{path:`GEMINI.md`,type:`file`}],displayName:`Gemini`},{profileName:`opencode`,markers:[{path:`.opencode`,type:`directory`}],displayName:`OpenCode`},{profileName:`codex`,markers:[{path:`.codex`,type:`directory`}],displayName:`Codex`}];function lt(e){let{projectRoot:t}=e,n=[];for(let e of ct)for(let r of e.markers){let i=C.join(t,r.path);try{let t=S.statSync(i);if(r.type===`directory`?t.isDirectory():t.isFile()){n.push({profileName:e.profileName,markerPath:r.path,displayName:e.displayName,exists:!0});break}}catch{}}return n}function ut(e){return lt(e).map(e=>e.profileName)}const dt={solo:[`rules/taskmaster.mdc`,`rules/dev_workflow.mdc`,`rules/self_improve.mdc`,`rules/cursor_rules.mdc`,`rules/taskmaster_hooks_workflow.mdc`],team:[`rules/hamster.mdc`]};function ft(e,t){return t===`team`?Object.fromEntries(Object.entries(e).filter(([e])=>dt.team.includes(e))):Object.fromEntries(Object.entries(e).filter(([e])=>dt.solo.includes(e)))}function G(e){let{name:t,displayName:n=t,url:r,docsUrl:i,profileDir:a=`.${t.toLowerCase()}`,rulesDir:o=`${a}/rules`,mcpConfig:s=!0,mcpConfigName:c=s?`mcp.json`:null,fileExtension:l=`.mdc`,targetExtension:u=`.md`,toolMappings:d={},customReplacements:f=[],fileMap:p={},supportsRulesSubdirectories:m=!1,includeDefaultRules:g=!0,onAdd:_,onRemove:v,onPostConvert:y}=e,ee=c?C.join(a,c):null,b=m?`taskmaster/`:``,x={"rules/cursor_rules.mdc":`${t.toLowerCase()}_rules${u}`,"rules/dev_workflow.mdc":`${b}dev_workflow${u}`,"rules/self_improve.mdc":`self_improve${u}`,"rules/taskmaster.mdc":`${b}taskmaster${u}`,"rules/hamster.mdc":`${b}hamster${u}`},S=g?{...x,...p}:p,w=[{from:/cursor\.so/gi,to:r},{from:/cursor\s*\.\s*so/gi,to:r},{from:/https?:\/\/cursor\.so/gi,to:`https://${r}`},{from:/https?:\/\/www\.cursor\.so/gi,to:`https://www.${r}`},{from:/\bedit_file\b/gi,to:d.edit_file||`edit_file`},{from:/\bsearch tool\b/gi,to:`${d.search||`search`} tool`},{from:/\bSearch Tool\b/g,to:`${d.search||`Search`} Tool`},{from:/\bcursor\b/gi,to:e=>e.charAt(0)===`C`?n:t.toLowerCase()},{from:/Cursor/g,to:n},{from:/CURSOR/g,to:n.toUpperCase()},...u===l?[]:[{from:RegExp(`\\${l}(?!\\])\\b`,`g`),to:u}],{from:/docs\.cursor\.com/gi,to:i},...f],T={search:`search`,read_file:`read_file`,edit_file:`edit_file`,create_file:`create_file`,run_command:`run_command`,terminal_command:`terminal_command`,use_mcp:`use_mcp`,switch_mode:`switch_mode`,...d},E={profileTerms:[{from:/cursor\.so/g,to:r},{from:/\[cursor\.so\]/g,to:`[${r}]`},{from:/href="https:\/\/cursor\.so/g,to:`href="https://${r}`},{from:/\(https:\/\/cursor\.so/g,to:`(https://${r}`},{from:/\bcursor\b/gi,to:e=>e===`Cursor`?n:t.toLowerCase()},{from:/Cursor/g,to:n}],fileExtensions:u===l?[]:[{from:RegExp(`\\${l}\\b`,`g`),to:u}],docUrls:[{from:RegExp(`https:\\/\\/docs\\.cursor\\.com\\/[^\\s)'"]+`,`g`),to:e=>e.replace(`docs.cursor.com`,i)},{from:RegExp(`https:\\/\\/${i}\\/`,`g`),to:`https://${i}/`}],toolNames:T,toolContexts:Object.entries(T).flatMap(([e,t])=>[{from:RegExp(`\\b${e} tool\\b`,`g`),to:`${t} tool`},{from:RegExp(`\\bthe ${e}\\b`,`g`),to:`the ${t}`},{from:RegExp(`\\bThe ${e}\\b`,`g`),to:`The ${t}`},{from:RegExp(`\\bCursor ${e}\\b`,`g`),to:`${n} ${t}`}]),toolGroups:[{from:/\bSearch tools\b/g,to:`Read Group tools`},{from:/\bEdit tools\b/g,to:`Edit Group tools`},{from:/\bRun tools\b/g,to:`Command Group tools`},{from:/\bMCP servers\b/g,to:`MCP Group tools`},{from:/\bSearch Group\b/g,to:`Read Group`},{from:/\bEdit Group\b/g,to:`Edit Group`},{from:/\bRun Group\b/g,to:`Command Group`}],fileReferences:{pathPattern:/\[(.+?)\]\(mdc:\.cursor\/rules\/(.+?)\.mdc\)/g,replacement:(e,n,r)=>{let i=C.basename(r,`.mdc`),a=S[`rules/${i}.mdc`]||`${i}${u}`,s=C.basename(a);return t.toLowerCase()===`cursor`?`[${s}](mdc:${o}/${a})`:`[${s}](${o}/${a})`}}};function D(e){return S[e]?S[e]:u===l?e:e.replace(RegExp(`\\${l}$`),u)}let O=null;try{let e=rt(t);e?.supportsCommands&&(O={profile:e,commands:V})}catch(e){h(`debug`,`[${n}] Slash command profile lookup failed: ${e.message}`)}return{profileName:t,displayName:n,profileDir:a,rulesDir:o,mcpConfig:s,mcpConfigName:c,mcpConfigPath:ee,supportsRulesSubdirectories:m,includeDefaultRules:g,fileMap:S,globalReplacements:w,conversionConfig:E,getTargetRuleFilename:D,targetExtension:u,slashCommands:O,..._&&{onAddRulesProfile:_},...v&&{onRemoveRulesProfile:v},...y&&{onPostConvertRulesProfile:y}}}const pt={STANDARD:{},ROO_STYLE:{edit_file:`apply_diff`,search:`search_files`,create_file:`write_to_file`,run_command:`execute_command`,terminal_command:`execute_command`,use_mcp:`use_mcp_tool`}};function mt(e){let t={};e.mcpServers&&(t[`amp.mcpServers`]=e.mcpServers);for(let[n,r]of Object.entries(e))n!==`mcpServers`&&(t[n]=r);return t}function ht(e,t){let n=C.join(t,`AGENTS.md`),r=C.join(e,`AGENT.md`),i=C.join(e,`.taskmaster`,`AGENT.md`),a=`@./.taskmaster/AGENT.md`,o=`\n## Task Master AI Instructions\n**Import Task Master's development workflow commands and guidelines, treat as if import is in the main AGENT.md file.**\n${a}`;if(S.existsSync(n))try{let t=C.join(e,`.taskmaster`);if(S.existsSync(t)||S.mkdirSync(t,{recursive:!0}),S.copyFileSync(n,i),h(`debug`,`[Amp] Created Task Master instructions at ${i}`),S.existsSync(r)){let e=S.readFileSync(r,`utf8`);if(e.includes(a))h(`info`,`[Amp] Task Master import already present in ${r}`);else{let t=e.trim()+`
3471
+ `+o+`
3472
+ `;S.writeFileSync(r,t),h(`info`,`[Amp] Added Task Master import to existing ${r}`)}}else{let e=`# Amp Instructions\n${o}\n`;S.writeFileSync(r,e),h(`info`,`[Amp] Created ${r} with Task Master import`)}}catch(e){h(`error`,`[Amp] Failed to set up Amp instructions: ${e.message}`)}}function gt(e){let t=C.join(e,`AGENT.md`),n=C.join(e,`.taskmaster`,`AGENT.md`);try{if(S.existsSync(n)&&(S.rmSync(n,{force:!0}),h(`debug`,`[Amp] Removed ${n}`)),S.existsSync(t)){let e=S.readFileSync(t,`utf8`).split(`
3473
+ `),n=[],r=0;for(let t=0;t<e.length;t++){if(r>0){r--;continue}if(e[t].includes(`## Task Master AI Instructions`)){r=2;continue}e[t].trim()!==`@./.taskmaster/AGENT.md`&&n.push(e[t])}let i=n.join(`
3474
+ `).replace(/\n{3,}/g,`
3475
+
3476
+ `).trim();i===`# Amp Instructions`||i===``?(S.rmSync(t,{force:!0}),h(`debug`,`[Amp] Removed empty ${t}`)):(S.writeFileSync(t,i+`
3477
+ `),h(`debug`,`[Amp] Removed Task Master import from ${t}`))}}catch(e){h(`error`,`[Amp] Failed to remove Amp instructions: ${e.message}`)}let r=C.join(e,`.vscode`,`settings.json`);if(!S.existsSync(r)){h(`debug`,`[Amp] No .vscode/settings.json found to clean up`);return}try{let t=S.readFileSync(r,`utf8`),n=JSON.parse(t);if(n[`amp.mcpServers`]&&n[`amp.mcpServers`][`task-master-ai`])if(delete n[`amp.mcpServers`][`task-master-ai`],Object.keys(n[`amp.mcpServers`]).length===0&&(delete n[`amp.mcpServers`],h(`debug`,`[Amp] Removed empty amp.mcpServers section`)),Object.keys(n).length===0){S.rmSync(r,{force:!0}),h(`info`,`[Amp] Removed empty settings.json file`);let t=C.join(e,`.vscode`);S.existsSync(t)&&S.readdirSync(t).length===0&&(S.rmSync(t,{recursive:!0,force:!0}),h(`debug`,`[Amp] Removed empty .vscode directory`))}else S.writeFileSync(r,JSON.stringify(n,null,` `)+`
3478
+ `),h(`info`,`[Amp] Removed TaskMaster from settings.json, preserved other configurations`);else h(`debug`,`[Amp] TaskMaster not found in amp.mcpServers`)}catch(e){h(`error`,`[Amp] Failed to clean up settings.json: ${e.message}`)}}function _t(e,t){ht(e,t);let n=C.join(e,`.vscode`,`settings.json`);if(!S.existsSync(n)){h(`debug`,`[Amp] No .vscode/settings.json found to transform`);return}try{let e=S.readFileSync(n,`utf8`),t=JSON.parse(e);if(t[`amp.mcpServers`]){h(`info`,`[Amp] settings.json already in Amp format, skipping transformation`);return}let r=mt(t);S.writeFileSync(n,JSON.stringify(r,null,` `)+`
3479
+ `),h(`info`,`[Amp] Transformed settings.json to Amp format`),h(`debug`,`[Amp] Renamed mcpServers to amp.mcpServers`)}catch(e){h(`error`,`[Amp] Failed to transform settings.json: ${e.message}`)}}const vt=G({name:`amp`,displayName:`Amp`,url:`ampcode.com`,docsUrl:`ampcode.com/manual`,profileDir:`.vscode`,rulesDir:`.`,mcpConfig:!0,mcpConfigName:`settings.json`,includeDefaultRules:!1,fileMap:{"AGENTS.md":`.taskmaster/AGENT.md`},onAdd:ht,onRemove:gt,onPostConvert:_t});function yt(e,t){h(`info`,`[Claude] Commands and agents are now available via the Task Master plugin`),h(`info`,`[Claude] Install with: /plugin marketplace add taskmaster`),h(`info`,`[Claude] Then: /plugin install taskmaster@taskmaster`);let n=C.join(t,`AGENTS.md`),r=C.join(e,`CLAUDE.md`),i=C.join(e,`.taskmaster`,`CLAUDE.md`),a=`@./.taskmaster/CLAUDE.md`,o=`\n## Task Master AI Instructions\n**Import Task Master's development workflow commands and guidelines, treat as if import is in the main CLAUDE.md file.**\n${a}`;if(S.existsSync(n))try{let t=C.join(e,`.taskmaster`);if(S.existsSync(t)||S.mkdirSync(t,{recursive:!0}),S.copyFileSync(n,i),h(`debug`,`[Claude] Created Task Master instructions at ${i}`),S.existsSync(r)){let e=S.readFileSync(r,`utf8`);if(e.includes(a))h(`info`,`[Claude] Task Master import already present in ${r}`);else{let t=e.trim()+`
3480
+ `+o+`
3481
+ `;S.writeFileSync(r,t),h(`info`,`[Claude] Added Task Master import to existing ${r}`)}}else{let e=`# Claude Code Instructions\n${o}\n`;S.writeFileSync(r,e),h(`info`,`[Claude] Created ${r} with Task Master import`)}}catch(e){h(`error`,`[Claude] Failed to set up Claude instructions: ${e.message}`)}let s=st();s.success?s.alreadyExists?h(`debug`,`[Claude] Deferred MCP loading already configured`):(h(`info`,`[Claude] Enabled deferred MCP loading in ${s.shellConfigFile}`),h(`info`,`[Claude] Restart your terminal for changes to take effect`)):h(`debug`,`[Claude] Could not configure deferred loading: ${s.message}`)}function bt(e){h(`info`,`[Claude] To remove Task Master commands/agents, uninstall the plugin with: /plugin uninstall taskmaster`);let t=C.join(e,`CLAUDE.md`),n=C.join(e,`.taskmaster`,`CLAUDE.md`);try{if(S.existsSync(n)&&(S.rmSync(n,{force:!0}),h(`debug`,`[Claude] Removed ${n}`)),S.existsSync(t)){let e=S.readFileSync(t,`utf8`).split(`
3482
+ `),n=[],r=0;for(let t=0;t<e.length;t++){if(r>0){r--;continue}if(e[t].includes(`## Task Master AI Instructions`)){r=2;continue}e[t].trim()!==`@./.taskmaster/CLAUDE.md`&&n.push(e[t])}let i=n.join(`
3483
+ `).replace(/\n{3,}/g,`
3484
+
3485
+ `).trim();i===`# Claude Code Instructions`||i===``?(S.rmSync(t,{force:!0}),h(`debug`,`[Claude] Removed empty ${t}`)):(S.writeFileSync(t,i+`
3486
+ `),h(`debug`,`[Claude] Removed Task Master import from ${t}`))}}catch(e){h(`error`,`[Claude] Failed to remove Claude instructions: ${e.message}`)}}function xt(e){let t={};if(e.mcpServers){t.mcpServers={};for(let[n,r]of Object.entries(e.mcpServers)){let e={};e.type=`stdio`,r.command&&(e.command=r.command),r.args&&(e.args=r.args),r.env&&(e.env=r.env),Object.keys(r).forEach(t=>{[`command`,`args`,`env`,`type`].includes(t)||(e[t]=r[t])}),t.mcpServers[n]=e}}return t}function St(e,t){yt(e,t);let n=C.join(e,`.mcp.json`);if(S.existsSync(n))try{let e=xt(JSON.parse(S.readFileSync(n,`utf8`)));S.writeFileSync(n,JSON.stringify(e,null,` `)+`
3487
+ `),h(`debug`,`[Claude] Transformed MCP configuration to Claude format at ${n}`)}catch(e){h(`error`,`[Claude] Failed to transform MCP configuration: ${e.message}`)}}const Ct=G({name:`claude`,displayName:`Claude Code`,url:`claude.ai`,docsUrl:`docs.anthropic.com/en/docs/claude-code`,profileDir:`.`,rulesDir:`.`,mcpConfigName:`.mcp.json`,includeDefaultRules:!1,fileMap:{"AGENTS.md":`.taskmaster/CLAUDE.md`},onAdd:yt,onRemove:bt,onPostConvert:St}),wt=G({name:`cline`,displayName:`Cline`,url:`cline.bot`,docsUrl:`docs.cline.bot`,profileDir:`.clinerules`,rulesDir:`.clinerules`,mcpConfig:!1}),Tt=G({name:`codex`,displayName:`Codex`,url:`codex.ai`,docsUrl:`platform.openai.com/docs/codex`,profileDir:`.`,rulesDir:`.`,mcpConfig:!1,mcpConfigName:null,includeDefaultRules:!1,fileMap:{"AGENTS.md":`AGENTS.md`}}),Et=G({name:`cursor`,displayName:`Cursor`,url:`cursor.so`,docsUrl:`docs.cursor.com`,targetExtension:`.mdc`,supportsRulesSubdirectories:!0}),Dt=G({name:`gemini`,displayName:`Gemini`,url:`codeassist.google`,docsUrl:`github.com/google-gemini/gemini-cli`,profileDir:`.gemini`,rulesDir:`.`,mcpConfigName:`settings.json`,includeDefaultRules:!1,fileMap:{"AGENT.md":`AGENTS.md`,"GEMINI.md":`GEMINI.md`}});function Ot(e){let t=[{from:/\broo\b/gi,to:e=>e.charAt(0)===`R`?`Kilo`:`kilo`},{from:/Roo/g,to:`Kilo`},{from:/ROO/g,to:`KILO`},{from:/roocode\.com/gi,to:`kilocode.com`},{from:/docs\.roocode\.com/gi,to:`docs.kilocode.com`},{from:/https?:\/\/roocode\.com/gi,to:`https://kilocode.com`},{from:/https?:\/\/docs\.roocode\.com/gi,to:`https://docs.kilocode.com`},{from:/\.roo\//g,to:`.kilo/`},{from:/\.roomodes/g,to:`.kilocodemodes`},{from:/roo-rules/g,to:`kilo-rules`},{from:/rules-roo/g,to:`rules-kilo`}],n=e;for(let e of t)n=n.replace(e.from,e.to);return n}function kt(e,t){let n=S.existsSync(e),r=n&&S.statSync(e);n&&r.isDirectory()?(S.existsSync(t)||S.mkdirSync(t,{recursive:!0}),S.readdirSync(e).forEach(n=>{kt(C.join(e,n),C.join(t,n))})):S.copyFileSync(e,t)}function At(e,t){let n=C.join(t,`roocode`);if(!S.existsSync(n)){h(`error`,`[Kilo] Source directory does not exist: ${n}`);return}kt(n,e),h(`debug`,`[Kilo] Copied roocode directory to ${e}`);let r=C.join(n,`.roomodes`),i=C.join(e,`.kilocodemodes`);if(S.existsSync(r))try{let t=Ot(S.readFileSync(r,`utf8`));S.writeFileSync(i,t),h(`debug`,`[Kilo] Created .kilocodemodes at ${i}`),S.unlinkSync(C.join(e,`.roomodes`))}catch(e){h(`error`,`[Kilo] Failed to transform .roomodes: ${e.message}`)}let a=C.join(n,`.roo`),o=C.join(e,`.kilo`);S.existsSync(C.join(e,`.roo`))&&S.rmSync(C.join(e,`.roo`),{recursive:!0,force:!0});for(let e of se){let t=C.join(a,`rules-${e}`,`${e}-rules`),n=C.join(o,`rules-${e}`,`${e}-rules`);if(S.existsSync(t))try{let r=C.dirname(n);S.existsSync(r)||S.mkdirSync(r,{recursive:!0});let i=Ot(S.readFileSync(t,`utf8`));S.writeFileSync(n,i),h(`debug`,`[Kilo] Transformed and copied ${e}-rules to ${n}`)}catch(e){h(`error`,`[Kilo] Failed to transform ${t} to ${n}: ${e.message}`)}}}function jt(e){let t=C.join(e,`.kilocodemodes`);if(S.existsSync(t))try{S.rmSync(t,{force:!0}),h(`debug`,`[Kilo] Removed .kilocodemodes from ${t}`)}catch(e){h(`error`,`[Kilo] Failed to remove .kilocodemodes: ${e.message}`)}let n=C.join(e,`.kilo`);if(S.existsSync(n)&&(S.readdirSync(n).forEach(e=>{if(e.startsWith(`rules-`)){let t=C.join(n,e);try{S.rmSync(t,{recursive:!0,force:!0}),h(`debug`,`[Kilo] Removed ${e} directory from ${t}`)}catch(e){h(`error`,`[Kilo] Failed to remove ${t}: ${e.message}`)}}}),S.readdirSync(n).length===0))try{S.rmSync(n,{recursive:!0,force:!0}),h(`debug`,`[Kilo] Removed empty .kilo directory from ${n}`)}catch(e){h(`error`,`[Kilo] Failed to remove .kilo directory: ${e.message}`)}}function Mt(e,t){At(e,t)}const Nt=G({name:`kilo`,displayName:`Kilo Code`,url:`kilocode.com`,docsUrl:`docs.kilocode.com`,profileDir:`.kilo`,rulesDir:`.kilo/rules`,toolMappings:pt.ROO_STYLE,fileMap:{"rules/cursor_rules.mdc":`kilo_rules.md`,"rules/dev_workflow.mdc":`dev_workflow.md`,"rules/self_improve.mdc":`self_improve.md`,"rules/taskmaster.mdc":`taskmaster.md`},onAdd:At,onRemove:jt,onPostConvert:Mt}),Pt=G({name:`kiro`,displayName:`Kiro`,url:`kiro.dev`,docsUrl:`kiro.dev/docs`,profileDir:`.kiro`,rulesDir:`.kiro/steering`,mcpConfig:!0,mcpConfigName:`settings/mcp.json`,includeDefaultRules:!0,targetExtension:`.md`,fileMap:{"rules/taskmaster_hooks_workflow.mdc":`taskmaster_hooks_workflow.md`},customReplacements:[{from:/\.cursor\/rules/g,to:`.kiro/steering`},{from:/\.cursor\/mcp\.json/g,to:`.kiro/settings/mcp.json`},{from:/\.kiro\/rules/g,to:`.kiro/steering`},{from:/\[(.+?)\]\(mdc:\.cursor\/rules\/(.+?)\.mdc\)/g,to:`[$1](.kiro/steering/$2.md)`},{from:/rules directory/g,to:`steering directory`},{from:/cursor rules/gi,to:`Kiro steering files`},{from:/^---\n(?:description:\s*[^\n]*\n)?(?:globs:\s*[^\n]*\n)?(?:alwaysApply:\s*true\n)?---/m,to:`---
3488
+ inclusion: always
3489
+ ---`}],onPostConvert:(e,t)=>{let n=C.join(t,`kiro-hooks`),r=C.join(e,`.kiro`,`hooks`);if(S.existsSync(r)||S.mkdirSync(r,{recursive:!0}),S.existsSync(n)){let e=S.readdirSync(n).filter(e=>e.endsWith(`.kiro.hook`));e.forEach(e=>{let t=C.join(n,e),i=C.join(r,e);S.copyFileSync(t,i)}),e.length>0&&h(`info`,`[Kiro] Installed ${e.length} Taskmaster hooks in .kiro/hooks/`)}}});function Ft(e){let t={$schema:`https://opencode.ai/config.json`};if(e.mcpServers){t.mcp={};for(let[n,r]of Object.entries(e.mcpServers)){let e={type:`local`};r.command&&r.args?e.command=[r.command,...r.args]:r.command&&(e.command=[r.command]),e.enabled=!0,r.env&&(e.environment=r.env),t.mcp[n]=e}}return t}function It(e,t){let n=C.join(e,`opencode.json`);if(!S.existsSync(n)){h(`debug`,`[OpenCode] No opencode.json found to transform`);return}try{let e=S.readFileSync(n,`utf8`),t=JSON.parse(e);if(t.$schema){h(`info`,`[OpenCode] opencode.json already in OpenCode format, skipping transformation`);return}let r=Ft(t);S.writeFileSync(n,JSON.stringify(r,null,2)+`
3490
+ `),h(`info`,`[OpenCode] Transformed opencode.json to OpenCode format`),h(`debug`,`[OpenCode] Added schema, renamed mcpServers->mcp, combined command+args, added type/enabled, renamed env->environment`)}catch(e){h(`error`,`[OpenCode] Failed to transform opencode.json: ${e.message}`)}}function Lt(e){let t=C.join(e,`opencode.json`);if(!S.existsSync(t)){h(`debug`,`[OpenCode] No opencode.json found to clean up`);return}try{let e=S.readFileSync(t,`utf8`),n=JSON.parse(e);n.mcp&&n.mcp[`taskmaster-ai`]?(delete n.mcp[`taskmaster-ai`],Object.keys(n.mcp).length===0&&delete n.mcp,Object.keys(n).filter(e=>e!==`$schema`).length===0?(S.rmSync(t,{force:!0}),h(`info`,`[OpenCode] Removed empty opencode.json file`)):(S.writeFileSync(t,JSON.stringify(n,null,2)+`
3491
+ `),h(`info`,`[OpenCode] Removed TaskMaster from opencode.json, preserved other configurations`))):h(`debug`,`[OpenCode] TaskMaster not found in opencode.json`)}catch(e){h(`error`,`[OpenCode] Failed to clean up opencode.json: ${e.message}`)}}const Rt=G({name:`opencode`,displayName:`OpenCode`,url:`opencode.ai`,docsUrl:`opencode.ai/docs/`,profileDir:`.`,rulesDir:`.`,mcpConfigName:`opencode.json`,includeDefaultRules:!1,fileMap:{"AGENTS.md":`AGENTS.md`},onPostConvert:It,onRemove:Lt});function zt(e){if(!S.existsSync(e)){h(`warn`,`[Roo] MCP configuration file not found at ${e}`);return}try{let t=JSON.parse(S.readFileSync(e,`utf8`));if(t.mcpServers&&t.mcpServers[`task-master-ai`]){let n=t.mcpServers[`task-master-ai`];n.timeout=300,S.writeFileSync(e,R(t)+`
3492
+ `),h(`debug`,`[Roo] Enhanced MCP configuration with timeout at ${e}`)}else h(`warn`,`[Roo] task-master-ai server not found in MCP configuration`)}catch(e){h(`error`,`[Roo] Failed to enhance MCP configuration: ${e.message}`)}}function Bt(e,t){let n=C.join(t,`roocode`);if(!S.existsSync(n)){h(`error`,`[Roo] Source directory does not exist: ${n}`);return}Vt(n,e),h(`debug`,`[Roo] Copied roocode directory to ${e}`);let r=C.join(n,`.roo`),i=C.join(n,`.roomodes`),a=C.join(e,`.roomodes`);if(S.existsSync(i))try{S.copyFileSync(i,a),h(`debug`,`[Roo] Copied .roomodes to ${a}`)}catch(e){h(`error`,`[Roo] Failed to copy .roomodes: ${e.message}`)}for(let t of se){let n=C.join(r,`rules-${t}`,`${t}-rules`),i=C.join(e,`.roo`,`rules-${t}`,`${t}-rules`);if(S.existsSync(n))try{let e=C.dirname(i);S.existsSync(e)||S.mkdirSync(e,{recursive:!0}),S.copyFileSync(n,i),h(`debug`,`[Roo] Copied ${t}-rules to ${i}`)}catch(e){h(`error`,`[Roo] Failed to copy ${n} to ${i}: ${e.message}`)}}}function Vt(e,t){let n=S.existsSync(e),r=n&&S.statSync(e);n&&r.isDirectory()?(S.existsSync(t)||S.mkdirSync(t,{recursive:!0}),S.readdirSync(e).forEach(n=>{Vt(C.join(e,n),C.join(t,n))})):S.copyFileSync(e,t)}function Ht(e){let t=C.join(e,`.roomodes`);if(S.existsSync(t))try{S.rmSync(t,{force:!0}),h(`debug`,`[Roo] Removed .roomodes from ${t}`)}catch(e){h(`error`,`[Roo] Failed to remove .roomodes: ${e.message}`)}let n=C.join(e,`.roo`);if(S.existsSync(n)){let e=C.join(n,`mcp.json`);try{S.rmSync(e,{force:!0}),h(`debug`,`[Roo] Removed MCP configuration from ${e}`)}catch(e){h(`error`,`[Roo] Failed to remove MCP configuration: ${e.message}`)}if(S.readdirSync(n).forEach(e=>{if(e.startsWith(`rules-`)){let t=C.join(n,e);try{S.rmSync(t,{recursive:!0,force:!0}),h(`debug`,`[Roo] Removed ${e} directory from ${t}`)}catch(e){h(`error`,`[Roo] Failed to remove ${t}: ${e.message}`)}}}),S.readdirSync(n).length===0)try{S.rmSync(n,{recursive:!0,force:!0}),h(`debug`,`[Roo] Removed empty .roo directory from ${n}`)}catch(e){h(`error`,`[Roo] Failed to remove .roo directory: ${e.message}`)}}}function Ut(e,t){let n=C.join(e,`.roo`,`mcp.json`);try{zt(n)}catch(e){h(`error`,`[Roo] Failed to enhance MCP configuration: ${e.message}`)}}const Wt=G({name:`roo`,displayName:`Roo Code`,url:`roocode.com`,docsUrl:`docs.roocode.com`,toolMappings:pt.ROO_STYLE,mcpConfig:!0,onAdd:Bt,onRemove:Ht,onPostConvert:Ut}),Gt=G({name:`trae`,displayName:`Trae`,url:`trae.ai`,docsUrl:`docs.trae.ai`,mcpConfig:!1});function Kt(e){let t={};if(e.mcpServers){t.servers={};for(let[n,r]of Object.entries(e.mcpServers)){let e={...r};if(e.env){let r={};e.command&&(r.command=e.command),e.args&&(r.args=e.args),e.env&&(r.env=e.env),r.type=`stdio`,Object.keys(e).forEach(t=>{[`command`,`args`,`env`,`type`].includes(t)||(r[t]=e[t])}),t.servers[n]=r}else e.type=`stdio`,t.servers[n]=e}}return t}function qt(e,t){let n=C.join(e,`.vscode`,`mcp.json`);if(!S.existsSync(n)){h(`debug`,`[VS Code] No .vscode/mcp.json found to transform`);return}try{let e=S.readFileSync(n,`utf8`),t=JSON.parse(e);if(t.servers){h(`info`,`[VS Code] mcp.json already in VS Code format, skipping transformation`);return}let r=Kt(t);S.writeFileSync(n,JSON.stringify(r,null,2)+`
3493
+ `),h(`info`,`[VS Code] Transformed mcp.json to VS Code format`),h(`debug`,`[VS Code] Renamed mcpServers->servers, added type: "stdio"`)}catch(e){h(`error`,`[VS Code] Failed to transform mcp.json: ${e.message}`)}}function Jt(e){let t=C.join(e,`.vscode`,`mcp.json`);if(!S.existsSync(t)){h(`debug`,`[VS Code] No .vscode/mcp.json found to clean up`);return}try{let e=S.readFileSync(t,`utf8`),n=JSON.parse(e);if(n.servers&&n.servers[`task-master-ai`])if(delete n.servers[`task-master-ai`],Object.keys(n.servers).length===0){S.rmSync(t,{force:!0}),h(`info`,`[VS Code] Removed empty mcp.json file`);let e=C.dirname(t);try{S.readdirSync(e).length===0&&(S.rmSync(e,{recursive:!0,force:!0}),h(`debug`,`[VS Code] Removed empty .vscode directory`))}catch{}}else S.writeFileSync(t,JSON.stringify(n,null,2)+`
3494
+ `),h(`info`,`[VS Code] Removed TaskMaster from mcp.json, preserved other configurations`);else h(`debug`,`[VS Code] TaskMaster not found in mcp.json`)}catch(e){h(`error`,`[VS Code] Failed to clean up mcp.json: ${e.message}`)}}const Yt=G({name:`vscode`,displayName:`VS Code`,url:`code.visualstudio.com`,docsUrl:`code.visualstudio.com/docs`,rulesDir:`.github/instructions`,profileDir:`.vscode`,mcpConfigName:`mcp.json`,targetExtension:`.instructions.md`,customReplacements:[{from:/\.cursor\/rules/g,to:`.github/instructions`},{from:/\.cursor\/mcp\.json/g,to:`.vscode/mcp.json`},{from:/\.vscode\/rules/g,to:`.github/instructions`},{from:/^globs:\s*(.+)$/gm,to:`applyTo: "$1"`},{from:/^alwaysApply:\s*(true|false)\s*\n?/gm,to:``},{from:/\[(.+?)\]\(mdc:\.cursor\/rules\/(.+?)\.mdc\)/g,to:`[$1](.github/instructions/$2.instructions.md)`},{from:/rules directory/g,to:`instructions directory`},{from:/cursor rules/gi,to:`VS Code instructions`}],onPostConvert:qt,onRemove:Jt}),Xt=G({name:`windsurf`,displayName:`Windsurf`,url:`windsurf.com`,docsUrl:`docs.windsurf.com`});function Zt(e){let t={};e.mcpServers&&(t.context_servers=e.mcpServers);for(let[n,r]of Object.entries(e))n!==`mcpServers`&&(t[n]=r);return t}function Qt(e,t){}function $t(e){let t=C.join(e,`.rules`);try{S.existsSync(t)&&(S.rmSync(t,{force:!0}),h(`debug`,`[Zed] Removed ${t}`))}catch(e){h(`error`,`[Zed] Failed to remove Zed instructions: ${e.message}`)}let n=C.join(e,`.zed`,`settings.json`);if(!S.existsSync(n)){h(`debug`,`[Zed] No .zed/settings.json found to clean up`);return}try{let t=S.readFileSync(n,`utf8`),r=JSON.parse(t);if(r.context_servers&&r.context_servers[`task-master-ai`])if(delete r.context_servers[`task-master-ai`],Object.keys(r.context_servers).length===0&&(delete r.context_servers,h(`debug`,`[Zed] Removed empty context_servers section`)),Object.keys(r).length===0){S.rmSync(n,{force:!0}),h(`info`,`[Zed] Removed empty settings.json file`);let t=C.join(e,`.zed`);S.existsSync(t)&&S.readdirSync(t).length===0&&(S.rmSync(t,{recursive:!0,force:!0}),h(`debug`,`[Zed] Removed empty .zed directory`))}else S.writeFileSync(n,JSON.stringify(r,null,` `)+`
3495
+ `),h(`info`,`[Zed] Removed TaskMaster from settings.json, preserved other configurations`);else h(`debug`,`[Zed] TaskMaster not found in context_servers`)}catch(e){h(`error`,`[Zed] Failed to clean up settings.json: ${e.message}`)}}function en(e,t){let n=C.join(e,`.zed`,`settings.json`);if(!S.existsSync(n)){h(`debug`,`[Zed] No .zed/settings.json found to transform`);return}try{let e=S.readFileSync(n,`utf8`),t=JSON.parse(e);if(t.context_servers){h(`info`,`[Zed] settings.json already in Zed format, skipping transformation`);return}let r=Zt(t);r.context_servers&&r.context_servers[`task-master-ai`]&&(r.context_servers[`task-master-ai`].source=`custom`),S.writeFileSync(n,JSON.stringify(r,null,` `)+`
3496
+ `),h(`info`,`[Zed] Transformed settings.json to Zed format`),h(`debug`,`[Zed] Renamed mcpServers to context_servers`)}catch(e){h(`error`,`[Zed] Failed to transform settings.json: ${e.message}`)}}const tn=G({name:`zed`,displayName:`Zed`,url:`zed.dev`,docsUrl:`zed.dev/docs`,profileDir:`.zed`,rulesDir:`.`,mcpConfig:!0,mcpConfigName:`settings.json`,includeDefaultRules:!1,fileMap:{"AGENTS.md":`.rules`},onAdd:Qt,onRemove:$t,onPostConvert:en});var nn=e({ampProfile:()=>vt,claudeProfile:()=>Ct,clineProfile:()=>wt,codexProfile:()=>Tt,cursorProfile:()=>Et,geminiProfile:()=>Dt,kiloProfile:()=>Nt,kiroProfile:()=>Pt,opencodeProfile:()=>Rt,rooProfile:()=>Wt,traeProfile:()=>Gt,vscodeProfile:()=>Yt,windsurfProfile:()=>Xt,zedProfile:()=>tn});function K(e){return j.includes(e)}function q(e){if(!K(e))return null;let t=nn[`${e}Profile`];if(!t)throw Error(`Profile not found: static import missing for '${e}'. Valid profiles: ${j.join(`, `)}`);return t}function rn(e,t){let n=e;return t.profileTerms.forEach(e=>{n=(e.to,n.replace(e.from,e.to))}),t.fileExtensions.forEach(e=>{n=n.replace(e.from,e.to)}),n}function an(e,t){let n=e,r=t.toolNames,i=RegExp(`\\b(${Object.keys(r).join(`|`)})\\b`,`g`);return n=n.replace(i,(e,t)=>r[t]||t),t.toolContexts.forEach(e=>{n=n.replace(e.from,e.to)}),t.toolGroups.forEach(e=>{n=n.replace(e.from,e.to)}),n}function on(e,t){let n=e;return t.docUrls.forEach(e=>{n=(e.to,n.replace(e.from,e.to))}),n}function sn(e,t){let{pathPattern:n,replacement:r}=t.fileReferences;return e.replace(n,r)}function cn(e,t,n){let r=e;return r=sn(r,t),r=rn(r,t),r=an(r,t),r=on(r,t),n.forEach(e=>{r=(e.to,r.replace(e.from,e.to))}),r}function ln(e,t){let n=C.join(e,t.rulesDir);if(!S.existsSync(n))return;let r=Object.values(t.fileMap);for(let e of r){let t=C.join(n,e);if(S.existsSync(t))try{S.rmSync(t,{force:!0}),h(`debug`,`[Rule Transformer] Removed rule file: ${e}`)}catch(t){h(`warn`,`[Rule Transformer] Failed to remove rule file ${e}: ${t.message}`)}}}function J(e,t,n){let r=C.join(e,t.rulesDir),i=n?.mode,a=0,o=0;if(i&&(ln(e,t),h(`debug`,`[Rule Transformer] Cleaned up existing rules before adding ${i} mode rules`)),typeof t.onAddRulesProfile==`function`)try{let e=I();t.onAddRulesProfile(r,e),h(`debug`,`[Rule Transformer] Called onAddRulesProfile for ${t.profileName}`)}catch(e){h(`error`,`[Rule Transformer] onAddRulesProfile failed for ${t.profileName}: ${e.message}`),o++}let s=i?ft(t.fileMap,i):t.fileMap,c=Object.keys(s);if(c.length>0){S.existsSync(r)||S.mkdirSync(r,{recursive:!0});for(let e of c){let n=!e.startsWith(`rules/`);try{if(!xe(e)){h(`warn`,`[Rule Transformer] Source file not found: ${e}, skipping`);continue}let i=s[e],o=C.join(r,i),c=C.dirname(o);S.existsSync(c)||S.mkdirSync(c,{recursive:!0});let l=L(e,`utf8`);n||(l=cn(l,t.conversionConfig,t.globalReplacements)),S.writeFileSync(o,l,`utf8`),a++,h(`debug`,`[Rule Transformer] ${n?`Copied`:`Converted`} ${e} -> ${i} for ${t.profileName}`)}catch(r){o++,h(`error`,`[Rule Transformer] Failed to ${n?`copy`:`convert`} ${e} for ${t.profileName}: ${r.message}`)}}}if(t.mcpConfig!==!1)try{Se(e,t.mcpConfigPath),h(`debug`,`[Rule Transformer] Setup MCP configuration for ${t.profileName}`)}catch(e){h(`error`,`[Rule Transformer] MCP setup failed for ${t.profileName}: ${e.message}`)}if(typeof t.onPostConvertRulesProfile==`function`)try{let e=I();t.onPostConvertRulesProfile(r,e),h(`debug`,`[Rule Transformer] Called onPostConvertRulesProfile for ${t.profileName}`)}catch(e){h(`error`,`[Rule Transformer] onPostConvertRulesProfile failed for ${t.profileName}: ${e.message}`)}if(t.slashCommands)try{let n=i?{mode:i}:void 0,r=t.slashCommands.profile.addSlashCommands(e,t.slashCommands.commands,n);r.success?h(`debug`,`[Rule Transformer] Created ${r.count} slash commands in ${r.directory}${i?` (mode: ${i})`:``}`):h(`error`,`[Rule Transformer] Failed to add slash commands for ${t.profileName}: ${r.error}`)}catch(e){h(`error`,`[Rule Transformer] Slash commands failed for ${t.profileName}: ${e.message}`)}return{success:Math.max(a,1),failed:o}}function un(e,t){let n=C.join(e,t.rulesDir),r=C.join(e,t.profileDir),i={profileName:t.profileName,success:!1,skipped:!1,error:null,filesRemoved:[],mcpResult:null,profileDirRemoved:!1,notice:null};try{if(typeof t.onRemoveRulesProfile==`function`)try{t.onRemoveRulesProfile(n),h(`debug`,`[Rule Transformer] Called onRemoveRulesProfile for ${t.profileName}`)}catch(e){h(`error`,`[Rule Transformer] onRemoveRulesProfile failed for ${t.profileName}: ${e.message}`)}let a=Object.keys(t.fileMap);if(a.length>0){if(!S.existsSync(r))return i.success=!0,i.skipped=!0,h(`debug`,`[Rule Transformer] Profile directory does not exist: ${r}`),i;let o=!1;if(S.existsSync(n)){let r=a.map(e=>t.fileMap[e]),s=[];if(n===e||t.rulesDir===`.`){let e=S.readdirSync(n);for(let t of e){if(t===`node_modules`||t===`.git`||t===`dist`)continue;let e=C.join(n,t);try{let n=S.lstatSync(e);n.isFile()?s.push(t):n.isDirectory()&&!n.isSymbolicLink()&&S.readdirSync(e,{recursive:!0}).forEach(e=>{s.push(C.join(t,e.toString()))})}catch{}}}else s=S.readdirSync(n,{recursive:!0});let c=s.filter(e=>{let t=C.join(n,e);try{return S.statSync(t).isFile()}catch{return!1}}).map(e=>e.toString());for(let e of r){let t=C.join(n,e);if(S.existsSync(t))try{S.rmSync(t,{force:!0}),i.filesRemoved.push(e),h(`debug`,`[Rule Transformer] Removed Task Master file: ${e}`)}catch(t){h(`error`,`[Rule Transformer] Failed to remove ${e}: ${t.message}`)}}let l=c.filter(e=>!r.includes(e));o=l.length>0,l.length===0?(S.rmSync(n,{recursive:!0,force:!0}),h(`debug`,`[Rule Transformer] Removed empty rules directory: ${n}`)):o&&(i.notice=`Preserved ${l.length} existing rule files in ${t.rulesDir}`,h(`info`,`[Rule Transformer] ${i.notice}`))}}if(t.mcpConfig!==!1)try{i.mcpResult=Ce(e,t.mcpConfigPath),i.mcpResult.hasOtherServers&&(i.notice?i.notice+=`; preserved other MCP server configurations`:i.notice=`Preserved other MCP server configurations`),h(`debug`,`[Rule Transformer] Processed MCP configuration for ${t.profileName}`)}catch(e){h(`error`,`[Rule Transformer] MCP cleanup failed for ${t.profileName}: ${e.message}`)}if(t.slashCommands)try{let n=t.slashCommands.profile.removeSlashCommands(e,t.slashCommands.commands);n.success&&n.count>0?h(`debug`,`[Rule Transformer] Removed ${n.count} slash commands for ${t.profileName}`):n.success||h(`error`,`[Rule Transformer] Failed to remove slash commands for ${t.profileName}: ${n.error}`)}catch(e){h(`error`,`[Rule Transformer] Slash command cleanup failed for ${t.profileName}: ${e.message}`)}if(S.existsSync(r)){let e=S.readdirSync(r);if(e.length===0&&t.profileDir!==`.`)try{S.rmSync(r,{recursive:!0,force:!0}),i.profileDirRemoved=!0,h(`debug`,`[Rule Transformer] Removed empty profile directory: ${r}`)}catch(e){h(`error`,`[Rule Transformer] Failed to remove profile directory ${r}: ${e.message}`)}else if(e.length>0){let n=`Preserved ${e.length} existing files/folders in ${t.profileDir}`;i.notice?i.notice+=`; ${n.toLowerCase()}`:i.notice=n,h(`info`,`[Rule Transformer] ${n}`)}}i.success=!0,h(`debug`,`[Rule Transformer] Successfully removed ${t.profileName} Task Master files from ${e}`)}catch(e){i.error=e.message,h(`error`,`[Rule Transformer] Failed to remove ${t.profileName} rules: ${e.message}`)}return i}function dn(e){try{let t=JSON.parse(S.readFileSync(e,`utf-8`));for(let e of[`main`,`research`,`fallback`])if(t.models&&t.models[e]){let n=t.models[e].provider,r=t.models[e].modelId;if(s[n]){let i=s[n].find(e=>e.id===r);i&&i.max_tokens&&(t.models[e].maxTokens=i.max_tokens)}}return S.writeFileSync(e,JSON.stringify(t,null,2)),!0}catch(e){return console.error(`Error updating config maxTokens:`,e.message),!1}}const Y={debug:0,info:1,warn:2,error:3,success:4},fn=process.env.TASKMASTER_LOG_LEVEL?Y[process.env.TASKMASTER_LOG_LEVEL.toLowerCase()]:Y.info;function pn(){m()||y()}function X(e,...t){let n={debug:x.gray(`•`),info:x.blue(`→`),warn:x.yellow(`!`),error:x.red(`āœ—`),success:x.green(`āœ“`)};if(Y[e]>=fn){let r=n[e]||``;m()||(e===`error`?console.error(r,x.red(...t)):e===`warn`?console.warn(r,x.yellow(...t)):e===`success`?console.log(r,x.green(...t)):e===`info`?console.log(r,x.blue(...t)):console.log(r,...t))}if(process.env.DEBUG===`true`){let n=`[${e.toUpperCase()}] ${t.join(` `)}\n`;S.appendFileSync(`init-debug.log`,n)}}function Z(e){S.existsSync(e)||(S.mkdirSync(e,{recursive:!0}),X(`info`,`Created directory: ${e}`))}function mn(){let e=process.env.HOME||process.env.USERPROFILE,t;if(process.env.SHELL?.includes(`zsh`))t=C.join(e,`.zshrc`);else if(process.env.SHELL?.includes(`bash`))t=C.join(e,`.bashrc`);else return X(`debug`,`Could not determine shell type. Aliases not added.`),!1;try{if(!S.existsSync(t))return X(`debug`,`Shell config file ${t} not found.`),!1;let e=S.readFileSync(t,`utf8`),n=[{name:`tm`,line:`alias tm='task-master'`},{name:`taskmaster`,line:`alias taskmaster='task-master'`},{name:`hamster`,line:`alias hamster='task-master'`},{name:`ham`,line:`alias ham='task-master'`}].filter(t=>!e.includes(t.line));if(n.length===0)return X(`debug`,`All Task Master aliases already exist.`),!0;let r=n.map(e=>e.line).join(`
3497
+ `),i=`
3498
+ # Task Master aliases added on ${new Date().toLocaleDateString()}
3499
+ ${r}
3500
+ `;return S.appendFileSync(t,i),X(`debug`,`Added ${n.length} alias(es): ${n.map(e=>e.name).join(`, `)}`),!0}catch(e){return X(`debug`,`Failed to add aliases: ${e.message}`),!1}}function hn(e){let t=C.join(e,d);if(S.existsSync(t)){X(`debug`,`State file already exists, preserving current configuration`);return}let n={currentTag:`master`,lastSwitched:new Date().toISOString(),branchTagMapping:{},migrationNoticeShown:!1};try{S.writeFileSync(t,JSON.stringify(n,null,2)),X(`success`,`Created initial state file: ${t}`),X(`info`,`Default tag set to "master" for task organization`)}catch(e){X(`error`,`Failed to create state file: ${e.message}`)}}function Q(e,t,n={}){if(!xe(e)){X(`error`,`Source file not found: ${e}`);return}let r=L(e,`utf8`);if(Object.entries(n).forEach(([e,t])=>{let n=RegExp(`\\{\\{${e}\\}\\}`,`g`);r=r.replace(n,t)}),S.existsSync(t)){let e=C.basename(t);if(e===`.gitignore`){X(`info`,`${t} already exists, merging content...`);let e=S.readFileSync(t,`utf8`),n=new Set(e.split(`
3501
+ `).map(e=>e.trim())),i=r.split(`
3502
+ `).filter(e=>!n.has(e.trim()));if(i.length>0){let n=`${e.trim()}\n\n# Added by Taskmaster\n${i.join(`
3503
+ `)}`;S.writeFileSync(t,n),X(`success`,`Updated ${t} with additional entries`)}else X(`info`,`No new content to add to ${t}`);return}if(e===`README-task-master.md`){X(`info`,`${t} already exists`);let e=C.join(C.dirname(t),`README-task-master.md`);S.writeFileSync(e,r),X(`success`,`Created ${e} (preserved original README-task-master.md)`);return}X(`debug`,`${t} already exists, skipping.`);return}S.writeFileSync(t,r),X(`info`,`Created file: ${t}`)}async function gn(e={}){m()||pn(),e.git===!0?e.initGit=!0:e.git===!1&&(e.initGit=!1),e.gitTasks===!0?e.storeTasksInGit=!0:e.gitTasks===!1&&(e.storeTasksInGit=!1);let t=e.yes||e.name&&e.description,n;if(n=e.rulesExplicitlyProvided?e.rules:[],t){m()||console.log(`SKIPPING PROMPTS - Using defaults or provided values`),e.name,e.description,e.version,e.author;let t=e.dryRun||!1,r=e.initGit===void 0?!0:e.initGit,i=e.storeTasksInGit===void 0?!0:e.storeTasksInGit;if(t)return X(`info`,`DRY RUN MODE: No files will be modified`),X(`info`,`Would initialize Task Master project`),X(`info`,`Would create/update necessary project files`),X(`info`,`${r?`Would initialize Git repository`:`Would skip Git initialization`}`),X(`info`,`${i?`Would store tasks in Git`:`Would exclude tasks from Git`}`),{dryRun:!0};let a=e.storage||`local`;await bn(!0,r,i,t,{...e,preferredLanguage:`English`},n,a,null)}else{X(`debug`,`Required options not provided, proceeding with prompts.`);let t;try{let r=_n();X(`debug`,`Init started - taskmaster_id: ${r}`);let i=await yn();X(`debug`,`Storage selected: ${i} - taskmaster_id: ${r}`);let a=null;if(i===`cloud`)try{let e=f.getInstance(),t=await e.getAuthCredentials();t?(X(`success`,`Already authenticated with Hamster`),a=t):(X(`info`,`Starting authentication flow...`),console.log(x.blue(`
3504
+ šŸ” Authentication Required
3505
+ `)),console.log(x.white(` Selecting cloud storage will open your browser for authentication.`)),console.log(x.gray(` This enables sync across devices with Hamster.
3506
+ `)),a=await _(e),X(`debug`,`Auth completed - taskmaster_id: ${r}`));let n=await v(e,{promptMessage:`Select an organization to continue:`});n.success||X(`warn`,n.message||`Organization selection required`)}catch(e){X(`error`,`Failed to authenticate: ${e.message}. Falling back to local storage.`),i=`local`}t=A.createInterface({input:process.stdin,output:process.stdout});let o=!0,s=!0;i===`local`?(o=e.initGit===void 0?(await $(t,x.cyan(`Initialize a Git repository in project root? (Y/n): `),e=>{let t=e.trim().toLowerCase()!==`n`,n=t?x.green(`āœ“`):x.red(`āœ—`);return x.cyan(`Initialize a Git repository in project root?`)+` `+n+` `+x.dim(t?`Yes`:`No`)})).trim().toLowerCase()!==`n`:e.initGit,s=e.storeTasksInGit===void 0?(await $(t,x.cyan(`Store tasks in Git (tasks.json and tasks/ directory)? (Y/n): `),e=>{let t=e.trim().toLowerCase()!==`n`,n=t?x.green(`āœ“`):x.red(`āœ—`);return x.cyan(`Store tasks in Git (tasks.json and tasks/ directory)?`)+` `+n+` `+x.dim(t?`Yes`:`No`)})).trim().toLowerCase()!==`n`:e.storeTasksInGit):(o=!0,s=!1);let c=!1;e.rulesExplicitlyProvided?X(`info`,`Using rule profiles provided via command line: ${n.join(`, `)}`):c=(await $(t,x.cyan(`Set up AI IDE rules for better integration? (Cursor, Windsurf, etc.) (y/N): `),e=>{let t=e.trim().toLowerCase()===`y`,n=t?x.green(`āœ“`):x.red(`āœ—`);return x.cyan(`Set up AI IDE rules for better integration?`)+` `+n+` `+x.dim(t?`Yes`:`No`)})).trim().toLowerCase()===`y`;let l=(await $(t,x.cyan(`Preferred response language (English): `))).trim()||`English`;console.log(`
3507
+ `+x.bold(`Taskmaster Project Settings:`)),console.log(x.dim(`─`.repeat(50))),console.log(` `+x.dim(`Storage:`.padEnd(32)),x.white(i===`cloud`?`Hamster Studio`:`Local File Storage`));let u=c?x.green(`āœ“`):x.dim(`āœ—`);if(console.log(` `+x.dim(`AI IDE rules:`.padEnd(32)),u+` `+x.dim(c?`Yes`:`No`)),console.log(` `+x.dim(`Response language:`.padEnd(32)),x.white(l)),i===`local`){let e=o?x.green(`āœ“`):x.dim(`āœ—`);console.log(` `+x.dim(`Initialize Git repository:`.padEnd(32)),e+` `+x.dim(o?`Yes`:`No`));let t=s?x.green(`āœ“`):x.dim(`āœ—`);console.log(` `+x.dim(`Store tasks in Git:`.padEnd(32)),t+` `+x.dim(s?`Yes`:`No`))}if(console.log(x.dim(`─`.repeat(50))),(await $(t,x.yellow(`
3508
+ Do you want to continue with these settings? (Y/n): `))).trim().toLowerCase()===`n`){t.close(),X(`info`,`Project initialization cancelled by user`),process.exit(0);return}let d=e.dryRun||!1;if(d)return X(`info`,`DRY RUN MODE: No files will be modified`),X(`info`,`Would initialize Task Master project`),X(`info`,`Would create/update necessary project files`),X(`info`,`${o?`Would initialize Git repository`:`Would skip Git initialization`}`),X(`info`,`${s?`Would store tasks in Git`:`Would exclude tasks from Git`}`),{dryRun:!0};await bn(!0,o,s,d,{...e,shouldSetupRules:c,preferredLanguage:l},n,i,a),t.close()}catch(e){t&&t.close(),X(`error`,`Error during initialization process: ${e.message}`),process.exit(1)}}}function $(e,t,n){return new Promise(r=>{e.question(t,e=>{A.moveCursor(process.stdout,0,-1),A.cursorTo(process.stdout,0),A.clearLine(process.stdout,0),n&&process.stdout.write(n(e)+`
3509
+ `),r(e)})})}function _n(){return w()}function vn(e,t,n){try{if(!S.existsSync(e)){X(`warn`,`Config file does not exist, skipping storage configuration`);return}let n=S.readFileSync(e,`utf8`),r=JSON.parse(n);r.storage||={},t===`cloud`?(r.storage.type=`api`,r.storage.apiEndpoint=process.env.TM_BASE_DOMAIN||process.env.TM_PUBLIC_BASE_DOMAIN||`https://tryhamster.com/api`,r.storage.operatingMode=`team`,X(`debug`,`Connected to Hamster Studio`)):(r.storage.type=`file`,r.storage.operatingMode=`solo`,X(`debug`,`Configured storage for local file storage`)),S.writeFileSync(e,JSON.stringify(r,null,2)),X(`debug`,`Storage configuration updated in config.json`)}catch(e){X(`error`,`Failed to update storage configuration: ${e.message}`)}}async function yn(){if(m())return`local`;try{console.log(x.bold.cyan(`You need a plan before you execute.
3510
+ `));let{storageType:e}=await ie.prompt([{type:`list`,name:`storageType`,message:x.white(`How do you want to build it?
3511
+ `),choices:[{name:[x.bold(`Solo (Taskmaster)`),``,x.white(` • Parse your own PRDs into structured task lists and build with any IDE or background agents`),x.white(` • Agents execute tasks with precision, no scope creep, no going off-track`),x.white(` • Tasks live in a local JSON file, everything stays in your repo`),x.white(` • Upgrade to Hamster to bring the Taskmaster experience to your team`),``].join(`
3512
+ `),value:`local`,short:`Solo (Taskmaster)`},{name:[x.bold(`Together (Hamster)`),``,x.white(` • Write a brief with your team. Hamster refines it into a plan.`),x.white(` • Your team drafts, refines, and aligns on the same page before executing`),x.white(` • One brief, one plan, one source of truth for execution`),x.white(` • Access tasks on Taskmaster and execute with any AI agent`),``].join(`
3513
+ `),value:`cloud`,short:`Together (Hamster)`}],default:`local`,pageSize:20}]);return e}catch(e){if(e.isTtyError||e.name===`ExitPromptError`)return X(`warn`,`Storage selection cancelled, defaulting to local storage`),`local`;throw e}}async function bn(e,n,s,d,f,h=j,_=`local`,v=null){let y=process.cwd();X(`debug`,`Initializing project in ${y}`),Z(C.join(y,u)),Z(C.join(y,i)),Z(C.join(y,a)),Z(C.join(y,l)),Z(C.join(y,p)),hn(y);let b={year:new Date().getFullYear()},S=_===`cloud`?`team`:`solo`;function w(e){let t=q(e);t?J(y,t,{mode:S}):X(`warn`,`Unknown rule profile: ${e}`)}Q(`env.example`,C.join(y,c),b),Q(`config.json`,C.join(y,t),{...b});let T=C.join(y,t);dn(T)?X(`debug`,`Updated config with correct maxTokens values`):X(`debug`,`Could not update maxTokens in config`),vn(T,_,v);try{let e=L(`gitignore`,`utf8`);ve(C.join(y,o),e,s,X)}catch(e){X(`error`,`Failed to create .gitignore: ${e.message}`)}Q(`example_prd.txt`,C.join(y,r)),Q(`example_prd_rpg.txt`,C.join(y,p,`example_prd_rpg.txt`));try{n===!1?X(`info`,`Git initialization skipped due to --no-git flag.`):n===!0?g()?X(`debug`,`Existing Git repository detected – skipping git init despite --git flag.`):(X(`info`,`Initializing Git repository due to --git flag...`),D(`git init`,{cwd:y,stdio:`ignore`}),X(`success`,`Git repository initialized`)):g()?X(`debug`,`Existing Git repository detected – skipping git init.`):(X(`info`,`No Git repository detected. Initializing one in project root...`),D(`git init`,{cwd:y,stdio:`ignore`}),X(`success`,`Git repository initialized`))}catch{X(`warn`,`Git not available, skipping repository initialization`)}if(f.rulesExplicitlyProvided||f.yes){X(`info`,`Generating profile rules from command-line flags...`);for(let e of h)w(e)}e&&mn();let E={cwd:y,stdio:`inherit`};if(m()&&(E.stdio=`ignore`,X(`info`,`Running npm install silently...`)),f.shouldSetupRules&&!m()&&!d&&!f?.yes&&!f.rulesExplicitlyProvided){console.log(k(x.cyan(`Configuring Rule Profiles...`),{padding:.5,margin:{top:1,bottom:.5},borderStyle:`round`,borderColor:`cyan`,width:60})),X(`info`,`Running interactive rules setup. Please select which rule profiles to include.`);try{D(`npx task-master rules --setup`,{stdio:`inherit`,cwd:y}),X(`success`,`Rule profiles configured.`)}catch(e){X(`error`,`Failed to configure rule profiles:`,e.message),X(`warn`,`You may need to run "task-master rules --setup" manually.`)}}else m()||d||f?.yes?f.rulesExplicitlyProvided?X(`debug`,`Skipping interactive rules setup because --rules flag was used.`):X(`debug`,`Skipping interactive rules setup in non-interactive mode.`):f.shouldSetupRules||X(`debug`,`Skipping rules setup - user declined.`);if(f.preferredLanguage&&!d)try{let e=(await import(`./response-language-LzM2RD6-.js`)).default;e(f.preferredLanguage,{projectRoot:y,silent:!0}),X(`debug`,`Response language set to: ${f.preferredLanguage}`)}catch(e){X(`warn`,`Failed to set response language: ${e.message}`)}else m()&&!d?X(`debug`,`Skipping response language setup in silent (MCP) mode.`):d&&X(`debug`,`DRY RUN: Skipping response language setup.`);if(!m()&&!d&&!f?.yes&&_===`local`){console.log(k(x.cyan(`Configuring AI Models...`),{padding:.5,margin:{top:1,bottom:.5},borderStyle:`round`,borderColor:`cyan`,width:60})),X(`info`,`Running interactive model setup. Please select your preferred AI models.`);try{D(`npx task-master models --setup`,{stdio:`inherit`,cwd:y}),X(`success`,`AI Models configured.`)}catch(e){X(`error`,`Failed to configure AI models:`,e.message),X(`warn`,`You may need to run "task-master models --setup" manually.`)}}else _===`cloud`&&!d?console.log(k(x.green.bold(`āœ“ AI Models Managed by Hamster - go ham!
3514
+
3515
+ `)+x.white(`Hamster handles all AI model configuration for you.
3516
+ `)+x.dim(`• Optimized model selection for your tasks
3517
+ `)+x.dim(`• No API keys required
3518
+ `)+x.dim(`• No extra costs`),{padding:1,margin:{top:1,bottom:.5},borderStyle:`round`,borderColor:`cyan`,width:60})):m()&&!d?(X(`info`,`Skipping interactive model setup in silent (MCP) mode.`),X(`warn`,`Please configure AI models using "task-master models --set-..." or the "models" MCP tool.`)):d?X(`info`,`DRY RUN: Skipping interactive model setup.`):f?.yes&&(X(`info`,`Skipping interactive model setup due to --yes flag.`),X(`info`,`Default AI models will be used. You can configure different models later using "task-master models --setup" or "task-master models --set-..." commands.`));if(e&&!d?(X(`debug`,`Adding shell aliases...`),mn()&&X(`debug`,`Shell aliases added successfully`)):e&&d&&X(`debug`,`DRY RUN: Would add shell aliases (tm, taskmaster)`),!m())if(_===`cloud`){let e=L(`hamster-art.txt`,`utf8`);console.log(`
3519
+ `+x.cyan(e)),console.log(``);let t=[x.green.bold(`āœ“ Connected to Hamster Studio`),``,x.white(`Your team's workspace is ready to go ham!
3520
+ `),x.dim(`Draft together. Align once. Build with agents.`),``,x.cyan(`How to orchestrate with Taskmaster:`),x.white(` • Create your first brief at: `)+x.underline.cyan(`https://tryhamster.com`),x.white(` • Connect your brief using `)+x.bold(`tm context <brief-url>`)+x.white(` to access tasks in Taskmaster`),x.white(` • Orchestrate and implement tasks using `)+x.bold(`tm next`)+x.white(` to kickoff any AI agent`),x.white(` • Run `)+x.bold(`tm help`)+x.white(` to explore other available commands`),x.white(` • Run `)+x.bold(`tm rules --setup`)+x.white(` to configure AI IDE rules for better integration`)].join(`
3521
+ `);console.log(k(t,{padding:1,margin:{top:1,bottom:0,left:0,right:0},borderStyle:`round`,borderColor:`cyan`,width:60}))}else console.log(k(`${ee.multiline(ne.textSync(`Success!`,{font:`Standard`}))}\n${x.green(`Project initialized successfully!`)}`,{padding:1,margin:1,borderStyle:`double`,borderColor:`green`,width:60}));if(!m()){let e;e=_===`cloud`?`${x.cyan.bold(`Here's how to execute your Hamster briefs with Taskmaster`)}\n\n${x.white(`1. `)}${x.yellow(`Create your first brief at`)} ${x.cyan.underline(`https://tryhamster.com`)}\n${x.white(` └─ `)}${x.dim(`Hamster will write your brief and generate the full task plan`)}\n${x.white(`2. `)}${x.yellow(`Add rules for your AI IDE(s)`)}\n${x.white(` └─ `)}${x.dim(`CLI: `)}${x.cyan(`tm rules --setup`)}${x.dim(` - Opens interactive setup`)}\n${x.white(`3. `)}${x.yellow(`Connect your brief to Taskmaster`)}\n${x.white(` └─ `)}${x.dim(`CLI: `)}${x.cyan(`tm context <brief-url> OR tm briefs`)}\n${x.white(`4. `)}${x.yellow(`View your tasks from the brief`)}\n${x.white(` └─ `)}${x.dim(`CLI: `)}${x.cyan(`tm list`)}${x.dim(` or `)}${x.cyan(`tm list all`)}${x.dim(` (with subtasks)`)}\n${x.white(`5. `)}${x.yellow(`Work on tasks with any AI coding assistant or background agent`)}\n${x.white(` ā”œā”€ `)}${x.dim(`CLI: `)}${x.cyan(`tm next`)}${x.dim(` - Find the next task to work on`)}\n${x.white(` ā”œā”€ `)}${x.dim(`CLI: `)}${x.cyan(`tm show <id>`)}${x.dim(` - View task details`)}\n${x.white(` ā”œā”€ `)}${x.dim(`CLI: `)}${x.cyan(`tm status <id> in-progress`)}${x.dim(` - Mark task started`)}\n${x.white(` └─ `)}${x.dim(`CLI: `)}${x.cyan(`tm status <id> done`)}${x.dim(` - Mark task complete`)}\n${x.white(`6. `)}${x.yellow(`Add notes or updates to tasks`)}\n${x.white(` └─ `)}${x.dim(`CLI: `)}${x.cyan(`tm update-task <id> <notes>`)}\n${x.white(`7. `)}${x.green.bold(`Ship it!`)}\n\n${x.dim(`* Run `)}${x.cyan(`tm help`)}${x.dim(` to see all available commands`)}`:`${x.cyan.bold(`Things you should do next:`)}\n\n${x.white(`1. `)}${x.yellow("Configure AI models and add API keys to `.env`")}\n${x.white(` ā”œā”€ `)}${x.dim(`Models: Use `)}${x.cyan(`task-master models`)}${x.dim(` commands`)}\n${x.white(` └─ `)}${x.dim(`Keys: Add provider API keys to .env (or .cursor/mcp.json)`)}\n${x.white(`2. `)}${x.yellow(`Discuss your idea with AI and create a PRD`)}\n${x.white(` ā”œā”€ `)}${x.dim(`Simple projects: Use `)}${x.cyan(`example_prd.txt`)}${x.dim(` template`)}\n${x.white(` └─ `)}${x.dim(`Complex systems: Use `)}${x.cyan(`example_prd_rpg.txt`)}${x.dim(` template`)}\n${x.white(`3. `)}${x.yellow(`Parse your PRD to generate initial tasks`)}\n${x.white(` └─ `)}${x.dim(`CLI: `)}${x.cyan(`task-master parse-prd .taskmaster/docs/prd.txt`)}\n${x.white(`4. `)}${x.yellow(`Analyze task complexity`)}\n${x.white(` └─ `)}${x.dim(`CLI: `)}${x.cyan(`task-master analyze-complexity --research`)}\n${x.white(`5. `)}${x.yellow(`Expand tasks into subtasks`)}\n${x.white(` └─ `)}${x.dim(`CLI: `)}${x.cyan(`task-master expand --all --research`)}\n${x.white(`6. `)}${x.yellow(`Start working on tasks`)}\n${x.white(` └─ `)}${x.dim(`CLI: `)}${x.cyan(`task-master next`)}\n${x.white(`7. `)}${x.green.bold(`Ship it!`)}\n\n${x.dim(`* Run `)}${x.cyan(`task-master --help`)}${x.dim(` to see all available commands`)}\n${x.dim(`* Run `)}${x.cyan(`tm rules --setup`)}${x.dim(` to configure AI IDE rules for better integration`)}`,console.log(k(x.yellow.bold(`Workflow
3522
+ `)+`
3523
+ `+e,{padding:1,margin:{top:0,bottom:1,left:0,right:0},borderStyle:`round`,borderColor:`yellow`,width:60}))}}const xn={ADD:`add`,REMOVE:`remove`},Sn=`setup`;function Cn(e){return Object.values(xn).includes(e)}function wn(e){try{return q(e).displayName||e}catch{return e}}function Tn(e){let t=[];for(let n of j)try{let r=q(n),i=C.join(e,r.profileDir);if(r.profileDir===`.`||S.existsSync(i)){let i=C.join(e,r.rulesDir);S.existsSync(i)&&Object.values(r.fileMap).some(e=>S.existsSync(C.join(i,e)))&&t.push(n)}}catch{}return t}function En(e,t){let n=Tn(e);return n.length===0?!1:n.filter(e=>!t.includes(e)).length===0}async function Dn(e=process.cwd()){let t=ut({projectRoot:e});if(t.length>0){let e=t.map(e=>wn(e)).join(`, `);console.log(x.cyan(`\nšŸ” Auto-detected IDEs: ${e}`)+x.gray(` (pre-selected below)
3524
+ `))}let n=j.map(e=>{let t=wn(e),n=q(e),r,i=Object.keys(n.fileMap).length>0,a=n.mcpConfig===!0;return n.includeDefaultRules?i&&a?r=e===`roo`?`Rule profile, MCP config, and agent modes`:`Rule profile and MCP config`:i&&(r=`Rule profile`):r=e===`claude`?`Integration guide with Task Master slash commands`:e===`codex`?`Comprehensive Task Master integration guide`:a?`Integration guide and MCP config`:`Integration guide`,{profileName:e,displayName:t,description:r}}).sort((e,t)=>e.displayName.localeCompare(t.displayName)),r=n.map(({displayName:e,description:t})=>`${x.white(`• `)}${x.yellow(e)}${x.white(` - ${t}`)}`).join(`
3525
+ `);console.log(k(`${x.white.bold(`Rule Profiles Setup`)}\n\n${x.white(`Rule profiles help enforce best practices and conventions for Task Master.
3526
+ Each profile provides coding guidelines tailored for specific AI coding environments.
3527
+
3528
+ `)}${x.cyan(`Available Profiles:`)}\n${r}`,{padding:1,borderColor:`blue`,borderStyle:`round`,margin:{top:1,bottom:1}}));let i=n.map(({profileName:e,displayName:n})=>({name:t.includes(e)?`${n} ${x.dim(`(detected)`)}`:n,value:e,checked:t.includes(e)})),a={type:`checkbox`,name:`ruleProfiles`,message:`Which rule profiles would you like to add to your project?`,choices:i,pageSize:i.length,loop:!1,validate:e=>e.length>0||`You must select at least one.`},{ruleProfiles:o}=await ie.prompt([a]);return o}async function On(e,t,r){let i=[],a=await n(r);for(let n=0;n<e.length;n++){let r=e[n];if(console.log(x.blue(`Processing profile ${n+1}/${e.length}: ${r}...`)),!K(r)){console.warn(`Rule profile for "${r}" not found. Valid profiles: ${j.join(`, `)}. Skipping.`);continue}let o=J(t,q(r),{mode:a});i.push({profileName:r,success:o.success,failed:o.failed}),console.log(x.green(kn(r,o)))}return i}function kn(e,t){return q(e).includeDefaultRules?`Summary for ${e}: ${t.success} files processed, ${t.failed} failed.`:`Summary for ${e}: Integration guide installed.`}function An(e,t){if(t.skipped)return`Summary for ${e}: Skipped (default or protected files)`;if(t.error&&!t.success)return`Summary for ${e}: Failed to remove - ${t.error}`;if(q(e).includeDefaultRules){let n=`Summary for ${e}: Rule profile removed`;return t.notice?`${n} (${t.notice})`:n}else{let n=`Summary for ${e}: Integration guide removed`;return t.notice?`${n} (${t.notice})`:n}}function jn(e){let t=[],n=0,r=0;return e.forEach(e=>{n+=e.success,r+=e.failed,(e.success>0||e.failed===0)&&t.push(e.profileName)}),{successfulProfiles:t,allSuccessfulProfiles:t,totalSuccess:n,totalFailed:r}}function Mn(e){let t=[],n=[],r=[],i=[];return e.forEach(e=>{e.success?t.push(e.profileName):e.skipped?n.push(e.profileName):e.error&&r.push(e),e.notice&&i.push(e)}),{successfulRemovals:t,skippedRemovals:n,failedRemovals:r,removalsWithNotices:i}}export{lt as _,Tn as a,En as c,Cn as d,gn as f,un as g,K as h,kn as i,xn as l,q as m,Mn as n,On as o,J as p,An as r,Dn as s,jn as t,Sn as u,j as v};