@e0ipso/ai-task-manager 1.26.3 → 1.26.5

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.
@@ -6,18 +6,48 @@ description: Execute a single task with dependency validation and status managem
6
6
 
7
7
  You are responsible for executing a single task within a plan while maintaining strict dependency validation and proper status management. Your role is to ensure the task is ready for execution, deploy the appropriate agent, and track execution progress.
8
8
 
9
- ## Assistant Configuration
9
+ ---
10
10
 
11
- Before proceeding with this command, you MUST load and respect the assistant's configuration:
11
+ ## Find the AI Task Manager root
12
12
 
13
- Load the following configuration files in order of precedence (later files override earlier ones):
14
- 1. `/workspace/AGENTS.md` - Project-level task management guidance
15
- 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
16
- 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
13
+ ```bash
14
+ if [ ! -f /tmp/find-ai-task-manager-root.js ]; then
15
+ cat << 'EOF' > /tmp/find-ai-task-manager-root.js
16
+ const fs = require('fs');
17
+ const path = require('path');
18
+
19
+ const findRoot = (currentDir) => {
20
+ const taskManagerPath = path.join(currentDir, '.ai/task-manager');
21
+ const metadataPath = path.join(taskManagerPath, '.init-metadata.json');
22
+
23
+ try {
24
+ if (fs.existsSync(metadataPath) && JSON.parse(fs.readFileSync(metadataPath, 'utf8')).version) {
25
+ console.log(path.resolve(taskManagerPath));
26
+ process.exit(0);
27
+ }
28
+ } catch (e) {
29
+ // Continue searching
30
+ }
31
+
32
+ const parentDir = path.dirname(currentDir);
33
+ if (parentDir !== currentDir) {
34
+ findRoot(parentDir);
35
+ } else {
36
+ process.exit(1);
37
+ }
38
+ };
39
+
40
+ findRoot(process.cwd());
41
+ EOF
42
+ fi
17
43
 
18
- These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
44
+ root=$(node /tmp/find-ai-task-manager-root.js)
19
45
 
20
- ---
46
+ if [ -z "$root" ]; then
47
+ echo "Error: Could not find task manager root directory (.ai/task-manager)"
48
+ exit 1
49
+ fi
50
+ ```
21
51
 
22
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:
23
53
 
@@ -40,7 +70,7 @@ Use your internal Todo task tool to track the execution of all parts of the task
40
70
  - Plan ID: $1 (required)
41
71
  - Task ID: $2 (required)
42
72
  - Task management directory structure: `/`
43
- - Dependency checking script: `.ai/task-manager/config/scripts/check-task-dependencies.cjs`
73
+ - Dependency checking script: `$root/.ai/task-manager/config/scripts/check-task-dependencies.cjs`
44
74
 
45
75
  ### Input Validation
46
76
 
@@ -57,21 +87,21 @@ fi
57
87
 
58
88
  ## Execution Process
59
89
 
60
- ### 1. Plan and Task Location
90
+ ### 1. Plan Location
61
91
 
62
- Locate the plan directory using the established find pattern:
92
+ Locate the plan directory using the discovered root:
63
93
 
64
94
  ```bash
65
95
  plan_id="$1"
66
96
  task_id="$2"
67
97
 
68
98
  # Find plan directory
69
- plan_dir=$(find .ai/task-manager/{plans,archive} -type d -name "${plan_id}--*" 2>/dev/null | head -1)
99
+ plan_dir=$(find $root/{plans,archive} -type d -name "${plan_id}--*" 2>/dev/null | head -1)
70
100
 
71
101
  if [ -z "$plan_dir" ]; then
72
102
  echo "Error: Plan with ID ${plan_id} not found"
73
103
  echo "Available plans:"
74
- find .ai/task-manager/plans -name "*--*" -type d | head -5
104
+ find $root/plans -name "*--*" -type d | head -5
75
105
  exit 1
76
106
  fi
77
107
 
@@ -147,7 +177,7 @@ Use the dependency checking script to validate all dependencies:
147
177
 
148
178
  ```bash
