@e0ipso/ai-task-manager 1.36.1 → 1.38.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/README.md +26 -21
- package/dist/cli.js +1 -32
- package/dist/cli.js.map +1 -1
- package/dist/conflict-detector.d.ts.map +1 -1
- package/dist/conflict-detector.js +0 -4
- package/dist/conflict-detector.js.map +1 -1
- package/dist/index.d.ts +3 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -245
- package/dist/index.js.map +1 -1
- package/dist/metadata.d.ts +9 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +14 -0
- package/dist/metadata.js.map +1 -1
- package/dist/types.d.ts +18 -18
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +27 -58
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +93 -219
- package/dist/utils.js.map +1 -1
- package/package.json +4 -2
- package/templates/ai-task-manager/config/TASK_MANAGER.md +3 -3
- package/templates/ai-task-manager/config/hooks/PRE_PHASE.md +6 -26
- package/templates/ai-task-manager/config/hooks/PRE_TASK_ASSIGNMENT.md +6 -24
- package/templates/ai-task-manager/config/templates/PLAN_TEMPLATE.md +1 -1
- package/templates/{assistant → harness}/agents/plan-creator.md +2 -2
- package/templates/harness/skills/task-create-plan/SKILL.md +120 -0
- package/templates/harness/skills/task-create-plan/scripts/find-task-manager-root.cjs +116 -0
- package/templates/harness/skills/task-create-plan/scripts/get-next-plan-id.cjs +214 -0
- package/templates/harness/skills/task-execute-blueprint/SKILL.md +139 -0
- package/templates/harness/skills/task-execute-blueprint/scripts/create-feature-branch.cjs +376 -0
- package/templates/harness/skills/task-execute-blueprint/scripts/find-task-manager-root.cjs +116 -0
- package/templates/harness/skills/task-execute-blueprint/scripts/validate-plan-blueprint.cjs +375 -0
- package/templates/harness/skills/task-execute-task/SKILL.md +195 -0
- package/templates/harness/skills/task-execute-task/scripts/check-task-dependencies.cjs +437 -0
- package/templates/harness/skills/task-execute-task/scripts/find-task-manager-root.cjs +116 -0
- package/templates/harness/skills/task-execute-task/scripts/validate-plan-blueprint.cjs +375 -0
- package/templates/harness/skills/task-full-workflow/SKILL.md +378 -0
- package/templates/harness/skills/task-full-workflow/scripts/create-feature-branch.cjs +376 -0
- package/templates/harness/skills/task-full-workflow/scripts/find-task-manager-root.cjs +116 -0
- package/templates/harness/skills/task-full-workflow/scripts/get-next-plan-id.cjs +214 -0
- package/templates/harness/skills/task-full-workflow/scripts/get-next-task-id.cjs +312 -0
- package/templates/harness/skills/task-full-workflow/scripts/validate-plan-blueprint.cjs +375 -0
- package/templates/harness/skills/task-generate-tasks/SKILL.md +244 -0
- package/templates/harness/skills/task-generate-tasks/scripts/find-task-manager-root.cjs +116 -0
- package/templates/harness/skills/task-generate-tasks/scripts/get-next-task-id.cjs +312 -0
- package/templates/harness/skills/task-generate-tasks/scripts/validate-plan-blueprint.cjs +375 -0
- package/templates/harness/skills/task-refine-plan/SKILL.md +205 -0
- package/templates/harness/skills/task-refine-plan/scripts/find-task-manager-root.cjs +116 -0
- package/templates/harness/skills/task-refine-plan/scripts/validate-plan-blueprint.cjs +375 -0
- package/dist/exec.d.ts +0 -13
- package/dist/exec.d.ts.map +0 -1
- package/dist/exec.js +0 -261
- package/dist/exec.js.map +0 -1
- package/templates/ai-task-manager/config/scripts/check-task-dependencies.cjs +0 -240
- package/templates/ai-task-manager/config/scripts/compose-prompt.cjs +0 -234
- package/templates/ai-task-manager/config/scripts/create-feature-branch.cjs +0 -204
- package/templates/ai-task-manager/config/scripts/extract-task-skills.cjs +0 -84
- package/templates/ai-task-manager/config/scripts/find-root.cjs +0 -10
- package/templates/ai-task-manager/config/scripts/get-next-plan-id.cjs +0 -49
- package/templates/ai-task-manager/config/scripts/get-next-task-id.cjs +0 -81
- package/templates/ai-task-manager/config/scripts/shared-utils.cjs +0 -418
- package/templates/ai-task-manager/config/scripts/validate-plan-blueprint.cjs +0 -138
- package/templates/assistant/commands/tasks/create-plan-auto.md +0 -174
- package/templates/assistant/commands/tasks/create-plan.md +0 -175
- package/templates/assistant/commands/tasks/execute-blueprint.md +0 -233
- package/templates/assistant/commands/tasks/execute-task.md +0 -351
- package/templates/assistant/commands/tasks/fix-broken-tests.md +0 -44
- package/templates/assistant/commands/tasks/full-workflow.md +0 -849
- package/templates/assistant/commands/tasks/generate-tasks.md +0 -348
- package/templates/assistant/commands/tasks/refine-plan-auto.md +0 -172
- package/templates/assistant/commands/tasks/refine-plan.md +0 -163
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-full-workflow
|
|
3
|
+
description: Execute the complete AI Task Manager workflow from plan creation through blueprint execution for this repository. Use when the user asks to run the full end-to-end workflow for a work order — discovers the local .ai/task-manager root, creates a plan, generates atomic tasks, and executes the blueprint, all in a single uninterrupted sequence. Do not use for individual plan creation, task generation, or blueprint execution; use the dedicated skills for those.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# task-full-workflow
|
|
7
|
+
|
|
8
|
+
Drive the complete end-to-end AI Task Manager workflow from initial plan creation through final blueprint execution and archival. The skill is assistant-agnostic and self-contained: every script it invokes lives under this skill's `scripts/` directory and is referenced by relative path.
|
|
9
|
+
|
|
10
|
+
## Critical Rule
|
|
11
|
+
|
|
12
|
+
Execute all three phases sequentially without waiting for user input between steps. This is a fully automated orchestration workflow. Progress indicators are for user visibility only and do not pause execution.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
The user supplies the work order conversationally. Treat it as the only authoritative source of intent. Do not invent answers to clarifying questions — prompt the user instead.
|
|
17
|
+
|
|
18
|
+
## Context Passing Between Phases
|
|
19
|
+
|
|
20
|
+
Information flows through the workflow via structured output parsing:
|
|
21
|
+
|
|
22
|
+
1. **Phase 1 → Phase 2**: Extract the numeric `Plan ID` from the Phase 1 structured summary output. Use this exact ID to drive Phase 2.
|
|
23
|
+
2. **Phase 2 → Phase 3**: Extract the `Tasks` count from the Phase 2 structured summary output. Use this count for progress tracking during Phase 3.
|
|
24
|
+
|
|
25
|
+
Do not proceed to the next phase until the structured output from the current phase has been successfully parsed.
|
|
26
|
+
|
|
27
|
+
## Progress Indicators
|
|
28
|
+
|
|
29
|
+
Display progress indicators at key transition points to provide visual feedback without interrupting execution:
|
|
30
|
+
|
|
31
|
+
- `⬛⬜⬜ 33%` — Phase 1: Plan Creation Complete
|
|
32
|
+
- `⬛⬛⬜ 66%` — Phase 2: Task Generation Complete
|
|
33
|
+
- `⬛⬛⬛ 100%` — Phase 3: Blueprint Execution Complete
|
|
34
|
+
|
|
35
|
+
These indicators are purely informational. Do not pause or wait for user input when displaying them.
|
|
36
|
+
|
|
37
|
+
## Operating Procedure
|
|
38
|
+
|
|
39
|
+
### Phase 1: Plan Creation
|
|
40
|
+
|
|
41
|
+
**Progress**: `⬛⬜⬜ 33% - Phase 1/3: Starting Plan Creation`
|
|
42
|
+
|
|
43
|
+
#### 1. Locate the task-manager root
|
|
44
|
+
|
|
45
|
+
Run `scripts/find-task-manager-root.cjs` from the user's working directory. The script walks up looking for `.ai/task-manager/.init-metadata.json` and prints the absolute path of the resolved root on success.
|
|
46
|
+
|
|
47
|
+
If the script exits non-zero, the working directory is not inside an initialized task-manager workspace. Stop and ask the user to run the project initializer before continuing.
|
|
48
|
+
|
|
49
|
+
For every subsequent step, treat the path printed by this script as `<root>`.
|
|
50
|
+
|
|
51
|
+
#### 2. Load project context
|
|
52
|
+
|
|
53
|
+
Read `<root>/config/TASK_MANAGER.md` for directory structure conventions. Read `<root>/config/hooks/PRE_PLAN.md` and execute its instructions before proceeding. Read `<root>/config/templates/PLAN_TEMPLATE.html` so the plan conforms to the project's template.
|
|
54
|
+
|
|
55
|
+
#### 3. Analyze the work order
|
|
56
|
+
|
|
57
|
+
Identify:
|
|
58
|
+
|
|
59
|
+
- Objective and end goal.
|
|
60
|
+
- Scope and explicit boundaries.
|
|
61
|
+
- Success criteria.
|
|
62
|
+
- Dependencies, prerequisites, and blockers.
|
|
63
|
+
- Technical requirements and constraints.
|
|
64
|
+
|
|
65
|
+
#### 4. Clarification loop
|
|
66
|
+
|
|
67
|
+
If any critical context is missing, ask the user targeted questions. Loop until no further questions remain. Explicitly confirm whether backwards compatibility is required. Never invent answers.
|
|
68
|
+
|
|
69
|
+
If the user declines to clarify a blocking question, stop and report the plan as needing clarification. Do not produce a partial plan.
|
|
70
|
+
|
|
71
|
+
#### 5. Allocate the next plan ID
|
|
72
|
+
|
|
73
|
+
Run `scripts/get-next-plan-id.cjs` to obtain the next available plan ID. The script prints a single integer.
|
|
74
|
+
|
|
75
|
+
Compute the zero-padded form for directory naming (`{padded-id}--{slug}`) and use the unpadded integer in the plan frontmatter and the final summary.
|
|
76
|
+
|
|
77
|
+
#### 6. Emit the plan
|
|
78
|
+
|
|
79
|
+
Write the plan to:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
<root>/plans/{padded-id}--{slug}/plan-{padded-id}--{slug}.html
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The output must conform to `<root>/config/templates/PLAN_TEMPLATE.html`, including required meta elements (`id`, `summary`, `created`) inside the head. Use semantic HTML. Avoid time estimates, task lists, or code samples — those belong to the later task-generation phase.
|
|
86
|
+
|
|
87
|
+
The `<slug>` is derived from the plan summary: lowercase, alphanumeric and hyphens only, collapsed, trimmed.
|
|
88
|
+
|
|
89
|
+
#### 7. Run post-plan hook
|
|
90
|
+
|
|
91
|
+
Execute `<root>/config/hooks/POST_PLAN.md` after the plan file is written.
|
|
92
|
+
|
|
93
|
+
#### 8. Emit the Phase 1 structured summary
|
|
94
|
+
|
|
95
|
+
Conclude Phase 1 with exactly this block:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
Plan Summary:
|
|
101
|
+
- Plan ID: [numeric-id]
|
|
102
|
+
- Plan File: [absolute-path-to-plan-file]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Parse the `Plan ID` value from this output and pass it to Phase 2.
|
|
106
|
+
|
|
107
|
+
**Progress**: `⬛⬜⬜ 33% - Phase 1/3: Plan Creation Complete`
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Phase 2: Task Generation
|
|
112
|
+
|
|
113
|
+
**Progress**: `⬛⬜⬜ 33% - Phase 2/3: Starting Task Generation`
|
|
114
|
+
|
|
115
|
+
Using the Plan ID extracted from Phase 1:
|
|
116
|
+
|
|
117
|
+
#### 1. Resolve the plan
|
|
118
|
+
|
|
119
|
+
Run `scripts/validate-plan-blueprint.cjs <plan-id> planFile` to obtain the absolute path of the plan file. If the script exits non-zero, stop and report the error. Do not guess a different ID.
|
|
120
|
+
|
|
121
|
+
#### 2. Load project context
|
|
122
|
+
|
|
123
|
+
Read these files in order:
|
|
124
|
+
|
|
125
|
+
- `<root>/config/TASK_MANAGER.md` — directory conventions.
|
|
126
|
+
- The plan body at the path returned above — this is the contract for what tasks must exist.
|
|
127
|
+
- `<root>/config/templates/TASK_TEMPLATE.md` — every task file must conform to this template.
|
|
128
|
+
|
|
129
|
+
#### 3. Analyze and decompose the plan
|
|
130
|
+
|
|
131
|
+
Read the entire plan. Identify all concrete deliverables explicitly stated. Decompose each deliverable into atomic tasks only when genuinely needed.
|
|
132
|
+
|
|
133
|
+
Apply task minimization principles:
|
|
134
|
+
|
|
135
|
+
- Create only the minimum number of tasks necessary. Target a 20–30% reduction from comprehensive lists.
|
|
136
|
+
- Direct Implementation Only: each task corresponds to an explicit requirement, not a nice-to-have.
|
|
137
|
+
- DRY Task Principle: each task has a unique, non-overlapping purpose.
|
|
138
|
+
- Question Everything: for each task, ask "Is this absolutely necessary to meet the plan objectives?"
|
|
139
|
+
- Avoid Gold-plating: resist comprehensive features the plan does not require.
|
|
140
|
+
|
|
141
|
+
Antipatterns to avoid:
|
|
142
|
+
|
|
143
|
+
- Separating error handling from the main implementation when it can be inline.
|
|
144
|
+
- Splitting trivially small operations into multiple tasks.
|
|
145
|
+
- Adding tasks for future extensibility or best practices the plan does not mention.
|
|
146
|
+
- Comprehensive test suites for trivial functionality.
|
|
147
|
+
|
|
148
|
+
#### 4. Apply granularity and skill rules
|
|
149
|
+
|
|
150
|
+
Each task must be:
|
|
151
|
+
|
|
152
|
+
- Single-purpose — one clear deliverable.
|
|
153
|
+
- Atomic — cannot be meaningfully split further.
|
|
154
|
+
- Skill-specific — executable by an agent with 1–2 technical skills.
|
|
155
|
+
- Verifiable — has explicit acceptance criteria.
|
|
156
|
+
|
|
157
|
+
Skill assignment (kebab-case, automatically inferred):
|
|
158
|
+
|
|
159
|
+
- 1 skill — single-domain task (e.g., `["css"]`, `["jest"]`).
|
|
160
|
+
- 2 skills — complementary domains (e.g., `["api-endpoints", "database"]`).
|
|
161
|
+
- 3+ skills indicates the task should be broken down further.
|
|
162
|
+
|
|
163
|
+
#### 5. Test philosophy
|
|
164
|
+
|
|
165
|
+
When generating test tasks, follow: "write a few tests, mostly integration".
|
|
166
|
+
|
|
167
|
+
Meaningful tests verify custom business logic, critical paths, and edge cases specific to this application. Test your code, not the framework or library.
|
|
168
|
+
|
|
169
|
+
When TO write tests:
|
|
170
|
+
|
|
171
|
+
- Custom business logic and algorithms.
|
|
172
|
+
- Critical user workflows and data transformations.
|
|
173
|
+
- Edge cases and error conditions for core functionality.
|
|
174
|
+
- Integration points between components.
|
|
175
|
+
- Complex validation logic or calculations.
|
|
176
|
+
|
|
177
|
+
When NOT to write tests:
|
|
178
|
+
|
|
179
|
+
- Third-party library functionality.
|
|
180
|
+
- Framework features.
|
|
181
|
+
- Simple CRUD operations without custom logic.
|
|
182
|
+
- Trivial getters/setters or static configuration.
|
|
183
|
+
- Obvious functionality that would break immediately if incorrect.
|
|
184
|
+
|
|
185
|
+
Combine related test scenarios into a single task. Favor integration and critical-path coverage over per-method unit tests.
|
|
186
|
+
|
|
187
|
+
#### 6. Dependency analysis
|
|
188
|
+
|
|
189
|
+
For each task, identify:
|
|
190
|
+
|
|
191
|
+
- Hard dependencies — tasks that MUST complete before this one can start.
|
|
192
|
+
- Soft dependencies — tasks that SHOULD complete for optimal execution.
|
|
193
|
+
|
|
194
|
+
A task B depends on A if B requires A's output or artifacts, modifies code created by A, or tests functionality implemented by A. Validate that the final dependency graph is acyclic.
|
|
195
|
+
|
|
196
|
+
#### 7. Allocate task IDs
|
|
197
|
+
|
|
198
|
+
Run `scripts/get-next-task-id.cjs <plan-id>` to obtain the first available task ID. Allocate subsequent IDs by incrementing in-process. Use the unpadded integer in the task frontmatter `id` field and the zero-padded form (`{padded-id}--{slug}`) for the filename.
|
|
199
|
+
|
|
200
|
+
The slug derives from a short task title: lowercase, alphanumeric and hyphens only, collapsed, trimmed.
|
|
201
|
+
|
|
202
|
+
#### 8. Emit the task files
|
|
203
|
+
|
|
204
|
+
Write each task to:
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
<root>/plans/<plan-dir-name>/tasks/{padded-id}--{slug}.md
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Each file must conform to `<root>/config/templates/TASK_TEMPLATE.md`, including required frontmatter fields:
|
|
211
|
+
|
|
212
|
+
- `id` (integer)
|
|
213
|
+
- `group` (string)
|
|
214
|
+
- `dependencies` (array of task IDs, possibly empty)
|
|
215
|
+
- `status` — `pending` for new tasks
|
|
216
|
+
- `created` (YYYY-MM-DD)
|
|
217
|
+
- `skills` (array of 1–2 kebab-case skills)
|
|
218
|
+
|
|
219
|
+
Optional frontmatter for high-complexity or decomposed tasks:
|
|
220
|
+
|
|
221
|
+
- `complexity_score` (number, 1–10, include only if >4)
|
|
222
|
+
- `complexity_notes` (string)
|
|
223
|
+
|
|
224
|
+
The body sections (Objective, Skills Required, Acceptance Criteria, Technical Requirements, Input Dependencies, Output Artifacts, Implementation Notes) must be filled with task-specific content. Place detailed implementation guidance inside a `<details>` block under "Implementation Notes" so a non-thinking LLM could execute the task from that section alone.
|
|
225
|
+
|
|
226
|
+
#### 9. Validation checklist
|
|
227
|
+
|
|
228
|
+
Before declaring task generation complete, verify:
|
|
229
|
+
|
|
230
|
+
- Each task has 1–2 appropriate technical skills assigned and inferred from its objectives.
|
|
231
|
+
- Dependencies form an acyclic graph.
|
|
232
|
+
- Task IDs are unique, sequential, and start from the value returned by `get-next-task-id.cjs`.
|
|
233
|
+
- Groups are consistent and meaningful.
|
|
234
|
+
- Every explicitly stated deliverable in the plan is covered.
|
|
235
|
+
- No redundant or overlapping tasks.
|
|
236
|
+
- Minimization applied (20–30% reduction target).
|
|
237
|
+
- Test tasks focus on business logic, not framework functionality.
|
|
238
|
+
- No gold-plating: only plan requirements are addressed.
|
|
239
|
+
|
|
240
|
+
#### 10. Run the POST_TASK_GENERATION_ALL hook
|
|
241
|
+
|
|
242
|
+
Read `<root>/config/hooks/POST_TASK_GENERATION_ALL.md` and follow its instructions. This typically requires:
|
|
243
|
+
|
|
244
|
+
- Sanity-checking complexity.
|
|
245
|
+
- Appending an Execution Blueprint section to the plan document, including a Mermaid dependency diagram and explicit phase groupings.
|
|
246
|
+
- Use `<root>/config/templates/BLUEPRINT_TEMPLATE.md` for structure.
|
|
247
|
+
|
|
248
|
+
#### 11. Emit the Phase 2 structured summary
|
|
249
|
+
|
|
250
|
+
Conclude Phase 2 with exactly this block:
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
---
|
|
254
|
+
Task Generation Summary:
|
|
255
|
+
- Plan ID: [numeric-id]
|
|
256
|
+
- Tasks: [count]
|
|
257
|
+
- Status: Ready for execution
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Parse the `Tasks` count from this output and pass it to Phase 3 for progress tracking.
|
|
261
|
+
|
|
262
|
+
**Progress**: `⬛⬛⬜ 66% - Phase 2/3: Task Generation Complete`
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
### Phase 3: Blueprint Execution
|
|
267
|
+
|
|
268
|
+
**Progress**: `⬛⬛⬜ 66% - Phase 3/3: Starting Blueprint Execution`
|
|
269
|
+
|
|
270
|
+
Using the Plan ID from the previous phases:
|
|
271
|
+
|
|
272
|
+
#### 1. Resolve the plan and validate readiness
|
|
273
|
+
|
|
274
|
+
Run `scripts/validate-plan-blueprint.cjs <plan-id> planFile` to obtain the plan file path. Also query:
|
|
275
|
+
|
|
276
|
+
- `planDir` — absolute path of the plan directory
|
|
277
|
+
- `taskCount` — number of existing task files
|
|
278
|
+
- `blueprintExists` — `yes` or `no`
|
|
279
|
+
|
|
280
|
+
If the script exits non-zero, stop and report the error.
|
|
281
|
+
|
|
282
|
+
#### 2. Auto-generate tasks and blueprint if missing
|
|
283
|
+
|
|
284
|
+
If `taskCount` is 0 or `blueprintExists` is `no`:
|
|
285
|
+
|
|
286
|
+
- Notify the user: "Tasks or execution blueprint not found. Generating tasks automatically..."
|
|
287
|
+
- Execute the full task generation procedure from Phase 2 for this plan ID.
|
|
288
|
+
- After generation completes, re-run `scripts/validate-plan-blueprint.cjs <plan-id> planFile` (and the other fields) to refresh the resolved paths and counts.
|
|
289
|
+
- If generation still leaves the plan without tasks or a blueprint, stop and report failure. Do not attempt execution without a valid blueprint.
|
|
290
|
+
|
|
291
|
+
#### 3. Optionally create a feature branch
|
|
292
|
+
|
|
293
|
+
Run `scripts/create-feature-branch.cjs <plan-id>`. The script creates a branch named after the plan and prints the branch name. Continue execution regardless of whether a branch is created.
|
|
294
|
+
|
|
295
|
+
#### 4. Load execution blueprint
|
|
296
|
+
|
|
297
|
+
Read these files in order:
|
|
298
|
+
|
|
299
|
+
- `<root>/config/TASK_MANAGER.md` — directory conventions and project context.
|
|
300
|
+
- The plan document.
|
|
301
|
+
- The plan's Execution Blueprint section — this defines the phase groupings and task dispatch order.
|
|
302
|
+
|
|
303
|
+
#### 5. Execute phases in order
|
|
304
|
+
|
|
305
|
+
Use an internal task or todo tracker to monitor progress. For each phase defined in the Execution Blueprint:
|
|
306
|
+
|
|
307
|
+
##### 5a. Phase pre-execution
|
|
308
|
+
Read `<root>/config/hooks/PRE_PHASE.md` and execute its instructions before starting the phase.
|
|
309
|
+
|
|
310
|
+
##### 5b. Task dispatch
|
|
311
|
+
Identify all tasks scheduled for this phase whose dependencies are fully satisfied. Read `<root>/config/hooks/PRE_TASK_EXECUTION.md` and execute its instructions before starting any implementation work.
|
|
312
|
+
|
|
313
|
+
Deploy all selected agents simultaneously. Each agent MUST:
|
|
314
|
+
|
|
315
|
+
1. Read and execute `<root>/config/hooks/PRE_TASK_EXECUTION.md` before starting implementation.
|
|
316
|
+
2. Execute the task according to its requirements.
|
|
317
|
+
3. Monitor execution progress and capture outputs and artifacts.
|
|
318
|
+
4. Update task status in real-time.
|
|
319
|
+
|
|
320
|
+
Maximize parallelism within each phase. Run every task that is ready at the same time.
|
|
321
|
+
|
|
322
|
+
##### 5c. Phase completion verification
|
|
323
|
+
Ensure every task in the phase has status `completed`. Collect and review all task outputs. Document any issues or exceptions encountered.
|
|
324
|
+
|
|
325
|
+
##### 5d. Phase post-execution
|
|
326
|
+
Read `<root>/config/hooks/POST_PHASE.md` and execute its instructions. Do not proceed to the next phase until this hook succeeds.
|
|
327
|
+
|
|
328
|
+
Update the phase status to `completed` in the plan's Execution Blueprint section.
|
|
329
|
+
|
|
330
|
+
Repeat for the next phase until all phases are complete.
|
|
331
|
+
|
|
332
|
+
#### 6. Post-execution validation
|
|
333
|
+
|
|
334
|
+
Read `<root>/config/hooks/POST_EXECUTION.md` and execute its instructions. If validation fails, halt execution. The plan remains in `plans/` for debugging.
|
|
335
|
+
|
|
336
|
+
#### 7. Append execution summary
|
|
337
|
+
|
|
338
|
+
Append an execution summary section to the plan document using the format described in `<root>/config/templates/EXECUTION_SUMMARY_TEMPLATE.md`. Populate:
|
|
339
|
+
|
|
340
|
+
- **Status**: Completed Successfully
|
|
341
|
+
- **Completed Date**: current date
|
|
342
|
+
- **Results**: brief summary of deliverables
|
|
343
|
+
- **Noteworthy Events**: all decisions, issues, and outcomes encountered during execution. If none occurred, state "No significant issues encountered."
|
|
344
|
+
- **Necessary follow-ups**: any follow-up actions or optimizations
|
|
345
|
+
|
|
346
|
+
#### 8. Archive the plan
|
|
347
|
+
|
|
348
|
+
Move the completed plan directory from `<root>/plans/<plan-folder>` to `<root>/archive/<plan-folder>`.
|
|
349
|
+
|
|
350
|
+
Preserve the entire folder structure (including all tasks and subdirectories) to maintain referential integrity. If the move fails, log the error but do not fail the overall execution — the implementation work is complete.
|
|
351
|
+
|
|
352
|
+
**Progress**: `⬛⬛⬛ 100% - Phase 3/3: Blueprint Execution Complete`
|
|
353
|
+
|
|
354
|
+
## Failure Modes
|
|
355
|
+
|
|
356
|
+
- **No task-manager root found.** Stop and instruct the user to initialize the project. Do not write any files or execute any tasks.
|
|
357
|
+
- **User refuses to answer a clarifying question that blocks planning in Phase 1.** Report `needs-clarification` and stop. Do not produce a partial plan.
|
|
358
|
+
- **Plan ID script fails.** Re-check the resolved root and re-run. If it continues to fail, surface stderr to the user and stop — do not guess an ID.
|
|
359
|
+
- **Plan directory already exists for the allocated ID in Phase 1.** Re-run the next-plan-id script and retry once. If the conflict persists, stop and report.
|
|
360
|
+
- **Plan ID does not resolve in Phase 2 or 3.** Stop and surface the script's stderr. Do not guess a different ID.
|
|
361
|
+
- **Missing blueprint after auto-generation in Phase 3.** If automatic task generation fails to produce tasks or a blueprint, stop and report failure. Do not attempt execution without a blueprint.
|
|
362
|
+
- **Hook failure during execution.** If `PRE_PHASE.md`, `POST_PHASE.md`, or `POST_EXECUTION.md` fails, halt execution. The plan remains in `plans/` for debugging and potential re-execution.
|
|
363
|
+
- **Execution errors.** If a task fails, read `<root>/config/hooks/POST_ERROR_DETECTION.md`, document the error in Noteworthy Events, halt the phase, and request user direction before continuing.
|
|
364
|
+
|
|
365
|
+
## Execution Summary
|
|
366
|
+
|
|
367
|
+
Conclude with exactly this block as the final output:
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
---
|
|
371
|
+
Execution Summary:
|
|
372
|
+
- Plan ID: [numeric-id]
|
|
373
|
+
- Status: Archived
|
|
374
|
+
- Location: [absolute path to archive directory]
|
|
375
|
+
---
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
The summary is consumed by downstream automation; keep the format exact.
|