@e0ipso/ai-task-manager 1.4.0 → 1.6.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/LICENSE CHANGED
@@ -1,68 +1,21 @@
1
- PROPRIETARY SOFTWARE LICENSE WITH REVOCATION RIGHTS
2
-
3
- Copyright (c) 2025 Mateu Aguiló Bosch
4
-
5
- NOTICE: This is proprietary software with revocable usage rights.
6
-
7
- 1. GRANT OF LICENSE
8
- Subject to the terms and conditions of this License, the copyright holder
9
- hereby grants you a free, non-exclusive, non-transferable, revocable right
10
- to use, run, and operate this software ("Software") for any lawful purpose.
11
-
12
- 2. REVOCATION RIGHTS
13
- The copyright holder reserves the absolute right to revoke this license at
14
- any time, for any reason or no reason, with or without cause, by providing
15
- written notice to you. Such notice may be provided through:
16
- - Direct communication to known users
17
- - Public announcement on the project repository
18
- - Update to this LICENSE file
19
-
20
- 3. NOTICE PERIOD
21
- Upon issuance of a revocation notice, you will have thirty (30) days
22
- ("Notice Period") to cease all use of the Software and remove all copies
23
- from your systems.
24
-
25
- 4. CONDITIONS FOR REVOCATION
26
- While the copyright holder may revoke this license at their sole discretion,
27
- revocation may particularly occur in cases of:
28
- - Violation of applicable laws or regulations
29
- - Use of the Software in a manner harmful to others
30
- - Commercial use without separate commercial license
31
- - Any use deemed inappropriate by the copyright holder
32
-
33
- 5. POST-REVOCATION OBLIGATIONS
34
- After the Notice Period expires, you must:
35
- - Immediately cease all use of the Software
36
- - Delete all copies of the Software from all systems under your control
37
- - Certify destruction of copies if requested by the copyright holder
38
-
39
- 6. NO WARRANTY
40
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
43
-
44
- 7. LIMITATION OF LIABILITY
45
- IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR
46
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
47
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
48
- DEALINGS IN THE SOFTWARE.
49
-
50
- 8. ENTIRE AGREEMENT
51
- This License constitutes the entire agreement between you and the copyright
52
- holder relating to the Software and supersedes all prior or contemporaneous
53
- understandings.
54
-
55
- 9. SEVERABILITY
56
- If any provision of this License is held to be unenforceable, such provision
57
- shall be reformed only to the extent necessary to make it enforceable.
58
-
59
- 10. GOVERNING LAW
60
- This License shall be governed by the laws of the jurisdiction in which
61
- the copyright holder resides, without regard to its conflict of law
62
- provisions.
63
-
64
- By using this Software, you acknowledge that you have read, understood, and
65
- agree to be bound by the terms and conditions of this License.
66
-
67
- For commercial licensing or other arrangements, please contact the copyright
68
- holder directly.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Mateu Aguil� Bosch
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -180,12 +180,4 @@ Review and tweak the `.ai/task-manager/TASK_MANAGER.md` and `.ai/task-manager/co
180
180
 
181
181
  ## 📄 License
182
182
 
183
- ⚖️ **Proprietary Software with Revocation Rights.**
184
-
185
- This software is free to use, run, and operate for any lawful purposes. The
186
- author can revoke the license to use it at any time and by any reason. A license
187
- revocation notice may be provided through:
188
-
189
- - 📧 Direct communication to known users
190
- - 📢 Public announcement on the project repository
191
- - 📝 Update to the LICENSE file
183
+ ⚖️ **Open Source MIT License**
package/dist/index.js CHANGED
@@ -229,49 +229,46 @@ async function getInitInfo(baseDir) {
229
229
  * Display formatted workflow help text to guide users after successful installation
230
230
  */
231
231
  async function displayWorkflowHelp() {
232
- const separator = '═'.repeat(60);
233
- const thinSeparator = ''.repeat(60);
234
- const chalk = await logger.getChalk();
232
+ const width = 60;
233
+ const separator = ''.repeat(width);
234
+ const thinSeparator = '─'.repeat(width);
235
235
  console.log('');
236
236
  console.log(`╔${separator}╗`);
237
- console.log(`║${' '.repeat(18)}🚀 SUGGESTED WORKFLOW 🚀${' '.repeat(18)}║`);
237
+ console.log(`║${' '.repeat(22)}SUGGESTED WORKFLOW${' '.repeat(20)}║`);
238
238
  console.log(`╚${separator}╝`);
239
239
  console.log('');
240
- console.log(`┌─ 📋 ONE-TIME SETUP ${thinSeparator.slice(20)}┐`);
241
- console.log('│ │');
242
- console.log('│ 🔧 Review and tweak these files to match your project: │');
243
- console.log('│ .ai/task-manager/TASK_MANAGER.md │');
244
- console.log('│ • .ai/task-manager/POST_PHASE.md │');
245
- console.log('│ │');
240
+ console.log(`┌─ ONE-TIME SETUP ${thinSeparator.slice(17)}┐`);
241
+ console.log(`│${' '.repeat(width)}│`);
242
+ console.log(`│ Review and tweak AI Task Manager config prompts to match │`);
243
+ console.log(`│ your project:${' '.repeat(45)}│`);
244
+ console.log(`│ • .ai/task-manager/config/${' '.repeat(30)}│`);
245
+ console.log(`│${' '.repeat(width)}│`);
246
246
  console.log(`└${thinSeparator}┘`);
247
247
  console.log('');
248
- console.log(`┌─ 🔄 DAY-TO-DAY WORKFLOW ${thinSeparator.slice(25)}┐`);
249
- console.log('│ │');
250
- console.log('│ 1 Create a plan: │');
251
- const createPlanCmd = chalk?.cyan('/tasks:create-plan Create an authentication...') || '/tasks:create-plan';
252
- console.log(`│ ${createPlanCmd} │`);
253
- console.log('│ │');
254
- console.log('│ 2 Provide additional context if the assistant needs it │');
255
- console.log('│ │');
256
- console.log("│ 3 ⚠️ MANUALLY REVIEW THE PLAN (don't skip this!) │");
257
- console.log('│ 📂 Find it in: .ai/task-manager/plans/01--*/plan-*.md │');
258
- console.log('│ │');
259
- console.log('│ 4 Create the tasks for the plan: │');
260
- const generateTasksCmd = chalk?.magenta('/tasks:generate-tasks 1') || '/tasks:generate-tasks';
261
- console.log(`│ ${generateTasksCmd} │`);
262
- console.log('│ │');
263
- console.log('│ 5 ⚠️ REVIEW THE TASKS LIST (avoid scope creep!) │');
264
- console.log('│ 📁 Find them in: .ai/task-manager/plans/01--*/tasks/ │');
265
- console.log('│ │');
266
- console.log('│ 6 Execute the tasks: │');
267
- const executeCmd = chalk?.green('/tasks:execute-blueprint 1') || '/tasks:execute-blueprint';
268
- console.log(`│ ${executeCmd} │`);
269
- console.log('│ │');
270
- console.log('│ 7 🧪 Review the implementation and generated tests │');
271
- console.log('│ │');
248
+ console.log(`┌─ DAY-TO-DAY WORKFLOW ${thinSeparator.slice(22)}┐`);
249
+ console.log(`│${' '.repeat(width)}│`);
250
+ console.log(`│ 1) Create a plan:${' '.repeat(41)}│`);
251
+ console.log(`│ /tasks:create-plan Create an authentication...${' '.repeat(8)}│`);
252
+ console.log(`│${' '.repeat(width)}│`);
253
+ console.log(`│ 2) Provide additional context if the assistant needs it${' '.repeat(3)}│`);
254
+ console.log(`│${' '.repeat(width)}│`);
255
+ console.log(`│ 3) MANUALLY REVIEW THE PLAN (don't skip this!)${' '.repeat(12)}│`);
256
+ console.log(`│ Find it in: .ai/task-manager/plans/01--*/plan-*.md${' '.repeat(4)}│`);
257
+ console.log(`│${' '.repeat(width)}│`);
258
+ console.log(`│ 4) Create the tasks for the plan:${' '.repeat(25)}│`);
259
+ console.log(`│ /tasks:generate-tasks 1${' '.repeat(31)}│`);
260
+ console.log(`│${' '.repeat(width)}│`);
261
+ console.log(`│ 5) REVIEW THE TASKS LIST (avoid scope creep!)${' '.repeat(13)}│`);
262
+ console.log(`│ Find them in: .ai/task-manager/plans/01--*/tasks/${' '.repeat(5)}│`);
263
+ console.log(`│${' '.repeat(width)}│`);
264
+ console.log(`│ 6) Execute the tasks:${' '.repeat(37)}│`);
265
+ console.log(`│ /tasks:execute-blueprint 1${' '.repeat(28)}│`);
266
+ console.log(`│${' '.repeat(width)}│`);
267
+ console.log(`│ 7) Review the implementation and generated tests${' '.repeat(10)}│`);
268
+ console.log(`│${' '.repeat(width)}│`);
272
269
  console.log(`└${thinSeparator}┘`);
273
270
  console.log('');
274
- console.log('💡 Pro tip: The manual review steps are crucial for success!');
271
+ console.log('Pro tip: The manual review steps are crucial for success!');
275
272
  console.log('');
276
273
  }