149
179
  # Call the dependency checking script
150
- if ! node .ai/task-manager/config/scripts/check-task-dependencies.cjs "$plan_id" "$task_id"; then
180
+ if ! node $root/config/scripts/check-task-dependencies.cjs "$plan_id" "$task_id"; then
151
181
  echo ""
152
182
  echo "Task execution blocked by unresolved dependencies."
153
183
  echo "Please complete the required dependencies first."
@@ -162,7 +192,7 @@ echo "✓ All dependencies resolved - proceeding with execution"
162
192
 
163
193
  Read task skills and select appropriate task-specific agent:
164
194
 
165
- Read and execute .ai/task-manager/config/hooks/PRE_TASK_ASSIGNMENT.md
195
+ Read and execute $root/.ai/task-manager/config/hooks/PRE_TASK_ASSIGNMENT.md
166
196
 
167
197
  ### 6. Status Update to In-Progress
168
198
 
@@ -245,7 +275,7 @@ echo "You can now execute dependent tasks or continue with the full blueprint ex
245
275
 
246
276
  ## Error Handling
247
277
 
248
- Read and execute .ai/task-manager/config/hooks/POST_ERROR_DETECTION.md
278
+ Read and execute $root/.ai/task-manager/config/hooks/POST_ERROR_DETECTION.md
249
279
 
250
280
  ## Usage Examples
251
281
 
@@ -2,20 +2,8 @@
2
2
  argument-hint: "[testCommand]"
3
3
  description: Fix the tests your task execution broke.
4
4
  ---
5
- ## Assistant Configuration
6
5
 
7
- Before proceeding with this command, you MUST load and respect the assistant's configuration:
8
-
9
- Load the following configuration files in order of precedence (later files override earlier ones):
10
- 1. `/workspace/AGENTS.md` - Project-level task management guidance
11
- 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
12
- 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
13
-
14
- These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
15
-
16
- ---
17
-
18
- Fix all failing tests in this repository. Think harder and use tools.
6
+ Fix all failing tests in this repository. Ultrathink, think harder, and use tools.
19
7
 
20
8
  Execute this command to run the tests:
21
9
 
@@ -2,22 +2,53 @@
2
2
  argument-hint: "[userPrompt]"
3
3
  description: Execute the full workflow from plan creation to blueprint execution.
4
4
  ---
5
+
5
6
  # Full Workflow Execution
6
7
 
7
8
  You are a workflow composition assistant. Your role is to execute the complete task management workflow from plan creation through blueprint execution **without pausing between steps**. This is a fully automated workflow that executes all three steps sequentially.
8
9
 
9
- ## Assistant Configuration
10
-
11
- Before proceeding with this command, you MUST load and respect the assistant's configuration:
12
-
13
- Load the following configuration files in order of precedence (later files override earlier ones):
14
- 1. `/workspace/AGENTS.md` - Project-level task management guidance
15
- 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
16
- 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
10
+ ---
17
11
 
18
- These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
12
+ ## Find the AI Task Manager root
19
13
 
20
- ---
14
+ ```bash
15
+ if [ ! -f /tmp/find-ai-task-manager-root.js ]; then
16
+ cat << 'EOF' > /tmp/find-ai-task-manager-root.js
17
+ const fs = require('fs');
18
+ const path = require('path');
19
+
20
+ const findRoot = (currentDir) => {
21
+ const taskManagerPath = path.join(currentDir, '.ai/task-manager');
22
+ const metadataPath = path.join(taskManagerPath, '.init-metadata.json');
23
+
24
+ try {
25
+ if (fs.existsSync(metadataPath) && JSON.parse(fs.readFileSync(metadataPath, 'utf8')).version) {
26
+ console.log(path.resolve(taskManagerPath));
27
+ process.exit(0);
28
+ }
29
+ } catch (e) {
30
+ // Continue searching
31
+ }
32
+
33
+ const parentDir = path.dirname(currentDir);
34
+ if (parentDir !== currentDir) {
35
+ findRoot(parentDir);
36
+ } else {
37
+ process.exit(1);
38
+ }
39
+ };
40
+
41
+ findRoot(process.cwd());
42
+ EOF
43
+ fi
44
+
45
+ root=$(node /tmp/find-ai-task-manager-root.js)
46
+
47
+ if [ -z "$root" ]; then
48
+ echo "Error: Could not find task manager root directory (.ai/task-manager)"
49
+ exit 1
50
+ fi
51
+ ```
21
52
 
