@e0ipso/ai-task-manager 1.18.4 → 1.18.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e0ipso/ai-task-manager",
3
- "version": "1.18.4",
3
+ "version": "1.18.6",
4
4
  "description": "Task management for AI coding assistants",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -2,7 +2,8 @@
2
2
  id: [PLAN-ID]
3
3
  summary: "[Brief one-line description of what this plan accomplishes]"
4
4
  created: [YYYY-MM-DD]
5
- approval_method: [auto|manual] # Optional: Workflow approval mode (auto=automated, manual=requires review)
5
+ approval_method_plan: [auto|manual] # Workflow approval for plan review (default: manual)
6
+ approval_method_tasks: [auto|manual] # Workflow approval for task generation review (default: manual)
6
7
  ---
7
8
 
8
9
  # Plan: [Descriptive Plan Title]
@@ -88,14 +88,18 @@ Structure your response as follows:
88
88
  - If context is insufficient: List specific clarifying questions
89
89
  - If context is sufficient: Provide the comprehensive plan using the structure above. Use the information in @TASK_MANAGER.md for the directory structure and additional information about plans.
90
90
 
91
- **Output Behavior:**
91
+ **Output Behavior: CRITICAL - Structured Output for Command Coordination**
92
92
 
93
- Be extremely concise but helpful:
94
- - Tell the user that you are done
95
- - Instruct them to review the plan document with the file path
96
- - Example output: "Plan created. Please review: `.ai/task-manager/plans/40--plan-name/plan-40--plan-name.md`"
93
+ Always end your output with a standardized summary in this exact format:
97
94
 
98
- **Note:** When this command is invoked by the full-workflow command, the full-workflow will modify the plan's `approval_method` field after creation to enable automated execution.
95
+ ```
96
+ ---
97
+ Plan Summary:
98
+ - Plan ID: [numeric-id]
99
+ - Plan File: [full-path-to-plan-file]
100
+ ```
101
+
102
+ This structured output enables automated workflow coordination and must be included even when running standalone.
99
103
 
100
104
  ###### Plan Template
101
105
 
@@ -114,11 +118,12 @@ Example:
114
118
  id: 1
115
119
  summary: "Implement a comprehensive CI/CD pipeline using GitHub Actions for automated linting, testing, semantic versioning, and NPM publishing"
116
120
  created: 2025-09-01
117
- approval_method: "manual"
121
+ approval_method_plan: "manual"
122
+ approval_method_tasks: "manual"
118
123
  ---
119
124
  ```
120
125
 
121
- **Important**: Always set `approval_method` to "manual" when creating a plan. The full-workflow command will modify this field to "auto" after creation if running in automated mode.
126
+ **Important**: Always set both `approval_method_plan` and `approval_method_tasks` to "manual" when creating a plan. The full-workflow command will modify these fields to "auto" after creation if running in automated mode.
122
127
 
123
128
  The schema for this frontmatter is:
124
129
  ```json
@@ -139,10 +144,15 @@ The schema for this frontmatter is:
139
144
  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
140
145
  "description": "Creation date in YYYY-MM-DD format"
141
146
  },
142
- "approval_method": {
147
+ "approval_method_plan": {
148
+ "type": "string",
149
+ "enum": ["auto", "manual"],
150
+ "description": "Workflow approval mode for plan review: auto for automated workflows, manual for standalone execution"
151
+ },
152
+ "approval_method_tasks": {
143
153
  "type": "string",
144
154
  "enum": ["auto", "manual"],
145
- "description": "Workflow approval mode: auto for automated workflows, manual for standalone execution"
155
+ "description": "Workflow approval mode for task generation review: auto when tasks auto-generated in workflow, manual for standalone execution"
146
156
  }
147
157
  },
148
158
  "additionalProperties": false
@@ -71,7 +71,12 @@ If either `$TASK_COUNT` is 0 or `$BLUEPRINT_EXISTS` is "no":
71
71
  ```
72
72
  /tasks:generate-tasks $1
73
73
  ```
74
- - **CRITICAL**: After task generation completes successfully, you MUST immediately proceed with blueprint execution without waiting for user input. The workflow should continue seamlessly.
74
+ - **NEW STEP**: Immediately after task generation succeeds, set the approval_method_tasks field to auto:
75
+ ```bash
76
+ node .ai/task-manager/config/scripts/set-approval-method.cjs "$PLAN_FILE" auto tasks
77
+ ```
78
+ - This signals that tasks were auto-generated in workflow context and execution should continue without pause.
79
+ - **CRITICAL**: After setting the field, you MUST immediately proceed with blueprint execution without waiting for user input. The workflow should continue seamlessly.
75
80
  - If generation fails: Halt execution with clear error message:
