@e0ipso/ai-task-manager 1.21.0 β†’ 1.22.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 CHANGED
@@ -49,10 +49,11 @@ Comprehensive guides covering:
49
49
 
50
50
  **Manual Workflow (Full Control):**
51
51
  1. **πŸ“ Create a plan** β†’ `/tasks:create-plan Create user authentication system`
52
- 2. **πŸ“‹ Generate tasks** β†’ `/tasks:generate-tasks 1`
53
- 3. **πŸš€ Execute blueprint** β†’ `/tasks:execute-blueprint 1`
54
- 4. **πŸ“Š Monitor progress** β†’ `npx @e0ipso/ai-task-manager status`
55
- 5. **πŸ—‚οΈ Manage plans** β†’ `npx @e0ipso/ai-task-manager plan show 1`
52
+ 2. **πŸ” Refine the plan** β†’ `/tasks:refine-plan 1` (have a second assistant review the plan, ask clarifying questions, and update the document before tasks are created)
53
+ 3. **πŸ“‹ Generate tasks** β†’ `/tasks:generate-tasks 1`
54
+ 4. **πŸš€ Execute blueprint** β†’ `/tasks:execute-blueprint 1`
55
+ 5. **πŸ“Š Monitor progress** β†’ `npx @e0ipso/ai-task-manager status`
56
+ 6. **πŸ—‚οΈ Manage plans** β†’ `npx @e0ipso/ai-task-manager plan show 1`
56
57
 
57
58
  ## πŸ€– Supported Assistants
58
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e0ipso/ai-task-manager",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "description": "Task management for AI coding assistants",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -5,7 +5,8 @@ description: Create a comprehensive plan to accomplish the request from the user
5
5
  # Comprehensive Plan Creation
6
6
 
7
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.
8
+ disciplined scope control. Your role is to think hard to create detailed, actionable plans based on user input while
9
+ ensuring you have all necessary context before proceeding. Use the plan-creator sub-agent for this if it is available.
9
10
 
10
11
  ## Assistant Configuration
11
12
 