22
53
  ## Workflow Execution Instructions
23
54
 
@@ -52,24 +83,24 @@ Use your internal Todo task tool to track the workflow execution:
52
83
 
53
84
  Execute the following plan creation process:
54
85
 
55
- Think harder and use tools.
86
+ Ultrathink, think harder, and use tools.
56
87
 
57
88
  You are a comprehensive task planning assistant. Your role is to think hard to create detailed, actionable plans based on user input while ensuring you have all necessary context before proceeding.
58
89
 
59
- Include .ai/task-manager/config/TASK_MANAGER.md for the directory structure of tasks.
90
+ Include $root/.ai/task-manager/config/TASK_MANAGER.md for the directory structure of tasks.
60
91
 
61
92
  ### Process
62
93
 
63
94
  Use your internal Todo task tool to track the plan generation:
64
95
 
65
- - [ ] Read and execute .ai/task-manager/config/hooks/PRE_PLAN.md
96
+ - [ ] Read and execute $root/.ai/task-manager/config/hooks/PRE_PLAN.md
66
97
  - [ ] User input and context analysis
67
98
  - [ ] Clarification questions
68
99
  - [ ] Plan generation: Executive Summary
69
100
  - [ ] Plan generation: Detailed Steps
70
101
  - [ ] Plan generation: Risk Considerations
71
102
  - [ ] Plan generation: Success Metrics
72
- - [ ] Read and execute .ai/task-manager/config/hooks/POST_PLAN.md
103
+ - [ ] Read and execute $root/.ai/task-manager/config/hooks/POST_PLAN.md
73
104
 
74
105
  #### Context Analysis
75
106
  Before creating any plan, analyze the user's request for:
@@ -125,7 +156,7 @@ This structured output enables automated workflow coordination and must be inclu
125
156
 
126
157
  #### Plan Template
127
158
 
128
- Use the template in .ai/task-manager/config/templates/PLAN_TEMPLATE.md
159
+ Use the template in $root/.ai/task-manager/config/templates/PLAN_TEMPLATE.md
129
160
 
130
161
  #### Patterns to Avoid
131
162
  Do not include the following in your plan output.
@@ -145,9 +176,10 @@ created: 2025-09-01
145
176
 
146
177
  #### Plan ID Generation
147
178
 
148
- **Auto-generate the next plan ID:**
179
+ Execute to auto-generate the next plan ID:
180
+
149
181
  ```bash
150
- node .ai/task-manager/config/scripts/get-next-plan-id.cjs
182
+ node $root/config/scripts/get-next-plan-id.cjs
151
183
  ```
152
184
 
153
185
  **Key formatting:**
@@ -168,8 +200,6 @@ node .ai/task-manager/config/scripts/get-next-plan-id.cjs
168
200
 
169
201
  Using the Plan ID extracted from Step 1, execute task generation:
170
202
 
171
- Think harder and use tools.
172
-
173
203
  You are a comprehensive task planning assistant. Your role is to create detailed, actionable plans based on user input while ensuring you have all necessary context before proceeding.
174
204
 
175
205
  Include /TASK_MANAGER.md for the directory structure of tasks.
@@ -182,10 +212,10 @@ Use your internal Todo task tool to track the following process:
182
212
 
