@e0ipso/ai-task-manager 1.20.0 → 1.21.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAsB,MAAM,SAAS,CAAC;AAqDpF;;;;;;;;GAQG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAkGvE;AA8LD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGtE;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3D,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC,CAmBD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAsB,MAAM,SAAS,CAAC;AAqDpF;;;;;;;;GAQG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CA4GvE;AAuMD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGtE;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3D,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC,CAmBD"}
package/dist/index.js CHANGED
@@ -141,6 +141,11 @@ async function init(options) {
141
141
  console.log(` ${chalk_1.default.blue('●')} ${resolvePath(baseDir, `.${assistant}/${commandsPath}/tasks/create-plan.${templateFormat}`)}`);
142
142
  console.log(` ${chalk_1.default.blue('●')} ${resolvePath(baseDir, `.${assistant}/${commandsPath}/tasks/execute-blueprint.${templateFormat}`)}`);
143
143
  console.log(` ${chalk_1.default.blue('●')} ${resolvePath(baseDir, `.${assistant}/${commandsPath}/tasks/generate-tasks.${templateFormat}`)}`);
144
+ // Only show agents for Claude
145
+ if (assistant === 'claude') {
146
+ console.log(chalk_1.default.cyan(` ${assistant.charAt(0).toUpperCase() + assistant.slice(1)} Agents:`));
147
+ console.log(` ${chalk_1.default.blue('●')} ${resolvePath(baseDir, `.${assistant}/agents/plan-creator.md`)}`);
148
+ }
144
149
  }
145
150
  // ========== FOOTER SECTION ==========
146
151
  console.log(`\n${chalk_1.default.green('✓')} AI Task Manager initialized successfully!`);
