taskgraph-ai 0.52.12 → 0.54.7

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