183
213
  - [ ] Read and process plan [PLAN_ID from Step 1]
184
214
  - [ ] Use the Task Generation Process to create tasks according to the Task Creation Guidelines
185
- - [ ] Read and run the .ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
215
+ - [ ] Read and run the $root/.ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
186
216
 
187
217
  #### Input
188
- - A plan document. See .ai/task-manager/config/TASK_MANAGER.md to find the plan with ID from Step 1
218
+ - A plan document. See $root/.ai/task-manager/config/TASK_MANAGER.md to find the plan with ID from Step 1
189
219
  - The plan contains high-level objectives and implementation steps
190
220
 
191
221
  #### Input Error Handling
@@ -265,26 +295,26 @@ For each task, identify:
265
295
 
266
296
  #### Step 3: Task Generation
267
297
 
268
- Use the task template in .ai/task-manager/config/templates/TASK_TEMPLATE.md
298
+ Use the task template in $root/.ai/task-manager/config/templates/TASK_TEMPLATE.md
269
299
 
270
300
  **Task ID Generation:**
271
301
 
272
302
  When creating tasks, you need to determine the next available task ID for the specified plan. Use this bash command to automatically generate the correct ID:
273
303
 
274
304
  ```bash
275
- node .ai/task-manager/config/scripts/get-next-task-id.cjs [PLAN_ID from Step 1]
305
+ node $root/config/scripts/get-next-task-id.cjs [PLAN_ID from Step 1]
276
306
  ```
277
307
 
278
308
  #### Step 4: POST_TASK_GENERATION_ALL hook
279
309
 
280
- Read and run the .ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
310
+ Read and run the $root/.ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
281
311
 
282
312
  ### Output Requirements
283
313
 
284
314
  **Output Behavior:**
285
315
 
286
316
  Provide a concise completion message with task count and location:
287
- - Example: "Task generation complete. Created [count] tasks in `.ai/task-manager/plans/[plan-id]--[name]/tasks/`"
317
+ - Example: "Task generation complete. Created [count] tasks in `$root/.ai/task-manager/plans/[plan-id]--[name]/tasks/`"
288
318
 
289
319
  **CRITICAL - Structured Output for Command Coordination:**
290
320
 
@@ -337,12 +367,14 @@ Before proceeding with execution, validate that tasks exist and the execution bl
337
367
 
338
368
  **Validation Steps:**
339
369
 
370
+ Use the task manager root discovered in Step 1 to extract validation results:
371
+
340
372
  ```bash
341
373
  # Extract validation results directly from script
342
- plan_file=$(node .ai/task-manager/config/scripts/validate-plan-blueprint.cjs [planId] planFile)
343
- plan_dir=$(node .ai/task-manager/config/scripts/validate-plan-blueprint.cjs [planId] planDir)
344
- task_count=$(node .ai/task-manager/config/scripts/validate-plan-blueprint.cjs [planId] taskCount)
345
- blueprint_exists=$(node .ai/task-manager/config/scripts/validate-plan-blueprint.cjs [planId] blueprintExists)
374
+ plan_file=$(node $root/config/scripts/validate-plan-blueprint.cjs [planId] planFile)
375
+ plan_dir=$(node $root/config/scripts/validate-plan-blueprint.cjs [planId] planDir)
376
+ task_count=$(node $root/config/scripts/validate-plan-blueprint.cjs [planId] taskCount)
377
+ blueprint_exists=$(node $root/config/scripts/validate-plan-blueprint.cjs [planId] blueprintExists)
346
378
  ```
347
379
 
348
380
  If either `$task_count` is 0 or `$blueprint_exists` is "no":
@@ -354,7 +386,7 @@ Use your internal Todo task tool to track the execution of all phases, and the f
354
386
 
355
387
  #### Phase Pre-Execution
356
388
 
357
- Read and execute .ai/task-manager/config/hooks/PRE_PHASE.md
389
+ Read and execute $root/.ai/task-manager/config/hooks/PRE_PHASE.md
358
390
 