@@ -280,21 +285,28 @@ async function createAssistantStructure(assistant, baseDir) {
280
285
  if (!(await exists(sourceDir))) {
281
286
  throw new Error(`Template directory not found: ${sourceDir}`);
282
287
  }
283
- // Copy entire template directory structure
284
- await fs.copy(sourceDir, assistantDir);
285
- // OpenCode uses 'command' (singular) instead of 'commands' (plural)
286
- if (assistant === 'opencode') {
287
- const commandsDir = resolvePath(assistantDir, 'commands');
288
- const commandDir = resolvePath(assistantDir, 'command');
289
- if (await exists(commandsDir)) {
290
- await fs.move(commandsDir, commandDir);
288
+ // Determine correct commands directory name based on assistant type
289
+ // OpenCode uses 'command' (singular) while Claude and Gemini use 'commands' (plural)
290
+ const commandsPath = assistant === 'opencode' ? 'command' : 'commands';
291
+ // Copy template structure with correct directory naming
292
+ const sourceCommandsDir = resolvePath(sourceDir, 'commands');
293
+ const targetCommandsDir = resolvePath(assistantDir, commandsPath);
294
+ // Copy the commands directory to the correct location
295
+ if (await exists(sourceCommandsDir)) {
296
+ await fs.copy(sourceCommandsDir, targetCommandsDir);
297
+ }
298
+ // Copy agent files for Claude (agents are Claude-specific)
299
+ if (assistant === 'claude') {
300
+ const sourceAgentsDir = resolvePath(sourceDir, 'agents');
301
+ const targetAgentsDir = resolvePath(assistantDir, 'agents');
302
+ if (await exists(sourceAgentsDir)) {
303
+ await fs.copy(sourceAgentsDir, targetAgentsDir);
291
304
  }
292
305
  }
293
306
  // Determine template format based on assistant type
294
307
  const templateFormat = (0, utils_1.getTemplateFormat)(assistant);
295
308
  // If target format is different from source (md), process files in place
296
309
  if (templateFormat !== 'md') {
297
- const commandsPath = assistant === 'opencode' ? 'command' : 'commands';
298
310
  const tasksDir = resolvePath(assistantDir, `${commandsPath}/tasks`);
299
311
  const files = await fs.readdir(tasksDir);
300
312
  for (const file of files.filter(f => f.endsWith('.md'))) {
@@ -375,7 +387,7 @@ async function displayWorkflowHelp() {
375
387
  console.log('');
376
388
  console.log(` ${chalk_1.default.blue('2.')} Provide additional context if the assistant needs it`);
377
389
  console.log('');
378
- console.log(` ${chalk_1.default.blue('3.')} ${chalk_1.default.yellow.bold('MANUALLY REVIEW THE PLAN')} ${chalk_1.default.yellow("(don't skip this!")}`);
390
+ console.log(` ${chalk_1.default.blue('3.')} ${chalk_1.default.yellow.bold('MANUALLY REVIEW THE PLAN')} ${chalk_1.default.yellow("(don't skip this!)")}`);
379
391
  console.log(` ${chalk_1.default.gray('Find it in: .ai/task-manager/plans/01--*/plan-[0-9]*--*.md')}`);
380
392
  console.log('');
381
393
  console.log(` ${chalk_1.default.blue('4.')} Create the tasks for the plan:`);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;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": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "Task management for AI coding assistants",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -51,15 +51,40 @@ const printInfo = (message) => {
51
51
 
52
52
  // Function to find plan directory
53
53
  const findPlanDirectory = (planId) => {
54
- try {
55
- // Use find command similar to bash script
56
- const findCommand = `find .ai/task-manager/plans .ai/task-manager/archive -type d -name "${planId}--*" 2>/dev/null || true`;
57
- const result = execSync(findCommand, { encoding: 'utf8' }).trim();
58
- const directories = result.split('\n').filter(dir => dir.length > 0);
59
- return directories.length > 0 ? directories[0] : null;
60
- } catch (error) {
61
- return null;
54
+ const searchLocations = [
55
+ '.ai/task-manager/plans',
56
+ '.ai/task-manager/archive'
57
+ ];
58
+
59
+ // Generate ID variations to try (exact, padded, unpadded)
60
+ const idVariations = [
61
+ planId, // Try exact match first
62
+ planId.padStart(2, '0'), // Try padded version (3 → 03)
63
+ planId.replace(/^0+/, '') || '0' // Try unpadded version (03 → 3)
64
+ ];
65
+
66
+ // Remove duplicates from variations array
67
+ const uniqueVariations = [...new Set(idVariations)];
68
+
69
+ // Search for each variation in each location
70
+ for (const id of uniqueVariations) {
71
+ for (const location of searchLocations) {
72
+ try {
73
+ const findCommand = `find ${location} -type d -name "${id}--*" 2>/dev/null || true`;
74
+ const result = execSync(findCommand, { encoding: 'utf8' }).trim();
75
+ const directories = result.split('\n').filter(dir => dir.length > 0);
76
+
77
+ if (directories.length > 0) {
78
+ return directories[0]; // Early return on first match
79
+ }
80
+ } catch (error) {
81
+ // Continue trying other variations/locations
82
+ continue;
83
+ }
84
+ }
62
85
  }
86
+
87
+ return null; // No matches found
63
88
  };
64
89
 
65
90
  // Function to find task file with padded/unpadded ID handling
@@ -94,6 +94,16 @@ function findPlanById(planId) {
94
94
 
95
95
  debugLog(`Task manager root found: ${taskManagerRoot}`);
96
96
 
97
+ // Convert planId to numeric for flexible matching (handles both "2" and "02")
98
+ const numericPlanId = parseInt(planId, 10);
99
+
100
+ if (isNaN(numericPlanId)) {
101
+ errorLog(`Invalid plan ID: ${planId}. Plan ID must be numeric.`);
102
+ return null;
103
+ }
104
+
105
+ debugLog(`Searching for plan with numeric ID: ${numericPlanId} (input was: ${planId})`);
106
+
97
107
  const plansDir = path.join(taskManagerRoot, 'plans');
98
108
  const archiveDir = path.join(taskManagerRoot, 'archive');
99
109
 
@@ -111,24 +121,31 @@ function findPlanById(planId) {
111
121
  debugLog(`Found ${entries.length} entries in ${dir}`);
112
122
 
113
123
  for (const entry of entries) {
114
- // Match directory pattern: [plan-id]--*
115
- if (entry.isDirectory() && entry.name.match(new RegExp(`^${planId}--`))) {
116
- const planDirPath = path.join(dir, entry.name);
117
- debugLog(`Found matching plan directory: ${planDirPath}`);
124
+ // Match directory pattern: [plan-id]--* (with flexible ID matching)
125
+ if (entry.isDirectory()) {
126
+ // Extract numeric ID from directory name, stripping leading zeros
127
+ const dirMatch = entry.name.match(/^0*(\d+)--/);
128
+ if (dirMatch && parseInt(dirMatch[1], 10) === numericPlanId) {
129
+ const planDirPath = path.join(dir, entry.name);
130
+ debugLog(`Found matching plan directory: ${planDirPath} (extracted ID: ${dirMatch[1]} matches input: ${numericPlanId})`);
118
131
 
119
132
  try {
120
133
  const planDirEntries = fs.readdirSync(planDirPath, { withFileTypes: true });
121
134
 
122
- // Look for plan file: plan-[plan-id]--*.md
135
+ // Look for plan file: plan-[plan-id]--*.md (with flexible ID matching)
123
136
  for (const planEntry of planDirEntries) {
124
- if (planEntry.isFile() && planEntry.name.match(new RegExp(`^plan-${planId}--.*\\.md$`))) {
125
- const planFilePath = path.join(planDirPath, planEntry.name);
126
- debugLog(`Found plan file: ${planFilePath}`);
127
-
128
- return {
129
- planFile: planFilePath,
130
- planDir: planDirPath
131
- };
137
+ if (planEntry.isFile()) {
138
+ // Extract numeric ID from filename, stripping leading zeros
139
+ const fileMatch = planEntry.name.match(/^plan-0*(\d+)--.*\.md$/);
140
+ if (fileMatch && parseInt(fileMatch[1], 10) === numericPlanId) {
141
+ const planFilePath = path.join(planDirPath, planEntry.name);
142
+ debugLog(`Found plan file: ${planFilePath} (extracted ID: ${fileMatch[1]} matches input: ${numericPlanId})`);
143
+
144
+ return {
145
+ planFile: planFilePath,
146
+ planDir: planDirPath
147
+ };
148
+ }
132
149
  }
133
150
  }
134
151
 
@@ -136,6 +153,7 @@ function findPlanById(planId) {
136
153
  } catch (err) {
137
154
  errorLog(`Failed to read plan directory ${planDirPath}: ${err.message}`);
138
155
  }
156
+ }
139
157
  }
140
158
  }
141
159
  } catch (err) {
@@ -300,7 +318,9 @@ function validatePlanBlueprint(planId, fieldName) {
300
318
  errorLog(`Valid fields: ${validFields.join(', ')}`);
301
319
  process.exit(1);
302
320
  }
303
- console.log(result[fieldName]);
321
+ // Use process.stdout.write to avoid util.inspect colorization
322
+ // Convert to string explicitly to ensure plain text output
323
+ process.stdout.write(String(result[fieldName]) + '\n');
304
324
  } else {
305
325
  // Output full JSON for backward compatibility
306
326
  console.log(JSON.stringify(result, null, 2));
@@ -21,44 +21,51 @@ created: [YYYY-MM-DD]
21
21
 
22
22
  ## Context
23
23
 
24
- ### Current State
25
- [Describe the existing situation, problems, or gaps that this plan addresses. Include specific details about what exists now, current limitations, and why change is needed.]
24
+ ### Current State vs Target State
25
+ [Create a table that compares the current state with the target state in the different aspects of the implementation. Include a column on why the change is necessary.]
26
26
 
27
- ### Target State
28
- [Describe the desired end state after plan completion. Be specific about the expected outcomes and how success will be measured.]
27
+ Example:
28
+
29
+ | Current State | Target State | Why? |
30
+ |--------------------------| ------------ |---------------------------|
31
+ | Users have to click twice | Users can click once | We want to improve the UX |
32
+ | The button is small | The button is bigger | Fix site design |
33
+ | ... | ... | ... |
29
34
 
30
35
  ### Background
31
36
  [Any additional context, requirements, constraints, any solutions that we tried that didn't work, or relevant history that informs the implementation approach.]
32
37
 
33
- ## Technical Implementation Approach
34
-
35
- [Provide an overview of the implementation strategy, key architectural decisions, and technical approach. Break down into major components or phases using ### subheadings.]
38
+ ## Architectural Approach
39
+ [Provide an overview of the implementation strategy, key architectural decisions, and technical approach. Break down into major components or phases using ### subheadings. Add a mermaid diagram summary.]
36
40
 
37
- ### [Component/Phase 1 Name]
41
+ ### [Component/Stage 1 Name]
38
42
  **Objective**: [What this component accomplishes and why it's important]
39
43
 
40
- [Detailed explanation of implementation approach, key technical decisions, specifications, and rationale for design choices.]
44
+ [Detailed & concise explanation of implementation approach, key technical decisions, specifications, and rationale for design choices.]
41
45
 
42
- ### [Component/Phase 2 Name]
46
+ ### [Component/Stage 2 Name]
43
47
  **Objective**: [What this component accomplishes and why it's important]
44
48
 
45
- [Detailed explanation of implementation approach, key technical decisions, specifications, and rationale for design choices.]
49
+ [Detailed & concise explanation of implementation approach, key technical decisions, specifications, and rationale for design choices.]
46
50
 
47
51
  ### [Additional Components as Needed]
48
52
  [Continue with additional technical components or phases following the same pattern]
49
53
 
50
54
  ## Risk Considerations and Mitigation Strategies
51
55
 
52
- ### Technical Risks
56
+ <details>
57
+ <summary>Technical Risks</summary>
53
58
  - **[Specific Technical Risk]**: [Description of the technical challenge or limitation]
54
59
  - **Mitigation**: [Specific strategy to address this technical risk]
60
+ </details>
55
61
 
56
- ### Implementation Risks
62
+ <details>
63
+ <summary>Implementation Risks</summary>
57
64
  - **[Specific Implementation Risk]**: [Description of implementation-related challenge]
58
65
  - **Mitigation**: [Specific strategy to address this implementation risk]
66
+ </details>
59
67
 
60
- ### [Additional Risk Categories as Needed]
61
- [Continue with other risk categories such as Integration Risks, Quality Risks, Resource Risks, etc.]
68
+ [Additional Risk Categories as Needed: continue with other risk categories such as Integration Risks, Quality Risks, Resource Risks, etc.]
62
69
 
63
70
  ## Success Criteria
64
71
 
@@ -67,11 +74,6 @@ created: [YYYY-MM-DD]
67
74
  2. [Measurable outcome 2]
68
75
  3. [Measurable outcome 3]
69
76
 
70
- ### Quality Assurance Metrics
71
- 1. [Quality measure 1]
72
- 2. [Quality measure 2]
73
- 3. [Quality measure 3]
74
-
75
77
  ## Resource Requirements
76
78
 
77
79
  ### Development Skills
@@ -86,8 +88,5 @@ created: [YYYY-MM-DD]
86
88
  ## Integration Strategy
87
89
  [Optional section - how this work integrates with existing systems]
88
90
 
89
- ## Implementation Order
90
- [Optional section - high-level sequence without detailed phases]
91
-
92
91
  ## Notes
93
92
  [Optional section - any additional considerations, constraints, or important context]
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: plan-creator
3
+ description: |
4
+ Use this agent to create comprehensive strategic plan documents combining business strategy and technical architecture. Specializes in context gathering, YAGNI enforcement, and producing actionable blueprints with visual communication.
5
+ ---
6
+
7
+ You are a strategic planning specialist who creates actionable plan documents that balance comprehensive context with disciplined scope control.
8
+
9
+ ## Core Mission
10
+
11
+ Create strategic blueprints that define WHAT to build and WHY, not HOW. Your plans must:
12
+ - Gather complete context through targeted clarification
13
+ - Enforce YAGNI (reduce scope by 20-30%)
14
+ - Use mermaid diagrams for visual clarity
15
+ - Follow template structure precisely
16
+ - Define measurable success criteria
17
+
18
+ ## Critical Workflow
19
+
20
+ **1. Context Gathering**
21
+ - Read CLAUDE.md, README.md, package.json
22
+ - Search codebase for similar patterns
23
+ - Ask specific, categorized clarification questions when gaps exist
24
+ - STOP and wait for answers before planning
25
+
26
+ **2. YAGNI Enforcement**
27
+ For each component ask: Is this explicitly required? If not, exclude it.
28
+
29
+ Eliminate these anti-patterns:
30
+ - Over-engineering: ❌ "Add comprehensive analytics" → ✅ "Log core events"
31
+ - Premature optimization: ❌ "Implement caching/load balancing/CDN" → ✅ "Structure for future caching"
32
+ - Feature speculation: ❌ "Users might want X" → ✅ Only explicit requirements, or ask for clarifications
33
+ - Gold-plating: ❌ "15+ admin features" → ✅ "3 specified operations"
34
+
35
+ **3. Plan Structure** (follow template exactly)
36
+ - **Executive Summary**: 2-3 paragraphs (what/why/how/benefits)
37
+ - **Context**: Current state, target state, background
38
+ - **Technical Approach**: 3-7 components with objectives and architectural decisions
39
+ - **Risks**: 3-5 risks with mitigation strategies
40
+ - **Success Criteria**: Measurable, verifiable metrics
41
+ - **Mermaid Diagrams**: 1-2 diagrams (architecture/flow/state/data model)
42
+
43
+ **4. Quality Standards**
44
+ - Use active voice and specific terms
45
+ - Detail level: ✅ "JWT with 15-min tokens" ✅ "Rate limit: 5 fails = 15-min lockout"
46
+ - Detail level: ❌ "function authenticateUser(username, password)" (too detailed) ❌ "Build auth system" (too vague)
47
+
48
+ ## Absolute Prohibitions
49
+
50
+ **NEVER Include**:
51
+ - Time estimates ("2-3 weeks", "Phase 1 (Week 1-2)")
52
+ - Task lists ("Task 1: Create schema, Task 2: Build API")
53
+ - Code snippets or function signatures
54
+ - Specific variable names or file paths
55
+ - Speculative "nice to have" features
56
+
57
+ ## Template Compliance Checklist
58
+
59
+ - [ ] YAML frontmatter: id, summary, created
60
+ - [ ] Original Work Order (verbatim quote)
61
+ - [ ] Plan Clarifications (if asked questions)
62
+ - [ ] Executive Summary (2-3 paragraphs)
63
+ - [ ] Context (current/target/background)
64
+ - [ ] Technical Implementation (3-7 components with objectives)
65
+ - [ ] Risks (3-5 with mitigations)
66
+ - [ ] Success Criteria (measurable)
67
+ - [ ] Resource Requirements
68
+ - [ ] 1-2 mermaid diagrams
69
+ - [ ] Structured output summary
70
+
71
+ ## Execution Steps
72
+
73
+ 1. Execute PRE_PLAN.md hook if exists
74
+ 2. Analyze user input and search codebase
75
+ 3. Ask clarification questions if needed (STOP until answered)
76
+ 4. Generate Plan ID: `node .ai/task-manager/config/scripts/get-next-plan-id.cjs`
77
+ 5. Create plan at `.ai/task-manager/plans/[ID]--[name]/plan-[ID]--[name].md`
78
+ 6. Execute POST_PLAN.md hook if exists
79
+ 7. Output:
80
+ ```
81
+ ---
82
+ Plan Summary:
83
+ - Plan ID: [numeric-id]
84
+ - Plan File: [full-path]
85
+ ```
86
+
87
+ ## Excellence Markers
88
+
89
+ ✅ Strategic clarity (what/why clear to all readers)
90
+ ✅ Technical soundness (well-reasoned architecture)
91
+ ✅ Scope discipline (only necessary features)
92
+ ✅ Risk awareness (challenges + mitigations)
93
+ ✅ Visual communication (diagrams clarify complexity)
94
+ ✅ Measurable success (verifiable criteria)
95
+ ✅ Template adherence (precise structure)
@@ -1,9 +1,12 @@
1
1
  ---
2
- argument-hint: [user-prompt]
2
+ argument-hint: "[user-prompt]"
3
3
  description: Create a comprehensive plan to accomplish the request from the user.
4
4
  ---
5
5
  # Comprehensive Plan Creation
6
6
 
7
+ You are a strategic planning specialist who creates actionable plan documents that balance comprehensive context with
8
+ disciplined scope control. Your role is to think hard to create detailed, actionable plans based on user input while ensuring you have all necessary context before proceeding. Use the plan-creator sub-agent for this if it is available.
9
+
7
10
  ## Assistant Configuration
8
11
 
9
12
  Before proceeding with this command, you MUST load and respect the assistant's configuration:
@@ -20,8 +23,6 @@ The output above contains your global and project-level configuration rules. You
20
23
 
21
24
  Think harder and use tools.
22
25
 
23
- 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.
24
-
25
26
  Include .ai/task-manager/config/TASK_MANAGER.md for the directory structure of tasks.
26
27
 
27
28
  ## Instructions
@@ -34,17 +35,14 @@ $ARGUMENTS
34
35
 
35
36
  If no user input is provided stop immediately and show an error message to the user.
36
37
 
37
- ### Process
38
+ ### Process Checklist
38
39
 
39
- Use your internal Todo task tool to track the plan generation:
40
+ Use your internal Todo task tool to track the following plan generation:
40
41
 
41
42
  - [ ] Read and execute .ai/task-manager/config/hooks/PRE_PLAN.md
42
43
  - [ ] User input and context analysis
43
44
  - [ ] Clarification questions
44
- - [ ] Plan generation: Executive Summary
45
- - [ ] Plan generation: Detailed Steps
46
- - [ ] Plan generation: Risk Considerations
47
- - [ ] Plan generation: Success Metrics
45
+ - [ ] Plan generation
48
46
  - [ ] Read and execute .ai/task-manager/config/hooks/POST_PLAN.md
49
47
 
50
48
  #### Step 1: Context Analysis
@@ -59,32 +57,21 @@ Before creating any plan, analyze the user's request for:
59
57
  #### Step 2: Clarification Phase
60
58
  If any critical context is missing:
61
59
  1. Identify specific gaps in the information provided
62
- 2. Ask targeted follow-up questions grouped by category
63
- 3. Wait for user responses before proceeding to planning
64
- 4. Frame questions clearly with examples when helpful
65
- 5. Be extra cautious. Users miss important context very often. Don't hesitate to ask for clarifications.
66
-
67
- Example clarifying questions:
68
- - "Q: What is your primary goal with [specific aspect]?"
69
- - "Q: Do you have any existing [resources/code/infrastructure] I should consider?"
70
- - "Q: What is your timeline for completing this?"
71
- - "Q: Are there specific constraints I should account for?"
72
- - "Q: Do you want me to write tests for this?"
73
- - "Q: Are there other systems, projects, or modules that perform a similar task?"
60
+ 2. Ask targeted follow-up questions
61
+ 3. Frame questions clearly with examples when helpful
62
+ 4. Be extra cautious. Users miss important context very often. Don't hesitate to ask for additional clarifications.
74
63
 
75
64
  Try to answer your own questions first by inspecting the codebase, docs, and assistant documents like CLAUDE.md, GEMINI.md, AGENTS.md ...
76
65
 
77
- #### Step 3: Plan Generation
78
- Only after confirming sufficient context, create a plan that includes:
79
- 1. **Executive Summary**: Brief overview of the approach
80
- 2. **Detailed Steps**: Numbered, actionable tasks with clear outcomes
81
- 3. **Risk Considerations**: Potential challenges and mitigation strategies
82
- 4. **Success Metrics**: How to measure completion and quality
66
+ IMPORTANT: Once you have the user's answers go back to Step 2. Do this in a loop until you have no more questions. Ask as many rounds of questions as necessary, it is very important you have all the information you need to achieve your task.
83
67
 
84
- Remember that a plan needs to be reviewed by a human. Be concise and to the point. Also, include mermaid diagrams to illustrate the plan.
68
+ #### Step 3: Plan Generation
69
+ Only after confirming sufficient context, create a plan according the the .ai/task-manager/config/templates/PLAN_TEMPLATE.md
85
70
 
86
71
  ##### CRITICAL: Output Format
87
72
 
73
+ Remember that a plan needs to be reviewed by a human. Be concise and to the point. Also, include mermaid diagrams to illustrate the plan.
74
+
88
75
  **Output Behavior: CRITICAL - Structured Output for Command Coordination**
89
76
 
90
77
  Always end your output with a standardized summary in this exact format, for command coordination:
@@ -107,6 +94,7 @@ Use the template in .ai/task-manager/config/templates/PLAN_TEMPLATE.md
107
94
  Do not include the following in your plan output.
108
95
  - Avoid time estimations
109
96
  - Avoid task lists and mentions of phases (those are things we'll introduce later)
97
+ - Avoid code examples
110
98
 
111
99
  ###### Frontmatter Structure
112
100
 
@@ -144,8 +132,8 @@ The schema for this frontmatter is:
144
132
  ```
145
133
 
146
134
  ### Plan ID Generation
135
+ Execute this script to determine the plan ID:
147
136
 
148
- **Auto-generate the next plan ID:**
149
137
  ```bash
150
138
  node .ai/task-manager/config/scripts/get-next-plan-id.cjs
151
139
  ```
@@ -1,6 +1,6 @@
1
1
  ---
2
- argument-hint: [plan-ID]
3
- description: Execute the task in the plan
2
+ argument-hint: "[plan-ID]"
3
+ description: Execute the task in the plan.
4
4
  ---
5
5
  # Task Execution
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
- argument-hint: [plan-ID] [task-ID]
3
- description: Execute a single task with dependency validation and status management
2
+ argument-hint: "[plan-ID] [task-ID]"
3
+ description: Execute a single task with dependency validation and status management.
4
4
  ---
5
5
  # Single Task Execution
6
6
 
@@ -256,4 +256,4 @@ This command integrates with the existing task management system by:
256
256
  - Maintaining compatibility with execute-blueprint workflows
257
257
  - Preserving task isolation and dependency order
258
258
 
259
- The command complements execute-blueprint by providing granular task control while maintaining the same validation and execution standards.
259
+ The command complements execute-blueprint by providing granular task control while maintaining the same validation and execution standards.
@@ -1,5 +1,5 @@
1
1
  ---
2
- argument-hint: [test-command]
2
+ argument-hint: "[test-command]"
3
3
  description: Fix the tests your task execution broke.
4
4
  ---
5
5
  Fix all failing tests in this repository. Think harder and use tools.
@@ -1,6 +1,6 @@
1
1
  ---
2
- argument-hint: [user-prompt]
3
- description: Execute the full workflow from plan creation to blueprint execution
2
+ argument-hint: "[user-prompt]"
3
+ description: Execute the full workflow from plan creation to blueprint execution.
4
4
  ---
5
5
  # Full Workflow Execution
6
6
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- argument-hint: [plan-ID]
2
+ argument-hint: "[plan-ID]"
3
3
  description: Generate tasks to implement the plan with the provided ID.
4
4
  ---
5
5