@@ -57,309 +57,23 @@ BLUEPRINT_EXISTS=$(node .ai/task-manager/config/scripts/validate-plan-blueprint.
57
57
 
58
58
  If either `$TASK_COUNT` is 0 or `$BLUEPRINT_EXISTS` is "no":
59
59
  - Display notification to user: "⚠️ Tasks or execution blueprint not found. Generating tasks automatically..."
60
- - Execute the following task generation process inline:
60
+ - Execute the embedded task generation process below
61
61
 
62
62
  ## Embedded Task Generation
63
63
 
64
- Think harder and use tools.
64
+ Follow ALL instructions from `generate-tasks.md` exactly for plan ID $1.
65
65
 
66
- 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.
67
-
68
- Include /TASK_MANAGER.md for the directory structure of tasks.
69
-
70
- ## Instructions
71
-
72
- You will think hard to analyze the provided plan document and decompose it into atomic, actionable tasks with clear dependencies and groupings.
73
-
74
- Use your internal Todo task tool to track the following process:
75
-
76
- - [ ] Read and process plan $1
77
- - [ ] Use the Task Generation Process to create tasks according to the Task Creation Guidelines
78
- - [ ] Read and run the .ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
79
-
80
- ### Input
81
- - A plan document. See .ai/task-manager/config/TASK_MANAGER.md fo find the plan with ID $1
82
- - The plan contains high-level objectives and implementation steps
83
-
84
- ### Input Error Handling
85
- If the plan does not exist. Stop immediately and show an error to the user.
86
-
87
- ### Task Creation Guidelines
88
-
89
- #### Task Minimization Principles
90
- **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.
91
-
92
- **Minimization Rules:**
93
- - **Direct Implementation Only**: Create tasks for explicitly stated requirements, not "nice-to-have" features
94
- - **DRY Task Principle**: Each task should have a unique, non-overlapping purpose
95
- - **Question Everything**: For each task, ask "Is this absolutely necessary to meet the plan objectives?"
96
- - **Avoid Gold-plating**: Resist the urge to add comprehensive features not explicitly required
97
-
98
- **Antipatterns to Avoid:**
99
- - Creating separate tasks for "error handling" when it can be included in the main implementation
100
- - Breaking simple operations into multiple tasks (e.g., separate "validate input" and "process input" tasks)
101
- - Adding tasks for "future extensibility" or "best practices" not mentioned in the plan
102
- - Creating comprehensive test suites for trivial functionality
103
-
104
- #### Task Granularity
105
- Each task must be:
106
- - **Single-purpose**: One clear deliverable or outcome
107
- - **Atomic**: Cannot be meaningfully split further
108
- - **Skill-specific**: Executable by a single skill agent (examples below)
109
- - **Verifiable**: Has clear completion criteria
110
-
111
- #### Skill Selection and Technical Requirements
112
-
113
- **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.
114
-
115
- **Skill Selection Criteria**:
116
- 1. **Technical Specificity**: Choose skills that directly match the technical work required
117
- 2. **Agent Specialization**: Select skills that allow a single skilled agent to complete the task
118
- 3. **Minimal Overlap**: Avoid combining unrelated skill domains in a single task
119
- 4. **Creative Inference**: Derive skills from task objectives and implementation context
120
-
121
- **Inspirational Skill Examples** (use kebab-case format):
122
- - Frontend: `react-components`, `css`, `js`, `vue-components`, `html`
123
- - Backend: `api-endpoints`, `database`, `authentication`, `server-config`
124
- - Testing: `jest`, `playwright`, `unit-testing`, `e2e-testing`
125
- - DevOps: `docker`, `github-actions`, `deployment`, `ci-cd`
126
- - Languages: `typescript`, `python`, `php`, `bash`, `sql`
127
- - Frameworks: `nextjs`, `express`, `drupal-backend`, `wordpress-plugins`
128
-
129
- **Automatic Skill Inference Examples**:
130
- - "Create user login form" β†’ `["react-components", "authentication"]`
131
- - "Build REST API for orders" β†’ `["api-endpoints", "database"]`
132
- - "Add Docker deployment" β†’ `["docker", "deployment"]`
133
- - "Write Jest tests for utils" β†’ `["jest"]`
134
-
135
- **Assignment Guidelines**:
136
- - **1 skill**: Focused, single-domain tasks
137
- - **2 skills**: Tasks requiring complementary domains
138
- - **Split if 3+**: Indicates task should be broken down
139
-
140
- ```
141
- # Examples
142
- skills: ["css"] # Pure styling
143
- skills: ["api-endpoints", "database"] # API with persistence
144
- skills: ["react-components", "jest"] # Implementation + testing
145
- ```
146
-
147
- #### Meaningful Test Strategy Guidelines
148
-
149
- **IMPORTANT** Make sure to copy this _Meaningful Test Strategy Guidelines_ section into all the tasks focused on testing, and **also** keep them in mind when generating tasks.
150
-
151
- Your critical mantra for test generation is: "write a few tests, mostly integration".
152
-
153
- **Definition of "Meaningful Tests":**
154
- 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.
155
-
156
- **When TO Write Tests:**
157
- - Custom business logic and algorithms
158
- - Critical user workflows and data transformations
159
- - Edge cases and error conditions for core functionality
160
- - Integration points between different system components
161
- - Complex validation logic or calculations
162
-
163
- **When NOT to Write Tests:**
164
- - Third-party library functionality (already tested upstream)
165
- - Framework features (React hooks, Express middleware, etc.)
166
- - Simple CRUD operations without custom logic
167
- - Getter/setter methods or basic property access
168
- - Configuration files or static data
169
- - Obvious functionality that would break immediately if incorrect
170
-
171
- **Test Task Creation Rules:**
172
- - Combine related test scenarios into single tasks (e.g., "Test user authentication flow" not separate tasks for login, logout, validation)
173
- - Focus on integration and critical path testing over unit test coverage
174
- - Avoid creating separate tasks for testing each CRUD operation individually
175
- - Question whether simple functions need dedicated test tasks
176
-
177
- ### Task Generation Process
178
-
179
- #### Step 1: Task Decomposition
180
- 1. Read through the entire plan
181
- 2. Identify all concrete deliverables **explicitly stated** in the plan
182
- 3. Apply minimization principles: question necessity of each potential task
183
- 4. Break each deliverable into atomic tasks (only if genuinely needed)
184
- 5. Ensure no task requires multiple skill sets
185
- 6. Verify each task has clear inputs and outputs
186
- 7. **Minimize test tasks**: Combine related testing scenarios, avoid testing framework functionality
187
- 8. Be very detailed with the "Implementation Notes". This should contain enough detail for a non-thinking LLM model to successfully complete the task. Put these instructions in a collapsible field `<details>`.
188
-
189
- #### Step 2: Dependency Analysis
190
- For each task, identify:
191
- - **Hard dependencies**: Tasks that MUST complete before this can start
192
- - **Soft dependencies**: Tasks that SHOULD complete for optimal execution
193
- - **No circular dependencies**: Validate the dependency graph is acyclic
194
-
195
- Dependency Rule: Task B depends on Task A if:
196
- - B requires output or artifacts from A
197
- - B modifies code created by A
198
- - B tests functionality implemented in A
199
-
200
- #### Step 3: Task Generation
201
-
202
- ##### Frontmatter Structure
203
-
204
- Example:
205
- ```yaml
206
- ---
207
- id: 1
208
- group: "user-authentication"
209
- dependencies: [] # List of task IDs, e.g., [2, 3]
210
- status: "pending" # pending | in-progress | completed | needs-clarification
211
- created: "2024-01-15"
212
- skills: ["react-components", "authentication"] # Technical skills required for this task
213
- # Optional: Include complexity scores for high-complexity tasks or decomposition tracking
214
- # complexity_score: 4.2 # Composite complexity score (only if >4 or decomposed)
215
- # complexity_notes: "Decomposed from original task due to high technical depth"
216
- ---
217
- ```
218
-
219
- The schema for this frontmatter is:
220
- ```json
221
- {
222
- "type": "object",
223
- "required": ["id", "group", "dependencies", "status", "created", "skills"],
224
- "properties": {
225
- "id": {
226
- "type": ["number"],
227
- "description": "Unique identifier for the task. An integer."
228
- },
229
- "group": {
230
- "type": "string",
231
- "description": "Group or category the task belongs to"
232
- },
233
- "dependencies": {
234
- "type": "array",
235
- "description": "List of task IDs this task depends on",
236
- "items": {
237
- "type": ["number"]
238
- }
239
- },
240
- "status": {
241
- "type": "string",
242
- "enum": ["pending", "in-progress", "completed", "needs-clarification"],
243
- "description": "Current status of the task"
244
- },
245
- "created": {
246
- "type": "string",
247
- "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
248
- "description": "Creation date in YYYY-MM-DD format"
249
- },
250
- "skills": {
251
- "type": "array",
252
- "description": "Technical skills required for this task (1-2 skills recommended)",
253
- "items": {
254
- "type": "string",
255
- "pattern": "^[a-z][a-z0-9-]*$"
256
- },
257
- "minItems": 1,
258
- "uniqueItems": true
259
- },
260
- "complexity_score": {
261
- "type": "number",
262
- "minimum": 1,
263
- "maximum": 10,
264
- "description": "Optional: Composite complexity score (include only if >4 or for decomposed tasks)"
265
- },
266
- "complexity_notes": {
267
- "type": "string",
268
- "description": "Optional: Rationale for complexity score or decomposition decisions"
269
- }
270
- },
271
- "additionalProperties": false
272
- }
273
- ```
274
-
275
- ##### Task Body Structure
276
-
277
- Use the task template in .ai/task-manager/config/templates/TASK_TEMPLATE.md
278
-
279
- ##### Task ID Generation
280
-
281
- 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:
282
-
283
- ```bash
284
- node .ai/task-manager/config/scripts/get-next-task-id.cjs $1
285
- ```
286
-
287
- ### Validation Checklist
288
- Before finalizing, ensure:
289
-
290
- **Core Task Requirements:**
291
- - [ ] Each task has 1-2 appropriate technical skills assigned
292
- - [ ] Skills are automatically inferred from task objectives and technical requirements
293
- - [ ] All dependencies form an acyclic graph
294
- - [ ] Task IDs are unique and sequential
295
- - [ ] Groups are consistent and meaningful
296
- - [ ] Every **explicitly stated** task from the plan is covered
297
- - [ ] No redundant or overlapping tasks
298
-
299
- **Complexity Analysis & Controls:**
300
- - [ ] **Complexity Analysis Complete**: All tasks assessed using 5-dimension scoring
301
- - [ ] **Decomposition Applied**: Tasks with composite score β‰₯6 have been decomposed or justified
302
- - [ ] **Final Task Complexity**: All final tasks have composite score ≀5 (target ≀4)
303
- - [ ] **Iteration Limits Respected**: No task exceeded 3 decomposition rounds
304
- - [ ] **Minimum Viability**: No tasks decomposed below complexity threshold of 3
305
- - [ ] **Quality Gates Passed**: All decomposed tasks meet enhanced quality criteria
306
- - [ ] **Dependency Integrity**: No circular dependencies or orphaned tasks exist
307
- - [ ] **Error Handling Complete**: All edge cases resolved or escalated appropriately
308
-
309
- **Complexity Documentation Requirements:**
310
- - [ ] **Complexity Scores Documented**: Individual dimension scores recorded for complex tasks
311
- - [ ] **Decomposition History**: Iteration tracking included in `complexity_notes` for decomposed tasks
312
- - [ ] **Validation Status**: All tasks marked with appropriate validation outcomes
313
- - [ ] **Escalation Documentation**: High-complexity tasks have clear escalation notes
314
- - [ ] **Consistency Validated**: Complexity scores align with task descriptions and skills
315
-
316
- **Scope & Quality Control:**
317
- - [ ] **Minimization Applied**: Each task is absolutely necessary (20-30% reduction target)
318
- - [ ] **Test Tasks are Meaningful**: Focus on business logic, not framework functionality
319
- - [ ] **No Gold-plating**: Only plan requirements are addressed
320
- - [ ] **Total Task Count**: Represents minimum viable implementation
321
- - [ ] **Scope Preservation**: Decomposed tasks collectively match original requirements
322
-
323
- **System Reliability:**
324
- - [ ] **Error Conditions Resolved**: No unresolved error states remain
325
- - [ ] **Manual Intervention Flagged**: Complex edge cases properly escalated
326
- - [ ] **Quality Checkpoints**: All validation gates completed successfully
327
- - [ ] **Dependency Graph Validated**: Full dependency analysis confirms acyclic, logical relationships
328
-
329
- ### Error Handling
330
- If the plan lacks sufficient detail:
331
- - Note areas needing clarification
332
- - Create placeholder tasks marked with `status: "needs-clarification"`
333
- - Document assumptions made
334
-
335
- #### Step 4: POST_TASK_GENERATION_ALL hook
336
-
337
- Read and run the .ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
338
-
339
- ### Output Requirements
340
-
341
- **Output Behavior:**
342
-
343
- Provide a concise completion message with task count:
344
- - Example: "Tasks generated for plan [id]: [count] tasks created"
345
-
346
- **CRITICAL - Structured Output for Command Coordination:**
347
-
348
- Always end your output with a standardized summary in this exact format:
349
-
350
- ```
351
- ---
352
- Task Generation Summary:
353
- - Plan ID: [numeric-id]
354
- - Tasks: [count]
355
- - Status: Ready for execution
356
- ```
357
-
358
- This structured output enables automated workflow coordination and must be included even when running standalone.
66
+ This includes:
67
+ - Reading and processing the plan document
68
+ - Applying task minimization principles (20-30% reduction target)
69
+ - Creating atomic tasks with 1-2 skills each
70
+ - Generating proper task files with frontmatter and body structure
71
+ - Running all validation checklists
72
+ - Executing the POST_TASK_GENERATION_ALL hook
359
73
 
360
74
  ## Resume Blueprint Execution
361
75
 
362
- After task generation completes, continue with the execution process below.
76
+ After task generation completes, continue with execution below.
363
77
 
364
78
  Otherwise, if tasks exist, proceed directly to execution.
365
79
 
@@ -23,7 +23,7 @@ Think harder and use tools.
23
23
 
24
24
  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.
25
25
 
26
- Include /TASK_MANAGER.md for the directory structure of tasks.
26
+ Include `.ai/task-manager/config/TASK_MANAGER.md` for the directory structure of tasks.
27
27
 
28
28
  ## Instructions
29
29
 
@@ -36,8 +36,13 @@ Use your internal Todo task tool to track the following process:
36
36
  - [ ] Read and run the .ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md
37
37
 
38
38
  ### Input
39
- - A plan document. See .ai/task-manager/config/TASK_MANAGER.md fo find the plan with ID $1
40
- - The plan contains high-level objectives and implementation steps
39
+
40
+ - A plan document. Extract it with the following command.
41
+
42
+ ```bash
43
+ # Extract validation results directly from script
44
+ PLAN_FILE=$(node .ai/task-manager/config/scripts/validate-plan-blueprint.cjs $1 planFile)
45
+ ```
41
46
 
42
47
  ### Input Error Handling
43
48
  If the plan does not exist. Stop immediately and show an error to the user.
@@ -0,0 +1,130 @@
1
+ ---
2
+ argument-hint: "[plan-ID]"
3
+ description: Review the plan with the provided ID, gather clarifications, and refine it.
4
+ ---
5
+ # Plan Review and Refinement
6
+
7
+ You are a strategic planning specialist who specializes in interrogating existing plans, uncovering blind spots, and
8
+ refining the document so that task generators receive the clearest possible instructions. Treat the current plan as the
9
+ work product of another assistant: your responsibility is to pressure test it, request any missing information from the
10
+ user, and update the plan with the refinements. Use the plan-creator sub-agent for this if it is available.
11
+
12
+ ## Assistant Configuration
13
+
14
+ Before proceeding with this command, you MUST load and respect the assistant's configuration:
15
+
16
+ **Run the following scripts:**
17
+ ```bash
18
+ ASSISTANT=$(node .ai/task-manager/config/scripts/detect-assistant.cjs)
19
+ node .ai/task-manager/config/scripts/read-assistant-config.cjs "$ASSISTANT"
20
+ ```
21
+
22
+ The output above contains your global and project-level configuration rules. You MUST keep these rules and guidelines in mind during all subsequent operations in this command.
23
+
24
+ ---
25
+
26
+ Think harder and use tools.
27
+
28
+ Include `.ai/task-manager/config/TASK_MANAGER.md` to understand the plan directory structure and naming conventions.
29
+
30
+ ## Inputs
31
+ - **Plan ID**: `$1` (required)
32
+ - **Optional refinement notes**: Either provided as additional command arguments or in the conversation. Treat them as constraints that must be reflected in the refined plan.
33
+
34
+ If the plan ID is missing, immediately stop and show an error explaining correct usage.
35
+
36
+ ### Plan Discovery and Validation
37
+
38
+ Obtain the plan using the plan ID using the following script:
39
+
40
+ ```bash
41
+ # Extract validation results directly from script
42
+ PLAN_FILE=$(node .ai/task-manager/config/scripts/validate-plan-blueprint.cjs $1 planFile)
43
+ ```
44
+
45
+ ## Process Checklist
46
+
47
+ Use your internal Todo tool to track the entire refinement workflow:
48
+
49
+ - [ ] Load `.ai/task-manager/config/hooks/PRE_PLAN.md`
50
+ - [ ] Stage 1: Baseline Review
51
+ - [ ] Stage 2: Clarification Loop
52
+ - [ ] Stage 3: Refinement Implementation
53
+ - [ ] Review the existing plan end-to-end (frontmatter, clarifications, architecture, risks, etc.)
54
+ - [ ] Surface strengths, contradictions, and potential risks, without updating the plan
55
+ - [ ] Use the "Total Clarification Algorithm" to get the missing clarification from the user
56
+ - [ ] Apply refinements using `.ai/task-manager/config/templates/PLAN_TEMPLATE.md` as the structural baseline
57
+ - [ ] Update the "Plan Clarifications" table with the latest Q&A
58
+ - [ ] Update the plan file ($PLAN_FILE) with the refinements from steps above
59
+ - [ ] Re-run `.ai/task-manager/config/hooks/POST_PLAN.md`
60
+
61
+ ## Stage 1: Baseline Review
62
+
63
+ 1. Capture key metadata (plan title, summary, creation date, related initiatives).
64
+ 2. Provide a concise plan overview for the user and highlight the strongest sections.
65
+
66
+ ## Stage 2: Clarification Loop
67
+
68
+ - Use the "Total Clarification Algorithm" to get the missing clarification from the user
69
+ - After receiving answers, append them to the "Plan Clarifications" section in the plan Markdown using the existing format (table with question/answer pairs).
70
+ - If the user cannot answer, record the unresolved questions along with mitigation notes so downstream assistants know the risk.
71
+
72
+ ### Total Clarification Algorithm
73
+
74
+ Think harder before interrupting the userβ€”only trigger this loop when you can cite concrete uncertainties.
75
+
76
+ 1. Ask yourself: **β€œAre there any aspects of the plan that could benefit from further clarification?”** Identify gaps using these lenses:
77
+ - **Context gaps**: missing background, assumptions, competing priorities.
78
+ - **Technical gaps**: underspecified architecture, unclear interfaces, missing diagrams.
79
+ - **Risk gaps**: untracked risks, missing mitigations, hand-wavy success metrics.
80
+ - **Scope issues**: gold-plating, ambiguous boundaries, requirements that contradict YAGNI.
81
+ 2. Document each gap with `{section, issue, severity, proposed fix}` so you can reference it when refining the plan.
82
+ 3. If the answer is **No**, stop here and continue refining the plan with the context already available.
83
+ 4. If the answer is **Yes**:
84
+ - Build a clarification packet grouped by theme.
85
+ - Prefill each question with the most plausible answer so the user can confirm/deny quickly.
86
+ - Always include an **β€œOther / open-ended”** option to capture nuances you did not anticipate.
87
+ 5. Send the packet, capture the responses (including open-ended notes), update the Plan Clarifications table, then jump back to Step 1 to ensure no new gaps remain.
88
+
89
+ ```mermaid
90
+ flowchart TD
91
+ A[Inspect current plan] --> B{Need more clarification?}
92
+ B -- No --> C[End Β· proceed with refinement]
93
+ B -- Yes --> D[Collect question set\nβ€’ targeted prompts\nβ€’ prefilled answers\nβ€’ open-ended field]
94
+ D --> B
95
+ ```
96
+
97
+ ## Stage 3: Refinement Implementation
98
+
99
+ Once you have sufficient context (or have documented the missing context), refine the plan directly in-place:
100
+
101
+ 1. **Maintain Identity**: Keep the existing `id` and directory. Do not create a new plan ID.
102
+ 2. **Structure Compliance**: Ensure the plan still follows `.ai/task-manager/config/templates/PLAN_TEMPLATE.md`. Add missing sections if necessary.
103
+ 3. **Content Updates**:
104
+ - Refresh the executive summary to reflect clarifications and new insights.
105
+ - Update architectural sections, diagrams, and risk mitigations to resolve the identified gaps.
106
+ - Trim any scope creep that is not explicitly required.
107
+ - Clearly reference clarifications in the relevant plan sections (e.g., italicized notes that point back to the Q&A table).
108
+ 4. **Net-New Sections**: If the plan needs a new subsection (e.g., Decision Log, Data Contracts), add it under `Notes` with a clearly labeled section so it remains discoverable.
109
+ 5. **Change Log**: Append a bullet list in the `Notes` section that briefly states what changed in this refinement session (e.g., `- 2025-03-16: Clarified auth flow tokens and updated architecture diagram`).
110
+ 6. **Validation Hooks**: Execute `.ai/task-manager/config/hooks/POST_PLAN.md` to ensure the refined plan still meets quality bars.
111
+
112
+ ## Output Requirements
113
+
114
+ 1. Present a concise "Refinement Report" to the user containing:
115
+ - Snapshot of the updated plan summary (title, summary line, plan path).
116
+ - Key clarifications added (with links to sections if applicable).
117
+ - Major improvements and remaining open questions (if any).
118
+ 2. Ensure the plan file on disk is fully updated before finishing.
119
+
120
+ ## Structured Output (MANDATORY)
121
+
122
+ Always end with the standardized summary so orchestrators can chain commands:
123
+
124
+ ```
125
+ ---
126
+
127
+ Plan Refinement Summary:
128
+ - Plan ID: [numeric-id]
129
+ - Plan File: [full-path-to-plan-file]
130
+ ```