359
391
  #### Phase Execution Workflow
360
392
 
@@ -363,7 +395,7 @@ Read and execute .ai/task-manager/config/hooks/PRE_PHASE.md
363
395
  - List all tasks scheduled for parallel execution in this phase
364
396
 
365
397
  2. **Agent Selection and Task Assignment**
366
- Read and execute .ai/task-manager/config/hooks/PRE_TASK_ASSIGNMENT.md
398
+ Read and execute $root/.ai/task-manager/config/hooks/PRE_TASK_ASSIGNMENT.md
367
399
 
368
400
  3. **Parallel Execution**
369
401
  - Deploy all selected agents simultaneously using your internal Task tool
@@ -378,7 +410,7 @@ Read and execute .ai/task-manager/config/hooks/PRE_TASK_ASSIGNMENT.md
378
410
 
379
411
  #### Phase Post-Execution
380
412
 
381
- Read and execute .ai/task-manager/config/hooks/POST_PHASE.md
413
+ Read and execute $root/.ai/task-manager/config/hooks/POST_PHASE.md
382
414
 
383
415
  #### Phase Transition
384
416
 
@@ -391,7 +423,7 @@ Read and execute .ai/task-manager/config/hooks/POST_PHASE.md
391
423
  **Output Behavior:**
392
424
 
393
425
  Provide a concise execution summary:
394
- - Example: "Execution completed. Review summary: `.ai/task-manager/archive/[plan]/plan-[id].md`"
426
+ - Example: "Execution completed. Review summary: `$root/.ai/task-manager/archive/[plan]/plan-[id].md`"
395
427
 
396
428
  **CRITICAL - Structured Output for Command Coordination:**
397
429
 
@@ -402,7 +434,7 @@ Always end your output with a standardized summary in this exact format:
402
434
  Execution Summary:
403
435
  - Plan ID: [numeric-id]
404
436
  - Status: Archived
405
- - Location: .ai/task-manager/archive/[plan-id]--[plan-name]/
437
+ - Location: $root/.ai/task-manager/archive/[plan-id]--[plan-name]/
406
438
  ```
407
439
 
408
440
  This structured output enables automated workflow coordination and must be included even when running standalone.
@@ -416,7 +448,7 @@ Upon successful completion of all phases and validation gates, perform the follo
416
448
 
417
449
  #### Execution Summary Generation
418
450
 
419
- Append an execution summary section to the plan document with the format described in .ai/task-manager/config/templates/EXECUTION_SUMMARY_TEMPLATE.md
451
+ Append an execution summary section to the plan document with the format described in $root/.ai/task-manager/config/templates/EXECUTION_SUMMARY_TEMPLATE.md
420
452
 
421
453
  #### Plan Archival
422
454
 
@@ -424,7 +456,7 @@ After successfully appending the execution summary:
424
456
 
425
457
  **Move completed plan to archive**:
426
458
  ```bash
