@e0ipso/ai-task-manager 1.29.0 → 1.30.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e0ipso/ai-task-manager",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "description": "Task management for AI coding assistants",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -49,22 +49,22 @@ if [ -z "$root" ]; then
49
49
  fi
50
50
  ```
51
51
 
52
- Use your internal Todo task tool to track the execution of all parts of the task, and the final update of noteworthy items during execution. Example:
52
+ Use your internal Todo task tool to track the execution of all parts of the task. Example:
53
53
 
54
- - [ ] Validate task: file, status, and dependencies.
55
- - [ ] Select the most appropriate sub-agent.
54
+ - [ ] Validate task: file, status (including needs-clarification), and dependencies.
56
55
  - [ ] Set task status to in-progress.
57
- - [ ] Delegate task implementation to the sub-agent.
56
+ - [ ] Execute the task.
58
57
  - [ ] Update task status to completed or failed.
59
- - [ ] Update the task file with noteworthy events during execution.
58
+ - [ ] Document noteworthy events (if any).
59
+ - [ ] Emit structured output for orchestrator.
60
60
 
61
61
  ## Critical Rules
62
62
 
63
63
  1. **Never skip dependency validation** - Task execution requires all dependencies to be completed
64
- 2. **Validate task status** - Never execute tasks that are already completed or in-progress
64
+ 2. **Validate task status** - Never execute tasks that are already completed, in-progress, or needs-clarification
65
65
  3. **Maintain status integrity** - Update task status throughout the execution lifecycle
66
- 4. **Use appropriate agents** - Match task skills to available sub-agents
67
- 5. **Document execution** - Record all outcomes and issues encountered
66
+ 4. **Document execution** - Record all outcomes and issues encountered
67
+ 5. **Provide structured output** - Always emit the structured result block for orchestrator parsing
68
68
 
69
69
  ## Input Requirements
70
70
  - Plan ID: $1 (required)
@@ -162,6 +162,11 @@ case "$current_status" in
162
162
  echo "Wait for current execution to complete or check for stale processes"
163
163
  exit 1
164
164
  ;;
165
+ "needs-clarification")
166
+ echo "Error: Task ${task_id} is marked as 'needs-clarification'"
167
+ echo "Resolve clarification questions in the task file before execution"
168
+ exit 1
169
+ ;;
165
170
  "pending"|"failed"|"")
166
171
  echo "Task status allows execution - proceeding..."
167
172
  ;;
@@ -171,6 +176,17 @@ case "$current_status" in
171
176
  esac
172
177
  ```
173
178
 
179
+ #### Valid Status Transitions
180
+
181
+ Reference for orchestrators and execution flow:
182
+
183
+ - `pending` → `in-progress` (execution starts)
184
+ - `in-progress` → `completed` (successful execution)
185
+ - `in-progress` → `failed` (execution error)
186
+ - `failed` → `in-progress` (retry attempt)
187
+ - `pending` → `needs-clarification` (set externally by orchestrator or reviewer)
188
+ - `needs-clarification` → `pending` (clarification resolved, set externally)
189
+
174
190
  ### 4. Dependency Validation
175
191
 
176
192
  Use the dependency checking script to validate all dependencies:
@@ -268,15 +284,44 @@ awk '
268
284
 
269
285
  mv "$temp_file" "$task_file"
270
286
 
271
- echo "✓ Task ${task_id} completed successfully"
272
- echo ""
273
- echo "You can now execute dependent tasks or continue with the full blueprint execution."
287
+ echo "✓ Task ${task_id} status updated to completed"
288
+ ```
289
+
290
+ ### 9. Noteworthy Events Documentation
291
+
292
+ After task execution (whether successful or failed), append a "Noteworthy Events" section to the task file body if anything noteworthy occurred during execution.
293
+
294
+ Append to the end of the task file:
295
+
296
+ ```markdown
297
+ ## Noteworthy Events
298
+ - [YYYY-MM-DD] [Event description with sufficient context for the orchestrator]
274
299
  ```
275
300
 
301
+ If no noteworthy events occurred, do not add the section.
302
+
276
303
  ## Error Handling
277
304
 
278
305
  Read and execute $root/.ai/task-manager/config/hooks/POST_ERROR_DETECTION.md
279
306
 
307
+ On any error, ensure you still emit the structured output block (see Output Requirements) with `Exit Code: 1`.
308
+
309
+ ## Output Requirements
310
+
311
+ **CRITICAL - Structured Output for Orchestrator Coordination:**
312
+
313
+ Always end your output with a standardized summary in this exact format:
314
+
315
+ ```
316
+ ---
317
+ Task Execution Result:
318
+ - Plan ID: [plan-id]
319
+ - Task ID: [task-id]
320
+ - Exit Code: [0 for success, 1 for failure]
321
+ ```
322
+
323
+ This structured output enables automated orchestration pipelines to parse results and determine next steps. It MUST be included regardless of success or failure.
324
+
280
325
  ## Usage Examples
281
326
 
282
327
  ```bash
@@ -292,11 +337,12 @@ Read and execute $root/.ai/task-manager/config/hooks/POST_ERROR_DETECTION.md
292
337
 
293
338
  ## Integration Notes
294
339
 
295
- This command integrates with the existing task management system by:
340
+ This command is designed for scripting contexts where an external orchestrator manages task sequencing, commits, feature branches, linting, test execution, and plan archival. It integrates with the task management system by:
296
341
  - Using established plan and task location patterns
297
342
  - Leveraging the dependency checking script for validation
298
- - Following status management conventions
343
+ - Following status management conventions (see Valid Status Transitions)
344
+ - Providing structured machine-parseable output for orchestrator pipelines
299
345
  - Maintaining compatibility with execute-blueprint workflows
300
346
  - Preserving task isolation and dependency order
301
347
 
302
- The command complements execute-blueprint by providing granular task control while maintaining the same validation and execution standards.
348
+ The command complements execute-blueprint by providing granular single-task control while maintaining the same validation standards.