@sixsevenai/ai-dlc-installer 1.2.6 → 1.3.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.
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
---
|
|
2
|
+
command: task:complete
|
|
3
|
+
description: Finalize a completed task plan — validates completion, optionally checks for code smells, writes a Complete.md summary, and commits.
|
|
4
|
+
allowed-tools: Task, Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion, TodoWrite, TodoRead, Skill
|
|
5
|
+
args:
|
|
6
|
+
- name: --code-smells
|
|
7
|
+
description: Run a code smell analysis on files modified during the task before completing
|
|
8
|
+
required: false
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# /task:complete
|
|
12
|
+
|
|
13
|
+
Finalizes a completed task by verifying all steps are done, optionally auditing code quality, writing a completion summary (`Complete.md`), and committing the work.
|
|
14
|
+
|
|
15
|
+
## User Input
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
$ARGUMENTS
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Outline
|
|
26
|
+
|
|
27
|
+
### Step 1: Locate and Load Task Plan
|
|
28
|
+
|
|
29
|
+
1. Search for existing task plans:
|
|
30
|
+
```
|
|
31
|
+
Glob: artifacts/tasks/*/task-plan.md
|
|
32
|
+
```
|
|
33
|
+
2. If **multiple** plans are found, select the most recently modified file.
|
|
34
|
+
3. If **none** found, stop and report:
|
|
35
|
+
> "No task plan found. Run `/task:plan` first to create one."
|
|
36
|
+
4. Read the complete task plan file using the Read tool.
|
|
37
|
+
5. Parse `$ARGUMENTS` for the `--code-smells` flag.
|
|
38
|
+
6. Report to the user: which task plan was loaded and which flags are active.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### Step 2: Validate Completion
|
|
43
|
+
|
|
44
|
+
Scan every checkbox line in the task plan:
|
|
45
|
+
|
|
46
|
+
| Symbol | Meaning |
|
|
47
|
+
|--------|---------|
|
|
48
|
+
| `[ ]` | Pending — not yet executed |
|
|
49
|
+
| `[x]` | Complete |
|
|
50
|
+
| `[SKIPPED]` | Skipped |
|
|
51
|
+
| `[FAILED: ...]` | Failed |
|
|
52
|
+
|
|
53
|
+
Count totals for each category.
|
|
54
|
+
|
|
55
|
+
**Blocking checks:**
|
|
56
|
+
|
|
57
|
+
- If **any** step is `[ ]` (pending), stop and report:
|
|
58
|
+
> "Task plan has {N} pending steps. Run `/task:execute` to complete them before finalizing."
|
|
59
|
+
- If **any** step is `[FAILED: ...]`, ask the user with AskUserQuestion:
|
|
60
|
+
- **Proceed anyway** — accept failures and finalize
|
|
61
|
+
- **Stop** — go back and fix failures first
|
|
62
|
+
|
|
63
|
+
If all steps are `[x]` or `[SKIPPED]` (with no failures, or user chose to proceed), continue.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
### Step 3: Code Smell Check (optional — only if `--code-smells` flag present)
|
|
68
|
+
|
|
69
|
+
If `--code-smells` was passed:
|
|
70
|
+
|
|
71
|
+
1. Extract the list of modified/created files from the task plan's **Affected Files** section. Fall back to scanning the Execution Log for file paths mentioned in step notes.
|
|
72
|
+
2. Use the **Skill** tool to invoke `simplify` — pass a prompt asking it to review the changed files for code smells, redundancy, and quality issues.
|
|
73
|
+
- If `simplify` is unavailable, use a general-purpose subagent via the **Task** tool with this prompt:
|
|
74
|
+
> "Review the following files for code smells, anti-patterns, unnecessary complexity, and obvious improvements. List findings by severity (high/medium/low). Do NOT make changes — report only. Files: {file-list}"
|
|
75
|
+
3. Display the findings to the user.
|
|
76
|
+
4. Ask with AskUserQuestion:
|
|
77
|
+
- **Fix all high-severity findings** — Spawn a subagent to address them
|
|
78
|
+
- **Fix all findings** — Spawn a subagent to address all severities
|
|
79
|
+
- **Skip fixes** — Continue without fixing
|
|
80
|
+
|
|
81
|
+
If fixes are requested, spawn a subagent (Task tool) to apply them. After it returns, re-verify the task plan checkboxes to ensure nothing was broken.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### Step 4: Write `Complete.md`
|
|
86
|
+
|
|
87
|
+
Determine the session folder from the task plan path (e.g., `artifacts/tasks/task-fix-auth-20260304-001/`).
|
|
88
|
+
|
|
89
|
+
Write `artifacts/tasks/{session-id}/Complete.md` with this structure:
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
# Task Complete: {TITLE from task plan}
|
|
93
|
+
|
|
94
|
+
**Session**: {session-id}
|
|
95
|
+
**Completed**: {today's date and time}
|
|
96
|
+
**Status**: {Complete | Partial | Complete with failures accepted}
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Summary
|
|
101
|
+
|
|
102
|
+
{Copy the Context section from the task plan — 1-3 sentences}
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Completion Statistics
|
|
107
|
+
|
|
108
|
+
| Category | Count |
|
|
109
|
+
|----------|-------|
|
|
110
|
+
| Total steps | {N} |
|
|
111
|
+
| Completed ✅ | {completed} |
|
|
112
|
+
| Skipped ⏭️ | {skipped} |
|
|
113
|
+
| Failed ❌ | {failed} |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Files Modified
|
|
118
|
+
|
|
119
|
+
{List of files from the task plan's Affected Files section, or extracted from the Execution Log}
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Code Smell Report
|
|
124
|
+
|
|
125
|
+
{If --code-smells was run: paste findings summary here. If not run: "Not requested."}
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Execution Log
|
|
130
|
+
|
|
131
|
+
{Copy the Execution Log table from the task plan}
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Rollback
|
|
136
|
+
|
|
137
|
+
{Copy the Rollback Plan section from the task plan, or "See task-plan.md for rollback instructions."}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Use the **Write** tool to create the file.
|
|
141
|
+
|
|
142
|
+
Verify it was created:
|
|
143
|
+
```bash
|
|
144
|
+
ls artifacts/tasks/{session-id}/Complete.md
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### Step 5: Commit
|
|
150
|
+
|
|
151
|
+
Update the task plan's `**Status**:` field to `Complete` using the Edit tool.
|
|
152
|
+
|
|
153
|
+
Then invoke the `/commit` skill using the **Skill** tool:
|
|
154
|
+
```
|
|
155
|
+
Skill: commit
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
This will stage all changes and create a properly formatted commit.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### Step 6: Report
|
|
163
|
+
|
|
164
|
+
Output a final summary to the user:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
## Task Finalized
|
|
168
|
+
|
|
169
|
+
Session : {session-id}
|
|
170
|
+
Status : {Complete | Partial | Complete with failures accepted}
|
|
171
|
+
Summary : {Complete.md path}
|
|
172
|
+
Committed : ✅
|
|
173
|
+
|
|
174
|
+
### Statistics
|
|
175
|
+
- Completed : {N} steps
|
|
176
|
+
- Skipped : {N} steps
|
|
177
|
+
- Failed : {N} steps
|
|
178
|
+
|
|
179
|
+
### Next Steps
|
|
180
|
+
- Review Complete.md : artifacts/tasks/{session-id}/Complete.md
|
|
181
|
+
- View task history : artifacts/tasks/
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Behavior Rules
|
|
187
|
+
|
|
188
|
+
1. **Never finalize with pending steps.** Block and instruct the user to run `/task:execute` first.
|
|
189
|
+
2. **Always write Complete.md before committing.** The file must exist before the commit runs.
|
|
190
|
+
3. **Code smell check is optional.** Only run if `--code-smells` is in `$ARGUMENTS`.
|
|
191
|
+
4. **Respect the user's choice on failures.** If they choose to proceed with failures, note it in `Complete.md` status.
|
|
192
|
+
5. **Use the Skill tool for commit.** Invoke `commit` skill — do not run raw `git` commands.
|
|
193
|
+
6. **Complete.md lives alongside task-plan.md.** Same session folder, same directory.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Examples
|
|
198
|
+
|
|
199
|
+
### Standard completion
|
|
200
|
+
```bash
|
|
201
|
+
/task:complete
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Completion with code smell review
|
|
205
|
+
```bash
|
|
206
|
+
/task:complete --code-smells
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Related Commands
|
|
210
|
+
|
|
211
|
+
- `/task:plan` — Create a task plan
|
|
212
|
+
- `/task:execute` — Execute the task plan (run before complete)
|
|
213
|
+
- `/task:clarify` — Refine the plan
|
|
@@ -71,6 +71,26 @@ If the document does not yet contain an **Execution Log** table, append one at t
|
|
|
71
71
|
|------|--------|-----------|-------|
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
+
### Step 3.5: Build Claude TodoList
|
|
75
|
+
|
|
76
|
+
Parse every checkbox step from the task plan and register them as Claude TodoList entries using the **TodoWrite** tool. This provides real-time progress visibility in the Claude UI during execution.
|
|
77
|
+
|
|
78
|
+
**Parse rules:**
|
|
79
|
+
- Create one TodoWrite entry per **subtask** (T1.1, T1.2, etc.) — not per individual atomic step. Atomic steps are tracked by checkboxes in the document; subtasks map cleanly to TodoList items.
|
|
80
|
+
- Use the subtask label as the `subject` (e.g., `"T1.1 — Set up authentication middleware"`)
|
|
81
|
+
- Set `activeForm` to a present-continuous version of the label (e.g., `"Setting up authentication middleware"`)
|
|
82
|
+
- Set `status` to `pending` for all entries initially.
|
|
83
|
+
- Set `description` to the list of atomic step IDs within that subtask (e.g., `"Steps: T1.1.1, T1.1.2, T1.1.3"`)
|
|
84
|
+
|
|
85
|
+
**If the task plan has no subtasks** (only top-level tasks), create one TodoList entry per top-level task instead.
|
|
86
|
+
|
|
87
|
+
**After creating entries**, store the mapping of `{subtask-id → todoId}` in working memory so you can update each entry's status as steps execute.
|
|
88
|
+
|
|
89
|
+
**During execution** (Steps 4A and 4B), update each TodoList entry via **TaskUpdate** equivalent behavior:
|
|
90
|
+
- When the first step of a subtask begins executing: mark the entry `in_progress`
|
|
91
|
+
- When all steps in a subtask are `[x]` or `[SKIPPED]`: mark the entry `completed`
|
|
92
|
+
- When a subtask step is `[FAILED: ...]` and the user chose to move on: mark the entry `completed` (failures are logged in the document)
|
|
93
|
+
|
|
74
94
|
### Step 4A: Interactive Execution (default mode)
|
|
75
95
|
|
|
76
96
|
For each **top-level task** (T1, T2, T3, ...) that contains at least one pending `[ ]` step:
|
|
@@ -209,7 +229,7 @@ Update the task plan document with final state:
|
|
|
209
229
|
```
|
|
210
230
|
|
|
211
231
|
If all steps passed, suggest:
|
|
212
|
-
-
|
|
232
|
+
- Running `/task:complete` to finalize, generate `Complete.md`, and commit in one step
|
|
213
233
|
- Running related commands if applicable
|
|
214
234
|
|
|
215
235
|
If there were failures, suggest:
|