427
- mv .ai/task-manager/plans/[plan-folder] .ai/task-manager/archive/
459
+ mv $root/.ai/task-manager/plans/[plan-folder] $root/.ai/task-manager/archive/
428
460
  ```
429
461
 
430
462
  **Progress**: ⬛⬛⬛ 100% - Step 3/3: Blueprint Execution Complete
@@ -5,24 +5,54 @@ description: Generate tasks to implement the plan with the provided ID.
5
5
 
6
6
  # Comprehensive Task List Creation
7
7
 
8
- ## Assistant Configuration
9
-
10
- Before proceeding with this command, you MUST load and respect the assistant's configuration:
11
-
12
- Load the following configuration files in order of precedence (later files override earlier ones):
13
- 1. `/workspace/AGENTS.md` - Project-level task management guidance
14
- 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
15
- 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
8
+ ---
16
9
 
17
- These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
10
+ Ultrathink, think harder, and use tools.
18
11
 
19
- ---
12
+ ## Find the AI Task Manager root
20
13
 
21
- Think harder and use tools.
14
+ ```bash
15
+ if [ ! -f /tmp/find-ai-task-manager-root.js ]; then
16
+ cat << 'EOF' > /tmp/find-ai-task-manager-root.js
17
+ const fs = require('fs');
18
+ const path = require('path');
19
+
20
+ const findRoot = (currentDir) => {
21
+ const taskManagerPath = path.join(currentDir, '.ai/task-manager');
22
+ const metadataPath = path.join(taskManagerPath, '.init-metadata.json');
23
+
24
+ try {
25
+ if (fs.existsSync(metadataPath) && JSON.parse(fs.readFileSync(metadataPath, 'utf8')).version) {
26
+ console.log(path.resolve(taskManagerPath));
27
+ process.exit(0);
28
+ }
29
+ } catch (e) {
30
+ // Continue searching
31
+ }
32
+
33
+ const parentDir = path.dirname(currentDir);
34
+ if (parentDir !== currentDir) {
35
+ findRoot(parentDir);
36
+ } else {
37
+ process.exit(1);
38
+ }
39
+ };
40
+
41
+ findRoot(process.cwd());
42
+ EOF
43
+ fi
44
+
45
+ root=$(node /tmp/find-ai-task-manager-root.js)
46
+
47
+ if [ -z "$root" ]; then
48
+ echo "Error: Could not find task manager root directory (.ai/task-manager)"
49
+ exit 1
50
+ fi
51
+ ```
22
52
 
23
53
  You are a comprehensive task planning assistant. Your role is to create detailed, actionable plans based on user input while ensuring you have all necessary context before proceeding.
24
54
 
25
- Include `.ai/task-manager/config/TASK_MANAGER.md` for the directory structure of tasks.
55
+ Include `$root/.ai/task-manager/config/TASK_MANAGER.md` for the directory structure of tasks.
26
56
 
27
57
  ## Instructions
28
58
 
@@ -32,7 +62,7 @@ Use your internal Todo task tool to track the following process:
32
62
 
33
63
  - [ ] Read and process plan $1
34
64
  - [ ] Use the Task Generation Process to create tasks according to the Task Creation Guidelines
35
- - [ ] Read and run the .ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
65
+ - [ ] Read and run the $root/.ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
36
66
 
37
67
  ### Input
38
68
 
@@ -40,7 +70,7 @@ Use your internal Todo task tool to track the following process:
40
70
 
41
71
  ```bash
42
72
  # Extract validation results directly from script
43
- plan_file=$(node .ai/task-manager/config/scripts/validate-plan-blueprint.cjs $1 planFile)
73
+ plan_file=$(node $root/config/scripts/validate-plan-blueprint.cjs $1 planFile)
44
74
  ```
45
75
 
46
76
  ### Input Error Handling
@@ -236,14 +266,14 @@ The schema for this frontmatter is:
236
266
 
237
267
  ##### Task Body Structure
238
268
 
239
- Use the task template in .ai/task-manager/config/templates/TASK_TEMPLATE.md
269
+ Use the task template in $root/.ai/task-manager/config/templates/TASK_TEMPLATE.md
240
270
 
241
271
  ##### Task ID Generation
242
272
 
243
273
  When creating tasks, you need to determine the next available task ID for the specified plan. Use this bash command to automatically generate the correct ID:
244
274
 
245
275
  ```bash