277
274
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDH,oBA0EC;AA6ED,sCAGC;AAKD,kCAyBC;AA3OD,6CAA+B;AAC/B,2CAA6B;AAE7B,iDAAmC;AACnC,mCAMiB;AAEjB;;GAEG;AACH,SAAS,eAAe,CAAC,YAAoB;IAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,OAA2B,EAAE,GAAG,QAAkB;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CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,sDAAsD,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACrF,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,IAAI,aAAa,GAAG,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,2DAA2D,CAAC,CAAC;IACzE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e0ipso/ai-task-manager",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "Task management for AI coding assistants",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -0,0 +1,332 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Script: check-task-dependencies.js
5
+ * Purpose: Check if a task has all of its dependencies resolved (completed)
6
+ * Usage: node check-task-dependencies.js <plan-id> <task-id>
7
+ * Returns: 0 if all dependencies are resolved, 1 if not
8
+ */
9
+
10
+ const fs = require('fs-extra');
11
+ const path = require('path');
12
+ const { execSync } = require('child_process');
13
+
14
+ // Chalk instance - loaded dynamically to handle ESM module
15
+ let chalkInstance = null;
16
+
17
+ // Initialize chalk instance dynamically
18
+ async function initChalk() {
19
+ if (chalkInstance) return chalkInstance;
20
+
21
+ try {
22
+ const { default: chalk } = await import('chalk');
23
+ chalkInstance = chalk;
24
+ } catch (_error) {
25
+ // Chalk not available, will fall back to plain console output
26
+ chalkInstance = null;
27
+ }
28
+
29
+ return chalkInstance;
30
+ }
31
+
32
+ // Color functions for output
33
+ const printError = (message, chalk) => {
34
+ const formattedMessage = chalk?.red(`ERROR: ${message}`) || `ERROR: ${message}`;
35
+ console.error(formattedMessage);
36
+ };
37
+
38
+ const printSuccess = (message, chalk) => {
39
+ const formattedMessage = chalk?.green(`✓ ${message}`) || `✓ ${message}`;
40
+ console.log(formattedMessage);
41
+ };
42
+
43
+ const printWarning = (message, chalk) => {
44
+ const formattedMessage = chalk?.yellow(`⚠ ${message}`) || `⚠ ${message}`;
45
+ console.log(formattedMessage);
46
+ };
47
+
48
+ const printInfo = (message) => {
49
+ console.log(message);
50
+ };
51
+
52
+ // Function to find plan directory
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;
62
+ }
63
+ };
64
+
65
+ // Function to find task file with padded/unpadded ID handling
66
+ const findTaskFile = (planDir, taskId) => {
67
+ const taskDir = path.join(planDir, 'tasks');
68
+
69
+ if (!fs.existsSync(taskDir)) {
70
+ return null;
71
+ }
72
+
73
+ // Try exact match first
74
+ let pattern = `${taskId}--*.md`;
75
+ let files = fs.readdirSync(taskDir).filter(file => {
76
+ const regex = new RegExp(`^${taskId}--.*\\.md$`);
77
+ return regex.test(file);
78
+ });
79
+
80
+ if (files.length > 0) {
81
+ return path.join(taskDir, files[0]);
82
+ }
83
+
84
+ // Try with zero-padding if direct match fails
85
+ const paddedTaskId = taskId.padStart(2, '0');
86
+ if (paddedTaskId !== taskId) {
87
+ pattern = `${paddedTaskId}--*.md`;
88
+ files = fs.readdirSync(taskDir).filter(file => {
89
+ const regex = new RegExp(`^${paddedTaskId}--.*\\.md$`);
90
+ return regex.test(file);
91
+ });
92
+
93
+ if (files.length > 0) {
94
+ return path.join(taskDir, files[0]);
95
+ }
96
+ }
97
+
98
+ // Try removing potential zero-padding from taskId
99
+ const unpaddedTaskId = taskId.replace(/^0+/, '') || '0';
100
+ if (unpaddedTaskId !== taskId) {
101
+ pattern = `${unpaddedTaskId}--*.md`;
102
+ files = fs.readdirSync(taskDir).filter(file => {
103
+ const regex = new RegExp(`^${unpaddedTaskId}--.*\\.md$`);
104
+ return regex.test(file);
105
+ });
106
+
107
+ if (files.length > 0) {
108
+ return path.join(taskDir, files[0]);
109
+ }
110
+
111
+ // Try with zero-padding of unpadded version
112
+ const repaddedTaskId = unpaddedTaskId.padStart(2, '0');
113
+ pattern = `${repaddedTaskId}--*.md`;
114
+ files = fs.readdirSync(taskDir).filter(file => {
115
+ const regex = new RegExp(`^${repaddedTaskId}--.*\\.md$`);
116
+ return regex.test(file);
117
+ });
118
+
119
+ if (files.length > 0) {
120
+ return path.join(taskDir, files[0]);
121
+ }
122
+ }
123
+
124
+ return null;
125
+ };
126
+
127
+ // Function to parse YAML frontmatter
128
+ const parseFrontmatter = (content) => {
129
+ const lines = content.split('\n');
130
+ let inFrontmatter = false;
131
+ let frontmatterEnd = false;
132
+ let delimiterCount = 0;
133
+ const frontmatterLines = [];
134
+
135
+ for (const line of lines) {
136
+ if (line.trim() === '---') {
137
+ delimiterCount++;
138
+ if (delimiterCount === 1) {
139
+ inFrontmatter = true;
140
+ continue;
141
+ } else if (delimiterCount === 2) {
142
+ frontmatterEnd = true;
143
+ break;
144
+ }
145
+ }
146
+
147
+ if (inFrontmatter && !frontmatterEnd) {
148
+ frontmatterLines.push(line);
149
+ }
150
+ }
151
+
152
+ return frontmatterLines.join('\n');
153
+ };
154
+
155
+ // Function to extract dependencies from frontmatter
156
+ const extractDependencies = (frontmatter) => {
157
+ const lines = frontmatter.split('\n');
158
+ const dependencies = [];
159
+ let inDependenciesSection = false;
160
+
161
+ for (let i = 0; i < lines.length; i++) {
162
+ const line = lines[i];
163
+
164
+ // Check for dependencies line
165
+ if (line.match(/^dependencies:/)) {
166
+ inDependenciesSection = true;
167
+
168
+ // Check if dependencies are on the same line (array syntax)
169
+ const arrayMatch = line.match(/\[(.*)\]/);
170
+ if (arrayMatch) {
171
+ const deps = arrayMatch[1]
172
+ .split(',')
173
+ .map(dep => dep.trim().replace(/['"]/g, ''))
174
+ .filter(dep => dep.length > 0);
175
+ dependencies.push(...deps);
176
+ inDependenciesSection = false;
177
+ }
178
+ continue;
179
+ }
180
+
181
+ // If we're in dependencies section and hit a non-indented line that's not a list item, exit
182
+ if (inDependenciesSection && line.match(/^[^ ]/) && !line.match(/^[ \t]*-/)) {
183
+ inDependenciesSection = false;
184
+ }
185
+
186
+ // Parse list format dependencies
187
+ if (inDependenciesSection && line.match(/^[ \t]*-/)) {
188
+ const dep = line.replace(/^[ \t]*-[ \t]*/, '').replace(/[ \t]*$/, '').replace(/['"]/g, '');
189
+ if (dep.length > 0) {
190
+ dependencies.push(dep);
191
+ }
192
+ }
193
+ }
194
+
195
+ return dependencies;
196
+ };
197
+
198
+ // Function to extract status from frontmatter
199
+ const extractStatus = (frontmatter) => {
200
+ const lines = frontmatter.split('\n');
201
+
202
+ for (const line of lines) {
203
+ if (line.match(/^status:/)) {
204
+ return line.replace(/^status:[ \t]*/, '').replace(/^["']/, '').replace(/["']$/, '').trim();
205
+ }
206
+ }
207
+
208
+ return null;
209
+ };
210
+
211
+ // Main function
212
+ const main = async () => {
213
+ // Initialize chalk
214
+ const chalk = await initChalk();
215
+
216
+ // Check arguments
217
+ if (process.argv.length !== 4) {
218
+ printError('Invalid number of arguments', chalk);
219
+ console.log('Usage: node check-task-dependencies.js <plan-id> <task-id>');
220
+ console.log('Example: node check-task-dependencies.js 16 03');
221
+ process.exit(1);
222
+ }
223
+
224
+ const planId = process.argv[2];
225
+ const taskId = process.argv[3];
226
+
227
+ // Find the plan directory
228
+ const planDir = findPlanDirectory(planId);
229
+
230
+ if (!planDir) {
231
+ printError(`Plan with ID ${planId} not found`, chalk);
232
+ process.exit(1);
233
+ }
234
+
235
+ printInfo(`Found plan directory: ${planDir}`);
236
+
237
+ // Find task file
238
+ const taskFile = findTaskFile(planDir, taskId);
239
+
240
+ if (!taskFile || !fs.existsSync(taskFile)) {
241
+ printError(`Task with ID ${taskId} not found in plan ${planId}`, chalk);
242
+ process.exit(1);
243
+ }
244
+
245
+ printInfo(`Checking task: ${path.basename(taskFile)}`);
246
+ console.log('');
247
+
248
+ // Read and parse task file
249
+ const taskContent = fs.readFileSync(taskFile, 'utf8');
250
+ const frontmatter = parseFrontmatter(taskContent);
251
+ const dependencies = extractDependencies(frontmatter);
252
+
253
+ // Check if there are any dependencies
254
+ if (dependencies.length === 0) {
255
+ printSuccess('Task has no dependencies - ready to execute!', chalk);
256
+ process.exit(0);
257
+ }
258
+
259
+ // Display dependencies
260
+ printInfo('Task dependencies found:');
261
+ dependencies.forEach(dep => {
262
+ console.log(` - Task ${dep}`);
263
+ });
264
+ console.log('');
265
+
266
+ // Check each dependency
267
+ let allResolved = true;
268
+ let unresolvedDeps = [];
269
+ let resolvedCount = 0;
270
+ const totalDeps = dependencies.length;
271
+
272
+ printInfo('Checking dependency status...');
273
+ console.log('');
274
+
275
+ for (const depId of dependencies) {
276
+ // Find dependency task file
277
+ const depFile = findTaskFile(planDir, depId);
278
+
279
+ if (!depFile || !fs.existsSync(depFile)) {
280
+ printError(`Dependency task ${depId} not found`, chalk);
281
+ allResolved = false;
282
+ unresolvedDeps.push(`${depId} (not found)`);
283
+ continue;
284
+ }
285
+
286
+ // Extract status from dependency task
287
+ const depContent = fs.readFileSync(depFile, 'utf8');
288
+ const depFrontmatter = parseFrontmatter(depContent);
289
+ const status = extractStatus(depFrontmatter);
290
+
291
+ // Check if status is completed
292
+ if (status === 'completed') {
293
+ printSuccess(`Task ${depId} - Status: completed ✓`, chalk);
294
+ resolvedCount++;
295
+ } else {
296
+ printWarning(`Task ${depId} - Status: ${status || 'unknown'} ✗`, chalk);
297
+ allResolved = false;
298
+ unresolvedDeps.push(`${depId} (${status || 'unknown'})`);
299
+ }
300
+ }
301
+
302
+ console.log('');
303
+ printInfo('=========================================');
304
+ printInfo('Dependency Check Summary');
305
+ printInfo('=========================================');
306
+ printInfo(`Total dependencies: ${totalDeps}`);
307
+ printInfo(`Resolved: ${resolvedCount}`);
308
+ printInfo(`Unresolved: ${totalDeps - resolvedCount}`);
309
+ console.log('');
310
+
311
+ if (allResolved) {
312
+ printSuccess(`All dependencies are resolved! Task ${taskId} is ready to execute.`, chalk);
313
+ process.exit(0);
314
+ } else {
315
+ printError(`Task ${taskId} has unresolved dependencies:`, chalk);
316
+ unresolvedDeps.forEach(dep => {
317
+ console.log(dep);
318
+ });
319
+ printInfo('Please complete the dependencies before executing this task.');
320
+ process.exit(1);
321
+ }
322
+ };
323
+
324
+ // Run the script
325
+ if (require.main === module) {
326
+ main().catch((error) => {
327
+ console.error('Script execution failed:', error);
328
+ process.exit(1);
329
+ });
330
+ }
331
+
332
+ module.exports = { main };
@@ -20,6 +20,15 @@ If no user input is provided stop immediately and show an error message to the u
20
20
 
21
21
  ### Process
22
22
 
23
+ Use your internal Todo task tool to track the plan generation. Example:
24
+
25
+ - [ ] User input and context analysis
26
+ - [ ] Clarification questions
27
+ - [ ] Plan generation: Executive Summary
28
+ - [ ] Plan generation: Detailed Steps
29
+ - [ ] Plan generation: Risk Considerations
30
+ - [ ] Plan generation: Success Metrics
31
+
23
32
  #### Step 1: Context Analysis
24
33
  Before creating any plan, analyze the user's request for:
25
34
  - **Objective**: What is the end goal?
@@ -35,15 +44,17 @@ If any critical context is missing:
35
44
  2. Ask targeted follow-up questions grouped by category
36
45
  3. Wait for user responses before proceeding to planning
37
46
  4. Frame questions clearly with examples when helpful
38
- 5. Be extra cautious. Users miss important context very often. Extract it from them
47
+ 5. Be extra cautious. Users miss important context very often. Don't hesitate to ask for clarifications.
39
48
 
40
49
  Example clarifying questions:
41
- - "What is your primary goal with [specific aspect]?"
42
- - "Do you have any existing [resources/code/infrastructure] I should consider?"
43
- - "What is your timeline for completing this?"
44
- - "Are there specific constraints I should account for?"
45
- - "Do you want me to write tests for this?"
46
- - "Are there other systems, projects, or modules that perform a similar task?"
50
+ - "Q: What is your primary goal with [specific aspect]?"
51
+ - "Q: Do you have any existing [resources/code/infrastructure] I should consider?"
52
+ - "Q: What is your timeline for completing this?"
53
+ - "Q: Are there specific constraints I should account for?"
54
+ - "Q: Do you want me to write tests for this?"
55
+ - "Q: Are there other systems, projects, or modules that perform a similar task?"
56
+
57
+ Try to answer your own questions first by inspecting the codebase, docs, and assistant documents like CLAUDE.md, GEMINI.md, AGENTS.md ...
47
58
 
48
59
  #### Step 3: Plan Generation
49
60
  Only after confirming sufficient context, create a plan that includes:
@@ -54,14 +65,7 @@ Only after confirming sufficient context, create a plan that includes:
54
65
 
55
66
  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.
56
67
 
57
- ### Important Notes
58
- - Never generate a partial or assumed plan without adequate context
59
- - Prioritize accuracy over speed
60
- - Consider both technical and non-technical aspects
61
- - Adapt the plan format based on the task type (development, design, research, etc.)
62
- - DO NOT create or list any tasks or phases during the plan creation. This will be done in a later step. Stick to writing the PRD (Project Requirements Document).
63
-
64
- ### Scope Control Guidelines
68
+ ##### Scope Control Guidelines
65
69
  **Critical: Implement ONLY what is explicitly requested**
66
70
 
67
71
  - **Minimal Viable Implementation**: Build exactly what the user asked for, nothing more
@@ -79,7 +83,7 @@ Remember that a plan needs to be reviewed by a human. Be concise and to the poin
79
83
 
80
84
  **When in doubt, ask**: "Is this feature explicitly mentioned in the user's request?"
81
85
 
82
- ### Simplicity Principles
86
+ ##### Simplicity Principles
83
87
  **Favor maintainability over cleverness**
84
88
 
85
89
  - **Simple Solutions First**: Choose the most straightforward approach that meets requirements
@@ -91,23 +95,23 @@ Remember that a plan needs to be reviewed by a human. Be concise and to the poin
91
95
 
92
96
  **Remember**: A working simple solution is better than a complex "perfect" one.
93
97
 
94
- ### Output Format
98
+ ##### Output Format
95
99
  Structure your response as follows:
96
100
  - If context is insufficient: List specific clarifying questions
97
101
  - 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.
98
102
 
99
103
  Outside the plan document, be **extremely** concise. Just tell the user that you are done, and instruct them to review the plan document.
100
104
 
101
- #### Plan Template
105
+ ###### Plan Template
102
106
 
103
107
  Use the template in @.ai/task-manager/config/templates/PLAN_TEMPLATE.md
104
108
 
105
- #### Patterns to Avoid
109
+ ###### Patterns to Avoid
106
110
  Do not include the following in your plan output.
107
111
  - Avoid time estimations
108
112
  - Avoid task lists and mentions of phases (those are things we'll introduce later)
109
113
 
110
- #### Frontmatter Structure
114
+ ###### Frontmatter Structure
111
115
 
112
116
  Example:
113
117
  ```yaml
@@ -142,6 +146,13 @@ The schema for this frontmatter is:
142
146
  }
143
147
  ```
144
148
 
149
+ ### Critical Notes
150
+ - Never generate a partial or assumed plan without adequate context
151
+ - Prioritize accuracy over speed
152
+ - Consider both technical and non-technical aspects
153
+ - Use the plan template in .ai/task-manager/config/templates/PLAN_TEMPLATE.md
154
+ - DO NOT create or list any tasks or phases during the plan creation. This will be done in a later step. Stick to writing the PRD (Project Requirements Document).
155
+
145
156
  ### Plan ID Generation
146
157
 
147
158
  **Auto-generate the next plan ID:**
@@ -24,10 +24,23 @@ If the plan does not exist, or the plan does not have an execution blueprint sec
24
24
 
25
25
  ## Execution Process
26
26
 
27
+ Use your internal Todo task tool to track the execution of all phases, and the final update of the plan with the summary. Example:
28
+
29
+ - [ ] Create feature branch from the main branch.
30
+ - [ ] Phase 1: Execute 1 task(s) in parallel.
31
+ - [ ] Execute POST_PHASE.md hook after Phase 1.
32
+ - [ ] Phase 2: Execute 3 task(s) in parallel.
33
+ - [ ] Execute POST_PHASE.md hook after Phase 2.
34
+ - [ ] Phase 3: Execute 1 task(s) in parallel.
35
+ - [ ] Execute POST_PHASE.md hook after Phase 3.
36
+ - [ ] Update the Plan 7 with execution summary, and the archive it.
37
+
27
38
  ### Phase Pre-Execution
28
39
 
29
40
  Before starting execution check if you are in the `main` branch. If so, create a git branch to work on this blueprint use the plan name for the branch name.
30
41
 
42
+ If there are unstaged changes in the `main` branch, do not create a feature branch.
43
+
31
44
  ### Phase Execution Workflow
32
45
 
33
46
  1. **Phase Initialization**
@@ -37,7 +50,7 @@ Before starting execution check if you are in the `main` branch. If so, create a
37
50
  ```bash
38
51
  # For each task in current phase
39
52
  for TASK_ID in $PHASE_TASKS; do
40
- if ! @templates/ai-task-manager/config/scripts/check-task-dependencies.sh "$1" "$TASK_ID"; then
53
+ if ! node .ai/task-manager/config/scripts/check-task-dependencies.js "$1" "$TASK_ID"; then
41
54
  echo "ERROR: Task $TASK_ID has unresolved dependencies - cannot proceed with phase execution"
42
55
  echo "Please resolve dependencies before continuing with blueprint execution"
43
56
  exit 1
@@ -6,6 +6,15 @@ 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
+ 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:
10
+
11
+ - [ ] Validate task: file, status, and dependencies.
12
+ - [ ] Select the most appropriate sub-agent.
13
+ - [ ] Set task status to in-progress.
14
+ - [ ] Delegate task implementation to the sub-agent.
15
+ - [ ] Update task status to completed or failed.
16
+ - [ ] Update the task file with noteworthy events during execution.
17
+
9
18
  ## Critical Rules
10
19
 
11
20
  1. **Never skip dependency validation** - Task execution requires all dependencies to be completed
@@ -18,7 +27,7 @@ You are responsible for executing a single task within a plan while maintaining
18
27
  - Plan ID: $1 (required)
19
28
  - Task ID: $2 (required)
20
29
  - Task management directory structure: `@.ai/task-manager/`
21
- - Dependency checking script: `@templates/ai-task-manager/config/scripts/check-task-dependencies.sh`
30
+ - Dependency checking script: `.ai/task-manager/config/scripts/check-task-dependencies.js`
22
31
 
23
32
  ### Input Validation
24
33
 
@@ -125,7 +134,7 @@ Use the dependency checking script to validate all dependencies:
125
134
 
126
135
  ```bash
127
136
  # Call the dependency checking script
128
- if ! @templates/ai-task-manager/config/scripts/check-task-dependencies.sh "$PLAN_ID" "$TASK_ID"; then
137
+ if ! node .ai/task-manager/config/scripts/check-task-dependencies.js "$PLAN_ID" "$TASK_ID"; then
129
138
  echo ""
130
139
  echo "Task execution blocked by unresolved dependencies."
131
140
  echo "Please complete the required dependencies first."
@@ -1,185 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Script: check-task-dependencies.sh
4
- # Purpose: Check if a task has all of its dependencies resolved (completed)
5
- # Usage: ./check-task-dependencies.sh <plan-id> <task-id>
6
- # Returns: 0 if all dependencies are resolved, 1 if not
7
-
8
- set -e
9
-
10
- # Color codes for output
11
- RED='\033[0;31m'
12
- GREEN='\033[0;32m'
13
- YELLOW='\033[1;33m'
14
- NC='\033[0m' # No Color
15
-
16
- # Function to print colored output
17
- print_error() {
18
- echo -e "${RED}ERROR: $1${NC}" >&2
19
- }
20
-
21
- print_success() {
22
- echo -e "${GREEN}✓ $1${NC}"
23
- }
24
-
25
- print_warning() {
26
- echo -e "${YELLOW}⚠ $1${NC}"
27
- }
28
-
29
- print_info() {
30
- echo -e "$1"
31
- }
32
-
33
- # Check arguments
34
- if [ $# -ne 2 ]; then
35
- print_error "Invalid number of arguments"
36
- echo "Usage: $0 <plan-id> <task-id>"
37
- echo "Example: $0 16 03"
38
- exit 1
39
- fi
40
-
41
- PLAN_ID="$1"
42
- TASK_ID="$2"
43
-
44
- # Find the plan directory
45
- PLAN_DIR=$(find .ai/task-manager/{plans,archive} -type d -name "${PLAN_ID}--*" 2>/dev/null | head -1)
46
-
47
- if [ -z "$PLAN_DIR" ]; then
48
- print_error "Plan with ID ${PLAN_ID} not found"
49
- exit 1
50
- fi
51
-
52
- print_info "Found plan directory: ${PLAN_DIR}"
53
-
54
- # Construct task file path
55
- # Handle both padded (01, 02) and unpadded (1, 2) task IDs
56
- TASK_FILE=""
57
- if [ -f "${PLAN_DIR}/tasks/${TASK_ID}--"*.md ]; then
58
- TASK_FILE=$(ls "${PLAN_DIR}/tasks/${TASK_ID}--"*.md 2>/dev/null | head -1)
59
- elif [ -f "${PLAN_DIR}/tasks/0${TASK_ID}--"*.md ]; then
60
- # Try with zero-padding if direct match fails
61
- TASK_FILE=$(ls "${PLAN_DIR}/tasks/0${TASK_ID}--"*.md 2>/dev/null | head -1)
62
- fi
63
-
64
- if [ -z "$TASK_FILE" ] || [ ! -f "$TASK_FILE" ]; then
65
- print_error "Task with ID ${TASK_ID} not found in plan ${PLAN_ID}"
66
- exit 1
67
- fi
68
-
69
- print_info "Checking task: $(basename "$TASK_FILE")"
70
- echo ""
71
-
72
- # Extract dependencies from task frontmatter
73
- # Using awk to parse YAML frontmatter
74
- DEPENDENCIES=$(awk '
75
- /^---$/ { if (++delim == 2) exit }
76
- /^dependencies:/ {
77
- dep_section = 1
78
- # Check if dependencies are on the same line
79
- if (match($0, /\[.*\]/)) {
80
- gsub(/^dependencies:[ \t]*\[/, "")
81
- gsub(/\].*$/, "")
82
- gsub(/[ \t]/, "")
83
- print
84
- dep_section = 0
85
- }
86
- next
87
- }
88
- dep_section && /^[^ ]/ { dep_section = 0 }
89
- dep_section && /^[ \t]*-/ {
90
- gsub(/^[ \t]*-[ \t]*/, "")
91
- gsub(/[ \t]*$/, "")
92
- print
93
- }
94
- ' "$TASK_FILE" | tr ',' '\n' | sed 's/^[ \t]*//;s/[ \t]*$//' | grep -v '^$')
95
-
96
- # Check if there are any dependencies
97
- if [ -z "$DEPENDENCIES" ]; then
98
- print_success "Task has no dependencies - ready to execute!"
99
- exit 0
100
- fi
101
-
102
- # Display dependencies
103
- print_info "Task dependencies found:"
104
- echo "$DEPENDENCIES" | while read -r dep; do
105
- echo " - Task ${dep}"
106
- done
107
- echo ""
108
-
109
- # Check each dependency
110
- ALL_RESOLVED=true
111
- UNRESOLVED_DEPS=""
112
- RESOLVED_COUNT=0
113
- TOTAL_DEPS=$(echo "$DEPENDENCIES" | wc -l)
114
-
115
- print_info "Checking dependency status..."
116
- echo ""
117
-
118
- for DEP_ID in $DEPENDENCIES; do
119
- # Find dependency task file
120
- DEP_FILE=""
121
-
122
- # Try exact match first
123
- if [ -f "${PLAN_DIR}/tasks/${DEP_ID}--"*.md ]; then
124
- DEP_FILE=$(ls "${PLAN_DIR}/tasks/${DEP_ID}--"*.md 2>/dev/null | head -1)
125
- elif [ -f "${PLAN_DIR}/tasks/0${DEP_ID}--"*.md ]; then
126
- # Try with zero-padding
127
- DEP_FILE=$(ls "${PLAN_DIR}/tasks/0${DEP_ID}--"*.md 2>/dev/null | head -1)
128
- else
129
- # Try removing potential zero-padding from DEP_ID
130
- UNPADDED_DEP=$(echo "$DEP_ID" | sed 's/^0*//')
131
- if [ -f "${PLAN_DIR}/tasks/${UNPADDED_DEP}--"*.md ]; then
132
- DEP_FILE=$(ls "${PLAN_DIR}/tasks/${UNPADDED_DEP}--"*.md 2>/dev/null | head -1)
133
- elif [ -f "${PLAN_DIR}/tasks/0${UNPADDED_DEP}--"*.md ]; then
134
- DEP_FILE=$(ls "${PLAN_DIR}/tasks/0${UNPADDED_DEP}--"*.md 2>/dev/null | head -1)
135
- fi
136
- fi
137
-
138
- if [ -z "$DEP_FILE" ] || [ ! -f "$DEP_FILE" ]; then
139
- print_error "Dependency task ${DEP_ID} not found"
140
- ALL_RESOLVED=false
141
- UNRESOLVED_DEPS="${UNRESOLVED_DEPS}${DEP_ID} (not found)\n"
142
- continue
143
- fi
144
-
145
- # Extract status from dependency task
146
- STATUS=$(awk '
147
- /^---$/ { if (++delim == 2) exit }
148
- /^status:/ {
149
- gsub(/^status:[ \t]*/, "")
150
- gsub(/^["'\'']/, "")
151
- gsub(/["'\'']$/, "")
152
- print
153
- exit
154
- }
155
- ' "$DEP_FILE")
156
-
157
- # Check if status is completed
158
- if [ "$STATUS" = "completed" ]; then
159
- print_success "Task ${DEP_ID} - Status: completed ✓"
160
- ((RESOLVED_COUNT++))
161
- else
162
- print_warning "Task ${DEP_ID} - Status: ${STATUS:-unknown} ✗"
163
- ALL_RESOLVED=false
164
- UNRESOLVED_DEPS="${UNRESOLVED_DEPS}${DEP_ID} (${STATUS:-unknown})\n"
165
- fi
166
- done
167
-
168
- echo ""
169
- print_info "========================================="
170
- print_info "Dependency Check Summary"
171
- print_info "========================================="
172
- print_info "Total dependencies: ${TOTAL_DEPS}"
173
- print_info "Resolved: ${RESOLVED_COUNT}"
174
- print_info "Unresolved: $((TOTAL_DEPS - RESOLVED_COUNT))"
175
- echo ""
176
-
177
- if [ "$ALL_RESOLVED" = true ]; then
178
- print_success "All dependencies are resolved! Task ${TASK_ID} is ready to execute."
179
- exit 0
180
- else
181
- print_error "Task ${TASK_ID} has unresolved dependencies:"
182
- echo -e "$UNRESOLVED_DEPS"
183
- print_info "Please complete the dependencies before executing this task."
184
- exit 1
185
- fi