76
81
  ```
77
82
  ❌ Error: Automatic task generation failed.
@@ -146,33 +151,57 @@ Read and execute .ai/task-manager/config/hooks/POST_ERROR_DETECTION.md
146
151
 
147
152
  **Extract approval method from plan metadata:**
148
153
 
149
- First, extract the approval_method from the plan document:
154
+ First, extract both approval method fields from the plan document:
150
155
 
151
156
  ```bash
152
157
  # Find plan file by ID
153
158
  PLAN_FILE=$(find .ai/task-manager/{plans,archive} -name "plan-$1--*.md" -type f -exec grep -l "^id: \?$1$" {} \;)
154
159
 
155
- # Extract approval_method from YAML frontmatter
156
- APPROVAL_METHOD=$(sed -n '/^---$/,/^---$/p' "$PLAN_FILE" | grep '^approval_method:' | sed 's/approval_method: *//;s/"//g;s/'"'"'//g' | tr -d ' ')
160
+ # Extract both approval method fields from YAML frontmatter
161
+ APPROVAL_METHOD_PLAN=$(sed -n '/^---$/,/^---$/p' "$PLAN_FILE" | grep '^approval_method_plan:' | sed 's/approval_method_plan: *//;s/"//g' | tr -d " '")
162
+ APPROVAL_METHOD_TASKS=$(sed -n '/^---$/,/^---$/p' "$PLAN_FILE" | grep '^approval_method_tasks:' | sed 's/approval_method_tasks: *//;s/"//g' | tr -d " '")
157
163
 
158
- # Default to "manual" if field doesn't exist (backward compatibility)
159
- APPROVAL_METHOD=${APPROVAL_METHOD:-manual}
164
+ # Defaults to "manual" if fields don't exist
165
+ APPROVAL_METHOD_PLAN=${APPROVAL_METHOD_PLAN:-manual}
166
+ APPROVAL_METHOD_TASKS=${APPROVAL_METHOD_TASKS:-manual}
160
167
  ```
161
168
 
162
- Then adjust output based on the extracted approval method:
169
+ Then adjust output based on the extracted approval methods:
163
170
 
164
- - **If `APPROVAL_METHOD="auto"` (automated workflow mode)**:
165
- - Provide minimal progress updates at phase boundaries
166
- - Do NOT instruct user to review implementation details
171
+ - **If `APPROVAL_METHOD_PLAN="auto"` (automated workflow mode)**:
172
+ - During task auto-generation phase: Provide minimal progress updates
173
+ - Do NOT instruct user to review the plan or tasks being generated
167
174
  - Do NOT add any prompts that would pause execution
175
+
176
+ - **If `APPROVAL_METHOD_TASKS="auto"` (tasks auto-generated in workflow)**:
177
+ - During task execution phase: Provide minimal progress updates at phase boundaries
178
+ - Do NOT instruct user to review implementation details
168
179
  - Example output: "Phase 1/3 completed. Proceeding to Phase 2."
169
180
 
170
- - **If `APPROVAL_METHOD="manual"` or empty (standalone mode)**:
181
+ - **If `APPROVAL_METHOD_PLAN="manual"` or `APPROVAL_METHOD_TASKS="manual"` (standalone mode)**:
171
182
  - Provide detailed execution summary with phase results
172
183
  - List completed tasks and any noteworthy events
173
184
  - Instruct user to review the execution summary in the plan document
174
185
  - Example output: "Execution completed. Review summary: `.ai/task-manager/archive/[plan]/plan-[id].md`"
175
186
 
187
+ **Note**: This command respects both approval method fields:
188
+ - `approval_method_plan`: Used during auto-generation to determine if we're in automated workflow
189
+ - `approval_method_tasks`: Used during execution to determine output verbosity
190
+
191
+ **CRITICAL - Structured Output for Command Coordination:**
192
+
193
+ Always end your output with a standardized summary in this exact format:
194
+
195
+ ```
196
+ ---
197
+ Execution Summary:
198
+ - Plan ID: [numeric-id]
199
+ - Status: Archived
200
+ - Location: .ai/task-manager/archive/[plan-id]--[plan-name]/
201
+ ```
202
+
203
+ This structured output enables automated workflow coordination and must be included even when running standalone.
204
+
176
205
  ## Optimization Guidelines
177
206
 
178
207
  - **Maximize parallelism**: Always run all available tasks in a phase simultaneously
@@ -306,23 +306,37 @@ First, extract the approval_method from the plan document:
306
306
  # Find plan file by ID
307
307
  PLAN_FILE=$(find .ai/task-manager/{plans,archive} -name "plan-$1--*.md" -type f -exec grep -l "^id: \?$1$" {} \;)
308
308
 
309
- # Extract approval_method from YAML frontmatter
310
- APPROVAL_METHOD=$(sed -n '/^---$/,/^---$/p' "$PLAN_FILE" | grep '^approval_method:' | sed 's/approval_method: *//;s/"//g;s/'"'"'//g' | tr -d ' ')
309
+ # Extract approval_method_tasks from YAML frontmatter
310
+ APPROVAL_METHOD_TASKS=$(sed -n '/^---$/,/^---$/p' "$PLAN_FILE" | grep '^approval_method_tasks:' | sed 's/approval_method_tasks: *//;s/"//g' | tr -d " '")
311
311
 
312
312
  # Default to "manual" if field doesn't exist (backward compatibility)
313
- APPROVAL_METHOD=${APPROVAL_METHOD:-manual}
313
+ APPROVAL_METHOD_TASKS=${APPROVAL_METHOD_TASKS:-manual}
314
314
  ```