246
- node .ai/task-manager/config/scripts/get-next-task-id.cjs $1
276
+ node $root/config/scripts/get-next-task-id.cjs $1
247
277
  ```
248
278
 
249
279
  ### Validation Checklist
@@ -296,14 +326,14 @@ If the plan lacks sufficient detail:
296
326
 
297
327
  #### Step 4: POST_TASK_GENERATION_ALL hook
298
328
 
299
- Read and run the .ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
329
+ Read and run the $root/.ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
300
330
 
301
331
  ### Output Requirements
302
332
 
303
333
  **Output Behavior:**
304
334
 
305
335
  Provide a concise completion message with task count and location:
306
- - Example: "Task generation complete. Created [count] tasks in `.ai/task-manager/plans/[plan-id]--[name]/tasks/`"
336
+ - Example: "Task generation complete. Created [count] tasks in `$root/.ai/task-manager/plans/[plan-id]--[name]/tasks/`"
307
337
 
308
338
  **CRITICAL - Structured Output for Command Coordination:**
309
339
 
@@ -4,27 +4,57 @@ description: Review the plan with the provided ID, gather clarifications, and re
4
4
  ---
5
5
  # Plan Review and Refinement
6
6
 
7
- You are a strategic planning specialist who specializes in interrogating existing plans, uncovering blind spots, and
8
- refining the document so that task generators receive the clearest possible instructions. Treat the current plan as the
9
- work product of another assistant: your responsibility is to pressure test it, request any missing information from the
7
+ You are a strategic planning specialist who specializes in interrogating existing plans, uncovering blind spots, and
8
+ refining the document so that task generators receive the clearest possible instructions. Treat the current plan as the
9
+ work product of another assistant: your responsibility is to pressure test it, request any missing information from the
10
10
  user, and update the plan with the refinements. Use the plan-creator sub-agent for this if it is available.
11
11
 
12
- ## Assistant Configuration
13
-
14
- Before proceeding with this command, you MUST load and respect the assistant's configuration:
15
-
16
- Load the following configuration files in order of precedence (later files override earlier ones):
17
- 1. `/workspace/AGENTS.md` - Project-level task management guidance
18
- 2. `/workspace/CLAUDE.md` - Claude-specific assistant configuration (if it exists)
19
- 3. `/home/node/.claude/CLAUDE.md` - Global Claude configuration from your home directory (if it exists)
12
+ ---
20
13
 
21
- These files contain your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
14
+ Ultrathink, think harder, and use tools.
22
15
 
23
- ---
16
+ ## Find the AI Task Manager root
24
17
 
25
- Think harder and use tools.
18
+ ```bash
19
+ if [ ! -f /tmp/find-ai-task-manager-root.js ]; then
20
+ cat << 'EOF' > /tmp/find-ai-task-manager-root.js
21
+ const fs = require('fs');
22
+ const path = require('path');
23
+
24
+ const findRoot = (currentDir) => {
25
+ const taskManagerPath = path.join(currentDir, '.ai/task-manager');
26
+ const metadataPath = path.join(taskManagerPath, '.init-metadata.json');
27
+
28
+ try {
29
+ if (fs.existsSync(metadataPath) && JSON.parse(fs.readFileSync(metadataPath, 'utf8')).version) {
30
+ console.log(path.resolve(taskManagerPath));
31
+ process.exit(0);
32
+ }
33
+ } catch (e) {
34
+ // Continue searching
35
+ }
36
+
37
+ const parentDir = path.dirname(currentDir);
38
+ if (parentDir !== currentDir) {
39
+ findRoot(parentDir);
40
+ } else {
41
+ process.exit(1);
42
+ }
43
+ };
44
+
45
+ findRoot(process.cwd());
46
+ EOF
47
+ fi
48
+
49
+ root=$(node /tmp/find-ai-task-manager-root.js)
50
+
51
+ if [ -z "$root" ]; then
52
+ echo "Error: Could not find task manager root directory (.ai/task-manager)"
53
+ exit 1
54
+ fi
55
+ ```
26
56
 
27
- Include `.ai/task-manager/config/TASK_MANAGER.md` to understand the plan directory structure and naming conventions.
57
+ Include `$root/.ai/task-manager/config/TASK_MANAGER.md` to understand the plan directory structure and naming conventions.
28
58
 
29
59
  ## Inputs
30
60
  - **Plan ID**: `$1` (required)
@@ -34,28 +64,28 @@ If the plan ID is missing, immediately stop and show an error explaining correct
34
64
 
35
65
  ### Plan Discovery and Validation
36
66
 
37
- Obtain the plan using the plan ID using the following script:
67
+ Obtain the plan using the plan ID:
38
68
 
39
69
  ```bash
