taskgraph-ai 0.50.1 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ai-services-unified-DbjBfAvG.js → ai-services-unified-D8KwE3rg.js} +1 -1
- package/dist/ai-services-unified-DdXQf9-K.js +1 -0
- package/dist/{commands-2aOf3ERj.js → commands-Btm2oO97.js} +7 -7
- package/dist/{config-manager-C8-BTReQ.js → config-manager-7Sv3SsVJ.js} +1 -1
- package/dist/{config-manager-Da0wEujO.js → config-manager-BUm0w7j9.js} +1 -1
- package/dist/{dependency-manager-DIbDdrUV.js → dependency-manager-LVhwG4fY.js} +115 -119
- package/dist/{init-CNSqtmPC.js → init-CNN_m_0Q.js} +62 -386
- package/dist/mcp-server.js +3 -3
- package/dist/research-BLLmzb-Q.js +1 -0
- package/dist/response-language-bOP2mgFX.js +1 -0
- package/dist/{response-language-Cc70IGmg.js → response-language-lNB7-WgQ.js} +1 -1
- package/dist/{src-lvp18X-h.js → src-D5YOCTZ3.js} +9 -9
- package/dist/tag-management-BVkpBGE5.js +1 -0
- package/dist/{task-manager-BKqm9QPb.js → task-manager-BxvXZ76I.js} +1 -1
- package/dist/taskgraph.js +1 -1
- package/dist/update-subtask-by-id-BKkRQB4a.js +1 -0
- package/dist/update-task-by-id-Du00pZ3R.js +1 -0
- package/dist/{utils-D1-Eo-6k.js → utils-B_xIeo5k.js} +1 -1
- package/package.json +1 -1
- package/dist/ai-services-unified-TeIK2DoX.js +0 -1
- package/dist/research-CUiuqEKk.js +0 -1
- package/dist/response-language-CGnha79j.js +0 -1
- package/dist/tag-management-B5XoFcUP.js +0 -1
- package/dist/update-subtask-by-id-Ct9TTTgG.js +0 -1
- package/dist/update-task-by-id-BvdEKXsG.js +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{o as e}from"./ai-services-unified-
|
|
1
|
+
import{o as e}from"./ai-services-unified-D8KwE3rg.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-BUm0w7j9.js";import{r as m}from"./git-utils-CrYiSKu0.js";import{a as h,dt as g}from"./dependency-manager-LVhwG4fY.js";import _ from"chalk";import*as v from"node:path";import y from"path";import*as b from"node:fs";import{execSync as x}from"child_process";import S from"fs";import{fileURLToPath as C}from"url";import w from"boxen";import T from"readline";import te from"figlet";import ne from"gradient-string";import re from"ora";import ie from"os";import{randomUUID as ae}from"crypto";const E=[`claude`];function D(e){return e.filter(e=>!O(e))}function O(e){return E.includes(e)}const k=`# Task files`,A=`tasks.json`,j=`tasks/`;function M(e){return e.trim().replace(/^#/,``).trim()}function N(e){let t=M(e);return t===A||t===j}function oe(e,t){return e.map(e=>{if(N(e)){let n=M(e),r=e.match(/\s*$/)[0];return t?`# ${n}${r}`:`${n}${r}`}return e})}function se(e){let t=[],n=!1;for(let r of e){if(r.trim()===k){n=!0;continue}N(r)||n&&!r.trim()||(n&&r.trim()&&!N(r)&&(n=!1),n||t.push(r))}return t}function ce(e,t){return e.filter(e=>{let n=e.trim();return!n||N(e)||n===k?!1:!t.has(n)})}function le(e){let t=[k];return e?t.push(`# ${A}`,`# ${j} `):t.push(A,`${j} `),t}function P(e){if(e.some(e=>e.trim())){let t=e[e.length-1];t&&t.trim()&&e.push(``)}}function ue(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 de(e,t,n){try{S.writeFileSync(e,t.join(`
|
|
2
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
|
|
4
|
-
`)),a=
|
|
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 fe(e,t,n,r){try{let i=se(S.readFileSync(e,`utf8`).split(`
|
|
4
|
+
`)),a=ce(t,new Set(i.map(e=>e.trim()).filter(e=>e))),o=[...i];a.length>0&&(P(o),o.push(...a)),P(o),o.push(...le(n)),S.writeFileSync(e,o.join(`
|
|
5
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
|
|
7
|
-
`),n);S.existsSync(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()}`;S.existsSync(n)&&(S.copyFileSync(n,t),d(`info`,`Created backup of existing mcp.json at ${t}`));let r={mcpServers:i};S.writeFileSync(n,
|
|
9
|
-
`),d(`warn`,`Created new MCP configuration file (backup of original file was created if it existed)`)}}else{let e={mcpServers:i};S.writeFileSync(n,
|
|
10
|
-
`),d(`success`,`Created MCP configuration file at ${n}`)}d(`info`,`MCP server will use the installed taskgraph-ai package`)}function
|
|
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 pe(e,t,n=!0,r=null){ue(e,t,n);let i=oe(t.split(`
|
|
7
|
+
`),n);S.existsSync(e)?fe(e,i,n,r):de(e,i,r)}const me=C(import.meta.url),F=y.dirname(me);function I(){let e=[y.join(F,`assets`),y.join(F,`..`,`assets`),y.join(F,`..`,`..`,`public`,`assets`),y.join(process.cwd(),`assets`),y.join(process.cwd(),`node_modules`,`taskgraph-ai`,`dist`,`assets`),y.join(process.cwd(),`node_modules`,`taskgraph-ai`,`assets`)];for(let t of e)if(S.existsSync(t)){let e=y.join(t,`AGENTS.md`);if(S.existsSync(e))return t}throw Error(`Assets directory not found. This is likely a packaging issue.`)}function L(e){let t=I();return y.join(t,e)}function R(e){try{let t=L(e);return S.existsSync(t)}catch{return!1}}function z(e,t=`utf8`){let n=L(e);return S.readFileSync(n,t)}const B=`taskgraph-ai`;function he(e){return Array.isArray(e?.args)&&e.args.some(e=>typeof e==`string`&&e.includes(B))}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 ge(e,t){if(!t){d(`debug`,`[MCP Config] No mcpConfigPath provided, skipping MCP configuration setup`);return}let n=y.join(e,t),r=y.dirname(n);d(`info`,`Setting up MCP configuration at ${n}...`);let i={[B]:{command:`npx`,args:[`-y`,B],env:{TASKGRAPH_TOOLS:`core`}}};if(S.existsSync(r)||S.mkdirSync(r,{recursive:!0}),S.existsSync(n)){d(`info`,`MCP configuration file already exists, checking for existing taskgraph-ai...`);try{let e=JSON.parse(S.readFileSync(n,`utf8`));if(e.mcpServers||={},Object.values(e.mcpServers).some(he)){d(`info`,`Found existing taskgraph-ai MCP configuration in mcp.json, leaving untouched`);return}e.mcpServers[B]?d(`info`,`taskgraph-ai server already configured in mcp.json`):(e.mcpServers[B]=i[B],d(`info`,`Added taskgraph-ai server to existing MCP configuration`)),S.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()}`;S.existsSync(n)&&(S.copyFileSync(n,t),d(`info`,`Created backup of existing mcp.json at ${t}`));let r={mcpServers:i};S.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};S.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 _e=U(`parse-prd`,`Parse PRD`,`<prd-file>`,`Parse a PRD document to generate tasks.
|
|
11
11
|
|
|
12
12
|
Arguments: $ARGUMENTS (PRD file path)
|
|
13
13
|
|
|
@@ -55,7 +55,7 @@ After parsing:
|
|
|
55
55
|
1. Display task summary
|
|
56
56
|
2. Show dependency graph
|
|
57
57
|
3. Suggest task expansion for complex items
|
|
58
|
-
4. Recommend sprint planning
|
|
58
|
+
4. Recommend sprint planning`),ve=U(`parse-prd-with-research`,`Parse PRD With Research`,`<prd-file>`,`Parse PRD with enhanced research mode for better task generation.
|
|
59
59
|
|
|
60
60
|
Arguments: $ARGUMENTS (PRD file path)
|
|
61
61
|
|
|
@@ -102,7 +102,7 @@ Research mode typically:
|
|
|
102
102
|
- New technology domains
|
|
103
103
|
- Complex requirements
|
|
104
104
|
- Regulatory compliance needed
|
|
105
|
-
- Best practices crucial
|
|
105
|
+
- Best practices crucial`),ye=U(`analyze-complexity`,`Analyze Complexity`,`[options]`,`Analyze task complexity and generate expansion recommendations.
|
|
106
106
|
|
|
107
107
|
Arguments: $ARGUMENTS
|
|
108
108
|
|
|
@@ -222,7 +222,7 @@ After analysis:
|
|
|
222
222
|
/taskgraph:expand 5 # Expand specific task
|
|
223
223
|
/taskgraph:expand-all # Expand all recommended
|
|
224
224
|
/taskgraph:complexity-report # View detailed report
|
|
225
|
-
|
|
225
|
+
\`\`\``),be=U(`complexity-report`,`Complexity Report`,`[--file=<path>]`,`Display the task complexity analysis report.
|
|
226
226
|
|
|
227
227
|
Arguments: $ARGUMENTS
|
|
228
228
|
|
|
@@ -338,7 +338,7 @@ Use report for:
|
|
|
338
338
|
After viewing:
|
|
339
339
|
/taskgraph:expand 5
|
|
340
340
|
→ Expand high-complexity task
|
|
341
|
-
|
|
341
|
+
\`\`\``),xe=U(`expand-task`,`Expand Task`,`<task-id>`,`Break down a complex task into subtasks.
|
|
342
342
|
|
|
343
343
|
Arguments: $ARGUMENTS (task ID)
|
|
344
344
|
|
|
@@ -386,7 +386,7 @@ After expansion:
|
|
|
386
386
|
1. Show subtask hierarchy
|
|
387
387
|
2. Update time estimates
|
|
388
388
|
3. Suggest implementation order
|
|
389
|
-
4. Highlight critical path
|
|
389
|
+
4. Highlight critical path`),Se=H({name:`expand-all-tasks`,description:`Expand All Tasks`,content:`Expand all pending tasks that need subtasks.
|
|
390
390
|
|
|
391
391
|
## Bulk Task Expansion
|
|
392
392
|
|
|
@@ -436,7 +436,7 @@ After bulk expansion:
|
|
|
436
436
|
- Summary of tasks expanded
|
|
437
437
|
- New subtask count
|
|
438
438
|
- Updated complexity metrics
|
|
439
|
-
- Suggested task order
|
|
439
|
+
- Suggested task order`}),Ce=U(`add-task`,`Add Task`,`<description>`,`Add new tasks with intelligent parsing and context awareness.
|
|
440
440
|
|
|
441
441
|
Arguments: $ARGUMENTS
|
|
442
442
|
|
|
@@ -513,7 +513,7 @@ Intelligent defaults based on:
|
|
|
513
513
|
- Historical data
|
|
514
514
|
- Current sprint/phase
|
|
515
515
|
|
|
516
|
-
Result: High-quality tasks from minimal input
|
|
516
|
+
Result: High-quality tasks from minimal input.`),we=U(`add-subtask`,`Add Subtask`,`<parent-id> <title>`,`Add a subtask to a parent task.
|
|
517
517
|
|
|
518
518
|
Arguments: $ARGUMENTS
|
|
519
519
|
|
|
@@ -588,7 +588,7 @@ taskgraph add-subtask --parent=<id> --task-id=<existing-id>
|
|
|
588
588
|
- Show updated task hierarchy
|
|
589
589
|
- Suggest logical next subtasks
|
|
590
590
|
- Update complexity estimates
|
|
591
|
-
- Recommend subtask order
|
|
591
|
+
- Recommend subtask order`),Te=U(`remove-task`,`Remove Task`,`<task-id>`,`Remove a task permanently from the project.
|
|
592
592
|
|
|
593
593
|
Arguments: $ARGUMENTS (task ID)
|
|
594
594
|
|
|
@@ -694,7 +694,7 @@ Remove anyway? (y/n)
|
|
|
694
694
|
- Impact preview
|
|
695
695
|
- Removal logging
|
|
696
696
|
- Suggest alternatives
|
|
697
|
-
- No cascade delete of dependents
|
|
697
|
+
- No cascade delete of dependents`),Ee=U(`remove-subtask`,`Remove Subtask`,`<subtask-id>`,`Remove a subtask from its parent task.
|
|
698
698
|
|
|
699
699
|
Arguments: $ARGUMENTS
|
|
700
700
|
|
|
@@ -777,7 +777,7 @@ Confirm deletion? (y/n)
|
|
|
777
777
|
- Update parent task status
|
|
778
778
|
- Recalculate estimates
|
|
779
779
|
- Show updated hierarchy
|
|
780
|
-
- Suggest next actions
|
|
780
|
+
- Suggest next actions`),De=U(`remove-subtasks`,`Remove Subtasks`,`<task-id>`,`Clear all subtasks from a specific task.
|
|
781
781
|
|
|
782
782
|
Arguments: $ARGUMENTS (task ID)
|
|
783
783
|
|
|
@@ -862,7 +862,7 @@ Suggest alternatives:
|
|
|
862
862
|
→ Cleared all subtasks from task #5
|
|
863
863
|
→ Updated parent task estimates
|
|
864
864
|
→ Suggestion: Consider re-expanding with better breakdown
|
|
865
|
-
|
|
865
|
+
\`\`\``),Oe=H({name:`remove-all-subtasks`,description:`Remove All Subtasks`,content:`Clear all subtasks from all tasks globally.
|
|
866
866
|
|
|
867
867
|
## Global Subtask Clearing
|
|
868
868
|
|
|
@@ -954,7 +954,7 @@ Next steps:
|
|
|
954
954
|
- Review updated task list
|
|
955
955
|
- Re-expand complex tasks as needed
|
|
956
956
|
- Check project timeline
|
|
957
|
-
|
|
957
|
+
\`\`\``}),ke=U(`convert-task-to-subtask`,`Convert Task To Subtask`,`<parent-id> <task-id>`,`Convert an existing task into a subtask.
|
|
958
958
|
|
|
959
959
|
Arguments: $ARGUMENTS
|
|
960
960
|
|
|
@@ -1024,7 +1024,7 @@ After: #5.1 "Implement validation" (subtask of #5)
|
|
|
1024
1024
|
- Show new task hierarchy
|
|
1025
1025
|
- List updated dependencies
|
|
1026
1026
|
- Verify project integrity
|
|
1027
|
-
- Suggest related conversions
|
|
1027
|
+
- Suggest related conversions`),Ae=U(`add-dependency`,`Add Dependency`,`<task-id> <depends-on-id>`,`Add a dependency between tasks.
|
|
1028
1028
|
|
|
1029
1029
|
Arguments: $ARGUMENTS
|
|
1030
1030
|
|
|
@@ -1078,7 +1078,7 @@ After adding dependency:
|
|
|
1078
1078
|
→ Task #5 now depends on Task #3
|
|
1079
1079
|
→ Task #5 is now blocked until #3 completes
|
|
1080
1080
|
→ Suggested: Also consider if #5 needs #4
|
|
1081
|
-
|
|
1081
|
+
\`\`\``),je=U(`remove-dependency`,`Remove Dependency`,`<task-id> <depends-on-id>`,`Remove a dependency between tasks.
|
|
1082
1082
|
|
|
1083
1083
|
Arguments: $ARGUMENTS
|
|
1084
1084
|
|
|
@@ -1139,7 +1139,7 @@ After removing:
|
|
|
1139
1139
|
→ Removed: Task #5 no longer depends on #3
|
|
1140
1140
|
→ Task #5 is now UNBLOCKED and ready to start
|
|
1141
1141
|
→ Warning: Consider if #5 still needs #2 completed first
|
|
1142
|
-
|
|
1142
|
+
\`\`\``),Me=H({name:`fix-dependencies`,description:`Fix Dependencies`,content:`Automatically fix dependency issues found during validation.
|
|
1143
1143
|
|
|
1144
1144
|
## Automatic Dependency Repair
|
|
1145
1145
|
|
|
@@ -1219,7 +1219,7 @@ Run '/taskgraph:validate-dependencies' to verify fixes
|
|
|
1219
1219
|
- Preview mode available
|
|
1220
1220
|
- Rollback capability
|
|
1221
1221
|
- Change logging
|
|
1222
|
-
- No data loss
|
|
1222
|
+
- No data loss`}),Ne=H({name:`validate-dependencies`,description:`Validate Dependencies`,content:`Validate all task dependencies for issues.
|
|
1223
1223
|
|
|
1224
1224
|
## Dependency Validation
|
|
1225
1225
|
|
|
@@ -1289,7 +1289,7 @@ For each issue found:
|
|
|
1289
1289
|
After validation:
|
|
1290
1290
|
- Run \`/taskgraph:fix-dependencies\` to auto-fix
|
|
1291
1291
|
- Manually adjust problematic dependencies
|
|
1292
|
-
- Rerun to verify fixes
|
|
1292
|
+
- Rerun to verify fixes`}),Pe=H({name:`setup-models`,description:`Setup Models`,content:`Run interactive setup to configure AI models.
|
|
1293
1293
|
|
|
1294
1294
|
## Interactive Model Configuration
|
|
1295
1295
|
|
|
@@ -1330,7 +1330,7 @@ Model choices are saved in \`.taskgraph/config.json\`.
|
|
|
1330
1330
|
After configuration:
|
|
1331
1331
|
- Show usage examples
|
|
1332
1332
|
- Suggest next steps
|
|
1333
|
-
- Verify parse-prd works
|
|
1333
|
+
- Verify parse-prd works`}),Fe=H({name:`view-models`,description:`View Models`,content:`View current AI model configuration.
|
|
1334
1334
|
|
|
1335
1335
|
## Model Configuration Display
|
|
1336
1336
|
|
|
@@ -1376,7 +1376,7 @@ Available Models:
|
|
|
1376
1376
|
Based on configuration:
|
|
1377
1377
|
- If Claude Code is missing → Suggest installing and signing in
|
|
1378
1378
|
- If no research model → Explain benefits
|
|
1379
|
-
- If all configured → Show usage tips
|
|
1379
|
+
- If all configured → Show usage tips`}),Ie=H({name:`install-taskgraph`,description:`Install TaskGraph`,content:`Check if TaskGraph is installed and install it if needed.
|
|
1380
1380
|
|
|
1381
1381
|
This command helps you get TaskGraph set up globally on your system.
|
|
1382
1382
|
|
|
@@ -1487,7 +1487,7 @@ Try: /taskgraph:init your-prd.md
|
|
|
1487
1487
|
After installation:
|
|
1488
1488
|
1. Run \`/taskgraph:status\` to verify setup
|
|
1489
1489
|
2. Configure AI providers with \`/taskgraph:setup-models\`
|
|
1490
|
-
3. Start using TaskGraph commands
|
|
1490
|
+
3. Start using TaskGraph commands!`}),Le=H({name:`quick-install-taskgraph`,description:`Quick Install TaskGraph`,content:`Quick install TaskGraph globally if not already installed.
|
|
1491
1491
|
|
|
1492
1492
|
Execute this streamlined installation:
|
|
1493
1493
|
|
|
@@ -1508,7 +1508,7 @@ If you see "command not found" after installation, you may need to:
|
|
|
1508
1508
|
|
|
1509
1509
|
Once installed, you can use all the TaskGraph commands!
|
|
1510
1510
|
|
|
1511
|
-
Quick test: Run \`/taskgraph:help\` to see all available commands
|
|
1511
|
+
Quick test: Run \`/taskgraph:help\` to see all available commands.`}),Re=U(`to-review`,`To Review`,`<task-id>`,`Set a task's status to review.
|
|
1512
1512
|
|
|
1513
1513
|
Arguments: $ARGUMENTS (task ID)
|
|
1514
1514
|
|
|
@@ -1547,7 +1547,7 @@ When setting to review:
|
|
|
1547
1547
|
- Create review reminders
|
|
1548
1548
|
- Track review duration
|
|
1549
1549
|
- Suggest reviewers based on expertise
|
|
1550
|
-
- Prepare rollback plan if needed
|
|
1550
|
+
- Prepare rollback plan if needed`),ze=U(`to-deferred`,`To Deferred`,`<task-id>`,`Defer a task for later consideration.
|
|
1551
1551
|
|
|
1552
1552
|
Arguments: $ARGUMENTS (task ID)
|
|
1553
1553
|
|
|
@@ -1593,7 +1593,7 @@ When deferring:
|
|
|
1593
1593
|
- Monitor deferral duration
|
|
1594
1594
|
- Alert when criteria met
|
|
1595
1595
|
- Prevent scope creep
|
|
1596
|
-
- Regular review cycles
|
|
1596
|
+
- Regular review cycles`),Be=U(`to-cancelled`,`To Cancelled`,`<task-id>`,`Cancel a task permanently.
|
|
1597
1597
|
|
|
1598
1598
|
Arguments: $ARGUMENTS (task ID)
|
|
1599
1599
|
|
|
@@ -1647,7 +1647,7 @@ When cancelling:
|
|
|
1647
1647
|
- Keep for reference
|
|
1648
1648
|
- Tag with cancellation reason
|
|
1649
1649
|
- Link to replacement if any
|
|
1650
|
-
- Maintain audit trail
|
|
1650
|
+
- Maintain audit trail`),Ve=U(`init-project`,`Init Project`,`[prd-file]`,`Initialize a new TaskGraph project.
|
|
1651
1651
|
|
|
1652
1652
|
Arguments: $ARGUMENTS
|
|
1653
1653
|
|
|
@@ -1696,7 +1696,7 @@ If PRD file provided:
|
|
|
1696
1696
|
\`\`\`
|
|
1697
1697
|
/taskgraph:init my-prd.md
|
|
1698
1698
|
→ Automatically runs parse-prd after init
|
|
1699
|
-
|
|
1699
|
+
\`\`\``),He=U(`init-project-quick`,`Init Project Quick`,`[prd-file]`,`Quick initialization with auto-confirmation.
|
|
1700
1700
|
|
|
1701
1701
|
Arguments: $ARGUMENTS
|
|
1702
1702
|
|
|
@@ -1741,7 +1741,7 @@ After quick init:
|
|
|
1741
1741
|
/taskgraph:add-task create initial setup
|
|
1742
1742
|
\`\`\`
|
|
1743
1743
|
|
|
1744
|
-
Perfect for rapid project setup
|
|
1744
|
+
Perfect for rapid project setup!`);H({name:`generate-tasks`,description:`Generate Task Files`,content:`Generate individual task files from tasks.json.
|
|
1745
1745
|
|
|
1746
1746
|
## Task File Generation
|
|
1747
1747
|
|
|
@@ -1853,331 +1853,7 @@ Ready for:
|
|
|
1853
1853
|
- Easy task sharing
|
|
1854
1854
|
- AI tool compatibility
|
|
1855
1855
|
- Offline task access
|
|
1856
|
-
- Backup redundancy
|
|
1857
|
-
|
|
1858
|
-
End-to-end workflow for working on tasks from a connected Hamster brief. All tasks from the brief are worked on in a single branch, with one PR created at the end.
|
|
1859
|
-
|
|
1860
|
-
## Step 1: Verify Connection & Authentication
|
|
1861
|
-
|
|
1862
|
-
\`\`\`bash
|
|
1863
|
-
# Check current context and authentication status
|
|
1864
|
-
tm context
|
|
1865
|
-
\`\`\`
|
|
1866
|
-
|
|
1867
|
-
If not connected or authentication fails:
|
|
1868
|
-
- Get brief URL from user if not available
|
|
1869
|
-
- Connect: \`tm context <brief url>\`
|
|
1870
|
-
- Refresh token if needed: \`tm auth refresh\`
|
|
1871
|
-
|
|
1872
|
-
## Step 2: List Available Tasks
|
|
1873
|
-
|
|
1874
|
-
\`\`\`bash
|
|
1875
|
-
# View all tasks from the brief
|
|
1876
|
-
tm list
|
|
1877
|
-
\`\`\`
|
|
1878
|
-
|
|
1879
|
-
Review the task list to understand what needs to be done. Note the total number of tasks.
|
|
1880
|
-
|
|
1881
|
-
## Step 3: Initialize Git Branch for Brief
|
|
1882
|
-
|
|
1883
|
-
\`\`\`bash
|
|
1884
|
-
# Ensure you're on dev branch and pull latest
|
|
1885
|
-
git checkout dev
|
|
1886
|
-
git pull origin dev
|
|
1887
|
-
|
|
1888
|
-
# Create a single branch for the entire brief (e.g., hamster-brief-YYYY-MM-DD or brief-specific name)
|
|
1889
|
-
git checkout -b hamster-brief
|
|
1890
|
-
|
|
1891
|
-
# Verify branch creation
|
|
1892
|
-
git branch
|
|
1893
|
-
\`\`\`
|
|
1894
|
-
|
|
1895
|
-
**Note**: This branch will be used for ALL tasks in the brief. Do not create separate branches per task.
|
|
1896
|
-
|
|
1897
|
-
## Step 4: Task Loop (Repeat for Each Task)
|
|
1898
|
-
|
|
1899
|
-
Work through all tasks sequentially in the same branch:
|
|
1900
|
-
|
|
1901
|
-
### 4.1: Read Task Details
|
|
1902
|
-
|
|
1903
|
-
\`\`\`bash
|
|
1904
|
-
# Get detailed information about the task
|
|
1905
|
-
tm show 1
|
|
1906
|
-
|
|
1907
|
-
# If task has subtasks, examine them all
|
|
1908
|
-
tm show 1,1.1,1.2,1.3 # Adjust IDs as needed
|
|
1909
|
-
\`\`\`
|
|
1910
|
-
|
|
1911
|
-
### 4.2: Log Initial Context
|
|
1912
|
-
|
|
1913
|
-
\`\`\`bash
|
|
1914
|
-
# Document task understanding and initial findings
|
|
1915
|
-
tm update-task -i 1 --append --prompt="Starting task implementation.
|
|
1916
|
-
|
|
1917
|
-
Initial context:
|
|
1918
|
-
- Task requirements: [summarize key requirements]
|
|
1919
|
-
- Dependencies identified: [list any dependencies]
|
|
1920
|
-
- Files that may need modification: [list relevant files]
|
|
1921
|
-
- Approach planned: [brief implementation approach]"
|
|
1922
|
-
\`\`\`
|
|
1923
|
-
|
|
1924
|
-
### 4.3: Mark Task as In-Progress
|
|
1925
|
-
|
|
1926
|
-
\`\`\`bash
|
|
1927
|
-
# Mark task and first subtask (if exists) as in-progress
|
|
1928
|
-
tm set-status -i 1,1.1 -s in-progress
|
|
1929
|
-
\`\`\`
|
|
1930
|
-
|
|
1931
|
-
### 4.4: Subtask Implementation Loop
|
|
1932
|
-
|
|
1933
|
-
For each subtask (1.1, 1.2, 1.3, etc.):
|
|
1934
|
-
|
|
1935
|
-
#### 4.4.1: Read Subtask Details
|
|
1936
|
-
\`\`\`bash
|
|
1937
|
-
tm show 1.1 # Replace with current subtask ID
|
|
1938
|
-
\`\`\`
|
|
1939
|
-
|
|
1940
|
-
#### 4.4.2: Log Research & Context Gathering
|
|
1941
|
-
\`\`\`bash
|
|
1942
|
-
# Document findings during implementation
|
|
1943
|
-
tm update-task -i 1 --append --prompt="Subtask 1.1 - Context gathered:
|
|
1944
|
-
|
|
1945
|
-
- Code exploration findings: [what you discovered]
|
|
1946
|
-
- Implementation approach: [how you plan to implement]
|
|
1947
|
-
- Key decisions made: [important choices]
|
|
1948
|
-
- Challenges encountered: [any blockers or issues]"
|
|
1949
|
-
\`\`\`
|
|
1950
|
-
|
|
1951
|
-
#### 4.4.3: Implement Subtask
|
|
1952
|
-
- Write code following the subtask requirements
|
|
1953
|
-
- Make necessary changes to files
|
|
1954
|
-
|
|
1955
|
-
#### 4.4.4: Quality Verification
|
|
1956
|
-
\`\`\`bash
|
|
1957
|
-
# Run linting
|
|
1958
|
-
pnpm lint
|
|
1959
|
-
|
|
1960
|
-
# Run type checking
|
|
1961
|
-
pnpm typecheck
|
|
1962
|
-
|
|
1963
|
-
# If either fails, fix issues and re-run until both pass
|
|
1964
|
-
\`\`\`
|
|
1965
|
-
|
|
1966
|
-
#### 4.4.5: CodeRabbit Review
|
|
1967
|
-
\`\`\`bash
|
|
1968
|
-
# Generate code review (wait for plain text results)
|
|
1969
|
-
coderabbit --prompt-only
|
|
1970
|
-
|
|
1971
|
-
# Review the output and address any critical issues if needed
|
|
1972
|
-
\`\`\`
|
|
1973
|
-
|
|
1974
|
-
#### 4.4.6: Log Implementation Completion
|
|
1975
|
-
\`\`\`bash
|
|
1976
|
-
# Document what was completed
|
|
1977
|
-
tm update-task -i 1 --append --prompt="Subtask 1.1 - Implementation complete:
|
|
1978
|
-
|
|
1979
|
-
- Files modified: [list files changed]
|
|
1980
|
-
- Key changes: [summary of implementation]
|
|
1981
|
-
- CodeRabbit feedback addressed: [if any issues were fixed]
|
|
1982
|
-
- Ready for commit"
|
|
1983
|
-
\`\`\`
|
|
1984
|
-
|
|
1985
|
-
#### 4.4.7: Commit Subtask Work
|
|
1986
|
-
\`\`\`bash
|
|
1987
|
-
# Stage changes
|
|
1988
|
-
git add .
|
|
1989
|
-
|
|
1990
|
-
# Commit with detailed message following git_workflow.mdc format
|
|
1991
|
-
git commit -m "feat(task-1): Complete subtask 1.1 - [Subtask Title]
|
|
1992
|
-
|
|
1993
|
-
- Implementation details
|
|
1994
|
-
- Key changes made
|
|
1995
|
-
- Files modified: [list files]
|
|
1996
|
-
- CodeRabbit review completed
|
|
1997
|
-
|
|
1998
|
-
Subtask 1.1: [Brief description of what was accomplished]
|
|
1999
|
-
Relates to Task 1: [Main task title]"
|
|
2000
|
-
\`\`\`
|
|
2001
|
-
|
|
2002
|
-
#### 4.4.8: Mark Subtask as Done
|
|
2003
|
-
\`\`\`bash
|
|
2004
|
-
tm set-status -i 1.1 -s done
|
|
2005
|
-
\`\`\`
|
|
2006
|
-
|
|
2007
|
-
#### 4.4.9: Move to Next Subtask
|
|
2008
|
-
Repeat steps 4.4.1 through 4.4.8 for the next subtask (1.2, 1.3, etc.)
|
|
2009
|
-
|
|
2010
|
-
### 4.5: Complete Parent Task
|
|
2011
|
-
|
|
2012
|
-
After all subtasks are complete:
|
|
2013
|
-
|
|
2014
|
-
#### 4.5.1: Final Quality Checks
|
|
2015
|
-
\`\`\`bash
|
|
2016
|
-
# Final linting
|
|
2017
|
-
pnpm lint
|
|
2018
|
-
|
|
2019
|
-
# Final type checking
|
|
2020
|
-
pnpm typecheck
|
|
2021
|
-
|
|
2022
|
-
# Final CodeRabbit review
|
|
2023
|
-
coderabbit --prompt-only
|
|
2024
|
-
|
|
2025
|
-
# Address any remaining issues if critical
|
|
2026
|
-
\`\`\`
|
|
2027
|
-
|
|
2028
|
-
#### 4.5.2: Log Task Completion
|
|
2029
|
-
\`\`\`bash
|
|
2030
|
-
# Document final task completion
|
|
2031
|
-
tm update-task -i 1 --append --prompt="Task 1 - Complete:
|
|
2032
|
-
|
|
2033
|
-
- All subtasks completed: [list all subtasks]
|
|
2034
|
-
- Final verification passed: lint, typecheck, CodeRabbit review
|
|
2035
|
-
- Files changed: [comprehensive list]
|
|
2036
|
-
- Committed to brief branch"
|
|
2037
|
-
\`\`\`
|
|
2038
|
-
|
|
2039
|
-
#### 4.5.3: Mark Parent Task as Done
|
|
2040
|
-
\`\`\`bash
|
|
2041
|
-
tm set-status -i 1 -s done
|
|
2042
|
-
\`\`\`
|
|
2043
|
-
|
|
2044
|
-
**Note**: Do NOT push or create PR yet. Continue to next task in the same branch.
|
|
2045
|
-
|
|
2046
|
-
### 4.6: Move to Next Task
|
|
2047
|
-
|
|
2048
|
-
\`\`\`bash
|
|
2049
|
-
# Verify remaining tasks
|
|
2050
|
-
tm list
|
|
2051
|
-
|
|
2052
|
-
# Continue with next task (e.g., Task 2)
|
|
2053
|
-
# Repeat steps 4.1 through 4.5 for Task 2, then Task 3, etc.
|
|
2054
|
-
\`\`\`
|
|
2055
|
-
|
|
2056
|
-
## Step 5: Complete All Tasks
|
|
2057
|
-
|
|
2058
|
-
Continue working through all tasks (Steps 4.1-4.6) until all tasks in the brief are complete. All work is committed to the same \`hamster-brief\` branch.
|
|
2059
|
-
|
|
2060
|
-
## Step 6: Final Verification & PR Creation
|
|
2061
|
-
|
|
2062
|
-
After ALL tasks are complete:
|
|
2063
|
-
|
|
2064
|
-
### 6.1: Verify All Tasks Complete
|
|
2065
|
-
\`\`\`bash
|
|
2066
|
-
# Verify all tasks are done
|
|
2067
|
-
tm list
|
|
2068
|
-
|
|
2069
|
-
# Should show all tasks with status 'done'
|
|
2070
|
-
\`\`\`
|
|
2071
|
-
|
|
2072
|
-
### 6.2: Final Quality Checks
|
|
2073
|
-
\`\`\`bash
|
|
2074
|
-
# Final comprehensive checks
|
|
2075
|
-
pnpm lint
|
|
2076
|
-
pnpm typecheck
|
|
2077
|
-
coderabbit --prompt-only
|
|
2078
|
-
|
|
2079
|
-
# Address any remaining issues if critical
|
|
2080
|
-
\`\`\`
|
|
2081
|
-
|
|
2082
|
-
### 6.3: Push Branch
|
|
2083
|
-
\`\`\`bash
|
|
2084
|
-
# Push the brief branch to remote
|
|
2085
|
-
git push origin hamster-brief
|
|
2086
|
-
\`\`\`
|
|
2087
|
-
|
|
2088
|
-
### 6.4: Create Pull Request to Dev
|
|
2089
|
-
\`\`\`bash
|
|
2090
|
-
# Get all task titles (adjust task IDs as needed)
|
|
2091
|
-
# Create comprehensive PR description
|
|
2092
|
-
|
|
2093
|
-
gh pr create \\
|
|
2094
|
-
--base dev \\
|
|
2095
|
-
--title "Hamster Brief: Complete Implementation" \\
|
|
2096
|
-
--body "## Brief Overview
|
|
2097
|
-
Completed all tasks from Hamster brief.
|
|
2098
|
-
|
|
2099
|
-
## Tasks Completed
|
|
2100
|
-
- [x] Task 1: [Task 1 title]
|
|
2101
|
-
- Subtasks: 1.1, 1.2, 1.3
|
|
2102
|
-
- [x] Task 2: [Task 2 title]
|
|
2103
|
-
- Subtasks: 2.1, 2.2
|
|
2104
|
-
- [x] Task 3: [Task 3 title]
|
|
2105
|
-
- [Continue listing all tasks]
|
|
2106
|
-
|
|
2107
|
-
## Implementation Summary
|
|
2108
|
-
- Total tasks: [number]
|
|
2109
|
-
- Total subtasks: [number]
|
|
2110
|
-
- Files modified: [comprehensive list]
|
|
2111
|
-
- All quality checks passed
|
|
2112
|
-
|
|
2113
|
-
## Quality Checks
|
|
2114
|
-
- Linting passed (pnpm lint)
|
|
2115
|
-
- Type checking passed (pnpm typecheck)
|
|
2116
|
-
- CodeRabbit review completed for all changes
|
|
2117
|
-
|
|
2118
|
-
## Testing
|
|
2119
|
-
- [ ] Manual testing completed
|
|
2120
|
-
- [ ] All checks passing
|
|
2121
|
-
|
|
2122
|
-
Complete implementation of Hamster brief tasks"
|
|
2123
|
-
\`\`\`
|
|
2124
|
-
|
|
2125
|
-
## Step 7: Cleanup
|
|
2126
|
-
|
|
2127
|
-
\`\`\`bash
|
|
2128
|
-
# After PR is merged, switch back to dev
|
|
2129
|
-
git checkout dev
|
|
2130
|
-
git pull origin dev
|
|
2131
|
-
|
|
2132
|
-
# Delete local branch (optional)
|
|
2133
|
-
git branch -d hamster-brief
|
|
2134
|
-
\`\`\`
|
|
2135
|
-
|
|
2136
|
-
## Important Notes
|
|
2137
|
-
|
|
2138
|
-
- **Use ONLY**: \`tm list\`, \`tm show <id>\`, \`tm set-status\`, \`tm update-task\`, \`tm auth refresh\`, \`tm context <brief url>\`
|
|
2139
|
-
- **DON'T use MCP tools** - not compatible with Hamster integration
|
|
2140
|
-
- **Single branch per brief**: All tasks work in the same branch (\`hamster-brief\`)
|
|
2141
|
-
- **Single PR per brief**: One PR created after all tasks are complete
|
|
2142
|
-
- **Always target dev branch** - never main branch
|
|
2143
|
-
- **Regular logging**: Use \`tm update-task -i <id> --append\` frequently to document:
|
|
2144
|
-
- Context gathered during exploration
|
|
2145
|
-
- Implementation decisions made
|
|
2146
|
-
- Challenges encountered
|
|
2147
|
-
- Completion status
|
|
2148
|
-
- **Quality gates**: Never skip lint, typecheck, or CodeRabbit review
|
|
2149
|
-
- **Commit format**: Follow git_workflow.mdc commit message standards
|
|
2150
|
-
- **PR format**: Always use \`--base dev\` when creating PRs
|
|
2151
|
-
|
|
2152
|
-
## Workflow Summary
|
|
2153
|
-
|
|
2154
|
-
\`\`\`
|
|
2155
|
-
1. Verify connection -> tm context
|
|
2156
|
-
2. List tasks -> tm list
|
|
2157
|
-
3. Create single branch -> git checkout -b hamster-brief
|
|
2158
|
-
4. For each task (in same branch):
|
|
2159
|
-
a. Read task -> tm show X
|
|
2160
|
-
b. Log context -> tm update-task -i X --append
|
|
2161
|
-
c. Mark in-progress -> tm set-status -i X,X.Y -s in-progress
|
|
2162
|
-
d. For each subtask:
|
|
2163
|
-
- Read -> tm show X.Y
|
|
2164
|
-
- Log context -> tm update-task -i X --append
|
|
2165
|
-
- Implement code
|
|
2166
|
-
- Verify -> pnpm lint && pnpm typecheck
|
|
2167
|
-
- Review -> coderabbit --prompt-only
|
|
2168
|
-
- Log completion -> tm update-task -i X --append
|
|
2169
|
-
- Commit -> git commit (following git_workflow.mdc format)
|
|
2170
|
-
- Mark done -> tm set-status -i X.Y -s done
|
|
2171
|
-
e. Final checks -> pnpm lint && pnpm typecheck && coderabbit --prompt-only
|
|
2172
|
-
f. Log completion -> tm update-task -i X --append
|
|
2173
|
-
g. Mark task done -> tm set-status -i X -s done
|
|
2174
|
-
h. Continue to next task (same branch)
|
|
2175
|
-
5. After ALL tasks complete:
|
|
2176
|
-
a. Final verification -> pnpm lint && pnpm typecheck && coderabbit --prompt-only
|
|
2177
|
-
b. Push branch -> git push origin hamster-brief
|
|
2178
|
-
c. Create PR -> gh pr create --base dev
|
|
2179
|
-
\`\`\`
|
|
2180
|
-
`}),V(`show-task`,`Show Task`,`<task-id>`,`Show detailed task information with rich context and insights.
|
|
1856
|
+
- Backup redundancy`});const Ue=[_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,U(`show-task`,`Show Task`,`<task-id>`,`Show detailed task information with rich context and insights.
|
|
2181
1857
|
|
|
2182
1858
|
Arguments: $ARGUMENTS
|
|
2183
1859
|
|
|
@@ -2258,7 +1934,7 @@ When showing multiple tasks:
|
|
|
2258
1934
|
- Common dependencies
|
|
2259
1935
|
- Optimal completion order
|
|
2260
1936
|
- Parallel work opportunities
|
|
2261
|
-
- Combined complexity analysis`),
|
|
1937
|
+
- Combined complexity analysis`),U(`list-tasks`,`List Tasks`,`[filters]`,`List tasks with intelligent argument parsing.
|
|
2262
1938
|
|
|
2263
1939
|
Parse arguments to determine filters and display options:
|
|
2264
1940
|
- Status: pending, in-progress, done, review, deferred, cancelled
|
|
@@ -2300,7 +1976,7 @@ Let me parse your request intelligently:
|
|
|
2300
1976
|
Based on what you're viewing, suggest next actions:
|
|
2301
1977
|
- Many pending? → Suggest priority order
|
|
2302
1978
|
- Many blocked? → Show dependency resolution
|
|
2303
|
-
- Looking at specific tasks? → Show related tasks`),
|
|
1979
|
+
- 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.
|
|
2304
1980
|
|
|
2305
1981
|
This command shows all tasks with their nested subtasks, providing a complete project overview.
|
|
2306
1982
|
|
|
@@ -2328,7 +2004,7 @@ Based on the task hierarchy:
|
|
|
2328
2004
|
- Group by functional areas
|
|
2329
2005
|
- Indicate critical path items
|
|
2330
2006
|
|
|
2331
|
-
This gives you a complete tree view of your project structure.`}),
|
|
2007
|
+
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.
|
|
2332
2008
|
|
|
2333
2009
|
Arguments: $ARGUMENTS
|
|
2334
2010
|
|
|
@@ -2366,7 +2042,7 @@ Based on the status filter:
|
|
|
2366
2042
|
- **Done**: Show newly unblocked tasks
|
|
2367
2043
|
- **Review**: Indicate review duration
|
|
2368
2044
|
- **Deferred**: Show reactivation criteria
|
|
2369
|
-
- **Cancelled**: Display impact analysis`),
|
|
2045
|
+
- **Cancelled**: Display impact analysis`),U(`project-status`,`Project Status`,`[focus-area]`,`Enhanced status command with comprehensive project insights.
|
|
2370
2046
|
|
|
2371
2047
|
Arguments: $ARGUMENTS
|
|
2372
2048
|
|
|
@@ -2429,7 +2105,7 @@ Compare to previous periods:
|
|
|
2429
2105
|
- Velocity changes
|
|
2430
2106
|
- Pattern recognition
|
|
2431
2107
|
- Improvement areas
|
|
2432
|
-
- Success patterns to repeat`),
|
|
2108
|
+
- Success patterns to repeat`),U(`next-task`,`Next Task`,`[preference]`,`Intelligently determine and prepare the next action based on comprehensive context.
|
|
2433
2109
|
|
|
2434
2110
|
This enhanced version of 'next' considers:
|
|
2435
2111
|
- Current task states
|
|
@@ -2494,7 +2170,7 @@ Seamlessly connect to:
|
|
|
2494
2170
|
- \`/project:taskgraph:expand\` (if complex)
|
|
2495
2171
|
- \`/project:utils:complexity-report\` (if unsure)
|
|
2496
2172
|
|
|
2497
|
-
The goal: Zero friction from decision to implementation.`),
|
|
2173
|
+
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: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.
|
|
2498
2174
|
|
|
2499
2175
|
Arguments: $ARGUMENTS (task ID)
|
|
2500
2176
|
|
|
@@ -2537,7 +2213,7 @@ taskgraph set-status --id=$ARGUMENTS --status=done
|
|
|
2537
2213
|
- Show impact of completion
|
|
2538
2214
|
- Display unblocked work
|
|
2539
2215
|
- Recognize achievement
|
|
2540
|
-
- Capture lessons learned`),
|
|
2216
|
+
- Capture lessons learned`),U(`to-pending`,`To Pending`,`<task-id>`,`Set a task's status to pending.
|
|
2541
2217
|
|
|
2542
2218
|
Arguments: $ARGUMENTS (task ID)
|
|
2543
2219
|
|
|
@@ -2568,7 +2244,7 @@ After setting to pending:
|
|
|
2568
2244
|
- Update sprint planning if needed
|
|
2569
2245
|
- Notify about freed resources
|
|
2570
2246
|
- Suggest priority reassessment
|
|
2571
|
-
- Log the status change with context`),
|
|
2247
|
+
- 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.
|
|
2572
2248
|
|
|
2573
2249
|
Arguments: $ARGUMENTS (task ID)
|
|
2574
2250
|
|
|
@@ -2603,7 +2279,7 @@ After setting to in-progress:
|
|
|
2603
2279
|
- Estimated completion time based on complexity
|
|
2604
2280
|
- Related files from similar tasks
|
|
2605
2281
|
- Potential blockers to watch for
|
|
2606
|
-
- Recommended first steps`),
|
|
2282
|
+
- Recommended first steps`),U(`update-task`,`Update Task`,`<update-spec>`,`Update tasks with intelligent field detection and bulk operations.
|
|
2607
2283
|
|
|
2608
2284
|
Arguments: $ARGUMENTS
|
|
2609
2285
|
|
|
@@ -2674,7 +2350,7 @@ After updates:
|
|
|
2674
2350
|
- Update sprint/milestone progress
|
|
2675
2351
|
- Log changes with context
|
|
2676
2352
|
|
|
2677
|
-
Result: Flexible, intelligent task updates with safety checks.`),
|
|
2353
|
+
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.
|
|
2678
2354
|
|
|
2679
2355
|
Arguments: $ARGUMENTS
|
|
2680
2356
|
|
|
@@ -2792,7 +2468,7 @@ Quick syntax for specific fields:
|
|
|
2792
2468
|
- Highlight changes
|
|
2793
2469
|
- Check related tasks
|
|
2794
2470
|
- Update suggestions
|
|
2795
|
-
- Timeline adjustments`),
|
|
2471
|
+
- Timeline adjustments`),U(`update-tasks-from-id`,`Update Tasks From ID`,`<from-id> <changes>`,`Update multiple tasks starting from a specific ID.
|
|
2796
2472
|
|
|
2797
2473
|
Arguments: $ARGUMENTS
|
|
2798
2474
|
|
|
@@ -2899,7 +2575,7 @@ Applied updates:
|
|
|
2899
2575
|
- Summary of changes
|
|
2900
2576
|
- Consistency verification
|
|
2901
2577
|
- Suggest review tasks
|
|
2902
|
-
- Update timeline if needed`),
|
|
2578
|
+
- 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\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.
|
|
2903
2579
|
|
|
2904
2580
|
This command analyzes:
|
|
2905
2581
|
1. Recent commands you've run
|
|
@@ -2953,7 +2629,7 @@ This command learns from your patterns:
|
|
|
2953
2629
|
Example flows detected:
|
|
2954
2630
|
- Morning: standup → next → start
|
|
2955
2631
|
- After lunch: status → continue task
|
|
2956
|
-
- End of day: complete → commit → status`),
|
|
2632
|
+
- End of day: complete → commit → status`),U(`learn`,`Learn`,`[topic]`,`Learn about TaskGraph capabilities through interactive exploration.
|
|
2957
2633
|
|
|
2958
2634
|
Arguments: $ARGUMENTS
|
|
2959
2635
|
|
|
@@ -3055,7 +2731,7 @@ Based on what you asked about, try:
|
|
|
3055
2731
|
[Specific command suggestion based on $ARGUMENTS]
|
|
3056
2732
|
|
|
3057
2733
|
Want to learn more about a specific command?
|
|
3058
|
-
Type: /project:help <command-name>`),
|
|
2734
|
+
Type: /project:help <command-name>`),U(`command-pipeline`,`Command Pipeline`,`<pipeline-spec>`,`Execute a pipeline of commands based on a specification.
|
|
3059
2735
|
|
|
3060
2736
|
Arguments: $ARGUMENTS
|
|
3061
2737
|
|
|
@@ -3131,7 +2807,7 @@ if:idle>1day → prompt-update
|
|
|
3131
2807
|
6. Show summary
|
|
3132
2808
|
|
|
3133
2809
|
This enables complex workflows like:
|
|
3134
|
-
\`parse-prd → expand-all → filter:complex>70 → assign:senior → sprint-plan:weighted\``),
|
|
2810
|
+
\`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.
|
|
3135
2811
|
|
|
3136
2812
|
Arguments: $ARGUMENTS
|
|
3137
2813
|
|
|
@@ -3227,7 +2903,7 @@ After completion:
|
|
|
3227
2903
|
- Suggest follow-up tasks
|
|
3228
2904
|
- Update task relationships
|
|
3229
2905
|
|
|
3230
|
-
Result: High-quality, production-ready implementations.`),
|
|
2906
|
+
Result: High-quality, production-ready implementations.`),U(`analyze-project`,`Analyze Project`,`[focus-area]`,`Advanced project analysis with actionable insights and recommendations.
|
|
3231
2907
|
|
|
3232
2908
|
Arguments: $ARGUMENTS
|
|
3233
2909
|
|
|
@@ -3323,7 +2999,7 @@ High-level summary with:
|
|
|
3323
2999
|
- Recommended actions
|
|
3324
3000
|
- Success probability
|
|
3325
3001
|
|
|
3326
|
-
Result: Data-driven decisions with clear action paths.`),
|
|
3002
|
+
Result: Data-driven decisions with clear action paths.`),U(`sync-readme`,`Sync README`,`[options]`,`Export tasks to README.md with professional formatting.
|
|
3327
3003
|
|
|
3328
3004
|
Arguments: $ARGUMENTS
|
|
3329
3005
|
|
|
@@ -3439,22 +3115,22 @@ Works well with:
|
|
|
3439
3115
|
- CI/CD pipelines
|
|
3440
3116
|
- Project documentation
|
|
3441
3117
|
- Team updates
|
|
3442
|
-
- Client reports`)];
|
|
3443
|
-
`)}}};function
|
|
3444
|
-
`)||t.includes(`\r`))return{success:!1,message:`Invalid value: must be a single-line string without newlines`};let r=
|
|
3118
|
+
- Client reports`)];var We=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?v.join(e,this.commandsDir,`tm`):v.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=v.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=v.basename(t,v.extname(t)).toLowerCase();if(e.has(n)){let e=v.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 Ge={claude:new class extends We{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(`
|
|
3119
|
+
`)}}};function Ke(e){return Ge[e.toLowerCase()]}function qe(){let e=ie.homedir(),t=process.env.SHELL||``;if(t.includes(`zsh`))return y.join(e,`.zshrc`);if(t.includes(`bash`)){let t=y.join(e,`.bash_profile`);return process.platform===`darwin`?t:y.join(e,`.bashrc`)}if(t.includes(`fish`))return y.join(e,`.config`,`fish`,`config.fish`);if(process.platform===`win32`){if(process.env.PSModulePath){let t=process.env.PROFILE||y.join(e,`Documents`,`WindowsPowerShell`,`Microsoft.PowerShell_profile.ps1`),n=y.join(e,`Documents`,`PowerShell`,`Microsoft.PowerShell_profile.ps1`);return S.existsSync(n)?n:S.existsSync(t)?t:n}let t=y.join(e,`.bashrc`);if(S.existsSync(t))return t}let n=y.join(e,`.zshrc`);if(S.existsSync(n))return n;let r=y.join(e,`.bashrc`);return S.existsSync(r)?r:null}function W(e){return e.endsWith(`.ps1`)}function G(e){return e.includes(`config.fish`)}function Je(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(`
|
|
3120
|
+
`)||t.includes(`\r`))return{success:!1,message:`Invalid value: must be a single-line string without newlines`};let r=qe();if(!r)return{success:!1,message:`Could not determine shell type (zsh, bash, fish, or PowerShell)`};try{let i=y.dirname(r);if(S.existsSync(i)||S.mkdirSync(i,{recursive:!0}),!S.existsSync(r)){let e=process.platform===`darwin`&&r.endsWith(`.bash_profile`);if(W(r)||e)S.writeFileSync(r,``);else return{success:!1,shellConfigFile:r,message:`Shell config file ${r} not found`}}let a=S.readFileSync(r,`utf8`),o;if(o=W(r)?RegExp(`^\\s*\\$env:${e}\\s*=`,`m`).test(a):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 S.appendFileSync(r,l),{success:!0,shellConfigFile:r,message:`Added ${e} to ${r}`}}catch(e){return{success:!1,shellConfigFile:r,message:`Failed to modify shell config: ${e.message}`}}}function Ye(){return Je(`ENABLE_EXPERIMENTAL_MCP_CLI`,`true`,`Claude Code deferred MCP loading (added by TaskGraph)`)}function Xe(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?y.join(r,o):null,f=null;try{let e=Ke(t);e?.supportsCommands&&(f={profile:e,commands:Ue})}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 Ze(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=y.join(t,`AGENTS.md`),r=y.join(e,`CLAUDE.md`),i=y.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(S.existsSync(n))try{let t=y.join(e,`.taskgraph`);if(S.existsSync(t)||S.mkdirSync(t,{recursive:!0}),S.copyFileSync(n,i),d(`debug`,`[Claude] Created TaskGraph instructions at ${i}`),S.existsSync(r)){let e=S.readFileSync(r,`utf8`);if(e.includes(a))d(`info`,`[Claude] TaskGraph import already present in ${r}`);else{let t=e.trim()+`
|
|
3445
3121
|
`+o+`
|
|
3446
|
-
`;S.writeFileSync(r,t),d(`info`,`[Claude] Added TaskGraph import to existing ${r}`)}}else{let e=`# Claude Code Instructions\n${o}\n`;S.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=
|
|
3447
|
-
`),d(`debug`,`[Claude] Transformed MCP configuration to Claude format at ${n}`)}catch(e){d(`error`,`[Claude] Failed to transform MCP configuration: ${e.message}`)}}const
|
|
3448
|
-
`)}\n\n${i}`}function
|
|
3122
|
+
`;S.writeFileSync(r,t),d(`info`,`[Claude] Added TaskGraph import to existing ${r}`)}}else{let e=`# Claude Code Instructions\n${o}\n`;S.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=Ye();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 Qe(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 $e(e,t){let n=y.join(e,`.mcp.json`);if(S.existsSync(n))try{let e=Qe(JSON.parse(S.readFileSync(n,`utf8`)));S.writeFileSync(n,JSON.stringify(e,null,` `)+`
|
|
3123
|
+
`),d(`debug`,`[Claude] Transformed MCP configuration to Claude format at ${n}`)}catch(e){d(`error`,`[Claude] Failed to transform MCP configuration: ${e.message}`)}}const et=Xe({name:`claude`,displayName:`Claude Code`,profileDir:`.`,rulesDir:`.`,mcpConfigName:`.mcp.json`,fileMap:{"AGENTS.md":`.taskgraph/CLAUDE.md`},onAdd:Ze,onPostConvert:$e});var tt=e({claudeProfile:()=>et});function nt(e){return E.includes(e)}function rt(e){if(!nt(e))return null;let t=tt[`${e}Profile`];if(!t)throw Error(`Profile not found: static import missing for '${e}'. Valid profiles: ${E.join(`, `)}`);return t}function it(e,t){let n=y.join(e,t.rulesDir),r=0;if(typeof t.onAddRulesProfile==`function`)try{t.onAddRulesProfile(n,I()),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{ge(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,I()),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 at(){let e=(e,t)=>`${p.text(`${e}. `)}${_.yellow(t)}`,t=(e,t)=>`${p.text(e?` └─ `:` ├─ `)}${t}`,n=e=>`${_.dim(`CLI: `)}${_.cyan(e)}`,r=[e(1,`Choose your AI models (optional)`),t(!1,`${_.dim(`Models: Use `)}${_.cyan(`taskgraph models --setup`)}`),t(!0,_.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,`${_.dim(`Simple projects: Use `)}${_.cyan(`example_prd.txt`)}${_.dim(` template`)}`),t(!0,`${_.dim(`Complex systems: Use `)}${_.cyan(`example_prd_rpg.txt`)}${_.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. `)}${_.green.bold(`Ship it!`)}`],i=`${_.dim(`* Run `)}${_.cyan(`taskgraph --help`)}${_.dim(` to see all available commands`)}`;return`${_.cyan.bold(`Things you should do next:`)}\n\n${r.join(`
|
|
3124
|
+
`)}\n\n${i}`}function ot(e){try{let t=JSON.parse(S.readFileSync(e,`utf-8`));for(let e of[`main`,`research`,`fallback`])if(t.models&&t.models[e]){let n=t.models[e].provider,r=t.models[e].modelId;if(c[n]){let i=c[n].find(e=>e.id===r);i&&i.max_tokens&&(t.models[e].maxTokens=i.max_tokens)}}return S.writeFileSync(e,JSON.stringify(t,null,2)),!0}catch(e){return console.error(`Error updating config maxTokens:`,e.message),!1}}const K={debug:0,info:1,warn:2,error:3,success:4},st=process.env.TASKGRAPH_LOG_LEVEL?K[process.env.TASKGRAPH_LOG_LEVEL.toLowerCase()]:K.info;function q(){f()||g()}function J(e,...t){let n={debug:p.muted(`•`),info:p.brand(`→`),warn:_.yellow(`!`),error:_.red(`✗`),success:_.green(`✓`)};if(K[e]>=st){let r=n[e]||``;f()||(e===`error`?console.error(r,_.red(...t)):e===`warn`?console.warn(r,_.yellow(...t)):e===`success`?console.log(r,_.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`;S.appendFileSync(`init-debug.log`,n)}}function Y(e){S.existsSync(e)||(S.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=y.join(e,`.zshrc`);else if(process.env.SHELL?.includes(`bash`))t=y.join(e,`.bashrc`);else return J(`debug`,`Could not determine shell type. Aliases not added.`),!1;try{if(!S.existsSync(t))return J(`debug`,`Shell config file ${t} not found.`),!1;let e=S.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(`
|
|
3449
3125
|
`),i=`
|
|
3450
3126
|
# TaskGraph aliases added on ${new Date().toLocaleDateString()}
|
|
3451
3127
|
${r}
|
|
3452
|
-
`;return S.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
|
|
3128
|
+
`;return S.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 ct(e){let t=y.join(e,l);if(S.existsSync(t)){J(`debug`,`State file already exists, preserving current configuration`);return}let n={currentTag:`master`,lastSwitched:new Date().toISOString(),branchTagMapping:{},migrationNoticeShown:!1};try{S.writeFileSync(t,JSON.stringify(n,null,2)),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(!R(e)){J(`error`,`Source file not found: ${e}`);return}let r=z(e,`utf8`);if(Object.entries(n).forEach(([e,t])=>{let n=RegExp(`\\{\\{${e}\\}\\}`,`g`);r=r.replace(n,t)}),S.existsSync(t)){let e=y.basename(t);if(e===`.gitignore`){J(`info`,`${t} already exists, merging content...`);let e=S.readFileSync(t,`utf8`),n=new Set(e.split(`
|
|
3453
3129
|
`).map(e=>e.trim())),i=r.split(`
|
|
3454
3130
|
`).filter(e=>!n.has(e.trim()));if(i.length>0){let n=`${e.trim()}\n\n# Added by TaskGraph\n${i.join(`
|
|
3455
|
-
`)}`;S.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=y.join(y.dirname(t),`README-taskgraph.md`);S.writeFileSync(e,r),J(`success`,`Created ${e} (preserved original README-taskgraph.md)`);return}J(`debug`,`${t} already exists, skipping.`);return}S.writeFileSync(t,r),J(`info`,`Created file: ${t}`)}async function
|
|
3131
|
+
`)}`;S.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=y.join(y.dirname(t),`README-taskgraph.md`);S.writeFileSync(e,r),J(`success`,`Created ${e} (preserved original README-taskgraph.md)`);return}J(`debug`,`${t} already exists, skipping.`);return}S.writeFileSync(t,r),J(`info`,`Created file: ${t}`)}async function lt(e={}){f()||q(),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?!0:e.initGit,i=e.storeTasksInGit===void 0?!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: ${ut()}`),t=T.createInterface({input:process.stdin,output:process.stdout});let r=!0,i=!0;r=e.initGit===void 0?(await Q(t,_.cyan(`Initialize a Git repository in project root? (Y/n): `),e=>{let t=e.trim().toLowerCase()!==`n`,n=t?_.green(`✓`):_.red(`✗`);return _.cyan(`Initialize a Git repository in project root?`)+` `+n+` `+_.dim(t?`Yes`:`No`)})).trim().toLowerCase()!==`n`:e.initGit,i=e.storeTasksInGit===void 0?(await Q(t,_.cyan(`Store tasks in Git (tasks.json and tasks/ directory)? (Y/n): `),e=>{let t=e.trim().toLowerCase()!==`n`,n=t?_.green(`✓`):_.red(`✗`);return _.cyan(`Store tasks in Git (tasks.json and tasks/ directory)?`)+` `+n+` `+_.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,_.cyan(`Set up Claude Code integration (CLAUDE.md import)? (y/N): `),e=>{let t=e.trim().toLowerCase()===`y`,n=t?_.green(`✓`):_.red(`✗`);return _.cyan(`Set up Claude Code integration?`)+` `+n+` `+_.dim(t?`Yes`:`No`)})).trim().toLowerCase()===`y`;let o=(await Q(t,_.cyan(`Preferred response language (English): `))).trim()||`English`;console.log(`
|
|
3456
3132
|
`+_.bold(`TaskGraph Project Settings:`)),console.log(_.dim(`─`.repeat(50)));let s=a?_.green(`✓`):_.dim(`✗`);console.log(` `+_.dim(`Claude Code integration:`.padEnd(32)),s+` `+_.dim(a?`Yes`:`No`)),console.log(` `+_.dim(`Response language:`.padEnd(32)),p.text(o));let c=r?_.green(`✓`):_.dim(`✗`);console.log(` `+_.dim(`Initialize Git repository:`.padEnd(32)),c+` `+_.dim(r?`Yes`:`No`));let l=i?_.green(`✓`):_.dim(`✗`);if(console.log(` `+_.dim(`Store tasks in Git:`.padEnd(32)),l+` `+_.dim(i?`Yes`:`No`)),console.log(_.dim(`─`.repeat(50))),(await Q(t,_.yellow(`
|
|
3457
3133
|
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?E: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=>{T.moveCursor(process.stdout,0,-1),T.cursorTo(process.stdout,0),T.clearLine(process.stdout,0),n&&process.stdout.write(n(e)+`
|
|
3458
|
-
`),r(e)})})}function
|
|
3134
|
+
`),r(e)})})}function ut(){return ae()}function dt(e){try{if(!S.existsSync(e)){J(`warn`,`Config file does not exist, skipping storage configuration`);return}let t=S.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`),S.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,g=E){let v=process.cwd();J(`debug`,`Initializing project in ${v}`),Y(y.join(v,a)),Y(y.join(v,i)),Y(y.join(v,u)),Y(y.join(v,t)),Y(y.join(v,o)),ct(v);let b={year:new Date().getFullYear()};function S(e){let t=rt(e);t?it(v,t):J(`warn`,`Unknown rule profile: ${e}`)}Z(`env.example`,y.join(v,n),b),Z(`config.json`,y.join(v,r),{...b});let C=y.join(v,r);ot(C)?J(`debug`,`Updated config with correct maxTokens values`):J(`debug`,`Could not update maxTokens in config`),dt(C);try{let e=z(`gitignore`,`utf8`);pe(y.join(v,s),e,l,J)}catch(e){J(`error`,`Failed to create .gitignore: ${e.message}`)}Z(`example_prd.txt`,y.join(v,ee)),Z(`example_prd_rpg.txt`,y.join(v,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...`),x(`git init`,{cwd:v,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...`),x(`git init`,{cwd:v,stdio:`ignore`}),J(`success`,`Git repository initialized`))}catch{J(`warn`,`Git not available, skipping repository initialization`)}if(g.length>0){J(`info`,`Setting up Claude Code integration...`);for(let e of g)S(e)}e&&X();let T={cwd:v,stdio:`inherit`};if(f()&&(T.stdio=`ignore`,J(`info`,`Running npm install silently...`)),p.preferredLanguage&&!d)try{let e=(await import(`./response-language-bOP2mgFX.js`)).default;e(p.preferredLanguage,{projectRoot:v,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(w(_.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{x(`npx taskgraph models --setup`,{stdio:`inherit`,cwd:v}),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(w(`${h.multiline(te.textSync(`Success!`,{font:`Standard`}))}\n${_.green(`Project initialized successfully!`)}`,{padding:1,margin:1,borderStyle:`double`,borderColor:`green`,width:60})),!f()){let e=at();console.log(w(_.yellow.bold(`Workflow
|
|
3459
3135
|
`)+`
|
|
3460
|
-
`+e,{padding:1,margin:{top:0,bottom:1,left:0,right:0},borderStyle:`round`,borderColor:`yellow`,width:60}))}}export{E as n,
|
|
3136
|
+
`+e,{padding:1,margin:{top:0,bottom:1,left:0,right:0},borderStyle:`round`,borderColor:`yellow`,width:60}))}}export{E as n,D as r,lt as t};
|