taskgraph-ai 0.52.5 → 0.52.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.
- package/README.md +14 -5
- package/dist/{ai-services-unified-CWlgkNAC.js → ai-services-unified-BoN4p2hA.js} +1 -1
- package/dist/ai-services-unified-CHZ3zO7j.js +1 -0
- package/dist/{commands-_dTa40Il.js → commands-CVaRxzM_.js} +5 -5
- package/dist/config-manager-96j0so3y.js +1 -0
- package/dist/{config-manager-zxA6523o.js → config-manager-BsFjnt24.js} +1 -1
- package/dist/{dependency-manager-CWOLP93J.js → dependency-manager-B8yi2Gx9.js} +126 -116
- package/dist/{init-ScTiqsP2.js → init-C5edkNsj.js} +11 -5
- package/dist/mcp-server.js +3 -3
- package/dist/research-CL0Qp4qV.js +1 -0
- package/dist/response-language-CdItlKWm.js +1 -0
- package/dist/{response-language-6FFhQuEK.js → response-language-HGhUMUxw.js} +1 -1
- package/dist/src-BEBHskRG.js +207 -0
- package/dist/{tag-management-gdxZIuxd.js → tag-management-gKDrWbhk.js} +1 -1
- package/dist/{task-manager-C_sHn7Dr.js → task-manager-BkCMdf4Y.js} +1 -1
- package/dist/taskgraph.js +1 -1
- package/dist/update-subtask-by-id-D8UzfSSD.js +1 -0
- package/dist/update-task-by-id-D5vcjz54.js +1 -0
- package/dist/utils-CDh4OilX.js +1 -0
- package/package.json +22 -21
- package/dist/ai-services-unified-Bpmo3YbS.js +0 -1
- package/dist/config-manager-CPv4c82B.js +0 -1
- package/dist/research-CsfjNJUm.js +0 -1
- package/dist/response-language-BYFK7Kti.js +0 -1
- package/dist/src-DU9xk1LQ.js +0 -207
- package/dist/update-subtask-by-id-DouI1CLA.js +0 -1
- package/dist/update-task-by-id-B6yy6LHu.js +0 -1
- package/dist/utils-89ZUGcCU.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./ai-services-unified-
|
|
1
|
+
import{o as e}from"./ai-services-unified-BoN4p2hA.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-BsFjnt24.js";import{r as m}from"./git-utils--i2q96hv.js";import{a as te,ft as h}from"./dependency-manager-B8yi2Gx9.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
2
|
`)+`
|
|
3
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
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(`
|
|
@@ -1934,7 +1934,13 @@ When showing multiple tasks:
|
|
|
1934
1934
|
- Common dependencies
|
|
1935
1935
|
- Optimal completion order
|
|
1936
1936
|
- Parallel work opportunities
|
|
1937
|
-
- Combined complexity analysis`),U(`
|
|
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.
|
|
1938
1944
|
|
|
1939
1945
|
Parse arguments to determine filters and display options:
|
|
1940
1946
|
- Status: pending, in-progress, done, review, deferred, cancelled
|
|
@@ -2170,7 +2176,7 @@ Seamlessly connect to:
|
|
|
2170
2176
|
- \`/project:taskgraph:expand\` (if complex)
|
|
2171
2177
|
- \`/project:utils:complexity-report\` (if unsure)
|
|
2172
2178
|
|
|
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.
|
|
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.
|
|
2174
2180
|
|
|
2175
2181
|
Arguments: $ARGUMENTS (task ID)
|
|
2176
2182
|
|
|
@@ -2575,7 +2581,7 @@ Applied updates:
|
|
|
2575
2581
|
- Summary of changes
|
|
2576
2582
|
- Consistency verification
|
|
2577
2583
|
- Suggest review tasks
|
|
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.
|
|
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.
|
|
2579
2585
|
|
|
2580
2586
|
This command analyzes:
|
|
2581
2587
|
1. Recent commands you've run
|
|
@@ -3131,6 +3137,6 @@ ${r}
|
|
|
3131
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(`
|
|
3132
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(`
|
|
3133
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)+`
|
|
3134
|
-
`),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-
|
|
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-CdItlKWm.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
|
|
3135
3141
|
`)+`
|
|
3136
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};
|