@e0ipso/ai-task-manager 1.0.1

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.
@@ -0,0 +1,466 @@
1
+ ---
2
+ argument-hint: [plan-ID]
3
+ description: Generate tasks to implement the plan with the provided ID.
4
+ ---
5
+ # Comprehensive Task List Creation
6
+ 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.
7
+
8
+ Include @.ai/task-manager/TASK_MANAGER_INFO.md for the directory structure of tasks.
9
+
10
+ ## Instructions
11
+
12
+ You will think hard to analyze the provided plan document and decompose it into atomic, actionable tasks with clear dependencies and groupings.
13
+
14
+ ### Input
15
+ - A plan document. See @.ai/task-manager/TASK_MANAGER_INFO.md fo find the plan with ID $1
16
+ - The plan contains high-level objectives and implementation steps
17
+
18
+ ### Input Error Handling
19
+ If the plan does not exist. Stop immediately and show an error to the user.
20
+
21
+ ### Task Creation Guidelines
22
+
23
+ #### Task Minimization Principles
24
+ **Core Constraint:** Create only the minimum number of tasks necessary to satisfy the plan requirements. Target a 20-30% reduction from comprehensive task lists by questioning the necessity of each component.
25
+
26
+ **Minimization Rules:**
27
+ - **Direct Implementation Only**: Create tasks for explicitly stated requirements, not "nice-to-have" features
28
+ - **DRY Task Principle**: Each task should have a unique, non-overlapping purpose
29
+ - **Question Everything**: For each task, ask "Is this absolutely necessary to meet the plan objectives?"
30
+ - **Avoid Gold-plating**: Resist the urge to add comprehensive features not explicitly required
31
+
32
+ **Anti-patterns to Avoid:**
33
+ - Creating separate tasks for "error handling" when it can be included in the main implementation
34
+ - Breaking simple operations into multiple tasks (e.g., separate "validate input" and "process input" tasks)
35
+ - Adding tasks for "future extensibility" or "best practices" not mentioned in the plan
36
+ - Creating comprehensive test suites for trivial functionality
37
+
38
+ #### Task Granularity
39
+ Each task must be:
40
+ - **Single-purpose**: One clear deliverable or outcome
41
+ - **Atomic**: Cannot be meaningfully split further
42
+ - **Skill-specific**: Executable by a single skill agent (examples below)
43
+ - **Time-bounded**: Completable in a reasonable timeframe by a skilled developer
44
+ - **Verifiable**: Has clear completion criteria
45
+
46
+ #### Skill Selection and Technical Requirements
47
+
48
+ **Core Principle**: Each task should require 1-2 specific technical skills that can be handled by specialized agents. Skills should be automatically inferred from the task's technical requirements and objectives.
49
+
50
+ **Skill Selection Criteria**:
51
+ 1. **Technical Specificity**: Choose skills that directly match the technical work required
52
+ 2. **Agent Specialization**: Select skills that allow a single skilled agent to complete the task
53
+ 3. **Minimal Overlap**: Avoid combining unrelated skill domains in a single task
54
+ 4. **Creative Inference**: Derive skills from task objectives and implementation context
55
+
56
+ **Inspirational Skill Examples** (use kebab-case format):
57
+ - Frontend: `react-components`, `css`, `js`, `vue-components`, `html`
58
+ - Backend: `api-endpoints`, `database`, `authentication`, `server-config`
59
+ - Testing: `jest`, `playwright`, `unit-testing`, `e2e-testing`
60
+ - DevOps: `docker`, `github-actions`, `deployment`, `ci-cd`
61
+ - Languages: `typescript`, `python`, `php`, `bash`, `sql`
62
+ - Frameworks: `nextjs`, `express`, `drupal-backend`, `wordpress-plugins`
63
+
64
+ **Automatic Skill Inference Examples**:
65
+ - "Create user login form" → `["react-components", "authentication"]`
66
+ - "Build REST API for orders" → `["api-endpoints", "database"]`
67
+ - "Add Docker deployment" → `["docker", "deployment"]`
68
+ - "Write Jest tests for utils" → `["jest"]`
69
+
70
+ **Assignment Guidelines**:
71
+ - **1 skill**: Focused, single-domain tasks
72
+ - **2 skills**: Tasks requiring complementary domains
73
+ - **Split if 3+**: Indicates task should be broken down
74
+
75
+ ```yaml
76
+ # Examples
77
+ skills: ["css"] # Pure styling
78
+ skills: ["api-endpoints", "database"] # API with persistence
79
+ skills: ["react-components", "jest"] # Implementation + testing
80
+ ```
81
+
82
+ #### Meaningful Test Strategy Guidelines
83
+
84
+ **Definition of "Meaningful Tests":**
85
+ Tests that verify custom business logic, critical paths, and edge cases specific to the application. Focus on testing YOUR code, not the framework or library functionality.
86
+
87
+ **When TO Write Tests:**
88
+ - Custom business logic and algorithms
89
+ - Critical user workflows and data transformations
90
+ - Edge cases and error conditions for core functionality
91
+ - Integration points between different system components
92
+ - Complex validation logic or calculations
93
+
94
+ **When NOT to Write Tests:**
95
+ - Third-party library functionality (already tested upstream)
96
+ - Framework features (React hooks, Express middleware, etc.)
97
+ - Simple CRUD operations without custom logic
98
+ - Getter/setter methods or basic property access
99
+ - Configuration files or static data
100
+ - Obvious functionality that would break immediately if incorrect
101
+
102
+ **Testing Anti-patterns to Avoid:**
103
+ ```javascript
104
+ // DON'T: Testing library functionality
105
+ test('useState updates state', () => {
106
+ // This tests React, not your code
107
+ });
108
+
109
+ // DON'T: Testing trivial getters
110
+ test('getName returns name property', () => {
111
+ expect(user.getName()).toBe(user.name);
112
+ });
113
+
114
+ // DON'T: Comprehensive test suites for simple functions
115
+ test('add function with 15 different number combinations', () => {
116
+ // Overkill for a simple addition function
117
+ });
118
+ ```
119
+
120
+ **Testing Positive Patterns:**
121
+ ```javascript
122
+ // DO: Test business logic
123
+ test('calculateOrderTotal applies correct discounts and tax', () => {
124
+ // Tests your specific calculation logic
125
+ });
126
+
127
+ // DO: Test critical paths
128
+ test('payment processing handles failed transactions', () => {
129
+ // Tests important error handling
130
+ });
131
+
132
+ // DO: Test edge cases
133
+ test('user registration handles duplicate emails', () => {
134
+ // Tests specific business rule
135
+ });
136
+ ```
137
+
138
+ **Test Task Creation Rules:**
139
+ - Combine related test scenarios into single tasks (e.g., "Test user authentication flow" not separate tasks for login, logout, validation)
140
+ - Focus on integration and critical path testing over unit test coverage
141
+ - Avoid creating separate tasks for testing each CRUD operation individually
142
+ - Question whether simple functions need dedicated test tasks
143
+
144
+
145
+ ### Process
146
+
147
+ #### Step 1: Task Decomposition
148
+ 1. Read through the entire plan
149
+ 2. Identify all concrete deliverables **explicitly stated** in the plan
150
+ 3. Apply minimization principles: question necessity of each potential task
151
+ 4. Break each deliverable into atomic tasks (only if genuinely needed)
152
+ 5. Ensure no task requires multiple skill sets
153
+ 6. Verify each task has clear inputs and outputs
154
+ 7. **Minimize test tasks**: Combine related testing scenarios, avoid testing framework functionality
155
+
156
+ #### Step 2: Dependency Analysis
157
+ For each task, identify:
158
+ - **Hard dependencies**: Tasks that MUST complete before this can start
159
+ - **Soft dependencies**: Tasks that SHOULD complete for optimal execution
160
+ - **No circular dependencies**: Validate the dependency graph is acyclic
161
+
162
+ Dependency Rule: Task B depends on Task A if:
163
+ - B requires output/artifacts from A
164
+ - B modifies code created by A
165
+ - B tests functionality implemented in A
166
+
167
+ #### Step 3: Task Grouping
168
+ Organize tasks into logical groups based on feature areas (e.g., "user-authentication", "payment-processing", "dashboard", "reporting", "notifications")
169
+
170
+ #### Step 4: Output Generation
171
+
172
+ ##### Frontmatter Structure
173
+
174
+ Example:
175
+ ```yaml
176
+ ---
177
+ id: 1
178
+ group: "user-authentication"
179
+ dependencies: [] # List of task IDs, e.g., [2, 3]
180
+ status: "pending" # pending | in-progress | completed | needs-clarification
181
+ created: "2024-01-15"
182
+ skills: ["react-components", "authentication"] # Technical skills required for this task
183
+ ---
184
+ ```
185
+
186
+ The schema for this frontmatter is:
187
+ ```json
188
+ {
189
+ "type": "object",
190
+ "required": ["id", "group", "dependencies", "status", "created", "skills"],
191
+ "properties": {
192
+ "id": {
193
+ "type": ["number"],
194
+ "description": "Unique identifier for the task. An integer."
195
+ },
196
+ "group": {
197
+ "type": "string",
198
+ "description": "Group or category the task belongs to"
199
+ },
200
+ "dependencies": {
201
+ "type": "array",
202
+ "description": "List of task IDs this task depends on",
203
+ "items": {
204
+ "type": ["number"]
205
+ }
206
+ },
207
+ "status": {
208
+ "type": "string",
209
+ "enum": ["pending", "in-progress", "completed", "needs-clarification"],
210
+ "description": "Current status of the task"
211
+ },
212
+ "created": {
213
+ "type": "string",
214
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
215
+ "description": "Creation date in YYYY-MM-DD format"
216
+ },
217
+ "skills": {
218
+ "type": "array",
219
+ "description": "Technical skills required for this task (1-2 skills recommended)",
220
+ "items": {
221
+ "type": "string",
222
+ "pattern": "^[a-z][a-z0-9-]*$"
223
+ },
224
+ "minItems": 1,
225
+ "uniqueItems": true
226
+ }
227
+ },
228
+ "additionalProperties": false
229
+ }
230
+ ```
231
+
232
+ ##### Task Body Structure
233
+ ```markdown
234
+ ## Objective
235
+ [Clear statement of what this task accomplishes]
236
+
237
+ ## Skills Required
238
+ [Reference to the skills listed in frontmatter - these should align with the technical work needed]
239
+
240
+ ## Acceptance Criteria
241
+ - [ ] Criterion 1
242
+ - [ ] Criterion 2
243
+ - [ ] Criterion 3
244
+
245
+ ## Technical Requirements
246
+ [Specific technical details, APIs, libraries, etc. - use this to infer appropriate skills]
247
+
248
+ ## Input Dependencies
249
+ [What artifacts/code from other tasks are needed]
250
+
251
+ ## Output Artifacts
252
+ [What this task produces for other tasks to consume]
253
+
254
+ ## Implementation Notes
255
+ [Any helpful context or suggestions, including skill-specific guidance]
256
+ ```
257
+
258
+ ### Task ID Generation
259
+
260
+ 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:
261
+
262
+ #### Command
263
+ ```bash
264
+ PLAN_ID=$1; echo $(($(find .ai/task-manager/plans/$(printf "%02d" $PLAN_ID)--*/tasks -name "*.md" -exec grep "^id:" {} \; 2>/dev/null | sed 's/id: *//' | sort -n | tail -1 | sed 's/^$/0/') + 1))
265
+ ```
266
+
267
+ #### How It Works
268
+ 1. **Finds task files** using the pattern `*.md` in the specific plan's tasks directory
269
+ 2. **Extracts front-matter IDs** using grep to find `id:` lines from all task files
270
+ 3. **Strips the `id:` prefix** using sed to get numeric values only
271
+ 4. **Sorts numerically** to find the highest existing task ID
272
+ 5. **Handles empty results** by defaulting to 0 if no tasks exist
273
+ 6. **Adds 1** to get the next available task ID
274
+
275
+ This command reads the actual `id:` values from task front-matter, making it the definitive source of truth.
276
+
277
+ #### Parameter Usage
278
+ - `$1` is the plan ID parameter passed to this template
279
+ - The command accepts the raw plan ID (e.g., `6` for plan `06`)
280
+ - It automatically handles zero-padding for directory lookup
281
+
282
+ #### Front-matter vs Filename Format
283
+ **IMPORTANT:** There is a distinction between numeric and zero-padded formats:
284
+
285
+ - **Front-matter ID**: Use numeric values: `id: 3` (not `id: "03"`)
286
+ - **Filename**: Use zero-padded format: `03--task-name.md`
287
+
288
+ #### Usage Examples
289
+
290
+ **Example 1: Plan 6 with existing tasks**
291
+ ```bash
292
+ # Command execution (plan ID = 6)
293
+ PLAN_ID=6; echo $(($(find .ai/task-manager/plans/$(printf "%02d" $PLAN_ID)--*/tasks -name "*.md" -exec grep "^id:" {} \; 2>/dev/null | sed 's/id: *//' | sort -n | tail -1 | sed 's/^$/0/') + 1))
294
+ # Output: 5 (if highest task front-matter has id: 4)
295
+
296
+ # Front-matter usage:
297
+ ---
298
+ id: 4
299
+ group: "implementation"
300
+ dependencies: [1, 2]
301
+ status: "pending"
302
+ created: "2024-01-15"
303
+ skills: ["api-endpoints", "database"]
304
+ ---
305
+ ```
306
+
307
+ **Example 2: Plan 1 with no existing tasks**
308
+ ```bash
309
+ # Command execution (plan ID = 1)
310
+ PLAN_ID=1; echo $(($(find .ai/task-manager/plans/$(printf "%02d" $PLAN_ID)--*/tasks -name "*.md" -exec grep "^id:" {} \; 2>/dev/null | sed 's/id: *//' | sort -n | tail -1 | sed 's/^$/0/') + 1))
311
+ # Output: 1 (empty tasks directory, no front-matter to read)
312
+
313
+ # Front-matter usage:
314
+ ---
315
+ id: 1
316
+ group: "setup"
317
+ dependencies: []
318
+ status: "pending"
319
+ created: "2024-01-15"
320
+ skills: ["docker", "ci-cd"]
321
+ ---
322
+ ```
323
+
324
+ #### Edge Case Handling
325
+ The command handles several edge cases automatically:
326
+ - **Empty tasks directory**: Returns `1` as the first task ID
327
+ - **Non-sequential task IDs**: Returns the maximum existing ID + 1
328
+ - **Missing plan directory**: Returns `1` (graceful fallback)
329
+ - **Mixed numbering**: Correctly finds the highest numeric ID regardless of gaps
330
+
331
+ #### Command Execution Context
332
+ - Run this command from the repository root directory
333
+ - The command works with the current file system state
334
+ - It searches within the plan directory structure: `.ai/task-manager/plans/##--plan-name/tasks/`
335
+
336
+ #### Manual Fallback
337
+ If the command fails or returns unexpected results:
338
+ 1. Navigate to `.ai/task-manager/plans/##--plan-name/tasks/`
339
+ 2. List existing task files: `ls -1 *.md 2>/dev/null | sort`
340
+ 3. Identify the highest numbered task file
341
+ 4. Add 1 to get the next ID
342
+ 5. Use numeric format in front-matter, zero-padded format for filename
343
+
344
+ ### Validation Checklist
345
+ Before finalizing, ensure:
346
+ - [ ] Each task has 1-2 appropriate technical skills assigned
347
+ - [ ] Skills are automatically inferred from task objectives and technical requirements
348
+ - [ ] All dependencies form an acyclic graph
349
+ - [ ] Task IDs are unique and sequential
350
+ - [ ] Groups are consistent and meaningful
351
+ - [ ] Every **explicitly stated** task from the plan is covered
352
+ - [ ] No redundant or overlapping tasks
353
+ - [ ] **Minimization applied**: Each task is absolutely necessary
354
+ - [ ] **Test tasks are meaningful**: Focus on business logic, not framework functionality
355
+ - [ ] **No gold-plating**: Only plan requirements are addressed
356
+ - [ ] Total task count represents minimum viable implementation
357
+
358
+ ### Error Handling
359
+ If the plan lacks sufficient detail:
360
+ - Note areas needing clarification
361
+ - Create placeholder tasks marked with `status: "needs-clarification"`
362
+ - Document assumptions made
363
+
364
+ ## Update the plan document
365
+
366
+ After creating all tasks with their dependencies, update the original plan document with two critical sections: a task dependency visualization and a phase-based execution blueprint.
367
+
368
+ ### Section 1: Dependency Visualization
369
+
370
+ If any tasks have dependencies, create a Mermaid diagram showing the dependency graph:
371
+
372
+ ```mermaid
373
+ graph TD
374
+ 001[Task 001: Database Schema] --> 002[Task 002: API Endpoints]
375
+ 001 --> 003[Task 003: Data Models]
376
+ 002 --> 004[Task 004: Frontend Integration]
377
+ 003 --> 004
378
+ ```
379
+
380
+ Note: Ensure the graph is acyclic (no circular dependencies).
381
+
382
+ ### Section 2: Phase-Based Execution Blueprint
383
+
384
+ #### Core Concept
385
+ The execution blueprint organizes tasks into sequential phases where:
386
+ - **Within a phase**: All tasks execute in parallel
387
+ - **Between phases**: Execution is strictly sequential
388
+ - **Phase progression**: Requires all tasks in current phase to complete AND validation gates to pass
389
+
390
+ #### Phase Definition Rules
391
+ 1. **Phase 1**: Contains all tasks with zero dependencies
392
+ 2. **Phase N**: Contains tasks whose dependencies are ALL satisfied by tasks in phases 1 through N-1
393
+ 3. **Parallelism Priority**: Maximize the number of tasks that can run simultaneously in each phase
394
+ 4. **Completeness**: Every task must be assigned to exactly one phase
395
+
396
+ #### Blueprint Structure
397
+
398
+ ```markdown
399
+ ## Execution Blueprint
400
+
401
+ **Validation Gates:**
402
+ - Reference: `@.ai/task-manager/VALIDATION_GATES.md`
403
+
404
+ ### Phase 1: [Descriptive Phase Name]
405
+ **Parallel Tasks:**
406
+ - Task 001: [Description]
407
+ - Task 005: [Description]
408
+ - Task 009: [Description]
409
+
410
+ ### Phase 2: [Descriptive Phase Name]
411
+ **Parallel Tasks:**
412
+ - Task 002: [Description] (depends on: 001)
413
+ - Task 003: [Description] (depends on: 001)
414
+ - Task 006: [Description] (depends on: 005)
415
+
416
+ [Continue for all phases...]
417
+
418
+ ### Post-phase Actions
419
+
420
+ ### Execution Summary
421
+ - Total Phases: X
422
+ - Total Tasks: Y
423
+ - Maximum Parallelism: Z tasks (in Phase N)
424
+ - Critical Path Length: X phases
425
+ ```
426
+
427
+ ### Validation Requirements
428
+
429
+ #### Phase Transition Rules
430
+ 1. All tasks in the current phase must have status: "completed"
431
+ 2. All validation gates defined in `@.ai/task-manager/VALIDATION_GATES.md` for the current phase must pass
432
+ 3. No task in a future phase can begin until these conditions are met
433
+
434
+ #### Blueprint Verification
435
+ Before finalizing, ensure:
436
+ - [ ] Every task appears in exactly one phase
437
+ - [ ] No task appears in a phase before all its dependencies
438
+ - [ ] Phase 1 contains only tasks with no dependencies
439
+ - [ ] Each phase maximizes parallel execution opportunities
440
+ - [ ] All phases reference their validation gates
441
+ - [ ] The execution summary accurately reflects the blueprint
442
+
443
+ ### Important Notes
444
+
445
+ #### Parallel Execution
446
+ - Tasks within a phase have no interdependencies and can run simultaneously
447
+ - This enables efficient resource utilization and faster completion
448
+ - AI agents can be assigned to multiple tasks within the same phase
449
+
450
+ #### Sequential Phases
451
+ - Phases execute in strict numerical order
452
+ - Phase N+1 cannot begin until Phase N is fully complete and validated
453
+ - This ensures dependency integrity and systematic progress
454
+ -
455
+
456
+ #### Validation Gates
457
+ - Each phase has associated validation criteria defined externally
458
+ - Gates ensure quality and correctness before progression
459
+ - Failed validations require task remediation before phase completion
460
+
461
+ ### Error Handling
462
+
463
+ If dependency analysis reveals issues:
464
+ - **Circular dependencies**: Document the cycle and mark affected tasks for review
465
+ - **Orphaned tasks**: Tasks that cannot be scheduled due to missing dependencies
466
+ - **Ambiguous dependencies**: Note assumptions made and flag for clarification
@@ -0,0 +1,220 @@
1
+ description = "Generate tasks to implement the plan with the provided ID."
2
+ prompt = """
3
+ # Comprehensive Task List Creation
4
+ 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.
5
+
6
+ Include @.ai/task-manager/TASK_MANAGER_INFO.md for the directory structure of tasks.
7
+
8
+ ## Instructions
9
+
10
+ You will think hard to analyze the provided plan document and decompose it into atomic, actionable tasks with clear dependencies and groupings.
11
+
12
+ ### Input
13
+ - A plan document. See @.ai/task-manager/TASK_MANAGER_INFO.md fo find the plan with ID {{args}}
14
+ - The plan contains high-level objectives and implementation steps
15
+
16
+ ### Input Error Handling
17
+ If the plan does not exist. Stop immediately and show an error to the user.
18
+
19
+ ### Task Creation Guidelines
20
+
21
+ #### Task Granularity
22
+ Each task must be:
23
+ - **Single-purpose**: One clear deliverable or outcome
24
+ - **Atomic**: Cannot be meaningfully split further
25
+ - **Skill-specific**: Executable by a single skill agent (examples below)
26
+ - **Time-bounded**: Completable in a reasonable timeframe by a skilled developer
27
+ - **Verifiable**: Has clear completion criteria
28
+
29
+ #### Skill Agent Categories
30
+ Examples of single-skill domains:
31
+ - Frontend: CSS styling, React components, vanilla JavaScript
32
+ - Backend: API endpoints, database schemas, server configuration
33
+ - Testing: Unit tests, integration tests, E2E tests (Playwright)
34
+ - Documentation: API docs, user guides, code comments
35
+ - DevOps: CI/CD pipelines, Docker configs, deployment scripts
36
+ - Framework-specific: Drupal modules, WordPress plugins, etc.
37
+
38
+ ### Process
39
+
40
+ #### Step 1: Task Decomposition
41
+ 1. Read through the entire plan
42
+ 2. Identify all concrete deliverables
43
+ 3. Break each deliverable into atomic tasks
44
+ 4. Ensure no task requires multiple skill sets
45
+ 5. Verify each task has clear inputs and outputs
46
+
47
+ #### Step 2: Dependency Analysis
48
+ For each task, identify:
49
+ - **Hard dependencies**: Tasks that MUST complete before this can start
50
+ - **Soft dependencies**: Tasks that SHOULD complete for optimal execution
51
+ - **No circular dependencies**: Validate the dependency graph is acyclic
52
+
53
+ Dependency Rule: Task B depends on Task A if:
54
+ - B requires output/artifacts from A
55
+ - B modifies code created by A
56
+ - B tests functionality implemented in A
57
+
58
+ #### Step 3: Task Grouping
59
+ Organize tasks into logical groups based on feature areas (e.g., "user-authentication", "payment-processing", "dashboard", "reporting", "notifications")
60
+
61
+ #### Step 4: Output Generation
62
+
63
+ ##### Frontmatter Structure
64
+ ```yaml
65
+ ---
66
+ id: 001
67
+ group: "user-authentication"
68
+ dependencies: [] # List of task IDs, e.g., [002, 003]
69
+ status: "pending" # pending | in-progress | completed | needs-clarification
70
+ created_at: "2024-01-15T10:00:00Z"
71
+ ---
72
+ ```
73
+
74
+ ##### Task Body Structure
75
+ ```markdown
76
+ ## Objective
77
+ [Clear statement of what this task accomplishes]
78
+
79
+ ## Acceptance Criteria
80
+ - [ ] Criterion 1
81
+ - [ ] Criterion 2
82
+ - [ ] Criterion 3
83
+
84
+ ## Technical Requirements
85
+ [Specific technical details, APIs, libraries, etc.]
86
+
87
+ ## Input Dependencies
88
+ [What artifacts/code from other tasks are needed]
89
+
90
+ ## Output Artifacts
91
+ [What this task produces for other tasks to consume]
92
+
93
+ ## Implementation Notes
94
+ [Any helpful context or suggestions]
95
+ ```
96
+
97
+ ### Validation Checklist
98
+ Before finalizing, ensure:
99
+ - [ ] Each task has a single skill domain
100
+ - [ ] All dependencies form an acyclic graph
101
+ - [ ] Task IDs are unique and sequential
102
+ - [ ] Groups are consistent and meaningful
103
+ - [ ] Every task from the plan is covered
104
+ - [ ] No redundant or overlapping tasks
105
+
106
+ ### Error Handling
107
+ If the plan lacks sufficient detail:
108
+ - Note areas needing clarification
109
+ - Create placeholder tasks marked with `status: "needs-clarification"`
110
+ - Document assumptions made
111
+
112
+ ## Update the plan document
113
+
114
+ After creating all tasks with their dependencies, update the original plan document with two critical sections: a task dependency visualization and a phase-based execution blueprint.
115
+
116
+ ### Section 1: Dependency Visualization
117
+
118
+ If any tasks have dependencies, create a Mermaid diagram showing the dependency graph:
119
+
120
+ ```mermaid
121
+ graph TD
122
+ 001[Task 001: Database Schema] --> 002[Task 002: API Endpoints]
123
+ 001 --> 003[Task 003: Data Models]
124
+ 002 --> 004[Task 004: Frontend Integration]
125
+ 003 --> 004
126
+ ```
127
+
128
+ Note: Ensure the graph is acyclic (no circular dependencies).
129
+
130
+ ### Section 2: Phase-Based Execution Blueprint
131
+
132
+ #### Core Concept
133
+ The execution blueprint organizes tasks into sequential phases where:
134
+ - **Within a phase**: All tasks execute in parallel
135
+ - **Between phases**: Execution is strictly sequential
136
+ - **Phase progression**: Requires all tasks in current phase to complete AND validation gates to pass
137
+
138
+ #### Phase Definition Rules
139
+ 1. **Phase 1**: Contains all tasks with zero dependencies
140
+ 2. **Phase N**: Contains tasks whose dependencies are ALL satisfied by tasks in phases 1 through N-1
141
+ 3. **Parallelism Priority**: Maximize the number of tasks that can run simultaneously in each phase
142
+ 4. **Completeness**: Every task must be assigned to exactly one phase
143
+
144
+ #### Blueprint Structure
145
+
146
+ ```markdown
147
+ ## Execution Blueprint
148
+
149
+ **Validation Gates:**
150
+ - Reference: `@.ai/task-manager/VALIDATION_GATES.md`
151
+
152
+ ### Phase 1: [Descriptive Phase Name]
153
+ **Parallel Tasks:**
154
+ - Task 001: [Description]
155
+ - Task 005: [Description]
156
+ - Task 009: [Description]
157
+
158
+ ### Phase 2: [Descriptive Phase Name]
159
+ **Parallel Tasks:**
160
+ - Task 002: [Description] (depends on: 001)
161
+ - Task 003: [Description] (depends on: 001)
162
+ - Task 006: [Description] (depends on: 005)
163
+
164
+ [Continue for all phases...]
165
+
166
+ ### Post-phase Actions
167
+
168
+ ### Execution Summary
169
+ - Total Phases: X
170
+ - Total Tasks: Y
171
+ - Maximum Parallelism: Z tasks (in Phase N)
172
+ - Critical Path Length: X phases
173
+ ```
174
+
175
+ ### Validation Requirements
176
+
177
+ #### Phase Transition Rules
178
+ 1. All tasks in the current phase must have status: "completed"
179
+ 2. All validation gates defined in `@.ai/task-manager/VALIDATION_GATES.md` for the current phase must pass
180
+ 3. No task in a future phase can begin until these conditions are met
181
+
182
+ #### Blueprint Verification
183
+ Before finalizing, ensure:
184
+ - [ ] Every task appears in exactly one phase
185
+ - [ ] No task appears in a phase before all its dependencies
186
+ - [ ] Phase 1 contains only tasks with no dependencies
187
+ - [ ] Each phase maximizes parallel execution opportunities
188
+ - [ ] All phases reference their validation gates
189
+ - [ ] The execution summary accurately reflects the blueprint
190
+
191
+ ### Important Notes
192
+
193
+ #### Parallel Execution
194
+ - Tasks within a phase have no interdependencies and can run simultaneously
195
+ - This enables efficient resource utilization and faster completion
196
+ - AI agents can be assigned to multiple tasks within the same phase
197
+
198
+ #### Sequential Phases
199
+ - Phases execute in strict numerical order
200
+ - Phase N+1 cannot begin until Phase N is fully complete and validated
201
+ - This ensures dependency integrity and systematic progress
202
+ -
203
+
204
+ #### Validation Gates
205
+ - Each phase has associated validation criteria defined externally
206
+ - Gates ensure quality and correctness before progression
207
+ - Failed validations require task remediation before phase completion
208
+
209
+ ### Error Handling
210
+
211
+ If dependency analysis reveals issues:
212
+ - **Circular dependencies**: Document the cycle and mark affected tasks for review
213
+ - **Orphaned tasks**: Tasks that cannot be scheduled due to missing dependencies
214
+ - **Ambiguous dependencies**: Note assumptions made and flag for clarification
215
+
216
+ If blueprint generation fails:
217
+ - Provide a partial blueprint up to the point of failure
218
+ - Clearly state the reason for the halt (e.g., "Circular dependency detected")
219
+ - Request user intervention to resolve the issue
220
+ """