315
315
 
316
316
  Then adjust output based on the extracted approval method:
317
317
 
318
- - **If `APPROVAL_METHOD="auto"` (automated workflow mode)**:
318
+ - **If `APPROVAL_METHOD_TASKS="auto"` (automated workflow mode)**:
319
319
  - Simply confirm task generation with task count
320
320
  - Do NOT instruct user to review the tasks
321
321
  - Do NOT add any prompts that would pause execution
322
322
  - Example output: "Tasks generated for plan [id]: [count] tasks created"
323
323
 
324
- - **If `APPROVAL_METHOD="manual"` or empty (standalone mode)**:
324
+ - **If `APPROVAL_METHOD_TASKS="manual"` or empty (standalone mode)**:
325
325
  - Be concise but helpful
326
326
  - Tell the user that you are done
327
327
  - Instruct them to review the tasks with file paths
328
328
  - Example output: "Task generation complete. Review tasks in: `.ai/task-manager/plans/[plan-id]--[name]/tasks/`"
329
+
330
+ **CRITICAL - Structured Output for Command Coordination:**
331
+
332
+ Always end your output with a standardized summary in this exact format:
333
+
334
+ ```
335
+ ---
336
+ Task Generation Summary:
337
+ - Plan ID: [numeric-id]
338
+ - Tasks: [count]
339
+ - Status: Ready for execution
340
+ ```
341
+
342
+ This structured output enables automated workflow coordination and must be included even when running standalone.
@@ -1,166 +0,0 @@
1
- ---
2
- argument-hint: [user-prompt]
3
- description: Execute the full workflow from plan creation to blueprint execution
4
- ---
5
- # Full Workflow Execution
6
-
7
- ## Assistant Configuration
8
-
9
- Before proceeding with this command, you MUST load and respect the assistant's configuration:
10
-
11
- **Run the following scripts:**
12
- ```bash
13
- ASSISTANT=$(node .ai/task-manager/config/scripts/detect-assistant.cjs)
14
- node .ai/task-manager/config/scripts/read-assistant-config.cjs "$ASSISTANT"
15
- ```
16
-
17
- The output above contains your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
18
-
19
- ---
20
-
21
- You are a workflow orchestration assistant. Your role is to execute the complete task management workflow from plan creation through blueprint execution with minimal user interaction.
22
-
23
- ## Instructions
24
-
25
- The user input is:
26
-
27
- <user-input>
28
- $ARGUMENTS
29
- </user-input>
30
-
31
- If no user input is provided, stop immediately and show an error message to the user.
32
-
33
- ### Workflow Execution Process
34
-
35
- Use your internal Todo task tool to track the workflow execution:
36
-
37
- - [ ] Execute /tasks:create-plan
38
- - [ ] Extract plan ID
39
- - [ ] Execute /tasks:generate-tasks
40
- - [ ] Execute /tasks:execute-blueprint
41
- - [ ] Generate execution summary
42
-
43
- #### Step 1: Determine Next Plan ID
44
-
45
- Before creating the plan, determine what the next plan ID will be:
46
-
47
- ```bash
48
- node .ai/task-manager/config/scripts/get-next-plan-id.cjs
49
- ```
50
-
51
- Store this ID for later validation and use.
52
-
53
- #### Step 2: Execute Plan Creation
54
-
55
- Use the SlashCommand tool to execute plan creation with the user's prompt:
56
-
57
- ```
58
- /tasks:create-plan $ARGUMENTS
59
- ```
60
-
61
- **Important**: The plan creation command may ask clarification questions. Wait for user responses before continuing. This is expected behavior and maintains quality control.
62
-
63
- After plan creation completes, provide minimal progress update:
64
- "Step 1/4: Plan created (ID: [plan-id])"
65
-
66
- **CRITICAL**: Do not wait for user approval or review of the plan. In full-workflow mode, plan validation is automated (Step 3 performs file existence checking only). Proceed immediately to Step 3 without waiting for user input.
67
-
68
- #### Step 3: Validate Plan Creation and Set Approval Method
69
-
70
- Verify the plan was created successfully and set it to automated workflow mode:
71
-
72
- ```bash
73
- # Find the created plan file
74
- PLAN_FILE=$(find .ai/task-manager/plans -name "plan-[0-9][0-9]*--*.md" -type f -exec grep -l "^id: \?[plan-id]$" {} \;)
75
-
76
- # Verify plan exists
77
- if [ -z "$PLAN_FILE" ]; then
78
- echo "❌ Error: Plan creation failed. Expected plan with ID [plan-id] not found."
79
- exit 1
80
- fi
81
-
82
- # Set approval_method to auto for automated workflow execution
83
- # This ensures generate-tasks and execute-blueprint run without interruption
84
- if ! grep -q "^approval_method:" "$PLAN_FILE"; then
85
- # Insert approval_method after the created: line in frontmatter
86
- sed -i.bak '/^created:/a\
87
- approval_method: auto' "$PLAN_FILE" && rm -f "${PLAN_FILE}.bak"
88
- else
89
- # Update existing approval_method to auto
90
- sed -i.bak 's/^approval_method:.*/approval_method: auto/' "$PLAN_FILE" && rm -f "${PLAN_FILE}.bak"
91
- fi
92
- ```
93
-
94
- **Note**: Setting `approval_method: auto` in the plan metadata signals to subordinate commands (generate-tasks, execute-blueprint) that they are running in automated workflow mode and should suppress interactive prompts for plan review. This metadata persists in the plan document and is reliably read by subsequent commands, eliminating dependency on environment variables.
95
-
96
- #### Step 4: Execute Task Generation
97
-
98
- Use the SlashCommand tool to generate tasks for the plan:
99
-
100
- ```
101
- /tasks:generate-tasks [plan-id]
102
- ```
103
-
104
- After task generation completes, provide minimal progress update:
105
- "Step 2/4: Tasks generated for plan [plan-id]"
106
-
107
- #### Step 5: Execute Blueprint
108
-
109
- Use the SlashCommand tool to execute the blueprint:
110
-
111
- ```
112
- /tasks:execute-blueprint [plan-id]
113
- ```
114
-
115
- After blueprint execution completes, provide minimal progress update:
116
- "Step 3/4: Blueprint execution completed"
117
-
118
- Note: The execute-blueprint command automatically archives the plan upon successful completion.
119
-
120
- #### Step 6: Generate Execution Summary
121
-
122
- After all steps complete successfully, generate a comprehensive summary:
123
-
124
- ```
125
- ✅ Full workflow completed successfully!
126
-
127
- Plan: [plan-id]--[plan-name]
128
- Location: .ai/task-manager/archive/[plan-id]--[plan-name]/
129
-
130
- Status: Archived and ready for review
131
-
132
- 📋 Next Steps:
133
- - Review the implementation in the archived plan
134
- - Check the execution summary in the plan document
135
- - Verify all validation gates passed
136
-
137
- Plan document: .ai/task-manager/archive/[plan-id]--[plan-name]/plan-[plan-id]--[plan-name].md
138
- ```
139
-
140
- ### Error Handling
141
-
142
- If any step fails:
143
- 1. Halt execution immediately
144
- 2. Report clear error message indicating which step failed
145
- 3. Preserve all created artifacts (plan, tasks) for manual review
146
- 4. Provide guidance for manual continuation:
147
- - If plan creation failed: Review error and retry
148
- - If task generation failed: Run `/tasks:generate-tasks [plan-id]` manually after reviewing plan
149
- - If blueprint execution failed: Review tasks and run `/tasks:execute-blueprint [plan-id]` manually
150
-
151
- ### Output Requirements
152
-
153
- **During Execution:**
154
- - Minimal progress updates at each major step
155
- - Clear indication of current step (1/4, 2/4, etc.)
156
-
157
- **After Completion:**
158
- - Comprehensive summary with plan location
159
- - Status confirmation (Archived)
160
- - Next steps for user review
161
- - Direct link to plan document
162
-
163
- **On Error:**
164
- - Clear error message
165
- - Indication of which step failed
166
- - Manual recovery instructions