sdd-pipeline 1.2.3 → 1.2.6
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/bin/sdd.cjs +201 -0
- package/lib/bmad/index.js +20 -3
- package/lib/bundle/.claude/commands/sdd-check.md +153 -0
- package/lib/bundle/.claude/commands/sdd-cook.md +169 -170
- package/lib/bundle/.claude/commands/sdd-implement.md +212 -0
- package/lib/bundle/.claude/commands/sdd-task-status.md +97 -27
- package/lib/bundle/bin/sdd.cjs +201 -0
- package/lib/bundle/bin/sdd.js +159 -0
- package/lib/bundle/commands/sdd-task-status.ps1 +82 -22
- package/lib/bundle/lib/bmad/confidence.js +129 -0
- package/lib/bundle/lib/bmad/index.js +157 -0
- package/lib/bundle/lib/bmad/problem-first.js +91 -0
- package/lib/bundle/lib/bmad/questions.js +110 -0
- package/lib/bundle/lib/bmad/synthesis.js +109 -0
- package/lib/bundle/lib/config.js +35 -0
- package/lib/bundle/lib/init.js +205 -0
- package/lib/bundle/lib/sanitize.js +10 -0
- package/lib/bundle/run-converge.ps1 +288 -42
- package/lib/bundle/skills/sdd-tasks/SKILL.md +259 -0
- package/lib/init.js +109 -32
- package/package.json +14 -11
- package/bin/sdd.js +0 -70
- package/lib/bmad.js +0 -54
- package/lib/converge-task.ps1 +0 -260
- package/lib/generate-tasks.ps1 +0 -450
- package/lib/output-dirs.ps1 +0 -461
- package/lib/sdd-check.ps1 +0 -130
- package/lib/shared-converge.ps1 +0 -270
- package/lib/verify-patterns.ps1 +0 -208
|
@@ -1,177 +1,197 @@
|
|
|
1
1
|
---
|
|
2
|
-
# SDD Cook — Phase 4 Implementation
|
|
3
|
-
#
|
|
4
|
-
# Validates with subagents, updates task status
|
|
2
|
+
# SDD Cook — Phase 4 Implementation Command
|
|
3
|
+
# Parses MASTER-TASKS.md and executes implementation
|
|
5
4
|
---
|
|
6
5
|
tool: Bash
|
|
7
6
|
when: always
|
|
8
7
|
args: optional
|
|
9
|
-
description: Phase 4 — Execute tasks from MASTER-TASKS.md
|
|
8
|
+
description: Phase 4 — Execute tasks from MASTER-TASKS.md. Args: [--all | --task T-XXX] [--auto-mark] [--dry-run]. Implements tasks and marks them complete.
|
|
10
9
|
---
|
|
11
|
-
$ErrorActionPreference = '
|
|
10
|
+
$ErrorActionPreference = 'Continue'
|
|
12
11
|
|
|
13
12
|
# ============================================================
|
|
14
|
-
# SDD Cook — Phase 4
|
|
13
|
+
# SDD Cook Command — Phase 4
|
|
15
14
|
# ============================================================
|
|
16
|
-
#
|
|
17
|
-
#
|
|
15
|
+
# This command:
|
|
16
|
+
# 1. Loads tasks from MASTER-TASKS.md
|
|
17
|
+
# 2. Shows execution plan
|
|
18
|
+
# 3. Provides commands to implement each task
|
|
19
|
+
# 4. Auto-marks tasks complete after implementation (with --auto-mark)
|
|
18
20
|
# ============================================================
|
|
19
21
|
|
|
20
22
|
# --- Parse arguments ---
|
|
21
23
|
$rawArgs = $args -join ' '
|
|
22
24
|
$targetTask = ""
|
|
23
|
-
$skipTest = $false
|
|
24
|
-
$skipReview = $false
|
|
25
25
|
$executeAll = $false
|
|
26
|
+
$autoMark = $false
|
|
27
|
+
$dryRun = $false
|
|
26
28
|
|
|
29
|
+
# Parse flags
|
|
27
30
|
if ($rawArgs -match "--task\s+(\S+)") {
|
|
28
31
|
$targetTask = $matches[1]
|
|
29
32
|
}
|
|
30
33
|
if ($rawArgs -match "--all") {
|
|
31
34
|
$executeAll = $true
|
|
32
35
|
}
|
|
33
|
-
if ($rawArgs -match "--
|
|
34
|
-
$
|
|
36
|
+
if ($rawArgs -match "--auto-mark") {
|
|
37
|
+
$autoMark = $true
|
|
35
38
|
}
|
|
36
|
-
if ($rawArgs -match "--
|
|
37
|
-
$
|
|
39
|
+
if ($rawArgs -match "--dry-run") {
|
|
40
|
+
$dryRun = $true
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
# ============================================================
|
|
41
|
-
#
|
|
44
|
+
# Prerequisites Check
|
|
42
45
|
# ============================================================
|
|
43
46
|
Write-Host ""
|
|
44
|
-
Write-Host "
|
|
47
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
48
|
+
Write-Host " SDD Cook — Phase 4 Implementation" -ForegroundColor Cyan
|
|
49
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
45
50
|
Write-Host ""
|
|
46
51
|
|
|
47
|
-
#
|
|
48
|
-
$
|
|
52
|
+
# SDD output paths
|
|
53
|
+
$SDD_OUTPUT_BASE = "sdd"
|
|
54
|
+
$SDD_TASKS_DIR = "$SDD_OUTPUT_BASE/tasks"
|
|
55
|
+
|
|
56
|
+
# Find task directory
|
|
57
|
+
$taskDirs = @()
|
|
58
|
+
if (Test-Path $SDD_TASKS_DIR) {
|
|
59
|
+
$taskDirs = Get-ChildItem -Path $SDD_TASKS_DIR -Filter "task-*-*" -Directory -ErrorAction SilentlyContinue
|
|
60
|
+
}
|
|
49
61
|
if (-not $taskDirs) {
|
|
50
|
-
|
|
51
|
-
|
|
62
|
+
$taskDirs = Get-ChildItem -Filter "task-*-*" -Directory -ErrorAction SilentlyContinue
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (-not $taskDirs) {
|
|
66
|
+
Write-Host "[ERROR] No task directory found." -ForegroundColor Red
|
|
67
|
+
Write-Host "Run: claude `"/sdd-tasks`" first." -ForegroundColor Yellow
|
|
52
68
|
exit 1
|
|
53
69
|
}
|
|
54
70
|
|
|
55
71
|
$taskDir = $taskDirs[0].FullName
|
|
56
72
|
$taskDirName = $taskDirs[0].Name
|
|
57
73
|
|
|
58
|
-
# Check MASTER-TASKS.md
|
|
74
|
+
# Check MASTER-TASKS.md
|
|
59
75
|
$masterTasksPath = Join-Path $taskDir "MASTER-TASKS.md"
|
|
60
76
|
if (-not (Test-Path $masterTasksPath)) {
|
|
61
|
-
Write-Host "[ERROR] MASTER-TASKS.md not found
|
|
62
|
-
Write-Host "Run: /sdd-tasks to generate tasks." -ForegroundColor Yellow
|
|
77
|
+
Write-Host "[ERROR] MASTER-TASKS.md not found." -ForegroundColor Red
|
|
63
78
|
exit 1
|
|
64
79
|
}
|
|
65
80
|
|
|
66
|
-
# Check SPEC.md
|
|
67
|
-
|
|
81
|
+
# Check SPEC.md
|
|
82
|
+
$specPath = "$SDD_OUTPUT_BASE/SPEC.md"
|
|
83
|
+
$specFile = if (Test-Path $specPath) { $specPath } else { "SPEC.md" }
|
|
84
|
+
if (-not (Test-Path $specFile)) {
|
|
68
85
|
Write-Host "[ERROR] SPEC.md not found." -ForegroundColor Red
|
|
69
|
-
Write-Host "Run: /sdd-spec
|
|
86
|
+
Write-Host "Run: claude `"/sdd-spec`" first." -ForegroundColor Yellow
|
|
70
87
|
exit 1
|
|
71
88
|
}
|
|
72
89
|
|
|
73
|
-
Write-Host "[OK] Prerequisites verified
|
|
74
|
-
Write-Host "
|
|
75
|
-
Write-Host "
|
|
76
|
-
Write-Host " - SPEC.md: Found" -ForegroundColor Gray
|
|
90
|
+
Write-Host "[OK] Prerequisites verified" -ForegroundColor Green
|
|
91
|
+
Write-Host " SPEC.md: $specFile" -ForegroundColor Gray
|
|
92
|
+
Write-Host " Task dir: $taskDirName" -ForegroundColor Gray
|
|
77
93
|
Write-Host ""
|
|
78
94
|
|
|
79
95
|
# ============================================================
|
|
80
|
-
#
|
|
96
|
+
# Load Tasks
|
|
81
97
|
# ============================================================
|
|
82
98
|
Write-Host "--- Loading Tasks ---" -ForegroundColor Yellow
|
|
83
99
|
|
|
84
100
|
$masterContent = Get-Content $masterTasksPath -Raw
|
|
85
101
|
|
|
86
|
-
# Parse tasks from table
|
|
87
102
|
$taskPattern = '\|\s*(T-\d+)\s*\|\s*([^\|]+)\s*\|\s*([^\|]+)\s*\|\s*\[([^\]]+)\]\s*\|'
|
|
88
103
|
$tasks = @()
|
|
89
104
|
if ($masterContent -match $taskPattern) {
|
|
90
105
|
$matches = [regex]::Matches($masterContent, $taskPattern)
|
|
91
106
|
foreach ($m in $matches) {
|
|
92
|
-
$
|
|
107
|
+
$tasks += @{
|
|
93
108
|
Id = $m.Groups[1].Value
|
|
94
109
|
Name = $m.Groups[2].Value.Trim()
|
|
95
110
|
Estimate = $m.Groups[3].Value.Trim()
|
|
96
111
|
Status = $m.Groups[4].Value.Trim()
|
|
97
112
|
}
|
|
98
|
-
$tasks += $task
|
|
99
113
|
}
|
|
100
114
|
}
|
|
101
115
|
|
|
102
116
|
if ($tasks.Count -eq 0) {
|
|
103
|
-
Write-Host "[ERROR] No tasks found
|
|
117
|
+
Write-Host "[ERROR] No tasks found." -ForegroundColor Red
|
|
104
118
|
exit 1
|
|
105
119
|
}
|
|
106
120
|
|
|
121
|
+
# Helper function to check if task is complete
|
|
122
|
+
function Test-TaskComplete($status) {
|
|
123
|
+
return $status -in @("x", "X", "v", "V", "done", "completed")
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
Write-Host ""
|
|
107
127
|
Write-Host "Found $($tasks.Count) tasks:" -ForegroundColor Green
|
|
128
|
+
$completedCount = 0
|
|
108
129
|
foreach ($t in $tasks) {
|
|
109
|
-
$
|
|
110
|
-
|
|
130
|
+
$isComplete = Test-TaskComplete $t.Status
|
|
131
|
+
if ($isComplete) { $completedCount++ }
|
|
132
|
+
$statusIcon = if ($isComplete) { "[V]" } else { "[ ]" }
|
|
133
|
+
$color = if ($isComplete) { "Green" } else { "Gray" }
|
|
111
134
|
Write-Host " $statusIcon $($t.Id): $($t.Name) ($($t.Estimate))" -ForegroundColor $color
|
|
112
135
|
}
|
|
113
136
|
Write-Host ""
|
|
137
|
+
Write-Host "Progress: $completedCount/$($tasks.Count) complete" -ForegroundColor Cyan
|
|
138
|
+
Write-Host ""
|
|
114
139
|
|
|
115
140
|
# ============================================================
|
|
116
|
-
#
|
|
141
|
+
# Select Tasks to Execute
|
|
117
142
|
# ============================================================
|
|
118
|
-
$pendingTasks = $tasks | Where-Object { $_.Status
|
|
143
|
+
$pendingTasks = $tasks | Where-Object { -not (Test-TaskComplete $_.Status) }
|
|
119
144
|
$tasksToExecute = @()
|
|
120
145
|
|
|
121
146
|
if ($targetTask) {
|
|
122
|
-
# Execute specific task
|
|
123
147
|
$specific = $pendingTasks | Where-Object { $_.Id -eq $targetTask }
|
|
124
148
|
if ($specific) {
|
|
125
149
|
$tasksToExecute += $specific
|
|
126
|
-
Write-Host "
|
|
150
|
+
Write-Host "Mode: specific - Task $targetTask" -ForegroundColor Cyan
|
|
127
151
|
} else {
|
|
128
152
|
$found = $tasks | Where-Object { $_.Id -eq $targetTask }
|
|
129
153
|
if ($found) {
|
|
130
|
-
Write-Host "[
|
|
154
|
+
Write-Host "[INFO] Task $targetTask already complete." -ForegroundColor Green
|
|
131
155
|
} else {
|
|
132
156
|
Write-Host "[ERROR] Task $targetTask not found." -ForegroundColor Red
|
|
133
157
|
}
|
|
134
158
|
exit 0
|
|
135
159
|
}
|
|
136
160
|
} elseif ($executeAll) {
|
|
137
|
-
# Execute all pending in order
|
|
138
161
|
$tasksToExecute = $pendingTasks
|
|
139
|
-
Write-Host "
|
|
162
|
+
Write-Host "Mode: all - $($tasksToExecute.Count) tasks" -ForegroundColor Cyan
|
|
140
163
|
} else {
|
|
141
|
-
# Default: execute first pending task
|
|
142
164
|
if ($pendingTasks.Count -gt 0) {
|
|
143
165
|
$tasksToExecute += $pendingTasks[0]
|
|
144
|
-
Write-Host "
|
|
166
|
+
Write-Host "Mode: next pending task" -ForegroundColor Cyan
|
|
145
167
|
} else {
|
|
146
|
-
Write-Host "[INFO] All tasks
|
|
168
|
+
Write-Host "[INFO] All tasks complete!" -ForegroundColor Green
|
|
147
169
|
Write-Host ""
|
|
148
|
-
Write-Host "Next: /sdd-converge
|
|
170
|
+
Write-Host "Next: claude `"/sdd-converge`"" -ForegroundColor Cyan
|
|
149
171
|
exit 0
|
|
150
172
|
}
|
|
151
173
|
}
|
|
152
174
|
|
|
175
|
+
Write-Host ""
|
|
176
|
+
Write-Host "Tasks to execute: $($tasksToExecute.Count)" -ForegroundColor Green
|
|
177
|
+
|
|
153
178
|
# ============================================================
|
|
154
|
-
#
|
|
179
|
+
# Generate Execution Plan
|
|
155
180
|
# ============================================================
|
|
156
181
|
Write-Host ""
|
|
157
|
-
Write-Host "
|
|
182
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
183
|
+
Write-Host " SDD Cook Execution Plan" -ForegroundColor Cyan
|
|
184
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
158
185
|
Write-Host ""
|
|
159
186
|
|
|
160
|
-
$
|
|
161
|
-
$
|
|
162
|
-
$completedBefore = ($tasks | Where-Object { $_.Status -eq "x" }).Count
|
|
187
|
+
$taskNumber = 1
|
|
188
|
+
$executionPlan = @()
|
|
163
189
|
|
|
164
190
|
foreach ($task in $tasksToExecute) {
|
|
165
|
-
Write-Host ""
|
|
166
|
-
Write-Host "========================================" -ForegroundColor Magenta
|
|
167
|
-
Write-Host "Executing: $($task.Id) - $($task.Name)" -ForegroundColor Magenta
|
|
168
|
-
Write-Host "========================================" -ForegroundColor Magenta
|
|
169
|
-
|
|
170
191
|
# Find task file
|
|
171
192
|
$taskFiles = Get-ChildItem -Path $taskDir -Filter "$($task.Id)-*.md" -File
|
|
172
193
|
if (-not $taskFiles) {
|
|
173
194
|
Write-Host "[WARN] Task file not found: $($task.Id)-*.md" -ForegroundColor Yellow
|
|
174
|
-
Write-Host "Skipping $($task.Id)..." -ForegroundColor Yellow
|
|
175
195
|
continue
|
|
176
196
|
}
|
|
177
197
|
|
|
@@ -187,27 +207,9 @@ foreach ($task in $tasksToExecute) {
|
|
|
187
207
|
}
|
|
188
208
|
}
|
|
189
209
|
|
|
190
|
-
#
|
|
191
|
-
if ($dependsOn.Count -gt 0) {
|
|
192
|
-
Write-Host "Dependencies: $($dependsOn -join ', ')" -ForegroundColor Gray
|
|
193
|
-
$depsMet = $true
|
|
194
|
-
foreach ($dep in $dependsOn) {
|
|
195
|
-
$depTask = $tasks | Where-Object { $_.Id -eq $dep }
|
|
196
|
-
if ($depTask -and $depTask.Status -ne "x") {
|
|
197
|
-
Write-Host "[BLOCKED] $($task.Id) depends on $dep which is not complete." -ForegroundColor Red
|
|
198
|
-
$depsMet = $false
|
|
199
|
-
break
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
if (-not $depsMet) {
|
|
203
|
-
Write-Host "Skipping $($task.Id) - dependency not met." -ForegroundColor Yellow
|
|
204
|
-
continue
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
# Extract files to modify
|
|
210
|
+
# Extract files
|
|
209
211
|
$filesToModify = @()
|
|
210
|
-
if ($taskContent -match '## Files to Modify
|
|
212
|
+
if ($taskContent -match '(?s)## Files to (?:Modify|Create)\s*\n((?:- .+\n)+)') {
|
|
211
213
|
$filesBlock = $matches[1]
|
|
212
214
|
$files = $filesBlock -split '\n' | Where-Object { $_ -match '^\s*-\s+' }
|
|
213
215
|
foreach ($f in $files) {
|
|
@@ -216,120 +218,117 @@ foreach ($task in $tasksToExecute) {
|
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
220
|
|
|
219
|
-
# Extract implementation
|
|
220
|
-
$
|
|
221
|
-
if ($taskContent -match '## Implementation Steps\s*\n((?:\d+\. .+\n)+)') {
|
|
222
|
-
$
|
|
223
|
-
$implSteps = $stepsBlock -split '\n' | Where-Object { $_ -match '^\d+\.' }
|
|
221
|
+
# Extract implementation summary
|
|
222
|
+
$implSummary = ""
|
|
223
|
+
if ($taskContent -match '(?s)## Implementation Steps\s*\n((?:\d+\. .+\n?)+)') {
|
|
224
|
+
$implSummary = "Steps: " + ($matches[1] -replace '\n', ' | ').Trim()
|
|
224
225
|
}
|
|
225
226
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
$planItem = @{
|
|
228
|
+
Id = $task.Id
|
|
229
|
+
Name = $task.Name
|
|
230
|
+
File = $taskFile
|
|
231
|
+
Dependencies = $dependsOn
|
|
232
|
+
Files = $filesToModify
|
|
233
|
+
Summary = $implSummary
|
|
231
234
|
}
|
|
235
|
+
$executionPlan += $planItem
|
|
232
236
|
|
|
233
|
-
Write-Host ""
|
|
234
|
-
Write-Host "
|
|
235
|
-
Write-Host "
|
|
236
|
-
Write-Host "
|
|
237
|
+
Write-Host "--------------------------------------------" -ForegroundColor Magenta
|
|
238
|
+
Write-Host "TASK $($task.Id): $($task.Name)" -ForegroundColor Magenta
|
|
239
|
+
Write-Host "--------------------------------------------" -ForegroundColor Magenta
|
|
240
|
+
Write-Host " File: $taskFile" -ForegroundColor Gray
|
|
237
241
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
# ============================================================
|
|
241
|
-
Write-Host ""
|
|
242
|
-
Write-Host "--- Implementation ---" -ForegroundColor Yellow
|
|
243
|
-
Write-Host "Executing implementation for $($task.Id)..." -ForegroundColor Green
|
|
244
|
-
Write-Host ""
|
|
245
|
-
Write-Host "[HINT] To implement this task:" -ForegroundColor Cyan
|
|
246
|
-
Write-Host " 1. Read SPEC.md for requirements" -ForegroundColor Gray
|
|
247
|
-
Write-Host " 2. Read $taskFile" -ForegroundColor Gray
|
|
248
|
-
Write-Host " 3. Implement changes per steps" -ForegroundColor Gray
|
|
249
|
-
Write-Host ""
|
|
250
|
-
Write-Host "[HINT] Files to modify:" -ForegroundColor Cyan
|
|
251
|
-
foreach ($f in $filesToModify) {
|
|
252
|
-
Write-Host " - $f" -ForegroundColor Gray
|
|
253
|
-
}
|
|
254
|
-
Write-Host ""
|
|
255
|
-
Write-Host "[HINT] Implementation steps:" -ForegroundColor Cyan
|
|
256
|
-
foreach ($step in $implSteps) {
|
|
257
|
-
Write-Host " $step" -ForegroundColor Gray
|
|
242
|
+
if ($dependsOn.Count -gt 0) {
|
|
243
|
+
Write-Host " Dependencies: $($dependsOn -join ', ')" -ForegroundColor Yellow
|
|
258
244
|
}
|
|
259
245
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
# ============================================================
|
|
263
|
-
if (-not $skipTest) {
|
|
264
|
-
Write-Host ""
|
|
265
|
-
Write-Host "--- Testing ---" -ForegroundColor Yellow
|
|
266
|
-
Write-Host "Verification checks:" -ForegroundColor Cyan
|
|
267
|
-
foreach ($check in $verificationChecks) {
|
|
268
|
-
$checkText = $check -replace '^\s*-\s+\[ \]\s*', ''
|
|
269
|
-
Write-Host " [ ] $checkText" -ForegroundColor Gray
|
|
270
|
-
}
|
|
271
|
-
Write-Host ""
|
|
272
|
-
Write-Host "[HINT] Run tests and verify each check." -ForegroundColor Cyan
|
|
273
|
-
Write-Host "Mark checks complete after verification." -ForegroundColor Gray
|
|
246
|
+
if ($filesToModify.Count -gt 0) {
|
|
247
|
+
Write-Host " Files: $($filesToModify -join ', ')" -ForegroundColor Gray
|
|
274
248
|
}
|
|
275
249
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
# ============================================================
|
|
279
|
-
if (-not $skipReview) {
|
|
280
|
-
Write-Host ""
|
|
281
|
-
Write-Host "--- Code Review ---" -ForegroundColor Yellow
|
|
282
|
-
Write-Host "[HINT] After implementation, run: /ck:code-review" -ForegroundColor Cyan
|
|
283
|
-
Write-Host "[HINT] Verify:" -ForegroundColor Cyan
|
|
284
|
-
Write-Host " - Spec compliance (SPEC.md requirements met)" -ForegroundColor Gray
|
|
285
|
-
Write-Host " - No regression in touched files" -ForegroundColor Gray
|
|
286
|
-
Write-Host " - Code quality and patterns" -ForegroundColor Gray
|
|
250
|
+
if ($implSummary) {
|
|
251
|
+
Write-Host " $implSummary" -ForegroundColor Gray
|
|
287
252
|
}
|
|
288
|
-
|
|
289
|
-
# ============================================================
|
|
290
|
-
# MANUAL CONFIRMATION
|
|
291
|
-
# ============================================================
|
|
292
|
-
Write-Host ""
|
|
293
|
-
Write-Host "========================================" -ForegroundColor Magenta
|
|
294
|
-
Write-Host "After completing $($task.Id), update status?" -ForegroundColor Yellow
|
|
295
|
-
Write-Host "========================================" -ForegroundColor Magenta
|
|
296
253
|
Write-Host ""
|
|
297
|
-
Write-Host "To mark complete, run:" -ForegroundColor Cyan
|
|
298
|
-
Write-Host ' /sdd-task-status ' + $task.Id + ' done' -ForegroundColor Gray
|
|
299
|
-
Write-Host ""
|
|
300
|
-
|
|
301
|
-
# Update MASTER-TASKS.md
|
|
302
|
-
$masterContent = Get-Content $masterTasksPath -Raw
|
|
303
|
-
$newStatus = "[x]"
|
|
304
|
-
$updatedContent = $masterContent -replace "(`|$([regex]::Escape($task.Id))`|\s)\[([ `])\](?=\s*\|)", "`$1[x]"
|
|
305
|
-
Set-Content $masterTasksPath $updatedContent -Encoding UTF8
|
|
306
254
|
|
|
307
|
-
|
|
308
|
-
$completedCount++
|
|
255
|
+
$taskNumber++
|
|
309
256
|
}
|
|
310
257
|
|
|
311
258
|
# ============================================================
|
|
312
|
-
#
|
|
259
|
+
# Implementation Commands
|
|
313
260
|
# ============================================================
|
|
314
|
-
Write-Host ""
|
|
315
261
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
316
|
-
Write-Host "
|
|
262
|
+
Write-Host " Implementation Commands" -ForegroundColor Cyan
|
|
317
263
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
318
264
|
Write-Host ""
|
|
319
|
-
Write-Host "Tasks completed this session: $completedCount" -ForegroundColor Green
|
|
320
|
-
$completedAfter = $completedBefore + $completedCount
|
|
321
|
-
Write-Host "Total progress: $completedAfter / $totalTasks" -ForegroundColor Gray
|
|
322
265
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
Write-Host "Remaining: $remaining tasks" -ForegroundColor Yellow
|
|
266
|
+
if ($dryRun) {
|
|
267
|
+
Write-Host "[DRY RUN] No changes will be made." -ForegroundColor Yellow
|
|
326
268
|
Write-Host ""
|
|
327
|
-
|
|
328
|
-
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
Write-Host "To implement each task, run these commands in order:" -ForegroundColor White
|
|
272
|
+
Write-Host ""
|
|
273
|
+
|
|
274
|
+
$cmdNumber = 1
|
|
275
|
+
foreach ($plan in $executionPlan) {
|
|
276
|
+
Write-Host " $cmdNumber. Implement $($plan.Id): $($plan.Name)" -ForegroundColor Cyan
|
|
277
|
+
Write-Host " claude `"/sdd-implement $($plan.Id)`"" -ForegroundColor Gray
|
|
329
278
|
Write-Host ""
|
|
330
|
-
|
|
279
|
+
$cmdNumber++
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
Write-Host " $cmdNumber. After implementation, mark tasks complete:" -ForegroundColor White
|
|
283
|
+
Write-Host " pwsh commands/sdd-task-status.ps1 -TaskId <T-XXX> -Status completed" -ForegroundColor Gray
|
|
284
|
+
Write-Host ""
|
|
285
|
+
|
|
286
|
+
# ============================================================
|
|
287
|
+
# Auto-Mark Mode (if --auto-mark)
|
|
288
|
+
# ============================================================
|
|
289
|
+
if ($autoMark -and -not $dryRun) {
|
|
290
|
+
Write-Host "========================================" -ForegroundColor Green
|
|
291
|
+
Write-Host " Auto-Mark Mode Enabled" -ForegroundColor Green
|
|
292
|
+
Write-Host "========================================" -ForegroundColor Green
|
|
331
293
|
Write-Host ""
|
|
332
|
-
Write-Host "
|
|
294
|
+
Write-Host "Tasks will be marked complete after implementation." -ForegroundColor White
|
|
295
|
+
Write-Host "Run each implementation command, then:" -ForegroundColor White
|
|
296
|
+
Write-Host ""
|
|
297
|
+
|
|
298
|
+
foreach ($plan in $executionPlan) {
|
|
299
|
+
Write-Host " After implementing $($plan.Id):" -ForegroundColor Cyan
|
|
300
|
+
Write-Host " pwsh commands/sdd-task-status.ps1 -TaskId '$($plan.Id)' -Status completed" -ForegroundColor Gray
|
|
301
|
+
Write-Host ""
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
# ============================================================
|
|
306
|
+
# Quick Execute Mode (non-interactive)
|
|
307
|
+
# ============================================================
|
|
308
|
+
if (-not $dryRun) {
|
|
309
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
310
|
+
Write-Host " Quick Execute" -ForegroundColor Cyan
|
|
311
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
312
|
+
Write-Host ""
|
|
313
|
+
|
|
314
|
+
# Show one-liner for executing all pending tasks
|
|
315
|
+
$taskIds = ($executionPlan | ForEach-Object { $_.Id }) -join ","
|
|
316
|
+
Write-Host "To execute all shown tasks:" -ForegroundColor White
|
|
317
|
+
Write-Host " claude `"/sdd-implement --all`"" -ForegroundColor Gray
|
|
318
|
+
Write-Host ""
|
|
319
|
+
|
|
320
|
+
# Check if skills are available
|
|
321
|
+
$skillPath = "skills/sdd-cook/SKILL.md"
|
|
322
|
+
if (Test-Path $skillPath) {
|
|
323
|
+
Write-Host "[OK] Skill available: skills/sdd-cook/SKILL.md" -ForegroundColor Green
|
|
324
|
+
Write-Host " Run: claude `"/sdd-implement $($executionPlan[0].Id)`"" -ForegroundColor Gray
|
|
325
|
+
} else {
|
|
326
|
+
Write-Host "[WARN] Skill not found: $skillPath" -ForegroundColor Yellow
|
|
327
|
+
Write-Host " Run 'sdd init' to copy skills." -ForegroundColor Gray
|
|
328
|
+
}
|
|
333
329
|
}
|
|
334
330
|
|
|
335
331
|
Write-Host ""
|
|
332
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
333
|
+
Write-Host "Ready to implement $($tasksToExecute.Count) task(s)" -ForegroundColor Green
|
|
334
|
+
Write-Host "========================================" -ForegroundColor Cyan
|