40
70
  # Extract validation results directly from script
41
- plan_file=$(node .ai/task-manager/config/scripts/validate-plan-blueprint.cjs $1 planFile)
71
+ plan_file=$(node $root/config/scripts/validate-plan-blueprint.cjs $1 planFile)
42
72
  ```
43
73
 
44
74
  ## Process Checklist
45
75
 
46
76
  Use your internal Todo tool to track the entire refinement workflow:
47
77
 
48
- - [ ] Load `.ai/task-manager/config/hooks/PRE_PLAN.md`
78
+ - [ ] Load `$root/.ai/task-manager/config/hooks/PRE_PLAN.md`
49
79
  - [ ] Stage 1: Baseline Review
50
80
  - [ ] Stage 2: Clarification Loop
51
81
  - [ ] Stage 3: Refinement Implementation
52
82
  - [ ] Review the existing plan end-to-end (frontmatter, clarifications, architecture, risks, etc.)
53
83
  - [ ] Surface strengths, contradictions, and potential risks, without updating the plan
54
84
  - [ ] Use the "Total Clarification Algorithm" to get the missing clarification from the user
55
- - [ ] Apply refinements using `.ai/task-manager/config/templates/PLAN_TEMPLATE.md` as the structural baseline
85
+ - [ ] Apply refinements using `$root/.ai/task-manager/config/templates/PLAN_TEMPLATE.md` as the structural baseline
56
86
  - [ ] Update the "Plan Clarifications" table with the latest Q&A
57
87
  - [ ] Update the plan file (stored in `plan_file`) with the refinements from steps above
58
- - [ ] Re-run `.ai/task-manager/config/hooks/POST_PLAN.md`
88
+ - [ ] Re-run `$root/.ai/task-manager/config/hooks/POST_PLAN.md`
59
89
 
60
90
  ## Stage 1: Baseline Review
61
91
 
@@ -98,7 +128,7 @@ flowchart TD
98
128
  Once you have sufficient context (or have documented the missing context), refine the plan directly in-place:
99
129
 
100
130
  1. **Maintain Identity**: Keep the existing `id` and directory. Do not create a new plan ID.
101
- 2. **Structure Compliance**: Ensure the plan still follows `.ai/task-manager/config/templates/PLAN_TEMPLATE.md`. Add missing sections if necessary.
131
+ 2. **Structure Compliance**: Ensure the plan still follows `$root/.ai/task-manager/config/templates/PLAN_TEMPLATE.md`. Add missing sections if necessary.
102
132
  3. **Content Updates**:
103
133
  - Refresh the executive summary to reflect clarifications and new insights.
104
134
  - Update architectural sections, diagrams, and risk mitigations to resolve the identified gaps.
@@ -106,7 +136,7 @@ Once you have sufficient context (or have documented the missing context), refin
106
136
  - Clearly reference clarifications in the relevant plan sections (e.g., italicized notes that point back to the Q&A table).
107
137
  4. **Net-New Sections**: If the plan needs a new subsection (e.g., Decision Log, Data Contracts), add it under `Notes` with a clearly labeled section so it remains discoverable.
108
138
  5. **Change Log**: Append a bullet list in the `Notes` section that briefly states what changed in this refinement session (e.g., `- 2025-03-16: Clarified auth flow tokens and updated architecture diagram`).
109
- 6. **Validation Hooks**: Execute `.ai/task-manager/config/hooks/POST_PLAN.md` to ensure the refined plan still meets quality bars.
139
+ 6. **Validation Hooks**: Execute `$root/.ai/task-manager/config/hooks/POST_PLAN.md` to ensure the refined plan still meets quality bars.
110
140
 
111
141
  ## Output Requirements
112
142